code stringlengths 63 466k | code_sememe stringlengths 141 3.79M | token_type stringlengths 274 1.23M |
|---|---|---|
public Map<String, Class> mapAllImplementations(Class interfase) throws IOException, ClassNotFoundException {
Map<String, Class> implementations = new HashMap<>();
Map<String, String> map = mapAllStrings(interfase.getName());
for (Iterator iterator = map.entrySet().iterator(); iterator.hasNext()... | class class_name[name] begin[{]
method[mapAllImplementations, return_type[type[Map]], modifier[public], parameter[interfase]] begin[{]
local_variable[type[Map], implementations]
local_variable[type[Map], map]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclarat... | Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Class] operator[>] identifier[mapAllImplementations] operator[SEP] identifier[Class] identifier[interfase] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ClassNotFoundException] {
identifier[Map] operator[<] identif... |
public EClass getIfcElectricVoltageMeasure() {
if (ifcElectricVoltageMeasureEClass == null) {
ifcElectricVoltageMeasureEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI)
.getEClassifiers().get(674);
}
return ifcElectricVoltageMeasureEClass;
} | class class_name[name] begin[{]
method[getIfcElectricVoltageMeasure, return_type[type[EClass]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.ifcElectricVoltageMeasureEClass], ==, literal[null]]] begin[{]
assign[member[.ifcElectricVoltageMeasureECla... | Keyword[public] identifier[EClass] identifier[getIfcElectricVoltageMeasure] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[ifcElectricVoltageMeasureEClass] operator[==] Other[null] operator[SEP] {
identifier[ifcElectricVoltageMeasureEClass] operator[=] operator[SEP] identifier[ECla... |
public ServiceFuture<InstanceFailoverGroupInner> forceFailoverAllowDataLossAsync(String resourceGroupName, String locationName, String failoverGroupName, final ServiceCallback<InstanceFailoverGroupInner> serviceCallback) {
return ServiceFuture.fromResponse(forceFailoverAllowDataLossWithServiceResponseAsync(reso... | class class_name[name] begin[{]
method[forceFailoverAllowDataLossAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, locationName, failoverGroupName, serviceCallback]] begin[{]
return[call[ServiceFuture.fromResponse, parameter[call[.forceFailoverAllowDataLossWithServ... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[InstanceFailoverGroupInner] operator[>] identifier[forceFailoverAllowDataLossAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[locationName] , identifier[String] identifier[failoverGroupName] , Keywor... |
void rewritePolymerCall(
Node exprRoot, final PolymerClassDefinition cls, boolean isInGlobalScope) {
Node objLit = checkNotNull(cls.descriptor);
// Add {@code @lends} to the object literal.
JSDocInfoBuilder objLitDoc = new JSDocInfoBuilder(true);
JSTypeExpression jsTypeExpression =
new JS... | class class_name[name] begin[{]
method[rewritePolymerCall, return_type[void], modifier[default], parameter[exprRoot, cls, isInGlobalScope]] begin[{]
local_variable[type[Node], objLit]
local_variable[type[JSDocInfoBuilder], objLitDoc]
local_variable[type[JSTypeExpression], jsTypeExpressi... | Keyword[void] identifier[rewritePolymerCall] operator[SEP] identifier[Node] identifier[exprRoot] , Keyword[final] identifier[PolymerClassDefinition] identifier[cls] , Keyword[boolean] identifier[isInGlobalScope] operator[SEP] {
identifier[Node] identifier[objLit] operator[=] identifier[checkNotNull] operator[S... |
public static int[] cs_etree(DZcs A, boolean ata)
{
int i, k, p, m, n, inext, Ap[], Ai[], w[], parent[], ancestor[], prev[] ;
if (!CS_CSC (A)) return (null) ; /* check inputs */
m = A.m ; n = A.n ; Ap = A.p ; Ai = A.i ;
parent = new int [n] ; /* allocate result */
w = new int [n + (ata ? m : 0)] ; ... | class class_name[name] begin[{]
method[cs_etree, return_type[type[int]], modifier[public static], parameter[A, ata]] begin[{]
local_variable[type[int], i]
if[call[.CS_CSC, parameter[member[.A]]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
as... | Keyword[public] Keyword[static] Keyword[int] operator[SEP] operator[SEP] identifier[cs_etree] operator[SEP] identifier[DZcs] identifier[A] , Keyword[boolean] identifier[ata] operator[SEP] {
Keyword[int] identifier[i] , identifier[k] , identifier[p] , identifier[m] , identifier[n] , identifier[inext] , ide... |
public CompletableFuture<Void> submit(
JobExecution jobExecution, ExecutorService executorService) {
overwriteJobExecutionUser(jobExecution);
Job molgenisJob = saveExecutionAndCreateJob(jobExecution);
Progress progress = jobExecutionRegistry.registerJobExecution(jobExecution);
CompletableFuture<V... | class class_name[name] begin[{]
method[submit, return_type[type[CompletableFuture]], modifier[public], parameter[jobExecution, executorService]] begin[{]
call[.overwriteJobExecutionUser, parameter[member[.jobExecution]]]
local_variable[type[Job], molgenisJob]
local_variable[type... | Keyword[public] identifier[CompletableFuture] operator[<] identifier[Void] operator[>] identifier[submit] operator[SEP] identifier[JobExecution] identifier[jobExecution] , identifier[ExecutorService] identifier[executorService] operator[SEP] {
identifier[overwriteJobExecutionUser] operator[SEP] identifier[jobEx... |
protected void setupFormatAsValueIfNeeds(BoundValue boundValue, String optionDef) {
if (Srl.is_Null_or_TrimmedEmpty(optionDef)) {
return;
}
final Object targetValue = boundValue.getTargetValue();
if (targetValue == null) {
return;
}
if (targetValue... | class class_name[name] begin[{]
method[setupFormatAsValueIfNeeds, return_type[void], modifier[protected], parameter[boundValue, optionDef]] begin[{]
if[call[Srl.is_Null_or_TrimmedEmpty, parameter[member[.optionDef]]]] begin[{]
return[None]
else begin[{]
None
end[}]
... | Keyword[protected] Keyword[void] identifier[setupFormatAsValueIfNeeds] operator[SEP] identifier[BoundValue] identifier[boundValue] , identifier[String] identifier[optionDef] operator[SEP] {
Keyword[if] operator[SEP] identifier[Srl] operator[SEP] identifier[is_Null_or_TrimmedEmpty] operator[SEP] identifier[optio... |
public DescribeMaintenanceWindowTasksResult withTasks(MaintenanceWindowTask... tasks) {
if (this.tasks == null) {
setTasks(new com.amazonaws.internal.SdkInternalList<MaintenanceWindowTask>(tasks.length));
}
for (MaintenanceWindowTask ele : tasks) {
this.tasks.add(ele);
... | class class_name[name] begin[{]
method[withTasks, return_type[type[DescribeMaintenanceWindowTasksResult]], modifier[public], parameter[tasks]] begin[{]
if[binary_operation[THIS[member[None.tasks]], ==, literal[null]]] begin[{]
call[.setTasks, parameter[ClassCreator(argum... | Keyword[public] identifier[DescribeMaintenanceWindowTasksResult] identifier[withTasks] operator[SEP] identifier[MaintenanceWindowTask] operator[...] identifier[tasks] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[tasks] operator[==] Other[null] operator[SEP] {
identi... |
private void addPostParams(final Request request) {
if (permission != null) {
for (String prop : permission) {
request.addPostParam("Permission", prop);
}
}
} | class class_name[name] begin[{]
method[addPostParams, return_type[void], modifier[private], parameter[request]] begin[{]
if[binary_operation[member[.permission], !=, literal[null]]] begin[{]
ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Meth... | Keyword[private] Keyword[void] identifier[addPostParams] operator[SEP] Keyword[final] identifier[Request] identifier[request] operator[SEP] {
Keyword[if] operator[SEP] identifier[permission] operator[!=] Other[null] operator[SEP] {
Keyword[for] operator[SEP] identifier[String] identifier[prop] operato... |
@NotNull
public LongStream mapToLong(@NotNull final DoubleToLongFunction mapper) {
return new LongStream(params, new DoubleMapToLong(iterator, mapper));
} | class class_name[name] begin[{]
method[mapToLong, return_type[type[LongStream]], modifier[public], parameter[mapper]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=params, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MemberReference(memb... | annotation[@] identifier[NotNull] Keyword[public] identifier[LongStream] identifier[mapToLong] operator[SEP] annotation[@] identifier[NotNull] Keyword[final] identifier[DoubleToLongFunction] identifier[mapper] operator[SEP] {
Keyword[return] Keyword[new] identifier[LongStream] operator[SEP] identifier[params] , ... |
public static void dispatchDidLeavePlace (Object root, PlaceObject plobj)
{
// dispatch the call on this component if it implements PlaceView
if (root instanceof PlaceView) {
try {
((PlaceView)root).didLeavePlace(plobj);
} catch (Exception e) {
... | class class_name[name] begin[{]
method[dispatchDidLeavePlace, return_type[void], modifier[public static], parameter[root, plobj]] begin[{]
if[binary_operation[member[.root], instanceof, type[PlaceView]]] begin[{]
TryStatement(block=[StatementExpression(expression=Cast(expression=Mem... | Keyword[public] Keyword[static] Keyword[void] identifier[dispatchDidLeavePlace] operator[SEP] identifier[Object] identifier[root] , identifier[PlaceObject] identifier[plobj] operator[SEP] {
Keyword[if] operator[SEP] identifier[root] Keyword[instanceof] identifier[PlaceView] operator[SEP] {
Keyword[tr... |
public VmfsDatastoreOption[] queryVmfsDatastoreExtendOptions(Datastore datastore, String devicePath) throws HostConfigFault, NotFound, RuntimeFault, RemoteException {
return queryVmfsDatastoreExtendOptions(datastore, devicePath, null);
} | class class_name[name] begin[{]
method[queryVmfsDatastoreExtendOptions, return_type[type[VmfsDatastoreOption]], modifier[public], parameter[datastore, devicePath]] begin[{]
return[call[.queryVmfsDatastoreExtendOptions, parameter[member[.datastore], member[.devicePath], literal[null]]]]
end[}]
END[}... | Keyword[public] identifier[VmfsDatastoreOption] operator[SEP] operator[SEP] identifier[queryVmfsDatastoreExtendOptions] operator[SEP] identifier[Datastore] identifier[datastore] , identifier[String] identifier[devicePath] operator[SEP] Keyword[throws] identifier[HostConfigFault] , identifier[NotFound] , identifier[R... |
public static final Function<Collection<? extends Date>, Period> dateFieldCollectionToPeriod(final Chronology chronology) {
return FnPeriod.dateFieldCollectionToPeriod(chronology);
} | class class_name[name] begin[{]
method[dateFieldCollectionToPeriod, return_type[type[Function]], modifier[final public static], parameter[chronology]] begin[{]
return[call[FnPeriod.dateFieldCollectionToPeriod, parameter[member[.chronology]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[final] identifier[Function] operator[<] identifier[Collection] operator[<] operator[?] Keyword[extends] identifier[Date] operator[>] , identifier[Period] operator[>] identifier[dateFieldCollectionToPeriod] operator[SEP] Keyword[final] identifier[Chronology] identifier[chronology... |
@SuppressWarnings("unchecked")
public <T> T findById(String id, Class<T> entity) {
if (entity == null) {
throw new ApitraryOrmException("Cannot access null entity");
}
if (id == null || id.isEmpty()) {
return null;
}
log.debug("Searching " + entity.getName() + " " + id);
GetRequest request = new Ge... | class class_name[name] begin[{]
method[findById, return_type[type[T]], modifier[public], parameter[id, entity]] begin[{]
if[binary_operation[member[.entity], ==, literal[null]]] begin[{]
ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[findById] operator[SEP] identifier[String] identifier[id] , identifier[Class] operator[<] identifier[T] operator[>] identifier[entity] operator[SEP] {
... |
@Override
public Request<EnableTransitGatewayRouteTablePropagationRequest> getDryRunRequest() {
Request<EnableTransitGatewayRouteTablePropagationRequest> request = new EnableTransitGatewayRouteTablePropagationRequestMarshaller().marshall(this);
request.addParameter("DryRun", Boolean.toString(true));... | class class_name[name] begin[{]
method[getDryRunRequest, return_type[type[Request]], modifier[public], parameter[]] begin[{]
local_variable[type[Request], request]
call[request.addParameter, parameter[literal["DryRun"], call[Boolean.toString, parameter[literal[true]]]]]
return[m... | annotation[@] identifier[Override] Keyword[public] identifier[Request] operator[<] identifier[EnableTransitGatewayRouteTablePropagationRequest] operator[>] identifier[getDryRunRequest] operator[SEP] operator[SEP] {
identifier[Request] operator[<] identifier[EnableTransitGatewayRouteTablePropagationRequest] opera... |
public IdentityTrustManager getIdentityTrustManager(String securityDomain) {
IdentityTrustManager itm = null;
try {
itm = idmMgrMap.get(securityDomain);
if (itm == null) {
itm = (IdentityTrustManager) lookUpJNDI(securityDomain + "/identityTrustMgr");
... | class class_name[name] begin[{]
method[getIdentityTrustManager, return_type[type[IdentityTrustManager]], modifier[public], parameter[securityDomain]] begin[{]
local_variable[type[IdentityTrustManager], itm]
TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReferenc... | Keyword[public] identifier[IdentityTrustManager] identifier[getIdentityTrustManager] operator[SEP] identifier[String] identifier[securityDomain] operator[SEP] {
identifier[IdentityTrustManager] identifier[itm] operator[=] Other[null] operator[SEP] Keyword[try] {
identifier[itm] operator[=] identifier[... |
private void checkKeyVisibilityConvention(Node key, Node parent) {
JSDocInfo info = key.getJSDocInfo();
if (info == null) {
return;
}
if (!isPrivateByConvention(key.getString())) {
return;
}
Node assign = parent.getParent();
if (assign == null || !assign.isAssign()) {
retur... | class class_name[name] begin[{]
method[checkKeyVisibilityConvention, return_type[void], modifier[private], parameter[key, parent]] begin[{]
local_variable[type[JSDocInfo], info]
if[binary_operation[member[.info], ==, literal[null]]] begin[{]
return[None]
else begin[{... | Keyword[private] Keyword[void] identifier[checkKeyVisibilityConvention] operator[SEP] identifier[Node] identifier[key] , identifier[Node] identifier[parent] operator[SEP] {
identifier[JSDocInfo] identifier[info] operator[=] identifier[key] operator[SEP] identifier[getJSDocInfo] operator[SEP] operator[SEP] opera... |
@Override
protected void handleTransliterate(Replaceable text,
Position pos, boolean isIncremental) {
int start = pos.start;
int limit = pos.limit;
int i, ipat;
loop:
while (start < limit) {
// Loop over the forms in spec[]. ... | class class_name[name] begin[{]
method[handleTransliterate, return_type[void], modifier[protected], parameter[text, pos, isIncremental]] begin[{]
local_variable[type[int], start]
local_variable[type[int], limit]
local_variable[type[int], i]
while[binary_operation[member[... | annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[handleTransliterate] operator[SEP] identifier[Replaceable] identifier[text] , identifier[Position] identifier[pos] , Keyword[boolean] identifier[isIncremental] operator[SEP] {
Keyword[int] identifier[start] operator[=] identifier[po... |
@Override
public ServiceBundle addService(Object object) {
if (debug) {
logger.debug("ServiceBundleImpl::addServiceObject(object)- service added");
}
addServiceObject(null, object);
return this;
} | class class_name[name] begin[{]
method[addService, return_type[type[ServiceBundle]], modifier[public], parameter[object]] begin[{]
if[member[.debug]] begin[{]
call[logger.debug, parameter[literal["ServiceBundleImpl::addServiceObject(object)- service added"]]]
els... | annotation[@] identifier[Override] Keyword[public] identifier[ServiceBundle] identifier[addService] operator[SEP] identifier[Object] identifier[object] operator[SEP] {
Keyword[if] operator[SEP] identifier[debug] operator[SEP] {
identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[S... |
private void validateCompletionListernerForNull(CompletionListener cListener) throws IllegalArgumentException {
if (null == cListener) {
throw (IllegalArgumentException) JmsErrorUtils.newThrowable(
IllegalArgumentException.cla... | class class_name[name] begin[{]
method[validateCompletionListernerForNull, return_type[void], modifier[private], parameter[cListener]] begin[{]
if[binary_operation[literal[null], ==, member[.cListener]]] begin[{]
ThrowStatement(expression=Cast(expression=MethodInvocation(arguments=[... | Keyword[private] Keyword[void] identifier[validateCompletionListernerForNull] operator[SEP] identifier[CompletionListener] identifier[cListener] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] {
Keyword[if] operator[SEP] Other[null] operator[==] identifier[cListener] operator[SEP] {
... |
@Override
protected IStereoElement<IBond, IAtom> create(IBond focus,
List<IAtom> carriers,
int cfg) {
return new Atropisomeric(focus, carriers.toArray(new IAtom[4]), cfg);
} | class class_name[name] begin[{]
method[create, return_type[type[IStereoElement]], modifier[protected], parameter[focus, carriers, cfg]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=focus, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=... | annotation[@] identifier[Override] Keyword[protected] identifier[IStereoElement] operator[<] identifier[IBond] , identifier[IAtom] operator[>] identifier[create] operator[SEP] identifier[IBond] identifier[focus] , identifier[List] operator[<] identifier[IAtom] operator[>] identifier[carriers] , Keyword[int] identifi... |
@Override
public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
if (!component.isRendered()) {
return;
}
Accordion accordion = (Accordion) component;
ResponseWriter rw = context.getResponseWriter();
String clientId = accordion.getClientId();
String accordionClientId =... | class class_name[name] begin[{]
method[encodeBegin, return_type[void], modifier[public], parameter[context, component]] begin[{]
if[call[component.isRendered, parameter[]]] begin[{]
return[None]
else begin[{]
None
end[}]
local_variable[type[Accordion], accord... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[encodeBegin] operator[SEP] identifier[FacesContext] identifier[context] , identifier[UIComponent] identifier[component] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] operator[!] identifier[component] ... |
public static LoadMetadataContext mergeFrom(LoadMetadataPOptions.Builder optionsBuilder) {
LoadMetadataPOptions masterOptions =
FileSystemOptions.loadMetadataDefaults(ServerConfiguration.global());
LoadMetadataPOptions.Builder mergedOptionsBuilder =
masterOptions.toBuilder().mergeFrom(optionsBui... | class class_name[name] begin[{]
method[mergeFrom, return_type[type[LoadMetadataContext]], modifier[public static], parameter[optionsBuilder]] begin[{]
local_variable[type[LoadMetadataPOptions], masterOptions]
local_variable[type[LoadMetadataPOptions], mergedOptionsBuilder]
return[call[.... | Keyword[public] Keyword[static] identifier[LoadMetadataContext] identifier[mergeFrom] operator[SEP] identifier[LoadMetadataPOptions] operator[SEP] identifier[Builder] identifier[optionsBuilder] operator[SEP] {
identifier[LoadMetadataPOptions] identifier[masterOptions] operator[=] identifier[FileSystemOptions] op... |
public JobIdentifier findJob(String pipelineName, String pipelineCounter, String stageName, String stageCounter, String buildName, Long buildId) {
JobConfigIdentifier jobConfigIdentifier = goConfigService.translateToActualCase(new JobConfigIdentifier(pipelineName, stageName, buildName));
PipelineIdenti... | class class_name[name] begin[{]
method[findJob, return_type[type[JobIdentifier]], modifier[public], parameter[pipelineName, pipelineCounter, stageName, stageCounter, buildName, buildId]] begin[{]
local_variable[type[JobConfigIdentifier], jobConfigIdentifier]
local_variable[type[PipelineIdentifi... | Keyword[public] identifier[JobIdentifier] identifier[findJob] operator[SEP] identifier[String] identifier[pipelineName] , identifier[String] identifier[pipelineCounter] , identifier[String] identifier[stageName] , identifier[String] identifier[stageCounter] , identifier[String] identifier[buildName] , identifier[L... |
public static XContentBuilder marshall(ContractBean bean) throws StorageException {
try (XContentBuilder builder = XContentFactory.jsonBuilder()) {
preMarshall(bean);
builder
.startObject()
.field("id", bean.getId())
.field("clientO... | class class_name[name] begin[{]
method[marshall, return_type[type[XContentBuilder]], modifier[public static], parameter[bean]] begin[{]
TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=bean, postfix_operators=[], prefix_operators=[], qualifier=, sele... | Keyword[public] Keyword[static] identifier[XContentBuilder] identifier[marshall] operator[SEP] identifier[ContractBean] identifier[bean] operator[SEP] Keyword[throws] identifier[StorageException] {
Keyword[try] operator[SEP] identifier[XContentBuilder] identifier[builder] operator[=] identifier[XContentFactory] ... |
private void populateQueryComponents(EntityMetadata m, QueryComponent sq)
{
boolean hasChildren = false;
if (sq.children != null && sq.children.size() > 0)
{
hasChildren = true;
for (QueryComponent subQ : sq.children)
{
populateQueryCompone... | class class_name[name] begin[{]
method[populateQueryComponents, return_type[void], modifier[private], parameter[m, sq]] begin[{]
local_variable[type[boolean], hasChildren]
if[binary_operation[binary_operation[member[sq.children], !=, literal[null]], &&, binary_operation[call[sq.children... | Keyword[private] Keyword[void] identifier[populateQueryComponents] operator[SEP] identifier[EntityMetadata] identifier[m] , identifier[QueryComponent] identifier[sq] operator[SEP] {
Keyword[boolean] identifier[hasChildren] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[sq] opera... |
public <T> QueuePublisher<T> createQueuePublisher(final String name, final PublisherCallback<T> messageCallback)
{
Preconditions.checkState(connectionFactory != null, "connection factory was never injected!");
return new QueuePublisher<T>(connectionFactory, amqpConfig, name, messageCallback);
} | class class_name[name] begin[{]
method[createQueuePublisher, return_type[type[QueuePublisher]], modifier[public], parameter[name, messageCallback]] begin[{]
call[Preconditions.checkState, parameter[binary_operation[member[.connectionFactory], !=, literal[null]], literal["connection factory was ... | Keyword[public] operator[<] identifier[T] operator[>] identifier[QueuePublisher] operator[<] identifier[T] operator[>] identifier[createQueuePublisher] operator[SEP] Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[PublisherCallback] operator[<] identifier[T] operator[>] identifier[messag... |
public Method getWriteMethod() {
if (writeMethod == null) return null;
try {
// Note: sun.reflect.ReflectionFactory is not available in Android API
return writeMethod.getDeclaringClass().getDeclaredMethod(writeMethod.getName(), type);
} catch (NoSuchMethodException e) {
... | class class_name[name] begin[{]
method[getWriteMethod, return_type[type[Method]], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.writeMethod], ==, literal[null]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
TryStatement(block=[ReturnStat... | Keyword[public] identifier[Method] identifier[getWriteMethod] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[writeMethod] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[try] {
Keyword[return] identifier[writeMethod] operator[SEP] identifier... |
public static void setCachingHeaders(
int maxAge,
boolean publicScope,
long lastModified,
PortletResourceOutputHandler portletResourceOutputHandler) {
if (maxAge != 0) {
portletResourceOutputHandler.setDateHeader("Last-Modified", lastModified);
... | class class_name[name] begin[{]
method[setCachingHeaders, return_type[void], modifier[public static], parameter[maxAge, publicScope, lastModified, portletResourceOutputHandler]] begin[{]
if[binary_operation[member[.maxAge], !=, literal[0]]] begin[{]
call[portletResourceO... | Keyword[public] Keyword[static] Keyword[void] identifier[setCachingHeaders] operator[SEP] Keyword[int] identifier[maxAge] , Keyword[boolean] identifier[publicScope] , Keyword[long] identifier[lastModified] , identifier[PortletResourceOutputHandler] identifier[portletResourceOutputHandler] operator[SEP] {
Keyw... |
public static <S, SS extends S, T, TT extends T> Tuple2<S, T> of(SS s, TT t)
{
return new Tuple2<S, T>(s, t);
} | class class_name[name] begin[{]
method[of, return_type[type[Tuple2]], modifier[public static], parameter[s, t]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=t, postfix_operators=[], prefix_... | Keyword[public] Keyword[static] operator[<] identifier[S] , identifier[SS] Keyword[extends] identifier[S] , identifier[T] , identifier[TT] Keyword[extends] identifier[T] operator[>] identifier[Tuple2] operator[<] identifier[S] , identifier[T] operator[>] identifier[of] operator[SEP] identifier[SS] identifier[s] , ... |
private void crossSegmentShadowLine(
int shadowx, int shadowy,
int sx0, int sy0,
int sx1, int sy1,
boolean isMax) {
if (shadowy < sy0 && shadowy < sy1) {
// Segment is entirely at the top of the shadow line
return;
}
if (sha... | class class_name[name] begin[{]
method[crossSegmentShadowLine, return_type[void], modifier[private], parameter[shadowx, shadowy, sx0, sy0, sx1, sy1, isMax]] begin[{]
if[binary_operation[binary_operation[member[.shadowy], <, member[.sy0]], &&, binary_operation[member[.shadowy], <, member[.sy1]]]... | Keyword[private] Keyword[void] identifier[crossSegmentShadowLine] operator[SEP] Keyword[int] identifier[shadowx] , Keyword[int] identifier[shadowy] , Keyword[int] identifier[sx0] , Keyword[int] identifier[sy0] , Keyword[int] identifier[sx1] , Keyword[int] identifier[sy1] , Keyword[boolean] identifier[isMax] opera... |
public int getJobType() {
String jobType = getSingle("jobtype");
if (jobType == null) return -1;
if (jobType.equalsIgnoreCase("single")) {
return JOBTYPE_SINGLE;
} else if (jobType.equalsIgnoreCase("multiple")) {
return JOBTYPE_MULTIPLE;
} else if (jobType.equalsIgnoreCase("mpi")) {
return JOBTYPE_M... | class class_name[name] begin[{]
method[getJobType, return_type[type[int]], modifier[public], parameter[]] begin[{]
local_variable[type[String], jobType]
if[binary_operation[member[.jobType], ==, literal[null]]] begin[{]
return[literal[1]]
else begin[{]
None
end[}]
... | Keyword[public] Keyword[int] identifier[getJobType] operator[SEP] operator[SEP] {
identifier[String] identifier[jobType] operator[=] identifier[getSingle] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[jobType] operator[==] Other[null] operator[SEP] Keyword[return]... |
private DateTime zonedDateTimeToJodaTime(final ChronoZonedDateTime<?> date) {
return date == null ? null : new DateTime(date.toInstant().toEpochMilli(), DateTimeZone.UTC);
} | class class_name[name] begin[{]
method[zonedDateTimeToJodaTime, return_type[type[DateTime]], modifier[private], parameter[date]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=date, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operan... | Keyword[private] identifier[DateTime] identifier[zonedDateTimeToJodaTime] operator[SEP] Keyword[final] identifier[ChronoZonedDateTime] operator[<] operator[?] operator[>] identifier[date] operator[SEP] {
Keyword[return] identifier[date] operator[==] Other[null] operator[?] Other[null] operator[:] Keyword[new] i... |
private void removeListenersOfPendingCachedRequest(final SpiceRequest<?> request) throws InterruptedException {
synchronized (mapPendingRequestToRequestListener) {
for (final CachedSpiceRequest<?> cachedSpiceRequest : mapPendingRequestToRequestListener.keySet()) {
if (match(cachedSpi... | class class_name[name] begin[{]
method[removeListenersOfPendingCachedRequest, return_type[void], modifier[private], parameter[request]] begin[{]
SYNCHRONIZED[member[.mapPendingRequestToRequestListener]] BEGIN[{]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(co... | Keyword[private] Keyword[void] identifier[removeListenersOfPendingCachedRequest] operator[SEP] Keyword[final] identifier[SpiceRequest] operator[<] operator[?] operator[>] identifier[request] operator[SEP] Keyword[throws] identifier[InterruptedException] {
Keyword[synchronized] operator[SEP] identifier[mapPending... |
public Coordinate getCentroid() {
if (isEmpty()) {
return null;
}
double sumX = 0;
double sumY = 0;
double totalLength = 0;
for (int i = 0; i < coordinates.length - 1; i++) {
double length = coordinates[i].distance(coordinates[i + 1]);
totalLength += length;
double midx = (coordinates[i].getX() ... | class class_name[name] begin[{]
method[getCentroid, return_type[type[Coordinate]], modifier[public], parameter[]] begin[{]
if[call[.isEmpty, parameter[]]] begin[{]
return[literal[null]]
else begin[{]
None
end[}]
local_variable[type[double], sumX]
loca... | Keyword[public] identifier[Coordinate] identifier[getCentroid] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] {
Keyword[return] Other[null] operator[SEP]
}
Keyword[double] identifier[sumX] operator[=] Other[0] operato... |
public boolean selectItem(int dataIndex, boolean select) {
Log.d(Log.SUBSYSTEM.LAYOUT, TAG, "selectItem [%d] select [%b]", dataIndex, select);
if (dataIndex < 0 || dataIndex >= mContent.size()) {
throw new IndexOutOfBoundsException("Selection index [" + dataIndex + "] is out of bounds!");
... | class class_name[name] begin[{]
method[selectItem, return_type[type[boolean]], modifier[public], parameter[dataIndex, select]] begin[{]
call[Log.d, parameter[member[Log.SUBSYSTEM.LAYOUT], member[.TAG], literal["selectItem [%d] select [%b]"], member[.dataIndex], member[.select]]]
... | Keyword[public] Keyword[boolean] identifier[selectItem] operator[SEP] Keyword[int] identifier[dataIndex] , Keyword[boolean] identifier[select] operator[SEP] {
identifier[Log] operator[SEP] identifier[d] operator[SEP] identifier[Log] operator[SEP] identifier[SUBSYSTEM] operator[SEP] identifier[LAYOUT] , identif... |
public DataBuffer getIncludedValues() {
List<Double> val = new ArrayList<>();
for (int i = 0; i < values.length(); i++) {
boolean isIn = true;
int idxNotFixed = 0;
int[] idx = getUnderlyingIndicesOf(i).asInt();
for (int dim = 0; dim < idx.length; dim++) {... | class class_name[name] begin[{]
method[getIncludedValues, return_type[type[DataBuffer]], modifier[public], parameter[]] begin[{]
local_variable[type[List], val]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dime... | Keyword[public] identifier[DataBuffer] identifier[getIncludedValues] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[Double] operator[>] identifier[val] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP... |
private static LogType findLogType() {
// see if the log-type was specified as a system property
String logTypeString = System.getProperty(LOG_TYPE_SYSTEM_PROPERTY);
if (logTypeString != null) {
try {
return LogType.valueOf(logTypeString);
} catch (IllegalArgumentException e) {
Log log = new LocalL... | class class_name[name] begin[{]
method[findLogType, return_type[type[LogType]], modifier[private static], parameter[]] begin[{]
local_variable[type[String], logTypeString]
if[binary_operation[member[.logTypeString], !=, literal[null]]] begin[{]
TryStatement(block=[ReturnStat... | Keyword[private] Keyword[static] identifier[LogType] identifier[findLogType] operator[SEP] operator[SEP] {
identifier[String] identifier[logTypeString] operator[=] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] identifier[LOG_TYPE_SYSTEM_PROPERTY] operator[SEP] operator[SEP] Keyword[if] o... |
public void setEnabledServicePrincipals(java.util.Collection<EnabledServicePrincipal> enabledServicePrincipals) {
if (enabledServicePrincipals == null) {
this.enabledServicePrincipals = null;
return;
}
this.enabledServicePrincipals = new java.util.ArrayList<EnabledServic... | class class_name[name] begin[{]
method[setEnabledServicePrincipals, return_type[void], modifier[public], parameter[enabledServicePrincipals]] begin[{]
if[binary_operation[member[.enabledServicePrincipals], ==, literal[null]]] begin[{]
assign[THIS[member[None.enabledServi... | Keyword[public] Keyword[void] identifier[setEnabledServicePrincipals] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[EnabledServicePrincipal] operator[>] identifier[enabledServicePrincipals] operator[SEP] {
Keyword[if] operator[SEP] ident... |
public List<Monomer> getAllMonomersList() {
List<Monomer> monomers = new ArrayList<Monomer>();
for (String polymerType : getPolymerTypeSet()) {
Map<String, Monomer> map = getMonomers(polymerType);
monomers.addAll(map.values());
}
return monomers;
} | class class_name[name] begin[{]
method[getAllMonomersList, return_type[type[List]], modifier[public], parameter[]] begin[{]
local_variable[type[List], monomers]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dime... | Keyword[public] identifier[List] operator[<] identifier[Monomer] operator[>] identifier[getAllMonomersList] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[Monomer] operator[>] identifier[monomers] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Monomer] operator[>] op... |
public List<CmsJspNavElement> getNavigationTreeForFolder(String folder, int startlevel, int endlevel) {
folder = CmsResource.getFolderPath(folder);
// Make sure start and end level make sense
if (endlevel < startlevel) {
return Collections.<CmsJspNavElement> emptyList();
}
... | class class_name[name] begin[{]
method[getNavigationTreeForFolder, return_type[type[List]], modifier[public], parameter[folder, startlevel, endlevel]] begin[{]
assign[member[.folder], call[CmsResource.getFolderPath, parameter[member[.folder]]]]
if[binary_operation[member[.endlev... | Keyword[public] identifier[List] operator[<] identifier[CmsJspNavElement] operator[>] identifier[getNavigationTreeForFolder] operator[SEP] identifier[String] identifier[folder] , Keyword[int] identifier[startlevel] , Keyword[int] identifier[endlevel] operator[SEP] {
identifier[folder] operator[=] identifier[Cm... |
@Override
public void onMouseUp(MouseUpEvent event) {
if (dragging) {
setDragging(false);
draggingMask.getRenderable().removeFromParent();
draggingMask = null;
onDragStop(event.getClientX(), event.getClientY());
release(invisibleClickArea);
}
} | class class_name[name] begin[{]
method[onMouseUp, return_type[void], modifier[public], parameter[event]] begin[{]
if[member[.dragging]] begin[{]
call[.setDragging, parameter[literal[false]]]
call[draggingMask.getRenderable, parameter[]]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onMouseUp] operator[SEP] identifier[MouseUpEvent] identifier[event] operator[SEP] {
Keyword[if] operator[SEP] identifier[dragging] operator[SEP] {
identifier[setDragging] operator[SEP] literal[boolean] operator[SEP] operator[S... |
public String generateNestedEvent() throws Exception
{
BenchmarkEvent nestedDims1 = new BenchmarkEvent(
null,
String.valueOf(rng.nextInt()), String.valueOf(rng.nextInt()), null, null, null, null,
null, null, null, null,
null, null, null, null,
null, null, null
);
S... | class class_name[name] begin[{]
method[generateNestedEvent, return_type[type[String]], modifier[public], parameter[]] begin[{]
local_variable[type[BenchmarkEvent], nestedDims1]
local_variable[type[String], dimsArray1]
local_variable[type[BenchmarkEvent], nestedDims2]
local_varia... | Keyword[public] identifier[String] identifier[generateNestedEvent] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[BenchmarkEvent] identifier[nestedDims1] operator[=] Keyword[new] identifier[BenchmarkEvent] operator[SEP] Other[null] , identifier[String] operator[SEP] identifier[va... |
public boolean getBoolean(String fieldName) throws DbfException {
Boolean value = (Boolean) get(fieldName);
return value != null && value;
} | class class_name[name] begin[{]
method[getBoolean, return_type[type[boolean]], modifier[public], parameter[fieldName]] begin[{]
local_variable[type[Boolean], value]
return[binary_operation[binary_operation[member[.value], !=, literal[null]], &&, member[.value]]]
end[}]
END[}] | Keyword[public] Keyword[boolean] identifier[getBoolean] operator[SEP] identifier[String] identifier[fieldName] operator[SEP] Keyword[throws] identifier[DbfException] {
identifier[Boolean] identifier[value] operator[=] operator[SEP] identifier[Boolean] operator[SEP] identifier[get] operator[SEP] identifier[fieldN... |
public static final Function<BigInteger,Boolean> greaterOrEqTo(final Number object) {
return (Function<BigInteger,Boolean>)((Function)FnObject.greaterOrEqTo(object));
} | class class_name[name] begin[{]
method[greaterOrEqTo, return_type[type[Function]], modifier[final public static], parameter[object]] begin[{]
return[Cast(expression=Cast(expression=MethodInvocation(arguments=[MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selector... | Keyword[public] Keyword[static] Keyword[final] identifier[Function] operator[<] identifier[BigInteger] , identifier[Boolean] operator[>] identifier[greaterOrEqTo] operator[SEP] Keyword[final] identifier[Number] identifier[object] operator[SEP] {
Keyword[return] operator[SEP] identifier[Function] operator[<] ide... |
public <T extends ApiObject> EntityList<T> get(Request<T> request)
{
return executeRequest(request,objectMapper.getTypeFactory()
.constructParametrizedType(EntityList.class,EntityList.class, request.getEntityType()));
} | class class_name[name] begin[{]
method[get, return_type[type[EntityList]], modifier[public], parameter[request]] begin[{]
return[call[.executeRequest, parameter[member[.request], call[objectMapper.getTypeFactory, parameter[]]]]]
end[}]
END[}] | Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[ApiObject] operator[>] identifier[EntityList] operator[<] identifier[T] operator[>] identifier[get] operator[SEP] identifier[Request] operator[<] identifier[T] operator[>] identifier[request] operator[SEP] {
Keyword[return] identifier[executeR... |
@RequestMapping(value = "/insert", method = RequestMethod.POST)
public @ResponseBody
void insert(
@RequestParam(value = "username", required = true) String username,
@RequestParam(value = "name", required = false) String name,
@RequestParam(value = "surname", required = false) String surname,
@RequestPara... | class class_name[name] begin[{]
method[insert, return_type[void], modifier[public], parameter[username, name, surname, telephoneNumber, verificationText, request, response]] begin[{]
call[logger.debug, parameter[literal["Received a request to insert an account"]]]
local_variable[type[Bo... | annotation[@] identifier[RequestMapping] operator[SEP] identifier[value] operator[=] literal[String] , identifier[method] operator[=] identifier[RequestMethod] operator[SEP] identifier[POST] operator[SEP] Keyword[public] annotation[@] identifier[ResponseBody] Keyword[void] identifier[insert] operator[SEP] annotation[@... |
public List<String> readUrlNamesForAllLocales(CmsDbContext dbc, CmsUUID id) throws CmsDataAccessException {
List<String> result = new ArrayList<String>();
List<CmsUrlNameMappingEntry> entries = getVfsDriver(dbc).readUrlNameMappingEntries(
dbc,
dbc.currentProject().isOnlineProjec... | class class_name[name] begin[{]
method[readUrlNamesForAllLocales, return_type[type[List]], modifier[public], parameter[dbc, id]] begin[{]
local_variable[type[List], result]
local_variable[type[List], entries]
local_variable[type[ArrayListMultimap], entriesByLocale]
ForStatement(... | Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[readUrlNamesForAllLocales] operator[SEP] identifier[CmsDbContext] identifier[dbc] , identifier[CmsUUID] identifier[id] operator[SEP] Keyword[throws] identifier[CmsDataAccessException] {
identifier[List] operator[<] identifier... |
public void close() throws IOException {
if (r != null) {
r = null;
ogg.close();
ogg = null;
}
if (w != null) {
w.bufferPacket(info.write(), true);
w.bufferPacket(tags.write(), false);
// The Granule Position on... | class class_name[name] begin[{]
method[close, return_type[void], modifier[public], parameter[]] begin[{]
if[binary_operation[member[.r], !=, literal[null]]] begin[{]
assign[member[.r], literal[null]]
call[ogg.close, parameter[]]
... | Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] identifier[r] operator[!=] Other[null] operator[SEP] {
identifier[r] operator[=] Other[null] operator[SEP] identifier[ogg] operator[SEP] identifier[close] ope... |
public static boolean isBetweenDate(Date startDate, Date endDate, Date specificDate) {
long startTm = getDateCeil(startDate).getTimeInMillis();
long endTm = getDateCeil(endDate).getTimeInMillis();
long specificTm = getDateCeil(specificDate).getTimeInMillis();
if (startTm <= specificTm &... | class class_name[name] begin[{]
method[isBetweenDate, return_type[type[boolean]], modifier[public static], parameter[startDate, endDate, specificDate]] begin[{]
local_variable[type[long], startTm]
local_variable[type[long], endTm]
local_variable[type[long], specificTm]
i... | Keyword[public] Keyword[static] Keyword[boolean] identifier[isBetweenDate] operator[SEP] identifier[Date] identifier[startDate] , identifier[Date] identifier[endDate] , identifier[Date] identifier[specificDate] operator[SEP] {
Keyword[long] identifier[startTm] operator[=] identifier[getDateCeil] operator[SEP] ... |
private static String getCharsetFromMeta(byte buffer[], int maxlength) {
// convert to UTF-8 String -- which hopefully will not mess up the
// characters we're interested in...
int len = buffer.length;
if (maxlength > 0 && maxlength < len) {
len = maxlength;
}
... | class class_name[name] begin[{]
method[getCharsetFromMeta, return_type[type[String]], modifier[private static], parameter[buffer, maxlength]] begin[{]
local_variable[type[int], len]
if[binary_operation[binary_operation[member[.maxlength], >, literal[0]], &&, binary_operation[member[.max... | Keyword[private] Keyword[static] identifier[String] identifier[getCharsetFromMeta] operator[SEP] Keyword[byte] identifier[buffer] operator[SEP] operator[SEP] , Keyword[int] identifier[maxlength] operator[SEP] {
Keyword[int] identifier[len] operator[=] identifier[buffer] operator[SEP] identifier[length] operator... |
public static Set<Integer> worker_output_tasks(WorkerData workerData) {
ContextMaker context_maker = workerData.getContextMaker();
Set<Integer> taskIds = workerData.getTaskIds();
StormTopology topology = workerData.getSysTopology();
Set<Integer> rtn = new HashSet<>();
for (Inte... | class class_name[name] begin[{]
method[worker_output_tasks, return_type[type[Set]], modifier[public static], parameter[workerData]] begin[{]
local_variable[type[ContextMaker], context_maker]
local_variable[type[Set], taskIds]
local_variable[type[StormTopology], topology]
local_v... | Keyword[public] Keyword[static] identifier[Set] operator[<] identifier[Integer] operator[>] identifier[worker_output_tasks] operator[SEP] identifier[WorkerData] identifier[workerData] operator[SEP] {
identifier[ContextMaker] identifier[context_maker] operator[=] identifier[workerData] operator[SEP] identifier[ge... |
public void startCharging(String subscriptionId, String serviceContextId) throws Exception {
// Initialize timers
sendUpdatetimer = new Timer();
sendTerminateTimer = new Timer();
callDurationTimer = new Timer();
if(logger.isInfoEnabled()) {
logger.info("(((o))) SERVICE HAS BEEN ESTA... | class class_name[name] begin[{]
method[startCharging, return_type[void], modifier[public], parameter[subscriptionId, serviceContextId]] begin[{]
assign[member[.sendUpdatetimer], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qua... | Keyword[public] Keyword[void] identifier[startCharging] operator[SEP] identifier[String] identifier[subscriptionId] , identifier[String] identifier[serviceContextId] operator[SEP] Keyword[throws] identifier[Exception] {
identifier[sendUpdatetimer] operator[=] Keyword[new] identifier[Timer] operator[SEP] operato... |
public void exclude(RuleProxyField ruleProxyField, String key,
RuleContext ruleContext)
{
if (key.equals(ruleProxyField.getValue())) // this does not match when it should
{
String message = m_messageSourceAccessor.getMessage("nz.co.senanque.rules.invalid.exclude",
... | class class_name[name] begin[{]
method[exclude, return_type[void], modifier[public], parameter[ruleProxyField, key, ruleContext]] begin[{]
if[call[key.equals, parameter[call[ruleProxyField.getValue, parameter[]]]]] begin[{]
local_variable[type[String], message]
ThrowStat... | Keyword[public] Keyword[void] identifier[exclude] operator[SEP] identifier[RuleProxyField] identifier[ruleProxyField] , identifier[String] identifier[key] , identifier[RuleContext] identifier[ruleContext] operator[SEP] {
Keyword[if] operator[SEP] identifier[key] operator[SEP] identifier[equals] operator[SEP] i... |
public void onResume(boolean retainedInstance) {
if (mBlurredBackgroundView == null || retainedInstance) {
if (mHoldingActivity.getWindow().getDecorView().isShown()) {
mBluringTask = new BlurAsyncTask();
mBluringTask.execute();
} else {
mHo... | class class_name[name] begin[{]
method[onResume, return_type[void], modifier[public], parameter[retainedInstance]] begin[{]
if[binary_operation[binary_operation[member[.mBlurredBackgroundView], ==, literal[null]], ||, member[.retainedInstance]]] begin[{]
if[call[mHolding... | Keyword[public] Keyword[void] identifier[onResume] operator[SEP] Keyword[boolean] identifier[retainedInstance] operator[SEP] {
Keyword[if] operator[SEP] identifier[mBlurredBackgroundView] operator[==] Other[null] operator[||] identifier[retainedInstance] operator[SEP] {
Keyword[if] operator[SEP] ident... |
public String[] getBeanDomains() throws JMException {
checkClientConnected();
try {
return mbeanConn.getDomains();
} catch (IOException e) {
throw createJmException("Problems getting jmx domains: " + e, e);
}
} | class class_name[name] begin[{]
method[getBeanDomains, return_type[type[String]], modifier[public], parameter[]] begin[{]
call[.checkClientConnected, parameter[]]
TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getDomains, postfix_operators=[], prefi... | Keyword[public] identifier[String] operator[SEP] operator[SEP] identifier[getBeanDomains] operator[SEP] operator[SEP] Keyword[throws] identifier[JMException] {
identifier[checkClientConnected] operator[SEP] operator[SEP] operator[SEP] Keyword[try] {
Keyword[return] identifier[mbeanConn] operator[SEP] ... |
public java.util.List<? extends com.google.javascript.jscomp.RequirementOrBuilder>
getRequirementOrBuilderList() {
return requirement_;
} | class class_name[name] begin[{]
method[getRequirementOrBuilderList, return_type[type[java]], modifier[public], parameter[]] begin[{]
return[member[.requirement_]]
end[}]
END[}] | Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] operator[?] Keyword[extends] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[javascript] operator[SEP] identifier[jscomp] operator[SEP] identifier[RequirementOrBuilder] operator[>] identi... |
public List<HistoricalQuote> getHistory(Interval interval) throws IOException {
return this.getHistory(HistQuotesRequest.DEFAULT_FROM, interval);
} | class class_name[name] begin[{]
method[getHistory, return_type[type[List]], modifier[public], parameter[interval]] begin[{]
return[THIS[call[None.getHistory, parameter[member[HistQuotesRequest.DEFAULT_FROM], member[.interval]]]]]
end[}]
END[}] | Keyword[public] identifier[List] operator[<] identifier[HistoricalQuote] operator[>] identifier[getHistory] operator[SEP] identifier[Interval] identifier[interval] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[return] Keyword[this] operator[SEP] identifier[getHistory] operator[SEP] identifier[H... |
@Override
public List<V> apply(List<Variant> variants) {
List<V> gaVariants = new ArrayList<>(variants.size());
for (Variant variant : variants) {
String id = variant.toString();
List<String> variantIds = new ArrayList<>(variant.getIds());
for (StudyEntry study... | class class_name[name] begin[{]
method[apply, return_type[type[List]], modifier[public], parameter[variants]] begin[{]
local_variable[type[List], gaVariants]
ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensi... | annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[V] operator[>] identifier[apply] operator[SEP] identifier[List] operator[<] identifier[Variant] operator[>] identifier[variants] operator[SEP] {
identifier[List] operator[<] identifier[V] operator[>] identifier[gaVariants]... |
public static TrifocalTensor createTrifocal( Se3_F64 P2 , Se3_F64 P3 ,
@Nullable TrifocalTensor ret ) {
if( ret == null )
ret = new TrifocalTensor();
DMatrixRMaj R2 = P2.getR();
DMatrixRMaj R3 = P3.getR();
Vector3D_F64 T2 = P2.getT();
Vector3D_F64 T3 = P3.getT();
for( int col = 0; col < 3;... | class class_name[name] begin[{]
method[createTrifocal, return_type[type[TrifocalTensor]], modifier[public static], parameter[P2, P3, ret]] begin[{]
if[binary_operation[member[.ret], ==, literal[null]]] begin[{]
assign[member[.ret], ClassCreator(arguments=[], body=None, constructor_t... | Keyword[public] Keyword[static] identifier[TrifocalTensor] identifier[createTrifocal] operator[SEP] identifier[Se3_F64] identifier[P2] , identifier[Se3_F64] identifier[P3] , annotation[@] identifier[Nullable] identifier[TrifocalTensor] identifier[ret] operator[SEP] {
Keyword[if] operator[SEP] identifier[ret] o... |
public ServiceFuture<List<AnalysisDefinitionInner>> listSiteAnalysesNextAsync(final String nextPageLink, final ServiceFuture<List<AnalysisDefinitionInner>> serviceFuture, final ListOperationCallback<AnalysisDefinitionInner> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listSiteAnaly... | class class_name[name] begin[{]
method[listSiteAnalysesNextAsync, return_type[type[ServiceFuture]], modifier[public], parameter[nextPageLink, serviceFuture, serviceCallback]] begin[{]
return[call[AzureServiceFuture.fromPageResponse, parameter[call[.listSiteAnalysesNextSinglePageAsync, parameter[member[... | Keyword[public] identifier[ServiceFuture] operator[<] identifier[List] operator[<] identifier[AnalysisDefinitionInner] operator[>] operator[>] identifier[listSiteAnalysesNextAsync] operator[SEP] Keyword[final] identifier[String] identifier[nextPageLink] , Keyword[final] identifier[ServiceFuture] operator[<] identifier... |
@VisibleForTesting
protected static int getLabelDistance(final ScaleBarRenderSettings settings) {
if (settings.getParams().labelDistance != null) {
return settings.getParams().labelDistance;
} else {
if (settings.getParams().getOrientation().isHorizontal()) {
... | class class_name[name] begin[{]
method[getLabelDistance, return_type[type[int]], modifier[static protected], parameter[settings]] begin[{]
if[binary_operation[call[settings.getParams, parameter[]], !=, literal[null]]] begin[{]
return[call[settings.getParams, parameter[]]]
el... | annotation[@] identifier[VisibleForTesting] Keyword[protected] Keyword[static] Keyword[int] identifier[getLabelDistance] operator[SEP] Keyword[final] identifier[ScaleBarRenderSettings] identifier[settings] operator[SEP] {
Keyword[if] operator[SEP] identifier[settings] operator[SEP] identifier[getParams] operator... |
public URIBuilder addNullParameter( String key )
{
if ( key != null ) {
queryParams.put( key, null );
}
return this;
} | class class_name[name] begin[{]
method[addNullParameter, return_type[type[URIBuilder]], modifier[public], parameter[key]] begin[{]
if[binary_operation[member[.key], !=, literal[null]]] begin[{]
call[queryParams.put, parameter[member[.key], literal[null]]]
else be... | Keyword[public] identifier[URIBuilder] identifier[addNullParameter] operator[SEP] identifier[String] identifier[key] operator[SEP] {
Keyword[if] operator[SEP] identifier[key] operator[!=] Other[null] operator[SEP] {
identifier[queryParams] operator[SEP] identifier[put] operator[SEP] identifier[key] , ... |
public final Flux<T> doOnNext(Consumer<? super T> onNext) {
Objects.requireNonNull(onNext, "onNext");
return doOnSignal(this, null, onNext, null, null, null, null, null);
} | class class_name[name] begin[{]
method[doOnNext, return_type[type[Flux]], modifier[final public], parameter[onNext]] begin[{]
call[Objects.requireNonNull, parameter[member[.onNext], literal["onNext"]]]
return[call[.doOnSignal, parameter[THIS[], literal[null], member[.onNext], literal[nu... | Keyword[public] Keyword[final] identifier[Flux] operator[<] identifier[T] operator[>] identifier[doOnNext] operator[SEP] identifier[Consumer] operator[<] operator[?] Keyword[super] identifier[T] operator[>] identifier[onNext] operator[SEP] {
identifier[Objects] operator[SEP] identifier[requireNonNull] operator[S... |
private PortMapper getPortMapper() {
if (portMapper == null) {
PortMapperImpl portMapper = new PortMapperImpl();
portMapper.setPortMappings(httpsPortMappings);
this.portMapper = portMapper;
}
return portMapper;
} | class class_name[name] begin[{]
method[getPortMapper, return_type[type[PortMapper]], modifier[private], parameter[]] begin[{]
if[binary_operation[member[.portMapper], ==, literal[null]]] begin[{]
local_variable[type[PortMapperImpl], portMapper]
call[portMappe... | Keyword[private] identifier[PortMapper] identifier[getPortMapper] operator[SEP] operator[SEP] {
Keyword[if] operator[SEP] identifier[portMapper] operator[==] Other[null] operator[SEP] {
identifier[PortMapperImpl] identifier[portMapper] operator[=] Keyword[new] identifier[PortMapperImpl] operator[SEP] ... |
public void addToConfiguration(String name, String value) {
if (this.sessionConfigProperties == null) {
this.sessionConfigProperties = new Properties();
}
this.sessionConfigProperties.setProperty(name, value);
} | class class_name[name] begin[{]
method[addToConfiguration, return_type[void], modifier[public], parameter[name, value]] begin[{]
if[binary_operation[THIS[member[None.sessionConfigProperties]], ==, literal[null]]] begin[{]
assign[THIS[member[None.sessionConfigProperties]]... | Keyword[public] Keyword[void] identifier[addToConfiguration] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[value] operator[SEP] {
Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[sessionConfigProperties] operator[==] Other[null] operator[SEP] {
Keyw... |
public static <T, K> JacksonDBCollection<T, K> wrap(DBCollection dbCollection, Class<T> type, Class<K> keyType, Class<?> view) {
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.setSerializationConfig(objectMapper.getSerializationConfig().withView(view));
MongoJacksonMapperModule.con... | class class_name[name] begin[{]
method[wrap, return_type[type[JacksonDBCollection]], modifier[public static], parameter[dbCollection, type, keyType, view]] begin[{]
local_variable[type[ObjectMapper], objectMapper]
call[objectMapper.setSerializationConfig, parameter[call[objectMapper.get... | Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[K] operator[>] identifier[JacksonDBCollection] operator[<] identifier[T] , identifier[K] operator[>] identifier[wrap] operator[SEP] identifier[DBCollection] identifier[dbCollection] , identifier[Class] operator[<] identifier[T] operator[>] identi... |
public static CPFriendlyURLEntry fetchByG_C_C_M_First(long groupId,
long classNameId, long classPK, boolean main,
OrderByComparator<CPFriendlyURLEntry> orderByComparator) {
return getPersistence()
.fetchByG_C_C_M_First(groupId, classNameId, classPK, main,
orderByComparator);
} | class class_name[name] begin[{]
method[fetchByG_C_C_M_First, return_type[type[CPFriendlyURLEntry]], modifier[public static], parameter[groupId, classNameId, classPK, main, orderByComparator]] begin[{]
return[call[.getPersistence, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[CPFriendlyURLEntry] identifier[fetchByG_C_C_M_First] operator[SEP] Keyword[long] identifier[groupId] , Keyword[long] identifier[classNameId] , Keyword[long] identifier[classPK] , Keyword[boolean] identifier[main] , identifier[OrderByComparator] operator[<] identifier[CPFri... |
public static List<String> parseName(String sourceName, char separator) {
List<String> result = new ArrayList<String>();
if (sourceName != null) {
StringBuilder currentWord = new StringBuilder();
boolean lastIsLower = false;
for (int index = 0, length = sourceName.length(); index < length; ++index) {
c... | class class_name[name] begin[{]
method[parseName, return_type[type[List]], modifier[public static], parameter[sourceName, separator]] begin[{]
local_variable[type[List], result]
if[binary_operation[member[.sourceName], !=, literal[null]]] begin[{]
local_variable[type[StringB... | Keyword[public] Keyword[static] identifier[List] operator[<] identifier[String] operator[>] identifier[parseName] operator[SEP] identifier[String] identifier[sourceName] , Keyword[char] identifier[separator] operator[SEP] {
identifier[List] operator[<] identifier[String] operator[>] identifier[result] operator[... |
private static void printGroupInfo(final PrintWriter out, final ThreadGroup group, final String indent) {
if (group == null) {
return;
}
final int numThreads = group.activeCount();
final int numGroups = group.activeGroupCount();
final Thread[] threads = new Th... | class class_name[name] begin[{]
method[printGroupInfo, return_type[void], modifier[private static], parameter[out, group, indent]] begin[{]
if[binary_operation[member[.group], ==, literal[null]]] begin[{]
return[None]
else begin[{]
None
end[}]
local_variable[... | Keyword[private] Keyword[static] Keyword[void] identifier[printGroupInfo] operator[SEP] Keyword[final] identifier[PrintWriter] identifier[out] , Keyword[final] identifier[ThreadGroup] identifier[group] , Keyword[final] identifier[String] identifier[indent] operator[SEP] {
Keyword[if] operator[SEP] identifier[g... |
public static ImmutableList<File> loadFileList(final Iterable<String> fileNames)
throws IOException {
final ImmutableList.Builder<File> ret = ImmutableList.builder();
for (String filename : fileNames) {
if (!filename.isEmpty()) {
ret.add(new File(filename.trim()));
}
}
return... | class class_name[name] begin[{]
method[loadFileList, return_type[type[ImmutableList]], modifier[public static], parameter[fileNames]] begin[{]
local_variable[type[ImmutableList], ret]
ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], m... | Keyword[public] Keyword[static] identifier[ImmutableList] operator[<] identifier[File] operator[>] identifier[loadFileList] operator[SEP] Keyword[final] identifier[Iterable] operator[<] identifier[String] operator[>] identifier[fileNames] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[final] ide... |
@Override
public BigDecimal fromString(Class targetClass, String s)
{
return s != null ? new BigDecimal(s) : null;
} | class class_name[name] begin[{]
method[fromString, return_type[type[BigDecimal]], modifier[public], parameter[targetClass, s]] begin[{]
return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Li... | annotation[@] identifier[Override] Keyword[public] identifier[BigDecimal] identifier[fromString] operator[SEP] identifier[Class] identifier[targetClass] , identifier[String] identifier[s] operator[SEP] {
Keyword[return] identifier[s] operator[!=] Other[null] operator[?] Keyword[new] identifier[BigDecimal] opera... |
@Override
public void send(HeadersAmp headers,
StubAmp actor)
{
Object bean = actor.loadBean();
if (log.isLoggable(Level.FINEST)) {
log.finest("amp-send " + name() + "[" + bean + "] ()");
}
try {
_sendMethodHandle.invokeExact(bean);
} catch (Throwable e) {
... | class class_name[name] begin[{]
method[send, return_type[void], modifier[public], parameter[headers, actor]] begin[{]
local_variable[type[Object], bean]
if[call[log.isLoggable, parameter[member[Level.FINEST]]]] begin[{]
call[log.finest, parameter[binary_operation... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[send] operator[SEP] identifier[HeadersAmp] identifier[headers] , identifier[StubAmp] identifier[actor] operator[SEP] {
identifier[Object] identifier[bean] operator[=] identifier[actor] operator[SEP] identifier[loadBean] operator[SEP] op... |
protected void firePressed(Command command) {
getState(command).down = true;
getState(command).pressed = true;
if (!isActive()) {
return;
}
for (int i = 0; i < listeners.size(); i++) {
((InputProviderListener) listeners.get(i)).controlPressed(command);
}
} | class class_name[name] begin[{]
method[firePressed, return_type[void], modifier[protected], parameter[command]] begin[{]
assign[call[.getState, parameter[member[.command]]], literal[true]]
assign[call[.getState, parameter[member[.command]]], literal[true]]
if[cal... | Keyword[protected] Keyword[void] identifier[firePressed] operator[SEP] identifier[Command] identifier[command] operator[SEP] {
identifier[getState] operator[SEP] identifier[command] operator[SEP] operator[SEP] identifier[down] operator[=] literal[boolean] operator[SEP] identifier[getState] operator[SEP] identifi... |
@SuppressWarnings("unchecked")
public Query select(String selection) {
checkNotEmpty(selection, "Selection must not be empty.");
if (countDots(selection) >= 2) {
throw new IllegalArgumentException("Cannot request children of fields. "
+ "('fields.author'(✔) vs. 'fields.author.name'(✖))");
... | class class_name[name] begin[{]
method[select, return_type[type[Query]], modifier[public], parameter[selection]] begin[{]
call[.checkNotEmpty, parameter[member[.selection], literal["Selection must not be empty."]]]
if[binary_operation[call[.countDots, parameter[member[.selection... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[Query] identifier[select] operator[SEP] identifier[String] identifier[selection] operator[SEP] {
identifier[checkNotEmpty] operator[SEP] identifier[selection] , literal[String] operator[SEP] operato... |
public static Transform createRotateTransform(float angle, float x, float y) {
Transform temp = Transform.createRotateTransform(angle);
float sinAngle = temp.matrixPosition[3];
float oneMinusCosAngle = 1.0f - temp.matrixPosition[4];
temp.matrixPosition[2] = x * oneMinusCosAngle + ... | class class_name[name] begin[{]
method[createRotateTransform, return_type[type[Transform]], modifier[public static], parameter[angle, x, y]] begin[{]
local_variable[type[Transform], temp]
local_variable[type[float], sinAngle]
local_variable[type[float], oneMinusCosAngle]
... | Keyword[public] Keyword[static] identifier[Transform] identifier[createRotateTransform] operator[SEP] Keyword[float] identifier[angle] , Keyword[float] identifier[x] , Keyword[float] identifier[y] operator[SEP] {
identifier[Transform] identifier[temp] operator[=] identifier[Transform] operator[SEP] identifier[... |
public static IndianCalendar of(
int iyear,
IndianMonth imonth,
int idom
) {
return IndianCalendar.of(iyear, imonth.getValue(), idom);
} | class class_name[name] begin[{]
method[of, return_type[type[IndianCalendar]], modifier[public static], parameter[iyear, imonth, idom]] begin[{]
return[call[IndianCalendar.of, parameter[member[.iyear], call[imonth.getValue, parameter[]], member[.idom]]]]
end[}]
END[}] | Keyword[public] Keyword[static] identifier[IndianCalendar] identifier[of] operator[SEP] Keyword[int] identifier[iyear] , identifier[IndianMonth] identifier[imonth] , Keyword[int] identifier[idom] operator[SEP] {
Keyword[return] identifier[IndianCalendar] operator[SEP] identifier[of] operator[SEP] identifier[iy... |
public static void popPreferredClassLoader() {
final ClassLoader sysLoader = ClassLoaderFinder.class.getClassLoader();
if ((dynamicLoader == null) || (dynamicLoader == sysLoader)) {
dynamicLoader = null;
final Thread[] threads = new Thread[Thread.activeCount()];
Thread.enumerate(threads);
for (final Th... | class class_name[name] begin[{]
method[popPreferredClassLoader, return_type[void], modifier[public static], parameter[]] begin[{]
local_variable[type[ClassLoader], sysLoader]
if[binary_operation[binary_operation[member[.dynamicLoader], ==, literal[null]], ||, binary_operation[member[.dy... | Keyword[public] Keyword[static] Keyword[void] identifier[popPreferredClassLoader] operator[SEP] operator[SEP] {
Keyword[final] identifier[ClassLoader] identifier[sysLoader] operator[=] identifier[ClassLoaderFinder] operator[SEP] Keyword[class] operator[SEP] identifier[getClassLoader] operator[SEP] operator[SEP] ... |
@Override
public void onConnect(URI serverHost) throws IOException {
if (!StringUtils.isEmpty(accessToken)) {
return; //No need to be called if accessToken is active.
}
try {
getLog().info("Getting Oauth2 access token.");
OAuthClientRequest request = OAuthClientRequest.tokenLocation(ser... | class class_name[name] begin[{]
method[onConnect, return_type[void], modifier[public], parameter[serverHost]] begin[{]
if[call[StringUtils.isEmpty, parameter[member[.accessToken]]]] begin[{]
return[None]
else begin[{]
None
end[}]
TryStatement(block=[Statement... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onConnect] operator[SEP] identifier[URI] identifier[serverHost] operator[SEP] Keyword[throws] identifier[IOException] {
Keyword[if] operator[SEP] operator[!] identifier[StringUtils] operator[SEP] identifier[isEmpty] operator[SEP] identif... |
public static <I extends ImageGray<I>, D extends ImageGray<D>>
PointTracker<I> klt(int scaling[], ConfigGeneralDetector configExtract, int featureRadius,
Class<I> imageType, Class<D> derivType) {
PkltConfig config = new PkltConfig();
config.pyramidScaling = scaling;
config.templateRadius = featureRadius;... | class class_name[name] begin[{]
method[klt, return_type[type[PointTracker]], modifier[public static], parameter[scaling, configExtract, featureRadius, imageType, derivType]] begin[{]
local_variable[type[PkltConfig], config]
assign[member[config.pyramidScaling], member[.scaling]]
... | Keyword[public] Keyword[static] operator[<] identifier[I] Keyword[extends] identifier[ImageGray] operator[<] identifier[I] operator[>] , identifier[D] Keyword[extends] identifier[ImageGray] operator[<] identifier[D] operator[>] operator[>] identifier[PointTracker] operator[<] identifier[I] operator[>] identifier[klt] ... |
protected String getTemplateUrl() {
return "web/" + getClass().getPackage().getName().replace(".", "/") + "/"
+ StringUtils.uncapitalize(getClass().getSimpleName()) + ".fsp";
} | class class_name[name] begin[{]
method[getTemplateUrl, return_type[type[String]], modifier[protected], parameter[]] begin[{]
return[binary_operation[binary_operation[binary_operation[binary_operation[literal["web/"], +, call[.getClass, parameter[]]], +, literal["/"]], +, call[StringUtils.uncapitalize, ... | Keyword[protected] identifier[String] identifier[getTemplateUrl] operator[SEP] operator[SEP] {
Keyword[return] literal[String] operator[+] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getPackage] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP... |
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case AfplibPackage.MMD__RG:
getRG().clear();
getRG().addAll((Collection<? extends MMDRG>)newValue);
return;
}
super.eSet(featureID, newValue);
} | class class_name[name] begin[{]
method[eSet, return_type[void], modifier[public], parameter[featureID, newValue]] begin[{]
SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=MMD__RG, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[Sta... | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[eSet] operator[SEP] Keyword[int] identifier[featureID] , identifier[Object] identifier[newValue] operator[SEP] {
Keyword[switch] operator[SEP] identi... |
public static StructureInterfaceList calculateInterfaces(Structure struc) {
CrystalBuilder builder = new CrystalBuilder(struc);
StructureInterfaceList interfaces = builder.getUniqueInterfaces();
logger.debug("Calculating ASA for "+interfaces.size()+" potential interfaces");
interfaces.calcAsas(StructureInterfac... | class class_name[name] begin[{]
method[calculateInterfaces, return_type[type[StructureInterfaceList]], modifier[public static], parameter[struc]] begin[{]
local_variable[type[CrystalBuilder], builder]
local_variable[type[StructureInterfaceList], interfaces]
call[logger.debug, pa... | Keyword[public] Keyword[static] identifier[StructureInterfaceList] identifier[calculateInterfaces] operator[SEP] identifier[Structure] identifier[struc] operator[SEP] {
identifier[CrystalBuilder] identifier[builder] operator[=] Keyword[new] identifier[CrystalBuilder] operator[SEP] identifier[struc] operator[SEP]... |
private void convertLargeParts() {
List<Attachment> newAttachments = new ArrayList<>();
if (!publicParts.isEmpty()) {
try {
List<Part> toLarge = new ArrayList<>();
for (Part p : publicParts) {
if (p.getData() != null && p.getData().lengt... | class class_name[name] begin[{]
method[convertLargeParts, return_type[void], modifier[private], parameter[]] begin[{]
local_variable[type[List], newAttachments]
if[call[publicParts.isEmpty, parameter[]]] begin[{]
TryStatement(block=[LocalVariableDeclaration(annotations=[], d... | Keyword[private] Keyword[void] identifier[convertLargeParts] operator[SEP] operator[SEP] {
identifier[List] operator[<] identifier[Attachment] operator[>] identifier[newAttachments] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operat... |
private Object[] SetJavaScriptArguments(InteractiveObject interactiveObj,
Object argument0, Object argument1, Object argument2, Object argument3, boolean stateChanged) {
ArrayList<Object> scriptParameters = new ArrayList<Object>();
ScriptObject scriptObject =... | class class_name[name] begin[{]
method[SetJavaScriptArguments, return_type[type[Object]], modifier[private], parameter[interactiveObj, argument0, argument1, argument2, argument3, stateChanged]] begin[{]
local_variable[type[ArrayList], scriptParameters]
local_variable[type[ScriptObject], scriptO... | Keyword[private] identifier[Object] operator[SEP] operator[SEP] identifier[SetJavaScriptArguments] operator[SEP] identifier[InteractiveObject] identifier[interactiveObj] , identifier[Object] identifier[argument0] , identifier[Object] identifier[argument1] , identifier[Object] identifier[argument2] , identifier[Obje... |
private Exception readException() throws WriteAbortedException,
OptionalDataException, ClassNotFoundException, IOException {
resetSeenObjects();
// Now we read the Throwable object that was saved
// WARNING - the grammar says it is a Throwable, but the
// WriteAbortedExcept... | class class_name[name] begin[{]
method[readException, return_type[type[Exception]], modifier[private], parameter[]] begin[{]
call[.resetSeenObjects, parameter[]]
local_variable[type[Exception], exc]
call[.resetSeenObjects, parameter[]]
return[member[.exc]]
en... | Keyword[private] identifier[Exception] identifier[readException] operator[SEP] operator[SEP] Keyword[throws] identifier[WriteAbortedException] , identifier[OptionalDataException] , identifier[ClassNotFoundException] , identifier[IOException] {
identifier[resetSeenObjects] operator[SEP] operator[SEP] operator[... |
@Override
public void run() {
synchronized (lock) {
if (mIsDone || mIsCancelled) {
return;
}
mIsStarted = true;
}
try {
t = mCallable.call();
} catch (Exception e) {
e.printStackTrace();
}
s... | class class_name[name] begin[{]
method[run, return_type[void], modifier[public], parameter[]] begin[{]
SYNCHRONIZED[member[.lock]] BEGIN[{]
if[binary_operation[member[.mIsDone], ||, member[.mIsCancelled]]] begin[{]
return[None]
else begin[{]
N... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] {
Keyword[synchronized] operator[SEP] identifier[lock] operator[SEP] {
Keyword[if] operator[SEP] identifier[mIsDone] operator[||] identifier[mIsCancelled] operator[SEP] {
Keyword... |
@Override
public void overrideConstructor(ClassMethod method, Constructor<?> constructor) {
CodeAttribute ca = method.getCodeAttribute();
ca.aload(0);
ca.loadMethodParameters();
ca.invokespecial(constructor);
ca.returnInstruction();
} | class class_name[name] begin[{]
method[overrideConstructor, return_type[void], modifier[public], parameter[method, constructor]] begin[{]
local_variable[type[CodeAttribute], ca]
call[ca.aload, parameter[literal[0]]]
call[ca.loadMethodParameters, parameter[]]
... | annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[overrideConstructor] operator[SEP] identifier[ClassMethod] identifier[method] , identifier[Constructor] operator[<] operator[?] operator[>] identifier[constructor] operator[SEP] {
identifier[CodeAttribute] identifier[ca] operator[=] ide... |
protected void addParentFolders(String resourceName) throws CmsImportExportException, SAXException {
try {
// this is a resource in /system/ folder and option includeSystem is not true
if (!checkExportResource(resourceName)) {
return;
}
// Initia... | class class_name[name] begin[{]
method[addParentFolders, return_type[void], modifier[protected], parameter[resourceName]] begin[{]
TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=resourceName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=... | Keyword[protected] Keyword[void] identifier[addParentFolders] operator[SEP] identifier[String] identifier[resourceName] operator[SEP] Keyword[throws] identifier[CmsImportExportException] , identifier[SAXException] {
Keyword[try] {
Keyword[if] operator[SEP] operator[!] identifier[checkExportResource] ... |
public BoxGroupMembership.Info addMembership(BoxUser user, Role role) {
BoxAPIConnection api = this.getAPI();
JsonObject requestJSON = new JsonObject();
requestJSON.add("user", new JsonObject().add("id", user.getID()));
requestJSON.add("group", new JsonObject().add("id", this.getID()));... | class class_name[name] begin[{]
method[addMembership, return_type[type[BoxGroupMembership]], modifier[public], parameter[user, role]] begin[{]
local_variable[type[BoxAPIConnection], api]
local_variable[type[JsonObject], requestJSON]
call[requestJSON.add, parameter[literal["user"... | Keyword[public] identifier[BoxGroupMembership] operator[SEP] identifier[Info] identifier[addMembership] operator[SEP] identifier[BoxUser] identifier[user] , identifier[Role] identifier[role] operator[SEP] {
identifier[BoxAPIConnection] identifier[api] operator[=] Keyword[this] operator[SEP] identifier[getAPI] o... |
public static void print(Collection<TypedDependency> dependencies, PrintWriter pw) {
pw.println(toString(dependencies, false));
} | class class_name[name] begin[{]
method[print, return_type[void], modifier[public static], parameter[dependencies, pw]] begin[{]
call[pw.println, parameter[call[.toString, parameter[member[.dependencies], literal[false]]]]]
end[}]
END[}] | Keyword[public] Keyword[static] Keyword[void] identifier[print] operator[SEP] identifier[Collection] operator[<] identifier[TypedDependency] operator[>] identifier[dependencies] , identifier[PrintWriter] identifier[pw] operator[SEP] {
identifier[pw] operator[SEP] identifier[println] operator[SEP] identifier[toS... |
public static <K,V> MutableHashMap<K,V> emptyMutable() {
return PersistentHashMap.<K,V>empty().mutable();
} | class class_name[name] begin[{]
method[emptyMutable, return_type[type[MutableHashMap]], modifier[public static], parameter[]] begin[{]
return[call[.PersistentHashMap, parameter[]]]
end[}]
END[}] | Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[MutableHashMap] operator[<] identifier[K] , identifier[V] operator[>] identifier[emptyMutable] operator[SEP] operator[SEP] {
Keyword[return] identifier[PersistentHashMap] operator[SEP] operator[<] identifier[K] , ... |
@SuppressWarnings("unchecked")
public List<Class<Object>> getItems(final Predicate<ItemInfo> filter) {
final List<Class<Object>> items = (List) Lists.newArrayList(itemsHolder.values());
return filter(items, filter);
} | class class_name[name] begin[{]
method[getItems, return_type[type[List]], modifier[public], parameter[filter]] begin[{]
local_variable[type[List], items]
return[call[.filter, parameter[member[.items], member[.filter]]]]
end[}]
END[}] | annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[List] operator[<] identifier[Class] operator[<] identifier[Object] operator[>] operator[>] identifier[getItems] operator[SEP] Keyword[final] identifier[Predicate] operator[<] identifier[ItemInfo] operator[>... |
public GroovyExpression generateAdjacentVerticesExpression(GroovyExpression parent, AtlasEdgeDirection dir) {
return new FunctionCallExpression(TraversalStepType.FLAT_MAP_TO_ELEMENTS, parent, getGremlinFunctionName(dir));
} | class class_name[name] begin[{]
method[generateAdjacentVerticesExpression, return_type[type[GroovyExpression]], modifier[public], parameter[parent, dir]] begin[{]
return[ClassCreator(arguments=[MemberReference(member=FLAT_MAP_TO_ELEMENTS, postfix_operators=[], prefix_operators=[], qualifier=TraversalSt... | Keyword[public] identifier[GroovyExpression] identifier[generateAdjacentVerticesExpression] operator[SEP] identifier[GroovyExpression] identifier[parent] , identifier[AtlasEdgeDirection] identifier[dir] operator[SEP] {
Keyword[return] Keyword[new] identifier[FunctionCallExpression] operator[SEP] identifier[Trav... |
public static <T> Collector<T, ?, List<T>> toListReversed() {
return Collectors.collectingAndThen(Collectors.toList(), l -> {
Collections.reverse(l);
return l;
});
} | class class_name[name] begin[{]
method[toListReversed, return_type[type[Collector]], modifier[public static], parameter[]] begin[{]
return[call[Collectors.collectingAndThen, parameter[call[Collectors.toList, parameter[]], LambdaExpression(body=[StatementExpression(expression=MethodInvocation(arguments=... | Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Collector] operator[<] identifier[T] , operator[?] , identifier[List] operator[<] identifier[T] operator[>] operator[>] identifier[toListReversed] operator[SEP] operator[SEP] {
Keyword[return] identifier[Collectors] operator[SEP] ... |
public static boolean copy(FileSystem srcFS, Path src,
FileSystem dstFS, Path dst,
boolean deleteSource,
Configuration conf) throws IOException {
return copy(srcFS, src, dstFS, dst, deleteSource, true, conf);
} | class class_name[name] begin[{]
method[copy, return_type[type[boolean]], modifier[public static], parameter[srcFS, src, dstFS, dst, deleteSource, conf]] begin[{]
return[call[.copy, parameter[member[.srcFS], member[.src], member[.dstFS], member[.dst], member[.deleteSource], literal[true], member[.conf]]... | Keyword[public] Keyword[static] Keyword[boolean] identifier[copy] operator[SEP] identifier[FileSystem] identifier[srcFS] , identifier[Path] identifier[src] , identifier[FileSystem] identifier[dstFS] , identifier[Path] identifier[dst] , Keyword[boolean] identifier[deleteSource] , identifier[Configuration] identifie... |
public void skipLengthEncodedBytes() {
int type = this.buf[this.position++] & 0xff;
switch (type) {
case 251:
break;
case 252:
position += 2 + (0xffff & (((buf[position] & 0xff) + ((buf[position + 1] & 0xff) << 8))));
break;
case 253:
position += 3 + (0xffffff... | class class_name[name] begin[{]
method[skipLengthEncodedBytes, return_type[void], modifier[public], parameter[]] begin[{]
local_variable[type[int], type]
SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=251)]... | Keyword[public] Keyword[void] identifier[skipLengthEncodedBytes] operator[SEP] operator[SEP] {
Keyword[int] identifier[type] operator[=] Keyword[this] operator[SEP] identifier[buf] operator[SEP] Keyword[this] operator[SEP] identifier[position] operator[++] operator[SEP] operator[&] literal[Integer] operator[SEP]... |
public static String toJsonString(Object val, boolean pretty) {
try {
return pretty ? mapper.writerWithDefaultPrettyPrinter().with(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS).writeValueAsString(val) : mapper.writeValueAsString(val);
} catch (Exception e) {
throw new RuntimeEx... | class class_name[name] begin[{]
method[toJsonString, return_type[type[String]], modifier[public static], parameter[val, pretty]] begin[{]
TryStatement(block=[ReturnStatement(expression=TernaryExpression(condition=MemberReference(member=pretty, postfix_operators=[], prefix_operators=[], qualifier=, sele... | Keyword[public] Keyword[static] identifier[String] identifier[toJsonString] operator[SEP] identifier[Object] identifier[val] , Keyword[boolean] identifier[pretty] operator[SEP] {
Keyword[try] {
Keyword[return] identifier[pretty] operator[?] identifier[mapper] operator[SEP] identifier[writerWithDefaul... |
private long rotateMapHeight(long width, long height) {
if (rotation != null && (rotation == ROTATE_90 || rotation == ROTATE_270)) {
return width;
}
else {
return height;
}
} | class class_name[name] begin[{]
method[rotateMapHeight, return_type[type[long]], modifier[private], parameter[width, height]] begin[{]
if[binary_operation[binary_operation[member[.rotation], !=, literal[null]], &&, binary_operation[binary_operation[member[.rotation], ==, member[.ROTATE_90]], ||... | Keyword[private] Keyword[long] identifier[rotateMapHeight] operator[SEP] Keyword[long] identifier[width] , Keyword[long] identifier[height] operator[SEP] {
Keyword[if] operator[SEP] identifier[rotation] operator[!=] Other[null] operator[&&] operator[SEP] identifier[rotation] operator[==] identifier[ROTATE_90] o... |
@Override
public CPFriendlyURLEntry fetchByG_C_L_U(long groupId, long classNameId,
String languageId, String urlTitle, boolean retrieveFromCache) {
Object[] finderArgs = new Object[] {
groupId, classNameId, languageId, urlTitle
};
Object result = null;
if (retrieveFromCache) {
result = finderCache.... | class class_name[name] begin[{]
method[fetchByG_C_L_U, return_type[type[CPFriendlyURLEntry]], modifier[public], parameter[groupId, classNameId, languageId, urlTitle, retrieveFromCache]] begin[{]
local_variable[type[Object], finderArgs]
local_variable[type[Object], result]
if[mem... | annotation[@] identifier[Override] Keyword[public] identifier[CPFriendlyURLEntry] identifier[fetchByG_C_L_U] operator[SEP] Keyword[long] identifier[groupId] , Keyword[long] identifier[classNameId] , identifier[String] identifier[languageId] , identifier[String] identifier[urlTitle] , Keyword[boolean] identifier[ret... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.