code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public boolean normalToPlane( double normX , double normY , Point2D_F64 plane ) { // Ray pointing from camera center through pixel to ground in ground reference frame pointing.set(normX,normY,1); GeometryMath_F64.mult(cameraToPlane.getR(), pointing, pointing); double height = cameraToPlane.getY(); // If the...
class class_name[name] begin[{] method[normalToPlane, return_type[type[boolean]], modifier[public], parameter[normX, normY, plane]] begin[{] call[pointing.set, parameter[member[.normX], member[.normY], literal[1]]] call[GeometryMath_F64.mult, parameter[call[cameraToPlane.getR, p...
Keyword[public] Keyword[boolean] identifier[normalToPlane] operator[SEP] Keyword[double] identifier[normX] , Keyword[double] identifier[normY] , identifier[Point2D_F64] identifier[plane] operator[SEP] { identifier[pointing] operator[SEP] identifier[set] operator[SEP] identifier[normX] , identifier[normY] , O...
public void plus(LinearSparseVector sv, float w) { if (sv == null) return; for (int i = 0; i < sv.length; i++) { float val = (float) sv.data[i] * w; add(sv.index[i], val); } }
class class_name[name] begin[{] method[plus, return_type[void], modifier[public], parameter[sv, w]] begin[{] if[binary_operation[member[.sv], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[Loca...
Keyword[public] Keyword[void] identifier[plus] operator[SEP] identifier[LinearSparseVector] identifier[sv] , Keyword[float] identifier[w] operator[SEP] { Keyword[if] operator[SEP] identifier[sv] operator[==] Other[null] operator[SEP] Keyword[return] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifi...
private String _getIdFromClientId(String clientId) { final char separator = getFacesContext().getNamingContainerSeparatorChar(); int lastIndex = clientId.lastIndexOf(separator); String id = null; if (lastIndex < 0) { id = clientId; } else if (lastIndex < (clientId.length() - 1)) ...
class class_name[name] begin[{] method[_getIdFromClientId, return_type[type[String]], modifier[private], parameter[clientId]] begin[{] local_variable[type[char], separator] local_variable[type[int], lastIndex] local_variable[type[String], id] if[binary_operation[member[....
Keyword[private] identifier[String] identifier[_getIdFromClientId] operator[SEP] identifier[String] identifier[clientId] operator[SEP] { Keyword[final] Keyword[char] identifier[separator] operator[=] identifier[getFacesContext] operator[SEP] operator[SEP] operator[SEP] identifier[getNamingContainerSeparatorChar]...
LogMetadata removeEmptyLedgers(int skipCountFromEnd) { val newLedgers = new ArrayList<LedgerMetadata>(); int cutoffIndex = this.ledgers.size() - skipCountFromEnd; for (int i = 0; i < cutoffIndex; i++) { LedgerMetadata lm = this.ledgers.get(i); if (lm.getStatus() != Ledger...
class class_name[name] begin[{] method[removeEmptyLedgers, return_type[type[LogMetadata]], modifier[default], parameter[skipCountFromEnd]] begin[{] local_variable[type[val], newLedgers] local_variable[type[int], cutoffIndex] ForStatement(body=BlockStatement(label=None, statements=[Local...
identifier[LogMetadata] identifier[removeEmptyLedgers] operator[SEP] Keyword[int] identifier[skipCountFromEnd] operator[SEP] { identifier[val] identifier[newLedgers] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[LedgerMetadata] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword...
public static <E> ImmutableSortedMultiset<E> copyOfSorted(SortedMultiset<E> sortedMultiset) { return copyOfSortedEntries( sortedMultiset.comparator(), Lists.newArrayList(sortedMultiset.entrySet())); }
class class_name[name] begin[{] method[copyOfSorted, return_type[type[ImmutableSortedMultiset]], modifier[public static], parameter[sortedMultiset]] begin[{] return[call[.copyOfSortedEntries, parameter[call[sortedMultiset.comparator, parameter[]], call[Lists.newArrayList, parameter[call[sortedMultiset....
Keyword[public] Keyword[static] operator[<] identifier[E] operator[>] identifier[ImmutableSortedMultiset] operator[<] identifier[E] operator[>] identifier[copyOfSorted] operator[SEP] identifier[SortedMultiset] operator[<] identifier[E] operator[>] identifier[sortedMultiset] operator[SEP] { Keyword[return] identi...
protected final String findOrCreateAttrPrefix(String suggPrefix, String nsURI, SimpleOutputElement elem) throws XMLStreamException { if (nsURI == null || nsURI.length() == 0) { /* Attributes never use the default namespace; missing ...
class class_name[name] begin[{] method[findOrCreateAttrPrefix, return_type[type[String]], modifier[final protected], parameter[suggPrefix, nsURI, elem]] begin[{] if[binary_operation[binary_operation[member[.nsURI], ==, literal[null]], ||, binary_operation[call[nsURI.length, parameter[]], ==, li...
Keyword[protected] Keyword[final] identifier[String] identifier[findOrCreateAttrPrefix] operator[SEP] identifier[String] identifier[suggPrefix] , identifier[String] identifier[nsURI] , identifier[SimpleOutputElement] identifier[elem] operator[SEP] Keyword[throws] identifier[XMLStreamException] { Keyword[if] op...
protected CmsResourceState internalReadResourceState(CmsDbContext dbc, CmsUUID projectId, CmsResource resource) throws CmsDbSqlException { CmsResourceState state = CmsResource.STATE_KEEP; Connection conn = null; PreparedStatement stmt = null; ResultSet res = null; try { ...
class class_name[name] begin[{] method[internalReadResourceState, return_type[type[CmsResourceState]], modifier[protected], parameter[dbc, projectId, resource]] begin[{] local_variable[type[CmsResourceState], state] local_variable[type[Connection], conn] local_variable[type[PreparedStat...
Keyword[protected] identifier[CmsResourceState] identifier[internalReadResourceState] operator[SEP] identifier[CmsDbContext] identifier[dbc] , identifier[CmsUUID] identifier[projectId] , identifier[CmsResource] identifier[resource] operator[SEP] Keyword[throws] identifier[CmsDbSqlException] { identifier[CmsRes...
public String getMDBProxyClassName() { StringBuilder result = new StringBuilder(); // Use the package of the MDB implementation. String packageName = packageName(ivBeanClass); if (packageName != null) { result.append(packageName); result.append('.'); ...
class class_name[name] begin[{] method[getMDBProxyClassName, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[StringBuilder], result] local_variable[type[String], packageName] if[binary_operation[member[.packageName], !=, literal[null]]] beg...
Keyword[public] identifier[String] identifier[getMDBProxyClassName] operator[SEP] operator[SEP] { identifier[StringBuilder] identifier[result] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[packageName] operator[=] identifier[packageName...
protected final NameID decryptEncryptedId(final EncryptedID encryptedId, final Decrypter decrypter) throws SAMLException { if (encryptedId == null) { return null; } if (decrypter == null) { logger.warn("Encrypted attributes returned, but no keystore was provided."); ...
class class_name[name] begin[{] method[decryptEncryptedId, return_type[type[NameID]], modifier[final protected], parameter[encryptedId, decrypter]] begin[{] if[binary_operation[member[.encryptedId], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None ...
Keyword[protected] Keyword[final] identifier[NameID] identifier[decryptEncryptedId] operator[SEP] Keyword[final] identifier[EncryptedID] identifier[encryptedId] , Keyword[final] identifier[Decrypter] identifier[decrypter] operator[SEP] Keyword[throws] identifier[SAMLException] { Keyword[if] operator[SEP] identi...
public Expression<Short> lte(short value) { String valueString = "'" + value + "'"; return new Expression<Short>(this, Operation.lte, valueString); }
class class_name[name] begin[{] method[lte, return_type[type[Expression]], modifier[public], parameter[value]] begin[{] local_variable[type[String], valueString] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=...
Keyword[public] identifier[Expression] operator[<] identifier[Short] operator[>] identifier[lte] operator[SEP] Keyword[short] identifier[value] operator[SEP] { identifier[String] identifier[valueString] operator[=] literal[String] operator[+] identifier[value] operator[+] literal[String] operator[SEP] Keyword[re...
private boolean canPasteFromClipboard() { try { return textComponent.getTransferHandler().canImport( textComponent, Toolkit.getDefaultToolkit().getSystemClipboard().getContents(textComponent) .getTransferDataFlavors()); } catch (IllegalStateException e) { /* * as the javadoc of Clipboar...
class class_name[name] begin[{] method[canPasteFromClipboard, return_type[type[boolean]], modifier[private], parameter[]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getTransferHandler, postfix_operators=[], prefix_operators=[], qualifier=textComponent,...
Keyword[private] Keyword[boolean] identifier[canPasteFromClipboard] operator[SEP] operator[SEP] { Keyword[try] { Keyword[return] identifier[textComponent] operator[SEP] identifier[getTransferHandler] operator[SEP] operator[SEP] operator[SEP] identifier[canImport] operator[SEP] identifier[textComponent...
public void determineCacheProvider() { this.defaultProvider = true; if (cacheProviderName.equals("")) { cacheProviderName = CacheConfig.CACHE_PROVIDER_DYNACACHE; } if (!cacheProviderName.equals(CACHE_PROVIDER_DYNACACHE)) { defaultProvider = false; if (...
class class_name[name] begin[{] method[determineCacheProvider, return_type[void], modifier[public], parameter[]] begin[{] assign[THIS[member[None.defaultProvider]], literal[true]] if[call[cacheProviderName.equals, parameter[literal[""]]]] begin[{] assign[...
Keyword[public] Keyword[void] identifier[determineCacheProvider] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[defaultProvider] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[cacheProviderName] operator[SEP] identifier[equals] operator[SEP] literal[String] ...
private static void encodeFormFields(final StringBuilder sb, final String content, final Charset charset) { urlEncode(sb, content, (charset != null) ? charset : Charsets.UTF_8, URLENCODER, true); }
class class_name[name] begin[{] method[encodeFormFields, return_type[void], modifier[private static], parameter[sb, content, charset]] begin[{] call[.urlEncode, parameter[member[.sb], member[.content], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=charset, postfix_...
Keyword[private] Keyword[static] Keyword[void] identifier[encodeFormFields] operator[SEP] Keyword[final] identifier[StringBuilder] identifier[sb] , Keyword[final] identifier[String] identifier[content] , Keyword[final] identifier[Charset] identifier[charset] operator[SEP] { identifier[urlEncode] operator[SEP] ...
@UiThread public void addMarker(@NonNull MarkerView markerView) { if (mapView.isDestroyed() || markers.contains(markerView)) { return; } if (!initialised) { initialised = true; mapView.addOnDidFinishRenderingFrameListener(this); } markerView.setProjection(mapboxMap.getProjection...
class class_name[name] begin[{] method[addMarker, return_type[void], modifier[public], parameter[markerView]] begin[{] if[binary_operation[call[mapView.isDestroyed, parameter[]], ||, call[markers.contains, parameter[member[.markerView]]]]] begin[{] return[None] else begin[{]...
annotation[@] identifier[UiThread] Keyword[public] Keyword[void] identifier[addMarker] operator[SEP] annotation[@] identifier[NonNull] identifier[MarkerView] identifier[markerView] operator[SEP] { Keyword[if] operator[SEP] identifier[mapView] operator[SEP] identifier[isDestroyed] operator[SEP] operator[SEP] oper...
protected void configureProfiles(ConfigurableEnvironment environment, String[] args) { environment.getActiveProfiles(); // ensure they are initialized // But these ones should go first (last wins in a property key clash) Set<String> profiles = new LinkedHashSet<>(this.additionalProfiles); profiles.addAll(Arrays...
class class_name[name] begin[{] method[configureProfiles, return_type[void], modifier[protected], parameter[environment, args]] begin[{] call[environment.getActiveProfiles, parameter[]] local_variable[type[Set], profiles] call[profiles.addAll, parameter[call[Arrays.asLis...
Keyword[protected] Keyword[void] identifier[configureProfiles] operator[SEP] identifier[ConfigurableEnvironment] identifier[environment] , identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] { identifier[environment] operator[SEP] identifier[getActiveProfiles] operator[SEP] operator[SE...
@Override public boolean needsTaskCommit(TaskAttemptContext context ) throws IOException { return workPath != null && outputFileSystem.exists(workPath); }
class class_name[name] begin[{] method[needsTaskCommit, return_type[type[boolean]], modifier[public], parameter[context]] begin[{] return[binary_operation[binary_operation[member[.workPath], !=, literal[null]], &&, call[outputFileSystem.exists, parameter[member[.workPath]]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[needsTaskCommit] operator[SEP] identifier[TaskAttemptContext] identifier[context] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[return] identifier[workPath] operator[!=] Other[null] operator[&&] identifier[outputFile...
public static void setExecutor(Executor executor) { Validate.notNull(executor, "executor"); synchronized (LOCK) { Settings.executor = executor; } }
class class_name[name] begin[{] method[setExecutor, return_type[void], modifier[public static], parameter[executor]] begin[{] call[Validate.notNull, parameter[member[.executor], literal["executor"]]] SYNCHRONIZED[member[.LOCK]] BEGIN[{] assign[member[Sett...
Keyword[public] Keyword[static] Keyword[void] identifier[setExecutor] operator[SEP] identifier[Executor] identifier[executor] operator[SEP] { identifier[Validate] operator[SEP] identifier[notNull] operator[SEP] identifier[executor] , literal[String] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP...
private void fireOnUnbind(ChannelEvent e) { List<EventListener> listeners = changes.getListenerList(AMQP); for (EventListener listener : listeners) { ChannelListener amqpListener = (ChannelListener)listener; amqpListener.onUnbind(e); } }
class class_name[name] begin[{] method[fireOnUnbind, return_type[void], modifier[private], parameter[e]] begin[{] local_variable[type[List], listeners] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[]...
Keyword[private] Keyword[void] identifier[fireOnUnbind] operator[SEP] identifier[ChannelEvent] identifier[e] operator[SEP] { identifier[List] operator[<] identifier[EventListener] operator[>] identifier[listeners] operator[=] identifier[changes] operator[SEP] identifier[getListenerList] operator[SEP] identifier[...
public void close() { lock.lock(); try { if (this.closed) { return; } if (!this.inited) { return; } if (logStatsThread != null) { logStatsThread.interrupt(); } if (creat...
class class_name[name] begin[{] method[close, return_type[void], modifier[public], parameter[]] begin[{] call[lock.lock, parameter[]] TryStatement(block=[IfStatement(condition=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=closed, postf...
Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] { identifier[lock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[closed] operator[SEP] { Keyword[return]...
public static boolean matchesRobotsPattern(String pattern, String path) { return robotsPatternToRegexp(pattern).matcher(path).matches(); }
class class_name[name] begin[{] method[matchesRobotsPattern, return_type[type[boolean]], modifier[public static], parameter[pattern, path]] begin[{] return[call[.robotsPatternToRegexp, parameter[member[.pattern]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[matchesRobotsPattern] operator[SEP] identifier[String] identifier[pattern] , identifier[String] identifier[path] operator[SEP] { Keyword[return] identifier[robotsPatternToRegexp] operator[SEP] identifier[pattern] operator[SEP] operator[SEP] identifier[...
public static Object readObject(final File source) throws IOException, ClassNotFoundException { Object result = null; FileInputStream fis = null; BufferedInputStream bis = null; ObjectInputStream ois = null; try { fis = new FileInputStream(source); bis = new BufferedInputStream(fis); ois = new Objec...
class class_name[name] begin[{] method[readObject, return_type[type[Object]], modifier[public static], parameter[source]] begin[{] local_variable[type[Object], result] local_variable[type[FileInputStream], fis] local_variable[type[BufferedInputStream], bis] local_variable[type[O...
Keyword[public] Keyword[static] identifier[Object] identifier[readObject] operator[SEP] Keyword[final] identifier[File] identifier[source] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ClassNotFoundException] { identifier[Object] identifier[result] operator[=] Other[null] operator[SEP] iden...
public boolean isSessionToken(String site, String token) { // Add a default port if (!site.contains(":")) { site = site + (":80"); } HttpSessionTokensSet siteTokens = sessionTokens.get(site); if (siteTokens == null) return false; return siteTokens.isSessionToken(token); }
class class_name[name] begin[{] method[isSessionToken, return_type[type[boolean]], modifier[public], parameter[site, token]] begin[{] if[call[site.contains, parameter[literal[":"]]]] begin[{] assign[member[.site], binary_operation[member[.site], +, literal[":80"]]] ...
Keyword[public] Keyword[boolean] identifier[isSessionToken] operator[SEP] identifier[String] identifier[site] , identifier[String] identifier[token] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[site] operator[SEP] identifier[contains] operator[SEP] literal[String] operator[SEP] operator[SEP]...
public static void setGlobalScope (@Nonnull final IGlobalScope aGlobalScope) { ValueEnforcer.notNull (aGlobalScope, "GlobalScope"); s_aGlobalLock.locked ( () -> { if (s_aGlobalScope != null) throw new IllegalStateException ("Another global scope with ID '" + ...
class class_name[name] begin[{] method[setGlobalScope, return_type[void], modifier[public static], parameter[aGlobalScope]] begin[{] call[ValueEnforcer.notNull, parameter[member[.aGlobalScope], literal["GlobalScope"]]] call[s_aGlobalLock.locked, parameter[LambdaExpression(body=[...
Keyword[public] Keyword[static] Keyword[void] identifier[setGlobalScope] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[IGlobalScope] identifier[aGlobalScope] operator[SEP] { identifier[ValueEnforcer] operator[SEP] identifier[notNull] operator[SEP] identifier[aGlobalScope] , literal[S...
boolean isStarvedForMinShare(JobInfo info, TaskType taskType) { float starvingThreshold = (float) (minTasks(info, taskType) * 0.9); return runningTasks(info, taskType) < starvingThreshold; }
class class_name[name] begin[{] method[isStarvedForMinShare, return_type[type[boolean]], modifier[default], parameter[info, taskType]] begin[{] local_variable[type[float], starvingThreshold] return[binary_operation[call[.runningTasks, parameter[member[.info], member[.taskType]]], <, member[.sta...
Keyword[boolean] identifier[isStarvedForMinShare] operator[SEP] identifier[JobInfo] identifier[info] , identifier[TaskType] identifier[taskType] operator[SEP] { Keyword[float] identifier[starvingThreshold] operator[=] operator[SEP] Keyword[float] operator[SEP] operator[SEP] identifier[minTasks] operator[SEP] id...
private void removeStateItemStreams(Transaction transaction) throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "removeStateItemStreams", transaction ); try { // Clean up mqlink state stream. This is a raw itemstream so // w...
class class_name[name] begin[{] method[removeStateItemStreams, return_type[void], modifier[private], parameter[transaction]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, para...
Keyword[private] Keyword[void] identifier[removeStateItemStreams] operator[SEP] identifier[Transaction] identifier[transaction] operator[SEP] Keyword[throws] identifier[SIResourceException] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator...
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); // ICU 4.8 custom deserialization. String languageTag = (String)in.readObject(); ulocale = ULocale.forLanguageTag(languageTag); MessagePattern.ApostropheMode aposMod...
class class_name[name] begin[{] method[readObject, return_type[void], modifier[private], parameter[in]] begin[{] call[in.defaultReadObject, parameter[]] local_variable[type[String], languageTag] assign[member[.ulocale], call[ULocale.forLanguageTag, parameter[member[.lang...
Keyword[private] Keyword[void] identifier[readObject] operator[SEP] identifier[ObjectInputStream] identifier[in] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ClassNotFoundException] { identifier[in] operator[SEP] identifier[defaultReadObject] operator[SEP] operator[SEP] operator[SEP] ident...
public static Graph copyTo(Graph fromGraph, Graph toGraph) { AllEdgesIterator eIter = fromGraph.getAllEdges(); while (eIter.next()) { int base = eIter.getBaseNode(); int adj = eIter.getAdjNode(); toGraph.edge(base, adj).copyPropertiesFrom(eIter); } No...
class class_name[name] begin[{] method[copyTo, return_type[type[Graph]], modifier[public static], parameter[fromGraph, toGraph]] begin[{] local_variable[type[AllEdgesIterator], eIter] while[call[eIter.next, parameter[]]] begin[{] local_variable[type[int], base] l...
Keyword[public] Keyword[static] identifier[Graph] identifier[copyTo] operator[SEP] identifier[Graph] identifier[fromGraph] , identifier[Graph] identifier[toGraph] operator[SEP] { identifier[AllEdgesIterator] identifier[eIter] operator[=] identifier[fromGraph] operator[SEP] identifier[getAllEdges] operator[SEP] ...
public static String[] tokenize( String s, char separator ) { if( s == null || s.length() == 0 ) { return null; } int start = 0; int stop = 0; ArrayList tokens = new ArrayList(); while( start <= s.length() ) { stop = s.indexOf( separator, start ); if( stop == -1 ) ...
class class_name[name] begin[{] method[tokenize, return_type[type[String]], modifier[public static], parameter[s, separator]] begin[{] if[binary_operation[binary_operation[member[.s], ==, literal[null]], ||, binary_operation[call[s.length, parameter[]], ==, literal[0]]]] begin[{] re...
Keyword[public] Keyword[static] identifier[String] operator[SEP] operator[SEP] identifier[tokenize] operator[SEP] identifier[String] identifier[s] , Keyword[char] identifier[separator] operator[SEP] { Keyword[if] operator[SEP] identifier[s] operator[==] Other[null] operator[||] identifier[s] operator[SEP] ident...
public static String httpRequest(String stringUrl, String method, Map<String, String> parameters, String input, String charset) throws IOException { URL url = new URL(stringUrl); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setDoOutput(true); conn.setRequestMethod(method...
class class_name[name] begin[{] method[httpRequest, return_type[type[String]], modifier[public static], parameter[stringUrl, method, parameters, input, charset]] begin[{] local_variable[type[URL], url] local_variable[type[HttpURLConnection], conn] call[conn.setDoOutput, paramete...
Keyword[public] Keyword[static] identifier[String] identifier[httpRequest] operator[SEP] identifier[String] identifier[stringUrl] , identifier[String] identifier[method] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[parameters] , identifier[String] identifier[input] , ...
public boolean is(@NotNull String type) { String ct = getHeader("Content-Type"); if (ct == null) { return false; } // get the content type only (exclude charset) ct = ct.split(";")[0]; // if we received an incomplete CT if (type.indexOf('/') == -1) { ...
class class_name[name] begin[{] method[is, return_type[type[boolean]], modifier[public], parameter[type]] begin[{] local_variable[type[String], ct] if[binary_operation[member[.ct], ==, literal[null]]] begin[{] return[literal[false]] else begin[{] None end[}] ...
Keyword[public] Keyword[boolean] identifier[is] operator[SEP] annotation[@] identifier[NotNull] identifier[String] identifier[type] operator[SEP] { identifier[String] identifier[ct] operator[=] identifier[getHeader] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ct...
public static Collector<CharSequence, ?, String> commonPrefix() { final Supplier<Pair<CharSequence, Integer>> supplier = new Supplier<Pair<CharSequence, Integer>>() { @Override public Pair<CharSequence, Integer> get() { return Pair.of(null, -1); } ...
class class_name[name] begin[{] method[commonPrefix, return_type[type[Collector]], modifier[public static], parameter[]] begin[{] local_variable[type[Supplier], supplier] local_variable[type[BiConsumer], accumulator] local_variable[type[BinaryOperator], combiner] local_variable[...
Keyword[public] Keyword[static] identifier[Collector] operator[<] identifier[CharSequence] , operator[?] , identifier[String] operator[>] identifier[commonPrefix] operator[SEP] operator[SEP] { Keyword[final] identifier[Supplier] operator[<] identifier[Pair] operator[<] identifier[CharSequence] , identifier[In...
void copyouts(State old, State newState) { Arc a; assert old != newState; for (a = old.outs; a != null; a = a.outchain) { cparc(a, newState, a.to); } }
class class_name[name] begin[{] method[copyouts, return_type[void], modifier[default], parameter[old, newState]] begin[{] local_variable[type[Arc], a] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=old, postfix_operators=[], prefix_operators=[], qualifier=, selectors=...
Keyword[void] identifier[copyouts] operator[SEP] identifier[State] identifier[old] , identifier[State] identifier[newState] operator[SEP] { identifier[Arc] identifier[a] operator[SEP] Keyword[assert] identifier[old] operator[!=] identifier[newState] operator[SEP] Keyword[for] operator[SEP] identifier[a] operato...
public void close() throws IOException, InterruptedException { channel.close(); channel.join(); if (ownsPool) pool.shutdown(); for (Closeable c : closables) c.close(); }
class class_name[name] begin[{] method[close, return_type[void], modifier[public], parameter[]] begin[{] call[channel.close, parameter[]] call[channel.join, parameter[]] if[member[.ownsPool]] begin[{] call[pool.shutdown, parameter[]] else begi...
Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] , identifier[InterruptedException] { identifier[channel] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[channel] operator[SEP] identifier[join] operator[SEP] ...
@Pure public static Point2d L93_L1(double x, double y) { final Point2d ntfLambdaPhi = NTFLambert_NTFLambdaPhi(x, y, LAMBERT_93_N, LAMBERT_93_C, LAMBERT_93_XS, LAMBERT_93_YS); return NTFLambdaPhi_NTFLambert( ntfLambdaPhi.getX(), ntfLambdaPhi.getY(), LAMBERT_1_N, LAMBERT_1_C, LAMBERT_...
class class_name[name] begin[{] method[L93_L1, return_type[type[Point2d]], modifier[public static], parameter[x, y]] begin[{] local_variable[type[Point2d], ntfLambdaPhi] return[call[.NTFLambdaPhi_NTFLambert, parameter[call[ntfLambdaPhi.getX, parameter[]], call[ntfLambdaPhi.getY, parameter[]], m...
annotation[@] identifier[Pure] Keyword[public] Keyword[static] identifier[Point2d] identifier[L93_L1] operator[SEP] Keyword[double] identifier[x] , Keyword[double] identifier[y] operator[SEP] { Keyword[final] identifier[Point2d] identifier[ntfLambdaPhi] operator[=] identifier[NTFLambert_NTFLambdaPhi] operator[S...
public static DataSource getDataSource() { if(dataSource == null) { synchronized (JdbcHelper.class) { if(dataSource == null) { initialize(); } } } AssertHelper.notNull(dataSource); return dataSource; }
class class_name[name] begin[{] method[getDataSource, return_type[type[DataSource]], modifier[public static], parameter[]] begin[{] if[binary_operation[member[.dataSource], ==, literal[null]]] begin[{] SYNCHRONIZED[ClassReference(postfix_operators=[], prefix_operators=[]...
Keyword[public] Keyword[static] identifier[DataSource] identifier[getDataSource] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[dataSource] operator[==] Other[null] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[JdbcHelper] operator[SEP] Keyword[class] operator[SEP]...
public static byte[] toByteArray(short s, ByteOrder bo) { return ByteBuffer.allocate(2).order(bo).putShort(s).array(); }
class class_name[name] begin[{] method[toByteArray, return_type[type[byte]], modifier[public static], parameter[s, bo]] begin[{] return[call[ByteBuffer.allocate, parameter[literal[2]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[toByteArray] operator[SEP] Keyword[short] identifier[s] , identifier[ByteOrder] identifier[bo] operator[SEP] { Keyword[return] identifier[ByteBuffer] operator[SEP] identifier[allocate] operator[SEP] Other[2] operator[SEP] opera...
public AskFuture ask(ActorRef ref, long timeout) { return askPattern.ask(ref, timeout, null); }
class class_name[name] begin[{] method[ask, return_type[type[AskFuture]], modifier[public], parameter[ref, timeout]] begin[{] return[call[askPattern.ask, parameter[member[.ref], member[.timeout], literal[null]]]] end[}] END[}]
Keyword[public] identifier[AskFuture] identifier[ask] operator[SEP] identifier[ActorRef] identifier[ref] , Keyword[long] identifier[timeout] operator[SEP] { Keyword[return] identifier[askPattern] operator[SEP] identifier[ask] operator[SEP] identifier[ref] , identifier[timeout] , Other[null] operator[SEP] oper...
public void marshall(DecreaseStreamRetentionPeriodRequest decreaseStreamRetentionPeriodRequest, ProtocolMarshaller protocolMarshaller) { if (decreaseStreamRetentionPeriodRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { ...
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[decreaseStreamRetentionPeriodRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.decreaseStreamRetentionPeriodRequest], ==, literal[null]]] begin[{] ThrowStatement(expressi...
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DecreaseStreamRetentionPeriodRequest] identifier[decreaseStreamRetentionPeriodRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[decreaseStreamRetentionPeriodReq...
public static String matchListPrefix( String objectNamePrefix, String delimiter, String objectName) { Preconditions.checkArgument(!Strings.isNullOrEmpty(objectName), "objectName must not be null or empty, had args %s/%s/%s: ", objectNamePrefix, delimiter, objectName); // The suffix th...
class class_name[name] begin[{] method[matchListPrefix, return_type[type[String]], modifier[public static], parameter[objectNamePrefix, delimiter, objectName]] begin[{] call[Preconditions.checkArgument, parameter[call[Strings.isNullOrEmpty, parameter[member[.objectName]]], literal["objectName m...
Keyword[public] Keyword[static] identifier[String] identifier[matchListPrefix] operator[SEP] identifier[String] identifier[objectNamePrefix] , identifier[String] identifier[delimiter] , identifier[String] identifier[objectName] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkArgument] o...
public static String getIPAddr() { try { Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces(); while (interfaces.hasMoreElements()) { NetworkInterface interfaceN = (NetworkInterface) interfaces.nextElement(); Enumeration<InetAddress> ienum = interfaceN.getInetAddresses(); ...
class class_name[name] begin[{] method[getIPAddr, return_type[type[String]], modifier[public static], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getNetworkInterfaces,...
Keyword[public] Keyword[static] identifier[String] identifier[getIPAddr] operator[SEP] operator[SEP] { Keyword[try] { identifier[Enumeration] operator[<] identifier[NetworkInterface] operator[>] identifier[interfaces] operator[=] identifier[NetworkInterface] operator[SEP] identifier[getNetworkInterfac...
public void constructPoolLocator(ClientCacheFactory factory) { List<URI> list = this.getLocatorUrlList(); if(list != null && !list.isEmpty()) { for (URI uri : list) { factory.addPoolLocator(uri.getHost(), uri.getPort()); } } else { factory.addPoolLocator(this.host, this.port); } }
class class_name[name] begin[{] method[constructPoolLocator, return_type[void], modifier[public], parameter[factory]] begin[{] local_variable[type[List], list] if[binary_operation[binary_operation[member[.list], !=, literal[null]], &&, call[list.isEmpty, parameter[]]]] begin[{] ...
Keyword[public] Keyword[void] identifier[constructPoolLocator] operator[SEP] identifier[ClientCacheFactory] identifier[factory] operator[SEP] { identifier[List] operator[<] identifier[URI] operator[>] identifier[list] operator[=] Keyword[this] operator[SEP] identifier[getLocatorUrlList] operator[SEP] operator[SE...
public boolean smoothSlideViewTo(View child, int finalLeft, int finalTop) { mCapturedView = child; mActivePointerId = INVALID_POINTER; return forceSettleCapturedViewAt(finalLeft, finalTop, 0, 0); }
class class_name[name] begin[{] method[smoothSlideViewTo, return_type[type[boolean]], modifier[public], parameter[child, finalLeft, finalTop]] begin[{] assign[member[.mCapturedView], member[.child]] assign[member[.mActivePointerId], member[.INVALID_POINTER]] return[call[...
Keyword[public] Keyword[boolean] identifier[smoothSlideViewTo] operator[SEP] identifier[View] identifier[child] , Keyword[int] identifier[finalLeft] , Keyword[int] identifier[finalTop] operator[SEP] { identifier[mCapturedView] operator[=] identifier[child] operator[SEP] identifier[mActivePointerId] operator[=]...
public void setStart(int index, Date value) { set(selectField(AssignmentFieldLists.CUSTOM_START, index), value); }
class class_name[name] begin[{] method[setStart, return_type[void], modifier[public], parameter[index, value]] begin[{] call[.set, parameter[call[.selectField, parameter[member[AssignmentFieldLists.CUSTOM_START], member[.index]]], member[.value]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setStart] operator[SEP] Keyword[int] identifier[index] , identifier[Date] identifier[value] operator[SEP] { identifier[set] operator[SEP] identifier[selectField] operator[SEP] identifier[AssignmentFieldLists] operator[SEP] identifier[CUSTOM_START] , identifier[index] op...
public Iterable<DColumn> getColumnSlice(String storeName, String rowKey, String startCol, String endCol) { DRow row = new DRow(m_tenant, storeName, rowKey); return row.getColumns(startCol, endCol, 1024); }
class class_name[name] begin[{] method[getColumnSlice, return_type[type[Iterable]], modifier[public], parameter[storeName, rowKey, startCol, endCol]] begin[{] local_variable[type[DRow], row] return[call[row.getColumns, parameter[member[.startCol], member[.endCol], literal[1024]]]] end[}] EN...
Keyword[public] identifier[Iterable] operator[<] identifier[DColumn] operator[>] identifier[getColumnSlice] operator[SEP] identifier[String] identifier[storeName] , identifier[String] identifier[rowKey] , identifier[String] identifier[startCol] , identifier[String] identifier[endCol] operator[SEP] { identifie...
public void invalidateAll(boolean remote) throws SecurityException { if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINER)) { String logString = "(" + remote + ") for app " + appName + " id " + getId(); LoggingUtil.SESSION_LO...
class class_name[name] begin[{] method[invalidateAll, return_type[void], modifier[public], parameter[remote]] begin[{] if[binary_operation[call[com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[LoggingUtil.SESSION_LOGGER_CORE.isLoggable, parameter[member[Level.FINER]]]]...
Keyword[public] Keyword[void] identifier[invalidateAll] operator[SEP] Keyword[boolean] identifier[remote] operator[SEP] Keyword[throws] identifier[SecurityException] { Keyword[if] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ejs] operator[SEP] identifier[ras] operator[SEP]...
public BlockMeta moveBlockMeta(BlockMeta blockMeta, TempBlockMeta tempBlockMeta) throws BlockDoesNotExistException, WorkerOutOfSpaceException, BlockAlreadyExistsException { StorageDir srcDir = blockMeta.getParentDir(); StorageDir dstDir = tempBlockMeta.getParentDir(); srcDir.removeBlockMeta(blockMeta)...
class class_name[name] begin[{] method[moveBlockMeta, return_type[type[BlockMeta]], modifier[public], parameter[blockMeta, tempBlockMeta]] begin[{] local_variable[type[StorageDir], srcDir] local_variable[type[StorageDir], dstDir] call[srcDir.removeBlockMeta, parameter[member[.bl...
Keyword[public] identifier[BlockMeta] identifier[moveBlockMeta] operator[SEP] identifier[BlockMeta] identifier[blockMeta] , identifier[TempBlockMeta] identifier[tempBlockMeta] operator[SEP] Keyword[throws] identifier[BlockDoesNotExistException] , identifier[WorkerOutOfSpaceException] , identifier[BlockAlreadyExistsE...
public final void setAnimation(Animation enter, Animation exit) { setAnimation((enter != null) ? enter.getCssName() : Animation.NO_ANIMATION.getCssName(), (exit != null) ? exit.getCssName() : Animation.NO_ANIMATION.getCssName()); }
class class_name[name] begin[{] method[setAnimation, return_type[void], modifier[final public], parameter[enter, exit]] begin[{] call[.setAnimation, parameter[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=enter, postfix_operators=[], prefix_operators=[], qualifier=...
Keyword[public] Keyword[final] Keyword[void] identifier[setAnimation] operator[SEP] identifier[Animation] identifier[enter] , identifier[Animation] identifier[exit] operator[SEP] { identifier[setAnimation] operator[SEP] operator[SEP] identifier[enter] operator[!=] Other[null] operator[SEP] operator[?] identifie...
private static Resource getOrCreateResource(final Resource parent, final PathElement element) { synchronized (parent) { if (parent.hasChild(element)) { return parent.requireChild(element); } else { final Resource resource = Resource.Factory.create(); ...
class class_name[name] begin[{] method[getOrCreateResource, return_type[type[Resource]], modifier[private static], parameter[parent, element]] begin[{] SYNCHRONIZED[member[.parent]] BEGIN[{] if[call[parent.hasChild, parameter[member[.element]]]] begin[{] ...
Keyword[private] Keyword[static] identifier[Resource] identifier[getOrCreateResource] operator[SEP] Keyword[final] identifier[Resource] identifier[parent] , Keyword[final] identifier[PathElement] identifier[element] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[parent] operator[SEP] { ...
public static DoubleVector subview(DoubleVector vector, int offset, int length) { if (vector == null) throw new NullPointerException("Cannot create view of a " + "null vector"); return new DoubleVectorView(vect...
class class_name[name] begin[{] method[subview, return_type[type[DoubleVector]], modifier[public static], parameter[vector, offset, length]] begin[{] if[binary_operation[member[.vector], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Lite...
Keyword[public] Keyword[static] identifier[DoubleVector] identifier[subview] operator[SEP] identifier[DoubleVector] identifier[vector] , Keyword[int] identifier[offset] , Keyword[int] identifier[length] operator[SEP] { Keyword[if] operator[SEP] identifier[vector] operator[==] Other[null] operator[SEP] Keyword[...
public void setIpv4Addresses(java.util.Collection<String> ipv4Addresses) { if (ipv4Addresses == null) { this.ipv4Addresses = null; return; } this.ipv4Addresses = new java.util.ArrayList<String>(ipv4Addresses); }
class class_name[name] begin[{] method[setIpv4Addresses, return_type[void], modifier[public], parameter[ipv4Addresses]] begin[{] if[binary_operation[member[.ipv4Addresses], ==, literal[null]]] begin[{] assign[THIS[member[None.ipv4Addresses]], literal[null]] r...
Keyword[public] Keyword[void] identifier[setIpv4Addresses] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[ipv4Addresses] operator[SEP] { Keyword[if] operator[SEP] identifier[ipv4Addresses] operator[==] Other...
public String transform(String name, Instrumentation types, String version) { StringBuilder builder = new StringBuilder(); builder.append(types.isCompile() ? "COMPILE\r\n" : "NOCOMPILE\r\n"); for (int ruleno = 0; ruleno < types.getRules().size(); ruleno++) { InstrumentRule r = type...
class class_name[name] begin[{] method[transform, return_type[type[String]], modifier[public], parameter[name, types, version]] begin[{] local_variable[type[StringBuilder], builder] call[builder.append, parameter[TernaryExpression(condition=MethodInvocation(arguments=[], member=isCompil...
Keyword[public] identifier[String] identifier[transform] operator[SEP] identifier[String] identifier[name] , identifier[Instrumentation] identifier[types] , identifier[String] identifier[version] operator[SEP] { identifier[StringBuilder] identifier[builder] operator[=] Keyword[new] identifier[StringBuilder] op...
public List<String> getGroups(final DirContext dirContext, final LdapUser ldapUser) throws NamingException { LOGGER.debug("Retrieving groups for: " + ldapUser.getDN()); final List<String> groupDns = new ArrayList<>(); final String searchFilter = variableSubstitution(USER_GROUPS_FILTER, ldapUser)...
class class_name[name] begin[{] method[getGroups, return_type[type[List]], modifier[public], parameter[dirContext, ldapUser]] begin[{] call[LOGGER.debug, parameter[binary_operation[literal["Retrieving groups for: "], +, call[ldapUser.getDN, parameter[]]]]] local_variable[type[List], gro...
Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[getGroups] operator[SEP] Keyword[final] identifier[DirContext] identifier[dirContext] , Keyword[final] identifier[LdapUser] identifier[ldapUser] operator[SEP] Keyword[throws] identifier[NamingException] { identifier[LOGGER] o...
public final void registerLink(final AbstractItemLink newLink, final AbstractItem item) { register(newLink); _setMembership(newLink, item); }
class class_name[name] begin[{] method[registerLink, return_type[void], modifier[final public], parameter[newLink, item]] begin[{] call[.register, parameter[member[.newLink]]] call[._setMembership, parameter[member[.newLink], member[.item]]] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[registerLink] operator[SEP] Keyword[final] identifier[AbstractItemLink] identifier[newLink] , Keyword[final] identifier[AbstractItem] identifier[item] operator[SEP] { identifier[register] operator[SEP] identifier[newLink] operator[SEP] operator[SEP] identi...
public static Money of(BigDecimal number, String currencyCode, MonetaryContext monetaryContext) { return new Money(number, Monetary.getCurrency(currencyCode), monetaryContext); }
class class_name[name] begin[{] method[of, return_type[type[Money]], modifier[public static], parameter[number, currencyCode, monetaryContext]] begin[{] return[ClassCreator(arguments=[MemberReference(member=number, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(a...
Keyword[public] Keyword[static] identifier[Money] identifier[of] operator[SEP] identifier[BigDecimal] identifier[number] , identifier[String] identifier[currencyCode] , identifier[MonetaryContext] identifier[monetaryContext] operator[SEP] { Keyword[return] Keyword[new] identifier[Money] operator[SEP] identifie...
public void addFeature(String feature) { if (feature == null) { throw new IllegalArgumentException("Invalid null argument passed for addFeature"); } feature = feature.trim(); if (!feature.isEmpty()) { Feature newFeature = new Feature(); newFeature.add...
class class_name[name] begin[{] method[addFeature, return_type[void], modifier[public], parameter[feature]] begin[{] if[binary_operation[member[.feature], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[]...
Keyword[public] Keyword[void] identifier[addFeature] operator[SEP] identifier[String] identifier[feature] operator[SEP] { Keyword[if] operator[SEP] identifier[feature] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String...
ServerMember update(Status status, Instant time) { if (this.status != status) { this.status = Assert.notNull(status, "status"); if (time.isAfter(updated)) { this.updated = Assert.notNull(time, "time"); } if (statusChangeListeners != null) { statusChangeListeners.accept(status...
class class_name[name] begin[{] method[update, return_type[type[ServerMember]], modifier[default], parameter[status, time]] begin[{] if[binary_operation[THIS[member[None.status]], !=, member[.status]]] begin[{] assign[THIS[member[None.status]], call[Assert.notNull, param...
identifier[ServerMember] identifier[update] operator[SEP] identifier[Status] identifier[status] , identifier[Instant] identifier[time] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[status] operator[!=] identifier[status] operator[SEP] { Keyword[this] operator[SEP] i...
public static PeriodType yearMonthDay() { PeriodType type = cYMD; if (type == null) { type = new PeriodType( "YearMonthDay", new DurationFieldType[] { DurationFieldType.years(), DurationFieldType.months(), DurationFieldT...
class class_name[name] begin[{] method[yearMonthDay, return_type[type[PeriodType]], modifier[public static], parameter[]] begin[{] local_variable[type[PeriodType], type] if[binary_operation[member[.type], ==, literal[null]]] begin[{] assign[member[.type], ClassCr...
Keyword[public] Keyword[static] identifier[PeriodType] identifier[yearMonthDay] operator[SEP] operator[SEP] { identifier[PeriodType] identifier[type] operator[=] identifier[cYMD] operator[SEP] Keyword[if] operator[SEP] identifier[type] operator[==] Other[null] operator[SEP] { identifier[type] operator...
private PDDocument removeText(PDPage page) throws IOException { PDFStreamParser parser = new PDFStreamParser(page); parser.parse(); List<Object> tokens = parser.getTokens(); List<Object> newTokens = new ArrayList<>(); for (Object token : tokens) { if (token instanceo...
class class_name[name] begin[{] method[removeText, return_type[type[PDDocument]], modifier[private], parameter[page]] begin[{] local_variable[type[PDFStreamParser], parser] call[parser.parse, parameter[]] local_variable[type[List], tokens] local_variable[type[List], newT...
Keyword[private] identifier[PDDocument] identifier[removeText] operator[SEP] identifier[PDPage] identifier[page] operator[SEP] Keyword[throws] identifier[IOException] { identifier[PDFStreamParser] identifier[parser] operator[=] Keyword[new] identifier[PDFStreamParser] operator[SEP] identifier[page] operator[SEP]...
public static Double getDouble(Config config, String path) { try { Object obj = config.getAnyRef(path); return obj instanceof Number ? ((Number) obj).doubleValue() : null; } catch (ConfigException.Missing | ConfigException.WrongType e) { if (e instanceof ConfigExcepti...
class class_name[name] begin[{] method[getDouble, return_type[type[Double]], modifier[public static], parameter[config, path]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(mem...
Keyword[public] Keyword[static] identifier[Double] identifier[getDouble] operator[SEP] identifier[Config] identifier[config] , identifier[String] identifier[path] operator[SEP] { Keyword[try] { identifier[Object] identifier[obj] operator[=] identifier[config] operator[SEP] identifier[getAnyRef] opera...
@Override public DatanodeDescriptor[] chooseTarget(FSInodeInfo srcInode, int numOfReplicas, DatanodeDescriptor writer, List<DatanodeDescriptor> chosenNodes, List<Node> excludesNodes, long blocksize) { if (numOfReplicas == 0 || clusterMap.getNumOfLeaves() == 0) { return new DatanodeDescript...
class class_name[name] begin[{] method[chooseTarget, return_type[type[DatanodeDescriptor]], modifier[public], parameter[srcInode, numOfReplicas, writer, chosenNodes, excludesNodes, blocksize]] begin[{] if[binary_operation[binary_operation[member[.numOfReplicas], ==, literal[0]], ||, binary_oper...
annotation[@] identifier[Override] Keyword[public] identifier[DatanodeDescriptor] operator[SEP] operator[SEP] identifier[chooseTarget] operator[SEP] identifier[FSInodeInfo] identifier[srcInode] , Keyword[int] identifier[numOfReplicas] , identifier[DatanodeDescriptor] identifier[writer] , identifier[List] operator[<]...
private static List<BuiltInQProfile> reduceBuiltInQualityProfiles(Context context) throws SQLException { ListMultimap<String, BuiltInQProfile> builtInQPByLanguages = ArrayListMultimap.create(); List<BuiltInQProfile> builtInQProfiles = context.prepareSelect("SELECT kee, language, name FROM rules_profiles WHERE ...
class class_name[name] begin[{] method[reduceBuiltInQualityProfiles, return_type[type[List]], modifier[private static], parameter[context]] begin[{] local_variable[type[ListMultimap], builtInQPByLanguages] local_variable[type[List], builtInQProfiles] call[builtInQProfiles.forEac...
Keyword[private] Keyword[static] identifier[List] operator[<] identifier[BuiltInQProfile] operator[>] identifier[reduceBuiltInQualityProfiles] operator[SEP] identifier[Context] identifier[context] operator[SEP] Keyword[throws] identifier[SQLException] { identifier[ListMultimap] operator[<] identifier[String] , ...
private String getSharedAccessCanonicalName() { String accountName = this.getServiceClient().getCredentials().getAccountName(); String queueName = this.getName(); return String.format("/%s/%s/%s", SR.QUEUE, accountName, queueName); }
class class_name[name] begin[{] method[getSharedAccessCanonicalName, return_type[type[String]], modifier[private], parameter[]] begin[{] local_variable[type[String], accountName] local_variable[type[String], queueName] return[call[String.format, parameter[literal["/%s/%s/%s"], member[SR...
Keyword[private] identifier[String] identifier[getSharedAccessCanonicalName] operator[SEP] operator[SEP] { identifier[String] identifier[accountName] operator[=] Keyword[this] operator[SEP] identifier[getServiceClient] operator[SEP] operator[SEP] operator[SEP] identifier[getCredentials] operator[SEP] operator[SE...
boolean deleteAllTriggerOf(String appPackageName) { String where = Contract.COLUMN_APP_IDENTIFIER + " = ?"; String[] whereArgs = { appPackageName }; int c = getReadableDatabase().delete(Contract.TABLE_NAME, where, whereArgs); return c > 0; }
class class_name[name] begin[{] method[deleteAllTriggerOf, return_type[type[boolean]], modifier[default], parameter[appPackageName]] begin[{] local_variable[type[String], where] local_variable[type[String], whereArgs] local_variable[type[int], c] return[binary_operation[member[....
Keyword[boolean] identifier[deleteAllTriggerOf] operator[SEP] identifier[String] identifier[appPackageName] operator[SEP] { identifier[String] identifier[where] operator[=] identifier[Contract] operator[SEP] identifier[COLUMN_APP_IDENTIFIER] operator[+] literal[String] operator[SEP] identifier[String] operator[S...
public void setAsynchConsumerCallback(int requestNumber, int maxActiveMessages, long messageLockExpiry, int batchsize, OrderingContext orderContext, ...
class class_name[name] begin[{] method[setAsynchConsumerCallback, return_type[void], modifier[public], parameter[requestNumber, maxActiveMessages, messageLockExpiry, batchsize, orderContext, stoppable, maxSequentialFailures, hiddenMessageDelay]] begin[{] if[binary_operation[call[TraceComponent....
Keyword[public] Keyword[void] identifier[setAsynchConsumerCallback] operator[SEP] Keyword[int] identifier[requestNumber] , Keyword[int] identifier[maxActiveMessages] , Keyword[long] identifier[messageLockExpiry] , Keyword[int] identifier[batchsize] , identifier[OrderingContext] identifier[orderContext] , Keyword[b...
@GwtIncompatible("incompatible method") public static byte[] uuidToByteArray(final UUID src, final byte[] dst, final int dstPos, final int nBytes) { if (0 == nBytes) { return dst; } if (nBytes > 16) { throw new IllegalArgumentException("nBytes is greater than 16"); ...
class class_name[name] begin[{] method[uuidToByteArray, return_type[type[byte]], modifier[public static], parameter[src, dst, dstPos, nBytes]] begin[{] if[binary_operation[literal[0], ==, member[.nBytes]]] begin[{] return[member[.dst]] else begin[{] None end[}] ...
annotation[@] identifier[GwtIncompatible] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[uuidToByteArray] operator[SEP] Keyword[final] identifier[UUID] identifier[src] , Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier...
@Override public final void setReportNAN(Boolean value) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setReportNAN", value); if (value != null) { getApi().setField(JsApiAccess.REPORTNAN_VALUE, value); } else { ...
class class_name[name] begin[{] method[setReportNAN, return_type[void], modifier[final public], parameter[value]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[THIS[...
annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[setReportNAN] operator[SEP] identifier[Boolean] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] ...
@Pure public static double clampToNearestBounds(double value, double minBounds, double maxBounds) { assert minBounds <= maxBounds : AssertMessages.lowerEqualParameters(1, minBounds, 2, maxBounds); final double center = (minBounds + maxBounds) / 2; if (value <= center) { return minBounds; } return maxBound...
class class_name[name] begin[{] method[clampToNearestBounds, return_type[type[double]], modifier[public static], parameter[value, minBounds, maxBounds]] begin[{] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=minBounds, postfix_operators=[], prefix_operators=[], qualifier=, s...
annotation[@] identifier[Pure] Keyword[public] Keyword[static] Keyword[double] identifier[clampToNearestBounds] operator[SEP] Keyword[double] identifier[value] , Keyword[double] identifier[minBounds] , Keyword[double] identifier[maxBounds] operator[SEP] { Keyword[assert] identifier[minBounds] operator[<=] iden...
@GuardedBy("masterBlockInfo") private Optional<BlockInfo> generateBlockInfo(long blockId) throws UnavailableException { if (mSafeModeManager.isInSafeMode()) { throw new UnavailableException(ExceptionMessage.MASTER_IN_SAFEMODE.getMessage()); } BlockMeta block; List<BlockLocation> blockLocations;...
class class_name[name] begin[{] method[generateBlockInfo, return_type[type[Optional]], modifier[private], parameter[blockId]] begin[{] if[call[mSafeModeManager.isInSafeMode, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], membe...
annotation[@] identifier[GuardedBy] operator[SEP] literal[String] operator[SEP] Keyword[private] identifier[Optional] operator[<] identifier[BlockInfo] operator[>] identifier[generateBlockInfo] operator[SEP] Keyword[long] identifier[blockId] operator[SEP] Keyword[throws] identifier[UnavailableException] { Keywor...
public UPnPStateVariable getStateVariable(String name) { if (name.equals("Time")) return time; else if (name.equals("Result")) return result; else return null; }
class class_name[name] begin[{] method[getStateVariable, return_type[type[UPnPStateVariable]], modifier[public], parameter[name]] begin[{] if[call[name.equals, parameter[literal["Time"]]]] begin[{] return[member[.time]] else begin[{] if[call[name.equals, parameter[literal["R...
Keyword[public] identifier[UPnPStateVariable] identifier[getStateVariable] operator[SEP] identifier[String] identifier[name] operator[SEP] { Keyword[if] operator[SEP] identifier[name] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[time] opera...
public static LocalFileDataWriter create(final FileSystemContext context, final WorkerNetAddress address, long blockId, OutStreamOptions options) throws IOException { AlluxioConfiguration conf = context.getClusterConf(); long chunkSize = conf.getBytes(PropertyKey.USER_LOCAL_WRITER_CHUNK_SIZE_BYTES);...
class class_name[name] begin[{] method[create, return_type[type[LocalFileDataWriter]], modifier[public static], parameter[context, address, blockId, options]] begin[{] local_variable[type[AlluxioConfiguration], conf] local_variable[type[long], chunkSize] local_variable[type[Closer], clo...
Keyword[public] Keyword[static] identifier[LocalFileDataWriter] identifier[create] operator[SEP] Keyword[final] identifier[FileSystemContext] identifier[context] , Keyword[final] identifier[WorkerNetAddress] identifier[address] , Keyword[long] identifier[blockId] , identifier[OutStreamOptions] identifier[options] op...
public String getStringUtf8(final int index) { boundsCheck0(index, SIZE_OF_INT); final int length = UNSAFE.getInt(byteArray, ARRAY_BASE_OFFSET + index); return getStringUtf8(index, length); }
class class_name[name] begin[{] method[getStringUtf8, return_type[type[String]], modifier[public], parameter[index]] begin[{] call[.boundsCheck0, parameter[member[.index], member[.SIZE_OF_INT]]] local_variable[type[int], length] return[call[.getStringUtf8, parameter[member[.inde...
Keyword[public] identifier[String] identifier[getStringUtf8] operator[SEP] Keyword[final] Keyword[int] identifier[index] operator[SEP] { identifier[boundsCheck0] operator[SEP] identifier[index] , identifier[SIZE_OF_INT] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[length] operator[=] ident...
private static <L extends Annotation> String defineLimitStatement(final SQLiteModelMethod method, final JQL result, Class<L> annotation, Map<JQLDynamicStatementType, String> dynamicReplace) { StringBuilder builder = new StringBuilder(); int pageSize = AnnotationUtility.extractAsInt(method.getElement(), annotation,...
class class_name[name] begin[{] method[defineLimitStatement, return_type[type[String]], modifier[private static], parameter[method, result, annotation, dynamicReplace]] begin[{] local_variable[type[StringBuilder], builder] local_variable[type[int], pageSize] if[binary_operation[...
Keyword[private] Keyword[static] operator[<] identifier[L] Keyword[extends] identifier[Annotation] operator[>] identifier[String] identifier[defineLimitStatement] operator[SEP] Keyword[final] identifier[SQLiteModelMethod] identifier[method] , Keyword[final] identifier[JQL] identifier[result] , identifier[Class] opera...
protected org.bouncycastle.crypto.CipherParameters getBcCipherParameter(AsymmetricCipherParameters parameters) { if (parameters instanceof BcAsymmetricKeyParameters) { return ((BcAsymmetricKeyParameters) parameters).getParameters(); } // TODO: convert parameters to compatible on...
class class_name[name] begin[{] method[getBcCipherParameter, return_type[type[org]], modifier[protected], parameter[parameters]] begin[{] if[binary_operation[member[.parameters], instanceof, type[BcAsymmetricKeyParameters]]] begin[{] return[Cast(expression=MemberReference(member=par...
Keyword[protected] identifier[org] operator[SEP] identifier[bouncycastle] operator[SEP] identifier[crypto] operator[SEP] identifier[CipherParameters] identifier[getBcCipherParameter] operator[SEP] identifier[AsymmetricCipherParameters] identifier[parameters] operator[SEP] { Keyword[if] operator[SEP] identifier[p...
public static String toMapString(Map self, int maxSize) { return (self == null) ? "null" : InvokerHelper.toMapString(self, maxSize); }
class class_name[name] begin[{] method[toMapString, return_type[type[String]], modifier[public static], parameter[self, maxSize]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=self, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), opera...
Keyword[public] Keyword[static] identifier[String] identifier[toMapString] operator[SEP] identifier[Map] identifier[self] , Keyword[int] identifier[maxSize] operator[SEP] { Keyword[return] operator[SEP] identifier[self] operator[==] Other[null] operator[SEP] operator[?] literal[String] operator[:] identifier[I...
private void checkLoopback() { Integer current = readLockCount.get(); if (current != null) { assert current.intValue() > 0 : "readLockCount is set, but to 0"; throw EjbLogger.ROOT_LOGGER.failToUpgradeToWriteLock(); } }
class class_name[name] begin[{] method[checkLoopback, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[Integer], current] if[binary_operation[member[.current], !=, literal[null]]] begin[{] AssertStatement(condition=BinaryOperation(operandl=Meth...
Keyword[private] Keyword[void] identifier[checkLoopback] operator[SEP] operator[SEP] { identifier[Integer] identifier[current] operator[=] identifier[readLockCount] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[current] operator[!=] Other[null] opera...
public static void shiftRightArray8(int[] values, int rightShifts, Slice result) { if (values.length != NUMBER_OF_INTS * 2) { throw new IllegalArgumentException("Incorrect values length"); } if (rightShifts == 0) { for (int i = NUMBER_OF_INTS; i < 2 * NUMBER_OF_INTS; ...
class class_name[name] begin[{] method[shiftRightArray8, return_type[void], modifier[public static], parameter[values, rightShifts, result]] begin[{] if[binary_operation[member[values.length], !=, binary_operation[member[.NUMBER_OF_INTS], *, literal[2]]]] begin[{] ThrowStatement(exp...
Keyword[public] Keyword[static] Keyword[void] identifier[shiftRightArray8] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[values] , Keyword[int] identifier[rightShifts] , identifier[Slice] identifier[result] operator[SEP] { Keyword[if] operator[SEP] identifier[values] operator[SEP] identifie...
@Override public int write(ByteBuffer src) { int toTransfer = Math.min(src.remaining(), data.length - offset); src.get(data, offset, toTransfer); offset += toTransfer; return toTransfer; }
class class_name[name] begin[{] method[write, return_type[type[int]], modifier[public], parameter[src]] begin[{] local_variable[type[int], toTransfer] call[src.get, parameter[member[.data], member[.offset], member[.toTransfer]]] assign[member[.offset], member[.toTransfer...
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[write] operator[SEP] identifier[ByteBuffer] identifier[src] operator[SEP] { Keyword[int] identifier[toTransfer] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[src] operator[SEP] identifier[remaining] o...
@GET @Path("/{name}") public ReplyObject getDashboard(@PathParam("name")String name){ try{ ReplyObject ret = ReplyObject.success(); DashboardAO dashboard = getDashboardAPI().getDashboard(name); ret.addResult("dashboard", dashboard); return ret; }catch(APIException e){ return ReplyObject.error(e.getM...
class class_name[name] begin[{] method[getDashboard, return_type[type[ReplyObject]], modifier[public], parameter[name]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=success, postfix...
annotation[@] identifier[GET] annotation[@] identifier[Path] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[ReplyObject] identifier[getDashboard] operator[SEP] annotation[@] identifier[PathParam] operator[SEP] literal[String] operator[SEP] identifier[String] identifier[name] operator[SEP] { ...
public static void main(String[] args) throws IOException { if (args.length == 0) { System.err.println("Usage: java opennlp.tools.english.TreebankChunker model < tokenized_sentences"); System.exit(1); } TreebankChunker chunker = new TreebankChunker(args[0]); java.io.BufferedReader inReader =...
class class_name[name] begin[{] method[main, return_type[void], modifier[public static], parameter[args]] begin[{] if[binary_operation[member[args.length], ==, literal[0]]] begin[{] call[System.err.println, parameter[literal["Usage: java opennlp.tools.english.TreebankChu...
Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[args] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { ...
private void registerNativeFunctionHandler(String url, HandlerDefinition handlerDefinition, Class<? extends AbstractNativeFunctionHandler> handlerClassType) throws SecurityException, NoSuchMethodException { NativeFunction atmosFunction = (NativeFunction) handlerDefinition .getHandler(); Object atmosHan...
class class_name[name] begin[{] method[registerNativeFunctionHandler, return_type[void], modifier[private], parameter[url, handlerDefinition, handlerClassType]] begin[{] local_variable[type[NativeFunction], atmosFunction] local_variable[type[Object], atmosHandler] local_variable[type[Cl...
Keyword[private] Keyword[void] identifier[registerNativeFunctionHandler] operator[SEP] identifier[String] identifier[url] , identifier[HandlerDefinition] identifier[handlerDefinition] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[AbstractNativeFunctionHandler] operator[>] identifier[handlerC...
public static List getChildTextList(Element elem, String childTagName) { NodeList nodeList = elem.getElementsByTagName(childTagName); int len = nodeList.getLength(); if (len == 0) { return Collections.EMPTY_LIST; } List list = new ArrayList(len); ...
class class_name[name] begin[{] method[getChildTextList, return_type[type[List]], modifier[public static], parameter[elem, childTagName]] begin[{] local_variable[type[NodeList], nodeList] local_variable[type[int], len] if[binary_operation[member[.len], ==, literal[0]]] begin[{] ...
Keyword[public] Keyword[static] identifier[List] identifier[getChildTextList] operator[SEP] identifier[Element] identifier[elem] , identifier[String] identifier[childTagName] operator[SEP] { identifier[NodeList] identifier[nodeList] operator[=] identifier[elem] operator[SEP] identifier[getElementsByTagName] ope...
protected void processOneMetric(List<String> resultStrings, Server server, Result result, Object value, String addTagName, String addTagValue) { String metricName = this.metricNameStrategy.formatName(result); // // Skip any non-numeric values since OpenTSDB only supports numeric metrics. // if (isNu...
class class_name[name] begin[{] method[processOneMetric, return_type[void], modifier[protected], parameter[resultStrings, server, result, value, addTagName, addTagValue]] begin[{] local_variable[type[String], metricName] if[call[.isNumeric, parameter[member[.value]]]] begin[{] ...
Keyword[protected] Keyword[void] identifier[processOneMetric] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[resultStrings] , identifier[Server] identifier[server] , identifier[Result] identifier[result] , identifier[Object] identifier[value] , identifier[String] identifier[add...
static String encode(List<String> eventIds) { checkArgument(!eventIds.isEmpty(), "Empty event ID list."); if (eventIds.size() == 1) { return checkValid(eventIds.get(0)); } // Concatenate the event IDs using a simple scheme that efficiently encodes events that are the same len...
class class_name[name] begin[{] method[encode, return_type[type[String]], modifier[static], parameter[eventIds]] begin[{] call[.checkArgument, parameter[call[eventIds.isEmpty, parameter[]], literal["Empty event ID list."]]] if[binary_operation[call[eventIds.size, parameter[]], =...
Keyword[static] identifier[String] identifier[encode] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[eventIds] operator[SEP] { identifier[checkArgument] operator[SEP] operator[!] identifier[eventIds] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] , literal[St...
public static double Canberra(double[] p, double[] q) { double distance = 0; for (int i = 0; i < p.length; i++) { distance += Math.abs(p[i] - q[i]) / (Math.abs(p[i]) + Math.abs(q[i])); } return distance; }
class class_name[name] begin[{] method[Canberra, return_type[type[double]], modifier[public static], parameter[p, q]] begin[{] local_variable[type[double], distance] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(me...
Keyword[public] Keyword[static] Keyword[double] identifier[Canberra] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[p] , Keyword[double] operator[SEP] operator[SEP] identifier[q] operator[SEP] { Keyword[double] identifier[distance] operator[=] Other[0] operator[SEP] Keyword[for] operator[S...
public void addLink( final String path, final String target, int permissions, String username, String groupname) throws NoSuchAlgorithmException, IOException { contents.addLink( path, target, permissions, username, groupname); }
class class_name[name] begin[{] method[addLink, return_type[void], modifier[public], parameter[path, target, permissions, username, groupname]] begin[{] call[contents.addLink, parameter[member[.path], member[.target], member[.permissions], member[.username], member[.groupname]]] end[}] END[...
Keyword[public] Keyword[void] identifier[addLink] operator[SEP] Keyword[final] identifier[String] identifier[path] , Keyword[final] identifier[String] identifier[target] , Keyword[int] identifier[permissions] , identifier[String] identifier[username] , identifier[String] identifier[groupname] operator[SEP] Keyword[...
public static boolean compareFilesByExtension(final File sourceFile, final File fileToCompare) { return CompareFileExtensions .compareFiles(sourceFile, fileToCompare, true, false, true, true, true, true) .getFileExtensionEquality(); }
class class_name[name] begin[{] method[compareFilesByExtension, return_type[type[boolean]], modifier[public static], parameter[sourceFile, fileToCompare]] begin[{] return[call[CompareFileExtensions.compareFiles, parameter[member[.sourceFile], member[.fileToCompare], literal[true], literal[false], liter...
Keyword[public] Keyword[static] Keyword[boolean] identifier[compareFilesByExtension] operator[SEP] Keyword[final] identifier[File] identifier[sourceFile] , Keyword[final] identifier[File] identifier[fileToCompare] operator[SEP] { Keyword[return] identifier[CompareFileExtensions] operator[SEP] identifier[compare...
public final DSLMapParser.literal_return literal() throws RecognitionException { DSLMapParser.literal_return retval = new DSLMapParser.literal_return(); retval.start = input.LT(1); Object root_0 = null; Token set24=null; Object set24_tree=null; try { // src/main/resources/org/drools/compiler/lang/dsl...
class class_name[name] begin[{] method[literal, return_type[type[DSLMapParser]], modifier[final public], parameter[]] begin[{] local_variable[type[DSLMapParser], retval] assign[member[retval.start], call[input.LT, parameter[literal[1]]]] local_variable[type[Object], root_0] ...
Keyword[public] Keyword[final] identifier[DSLMapParser] operator[SEP] identifier[literal_return] identifier[literal] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { identifier[DSLMapParser] operator[SEP] identifier[literal_return] identifier[retval] operator[=] Keyword[new] identif...
public String forCaseInstance(String alias, String caseId) { return registry.getContainerId(alias, new ByCaseIdContainerLocator(caseId)); }
class class_name[name] begin[{] method[forCaseInstance, return_type[type[String]], modifier[public], parameter[alias, caseId]] begin[{] return[call[registry.getContainerId, parameter[member[.alias], ClassCreator(arguments=[MemberReference(member=caseId, postfix_operators=[], prefix_operators=[], qualif...
Keyword[public] identifier[String] identifier[forCaseInstance] operator[SEP] identifier[String] identifier[alias] , identifier[String] identifier[caseId] operator[SEP] { Keyword[return] identifier[registry] operator[SEP] identifier[getContainerId] operator[SEP] identifier[alias] , Keyword[new] identifier[ByCas...
public Iterable<DFactory> queryByClientSecret(java.lang.String clientSecret) { return queryByField(null, DFactoryMapper.Field.CLIENTSECRET.getFieldName(), clientSecret); }
class class_name[name] begin[{] method[queryByClientSecret, return_type[type[Iterable]], modifier[public], parameter[clientSecret]] begin[{] return[call[.queryByField, parameter[literal[null], call[DFactoryMapper.Field.CLIENTSECRET.getFieldName, parameter[]], member[.clientSecret]]]] end[}] END[}]
Keyword[public] identifier[Iterable] operator[<] identifier[DFactory] operator[>] identifier[queryByClientSecret] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] identifier[clientSecret] operator[SEP] { Keyword[return] identifier[queryByField] operator[SEP] Other[nu...
static void insertEmptyFlag(final WritableMemory wmem, final boolean empty) { int flags = wmem.getByte(FLAGS_BYTE); if (empty) { flags |= EMPTY_FLAG_MASK; } else { flags &= ~EMPTY_FLAG_MASK; } wmem.putByte(FLAGS_BYTE, (byte) flags); }
class class_name[name] begin[{] method[insertEmptyFlag, return_type[void], modifier[static], parameter[wmem, empty]] begin[{] local_variable[type[int], flags] if[member[.empty]] begin[{] assign[member[.flags], member[.EMPTY_FLAG_MASK]] else begin[{] ...
Keyword[static] Keyword[void] identifier[insertEmptyFlag] operator[SEP] Keyword[final] identifier[WritableMemory] identifier[wmem] , Keyword[final] Keyword[boolean] identifier[empty] operator[SEP] { Keyword[int] identifier[flags] operator[=] identifier[wmem] operator[SEP] identifier[getByte] operator[SEP] ident...
public void moveDirectory(File file, Object objParentID) { if (this.getScanListener() != null) objParentID = this.getScanListener().processThisDirectory(file, objParentID); File[] fileList = file.listFiles(); for (int i = 0; i < fileList.length; i++) { if (fileList[i]....
class class_name[name] begin[{] method[moveDirectory, return_type[void], modifier[public], parameter[file, objParentID]] begin[{] if[binary_operation[THIS[call[None.getScanListener, parameter[]]], !=, literal[null]]] begin[{] assign[member[.objParentID], THIS[call[None.getScanListen...
Keyword[public] Keyword[void] identifier[moveDirectory] operator[SEP] identifier[File] identifier[file] , identifier[Object] identifier[objParentID] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[getScanListener] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP...
private void _ws() throws IOException { builder.type = Type.S; // no need to preserve exact whitespace // but append an S char to keep the token // contract of always having a value builder.append(' '); reader.forward(NOT_WHITESPACE); if (debug) { int nxt = reader.peek(); ...
class class_name[name] begin[{] method[_ws, return_type[void], modifier[private], parameter[]] begin[{] assign[member[builder.type], member[Type.S]] call[builder.append, parameter[literal[' ']]] call[reader.forward, parameter[member[.NOT_WHITESPACE]]] ...
Keyword[private] Keyword[void] identifier[_ws] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[builder] operator[SEP] identifier[type] operator[=] identifier[Type] operator[SEP] identifier[S] operator[SEP] identifier[builder] operator[SEP] identifier[append] operator[SEP] literal...
@Override public AuthConfigProvider getConfigProvider(String layer, String appContext, RegistrationListener listener) { CacheEntry<AuthConfigProvider, RegistrationContext, Collection<RegistrationListener>> entry = null; lock.lock(); try { if (layer != null && appContext != null) ...
class class_name[name] begin[{] method[getConfigProvider, return_type[type[AuthConfigProvider]], modifier[public], parameter[layer, appContext, listener]] begin[{] local_variable[type[CacheEntry], entry] call[lock.lock, parameter[]] TryStatement(block=[IfStatement(condition=Bina...
annotation[@] identifier[Override] Keyword[public] identifier[AuthConfigProvider] identifier[getConfigProvider] operator[SEP] identifier[String] identifier[layer] , identifier[String] identifier[appContext] , identifier[RegistrationListener] identifier[listener] operator[SEP] { identifier[CacheEntry] operator[...
private static void subst(final StringBuilder stringBuilder, final String from, final String to) { int begin = 0, end = 0; while ((end = stringBuilder.indexOf(from, end)) != -1) { stringBuilder.delete(end, end + from.length()); stringBuilder.insert(end, to); // upda...
class class_name[name] begin[{] method[subst, return_type[void], modifier[private static], parameter[stringBuilder, from, to]] begin[{] local_variable[type[int], begin] while[binary_operation[assign[member[.end], call[stringBuilder.indexOf, parameter[member[.from], member[.end]]]], !=, ...
Keyword[private] Keyword[static] Keyword[void] identifier[subst] operator[SEP] Keyword[final] identifier[StringBuilder] identifier[stringBuilder] , Keyword[final] identifier[String] identifier[from] , Keyword[final] identifier[String] identifier[to] operator[SEP] { Keyword[int] identifier[begin] operator[=] Ot...
public String getPackageName(ClassProject.CodeType codeType) { if (codeType == null) codeType = ClassProject.CodeType.THICK; String packageName = this.getField(ClassInfo.CLASS_PACKAGE).toString(); ClassProject classProject = (ClassProject)((ReferenceField)this.getField(ClassInfo....
class class_name[name] begin[{] method[getPackageName, return_type[type[String]], modifier[public], parameter[codeType]] begin[{] if[binary_operation[member[.codeType], ==, literal[null]]] begin[{] assign[member[.codeType], member[ClassProject.CodeType.THICK]] else begin[{] ...
Keyword[public] identifier[String] identifier[getPackageName] operator[SEP] identifier[ClassProject] operator[SEP] identifier[CodeType] identifier[codeType] operator[SEP] { Keyword[if] operator[SEP] identifier[codeType] operator[==] Other[null] operator[SEP] identifier[codeType] operator[=] identifier[ClassProje...
@Override public boolean isMachineRunning( TargetHandlerParameters parameters, String machineId ) throws TargetException { NovaApi novaApi = novaApi( parameters.getTargetProperties()); String zoneName = findZoneName( novaApi, parameters.getTargetProperties()); Server server = novaApi.getServerApiForZone( zoneN...
class class_name[name] begin[{] method[isMachineRunning, return_type[type[boolean]], modifier[public], parameter[parameters, machineId]] begin[{] local_variable[type[NovaApi], novaApi] local_variable[type[String], zoneName] local_variable[type[Server], server] local_variable[typ...
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[isMachineRunning] operator[SEP] identifier[TargetHandlerParameters] identifier[parameters] , identifier[String] identifier[machineId] operator[SEP] Keyword[throws] identifier[TargetException] { identifier[NovaApi] identifier[novaApi]...
@SuppressWarnings("unchecked") @Override public V put(Pair<T, I> key, V value) { boolean isNew = keys.add(key); int index = keys.indexOf(key); Object old = null; if (isNew) values.add(index, value); else old = values.set(index, value); return (V) old; }
class class_name[name] begin[{] method[put, return_type[type[V]], modifier[public], parameter[key, value]] begin[{] local_variable[type[boolean], isNew] local_variable[type[int], index] local_variable[type[Object], old] if[member[.isNew]] begin[{] call[values...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[V] identifier[put] operator[SEP] identifier[Pair] operator[<] identifier[T] , identifier[I] operator[>] identifier[key] , identifier[V] identifier[value] operator[SEP] ...
public void addDateRangeFilter(String key, DateRange dateRange) { JsonObject opObj = new JsonObject(); if (dateRange.getFromDate() != null) { String dateGtString = BoxDateFormat.format(dateRange.getFromDate()); //workaround replacing + and - 000 at the end with 'Z' ...
class class_name[name] begin[{] method[addDateRangeFilter, return_type[void], modifier[public], parameter[key, dateRange]] begin[{] local_variable[type[JsonObject], opObj] if[binary_operation[call[dateRange.getFromDate, parameter[]], !=, literal[null]]] begin[{] local_variab...
Keyword[public] Keyword[void] identifier[addDateRangeFilter] operator[SEP] identifier[String] identifier[key] , identifier[DateRange] identifier[dateRange] operator[SEP] { identifier[JsonObject] identifier[opObj] operator[=] Keyword[new] identifier[JsonObject] operator[SEP] operator[SEP] operator[SEP] Keyword[i...
public List<CharacterAssetsLocationsResponse> postCharactersCharacterIdAssetsLocations(Integer characterId, List<Long> requestBody, String datasource, String token) throws ApiException { ApiResponse<List<CharacterAssetsLocationsResponse>> resp = postCharactersCharacterIdAssetsLocationsWithHttpInfo( ...
class class_name[name] begin[{] method[postCharactersCharacterIdAssetsLocations, return_type[type[List]], modifier[public], parameter[characterId, requestBody, datasource, token]] begin[{] local_variable[type[ApiResponse], resp] return[call[resp.getData, parameter[]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[CharacterAssetsLocationsResponse] operator[>] identifier[postCharactersCharacterIdAssetsLocations] operator[SEP] identifier[Integer] identifier[characterId] , identifier[List] operator[<] identifier[Long] operator[>] identifier[requestBody] , identifier[String] ...
private byte[] copyOf(byte[] original, int length) { byte[] copy = new byte[length]; if (length <= original.length) { System.arraycopy(original, 0, copy, 0, length); } else { System.arraycopy(original, 0, copy, 0, original.length); } return copy; ...
class class_name[name] begin[{] method[copyOf, return_type[type[byte]], modifier[private], parameter[original, length]] begin[{] local_variable[type[byte], copy] if[binary_operation[member[.length], <=, member[original.length]]] begin[{] call[System.arraycopy, pa...
Keyword[private] Keyword[byte] operator[SEP] operator[SEP] identifier[copyOf] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[original] , Keyword[int] identifier[length] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[copy] operator[=] Keyword[new] Keyword[byte] operator[...