code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public static Object unflatten(Object array, int[] dimensions) { Class<?> type = getType(array); return unflatten(type, array, dimensions, 0); }
class class_name[name] begin[{] method[unflatten, return_type[type[Object]], modifier[public static], parameter[array, dimensions]] begin[{] local_variable[type[Class], type] return[call[.unflatten, parameter[member[.type], member[.array], member[.dimensions], literal[0]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Object] identifier[unflatten] operator[SEP] identifier[Object] identifier[array] , Keyword[int] operator[SEP] operator[SEP] identifier[dimensions] operator[SEP] { identifier[Class] operator[<] operator[?] operator[>] identifier[type] operator[=] identifier[getType] ope...
@SuppressWarnings("squid:S3752") // backwards compatability: multiple methods required @RequestMapping( method = {RequestMethod.GET, RequestMethod.POST}, value = "/scripts/{name}/start") public void startScript( @PathVariable("name") String scriptName, @RequestParam Map<String, Object> param...
class class_name[name] begin[{] method[startScript, return_type[void], modifier[public], parameter[scriptName, parameters, response]] begin[{] local_variable[type[String], scriptJobExecutionHref] call[response.sendRedirect, parameter[call[jobsController.createJobExecutionViewHref, param...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[RequestMapping] operator[SEP] identifier[method] operator[=] { identifier[RequestMethod] operator[SEP] identifier[GET] , identifier[RequestMethod] operator[SEP] identifier[POST] } , identifier[val...
public static String getProperty(final Map map, final String key, final String defaultValue) { Object val = map.get(key); return (val instanceof String) ? (String) val : defaultValue; }
class class_name[name] begin[{] method[getProperty, return_type[type[String]], modifier[public static], parameter[map, key, defaultValue]] begin[{] local_variable[type[Object], val] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=val, postfix_operators=[], pre...
Keyword[public] Keyword[static] identifier[String] identifier[getProperty] operator[SEP] Keyword[final] identifier[Map] identifier[map] , Keyword[final] identifier[String] identifier[key] , Keyword[final] identifier[String] identifier[defaultValue] operator[SEP] { identifier[Object] identifier[val] operator[=]...
public void remove(String key) { if (key == null) { return; } Map<String, String> oldMap = copyOnThreadLocal.get(); if (oldMap == null) return; Integer lastOp = getAndSetLastOperation(WRITE_OPERATION); if (wasLastOpReadOrNull(lastOp)) { Map<String, String> newMap = duplicateAndInse...
class class_name[name] begin[{] method[remove, return_type[void], modifier[public], parameter[key]] begin[{] if[binary_operation[member[.key], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[Map], oldMap] ...
Keyword[public] Keyword[void] identifier[remove] operator[SEP] identifier[String] identifier[key] operator[SEP] { Keyword[if] operator[SEP] identifier[key] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } identifier[Map] operator[<] identifier[String] , identifie...
@Override public void visitClassContext(ClassContext classContext) { JavaClass cls = classContext.getJavaClass(); fieldStatus = FieldStatus.NONE; String packageName = cls.getPackageName(); if (packageName.isEmpty()) { bugReporter.reportBug( new BugInstance(this, BugType.IMC_IMMATURE_CLASS_NO_PACKAGE.n...
class class_name[name] begin[{] method[visitClassContext, return_type[void], modifier[public], parameter[classContext]] begin[{] local_variable[type[JavaClass], cls] assign[member[.fieldStatus], member[FieldStatus.NONE]] local_variable[type[String], packageName] ...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[visitClassContext] operator[SEP] identifier[ClassContext] identifier[classContext] operator[SEP] { identifier[JavaClass] identifier[cls] operator[=] identifier[classContext] operator[SEP] identifier[getJavaClass] operator[SEP] operator[S...
public void setLinkedId(Long i) { if ((i == null) || (i < -128 || i > 127)) { throw new IllegalArgumentException("Invoke ID our of range: <-128,127>: " + i); } this.linkedId = i; }
class class_name[name] begin[{] method[setLinkedId, return_type[void], modifier[public], parameter[i]] begin[{] if[binary_operation[binary_operation[member[.i], ==, literal[null]], ||, binary_operation[binary_operation[member[.i], <, literal[128]], ||, binary_operation[member[.i], >, literal[12...
Keyword[public] Keyword[void] identifier[setLinkedId] operator[SEP] identifier[Long] identifier[i] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[i] operator[==] Other[null] operator[SEP] operator[||] operator[SEP] identifier[i] operator[<] operator[-] Other[128] operator[||] identifier[i] op...
@Override public void removeObserver(final Observer<S, T> observer) { synchronized (OBSERVER_LOCK) { observers.remove(observer); } }
class class_name[name] begin[{] method[removeObserver, return_type[void], modifier[public], parameter[observer]] begin[{] SYNCHRONIZED[member[.OBSERVER_LOCK]] BEGIN[{] call[observers.remove, parameter[member[.observer]]] END[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[removeObserver] operator[SEP] Keyword[final] identifier[Observer] operator[<] identifier[S] , identifier[T] operator[>] identifier[observer] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[OBSERVER_LOCK] operator[SEP] { ...
@Override public void copyFrom(final CopyFrom obj) { final EntryInformationImpl info = (EntryInformationImpl) obj; setAuthor(info.getAuthor()); setBlock(info.getBlock()); if (info.getDuration() != null) { setDuration(new Duration(info.getDuration().getMilliseconds())); ...
class class_name[name] begin[{] method[copyFrom, return_type[void], modifier[public], parameter[obj]] begin[{] local_variable[type[EntryInformationImpl], info] call[.setAuthor, parameter[call[info.getAuthor, parameter[]]]] call[.setBlock, parameter[call[info.getBlock, pa...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[copyFrom] operator[SEP] Keyword[final] identifier[CopyFrom] identifier[obj] operator[SEP] { Keyword[final] identifier[EntryInformationImpl] identifier[info] operator[=] operator[SEP] identifier[EntryInformationImpl] operator[SEP] identif...
public Method getMethod(MethodGen methodGen) { Method[] methodList = jclass.getMethods(); for (Method method : methodList) { if (method.getName().equals(methodGen.getName()) && method.getSignature().equals(methodGen.getSignature()) && method.getAccessFlags() == methodGen....
class class_name[name] begin[{] method[getMethod, return_type[type[Method]], modifier[public], parameter[methodGen]] begin[{] local_variable[type[Method], methodList] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl...
Keyword[public] identifier[Method] identifier[getMethod] operator[SEP] identifier[MethodGen] identifier[methodGen] operator[SEP] { identifier[Method] operator[SEP] operator[SEP] identifier[methodList] operator[=] identifier[jclass] operator[SEP] identifier[getMethods] operator[SEP] operator[SEP] operator[SEP] Ke...
private void inflateContentView() { contentContainer = rootView.findViewById(R.id.content_container); contentContainer.removeAllViews(); if (customView != null) { contentContainer.setVisibility(View.VISIBLE); contentContainer.addView(customView); } else if (custo...
class class_name[name] begin[{] method[inflateContentView, return_type[void], modifier[private], parameter[]] begin[{] assign[member[.contentContainer], call[rootView.findViewById, parameter[member[R.id.content_container]]]] call[contentContainer.removeAllViews, parameter[]] ...
Keyword[private] Keyword[void] identifier[inflateContentView] operator[SEP] operator[SEP] { identifier[contentContainer] operator[=] identifier[rootView] operator[SEP] identifier[findViewById] operator[SEP] identifier[R] operator[SEP] identifier[id] operator[SEP] identifier[content_container] operator[SEP] opera...
@Override public long next(){ long l; do{ l = super.next(); } while (l >= loopSpot); return offset + l % range; }
class class_name[name] begin[{] method[next, return_type[type[long]], modifier[public], parameter[]] begin[{] local_variable[type[long], l] do[binary_operation[member[.l], >=, member[.loopSpot]]] begin[{] assign[member[.l], SuperMethodInvocation(arguments=[], mem...
annotation[@] identifier[Override] Keyword[public] Keyword[long] identifier[next] operator[SEP] operator[SEP] { Keyword[long] identifier[l] operator[SEP] Keyword[do] { identifier[l] operator[=] Keyword[super] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] } Keyw...
public static final Function<String,String> replaceLast(final String regex, final String replacement) { return new Replace(regex, replacement, ReplaceType.LAST); }
class class_name[name] begin[{] method[replaceLast, return_type[type[Function]], modifier[final public static], parameter[regex, replacement]] begin[{] return[ClassCreator(arguments=[MemberReference(member=regex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(memb...
Keyword[public] Keyword[static] Keyword[final] identifier[Function] operator[<] identifier[String] , identifier[String] operator[>] identifier[replaceLast] operator[SEP] Keyword[final] identifier[String] identifier[regex] , Keyword[final] identifier[String] identifier[replacement] operator[SEP] { Keyword[retur...
public static CliOutput executeCommandLine(final Commandline cli, final InputStream inputStream, final int timeoutInSeconds) { return executeCommandLine(cli, null, inputStream, timeoutInSeconds); }
class class_name[name] begin[{] method[executeCommandLine, return_type[type[CliOutput]], modifier[public static], parameter[cli, inputStream, timeoutInSeconds]] begin[{] return[call[.executeCommandLine, parameter[member[.cli], literal[null], member[.inputStream], member[.timeoutInSeconds]]]] end[}]...
Keyword[public] Keyword[static] identifier[CliOutput] identifier[executeCommandLine] operator[SEP] Keyword[final] identifier[Commandline] identifier[cli] , Keyword[final] identifier[InputStream] identifier[inputStream] , Keyword[final] Keyword[int] identifier[timeoutInSeconds] operator[SEP] { Keyword[return] i...
protected void unlockAll(boolean closingSession) throws SIResourceException, SIMPMessageNotLockedException, SISessionDroppedException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "unlockAll", new Object[]{new Integer(hashCode()),this}); int unlockedMessages = 0; ...
class class_name[name] begin[{] method[unlockAll, return_type[void], modifier[protected], parameter[closingSession]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[me...
Keyword[protected] Keyword[void] identifier[unlockAll] operator[SEP] Keyword[boolean] identifier[closingSession] operator[SEP] Keyword[throws] identifier[SIResourceException] , identifier[SIMPMessageNotLockedException] , identifier[SISessionDroppedException] { Keyword[if] operator[SEP] identifier[TraceComponen...
@Override protected void dscal(long N, double a, INDArray X, int incx) { cblas_dscal((int) N, a, (DoublePointer) X.data().addressPointer(), incx); }
class class_name[name] begin[{] method[dscal, return_type[void], modifier[protected], parameter[N, a, X, incx]] begin[{] call[.cblas_dscal, parameter[Cast(expression=MemberReference(member=N, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], nam...
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[dscal] operator[SEP] Keyword[long] identifier[N] , Keyword[double] identifier[a] , identifier[INDArray] identifier[X] , Keyword[int] identifier[incx] operator[SEP] { identifier[cblas_dscal] operator[SEP] operator[SEP] Keyword[int] ...
public GetDiskSnapshotsResult withDiskSnapshots(DiskSnapshot... diskSnapshots) { if (this.diskSnapshots == null) { setDiskSnapshots(new java.util.ArrayList<DiskSnapshot>(diskSnapshots.length)); } for (DiskSnapshot ele : diskSnapshots) { this.diskSnapshots.add(ele); ...
class class_name[name] begin[{] method[withDiskSnapshots, return_type[type[GetDiskSnapshotsResult]], modifier[public], parameter[diskSnapshots]] begin[{] if[binary_operation[THIS[member[None.diskSnapshots]], ==, literal[null]]] begin[{] call[.setDiskSnapshots, parameter[...
Keyword[public] identifier[GetDiskSnapshotsResult] identifier[withDiskSnapshots] operator[SEP] identifier[DiskSnapshot] operator[...] identifier[diskSnapshots] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[diskSnapshots] operator[==] Other[null] operator[SEP] { ident...
@PublicEvolving public QueryableStateStream<KEY, T> asQueryableState(String queryableStateName) { ValueStateDescriptor<T> valueStateDescriptor = new ValueStateDescriptor<T>( UUID.randomUUID().toString(), getType()); return asQueryableState(queryableStateName, valueStateDescriptor); }
class class_name[name] begin[{] method[asQueryableState, return_type[type[QueryableStateStream]], modifier[public], parameter[queryableStateName]] begin[{] local_variable[type[ValueStateDescriptor], valueStateDescriptor] return[call[.asQueryableState, parameter[member[.queryableStateName], memb...
annotation[@] identifier[PublicEvolving] Keyword[public] identifier[QueryableStateStream] operator[<] identifier[KEY] , identifier[T] operator[>] identifier[asQueryableState] operator[SEP] identifier[String] identifier[queryableStateName] operator[SEP] { identifier[ValueStateDescriptor] operator[<] identifier[T...
public StepThreadExecutionEntity updateStepExecutionOnRecovery(PersistenceServiceUnit psu, final long stepExecutionId, final BatchStatus newStepBatchStatus, ...
class class_name[name] begin[{] method[updateStepExecutionOnRecovery, return_type[type[StepThreadExecutionEntity]], modifier[public], parameter[psu, stepExecutionId, newStepBatchStatus, newStepExitStatus, endTime]] begin[{] local_variable[type[EntityManager], em] TryStatement(block=[ReturnState...
Keyword[public] identifier[StepThreadExecutionEntity] identifier[updateStepExecutionOnRecovery] operator[SEP] identifier[PersistenceServiceUnit] identifier[psu] , Keyword[final] Keyword[long] identifier[stepExecutionId] , Keyword[final] identifier[BatchStatus] identifier[newStepBatchStatus] , Keyword[final] identifi...
private void copyType(UserAgentInfo retObj, Long idBrowser) { try { lock.lock(); BrowserEntry be = browserMap.get(idBrowser); if (be != null) { Long type = be.getType(); if (type != null) { String typeString = browserTypeMa...
class class_name[name] begin[{] method[copyType, return_type[void], modifier[private], parameter[retObj, idBrowser]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=lock, postfix_operators=[], prefix_operators=[], qualifier=lock, selectors=[], type_argu...
Keyword[private] Keyword[void] identifier[copyType] operator[SEP] identifier[UserAgentInfo] identifier[retObj] , identifier[Long] identifier[idBrowser] operator[SEP] { Keyword[try] { identifier[lock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] identifier[BrowserEntry] ide...
public File getFile(VirtualFile mountPoint, VirtualFile target) { if (mountPoint.equals(target)) { return realRoot; } else if (NEEDS_CONVERSION) { return new File(realRoot, target.getPathNameRelativeTo(mountPoint).replace('/', File.separatorChar)); } else { re...
class class_name[name] begin[{] method[getFile, return_type[type[File]], modifier[public], parameter[mountPoint, target]] begin[{] if[call[mountPoint.equals, parameter[member[.target]]]] begin[{] return[member[.realRoot]] else begin[{] if[member[.NEEDS_CONVERSION...
Keyword[public] identifier[File] identifier[getFile] operator[SEP] identifier[VirtualFile] identifier[mountPoint] , identifier[VirtualFile] identifier[target] operator[SEP] { Keyword[if] operator[SEP] identifier[mountPoint] operator[SEP] identifier[equals] operator[SEP] identifier[target] operator[SEP] operator...
public boolean contains(C value) { checkNotNull(value); // let this throw CCE if there is some trickery going on return lowerBound.isLessThan(value) && !upperBound.isLessThan(value); }
class class_name[name] begin[{] method[contains, return_type[type[boolean]], modifier[public], parameter[value]] begin[{] call[.checkNotNull, parameter[member[.value]]] return[binary_operation[call[lowerBound.isLessThan, parameter[member[.value]]], &&, call[upperBound.isLessThan, parame...
Keyword[public] Keyword[boolean] identifier[contains] operator[SEP] identifier[C] identifier[value] operator[SEP] { identifier[checkNotNull] operator[SEP] identifier[value] operator[SEP] operator[SEP] Keyword[return] identifier[lowerBound] operator[SEP] identifier[isLessThan] operator[SEP] identifier[value] oper...
public static void explode (@Nonnull final String sSep, @Nullable final String sElements, @Nonnull final Consumer <? super String> aConsumer) { explode (sSep, sElements, -1, aConsumer); }
class class_name[name] begin[{] method[explode, return_type[void], modifier[public static], parameter[sSep, sElements, aConsumer]] begin[{] call[.explode, parameter[member[.sSep], member[.sElements], literal[1], member[.aConsumer]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[explode] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[String] identifier[sSep] , annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[sElements] , annotation[@] identifier[Nonnull] Keyword[final] identifie...
private static String findCurrentClientName(final J2EContext webContext) { val pm = new ProfileManager<>(webContext, webContext.getSessionStore()); val profile = pm.get(true); return profile.map(CommonProfile::getClientName).orElse(null); }
class class_name[name] begin[{] method[findCurrentClientName, return_type[type[String]], modifier[private static], parameter[webContext]] begin[{] local_variable[type[val], pm] local_variable[type[val], profile] return[call[profile.map, parameter[MethodReference(expression=MemberReferen...
Keyword[private] Keyword[static] identifier[String] identifier[findCurrentClientName] operator[SEP] Keyword[final] identifier[J2EContext] identifier[webContext] operator[SEP] { identifier[val] identifier[pm] operator[=] Keyword[new] identifier[ProfileManager] operator[<] operator[>] operator[SEP] identifier[webC...
public void flushPending() throws SAXException { if (m_needToCallStartDocument) { startDocumentInternal(); m_needToCallStartDocument = false; } if (m_elemContext.m_startTagOpen) { closeStartTag(); ...
class class_name[name] begin[{] method[flushPending, return_type[void], modifier[public], parameter[]] begin[{] if[member[.m_needToCallStartDocument]] begin[{] call[.startDocumentInternal, parameter[]] assign[member[.m_needToCallStartDocument], li...
Keyword[public] Keyword[void] identifier[flushPending] operator[SEP] operator[SEP] Keyword[throws] identifier[SAXException] { Keyword[if] operator[SEP] identifier[m_needToCallStartDocument] operator[SEP] { identifier[startDocumentInternal] operator[SEP] operator[SEP] operator[SEP] identifier[m_needToC...
private static void readFully(final DataInput input, final short[] shorts) throws IOException { if (input instanceof ImageInputStream) { // Optimization for ImageInputStreams, read all in one go ((ImageInputStream) input).readFully(shorts, 0, shorts.length); } else { ...
class class_name[name] begin[{] method[readFully, return_type[void], modifier[private static], parameter[input, shorts]] begin[{] if[binary_operation[member[.input], instanceof, type[ImageInputStream]]] begin[{] Cast(expression=MemberReference(member=input, postfix_opera...
Keyword[private] Keyword[static] Keyword[void] identifier[readFully] operator[SEP] Keyword[final] identifier[DataInput] identifier[input] , Keyword[final] Keyword[short] operator[SEP] operator[SEP] identifier[shorts] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[in...
@Beta public static OptionalDouble findLast(DoubleStream stream) { // findLast(Stream) does some allocation, so we might as well box some more java.util.Optional<Double> boxedLast = findLast(stream.boxed()); return boxedLast.isPresent() ? OptionalDouble.of(boxedLast.get()) : OptionalDouble.empty(); }
class class_name[name] begin[{] method[findLast, return_type[type[OptionalDouble]], modifier[public static], parameter[stream]] begin[{] local_variable[type[java], boxedLast] return[TernaryExpression(condition=MethodInvocation(arguments=[], member=isPresent, postfix_operators=[], prefix_operato...
annotation[@] identifier[Beta] Keyword[public] Keyword[static] identifier[OptionalDouble] identifier[findLast] operator[SEP] identifier[DoubleStream] identifier[stream] operator[SEP] { identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Optional] operator[<] identifier[Double] operator[>] id...
public ComparatorCondition ne(String... values) { return new ComparatorCondition("<>", this, new LiteralOperand( new LinkedHashSet<String>(Arrays.asList(values)))); }
class class_name[name] begin[{] method[ne, return_type[type[ComparatorCondition]], modifier[public], parameter[values]] begin[{] return[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="<>"), This(postfix_operators=[], prefix_operators=[], q...
Keyword[public] identifier[ComparatorCondition] identifier[ne] operator[SEP] identifier[String] operator[...] identifier[values] operator[SEP] { Keyword[return] Keyword[new] identifier[ComparatorCondition] operator[SEP] literal[String] , Keyword[this] , Keyword[new] identifier[LiteralOperand] operator[SEP] Key...
private void setWeekCountData(Locale desiredLocale) { /* try to get the Locale data from the cache */ int[] data = cachedLocaleData.get(desiredLocale); if (data == null) { /* cache miss */ data = new int[2]; // BEGIN Android-changed: Use ICU4C to get week data. ...
class class_name[name] begin[{] method[setWeekCountData, return_type[void], modifier[private], parameter[desiredLocale]] begin[{] local_variable[type[int], data] if[binary_operation[member[.data], ==, literal[null]]] begin[{] assign[member[.data], ArrayCreator(di...
Keyword[private] Keyword[void] identifier[setWeekCountData] operator[SEP] identifier[Locale] identifier[desiredLocale] operator[SEP] { Keyword[int] operator[SEP] operator[SEP] identifier[data] operator[=] identifier[cachedLocaleData] operator[SEP] identifier[get] operator[SEP] identifier[desiredLocale] operator[...
public void setParamTabWpReportType(String value) { if (I_CmsReport.REPORT_TYPE_SIMPLE.equals(value) || I_CmsReport.REPORT_TYPE_EXTENDED.equals(value)) { // set only if valid parameter value is found m_userSettings.setWorkplaceReportType(value); } }
class class_name[name] begin[{] method[setParamTabWpReportType, return_type[void], modifier[public], parameter[value]] begin[{] if[binary_operation[call[I_CmsReport.REPORT_TYPE_SIMPLE.equals, parameter[member[.value]]], ||, call[I_CmsReport.REPORT_TYPE_EXTENDED.equals, parameter[member[.value]]...
Keyword[public] Keyword[void] identifier[setParamTabWpReportType] operator[SEP] identifier[String] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[I_CmsReport] operator[SEP] identifier[REPORT_TYPE_SIMPLE] operator[SEP] identifier[equals] operator[SEP] identifier[value] operator[SEP] operat...
@NonNull public static String placeholders(final int numberOfPlaceholders) { if (numberOfPlaceholders == 1) { return "?"; // fffast } else if (numberOfPlaceholders == 0) { return ""; } else if (numberOfPlaceholders < 0) { throw new IllegalArgumentException...
class class_name[name] begin[{] method[placeholders, return_type[type[String]], modifier[public static], parameter[numberOfPlaceholders]] begin[{] if[binary_operation[member[.numberOfPlaceholders], ==, literal[1]]] begin[{] return[literal["?"]] else begin[{] if[b...
annotation[@] identifier[NonNull] Keyword[public] Keyword[static] identifier[String] identifier[placeholders] operator[SEP] Keyword[final] Keyword[int] identifier[numberOfPlaceholders] operator[SEP] { Keyword[if] operator[SEP] identifier[numberOfPlaceholders] operator[==] Other[1] operator[SEP] { Keyw...
public <K, C extends Collection<T>> Map<K, C> groupingTo(Function<? super T, ? extends K> classifier, Supplier<C> collectionFactory) { return groupingBy(classifier, Collectors.toCollection(collectionFactory)); }
class class_name[name] begin[{] method[groupingTo, return_type[type[Map]], modifier[public], parameter[classifier, collectionFactory]] begin[{] return[call[.groupingBy, parameter[member[.classifier], call[Collectors.toCollection, parameter[member[.collectionFactory]]]]]] end[}] END[}]
Keyword[public] operator[<] identifier[K] , identifier[C] Keyword[extends] identifier[Collection] operator[<] identifier[T] operator[>] operator[>] identifier[Map] operator[<] identifier[K] , identifier[C] operator[>] identifier[groupingTo] operator[SEP] identifier[Function] operator[<] operator[?] Keyword[super] ide...
public void storePassword(String account, CharSequence password) { ByteBuffer pwBuf = UTF_8.encode(CharBuffer.wrap(password)); byte[] pwBytes = new byte[pwBuf.remaining()]; pwBuf.get(pwBytes); int errorCode = storePassword0(account.getBytes(UTF_8), pwBytes); Arrays.fill(pwBytes, (byte) 0x00); Arrays.fill(pw...
class class_name[name] begin[{] method[storePassword, return_type[void], modifier[public], parameter[account, password]] begin[{] local_variable[type[ByteBuffer], pwBuf] local_variable[type[byte], pwBytes] call[pwBuf.get, parameter[member[.pwBytes]]] local_variable[type[...
Keyword[public] Keyword[void] identifier[storePassword] operator[SEP] identifier[String] identifier[account] , identifier[CharSequence] identifier[password] operator[SEP] { identifier[ByteBuffer] identifier[pwBuf] operator[=] identifier[UTF_8] operator[SEP] identifier[encode] operator[SEP] identifier[CharBuffer...
public static CPDAvailabilityEstimate[] findByUuid_C_PrevAndNext( long CPDAvailabilityEstimateId, String uuid, long companyId, OrderByComparator<CPDAvailabilityEstimate> orderByComparator) throws com.liferay.commerce.exception.NoSuchCPDAvailabilityEstimateException { return getPersistence() .findByUuid_C...
class class_name[name] begin[{] method[findByUuid_C_PrevAndNext, return_type[type[CPDAvailabilityEstimate]], modifier[public static], parameter[CPDAvailabilityEstimateId, uuid, companyId, orderByComparator]] begin[{] return[call[.getPersistence, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[CPDAvailabilityEstimate] operator[SEP] operator[SEP] identifier[findByUuid_C_PrevAndNext] operator[SEP] Keyword[long] identifier[CPDAvailabilityEstimateId] , identifier[String] identifier[uuid] , Keyword[long] identifier[companyId] , identifier[OrderByComparator] operator[<...
public void write(File file) throws IOException { try (InputStream inputStream = getInputStream()) { IoUtils.copy(inputStream, file); } }
class class_name[name] begin[{] method[write, return_type[void], modifier[public], parameter[file]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=inputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberRef...
Keyword[public] Keyword[void] identifier[write] operator[SEP] identifier[File] identifier[file] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[try] operator[SEP] identifier[InputStream] identifier[inputStream] operator[=] identifier[getInputStream] operator[SEP] operator[SEP] operator[SEP] { ...
public static UnsynchronizedRateLimiter create(double permitsPerSecond, long warmupPeriod, TimeUnit unit) { return create(SleepingTicker.SYSTEM_TICKER, permitsPerSecond, warmupPeriod, unit); }
class class_name[name] begin[{] method[create, return_type[type[UnsynchronizedRateLimiter]], modifier[public static], parameter[permitsPerSecond, warmupPeriod, unit]] begin[{] return[call[.create, parameter[member[SleepingTicker.SYSTEM_TICKER], member[.permitsPerSecond], member[.warmupPeriod], member[....
Keyword[public] Keyword[static] identifier[UnsynchronizedRateLimiter] identifier[create] operator[SEP] Keyword[double] identifier[permitsPerSecond] , Keyword[long] identifier[warmupPeriod] , identifier[TimeUnit] identifier[unit] operator[SEP] { Keyword[return] identifier[create] operator[SEP] identifier[Sleepi...
public static Delay exponential(TimeUnit unit, long upper, long lower, long growBy, int powersOf) { return new ExponentialDelay(unit, upper, lower, growBy, powersOf); }
class class_name[name] begin[{] method[exponential, return_type[type[Delay]], modifier[public static], parameter[unit, upper, lower, growBy, powersOf]] begin[{] return[ClassCreator(arguments=[MemberReference(member=unit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberRefere...
Keyword[public] Keyword[static] identifier[Delay] identifier[exponential] operator[SEP] identifier[TimeUnit] identifier[unit] , Keyword[long] identifier[upper] , Keyword[long] identifier[lower] , Keyword[long] identifier[growBy] , Keyword[int] identifier[powersOf] operator[SEP] { Keyword[return] Keyword[new]...
public static void printDebug(final Map pMap, final String pMethodName, final PrintStream pPrintStream) { if (pPrintStream == null) { System.err.println(PRINTSTREAM_IS_NULL_ERROR_MESSAGE); return; } if (pMap == null) { pPrintStream.println(MAP_IS_NULL_ERROR_MESSAGE); return;...
class class_name[name] begin[{] method[printDebug, return_type[void], modifier[public static], parameter[pMap, pMethodName, pPrintStream]] begin[{] if[binary_operation[member[.pPrintStream], ==, literal[null]]] begin[{] call[System.err.println, parameter[member[.PRINTSTR...
Keyword[public] Keyword[static] Keyword[void] identifier[printDebug] operator[SEP] Keyword[final] identifier[Map] identifier[pMap] , Keyword[final] identifier[String] identifier[pMethodName] , Keyword[final] identifier[PrintStream] identifier[pPrintStream] operator[SEP] { Keyword[if] operator[SEP] identifier[p...
private TreeItem doTree(FQDNNode localRoot) { TreeItem localLeaf = new TreeItem(); LogTreeNode logTreeNode = new LogTreeNode(browseContainer, localRoot.getShortName(), localRoot.getFqdName(), localRoot.isWasLeaf(), this); localLeaf.setWidget(logTreeNode); if (localRoot.getChildren().size() >...
class class_name[name] begin[{] method[doTree, return_type[type[TreeItem]], modifier[private], parameter[localRoot]] begin[{] local_variable[type[TreeItem], localLeaf] local_variable[type[LogTreeNode], logTreeNode] call[localLeaf.setWidget, parameter[member[.logTreeNode]]] ...
Keyword[private] identifier[TreeItem] identifier[doTree] operator[SEP] identifier[FQDNNode] identifier[localRoot] operator[SEP] { identifier[TreeItem] identifier[localLeaf] operator[=] Keyword[new] identifier[TreeItem] operator[SEP] operator[SEP] operator[SEP] identifier[LogTreeNode] identifier[logTreeNode] oper...
public void logf(Level level, String format, Object... params) { doLogf(level, FQCN, format, params, null); }
class class_name[name] begin[{] method[logf, return_type[void], modifier[public], parameter[level, format, params]] begin[{] call[.doLogf, parameter[member[.level], member[.FQCN], member[.format], member[.params], literal[null]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[logf] operator[SEP] identifier[Level] identifier[level] , identifier[String] identifier[format] , identifier[Object] operator[...] identifier[params] operator[SEP] { identifier[doLogf] operator[SEP] identifier[level] , identifier[FQCN] , identifier[format] , identifi...
public void set(int row, int col, double val) { checkIndices(row, col); if (row != col) { throw new IllegalArgumentException( "cannot set non-diagonal elements in a DiagonalMatrix"); } values[row] = val; }
class class_name[name] begin[{] method[set, return_type[void], modifier[public], parameter[row, col, val]] begin[{] call[.checkIndices, parameter[member[.row], member[.col]]] if[binary_operation[member[.row], !=, member[.col]]] begin[{] ThrowStatement(expression=Clas...
Keyword[public] Keyword[void] identifier[set] operator[SEP] Keyword[int] identifier[row] , Keyword[int] identifier[col] , Keyword[double] identifier[val] operator[SEP] { identifier[checkIndices] operator[SEP] identifier[row] , identifier[col] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ro...
protected boolean isTheSame(IIsotope isotopeOne, IIsotope isotopeTwo) { if (!Objects.equals(isotopeOne.getMassNumber(), isotopeTwo.getMassNumber())) return false; Double natAbund1 = isotopeOne.getNaturalAbundance(); Double natAbund2 = isotopeTwo.getNatur...
class class_name[name] begin[{] method[isTheSame, return_type[type[boolean]], modifier[protected], parameter[isotopeOne, isotopeTwo]] begin[{] if[call[Objects.equals, parameter[call[isotopeOne.getMassNumber, parameter[]], call[isotopeTwo.getMassNumber, parameter[]]]]] begin[{] return[literal[fa...
Keyword[protected] Keyword[boolean] identifier[isTheSame] operator[SEP] identifier[IIsotope] identifier[isotopeOne] , identifier[IIsotope] identifier[isotopeTwo] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[Objects] operator[SEP] identifier[equals] operator[SEP] identifier[isotopeOne] operat...
public static BucketDistributionSummary get(Id id, BucketFunction f) { return get(Spectator.globalRegistry(), id, f); }
class class_name[name] begin[{] method[get, return_type[type[BucketDistributionSummary]], modifier[public static], parameter[id, f]] begin[{] return[call[.get, parameter[call[Spectator.globalRegistry, parameter[]], member[.id], member[.f]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[BucketDistributionSummary] identifier[get] operator[SEP] identifier[Id] identifier[id] , identifier[BucketFunction] identifier[f] operator[SEP] { Keyword[return] identifier[get] operator[SEP] identifier[Spectator] operator[SEP] identifier[globalRegistry] operator[SEP] ...
@Override public DisassociateIpGroupsResult disassociateIpGroups(DisassociateIpGroupsRequest request) { request = beforeClientExecution(request); return executeDisassociateIpGroups(request); }
class class_name[name] begin[{] method[disassociateIpGroups, return_type[type[DisassociateIpGroupsResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeDisassociateIpGroups, parame...
annotation[@] identifier[Override] Keyword[public] identifier[DisassociateIpGroupsResult] identifier[disassociateIpGroups] operator[SEP] identifier[DisassociateIpGroupsRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] ...
private String httpsQuery() { String response = null; try { // Create a trust manager that does not validate certificate chains TrustManager[] trustAllCerts = new TrustManager[] { new LocalX509TrustManager()}; // Install the all-trusting trust manager final SSLContext sc = SSLContext.getInstance("SSL"...
class class_name[name] begin[{] method[httpsQuery, return_type[type[String]], modifier[private], parameter[]] begin[{] local_variable[type[String], response] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dime...
Keyword[private] identifier[String] identifier[httpsQuery] operator[SEP] operator[SEP] { identifier[String] identifier[response] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[TrustManager] operator[SEP] operator[SEP] identifier[trustAllCerts] operator[=] Keyword[new] identifier[Trust...
@Override public void delete(ZooPC obj) { if (obj.getClass() == GenericObject.class) { throw new IllegalArgumentException(); // deleteGeneric((GenericObject) obj); // return; } if (!isStarted) { this.sie = node.getSchemaIE(cls); isStarted = true; ...
class class_name[name] begin[{] method[delete, return_type[void], modifier[public], parameter[obj]] begin[{] if[binary_operation[call[obj.getClass, parameter[]], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[delete] operator[SEP] identifier[ZooPC] identifier[obj] operator[SEP] { Keyword[if] operator[SEP] identifier[obj] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[==] identifier[GenericObject] operator[SEP] Keyword...
public Vector nlist(String path) throws ServerException, ClientException, IOException { ByteArrayDataSink sink = new ByteArrayDataSink(); nlist(path, sink); ByteArrayOutputStream received = sink.getData(); // transfer done. Data is in received stream. // convert it to...
class class_name[name] begin[{] method[nlist, return_type[type[Vector]], modifier[public], parameter[path]] begin[{] local_variable[type[ByteArrayDataSink], sink] call[.nlist, parameter[member[.path], member[.sink]]] local_variable[type[ByteArrayOutputStream], received] ...
Keyword[public] identifier[Vector] identifier[nlist] operator[SEP] identifier[String] identifier[path] operator[SEP] Keyword[throws] identifier[ServerException] , identifier[ClientException] , identifier[IOException] { identifier[ByteArrayDataSink] identifier[sink] operator[=] Keyword[new] identifier[ByteArray...
public IAtom getNextPlacedHeavyAtomWithUnplacedAliphaticNeighbour(IAtomContainer molecule) { Iterator<IBond> bonds = molecule.bonds().iterator(); while (bonds.hasNext()) { IBond bond = bonds.next(); IAtom atom0 = bond.getBegin(); IAtom atom1 = bond.getEnd(); ...
class class_name[name] begin[{] method[getNextPlacedHeavyAtomWithUnplacedAliphaticNeighbour, return_type[type[IAtom]], modifier[public], parameter[molecule]] begin[{] local_variable[type[Iterator], bonds] while[call[bonds.hasNext, parameter[]]] begin[{] local_variable[type[I...
Keyword[public] identifier[IAtom] identifier[getNextPlacedHeavyAtomWithUnplacedAliphaticNeighbour] operator[SEP] identifier[IAtomContainer] identifier[molecule] operator[SEP] { identifier[Iterator] operator[<] identifier[IBond] operator[>] identifier[bonds] operator[=] identifier[molecule] operator[SEP] identifi...
private ProjectCalendar getResourceCalendar(Integer calendarID) { ProjectCalendar result = null; if (calendarID != null) { ProjectCalendar calendar = m_calMap.get(calendarID); if (calendar != null) { // // If the resource is linked to a base calend...
class class_name[name] begin[{] method[getResourceCalendar, return_type[type[ProjectCalendar]], modifier[private], parameter[calendarID]] begin[{] local_variable[type[ProjectCalendar], result] if[binary_operation[member[.calendarID], !=, literal[null]]] begin[{] local_variab...
Keyword[private] identifier[ProjectCalendar] identifier[getResourceCalendar] operator[SEP] identifier[Integer] identifier[calendarID] operator[SEP] { identifier[ProjectCalendar] identifier[result] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[calendarID] operator[!=] Other[null] oper...
public List<Row> getAllExcelRows(String sheetName, boolean heading) { logger.entering(new Object[] { sheetName, heading }); Sheet sheet = fetchSheet(sheetName); int numRows = sheet.getPhysicalNumberOfRows(); List<Row> rows = new ArrayList<Row>(); int currentRow = 1; if (h...
class class_name[name] begin[{] method[getAllExcelRows, return_type[type[List]], modifier[public], parameter[sheetName, heading]] begin[{] call[logger.entering, parameter[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=sheetName, postfix_operato...
Keyword[public] identifier[List] operator[<] identifier[Row] operator[>] identifier[getAllExcelRows] operator[SEP] identifier[String] identifier[sheetName] , Keyword[boolean] identifier[heading] operator[SEP] { identifier[logger] operator[SEP] identifier[entering] operator[SEP] Keyword[new] identifier[Object] o...
@Override public final void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) { Objects.requireNonNull(function); int mc = this.modCount; Segment<K, V> segment; for (long segmentIndex = 0; segmentIndex >= 0; segmentIndex = nextSegmentIndex(segmentIndex, ...
class class_name[name] begin[{] method[replaceAll, return_type[void], modifier[final public], parameter[function]] begin[{] call[Objects.requireNonNull, parameter[member[.function]]] local_variable[type[int], mc] local_variable[type[Segment], segment] ForStatement(body=B...
annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[replaceAll] operator[SEP] identifier[BiFunction] operator[<] operator[?] Keyword[super] identifier[K] , operator[?] Keyword[super] identifier[V] , operator[?] Keyword[extends] identifier[V] operator[>] identifier[function] oper...
public final String getProxyScript() { StringBuilder buf = new StringBuilder("makeStaplerProxy('").append(getURL()).append("','").append( WebApp.getCurrent().getCrumbIssuer().issueCrumb() ).append("',["); boolean first=true; for (Method m : getTarget().getClass().getMeth...
class class_name[name] begin[{] method[getProxyScript, return_type[type[String]], modifier[final public], parameter[]] begin[{] local_variable[type[StringBuilder], buf] local_variable[type[boolean], first] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration...
Keyword[public] Keyword[final] identifier[String] identifier[getProxyScript] operator[SEP] operator[SEP] { identifier[StringBuilder] identifier[buf] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[getURL] ope...
@Override public BeanO createBeanO(EJBThreadData threadData, ContainerTx tx, BeanId id) throws RemoteException { throw new ContainerEJBException("EJBContainer internal error"); }
class class_name[name] begin[{] method[createBeanO, return_type[type[BeanO]], modifier[public], parameter[threadData, tx, id]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="EJBContainer internal error")...
annotation[@] identifier[Override] Keyword[public] identifier[BeanO] identifier[createBeanO] operator[SEP] identifier[EJBThreadData] identifier[threadData] , identifier[ContainerTx] identifier[tx] , identifier[BeanId] identifier[id] operator[SEP] Keyword[throws] identifier[RemoteException] { Keyword[throw] Key...
private void removeInterest(SelectableChannel channel, int operation) { SelectionKey key = channel.keyFor(selector); // Exception would be thrown if key is null or key is inValid // We do not need double check it ahead key.interestOps(key.interestOps() & (~operation)); }
class class_name[name] begin[{] method[removeInterest, return_type[void], modifier[private], parameter[channel, operation]] begin[{] local_variable[type[SelectionKey], key] call[key.interestOps, parameter[binary_operation[call[key.interestOps, parameter[]], &, member[.operation]]]] ...
Keyword[private] Keyword[void] identifier[removeInterest] operator[SEP] identifier[SelectableChannel] identifier[channel] , Keyword[int] identifier[operation] operator[SEP] { identifier[SelectionKey] identifier[key] operator[=] identifier[channel] operator[SEP] identifier[keyFor] operator[SEP] identifier[select...
public void notifyConnectionDirty(String url) { JMXMonConnection connection = (JMXMonConnection)pool.get(url); if (connection != null){ connection.setNewActiveConnection(null, null); } }
class class_name[name] begin[{] method[notifyConnectionDirty, return_type[void], modifier[public], parameter[url]] begin[{] local_variable[type[JMXMonConnection], connection] if[binary_operation[member[.connection], !=, literal[null]]] begin[{] call[connection.se...
Keyword[public] Keyword[void] identifier[notifyConnectionDirty] operator[SEP] identifier[String] identifier[url] operator[SEP] { identifier[JMXMonConnection] identifier[connection] operator[=] operator[SEP] identifier[JMXMonConnection] operator[SEP] identifier[pool] operator[SEP] identifier[get] operator[SEP] id...
public void marshall(RateIncreaseCriteria rateIncreaseCriteria, ProtocolMarshaller protocolMarshaller) { if (rateIncreaseCriteria == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(rateIncreaseCriteri...
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[rateIncreaseCriteria, protocolMarshaller]] begin[{] if[binary_operation[member[.rateIncreaseCriteria], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Liter...
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[RateIncreaseCriteria] identifier[rateIncreaseCriteria] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[rateIncreaseCriteria] operator[==] Other[null] operator[SEP] { ...
public void addUrlPatterns(String... urlPatterns) { Assert.notNull(urlPatterns, "UrlPatterns must not be null"); Collections.addAll(this.urlPatterns, urlPatterns); }
class class_name[name] begin[{] method[addUrlPatterns, return_type[void], modifier[public], parameter[urlPatterns]] begin[{] call[Assert.notNull, parameter[member[.urlPatterns], literal["UrlPatterns must not be null"]]] call[Collections.addAll, parameter[THIS[member[None.urlPatt...
Keyword[public] Keyword[void] identifier[addUrlPatterns] operator[SEP] identifier[String] operator[...] identifier[urlPatterns] operator[SEP] { identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] identifier[urlPatterns] , literal[String] operator[SEP] operator[SEP] identifier[Collections] operato...
public void addSizeExpression( Expression sizeExpression ) { if( _sizeExpressions == null ) { _sizeExpressions = new ArrayList<Expression>( 2 ); } _sizeExpressions.add( sizeExpression ); }
class class_name[name] begin[{] method[addSizeExpression, return_type[void], modifier[public], parameter[sizeExpression]] begin[{] if[binary_operation[member[._sizeExpressions], ==, literal[null]]] begin[{] assign[member[._sizeExpressions], ClassCreator(arguments=[Litera...
Keyword[public] Keyword[void] identifier[addSizeExpression] operator[SEP] identifier[Expression] identifier[sizeExpression] operator[SEP] { Keyword[if] operator[SEP] identifier[_sizeExpressions] operator[==] Other[null] operator[SEP] { identifier[_sizeExpressions] operator[=] Keyword[new] identifier[A...
private void directGetter(Field field) { GeneratorAdapter mg = new GeneratorAdapter(Opcodes.ACC_PUBLIC, getMethod(Object.class, "get", Object.class), getterSignature(), new Type[0], classWriter); // Simply access by field // return ((classType)object).fieldName...
class class_name[name] begin[{] method[directGetter, return_type[void], modifier[private], parameter[field]] begin[{] local_variable[type[GeneratorAdapter], mg] call[mg.loadArg, parameter[literal[0]]] call[mg.checkCast, parameter[call[Type.getType, parameter[call[field.g...
Keyword[private] Keyword[void] identifier[directGetter] operator[SEP] identifier[Field] identifier[field] operator[SEP] { identifier[GeneratorAdapter] identifier[mg] operator[=] Keyword[new] identifier[GeneratorAdapter] operator[SEP] identifier[Opcodes] operator[SEP] identifier[ACC_PUBLIC] , identifier[getMetho...
public String activate() { Integer[] resourceIds = getIntIds("resource"); Boolean enabled = getBoolean("enabled"); if (null == enabled) { enabled = Boolean.FALSE; } securityHelper.getFuncPermissionService().updateState(resourceIds, enabled.booleanValue()); authorityManager.refreshCache(); ...
class class_name[name] begin[{] method[activate, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[Integer], resourceIds] local_variable[type[Boolean], enabled] if[binary_operation[literal[null], ==, member[.enabled]]] begin[{] ...
Keyword[public] identifier[String] identifier[activate] operator[SEP] operator[SEP] { identifier[Integer] operator[SEP] operator[SEP] identifier[resourceIds] operator[=] identifier[getIntIds] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Boolean] identifier[enabled] operator[=] identifier[...
public Set<io.motown.domain.api.chargingstation.Evse> getEvses(String vendor, String model) { List<ChargingStationType> items = chargingStationTypeRepository.findByCodeAndManufacturerCode(model, vendor); Set<io.motown.domain.api.chargingstation.Evse> result = new HashSet<>(); int resultSize = i...
class class_name[name] begin[{] method[getEvses, return_type[type[Set]], modifier[public], parameter[vendor, model]] begin[{] local_variable[type[List], items] local_variable[type[Set], result] local_variable[type[int], resultSize] if[binary_operation[member[.resultSize]...
Keyword[public] identifier[Set] operator[<] identifier[io] operator[SEP] identifier[motown] operator[SEP] identifier[domain] operator[SEP] identifier[api] operator[SEP] identifier[chargingstation] operator[SEP] identifier[Evse] operator[>] identifier[getEvses] operator[SEP] identifier[String] identifier[vendor] , iden...
public static File getClassFile(Class<?> clazz) { File dir = new File(clazz.getProtectionDomain().getCodeSource().getLocation().getPath()); if (!dir.isDirectory()) return null; // class file might be contained in Jar File clazzFile = new File(dir, clazz.getName().replace('.', File.separatorChar) + ".class")...
class class_name[name] begin[{] method[getClassFile, return_type[type[File]], modifier[public static], parameter[clazz]] begin[{] local_variable[type[File], dir] if[call[dir.isDirectory, parameter[]]] begin[{] return[literal[null]] else begin[{] None end[}] local...
Keyword[public] Keyword[static] identifier[File] identifier[getClassFile] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[SEP] { identifier[File] identifier[dir] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[clazz] operator[SEP] identifier[getPr...
static public void normalize(EnsCoord result, List<EnsCoord> ecList) { List<EnsCoord> extra = new ArrayList<>(); for (EnsCoord ec : ecList) { if (!result.equalsData(ec)) { // differences can only be greater extra.add(ec); } } if (extra.size() == 0) return; ...
class class_name[name] begin[{] method[normalize, return_type[void], modifier[public static], parameter[result, ecList]] begin[{] local_variable[type[List], extra] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=e...
Keyword[static] Keyword[public] Keyword[void] identifier[normalize] operator[SEP] identifier[EnsCoord] identifier[result] , identifier[List] operator[<] identifier[EnsCoord] operator[>] identifier[ecList] operator[SEP] { identifier[List] operator[<] identifier[EnsCoord] operator[>] identifier[extra] operator[=]...
@Override public void removeByCompanyId(long companyId) { for (CommercePriceEntry commercePriceEntry : findByCompanyId( companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commercePriceEntry); } }
class class_name[name] begin[{] method[removeByCompanyId, return_type[void], modifier[public], parameter[companyId]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=commercePriceEntry, postfix_operators=...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[removeByCompanyId] operator[SEP] Keyword[long] identifier[companyId] operator[SEP] { Keyword[for] operator[SEP] identifier[CommercePriceEntry] identifier[commercePriceEntry] operator[:] identifier[findByCompanyId] operator[SEP] identifi...
public String get(String key) { String value = (String) properties.get(new ContextKey(key)); if (value == null && defaults != null) return defaults.get(key); return value; }
class class_name[name] begin[{] method[get, return_type[type[String]], modifier[public], parameter[key]] begin[{] local_variable[type[String], value] if[binary_operation[binary_operation[member[.value], ==, literal[null]], &&, binary_operation[member[.defaults], !=, literal[null]]]] beg...
Keyword[public] identifier[String] identifier[get] operator[SEP] identifier[String] identifier[key] operator[SEP] { identifier[String] identifier[value] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[properties] operator[SEP] identifier[get] operator[SEP] Keyword[new] identifier[ContextKey...
public void _doInclude(PageSource[] sources, boolean runOnce, Object cachedWithin) throws PageException { if (cachedWithin == null) { _doInclude(sources, runOnce); return; } // ignore call when runonce an it is not first call if (runOnce) { Page currentPage = PageSourceImpl.loadPage(this, sources); ...
class class_name[name] begin[{] method[_doInclude, return_type[void], modifier[public], parameter[sources, runOnce, cachedWithin]] begin[{] if[binary_operation[member[.cachedWithin], ==, literal[null]]] begin[{] call[._doInclude, parameter[member[.sources], member[.runOn...
Keyword[public] Keyword[void] identifier[_doInclude] operator[SEP] identifier[PageSource] operator[SEP] operator[SEP] identifier[sources] , Keyword[boolean] identifier[runOnce] , identifier[Object] identifier[cachedWithin] operator[SEP] Keyword[throws] identifier[PageException] { Keyword[if] operator[SEP] iden...
public OutputStream setBinaryStream(final long pos) throws SQLException { synchronized (this) { if (this.underlying == null) { if (pos > 1) { throw new SQLException("Invalid position: " + pos); } // end of if throw new SQLFeatureNo...
class class_name[name] begin[{] method[setBinaryStream, return_type[type[OutputStream]], modifier[public], parameter[pos]] begin[{] SYNCHRONIZED[THIS[]] BEGIN[{] if[binary_operation[THIS[member[None.underlying]], ==, literal[null]]] begin[{] ...
Keyword[public] identifier[OutputStream] identifier[setBinaryStream] operator[SEP] Keyword[final] Keyword[long] identifier[pos] operator[SEP] Keyword[throws] identifier[SQLException] { Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SE...
protected List<CmsResource> getSingleFile(CmsObject cms, String param) throws CmsException { if ((param == null) || (cms == null)) { throw new CmsIllegalArgumentException(Messages.get().container(Messages.ERR_COLLECTOR_PARAM_SINGLE_FILE_0)); } // create a list and return it ...
class class_name[name] begin[{] method[getSingleFile, return_type[type[List]], modifier[protected], parameter[cms, param]] begin[{] if[binary_operation[binary_operation[member[.param], ==, literal[null]], ||, binary_operation[member[.cms], ==, literal[null]]]] begin[{] ThrowStatemen...
Keyword[protected] identifier[List] operator[<] identifier[CmsResource] operator[>] identifier[getSingleFile] operator[SEP] identifier[CmsObject] identifier[cms] , identifier[String] identifier[param] operator[SEP] Keyword[throws] identifier[CmsException] { Keyword[if] operator[SEP] operator[SEP] identifier[par...
public Bitmap drawableToBitmap(Drawable drawable) { if (drawable == null) // Don't do anything without a proper drawable return null; else if (drawable instanceof BitmapDrawable) { // Use the getBitmap() method instead if BitmapDrawable Log.i(TAG, "Bitmap drawable!"); return ((BitmapDrawable) drawable)....
class class_name[name] begin[{] method[drawableToBitmap, return_type[type[Bitmap]], modifier[public], parameter[drawable]] begin[{] if[binary_operation[member[.drawable], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] if[binary_operation[member[.drawable], ...
Keyword[public] identifier[Bitmap] identifier[drawableToBitmap] operator[SEP] identifier[Drawable] identifier[drawable] operator[SEP] { Keyword[if] operator[SEP] identifier[drawable] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifie...
public static <T extends CcgExample> List<T> filterExampleCollection( final CcgParser parser, List<T> examples) { MapReduceExecutor executor = MapReduceConfiguration.getMapReduceExecutor(); List<T> filteredExamples = executor.filter(examples, new Predicate<T>() { @Override public boolean appl...
class class_name[name] begin[{] method[filterExampleCollection, return_type[type[List]], modifier[public static], parameter[parser, examples]] begin[{] local_variable[type[MapReduceExecutor], executor] local_variable[type[List], filteredExamples] return[member[.filteredExamples]] en...
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[CcgExample] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[filterExampleCollection] operator[SEP] Keyword[final] identifier[CcgParser] identifier[parser] , identifier[List] operator[<] identifier[T] ope...
public static GitHub getClient() { RestAdapter restAdapter = new RestAdapter.Builder() .setEndpoint(API_URL) .setLogLevel(RestAdapter.LogLevel.BASIC) .build(); return restAdapter.create(GitHub.class); }
class class_name[name] begin[{] method[getClient, return_type[type[GitHub]], modifier[public static], parameter[]] begin[{] local_variable[type[RestAdapter], restAdapter] return[call[restAdapter.create, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]...
Keyword[public] Keyword[static] identifier[GitHub] identifier[getClient] operator[SEP] operator[SEP] { identifier[RestAdapter] identifier[restAdapter] operator[=] Keyword[new] identifier[RestAdapter] operator[SEP] identifier[Builder] operator[SEP] operator[SEP] operator[SEP] identifier[setEndpoint] operator[SEP]...
private int getCorpusConfigIntValues(String context) { int value = Integer.parseInt(defaultCorpusConfig.getConfig().getProperty( context)); if (value < 0) { throw new IllegalStateException("the value must be > 0"); } return value; }
class class_name[name] begin[{] method[getCorpusConfigIntValues, return_type[type[int]], modifier[private], parameter[context]] begin[{] local_variable[type[int], value] if[binary_operation[member[.value], <, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(argum...
Keyword[private] Keyword[int] identifier[getCorpusConfigIntValues] operator[SEP] identifier[String] identifier[context] operator[SEP] { Keyword[int] identifier[value] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[defaultCorpusConfig] operator[SEP] identifier[getConfi...
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public static Completable ambArray(final CompletableSource... sources) { ObjectHelper.requireNonNull(sources, "sources is null"); if (sources.length == 0) { return complete(); } if (sources.length == 1) { ...
class class_name[name] begin[{] method[ambArray, return_type[type[Completable]], modifier[public static], parameter[sources]] begin[{] call[ObjectHelper.requireNonNull, parameter[member[.sources], literal["sources is null"]]] if[binary_operation[member[sources.length], ==, liter...
annotation[@] identifier[CheckReturnValue] annotation[@] identifier[SchedulerSupport] operator[SEP] identifier[SchedulerSupport] operator[SEP] identifier[NONE] operator[SEP] Keyword[public] Keyword[static] identifier[Completable] identifier[ambArray] operator[SEP] Keyword[final] identifier[CompletableSource] operator[....
public Double getNearestAtRisk(double t) { Integer index = 0; /* String timeValue = t + ""; String format = "#"; int numDecimals = 0; int decimalIndex = timeValue.indexOf("."); if (decimalIndex > 0) { for (int i = timeValue.length() - 1; i > decimalIndex; i--) { if (timeValue.charAt(i) == '0' && ...
class class_name[name] begin[{] method[getNearestAtRisk, return_type[type[Double]], modifier[public], parameter[t]] begin[{] local_variable[type[Integer], index] local_variable[type[DecimalFormat], newFormat] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclarat...
Keyword[public] identifier[Double] identifier[getNearestAtRisk] operator[SEP] Keyword[double] identifier[t] operator[SEP] { identifier[Integer] identifier[index] operator[=] Other[0] operator[SEP] identifier[DecimalFormat] identifier[newFormat] operator[=] Keyword[new] identifier[DecimalFormat] operator[SEP] lit...
public T visitBinaryExpression(BinaryExpression elm, C context) { if (elm instanceof Add) return visitAdd((Add)elm, context); else if (elm instanceof After) return visitAfter((After)elm, context); else if (elm instanceof And) return visitAnd((And)elm, context); else if (elm instanceof Be...
class class_name[name] begin[{] method[visitBinaryExpression, return_type[type[T]], modifier[public], parameter[elm, context]] begin[{] if[binary_operation[member[.elm], instanceof, type[Add]]] begin[{] return[call[.visitAdd, parameter[Cast(expression=MemberReference(member=elm, postfix_operato...
Keyword[public] identifier[T] identifier[visitBinaryExpression] operator[SEP] identifier[BinaryExpression] identifier[elm] , identifier[C] identifier[context] operator[SEP] { Keyword[if] operator[SEP] identifier[elm] Keyword[instanceof] identifier[Add] operator[SEP] Keyword[return] identifier[visitAdd] operator...
public synchronized void open(ObjectManagerState objectManagerState) throws ObjectManagerException { final String methodName = "open"; if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) trace.entry(this, cclass, methodName, objectManagerState); super.op...
class class_name[name] begin[{] method[open, return_type[void], modifier[synchronized public], parameter[objectManagerState]] begin[{] local_variable[type[String], methodName] if[binary_operation[call[Tracing.isAnyTracingEnabled, parameter[]], &&, call[trace.isEntryEnabled, parameter[]]...
Keyword[public] Keyword[synchronized] Keyword[void] identifier[open] operator[SEP] identifier[ObjectManagerState] identifier[objectManagerState] operator[SEP] Keyword[throws] identifier[ObjectManagerException] { Keyword[final] identifier[String] identifier[methodName] operator[=] literal[String] operator[SEP] Ke...
public Object[] parse(String source, ParsePosition pos) { if (msgPattern.hasNamedArguments()) { throw new IllegalArgumentException( "This method is not available in MessageFormat objects " + "that use named argument."); } // Count how many slo...
class class_name[name] begin[{] method[parse, return_type[type[Object]], modifier[public], parameter[source, pos]] begin[{] if[call[msgPattern.hasNamedArguments, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operato...
Keyword[public] identifier[Object] operator[SEP] operator[SEP] identifier[parse] operator[SEP] identifier[String] identifier[source] , identifier[ParsePosition] identifier[pos] operator[SEP] { Keyword[if] operator[SEP] identifier[msgPattern] operator[SEP] identifier[hasNamedArguments] operator[SEP] operator[SEP...
public static CommerceTierPriceEntry fetchByC_LtM_First( long commercePriceEntryId, int minQuantity, OrderByComparator<CommerceTierPriceEntry> orderByComparator) { return getPersistence() .fetchByC_LtM_First(commercePriceEntryId, minQuantity, orderByComparator); }
class class_name[name] begin[{] method[fetchByC_LtM_First, return_type[type[CommerceTierPriceEntry]], modifier[public static], parameter[commercePriceEntryId, minQuantity, orderByComparator]] begin[{] return[call[.getPersistence, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[CommerceTierPriceEntry] identifier[fetchByC_LtM_First] operator[SEP] Keyword[long] identifier[commercePriceEntryId] , Keyword[int] identifier[minQuantity] , identifier[OrderByComparator] operator[<] identifier[CommerceTierPriceEntry] operator[>] identifier[orderByComparator]...
public @NonNull Optional<T> get(final @NonNull String name) { return Optional.ofNullable(this.byName.get(name)); }
class class_name[name] begin[{] method[get, return_type[type[Optional]], modifier[public], parameter[name]] begin[{] return[call[Optional.ofNullable, parameter[THIS[member[None.byName]call[None.get, parameter[member[.name]]]]]]] end[}] END[}]
Keyword[public] annotation[@] identifier[NonNull] identifier[Optional] operator[<] identifier[T] operator[>] identifier[get] operator[SEP] Keyword[final] annotation[@] identifier[NonNull] identifier[String] identifier[name] operator[SEP] { Keyword[return] identifier[Optional] operator[SEP] identifier[ofNullable]...
public XSS json(final JsonEscapeType type, final JsonEscapeLevel level) { this.jsonlevel = requireNonNull(level, "Level required."); this.jsontype = requireNonNull(type, "Type required."); return this; }
class class_name[name] begin[{] method[json, return_type[type[XSS]], modifier[public], parameter[type, level]] begin[{] assign[THIS[member[None.jsonlevel]], call[.requireNonNull, parameter[member[.level], literal["Level required."]]]] assign[THIS[member[None.jsontype]], call[.re...
Keyword[public] identifier[XSS] identifier[json] operator[SEP] Keyword[final] identifier[JsonEscapeType] identifier[type] , Keyword[final] identifier[JsonEscapeLevel] identifier[level] operator[SEP] { Keyword[this] operator[SEP] identifier[jsonlevel] operator[=] identifier[requireNonNull] operator[SEP] identifi...
protected ReturnCode determineReturnCode(ReturnCode txFilterCode, ReturnCode subFilterCode) { // Return the more restrictive of the two filter responses switch (subFilterCode) { case INCLUDE: return txFilterCode; case INCLUDE_AND_NEXT_COL: return ReturnCode.INCLUDE_AND_NEXT_COL; ...
class class_name[name] begin[{] method[determineReturnCode, return_type[type[ReturnCode]], modifier[protected], parameter[txFilterCode, subFilterCode]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['INCLUDE'], statements=[ReturnStatement(expression=MemberReference(member=txFilterCode, postf...
Keyword[protected] identifier[ReturnCode] identifier[determineReturnCode] operator[SEP] identifier[ReturnCode] identifier[txFilterCode] , identifier[ReturnCode] identifier[subFilterCode] operator[SEP] { Keyword[switch] operator[SEP] identifier[subFilterCode] operator[SEP] { Keyword[case] identifier[I...
@Override public GetLoadBalancerResult getLoadBalancer(GetLoadBalancerRequest request) { request = beforeClientExecution(request); return executeGetLoadBalancer(request); }
class class_name[name] begin[{] method[getLoadBalancer, return_type[type[GetLoadBalancerResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeGetLoadBalancer, parameter[member[.req...
annotation[@] identifier[Override] Keyword[public] identifier[GetLoadBalancerResult] identifier[getLoadBalancer] operator[SEP] identifier[GetLoadBalancerRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] o...
protected static Cpe parse23(String cpeString, boolean lenient) throws CpeParsingException { if (cpeString == null || cpeString.isEmpty()) { throw new CpeParsingException("CPE String is null ir enpty - unable to parse"); } CpeBuilder cb = new CpeBuilder(); Cpe23PartIterator c...
class class_name[name] begin[{] method[parse23, return_type[type[Cpe]], modifier[static protected], parameter[cpeString, lenient]] begin[{] if[binary_operation[binary_operation[member[.cpeString], ==, literal[null]], ||, call[cpeString.isEmpty, parameter[]]]] begin[{] ThrowStatement...
Keyword[protected] Keyword[static] identifier[Cpe] identifier[parse23] operator[SEP] identifier[String] identifier[cpeString] , Keyword[boolean] identifier[lenient] operator[SEP] Keyword[throws] identifier[CpeParsingException] { Keyword[if] operator[SEP] identifier[cpeString] operator[==] Other[null] operator[|...
public static TermColor getColorByFunction(TermFunction func) { List<Term<?>> args = func.getSeparatedValues(CSSFactory.getTermFactory().createOperator(','), false); if (args != null) { if ((COLOR_RGB_NAME.equals(func.getFunctionName()) && args.size() == COLOR_PARAMS_COUNT) ...
class class_name[name] begin[{] method[getColorByFunction, return_type[type[TermColor]], modifier[public static], parameter[func]] begin[{] local_variable[type[List], args] if[binary_operation[member[.args], !=, literal[null]]] begin[{] if[binary_operation[binary...
Keyword[public] Keyword[static] identifier[TermColor] identifier[getColorByFunction] operator[SEP] identifier[TermFunction] identifier[func] operator[SEP] { identifier[List] operator[<] identifier[Term] operator[<] operator[?] operator[>] operator[>] identifier[args] operator[=] identifier[func] operator[SEP] id...
public static Lang preferred(Application app, List<Lang> availableLangs) { play.api.i18n.Langs langs = app.injector().instanceOf(play.api.i18n.Langs.class); Stream<Lang> stream = availableLangs.stream(); List<play.api.i18n.Lang> langSeq = stream.map(l -> new play.api.i18n.Lang(l.toLocale())).collect...
class class_name[name] begin[{] method[preferred, return_type[type[Lang]], modifier[public static], parameter[app, availableLangs]] begin[{] local_variable[type[play], langs] local_variable[type[Stream], stream] local_variable[type[List], langSeq] return[ClassCreator(arguments=[...
Keyword[public] Keyword[static] identifier[Lang] identifier[preferred] operator[SEP] identifier[Application] identifier[app] , identifier[List] operator[<] identifier[Lang] operator[>] identifier[availableLangs] operator[SEP] { identifier[play] operator[SEP] identifier[api] operator[SEP] identifier[i18n] operat...
public HSSFWorkbook toExcel(Collection<Object[]> datas, String propertyShowKeys) throws Exception { // 建立新HSSFWorkbook对象 HSSFWorkbook wb = new HSSFWorkbook(); return toExcel(wb, "export data", datas, propertyShowKeys); }
class class_name[name] begin[{] method[toExcel, return_type[type[HSSFWorkbook]], modifier[public], parameter[datas, propertyShowKeys]] begin[{] local_variable[type[HSSFWorkbook], wb] return[call[.toExcel, parameter[member[.wb], literal["export data"], member[.datas], member[.propertyShowKeys]]]...
Keyword[public] identifier[HSSFWorkbook] identifier[toExcel] operator[SEP] identifier[Collection] operator[<] identifier[Object] operator[SEP] operator[SEP] operator[>] identifier[datas] , identifier[String] identifier[propertyShowKeys] operator[SEP] Keyword[throws] identifier[Exception] { identifier[HSSFWorkbo...
public List<Filter> getAllFiltersForField(String field) { List<Filter> foundFilters = new ArrayList<>(); for (Filter filter : this.filters) { if (filter.getField().equals(field)) { foundFilters.add(filter); } } return Collections.unmodifiableList(foundFilters); }
class class_name[name] begin[{] method[getAllFiltersForField, return_type[type[List]], modifier[public], parameter[field]] begin[{] local_variable[type[List], foundFilters] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getFi...
Keyword[public] identifier[List] operator[<] identifier[Filter] operator[>] identifier[getAllFiltersForField] operator[SEP] identifier[String] identifier[field] operator[SEP] { identifier[List] operator[<] identifier[Filter] operator[>] identifier[foundFilters] operator[=] Keyword[new] identifier[ArrayList] oper...
@SuppressWarnings("unchecked") public <T extends Tree> List<T> getLeaves(List<T> list) { if (isLeaf()) { list.add((T) this); } else { for (Tree kid : children()) { kid.getLeaves(list); } } return list; }
class class_name[name] begin[{] method[getLeaves, return_type[type[List]], modifier[public], parameter[list]] begin[{] if[call[.isLeaf, parameter[]]] begin[{] call[list.add, parameter[Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selecto...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[Tree] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[getLeaves] operator[SEP] identifier[List] operator[<] identifier[T] operator[>]...
@Override @Trivial public void cleanUpState(VirtualConnection vc) { vc.getStateMap().remove(HttpDispatcherLink.LINK_ID); }
class class_name[name] begin[{] method[cleanUpState, return_type[void], modifier[public], parameter[vc]] begin[{] call[vc.getStateMap, parameter[]] end[}] END[}]
annotation[@] identifier[Override] annotation[@] identifier[Trivial] Keyword[public] Keyword[void] identifier[cleanUpState] operator[SEP] identifier[VirtualConnection] identifier[vc] operator[SEP] { identifier[vc] operator[SEP] identifier[getStateMap] operator[SEP] operator[SEP] operator[SEP] identifier[remove] ...
public UrlBuilder withQuery(String query) { if (query == null || query.isEmpty()) { this.query.clear(); } else { with(query, UrlTokenizerState.QUERY); } return this; }
class class_name[name] begin[{] method[withQuery, return_type[type[UrlBuilder]], modifier[public], parameter[query]] begin[{] if[binary_operation[binary_operation[member[.query], ==, literal[null]], ||, call[query.isEmpty, parameter[]]]] begin[{] THIS[member[None.query]c...
Keyword[public] identifier[UrlBuilder] identifier[withQuery] operator[SEP] identifier[String] identifier[query] operator[SEP] { Keyword[if] operator[SEP] identifier[query] operator[==] Other[null] operator[||] identifier[query] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { ...
public static void showText(Activity activity, int textResourceId, Style style) { showText(activity, activity.getString(textResourceId), style); }
class class_name[name] begin[{] method[showText, return_type[void], modifier[public static], parameter[activity, textResourceId, style]] begin[{] call[.showText, parameter[member[.activity], call[activity.getString, parameter[member[.textResourceId]]], member[.style]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[showText] operator[SEP] identifier[Activity] identifier[activity] , Keyword[int] identifier[textResourceId] , identifier[Style] identifier[style] operator[SEP] { identifier[showText] operator[SEP] identifier[activity] , identifier[activity] operator[SEP...
public void setByte(int index, int value) { checkPositionIndexes(index, index + SIZE_OF_BYTE, this.length); index += offset; data[index] = (byte) value; }
class class_name[name] begin[{] method[setByte, return_type[void], modifier[public], parameter[index, value]] begin[{] call[.checkPositionIndexes, parameter[member[.index], binary_operation[member[.index], +, member[.SIZE_OF_BYTE]], THIS[member[None.length]]]] assign[member[.ind...
Keyword[public] Keyword[void] identifier[setByte] operator[SEP] Keyword[int] identifier[index] , Keyword[int] identifier[value] operator[SEP] { identifier[checkPositionIndexes] operator[SEP] identifier[index] , identifier[index] operator[+] identifier[SIZE_OF_BYTE] , Keyword[this] operator[SEP] identifier[len...
@Override public void run() { try { // Set up Path path = FileSystems.getDefault().getPath(this.path); watcher = FileSystems.getDefault().newWatchService(); Scanner.start(path, watcher); while (true) { // Reload when notified ...
class class_name[name] begin[{] method[run, return_type[void], modifier[public], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getDefault, postfix_operators=[], prefix_o...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] { Keyword[try] { identifier[Path] identifier[path] operator[=] identifier[FileSystems] operator[SEP] identifier[getDefault] operator[SEP] operator[SEP] operator[SEP] identifier[getPath] operato...
public String getContentReplayPrefixString(int size, Charset cs) { try { InputStreamReader isr = new InputStreamReader(getContentReplayInputStream(), cs); char[] chars = new char[size]; int count = isr.read(chars); isr.close(); if (count > 0) { ...
class class_name[name] begin[{] method[getContentReplayPrefixString, return_type[type[String]], modifier[public], parameter[size, cs]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocatio...
Keyword[public] identifier[String] identifier[getContentReplayPrefixString] operator[SEP] Keyword[int] identifier[size] , identifier[Charset] identifier[cs] operator[SEP] { Keyword[try] { identifier[InputStreamReader] identifier[isr] operator[=] Keyword[new] identifier[InputStreamReader] operator[SEP...
public Certificate bytesToCertificate(byte[] certBytes) throws CryptoException { if (certBytes == null || certBytes.length == 0) { throw new CryptoException("bytesToCertificate: input null or zero length"); } return getX509Certificate(certBytes); // X509Certificate certificat...
class class_name[name] begin[{] method[bytesToCertificate, return_type[type[Certificate]], modifier[public], parameter[certBytes]] begin[{] if[binary_operation[binary_operation[member[.certBytes], ==, literal[null]], ||, binary_operation[member[certBytes.length], ==, literal[0]]]] begin[{] ...
Keyword[public] identifier[Certificate] identifier[bytesToCertificate] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[certBytes] operator[SEP] Keyword[throws] identifier[CryptoException] { Keyword[if] operator[SEP] identifier[certBytes] operator[==] Other[null] operator[||] identifier[certByt...
private DataModel createDataModel() { Object value = getValue(); if (value == null) { return EMPTY_DATA_MODEL; } else if (value instanceof DataModel) { return (DataModel) value; } else { DataModel dataModel ...
class class_name[name] begin[{] method[createDataModel, return_type[type[DataModel]], modifier[private], parameter[]] begin[{] local_variable[type[Object], value] if[binary_operation[member[.value], ==, literal[null]]] begin[{] return[member[.EMPTY_DATA_MODEL]] else ...
Keyword[private] identifier[DataModel] identifier[createDataModel] operator[SEP] operator[SEP] { identifier[Object] identifier[value] operator[=] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] { Keyword[...
public static String getElementSetter(Element element) { // 後続処理注意 hogeに対して sethoge が取得される. setHoge ではない. String setterName = null; if (isPrimitiveBoolean(element)) { Pattern pattern = Pattern.compile("^is[^a-z].*$"); Matcher matcher = pattern.matcher(element.getSimpleName().toString()); if (matcher.matc...
class class_name[name] begin[{] method[getElementSetter, return_type[type[String]], modifier[public static], parameter[element]] begin[{] local_variable[type[String], setterName] if[call[.isPrimitiveBoolean, parameter[member[.element]]]] begin[{] local_variable[type[Pattern]...
Keyword[public] Keyword[static] identifier[String] identifier[getElementSetter] operator[SEP] identifier[Element] identifier[element] operator[SEP] { identifier[String] identifier[setterName] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[isPrimitiveBoolean] operator[SEP] identifier[e...
void decodeRequestLine(char[] buf, int len) throws IOException { // Search for first space separated chunk int s1 = -1, s2 = -1, s3 = -1; int state = 0; startloop: for (int i = 0; i < len; i++) { char c = buf[i]; switch (state) { ...
class class_name[name] begin[{] method[decodeRequestLine, return_type[void], modifier[default], parameter[buf, len]] begin[{] local_variable[type[int], s1] local_variable[type[int], state] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], ...
Keyword[void] identifier[decodeRequestLine] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[buf] , Keyword[int] identifier[len] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[int] identifier[s1] operator[=] operator[-] Other[1] , identifier[s2] operator[=] operator[-] Other[...
public static BsonDocument copyOfDocument(final BsonDocument document) { final BsonDocument newDocument = new BsonDocument(); for (final Map.Entry<String, BsonValue> kv : document.entrySet()) { newDocument.put(kv.getKey(), kv.getValue()); } return newDocument; }
class class_name[name] begin[{] method[copyOfDocument, return_type[type[BsonDocument]], modifier[public static], parameter[document]] begin[{] local_variable[type[BsonDocument], newDocument] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation...
Keyword[public] Keyword[static] identifier[BsonDocument] identifier[copyOfDocument] operator[SEP] Keyword[final] identifier[BsonDocument] identifier[document] operator[SEP] { Keyword[final] identifier[BsonDocument] identifier[newDocument] operator[=] Keyword[new] identifier[BsonDocument] operator[SEP] operator[S...
public DateUnit add() { if (this.add.isPresent()) { return add.get(); } return (this.add = Optional.of((DateUnit) new DateUnit(this) { @Override protected DateUnit handle(int calendarField, int amount) { Calendar c = asCalendar(); c.add(calendarField, amount); target = c.getTime(); r...
class class_name[name] begin[{] method[add, return_type[type[DateUnit]], modifier[public], parameter[]] begin[{] if[THIS[member[None.add]call[None.isPresent, parameter[]]]] begin[{] return[call[add.get, parameter[]]] else begin[{] None end[}] return[assign[TH...
Keyword[public] identifier[DateUnit] identifier[add] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[add] operator[SEP] identifier[isPresent] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[add] operator[SEP] identifier[get] operato...
public CreateTransactionResult createTransaction( final long connectionId, final long txnId, final long uniqueId, final StoredProcedureInvocation invocation, final boolean isReadOnly, final boolean isSinglePartition, final boolean isEve...
class class_name[name] begin[{] method[createTransaction, return_type[type[CreateTransactionResult]], modifier[public], parameter[connectionId, txnId, uniqueId, invocation, isReadOnly, isSinglePartition, isEveryPartition, partition, messageSize, nowNanos, isForReplay]] begin[{] return[call[m_dispatcher...
Keyword[public] identifier[CreateTransactionResult] identifier[createTransaction] operator[SEP] Keyword[final] Keyword[long] identifier[connectionId] , Keyword[final] Keyword[long] identifier[txnId] , Keyword[final] Keyword[long] identifier[uniqueId] , Keyword[final] identifier[StoredProcedureInvocation] identifier[...