code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public static Consumer throwAssertionError(String format) { return object -> { throw new AssertionError(String.format(format, object)); }; }
class class_name[name] begin[{] method[throwAssertionError, return_type[type[Consumer]], modifier[public static], parameter[format]] begin[{] return[LambdaExpression(body=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=format, postfix_operators=[], ...
Keyword[public] Keyword[static] identifier[Consumer] identifier[throwAssertionError] operator[SEP] identifier[String] identifier[format] operator[SEP] { Keyword[return] identifier[object] operator[->] { Keyword[throw] Keyword[new] identifier[AssertionError] operator[SEP] identifier[String] operator[SE...
public static <TimeInstantT extends TimeInstant> TimePickerFragment newInstance(int pickerId, TimeInstantT selectedInstant) { TimePickerFragment f = new TimePickerFragment(); Bundle args = new Bundle(); args.putInt(ARG_PICKER_ID, pickerId); args.putParcelable(ARG_SELECTED_INSTANT, selec...
class class_name[name] begin[{] method[newInstance, return_type[type[TimePickerFragment]], modifier[public static], parameter[pickerId, selectedInstant]] begin[{] local_variable[type[TimePickerFragment], f] local_variable[type[Bundle], args] call[args.putInt, parameter[member[.A...
Keyword[public] Keyword[static] operator[<] identifier[TimeInstantT] Keyword[extends] identifier[TimeInstant] operator[>] identifier[TimePickerFragment] identifier[newInstance] operator[SEP] Keyword[int] identifier[pickerId] , identifier[TimeInstantT] identifier[selectedInstant] operator[SEP] { identifier[TimeP...
private void buildGlobalResponseMessage(SwaggerProperties swaggerProperties, Docket docketForBuilder) { SwaggerProperties.GlobalResponseMessage globalResponseMessages = swaggerProperties.getGlobalResponseMessage(); /* POST,GET,PUT,PATCH,DELETE,HEAD,OPTIONS,TRACE 响应消息体 **/ List<...
class class_name[name] begin[{] method[buildGlobalResponseMessage, return_type[void], modifier[private], parameter[swaggerProperties, docketForBuilder]] begin[{] local_variable[type[SwaggerProperties], globalResponseMessages] local_variable[type[List], postResponseMessages] local_variab...
Keyword[private] Keyword[void] identifier[buildGlobalResponseMessage] operator[SEP] identifier[SwaggerProperties] identifier[swaggerProperties] , identifier[Docket] identifier[docketForBuilder] operator[SEP] { identifier[SwaggerProperties] operator[SEP] identifier[GlobalResponseMessage] identifier[globalRespons...
public Assignments cluster(Matrix matrix, Properties props) { int endSize = Integer.parseInt(props.getProperty( NUM_CLUSTERS_END, DEFAULT_NUM_CLUSTERS_END)); return cluster(matrix, endSize, props); }
class class_name[name] begin[{] method[cluster, return_type[type[Assignments]], modifier[public], parameter[matrix, props]] begin[{] local_variable[type[int], endSize] return[call[.cluster, parameter[member[.matrix], member[.endSize], member[.props]]]] end[}] END[}]
Keyword[public] identifier[Assignments] identifier[cluster] operator[SEP] identifier[Matrix] identifier[matrix] , identifier[Properties] identifier[props] operator[SEP] { Keyword[int] identifier[endSize] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[props] operator[...
public C placeEndFromEnd(int itemIndex, double endOffEnd) { C cell = getSizedCell(itemIndex); double y = sizeTracker.getViewportLength() + endOffEnd - orientation.length(cell); relocate(cell, 0, y); cell.getNode().setVisible(true); return cell; }
class class_name[name] begin[{] method[placeEndFromEnd, return_type[type[C]], modifier[public], parameter[itemIndex, endOffEnd]] begin[{] local_variable[type[C], cell] local_variable[type[double], y] call[.relocate, parameter[member[.cell], literal[0], member[.y]]] ...
Keyword[public] identifier[C] identifier[placeEndFromEnd] operator[SEP] Keyword[int] identifier[itemIndex] , Keyword[double] identifier[endOffEnd] operator[SEP] { identifier[C] identifier[cell] operator[=] identifier[getSizedCell] operator[SEP] identifier[itemIndex] operator[SEP] operator[SEP] Keyword[double] i...
@RequiresPermission(Manifest.permission.INTERNET) public static Observable<Boolean> observeInternetConnectivity() { InternetObservingSettings settings = InternetObservingSettings.create(); return observeInternetConnectivity(settings.strategy(), settings.initialInterval(), settings.interval(), settings...
class class_name[name] begin[{] method[observeInternetConnectivity, return_type[type[Observable]], modifier[public static], parameter[]] begin[{] local_variable[type[InternetObservingSettings], settings] return[call[.observeInternetConnectivity, parameter[call[settings.strategy, parameter[]], c...
annotation[@] identifier[RequiresPermission] operator[SEP] identifier[Manifest] operator[SEP] identifier[permission] operator[SEP] identifier[INTERNET] operator[SEP] Keyword[public] Keyword[static] identifier[Observable] operator[<] identifier[Boolean] operator[>] identifier[observeInternetConnectivity] operator[SEP] o...
private OrderedMap<String, Pom> sortSubmodulesToReflectDependencies(Pom pom) { Set<MavenCoord> dependenciesMet = new HashSet(); dependenciesMet.add(pom.coord); SortedSet<MavenCoord> dependenciesSatisfied = new TreeSet<>(); for (Dependency dep : pom.dependencies) { ...
class class_name[name] begin[{] method[sortSubmodulesToReflectDependencies, return_type[type[OrderedMap]], modifier[private], parameter[pom]] begin[{] local_variable[type[Set], dependenciesMet] call[dependenciesMet.add, parameter[member[pom.coord]]] local_variable[type[SortedSet...
Keyword[private] identifier[OrderedMap] operator[<] identifier[String] , identifier[Pom] operator[>] identifier[sortSubmodulesToReflectDependencies] operator[SEP] identifier[Pom] identifier[pom] operator[SEP] { identifier[Set] operator[<] identifier[MavenCoord] operator[>] identifier[dependenciesMet] operator[=...
private void addFourEyesTaskListener(ActivityImpl activity) { UserTaskActivityBehavior userTaskActivityBehavior = (UserTaskActivityBehavior) activity.getActivityBehavior(); boolean listenerAlreadyExists = false; // check that the listener wasn't added in the XML explicitly List<TaskListener> existingL...
class class_name[name] begin[{] method[addFourEyesTaskListener, return_type[void], modifier[private], parameter[activity]] begin[{] local_variable[type[UserTaskActivityBehavior], userTaskActivityBehavior] local_variable[type[boolean], listenerAlreadyExists] local_variable[type[List], ex...
Keyword[private] Keyword[void] identifier[addFourEyesTaskListener] operator[SEP] identifier[ActivityImpl] identifier[activity] operator[SEP] { identifier[UserTaskActivityBehavior] identifier[userTaskActivityBehavior] operator[=] operator[SEP] identifier[UserTaskActivityBehavior] operator[SEP] identifier[activity...
protected RelationKey parseRelationKey(String id) { Matcher matcher = RELATION_PATTERN.matcher(id); matcher.find(); CmsUUID src = new CmsUUID(matcher.group(1)); CmsUUID tgt = new CmsUUID(matcher.group(2)); String tp = matcher.group(3); return new RelationKey(src, ...
class class_name[name] begin[{] method[parseRelationKey, return_type[type[RelationKey]], modifier[protected], parameter[id]] begin[{] local_variable[type[Matcher], matcher] call[matcher.find, parameter[]] local_variable[type[CmsUUID], src] local_variable[type[CmsUUID], t...
Keyword[protected] identifier[RelationKey] identifier[parseRelationKey] operator[SEP] identifier[String] identifier[id] operator[SEP] { identifier[Matcher] identifier[matcher] operator[=] identifier[RELATION_PATTERN] operator[SEP] identifier[matcher] operator[SEP] identifier[id] operator[SEP] operator[SEP] ident...
private URL generateMetatypePropertiesName(String metatypeName, String locale) { String lookupName; if (locale != null && locale.length() > 0) { lookupName = metatypeName + LOCALE_SEPARATOR + locale + PROP_EXT; } else { lookupName = metatypeName + PROP_EXT; } ...
class class_name[name] begin[{] method[generateMetatypePropertiesName, return_type[type[URL]], modifier[private], parameter[metatypeName, locale]] begin[{] local_variable[type[String], lookupName] if[binary_operation[binary_operation[member[.locale], !=, literal[null]], &&, binary_opera...
Keyword[private] identifier[URL] identifier[generateMetatypePropertiesName] operator[SEP] identifier[String] identifier[metatypeName] , identifier[String] identifier[locale] operator[SEP] { identifier[String] identifier[lookupName] operator[SEP] Keyword[if] operator[SEP] identifier[locale] operator[!=] Other[nu...
public void addResourceType(I_CmsResourceType resourceType) throws CmsConfigurationException { // check if new resource types can still be added if (m_frozen) { throw new CmsConfigurationException(Messages.get().container(Messages.ERR_NO_CONFIG_AFTER_STARTUP_0)); } I_CmsRes...
class class_name[name] begin[{] method[addResourceType, return_type[void], modifier[public], parameter[resourceType]] begin[{] if[member[.m_frozen]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_ope...
Keyword[public] Keyword[void] identifier[addResourceType] operator[SEP] identifier[I_CmsResourceType] identifier[resourceType] operator[SEP] Keyword[throws] identifier[CmsConfigurationException] { Keyword[if] operator[SEP] identifier[m_frozen] operator[SEP] { Keyword[throw] Keyword[new] identifier[Cms...
public static ExportRow decodeRow(ExportRow previous, int partition, long startTS, ByteBuffer bb) throws IOException { final int partitionColIndex = bb.getInt(); final int columnCount = bb.getInt(); assert(columnCount <= DDLCompiler.MAX_COLUMNS); boolean[] is_null = extractNullFlags(bb, ...
class class_name[name] begin[{] method[decodeRow, return_type[type[ExportRow]], modifier[public static], parameter[previous, partition, startTS, bb]] begin[{] local_variable[type[int], partitionColIndex] local_variable[type[int], columnCount] AssertStatement(condition=BinaryOperation(op...
Keyword[public] Keyword[static] identifier[ExportRow] identifier[decodeRow] operator[SEP] identifier[ExportRow] identifier[previous] , Keyword[int] identifier[partition] , Keyword[long] identifier[startTS] , identifier[ByteBuffer] identifier[bb] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[...
public static byte[] generateStubBytes(Class<?> remoteInterface, int rmicCompatible) throws EJBConfigurationException { String stubClassName = getStubClassName(remoteInterface.getName()); Method[] remoteMethods = remoteInterface.getMethods(); String[] i...
class class_name[name] begin[{] method[generateStubBytes, return_type[type[byte]], modifier[public static], parameter[remoteInterface, rmicCompatible]] begin[{] local_variable[type[String], stubClassName] local_variable[type[Method], remoteMethods] local_variable[type[String], idlNames]...
Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[generateStubBytes] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[remoteInterface] , Keyword[int] identifier[rmicCompatible] operator[SEP] Keyword[throws] identifier[EJBConfigurationException] { ...
public static boolean isTrivialTable(SymbolTable table) { if (table == null) return true; if (table.isSystemTable()) return true; if (table.isLocalTable()) { // this is only true when there are no local // symbols defined // and there are no import...
class class_name[name] begin[{] method[isTrivialTable, return_type[type[boolean]], modifier[public static], parameter[table]] begin[{] if[binary_operation[member[.table], ==, literal[null]]] begin[{] return[literal[true]] else begin[{] None end[}] if[call[table.i...
Keyword[public] Keyword[static] Keyword[boolean] identifier[isTrivialTable] operator[SEP] identifier[SymbolTable] identifier[table] operator[SEP] { Keyword[if] operator[SEP] identifier[table] operator[==] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifie...
static PortComponent getPortComponentByServletLink(String servletLink, Adaptable containerToAdapt) throws UnableToAdaptException { return getHighLevelElementByServiceImplBean(servletLink, containerToAdapt, PortComponent.class, LinkType.SERVLET); }
class class_name[name] begin[{] method[getPortComponentByServletLink, return_type[type[PortComponent]], modifier[static], parameter[servletLink, containerToAdapt]] begin[{] return[call[.getHighLevelElementByServiceImplBean, parameter[member[.servletLink], member[.containerToAdapt], ClassReference(postf...
Keyword[static] identifier[PortComponent] identifier[getPortComponentByServletLink] operator[SEP] identifier[String] identifier[servletLink] , identifier[Adaptable] identifier[containerToAdapt] operator[SEP] Keyword[throws] identifier[UnableToAdaptException] { Keyword[return] identifier[getHighLevelElementBySer...
public Object[] getChildren(Object element) { if (element instanceof IResource || element instanceof INode) { IWorkbenchAdapter adapter = getAdapter(element); if (adapter != null) { return adapter.getChildren(element); } return NO_CHILDREN; } return NO_CHILDREN; }
class class_name[name] begin[{] method[getChildren, return_type[type[Object]], modifier[public], parameter[element]] begin[{] if[binary_operation[binary_operation[member[.element], instanceof, type[IResource]], ||, binary_operation[member[.element], instanceof, type[INode]]]] begin[{] ...
Keyword[public] identifier[Object] operator[SEP] operator[SEP] identifier[getChildren] operator[SEP] identifier[Object] identifier[element] operator[SEP] { Keyword[if] operator[SEP] identifier[element] Keyword[instanceof] identifier[IResource] operator[||] identifier[element] Keyword[instanceof] identifier[INode...
private static boolean isValidEscaping(char c) { return ((c == 'n') || (c == 'r') || (c == 't') || (c == 'f') || (c == 'b') || (c == '\\') || (c == '/') || (c == '"') || (c == 'u')); }
class class_name[name] begin[{] method[isValidEscaping, return_type[type[boolean]], modifier[private static], parameter[c]] begin[{] return[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[member[.c]...
Keyword[private] Keyword[static] Keyword[boolean] identifier[isValidEscaping] operator[SEP] Keyword[char] identifier[c] operator[SEP] { Keyword[return] operator[SEP] operator[SEP] identifier[c] operator[==] literal[String] operator[SEP] operator[||] operator[SEP] identifier[c] operator[==] literal[String] operat...
public static Date addMinutes(Date date, int iMinutes ) { Calendar dateTime = dateToCalendar(date); dateTime.add(Calendar.MINUTE, iMinutes); return dateTime.getTime(); }
class class_name[name] begin[{] method[addMinutes, return_type[type[Date]], modifier[public static], parameter[date, iMinutes]] begin[{] local_variable[type[Calendar], dateTime] call[dateTime.add, parameter[member[Calendar.MINUTE], member[.iMinutes]]] return[call[dateTime.getTim...
Keyword[public] Keyword[static] identifier[Date] identifier[addMinutes] operator[SEP] identifier[Date] identifier[date] , Keyword[int] identifier[iMinutes] operator[SEP] { identifier[Calendar] identifier[dateTime] operator[=] identifier[dateToCalendar] operator[SEP] identifier[date] operator[SEP] operator[SEP] ...
private static synchronized Object getFromCache(Cache cache, byte[] encoding) { Object key = new Cache.EqualByteArray(encoding); Object value = cache.get(key); return value; }
class class_name[name] begin[{] method[getFromCache, return_type[type[Object]], modifier[synchronized private static], parameter[cache, encoding]] begin[{] local_variable[type[Object], key] local_variable[type[Object], value] return[member[.value]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[synchronized] identifier[Object] identifier[getFromCache] operator[SEP] identifier[Cache] identifier[cache] , Keyword[byte] operator[SEP] operator[SEP] identifier[encoding] operator[SEP] { identifier[Object] identifier[key] operator[=] Keyword[new] identifier[Cache] oper...
public static int crc32AsInt(@NotNull byte[] input) { CRC32 crc32 = new CRC32(); crc32.update(input); // CRC32 只是 32bit int,为了CheckSum接口强转成long,此处再次转回来 return (int) crc32.getValue(); }
class class_name[name] begin[{] method[crc32AsInt, return_type[type[int]], modifier[public static], parameter[input]] begin[{] local_variable[type[CRC32], crc32] call[crc32.update, parameter[member[.input]]] return[Cast(expression=MethodInvocation(arguments=[], member=getValue, ...
Keyword[public] Keyword[static] Keyword[int] identifier[crc32AsInt] operator[SEP] annotation[@] identifier[NotNull] Keyword[byte] operator[SEP] operator[SEP] identifier[input] operator[SEP] { identifier[CRC32] identifier[crc32] operator[=] Keyword[new] identifier[CRC32] operator[SEP] operator[SEP] operator[SEP] ...
public M readNext() throws IOException { byte[] blob = readNextProtoBytes(); return blob == null ? null : protoConverter_.fromBytes(blob); }
class class_name[name] begin[{] method[readNext, return_type[type[M]], modifier[public], parameter[]] begin[{] local_variable[type[byte], blob] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=blob, postfix_operators=[], prefix_operators=[], qualifier=, selecto...
Keyword[public] identifier[M] identifier[readNext] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[byte] operator[SEP] operator[SEP] identifier[blob] operator[=] identifier[readNextProtoBytes] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[blob] operator[==] Ot...
public BigDecimal add(BigDecimal augend) { if (this.intCompact != INFLATED) { if ((augend.intCompact != INFLATED)) { return add(this.intCompact, this.scale, augend.intCompact, augend.scale); } else { return add(this.intCompact, this.scale, augend.intVal, a...
class class_name[name] begin[{] method[add, return_type[type[BigDecimal]], modifier[public], parameter[augend]] begin[{] if[binary_operation[THIS[member[None.intCompact]], !=, member[.INFLATED]]] begin[{] if[binary_operation[member[augend.intCompact], !=, member[.INFLATE...
Keyword[public] identifier[BigDecimal] identifier[add] operator[SEP] identifier[BigDecimal] identifier[augend] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[intCompact] operator[!=] identifier[INFLATED] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifi...
@Override public boolean next() { if (prodScan == null) return false; while (!prodScan.next()) if (!useNextChunk()) return false; return true; }
class class_name[name] begin[{] method[next, return_type[type[boolean]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.prodScan], ==, literal[null]]] begin[{] return[literal[false]] else begin[{] None end[}] while[call[prodScan.next, paramet...
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[next] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[prodScan] operator[==] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[while] operator[SEP] operator[!] identifier[prodScan] ope...
public void close() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.entry(this, tc, "close"); } // Doing a channel.close() will actually put the keys associated with this // channel // into the associated selectors cancelledKey list, but they ...
class class_name[name] begin[{] method[close, return_type[void], modifier[public], parameter[]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.entry, parameter[THIS[], member...
Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SE...
public void marshall(NodeDetails nodeDetails, ProtocolMarshaller protocolMarshaller) { if (nodeDetails == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(nodeDetails.getNodeIndex(), NODEINDEX_BINDING)...
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[nodeDetails, protocolMarshaller]] begin[{] if[binary_operation[member[.nodeDetails], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operato...
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[NodeDetails] identifier[nodeDetails] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[nodeDetails] operator[==] Other[null] operator[SEP] { Keyword[throw] Ke...
public void marshall(StopContactRequest stopContactRequest, ProtocolMarshaller protocolMarshaller) { if (stopContactRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(stopContactRequest.getCon...
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[stopContactRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.stopContactRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(p...
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[StopContactRequest] identifier[stopContactRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[stopContactRequest] operator[==] Other[null] operator[SEP] { ...
@Override public ContinueUpdateRollbackResult continueUpdateRollback(ContinueUpdateRollbackRequest request) { request = beforeClientExecution(request); return executeContinueUpdateRollback(request); }
class class_name[name] begin[{] method[continueUpdateRollback, return_type[type[ContinueUpdateRollbackResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeContinueUpdateRollback, ...
annotation[@] identifier[Override] Keyword[public] identifier[ContinueUpdateRollbackResult] identifier[continueUpdateRollback] operator[SEP] identifier[ContinueUpdateRollbackRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[req...
public static List<Tuple<String, List<Object>>> displayableConstraint( Set<ConstraintDescriptor<?>> constraints, Annotation[] orderedAnnotations) { final List<Annotation> constraintAnnot = constraints.stream().map(c -> c.getAnnotation()).collect(Collectors.<Annotation>toList()); return Stream.of(...
class class_name[name] begin[{] method[displayableConstraint, return_type[type[List]], modifier[public static], parameter[constraints, orderedAnnotations]] begin[{] local_variable[type[List], constraintAnnot] return[call[Stream.of, parameter[member[.orderedAnnotations]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[Tuple] operator[<] identifier[String] , identifier[List] operator[<] identifier[Object] operator[>] operator[>] operator[>] identifier[displayableConstraint] operator[SEP] identifier[Set] operator[<] identifier[ConstraintDescriptor] operator[<] op...
protected void backtrack(final int newLevel) { assert 0 <= newLevel && newLevel <= this.level; if (newLevel == this.level) { return; } CLFrame f = this.control.back(); while (f.level() > newLevel) { assert f.level() == this.level; assert f.trail() < this.trail.siz...
class class_name[name] begin[{] method[backtrack, return_type[void], modifier[protected], parameter[newLevel]] begin[{] AssertStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operandr=MemberR...
Keyword[protected] Keyword[void] identifier[backtrack] operator[SEP] Keyword[final] Keyword[int] identifier[newLevel] operator[SEP] { Keyword[assert] Other[0] operator[<=] identifier[newLevel] operator[&&] identifier[newLevel] operator[<=] Keyword[this] operator[SEP] identifier[level] operator[SEP] Keyword[if] o...
@CheckForNull public static Executor of(Executable executable) { Jenkins jenkins = Jenkins.getInstanceOrNull(); // TODO confirm safe to assume non-null and use getInstance() if (jenkins == null) { return null; } for (Computer computer : jenkins.getComputers()) { ...
class class_name[name] begin[{] method[of, return_type[type[Executor]], modifier[public static], parameter[executable]] begin[{] local_variable[type[Jenkins], jenkins] if[binary_operation[member[.jenkins], ==, literal[null]]] begin[{] return[literal[null]] else begin...
annotation[@] identifier[CheckForNull] Keyword[public] Keyword[static] identifier[Executor] identifier[of] operator[SEP] identifier[Executable] identifier[executable] operator[SEP] { identifier[Jenkins] identifier[jenkins] operator[=] identifier[Jenkins] operator[SEP] identifier[getInstanceOrNull] operator[SEP] ...
public static Timer timer(MetricLevel level, String name) { return getMetricRegistry(level).timer(METRIC_PREFIX + name); }
class class_name[name] begin[{] method[timer, return_type[type[Timer]], modifier[public static], parameter[level, name]] begin[{] return[call[.getMetricRegistry, parameter[member[.level]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Timer] identifier[timer] operator[SEP] identifier[MetricLevel] identifier[level] , identifier[String] identifier[name] operator[SEP] { Keyword[return] identifier[getMetricRegistry] operator[SEP] identifier[level] operator[SEP] operator[SEP] identifier[timer] operator[S...
public static boolean isOurFormatId(int formatIdentifier) { if (tc.isEntryEnabled()) Tr.entry(tc, "isOurFormatId", formatIdentifier); final boolean result; switch (formatIdentifier) { // Current format IDs case ZOS_FID_CB390: case ZOS_FID_CBLT: c...
class class_name[name] begin[{] method[isOurFormatId, return_type[type[boolean]], modifier[public static], parameter[formatIdentifier]] begin[{] if[call[tc.isEntryEnabled, parameter[]]] begin[{] call[Tr.entry, parameter[member[.tc], literal["isOurFormatId"], member[.formatIdentifier...
Keyword[public] Keyword[static] Keyword[boolean] identifier[isOurFormatId] operator[SEP] Keyword[int] identifier[formatIdentifier] operator[SEP] { Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[en...
public GroovyExpression optimize(GroovyExpression source) { LOGGER.debug("Optimizing gremlin query: " + source); OptimizationContext context = new OptimizationContext(); GroovyExpression updatedExpression = source; for (GremlinOptimization opt : optimizations) { updatedExpres...
class class_name[name] begin[{] method[optimize, return_type[type[GroovyExpression]], modifier[public], parameter[source]] begin[{] call[LOGGER.debug, parameter[binary_operation[literal["Optimizing gremlin query: "], +, member[.source]]]] local_variable[type[OptimizationContext], contex...
Keyword[public] identifier[GroovyExpression] identifier[optimize] operator[SEP] identifier[GroovyExpression] identifier[source] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[source] operator[SEP] operator[SEP] identifier[OptimizationContex...
private void stopPondLife(int id) { PondLife pl = null; synchronized(this) { pl=_pondLife[id]; if (pl!=null) { _pondLife[id]=null; _index[--_size]=id; if (_available>_size) _available=_siz...
class class_name[name] begin[{] method[stopPondLife, return_type[void], modifier[private], parameter[id]] begin[{] local_variable[type[PondLife], pl] SYNCHRONIZED[THIS[]] BEGIN[{] assign[member[.pl], member[._pondLife]] if[binary_operation...
Keyword[private] Keyword[void] identifier[stopPondLife] operator[SEP] Keyword[int] identifier[id] operator[SEP] { identifier[PondLife] identifier[pl] operator[=] Other[null] operator[SEP] Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] { identifier[pl] operator[=] identifier[_pondLife]...
public void setDeviceEvents(java.util.Collection<DeviceEvent> deviceEvents) { if (deviceEvents == null) { this.deviceEvents = null; return; } this.deviceEvents = new java.util.ArrayList<DeviceEvent>(deviceEvents); }
class class_name[name] begin[{] method[setDeviceEvents, return_type[void], modifier[public], parameter[deviceEvents]] begin[{] if[binary_operation[member[.deviceEvents], ==, literal[null]]] begin[{] assign[THIS[member[None.deviceEvents]], literal[null]] retur...
Keyword[public] Keyword[void] identifier[setDeviceEvents] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[DeviceEvent] operator[>] identifier[deviceEvents] operator[SEP] { Keyword[if] operator[SEP] identifier[deviceEvents] operator[==] Oth...
protected ParameterOccurs parseParameterOccurs(Tag[] tags) { for (int i = 0; i < tags.length; i++) { if (("@" + WROccursTaglet.NAME).equalsIgnoreCase(tags[i].name())) { if (WROccursTaglet.REQUIRED.equalsIgnoreCase(tags[i].text())) { return ParameterOccurs.REQUIRED; } else if (WROccursTaglet.OPTIONAL.e...
class class_name[name] begin[{] method[parseParameterOccurs, return_type[type[ParameterOccurs]], modifier[protected], parameter[tags]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qual...
Keyword[protected] identifier[ParameterOccurs] identifier[parseParameterOccurs] operator[SEP] identifier[Tag] operator[SEP] operator[SEP] identifier[tags] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[tags] operator[S...
public EClass getFND() { if (fndEClass == null) { fndEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(263); } return fndEClass; }
class class_name[name] begin[{] method[getFND, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.fndEClass], ==, literal[null]]] begin[{] assign[member[.fndEClass], Cast(expression=MethodInvocation(arguments=[MemberReference(m...
Keyword[public] identifier[EClass] identifier[getFND] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[fndEClass] operator[==] Other[null] operator[SEP] { identifier[fndEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[SEP] identifier[Re...
public static String convertTabsToSpaces(final String line, final int tabWidth) { int tab_index, tab_size; int last_tab_index = 0; int added_chars = 0; if (tabWidth == 0) { return StringUtil.remove(line, '\t'); } StringBuilder result = new StringBuilder(); while ((tab_index = line.indexOf('\t', last...
class class_name[name] begin[{] method[convertTabsToSpaces, return_type[type[String]], modifier[public static], parameter[line, tabWidth]] begin[{] local_variable[type[int], tab_index] local_variable[type[int], last_tab_index] local_variable[type[int], added_chars] if[bi...
Keyword[public] Keyword[static] identifier[String] identifier[convertTabsToSpaces] operator[SEP] Keyword[final] identifier[String] identifier[line] , Keyword[final] Keyword[int] identifier[tabWidth] operator[SEP] { Keyword[int] identifier[tab_index] , identifier[tab_size] operator[SEP] Keyword[int] identifier[...
public Observable<IntegrationAccountCertificateInner> createOrUpdateAsync(String resourceGroupName, String integrationAccountName, String certificateName, IntegrationAccountCertificateInner certificate) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, certificateName, c...
class class_name[name] begin[{] method[createOrUpdateAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, integrationAccountName, certificateName, certificate]] begin[{] return[call[.createOrUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.in...
Keyword[public] identifier[Observable] operator[<] identifier[IntegrationAccountCertificateInner] operator[>] identifier[createOrUpdateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[integrationAccountName] , identifier[String] identifier[certificateName] , ident...
private String getSignature(String str) { try { MessageDigest md = MessageDigest.getInstance(SHA_STRING); md.update(str.getBytes()); md.update(secretBytes); byte[] digest = md.digest(); return new Base64(0).encodeToString(digest); } catch (NoSuchAlgorithmException ex) { throw...
class class_name[name] begin[{] method[getSignature, return_type[type[String]], modifier[private], parameter[str]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=SHA_STRI...
Keyword[private] identifier[String] identifier[getSignature] operator[SEP] identifier[String] identifier[str] operator[SEP] { Keyword[try] { identifier[MessageDigest] identifier[md] operator[=] identifier[MessageDigest] operator[SEP] identifier[getInstance] operator[SEP] identifier[SHA_STRING] operato...
public InputStream getAttachment(String docId, String attachmentName, String revId) { return db.getAttachment(docId, attachmentName, revId); }
class class_name[name] begin[{] method[getAttachment, return_type[type[InputStream]], modifier[public], parameter[docId, attachmentName, revId]] begin[{] return[call[db.getAttachment, parameter[member[.docId], member[.attachmentName], member[.revId]]]] end[}] END[}]
Keyword[public] identifier[InputStream] identifier[getAttachment] operator[SEP] identifier[String] identifier[docId] , identifier[String] identifier[attachmentName] , identifier[String] identifier[revId] operator[SEP] { Keyword[return] identifier[db] operator[SEP] identifier[getAttachment] operator[SEP] identi...
@RequestMapping(method = RequestMethod.DELETE, value = "/clearUser") public ResponseEntity<Void> deleteUser() { ConfigurationHandler response = configurationHandlerService.getConfigForDeleteUser(); return new ResponseEntity<>(HttpStatus.valueOf(response.getResult())); }
class class_name[name] begin[{] method[deleteUser, return_type[type[ResponseEntity]], modifier[public], parameter[]] begin[{] local_variable[type[ConfigurationHandler], response] return[ClassCreator(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getResult, postfix_...
annotation[@] identifier[RequestMapping] operator[SEP] identifier[method] operator[=] identifier[RequestMethod] operator[SEP] identifier[DELETE] , identifier[value] operator[=] literal[String] operator[SEP] Keyword[public] identifier[ResponseEntity] operator[<] identifier[Void] operator[>] identifier[deleteUser] opera...
public static CounterType decodeType(byte flags) { switch (flags & 0x03) { case WEAK_COUNTER: return CounterType.WEAK; case BOUNDED_COUNTER: return CounterType.BOUNDED_STRONG; case UNBOUNDED_COUNTER: return CounterType.UNBOUNDED_STRONG; defau...
class class_name[name] begin[{] method[decodeType, return_type[type[CounterType]], modifier[public static], parameter[flags]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['WEAK_COUNTER'], statements=[ReturnStatement(expression=MemberReference(member=WEAK, postfix_operators=[], prefix_opera...
Keyword[public] Keyword[static] identifier[CounterType] identifier[decodeType] operator[SEP] Keyword[byte] identifier[flags] operator[SEP] { Keyword[switch] operator[SEP] identifier[flags] operator[&] literal[Integer] operator[SEP] { Keyword[case] identifier[WEAK_COUNTER] operator[:] Keyword[return] ...
private void _advance(int count) { if (buf != null) { bufPos += count; if (bufPos == buf.length) { buf = null; } } else { pos.setIndex(pos.getIndex() + count); if (pos.getIndex() > text.length()) { pos.setIndex(t...
class class_name[name] begin[{] method[_advance, return_type[void], modifier[private], parameter[count]] begin[{] if[binary_operation[member[.buf], !=, literal[null]]] begin[{] assign[member[.bufPos], member[.count]] if[binary_operation[member[.bu...
Keyword[private] Keyword[void] identifier[_advance] operator[SEP] Keyword[int] identifier[count] operator[SEP] { Keyword[if] operator[SEP] identifier[buf] operator[!=] Other[null] operator[SEP] { identifier[bufPos] operator[+=] identifier[count] operator[SEP] Keyword[if] operator[SEP] identifier[bufPo...
public static ContentData create(@NonNull File data, @NonNull String type, @Nullable String name) { return new ContentData(RequestBody.create(MediaType.parse(type), data), TextUtils.isEmpty(name) ? data.getName() : name); }
class class_name[name] begin[{] method[create, return_type[type[ContentData]], modifier[public static], parameter[data, type, name]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qu...
Keyword[public] Keyword[static] identifier[ContentData] identifier[create] operator[SEP] annotation[@] identifier[NonNull] identifier[File] identifier[data] , annotation[@] identifier[NonNull] identifier[String] identifier[type] , annotation[@] identifier[Nullable] identifier[String] identifier[name] operator[SEP] {...
private Word<I> prepareSplit(AbstractBaseDTNode<I, D> node, Splitter<I, D> splitter) { int symbolIdx = splitter.symbolIdx; I symbol = alphabet.getSymbol(symbolIdx); Word<I> discriminator = splitter.getDiscriminator().prepend(symbol); Deque<AbstractBaseDTNode<I, D>> dfsStack = new ArrayD...
class class_name[name] begin[{] method[prepareSplit, return_type[type[Word]], modifier[private], parameter[node, splitter]] begin[{] local_variable[type[int], symbolIdx] local_variable[type[I], symbol] local_variable[type[Word], discriminator] local_variable[type[Deque], dfsStac...
Keyword[private] identifier[Word] operator[<] identifier[I] operator[>] identifier[prepareSplit] operator[SEP] identifier[AbstractBaseDTNode] operator[<] identifier[I] , identifier[D] operator[>] identifier[node] , identifier[Splitter] operator[<] identifier[I] , identifier[D] operator[>] identifier[splitter] operat...
public OvhTask serviceName_partition_partitionName_quota_uid_DELETE(String serviceName, String partitionName, Long uid) throws IOException { String qPath = "/dedicated/nas/{serviceName}/partition/{partitionName}/quota/{uid}"; StringBuilder sb = path(qPath, serviceName, partitionName, uid); String resp = exec(qPat...
class class_name[name] begin[{] method[serviceName_partition_partitionName_quota_uid_DELETE, return_type[type[OvhTask]], modifier[public], parameter[serviceName, partitionName, uid]] begin[{] local_variable[type[String], qPath] local_variable[type[StringBuilder], sb] local_variable[type...
Keyword[public] identifier[OvhTask] identifier[serviceName_partition_partitionName_quota_uid_DELETE] operator[SEP] identifier[String] identifier[serviceName] , identifier[String] identifier[partitionName] , identifier[Long] identifier[uid] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Stri...
public JSONObject addApiKey(List<String> acls) throws AlgoliaException { return addApiKey(acls, 0, 0, 0, null, RequestOptions.empty); }
class class_name[name] begin[{] method[addApiKey, return_type[type[JSONObject]], modifier[public], parameter[acls]] begin[{] return[call[.addApiKey, parameter[member[.acls], literal[0], literal[0], literal[0], literal[null], member[RequestOptions.empty]]]] end[}] END[}]
Keyword[public] identifier[JSONObject] identifier[addApiKey] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[acls] operator[SEP] Keyword[throws] identifier[AlgoliaException] { Keyword[return] identifier[addApiKey] operator[SEP] identifier[acls] , Other[0] , Other[0] , Othe...
public JcString trimLeft() { JcString ret = new JcString(null, this, new FunctionInstance(FUNCTION.String.LTRIM, 1)); QueryRecorder.recordInvocationConditional(this, "trimLeft", ret); return ret; }
class class_name[name] begin[{] method[trimLeft, return_type[type[JcString]], modifier[public], parameter[]] begin[{] local_variable[type[JcString], ret] call[QueryRecorder.recordInvocationConditional, parameter[THIS[], literal["trimLeft"], member[.ret]]] return[member[.ret]] ...
Keyword[public] identifier[JcString] identifier[trimLeft] operator[SEP] operator[SEP] { identifier[JcString] identifier[ret] operator[=] Keyword[new] identifier[JcString] operator[SEP] Other[null] , Keyword[this] , Keyword[new] identifier[FunctionInstance] operator[SEP] identifier[FUNCTION] operator[SEP] ident...
public Vector2f sub(float x, float y, Vector2f dest) { dest.x = this.x - x; dest.y = this.y - y; return dest; }
class class_name[name] begin[{] method[sub, return_type[type[Vector2f]], modifier[public], parameter[x, y, dest]] begin[{] assign[member[dest.x], binary_operation[THIS[member[None.x]], -, member[.x]]] assign[member[dest.y], binary_operation[THIS[member[None.y]], -, member[.y]]] ...
Keyword[public] identifier[Vector2f] identifier[sub] operator[SEP] Keyword[float] identifier[x] , Keyword[float] identifier[y] , identifier[Vector2f] identifier[dest] operator[SEP] { identifier[dest] operator[SEP] identifier[x] operator[=] Keyword[this] operator[SEP] identifier[x] operator[-] identifier[x] ope...
public void insert(Statement stmt, KeyQualifier keyQualifier, List<Bin> bins, int ttl) { Key key = keyQualifier.makeKey(stmt.getNamespace(), stmt.getSetName()); // Key key = new Key(stmt.getNamespace(), stmt.getSetName(), keyQualifier.getValue1()); this.client.put(this.insertPolicy, key, bins.toArray(new Bin[0])...
class class_name[name] begin[{] method[insert, return_type[void], modifier[public], parameter[stmt, keyQualifier, bins, ttl]] begin[{] local_variable[type[Key], key] THIS[member[None.client]call[None.put, parameter[THIS[member[None.insertPolicy]], member[.key], call[bins.toArray, parame...
Keyword[public] Keyword[void] identifier[insert] operator[SEP] identifier[Statement] identifier[stmt] , identifier[KeyQualifier] identifier[keyQualifier] , identifier[List] operator[<] identifier[Bin] operator[>] identifier[bins] , Keyword[int] identifier[ttl] operator[SEP] { identifier[Key] identifier[key] o...
public FieldDefinition getShardingField() { if (!isSharded()) { return null; } String shardingFieldNme = getOption(CommonDefs.OPT_SHARDING_FIELD); if (shardingFieldNme == null) { return null; } return getFieldDef(shardingFieldNme); // may...
class class_name[name] begin[{] method[getShardingField, return_type[type[FieldDefinition]], modifier[public], parameter[]] begin[{] if[call[.isSharded, parameter[]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[String], shardi...
Keyword[public] identifier[FieldDefinition] identifier[getShardingField] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[isSharded] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[String] identifier[shardin...
public String convertIfcReinforcingMeshTypeEnumToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); }
class class_name[name] begin[{] method[convertIfcReinforcingMeshTypeEnumToString, return_type[type[String]], modifier[public], parameter[eDataType, instanceValue]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=instanceValue, postfix_operators=[], prefix_ope...
Keyword[public] identifier[String] identifier[convertIfcReinforcingMeshTypeEnumToString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[Object] identifier[instanceValue] operator[SEP] { Keyword[return] identifier[instanceValue] operator[==] Other[null] operator[?] Other[null] operator[:]...
public static void initFileSendHeader(HttpServletResponse res, String filename, String contentType) { filename = getEncodingFileName(filename); if (contentType != null) { res.setContentType(contentType); } else { res.setContentType("applicaiton/download;charset=utf-8"); ...
class class_name[name] begin[{] method[initFileSendHeader, return_type[void], modifier[public static], parameter[res, filename, contentType]] begin[{] assign[member[.filename], call[.getEncodingFileName, parameter[member[.filename]]]] if[binary_operation[member[.contentType], !=...
Keyword[public] Keyword[static] Keyword[void] identifier[initFileSendHeader] operator[SEP] identifier[HttpServletResponse] identifier[res] , identifier[String] identifier[filename] , identifier[String] identifier[contentType] operator[SEP] { identifier[filename] operator[=] identifier[getEncodingFileName] oper...
@Override public MtasSpanQuery rewrite(IndexReader reader) throws IOException { MtasSpanQuery newQ1 = (MtasSpanQuery) q1.rewrite(reader); MtasSpanQuery newQ2 = (MtasSpanQuery) q2.rewrite(reader); if (!newQ1.equals(q1) || !newQ2.equals(q2)) { return new MtasSpanIntersectingQuery(newQ1, newQ2).rewrite...
class class_name[name] begin[{] method[rewrite, return_type[type[MtasSpanQuery]], modifier[public], parameter[reader]] begin[{] local_variable[type[MtasSpanQuery], newQ1] local_variable[type[MtasSpanQuery], newQ2] if[binary_operation[call[newQ1.equals, parameter[member[.q1]]], |...
annotation[@] identifier[Override] Keyword[public] identifier[MtasSpanQuery] identifier[rewrite] operator[SEP] identifier[IndexReader] identifier[reader] operator[SEP] Keyword[throws] identifier[IOException] { identifier[MtasSpanQuery] identifier[newQ1] operator[=] operator[SEP] identifier[MtasSpanQuery] operato...
public static String deepFieldName(Field field) { DeepField annotation = field.getAnnotation(DeepField.class); if (StringUtils.isNotEmpty(annotation.fieldName())) { return annotation.fieldName(); } else { return field.getName(); } }
class class_name[name] begin[{] method[deepFieldName, return_type[type[String]], modifier[public static], parameter[field]] begin[{] local_variable[type[DeepField], annotation] if[call[StringUtils.isNotEmpty, parameter[call[annotation.fieldName, parameter[]]]]] begin[{] retu...
Keyword[public] Keyword[static] identifier[String] identifier[deepFieldName] operator[SEP] identifier[Field] identifier[field] operator[SEP] { identifier[DeepField] identifier[annotation] operator[=] identifier[field] operator[SEP] identifier[getAnnotation] operator[SEP] identifier[DeepField] operator[SEP] Keywo...
@Override public HiveMetastoreClient createMetastoreClient() throws TException { List<HostAndPort> metastores = new ArrayList<>(addresses); Collections.shuffle(metastores.subList(1, metastores.size())); TException lastException = null; for (HostAndPort metastore : me...
class class_name[name] begin[{] method[createMetastoreClient, return_type[type[HiveMetastoreClient]], modifier[public], parameter[]] begin[{] local_variable[type[List], metastores] call[Collections.shuffle, parameter[call[metastores.subList, parameter[literal[1], call[metastores.size, p...
annotation[@] identifier[Override] Keyword[public] identifier[HiveMetastoreClient] identifier[createMetastoreClient] operator[SEP] operator[SEP] Keyword[throws] identifier[TException] { identifier[List] operator[<] identifier[HostAndPort] operator[>] identifier[metastores] operator[=] Keyword[new] identifier[Arr...
private Map<String, String[]> getParameterMap(HttpServletRequest pReq){ try { // Servlet 2.4 API return pReq.getParameterMap(); } catch (UnsupportedOperationException exp) { // Thrown by 'pseudo' 2.4 Servlet API implementations which fake a 2.4 API // As a...
class class_name[name] begin[{] method[getParameterMap, return_type[type[Map]], modifier[private], parameter[pReq]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getParameterMap, postfix_operators=[], prefix_operators=[], qualifier=pReq, selectors=[], typ...
Keyword[private] identifier[Map] operator[<] identifier[String] , identifier[String] operator[SEP] operator[SEP] operator[>] identifier[getParameterMap] operator[SEP] identifier[HttpServletRequest] identifier[pReq] operator[SEP] { Keyword[try] { Keyword[return] identifier[pReq] operator[SEP] identifi...
public static dos_stats get(nitro_service service, options option) throws Exception{ dos_stats obj = new dos_stats(); dos_stats[] response = (dos_stats[])obj.stat_resources(service,option); return response[0]; }
class class_name[name] begin[{] method[get, return_type[type[dos_stats]], modifier[public static], parameter[service, option]] begin[{] local_variable[type[dos_stats], obj] local_variable[type[dos_stats], response] return[member[.response]] end[}] END[}]
Keyword[public] Keyword[static] identifier[dos_stats] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] , identifier[options] identifier[option] operator[SEP] Keyword[throws] identifier[Exception] { identifier[dos_stats] identifier[obj] operator[=] Keyword[new] identifier[dos_stats] op...
public <T> TableFormatter header(Collection<? extends T> collection) { header.addAll(collection); longestCell = (int) Math.max(longestCell, collection.stream() .mapToDouble(o -> o.toString().length() + 2) ...
class class_name[name] begin[{] method[header, return_type[type[TableFormatter]], modifier[public], parameter[collection]] begin[{] call[header.addAll, parameter[member[.collection]]] assign[member[.longestCell], Cast(expression=MethodInvocation(arguments=[MemberReference(member...
Keyword[public] operator[<] identifier[T] operator[>] identifier[TableFormatter] identifier[header] operator[SEP] identifier[Collection] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] identifier[collection] operator[SEP] { identifier[header] operator[SEP] identifier[addAll] operator[SEP] iden...
@Override public Request<DisassociateRouteTableRequest> getDryRunRequest() { Request<DisassociateRouteTableRequest> request = new DisassociateRouteTableRequestMarshaller().marshall(this); request.addParameter("DryRun", Boolean.toString(true)); return request; }
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[DisassociateRouteTableRequest] operator[>] identifier[getDryRunRequest] operator[SEP] operator[SEP] { identifier[Request] operator[<] identifier[DisassociateRouteTableRequest] operator[>] identifier[request] operator[=]...
@NotNull public DoubleStream limit(final long maxSize) { if (maxSize < 0) throw new IllegalArgumentException("maxSize cannot be negative"); if (maxSize == 0) return DoubleStream.empty(); return new DoubleStream(params, new DoubleLimit(iterator, maxSize)); }
class class_name[name] begin[{] method[limit, return_type[type[DoubleStream]], modifier[public], parameter[maxSize]] begin[{] if[binary_operation[member[.maxSize], <, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], quali...
annotation[@] identifier[NotNull] Keyword[public] identifier[DoubleStream] identifier[limit] operator[SEP] Keyword[final] Keyword[long] identifier[maxSize] operator[SEP] { Keyword[if] operator[SEP] identifier[maxSize] operator[<] Other[0] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentExcept...
public static String readCharacters( final File file ) throws IOException { Reader reader = new BufferedReader( new InputStreamReader( new FileInputStream( file ), Charset.forName( "UTF-8" ) ) ); // Note: // The character s...
class class_name[name] begin[{] method[readCharacters, return_type[type[String]], modifier[public static], parameter[file]] begin[{] local_variable[type[Reader], reader] local_variable[type[StringWriter], sw] local_variable[type[Writer], writer] call[.copy, parameter[mem...
Keyword[public] Keyword[static] identifier[String] identifier[readCharacters] operator[SEP] Keyword[final] identifier[File] identifier[file] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Reader] identifier[reader] operator[=] Keyword[new] identifier[BufferedReader] operator[SEP] Keyword[new]...
public static <T1, T2, T3> TriPredicate<T1, T2, T3> spy2nd(TriPredicate<T1, T2, T3> predicate, Box<T2> param2) { return spy(predicate, Box.<Boolean>empty(), Box.<T1>empty(), param2, Box.<T3>empty()); }
class class_name[name] begin[{] method[spy2nd, return_type[type[TriPredicate]], modifier[public static], parameter[predicate, param2]] begin[{] return[call[.spy, parameter[member[.predicate], call[.Box, parameter[]], call[.Box, parameter[]], member[.param2], call[.Box, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T1] , identifier[T2] , identifier[T3] operator[>] identifier[TriPredicate] operator[<] identifier[T1] , identifier[T2] , identifier[T3] operator[>] identifier[spy2nd] operator[SEP] identifier[TriPredicate] operator[<] identifier[T1] , identifier[T2] , identif...
public static <T, C extends Collection<T>> Reducer<T, C> getAggregatingReducer( Supplier<C> supplier) { return new AggregatingReducer<T, C>(supplier); }
class class_name[name] begin[{] method[getAggregatingReducer, return_type[type[Reducer]], modifier[public static], parameter[supplier]] begin[{] return[ClassCreator(arguments=[MemberReference(member=supplier, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_...
Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[C] Keyword[extends] identifier[Collection] operator[<] identifier[T] operator[>] operator[>] identifier[Reducer] operator[<] identifier[T] , identifier[C] operator[>] identifier[getAggregatingReducer] operator[SEP] identifier[Supplier] operator[<]...
public ValidationData save(ValidationData data) { if (data.getParamType() == null || data.getUrl() == null || data.getMethod() == null || data.getType() == null || data.getTypeClass() == null) { throw new ValidationLibException("mandatory field is null ", HttpStatus.BAD_REQUEST); } ...
class class_name[name] begin[{] method[save, return_type[type[ValidationData]], modifier[public], parameter[data]] begin[{] if[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[call[data.getParamType, parameter[]], ==, literal[null]], ||, binary_operation[call...
Keyword[public] identifier[ValidationData] identifier[save] operator[SEP] identifier[ValidationData] identifier[data] operator[SEP] { Keyword[if] operator[SEP] identifier[data] operator[SEP] identifier[getParamType] operator[SEP] operator[SEP] operator[==] Other[null] operator[||] identifier[data] operator[SEP] ...
@Pure protected static Plane3D<?> toPlane( double tx1, double ty1, double tz1, double tx2, double ty2, double tz2, double tx3, double ty3, double tz3) { Vector3f norm = new Vector3f(); FunctionalVector3D.crossProduct( tx2 - tx1, ty2 - ty1, tz2 - tz1, tx3 - tx1, ty3 - ty1, tz3 - tz1...
class class_name[name] begin[{] method[toPlane, return_type[type[Plane3D]], modifier[static protected], parameter[tx1, ty1, tz1, tx2, ty2, tz2, tx3, ty3, tz3]] begin[{] local_variable[type[Vector3f], norm] call[FunctionalVector3D.crossProduct, parameter[binary_operation[member[.tx2], -,...
annotation[@] identifier[Pure] Keyword[protected] Keyword[static] identifier[Plane3D] operator[<] operator[?] operator[>] identifier[toPlane] operator[SEP] Keyword[double] identifier[tx1] , Keyword[double] identifier[ty1] , Keyword[double] identifier[tz1] , Keyword[double] identifier[tx2] , Keyword[double] identifi...
public List<Peer> findPeersOfAtLeastVersion(long protocolVersion) { lock.lock(); try { ArrayList<Peer> results = new ArrayList<>(peers.size()); for (Peer peer : peers) if (peer.getPeerVersionMessage().clientVersion >= protocolVersion) results.a...
class class_name[name] begin[{] method[findPeersOfAtLeastVersion, return_type[type[List]], modifier[public], parameter[protocolVersion]] begin[{] call[lock.lock, parameter[]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], init...
Keyword[public] identifier[List] operator[<] identifier[Peer] operator[>] identifier[findPeersOfAtLeastVersion] operator[SEP] Keyword[long] identifier[protocolVersion] operator[SEP] { identifier[lock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[Ar...
public Observable<ServiceResponse<KeyVerifyResult>> verifyWithServiceResponseAsync(String vaultBaseUrl, String keyName, String keyVersion, JsonWebKeySignatureAlgorithm algorithm, byte[] digest, byte[] signature) { if (vaultBaseUrl == null) { throw new IllegalArgumentException("Parameter vaultBaseUrl...
class class_name[name] begin[{] method[verifyWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[vaultBaseUrl, keyName, keyVersion, algorithm, digest, signature]] begin[{] if[binary_operation[member[.vaultBaseUrl], ==, literal[null]]] begin[{] ThrowS...
Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[KeyVerifyResult] operator[>] operator[>] identifier[verifyWithServiceResponseAsync] operator[SEP] identifier[String] identifier[vaultBaseUrl] , identifier[String] identifier[keyName] , identifier[String] identifier[k...
public DirContext authenticateByDnForContext(String userDN, char[] pwd) throws NamingException { Hashtable<String,Object> env = new Hashtable<String,Object> (); setupBasicProperties(env, url); setupSecurityProperties(env, userDN, pwd); return openContext(env); }
class class_name[name] begin[{] method[authenticateByDnForContext, return_type[type[DirContext]], modifier[public], parameter[userDN, pwd]] begin[{] local_variable[type[Hashtable], env] call[.setupBasicProperties, parameter[member[.env], member[.url]]] call[.setupSecurit...
Keyword[public] identifier[DirContext] identifier[authenticateByDnForContext] operator[SEP] identifier[String] identifier[userDN] , Keyword[char] operator[SEP] operator[SEP] identifier[pwd] operator[SEP] Keyword[throws] identifier[NamingException] { identifier[Hashtable] operator[<] identifier[String] , identi...
public Map<Long, BehaviorHistoryInfo> listTimelineBehaviorHistory(TimelineBehaviorHistoryCondition condition) { Assert.assertNotNull(condition); Map<Long, BehaviorHistoryInfo> behaviorHistoryInfos = new LinkedHashMap<Long, BehaviorHistoryInfo>(); List<TableHistoryStatDO> tableHistoryStatDOs = t...
class class_name[name] begin[{] method[listTimelineBehaviorHistory, return_type[type[Map]], modifier[public], parameter[condition]] begin[{] call[Assert.assertNotNull, parameter[member[.condition]]] local_variable[type[Map], behaviorHistoryInfos] local_variable[type[List], table...
Keyword[public] identifier[Map] operator[<] identifier[Long] , identifier[BehaviorHistoryInfo] operator[>] identifier[listTimelineBehaviorHistory] operator[SEP] identifier[TimelineBehaviorHistoryCondition] identifier[condition] operator[SEP] { identifier[Assert] operator[SEP] identifier[assertNotNull] operator[...
private float pointToAngle(float x, float y, float centerX, float centerY) { double diffX = x - centerX; double diffY = y - centerY; // Pass -diffX to get clockwise degrees order. double radian = Math.atan2(-diffX, diffY); float angle = ((float) Math.toDegrees(radian) + 360) % 3...
class class_name[name] begin[{] method[pointToAngle, return_type[type[float]], modifier[private], parameter[x, y, centerX, centerY]] begin[{] local_variable[type[double], diffX] local_variable[type[double], diffY] local_variable[type[double], radian] local_variable[type[float], ...
Keyword[private] Keyword[float] identifier[pointToAngle] operator[SEP] Keyword[float] identifier[x] , Keyword[float] identifier[y] , Keyword[float] identifier[centerX] , Keyword[float] identifier[centerY] operator[SEP] { Keyword[double] identifier[diffX] operator[=] identifier[x] operator[-] identifier[center...
@Override public void onDialogRelease(MAPDialog mapDialog) { if (logger.isDebugEnabled()) { logger.debug(String.format("onDialogResease for DialogId=%d", mapDialog.getLocalDialogId())); } this.csvWriter.incrementCounter(SUCCESSFUL_DIALOGS); this.endCount++; if (t...
class class_name[name] begin[{] method[onDialogRelease, return_type[void], modifier[public], parameter[mapDialog]] begin[{] if[call[logger.isDebugEnabled, parameter[]]] begin[{] call[logger.debug, parameter[call[String.format, parameter[literal["onDialogResease for Dialo...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onDialogRelease] operator[SEP] identifier[MAPDialog] identifier[mapDialog] operator[SEP] { Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { ident...
public static Promise ajax(Settings settings) { resolveSettings(settings); final Function onSuccess = settings.getSuccess(); if (onSuccess != null) { onSuccess.setElement(settings.getContext()); } final Function onError = settings.getError(); if (onError != null) { onError.setEleme...
class class_name[name] begin[{] method[ajax, return_type[type[Promise]], modifier[public static], parameter[settings]] begin[{] call[.resolveSettings, parameter[member[.settings]]] local_variable[type[Function], onSuccess] if[binary_operation[member[.onSuccess], !=, lite...
Keyword[public] Keyword[static] identifier[Promise] identifier[ajax] operator[SEP] identifier[Settings] identifier[settings] operator[SEP] { identifier[resolveSettings] operator[SEP] identifier[settings] operator[SEP] operator[SEP] Keyword[final] identifier[Function] identifier[onSuccess] operator[=] identifier[...
private void scanForJarClasses(Path path, String packagePath, ByteCodeClassScanner classScanner, JarByteCodeMatcher matcher) { /* if (isNullScanPath(path)) { return; } */ //ZipFile zipFile...
class class_name[name] begin[{] method[scanForJarClasses, return_type[void], modifier[private], parameter[path, packagePath, classScanner, matcher]] begin[{] TryStatement(block=[TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None,...
Keyword[private] Keyword[void] identifier[scanForJarClasses] operator[SEP] identifier[Path] identifier[path] , identifier[String] identifier[packagePath] , identifier[ByteCodeClassScanner] identifier[classScanner] , identifier[JarByteCodeMatcher] identifier[matcher] operator[SEP] { Keyword[try] operator[SEP] ...
public void start( final BiConsumer< EvolutionResult<PolygonGene, Double>, EvolutionResult<PolygonGene, Double>> callback ) { final Thread thread = new Thread(() -> { final MinMax<EvolutionResult<PolygonGene, Double>> best = MinMax.of(); _engine.stream() .limit(result -> !Thread.currentThread().is...
class class_name[name] begin[{] method[start, return_type[void], modifier[public], parameter[callback]] begin[{] local_variable[type[Thread], thread] call[thread.start, parameter[]] assign[member[._thread], member[.thread]] end[}] END[}]
Keyword[public] Keyword[void] identifier[start] operator[SEP] Keyword[final] identifier[BiConsumer] operator[<] identifier[EvolutionResult] operator[<] identifier[PolygonGene] , identifier[Double] operator[>] , identifier[EvolutionResult] operator[<] identifier[PolygonGene] , identifier[Double] operator[>] operator[...
public byte[] toBytesFull(boolean withHeader) { int size = getFullStorageSize(numBuckets); if (withHeader) { size += SERDE_HEADER_SIZE; } ByteBuffer buf = ByteBuffer.allocate(size); writeByteBufferFull(buf, withHeader); return buf.array(); }
class class_name[name] begin[{] method[toBytesFull, return_type[type[byte]], modifier[public], parameter[withHeader]] begin[{] local_variable[type[int], size] if[member[.withHeader]] begin[{] assign[member[.size], member[.SERDE_HEADER_SIZE]] else begin[{]...
Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[toBytesFull] operator[SEP] Keyword[boolean] identifier[withHeader] operator[SEP] { Keyword[int] identifier[size] operator[=] identifier[getFullStorageSize] operator[SEP] identifier[numBuckets] operator[SEP] operator[SEP] Keyword[if] operator[SE...
final void accept(final MethodWriter methodWriter) { // Compute the number of locals, ignoring TOP types that are just after a LONG or a DOUBLE, and // all trailing TOP types. int[] localTypes = inputLocals; int numLocal = 0; int numTrailingTop = 0; int i = 0; while (i < localTypes.length) {...
class class_name[name] begin[{] method[accept, return_type[void], modifier[final], parameter[methodWriter]] begin[{] local_variable[type[int], localTypes] local_variable[type[int], numLocal] local_variable[type[int], numTrailingTop] local_variable[type[int], i] w...
Keyword[final] Keyword[void] identifier[accept] operator[SEP] Keyword[final] identifier[MethodWriter] identifier[methodWriter] operator[SEP] { Keyword[int] operator[SEP] operator[SEP] identifier[localTypes] operator[=] identifier[inputLocals] operator[SEP] Keyword[int] identifier[numLocal] operator[=] Other[0] o...
public boolean accessDenied(InetAddress remoteAddr) { String hostname = null; //F184719 // check the inclusion lists first to see if the client matches if (includeAccess.getActive() || includeAccessNames.getActive()) { boolean closeSocket = true; if (includeAccess.getA...
class class_name[name] begin[{] method[accessDenied, return_type[type[boolean]], modifier[public], parameter[remoteAddr]] begin[{] local_variable[type[String], hostname] if[binary_operation[call[includeAccess.getActive, parameter[]], ||, call[includeAccessNames.getActive, parameter[]]]]...
Keyword[public] Keyword[boolean] identifier[accessDenied] operator[SEP] identifier[InetAddress] identifier[remoteAddr] operator[SEP] { identifier[String] identifier[hostname] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[includeAccess] operator[SEP] identifier[getActive] operator[SEP...
public ElemTemplateElement appendChild(ElemTemplateElement newChild) { int type = ((ElemTemplateElement) newChild).getXSLToken(); if (Constants.ELEMNAME_WITHPARAM == type) { setParamElem((ElemWithParam) newChild); } // You still have to append, because this element can // contain a fo...
class class_name[name] begin[{] method[appendChild, return_type[type[ElemTemplateElement]], modifier[public], parameter[newChild]] begin[{] local_variable[type[int], type] if[binary_operation[member[Constants.ELEMNAME_WITHPARAM], ==, member[.type]]] begin[{] call...
Keyword[public] identifier[ElemTemplateElement] identifier[appendChild] operator[SEP] identifier[ElemTemplateElement] identifier[newChild] operator[SEP] { Keyword[int] identifier[type] operator[=] operator[SEP] operator[SEP] identifier[ElemTemplateElement] operator[SEP] identifier[newChild] operator[SEP] operato...
public void processRequest(RequestEvent request) { Request req_msg = request.getRequest(); ToHeader to = (ToHeader) req_msg.getHeader(ToHeader.NAME); SipContact my_contact_info = new SipContact(); synchronized (contactLock) { my_contact_info.setContactHeader((ContactHeader) (contactInfo.getContac...
class class_name[name] begin[{] method[processRequest, return_type[void], modifier[public], parameter[request]] begin[{] local_variable[type[Request], req_msg] local_variable[type[ToHeader], to] local_variable[type[SipContact], my_contact_info] SYNCHRONIZED[member[.conta...
Keyword[public] Keyword[void] identifier[processRequest] operator[SEP] identifier[RequestEvent] identifier[request] operator[SEP] { identifier[Request] identifier[req_msg] operator[=] identifier[request] operator[SEP] identifier[getRequest] operator[SEP] operator[SEP] operator[SEP] identifier[ToHeader] identifie...
public Observable<VirtualNetworkInner> createOrUpdateAsync(String resourceGroupName, String virtualNetworkName, VirtualNetworkInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, parameters).map(new Func1<ServiceResponse<VirtualNetworkInner>, VirtualNetworkInn...
class class_name[name] begin[{] method[createOrUpdateAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, virtualNetworkName, parameters]] begin[{] return[call[.createOrUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.virtualNetworkName], mem...
Keyword[public] identifier[Observable] operator[<] identifier[VirtualNetworkInner] operator[>] identifier[createOrUpdateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[virtualNetworkName] , identifier[VirtualNetworkInner] identifier[parameters] operator[SEP] { ...
public void setCertificateStatuses(java.util.Collection<String> certificateStatuses) { if (certificateStatuses == null) { this.certificateStatuses = null; return; } this.certificateStatuses = new java.util.ArrayList<String>(certificateStatuses); }
class class_name[name] begin[{] method[setCertificateStatuses, return_type[void], modifier[public], parameter[certificateStatuses]] begin[{] if[binary_operation[member[.certificateStatuses], ==, literal[null]]] begin[{] assign[THIS[member[None.certificateStatuses]], lite...
Keyword[public] Keyword[void] identifier[setCertificateStatuses] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[certificateStatuses] operator[SEP] { Keyword[if] operator[SEP] identifier[certificateStatuses] ...
public com.google.api.ads.admanager.axis.v201808.ForecastBreakdownEntry[] getBreakdownEntries() { return breakdownEntries; }
class class_name[name] begin[{] method[getBreakdownEntries, return_type[type[com]], modifier[public], parameter[]] begin[{] return[member[.breakdownEntries]] end[}] END[}]
Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201808] operator[SEP] identifier[ForecastBreakdownEntry] operator[SEP] operator[SEP] identifier[getBre...
public Pager<SystemHook> getSystemHooks(int itemsPerPage) throws GitLabApiException { return (new Pager<SystemHook>(this, SystemHook.class, itemsPerPage, null, "hooks")); }
class class_name[name] begin[{] method[getSystemHooks, return_type[type[Pager]], modifier[public], parameter[itemsPerPage]] begin[{] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qu...
Keyword[public] identifier[Pager] operator[<] identifier[SystemHook] operator[>] identifier[getSystemHooks] operator[SEP] Keyword[int] identifier[itemsPerPage] operator[SEP] Keyword[throws] identifier[GitLabApiException] { Keyword[return] operator[SEP] Keyword[new] identifier[Pager] operator[<] identifier[System...
public byte[] toByteArray() { final int preLongs, outBytes; final boolean empty = itemsSeen_ == 0; final int numItems = (int) Math.min(reservoirSize_, itemsSeen_); if (empty) { preLongs = 1; outBytes = 8; } else { preLongs = Family.RESERVOIR.getMaxPreLongs(); outBytes = (pre...
class class_name[name] begin[{] method[toByteArray, return_type[type[byte]], modifier[public], parameter[]] begin[{] local_variable[type[int], preLongs] local_variable[type[boolean], empty] local_variable[type[int], numItems] if[member[.empty]] begin[{] ...
Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] { Keyword[final] Keyword[int] identifier[preLongs] , identifier[outBytes] operator[SEP] Keyword[final] Keyword[boolean] identifier[empty] operator[=] identifier[itemsSeen_] operator[==] Other[0] operato...
static void extractGenericsConnections(Map<String, GenericsType> connections, ClassNode type, ClassNode target) { if (target==null || type==target || !isUsingGenericsOrIsArrayUsingGenerics(target)) return; if (type==UNKNOWN_PARAMETER_TYPE) return; if (type.isArray() && target.isArray()) { ...
class class_name[name] begin[{] method[extractGenericsConnections, return_type[void], modifier[static], parameter[connections, type, target]] begin[{] if[binary_operation[binary_operation[binary_operation[member[.target], ==, literal[null]], ||, binary_operation[member[.type], ==, member[.targe...
Keyword[static] Keyword[void] identifier[extractGenericsConnections] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[GenericsType] operator[>] identifier[connections] , identifier[ClassNode] identifier[type] , identifier[ClassNode] identifier[target] operator[SEP] { Keyword[if] opera...
private void initContextMenu() { m_contextMenu.removeItems(); MenuItem main = m_contextMenu.addItem("", null); main.setIcon(FontOpenCms.CONTEXT_MENU); main.setDescription(CmsVaadinUtils.getMessageText(Messages.GUI_MENU_TITLE_0)); CmsContextMenuTreeBuilder treeBuilder = new CmsCo...
class class_name[name] begin[{] method[initContextMenu, return_type[void], modifier[private], parameter[]] begin[{] call[m_contextMenu.removeItems, parameter[]] local_variable[type[MenuItem], main] call[main.setIcon, parameter[member[FontOpenCms.CONTEXT_MENU]]] ...
Keyword[private] Keyword[void] identifier[initContextMenu] operator[SEP] operator[SEP] { identifier[m_contextMenu] operator[SEP] identifier[removeItems] operator[SEP] operator[SEP] operator[SEP] identifier[MenuItem] identifier[main] operator[=] identifier[m_contextMenu] operator[SEP] identifier[addItem] operator...
@Override public T remove(T entity) { EntityManager entityManager = getEntityManager(); if (entityManager.contains(entity)) { entityManager.remove(entity); } else { entityManager.remove(entityManager.merge(entity)); } return entity; }
class class_name[name] begin[{] method[remove, return_type[type[T]], modifier[public], parameter[entity]] begin[{] local_variable[type[EntityManager], entityManager] if[call[entityManager.contains, parameter[member[.entity]]]] begin[{] call[entityManager.remove, ...
annotation[@] identifier[Override] Keyword[public] identifier[T] identifier[remove] operator[SEP] identifier[T] identifier[entity] operator[SEP] { identifier[EntityManager] identifier[entityManager] operator[=] identifier[getEntityManager] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] ident...
public Paint getTextBorderPaint(CommonControlState type, boolean inToolbar) { if (type == CommonControlState.DISABLED) { return textBorderDisabled; } else if (inToolbar) { return textBorderEnabledToolbar; } else { return textBorderEnabled; } }
class class_name[name] begin[{] method[getTextBorderPaint, return_type[type[Paint]], modifier[public], parameter[type, inToolbar]] begin[{] if[binary_operation[member[.type], ==, member[CommonControlState.DISABLED]]] begin[{] return[member[.textBorderDisabled]] else begin[{]...
Keyword[public] identifier[Paint] identifier[getTextBorderPaint] operator[SEP] identifier[CommonControlState] identifier[type] , Keyword[boolean] identifier[inToolbar] operator[SEP] { Keyword[if] operator[SEP] identifier[type] operator[==] identifier[CommonControlState] operator[SEP] identifier[DISABLED] operat...
@Override public Object initializeTransaction(long txid, Object prevMetadata, Object currMetadata) { if (logger.isDebugEnabled() == true) { String logFormat = "initializeTransaction : txid={0}, prevMetadata={1}, currMetadata={2}"; logger.debug(MessageFormat.format(logForm...
class class_name[name] begin[{] method[initializeTransaction, return_type[type[Object]], modifier[public], parameter[txid, prevMetadata, currMetadata]] begin[{] if[binary_operation[call[logger.isDebugEnabled, parameter[]], ==, literal[true]]] begin[{] local_variable[type[String], lo...
annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[initializeTransaction] operator[SEP] Keyword[long] identifier[txid] , identifier[Object] identifier[prevMetadata] , identifier[Object] identifier[currMetadata] operator[SEP] { Keyword[if] operator[SEP] identifier[logger] operator[...
public static long xorCount(OpenBitSet a, OpenBitSet b) { long tot = BitUtil.pop_xor( a.bits, b.bits, 0, Math.min( a.wlen, b.wlen ) ); if (a.wlen < b.wlen) { tot += BitUtil.pop_array( b.bits, a.wlen, b.wlen - a.wlen ); } else if (a.wlen > b.wlen) { tot += BitUtil.pop_arra...
class class_name[name] begin[{] method[xorCount, return_type[type[long]], modifier[public static], parameter[a, b]] begin[{] local_variable[type[long], tot] if[binary_operation[member[a.wlen], <, member[b.wlen]]] begin[{] assign[member[.tot], call[BitUtil.pop_arr...
Keyword[public] Keyword[static] Keyword[long] identifier[xorCount] operator[SEP] identifier[OpenBitSet] identifier[a] , identifier[OpenBitSet] identifier[b] operator[SEP] { Keyword[long] identifier[tot] operator[=] identifier[BitUtil] operator[SEP] identifier[pop_xor] operator[SEP] identifier[a] operator[SEP] i...
private Block convertToDeepTree(Block sourceTree, String iconName) { XDOM targetTree = new XDOM(Collections.<Block>emptyList()); Block pointer = targetTree; for (Block block : sourceTree.getChildren()) { pointer.addChild(block); pointer = block; } // A...
class class_name[name] begin[{] method[convertToDeepTree, return_type[type[Block]], modifier[private], parameter[sourceTree, iconName]] begin[{] local_variable[type[XDOM], targetTree] local_variable[type[Block], pointer] ForStatement(body=BlockStatement(label=None, statements=[Statement...
Keyword[private] identifier[Block] identifier[convertToDeepTree] operator[SEP] identifier[Block] identifier[sourceTree] , identifier[String] identifier[iconName] operator[SEP] { identifier[XDOM] identifier[targetTree] operator[=] Keyword[new] identifier[XDOM] operator[SEP] identifier[Collections] operator[SEP] ...
public T withCroppedThumbnail(String path, String name, double scale, double cropWidth, double cropHeight) { File thumbnailFile = new File(path.toString(), name); if(!Files.exists(Paths.get(path))) { thumbnailFile.mkdirs(); } thumbnailImage=ImageProcessor.cropAndScale(image,...
class class_name[name] begin[{] method[withCroppedThumbnail, return_type[type[T]], modifier[public], parameter[path, name, scale, cropWidth, cropHeight]] begin[{] local_variable[type[File], thumbnailFile] if[call[Files.exists, parameter[call[Paths.get, parameter[member[.path]]]]]] begin...
Keyword[public] identifier[T] identifier[withCroppedThumbnail] operator[SEP] identifier[String] identifier[path] , identifier[String] identifier[name] , Keyword[double] identifier[scale] , Keyword[double] identifier[cropWidth] , Keyword[double] identifier[cropHeight] operator[SEP] { identifier[File] identifi...
public static CaptureSearchResult parseCDXLineFlexFast(String line) { CaptureSearchResult result = new FastCaptureSearchResult(); return parseCDXLineFlex(line, result); }
class class_name[name] begin[{] method[parseCDXLineFlexFast, return_type[type[CaptureSearchResult]], modifier[public static], parameter[line]] begin[{] local_variable[type[CaptureSearchResult], result] return[call[.parseCDXLineFlex, parameter[member[.line], member[.result]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[CaptureSearchResult] identifier[parseCDXLineFlexFast] operator[SEP] identifier[String] identifier[line] operator[SEP] { identifier[CaptureSearchResult] identifier[result] operator[=] Keyword[new] identifier[FastCaptureSearchResult] operator[SEP] operator[SEP] operator[S...
private void standardMove(KernelPoint destination, KernelPoint source) { destination.InvK = source.InvK; destination.InvKExpanded = source.InvKExpanded; destination.K = source.K; destination.KExpanded = source.KExpanded; }
class class_name[name] begin[{] method[standardMove, return_type[void], modifier[private], parameter[destination, source]] begin[{] assign[member[destination.InvK], member[source.InvK]] assign[member[destination.InvKExpanded], member[source.InvKExpanded]] assign[...
Keyword[private] Keyword[void] identifier[standardMove] operator[SEP] identifier[KernelPoint] identifier[destination] , identifier[KernelPoint] identifier[source] operator[SEP] { identifier[destination] operator[SEP] identifier[InvK] operator[=] identifier[source] operator[SEP] identifier[InvK] operator[SEP] id...
@Override <T> T parseRemaining(Class<T> declaredType) throws Exception { // the array and version has already been read overrideBasePackage = declaredType.getPackage().getName() + "."; // ref count + class map parseClassDescriptions(); // parse Object parsed = parseO...
class class_name[name] begin[{] method[parseRemaining, return_type[type[T]], modifier[default], parameter[declaredType]] begin[{] assign[member[.overrideBasePackage], binary_operation[call[declaredType.getPackage, parameter[]], +, literal["."]]] call[.parseClassDescriptions, par...
annotation[@] identifier[Override] operator[<] identifier[T] operator[>] identifier[T] identifier[parseRemaining] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[declaredType] operator[SEP] Keyword[throws] identifier[Exception] { identifier[overrideBasePackage] operator[=] identi...
public static int calculateInSampleSize(int originWidth, int originHeight, int reqWidth, int reqHeight) { int inSampleSize = 1; if (reqHeight <= 0 || reqHeight <= 0 || reqHeight == Integer.MAX_VALUE || reqWidth == Integer.MAX_VALUE) { return inSampleSize; } if (originWidth...
class class_name[name] begin[{] method[calculateInSampleSize, return_type[type[int]], modifier[public static], parameter[originWidth, originHeight, reqWidth, reqHeight]] begin[{] local_variable[type[int], inSampleSize] if[binary_operation[binary_operation[binary_operation[binary_operati...
Keyword[public] Keyword[static] Keyword[int] identifier[calculateInSampleSize] operator[SEP] Keyword[int] identifier[originWidth] , Keyword[int] identifier[originHeight] , Keyword[int] identifier[reqWidth] , Keyword[int] identifier[reqHeight] operator[SEP] { Keyword[int] identifier[inSampleSize] operator[=] O...
public boolean matchContentType(String contentTypeRegex) { if (contentTypeRegex == null) { return contentType() == null; } return Pattern.matches(contentTypeRegex, contentType()); }
class class_name[name] begin[{] method[matchContentType, return_type[type[boolean]], modifier[public], parameter[contentTypeRegex]] begin[{] if[binary_operation[member[.contentTypeRegex], ==, literal[null]]] begin[{] return[binary_operation[call[.contentType, parameter[]], ==, liter...
Keyword[public] Keyword[boolean] identifier[matchContentType] operator[SEP] identifier[String] identifier[contentTypeRegex] operator[SEP] { Keyword[if] operator[SEP] identifier[contentTypeRegex] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[contentType] operator[SEP] operator[SEP...
public static Object removeListener(Object bag, Object listener) { if (listener == null) throw new IllegalArgumentException(); if (listener instanceof Object[]) throw new IllegalArgumentException(); if (bag == listener) { bag = null; } else if (bag instanceof Object[]) {...
class class_name[name] begin[{] method[removeListener, return_type[type[Object]], modifier[public static], parameter[bag, listener]] begin[{] if[binary_operation[member[.listener], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_argu...
Keyword[public] Keyword[static] identifier[Object] identifier[removeListener] operator[SEP] identifier[Object] identifier[bag] , identifier[Object] identifier[listener] operator[SEP] { Keyword[if] operator[SEP] identifier[listener] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[Il...