code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public static void post(final Event event) { if (!isEnable()) { return; } CopyOnWriteArraySet<Subscriber> subscribers = SUBSCRIBER_MAP.get(event.getClass()); if (CommonUtils.isNotEmpty(subscribers)) { for (final Subscriber subscriber : subscribers) { ...
class class_name[name] begin[{] method[post, return_type[void], modifier[public static], parameter[event]] begin[{] if[call[.isEnable, parameter[]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[CopyOnWriteArraySet], subscribers] ...
Keyword[public] Keyword[static] Keyword[void] identifier[post] operator[SEP] Keyword[final] identifier[Event] identifier[event] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[isEnable] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } identifie...
public static br_device_profile delete(nitro_service client, br_device_profile resource) throws Exception { resource.validate("delete"); return ((br_device_profile[]) resource.delete_resource(client))[0]; }
class class_name[name] begin[{] method[delete, return_type[type[br_device_profile]], modifier[public static], parameter[client, resource]] begin[{] call[resource.validate, parameter[literal["delete"]]] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=client, pos...
Keyword[public] Keyword[static] identifier[br_device_profile] identifier[delete] operator[SEP] identifier[nitro_service] identifier[client] , identifier[br_device_profile] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] { identifier[resource] operator[SEP] identifier[validate] operator[...
@Override public HttpAction getNextMessage() { if (tokenAction.hasMoreActions()) { setHasMoreMessages(true); return tokenAction.popAction(); } return getSecondRequest(); }
class class_name[name] begin[{] method[getNextMessage, return_type[type[HttpAction]], modifier[public], parameter[]] begin[{] if[call[tokenAction.hasMoreActions, parameter[]]] begin[{] call[.setHasMoreMessages, parameter[literal[true]]] return[call[tokenActio...
annotation[@] identifier[Override] Keyword[public] identifier[HttpAction] identifier[getNextMessage] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[tokenAction] operator[SEP] identifier[hasMoreActions] operator[SEP] operator[SEP] operator[SEP] { identifier[setHasMoreMessages] opera...
public static Long parseLong(final String str) { if (null != str) { try { return new Long(Long.parseLong(str.trim())); } catch (final Exception e) { // :IGNORE: } } return null; }
class class_name[name] begin[{] method[parseLong, return_type[type[Long]], modifier[public static], parameter[str]] begin[{] if[binary_operation[literal[null], !=, member[.str]]] begin[{] TryStatement(block=[ReturnStatement(expression=ClassCreator(arguments=[MethodInvocation(argumen...
Keyword[public] Keyword[static] identifier[Long] identifier[parseLong] operator[SEP] Keyword[final] identifier[String] identifier[str] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[!=] identifier[str] operator[SEP] { Keyword[try] { Keyword[return] Keyword[new] identifie...
public void setCategories(FSArray v) { if (Descriptor_Type.featOkTst && ((Descriptor_Type)jcasType).casFeat_categories == null) jcasType.jcas.throwFeatMissing("categories", "de.julielab.jules.types.wikipedia.Descriptor"); jcasType.ll_cas.ll_setRefValue(addr, ((Descriptor_Type)jcasType).casFeatCode_categor...
class class_name[name] begin[{] method[setCategories, return_type[void], modifier[public], parameter[v]] begin[{] if[binary_operation[member[Descriptor_Type.featOkTst], &&, binary_operation[Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, s...
Keyword[public] Keyword[void] identifier[setCategories] operator[SEP] identifier[FSArray] identifier[v] operator[SEP] { Keyword[if] operator[SEP] identifier[Descriptor_Type] operator[SEP] identifier[featOkTst] operator[&&] operator[SEP] operator[SEP] identifier[Descriptor_Type] operator[SEP] identifier[jcasType]...
@GuardedBy("lock") protected boolean _contiguousSpaceAvailable(int space_needed) { int num_slots_scanned=0; int size_of_contiguous_area=0; if(high-low-1 < space_needed) return false; for(long i=low+1; i < high; i++) { num_slots_scanned++; int ind...
class class_name[name] begin[{] method[_contiguousSpaceAvailable, return_type[type[boolean]], modifier[protected], parameter[space_needed]] begin[{] local_variable[type[int], num_slots_scanned] local_variable[type[int], size_of_contiguous_area] if[binary_operation[binary_operati...
annotation[@] identifier[GuardedBy] operator[SEP] literal[String] operator[SEP] Keyword[protected] Keyword[boolean] identifier[_contiguousSpaceAvailable] operator[SEP] Keyword[int] identifier[space_needed] operator[SEP] { Keyword[int] identifier[num_slots_scanned] operator[=] Other[0] operator[SEP] Keyword[int] ...
@SuppressWarnings("unchecked") public T pop() throws EmptyStackException { int i; if ((i = --size) >= 0) { T element = (T) elements[i]; elements[i] = null; return element; } else { size = 0; throw new EmptyStackException(); ...
class class_name[name] begin[{] method[pop, return_type[type[T]], modifier[public], parameter[]] begin[{] local_variable[type[int], i] if[binary_operation[assign[member[.i], member[.size]], >=, literal[0]]] begin[{] local_variable[type[T], element] as...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[T] identifier[pop] operator[SEP] operator[SEP] Keyword[throws] identifier[EmptyStackException] { Keyword[int] identifier[i] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[i] operato...
public static <S> Feature<S, Boolean> is(Feature<? super S, Boolean> feature) { return FeatureExpressions.is(feature); }
class class_name[name] begin[{] method[is, return_type[type[Feature]], modifier[public static], parameter[feature]] begin[{] return[call[FeatureExpressions.is, parameter[member[.feature]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[S] operator[>] identifier[Feature] operator[<] identifier[S] , identifier[Boolean] operator[>] identifier[is] operator[SEP] identifier[Feature] operator[<] operator[?] Keyword[super] identifier[S] , identifier[Boolean] operator[>] identifier[feature] operator[SEP...
public static long generate(long crc, long value) { crc = next(crc, (byte) (value >> 56)); crc = next(crc, (byte) (value >> 48)); crc = next(crc, (byte) (value >> 40)); crc = next(crc, (byte) (value >> 32)); crc = next(crc, (byte) (value >> 24)); crc = next(crc, (byte) (value >> 16)); crc ...
class class_name[name] begin[{] method[generate, return_type[type[long]], modifier[public static], parameter[crc, value]] begin[{] assign[member[.crc], call[.next, parameter[member[.crc], Cast(expression=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operato...
Keyword[public] Keyword[static] Keyword[long] identifier[generate] operator[SEP] Keyword[long] identifier[crc] , Keyword[long] identifier[value] operator[SEP] { identifier[crc] operator[=] identifier[next] operator[SEP] identifier[crc] , operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[value]...
@SuppressWarnings("unchecked") private static Method getMethodOrDie( final Class clazz, final String name, final Class... params) { try { return clazz.getMethod(name, params); } catch (NoSuchMethodException e) { throw new RuntimeException( "Generated message class \"" + clazz.getName...
class class_name[name] begin[{] method[getMethodOrDie, return_type[type[Method]], modifier[private static], parameter[clazz, name, params]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifi...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[static] identifier[Method] identifier[getMethodOrDie] operator[SEP] Keyword[final] identifier[Class] identifier[clazz] , Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[Class]...
public static String getFilePath(String fileNameAndPath) { if (fileNameAndPath == null){ return null; } String fileSeparator; if(fileNameAndPath.contains("/")){ fileSeparator = "/"; }else{ fileSeparator = "\\"; } int lastIndexOf=fileNameAndPath.lastIndexOf(fileSeparator); ...
class class_name[name] begin[{] method[getFilePath, return_type[type[String]], modifier[public static], parameter[fileNameAndPath]] begin[{] if[binary_operation[member[.fileNameAndPath], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] ...
Keyword[public] Keyword[static] identifier[String] identifier[getFilePath] operator[SEP] identifier[String] identifier[fileNameAndPath] operator[SEP] { Keyword[if] operator[SEP] identifier[fileNameAndPath] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } ...
@Deprecated public static boolean isNormalized(String str, Mode mode, int options) { return mode.getNormalizer2(options).isNormalized(str); }
class class_name[name] begin[{] method[isNormalized, return_type[type[boolean]], modifier[public static], parameter[str, mode, options]] begin[{] return[call[mode.getNormalizer2, parameter[member[.options]]]] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[public] Keyword[static] Keyword[boolean] identifier[isNormalized] operator[SEP] identifier[String] identifier[str] , identifier[Mode] identifier[mode] , Keyword[int] identifier[options] operator[SEP] { Keyword[return] identifier[mode] operator[SEP] identifier[getNor...
public static void setProperty(Object bean, String property, Object value) throws InvocationTargetException{ try{ getSetterMethod(bean.getClass(), property).invoke(bean, value); }catch(IllegalAccessException ex){ throw new ImpossibleException(ex); // because setter method is publ...
class class_name[name] begin[{] method[setProperty, return_type[void], modifier[public static], parameter[bean, property, value]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operator...
Keyword[public] Keyword[static] Keyword[void] identifier[setProperty] operator[SEP] identifier[Object] identifier[bean] , identifier[String] identifier[property] , identifier[Object] identifier[value] operator[SEP] Keyword[throws] identifier[InvocationTargetException] { Keyword[try] { identifier[get...
protected void publish(final LogRecord record) { if(record instanceof ProgressLogRecord) { ProgressLogRecord preg = (ProgressLogRecord) record; Progress prog = preg.getProgress(); JProgressBar pbar = getOrCreateProgressBar(prog); updateProgressBar(prog, pbar); if(prog.isComplete()) { ...
class class_name[name] begin[{] method[publish, return_type[void], modifier[protected], parameter[record]] begin[{] if[binary_operation[member[.record], instanceof, type[ProgressLogRecord]]] begin[{] local_variable[type[ProgressLogRecord], preg] local_variable[type[Progr...
Keyword[protected] Keyword[void] identifier[publish] operator[SEP] Keyword[final] identifier[LogRecord] identifier[record] operator[SEP] { Keyword[if] operator[SEP] identifier[record] Keyword[instanceof] identifier[ProgressLogRecord] operator[SEP] { identifier[ProgressLogRecord] identifier[preg] opera...
@Deprecated public CredentialsProvider createFor(String uri, String username, String password, String passphrase) { return createFor(uri, username, password, passphrase, false); }
class class_name[name] begin[{] method[createFor, return_type[type[CredentialsProvider]], modifier[public], parameter[uri, username, password, passphrase]] begin[{] return[call[.createFor, parameter[member[.uri], member[.username], member[.password], member[.passphrase], literal[false]]]] end[}] EN...
annotation[@] identifier[Deprecated] Keyword[public] identifier[CredentialsProvider] identifier[createFor] operator[SEP] identifier[String] identifier[uri] , identifier[String] identifier[username] , identifier[String] identifier[password] , identifier[String] identifier[passphrase] operator[SEP] { Keyword[re...
private static boolean fireAfterInvocation(Object runner, Object target, FrameworkMethod method, Throwable thrown) { if ((runner != null) && (method != null)) { DepthGauge depthGauge = LifecycleHooks.computeIfAbsent(methodDepth.get(), methodHash(runner, method), newInstance); if (0 ==...
class class_name[name] begin[{] method[fireAfterInvocation, return_type[type[boolean]], modifier[private static], parameter[runner, target, method, thrown]] begin[{] if[binary_operation[binary_operation[member[.runner], !=, literal[null]], &&, binary_operation[member[.method], !=, literal[null]...
Keyword[private] Keyword[static] Keyword[boolean] identifier[fireAfterInvocation] operator[SEP] identifier[Object] identifier[runner] , identifier[Object] identifier[target] , identifier[FrameworkMethod] identifier[method] , identifier[Throwable] identifier[thrown] operator[SEP] { Keyword[if] operator[SEP] op...
public static INDArray pca_factor(INDArray A, double variance, boolean normalize) { if (normalize) { // Normalize to mean 0 for each feature ( each column has 0 mean ) INDArray mean = A.mean(0); A.subiRowVector(mean); } long m = A.rows(); long n = A.c...
class class_name[name] begin[{] method[pca_factor, return_type[type[INDArray]], modifier[public static], parameter[A, variance, normalize]] begin[{] if[member[.normalize]] begin[{] local_variable[type[INDArray], mean] call[A.subiRowVector, parameter[member[.m...
Keyword[public] Keyword[static] identifier[INDArray] identifier[pca_factor] operator[SEP] identifier[INDArray] identifier[A] , Keyword[double] identifier[variance] , Keyword[boolean] identifier[normalize] operator[SEP] { Keyword[if] operator[SEP] identifier[normalize] operator[SEP] { identifier[INDA...
public Connection<?> completeConnection(OAuth1ConnectionFactory<?> connectionFactory, NativeWebRequest request) { String verifier = request.getParameter("oauth_verifier"); AuthorizedRequestToken requestToken = new AuthorizedRequestToken(extractCachedRequestToken(request), verifier); OAuthToken accessToken = conn...
class class_name[name] begin[{] method[completeConnection, return_type[type[Connection]], modifier[public], parameter[connectionFactory, request]] begin[{] local_variable[type[String], verifier] local_variable[type[AuthorizedRequestToken], requestToken] local_variable[type[OAuthToken], ...
Keyword[public] identifier[Connection] operator[<] operator[?] operator[>] identifier[completeConnection] operator[SEP] identifier[OAuth1ConnectionFactory] operator[<] operator[?] operator[>] identifier[connectionFactory] , identifier[NativeWebRequest] identifier[request] operator[SEP] { identifier[String] iden...
public static InetAddress[] getInetAddressArray ( Properties props, String key, String delim, InetAddress[] def ) { String p = props.getProperty(key); if ( p != null ) { StringTokenizer tok = new StringTokenizer(p, delim); int len = tok.countTokens(); InetAddress[] ar...
class class_name[name] begin[{] method[getInetAddressArray, return_type[type[InetAddress]], modifier[public static], parameter[props, key, delim, def]] begin[{] local_variable[type[String], p] if[binary_operation[member[.p], !=, literal[null]]] begin[{] local_variable[type[S...
Keyword[public] Keyword[static] identifier[InetAddress] operator[SEP] operator[SEP] identifier[getInetAddressArray] operator[SEP] identifier[Properties] identifier[props] , identifier[String] identifier[key] , identifier[String] identifier[delim] , identifier[InetAddress] operator[SEP] operator[SEP] identifier[def] ...
public synchronized void start(final String url, final String path, final boolean pathAsDirectory, final int callbackProgressTimes, final int callbackProgressMinIntervalMillis, fin...
class class_name[name] begin[{] method[start, return_type[void], modifier[synchronized public], parameter[url, path, pathAsDirectory, callbackProgressTimes, callbackProgressMinIntervalMillis, autoRetryTimes, forceReDownload, header, isWifiRequired]] begin[{] if[member[FileDownloadLog.NEED_LOG]]...
Keyword[public] Keyword[synchronized] Keyword[void] identifier[start] operator[SEP] Keyword[final] identifier[String] identifier[url] , Keyword[final] identifier[String] identifier[path] , Keyword[final] Keyword[boolean] identifier[pathAsDirectory] , Keyword[final] Keyword[int] identifier[callbackProgressTimes] , K...
public void preApprove(BareJid user) throws NotLoggedInException, NotConnectedException, InterruptedException, FeatureNotSupportedException { final XMPPConnection connection = connection(); if (!isSubscriptionPreApprovalSupported()) { throw new FeatureNotSupportedException("Pre-approving"); ...
class class_name[name] begin[{] method[preApprove, return_type[void], modifier[public], parameter[user]] begin[{] local_variable[type[XMPPConnection], connection] if[call[.isSubscriptionPreApprovalSupported, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(argum...
Keyword[public] Keyword[void] identifier[preApprove] operator[SEP] identifier[BareJid] identifier[user] operator[SEP] Keyword[throws] identifier[NotLoggedInException] , identifier[NotConnectedException] , identifier[InterruptedException] , identifier[FeatureNotSupportedException] { Keyword[final] identifier[X...
static public BagObject resource (Class context, String name) { return resource (context, name, () -> null); }
class class_name[name] begin[{] method[resource, return_type[type[BagObject]], modifier[public static], parameter[context, name]] begin[{] return[call[.resource, parameter[member[.context], member[.name], LambdaExpression(body=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors...
Keyword[static] Keyword[public] identifier[BagObject] identifier[resource] operator[SEP] identifier[Class] identifier[context] , identifier[String] identifier[name] operator[SEP] { Keyword[return] identifier[resource] operator[SEP] identifier[context] , identifier[name] , operator[SEP] operator[SEP] operator[...
public LineStringTo toTransferObject(LineString input) { LineStringTo result = new LineStringTo(); result.setCrs(GeoJsonTo.createCrsTo("EPSG:" + input.getSRID())); result.setCoordinates(getPoints(input)); return result; }
class class_name[name] begin[{] method[toTransferObject, return_type[type[LineStringTo]], modifier[public], parameter[input]] begin[{] local_variable[type[LineStringTo], result] call[result.setCrs, parameter[call[GeoJsonTo.createCrsTo, parameter[binary_operation[literal["EPSG:"], +, cal...
Keyword[public] identifier[LineStringTo] identifier[toTransferObject] operator[SEP] identifier[LineString] identifier[input] operator[SEP] { identifier[LineStringTo] identifier[result] operator[=] Keyword[new] identifier[LineStringTo] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] ide...
@Deprecated public List<Membership> getMemberships(String projectKey) throws RedmineException { return transport.getChildEntries(Project.class, projectKey, Membership.class); }
class class_name[name] begin[{] method[getMemberships, return_type[type[List]], modifier[public], parameter[projectKey]] begin[{] return[call[transport.getChildEntries, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimen...
annotation[@] identifier[Deprecated] Keyword[public] identifier[List] operator[<] identifier[Membership] operator[>] identifier[getMemberships] operator[SEP] identifier[String] identifier[projectKey] operator[SEP] Keyword[throws] identifier[RedmineException] { Keyword[return] identifier[transport] operator[SEP] ...
public static double stringToDouble(String string) { string = string.trim(); if (Checker.isDecimal(string)) { return Double.parseDouble(string); } return -1; }
class class_name[name] begin[{] method[stringToDouble, return_type[type[double]], modifier[public static], parameter[string]] begin[{] assign[member[.string], call[string.trim, parameter[]]] if[call[Checker.isDecimal, parameter[member[.string]]]] begin[{] return[call...
Keyword[public] Keyword[static] Keyword[double] identifier[stringToDouble] operator[SEP] identifier[String] identifier[string] operator[SEP] { identifier[string] operator[=] identifier[string] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Checker] o...
public static Builder forAuth(final String auth) { // split with limit=2 to catch case where password contains a colon final String[] authParams = Base64.decodeAsString(auth).split(":", 2); if (authParams.length != 2) { return builder(); } return builder() .username(authParams[0].tri...
class class_name[name] begin[{] method[forAuth, return_type[type[Builder]], modifier[public static], parameter[auth]] begin[{] local_variable[type[String], authParams] if[binary_operation[member[authParams.length], !=, literal[2]]] begin[{] return[call[.builder, parameter[]]...
Keyword[public] Keyword[static] identifier[Builder] identifier[forAuth] operator[SEP] Keyword[final] identifier[String] identifier[auth] operator[SEP] { Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[authParams] operator[=] identifier[Base64] operator[SEP] identifier[decodeAsString] ope...
public com.google.api.ads.adwords.axis.v201809.cm.UniversalAppBiddingStrategyGoalType getUniversalAppBiddingStrategyGoalType() { return universalAppBiddingStrategyGoalType; }
class class_name[name] begin[{] method[getUniversalAppBiddingStrategyGoalType, return_type[type[com]], modifier[public], parameter[]] begin[{] return[member[.universalAppBiddingStrategyGoalType]] end[}] END[}]
Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[adwords] operator[SEP] identifier[axis] operator[SEP] identifier[v201809] operator[SEP] identifier[cm] operator[SEP] identifier[UniversalAppBiddingStrategyGoalType] ident...
public void endElement(String uri, String localName, String qName) throws SAXException { if (DEBUG) System.out.println("TransformerHandlerImpl#endElement: " + qName); if (m_contentHandler != null) { m_contentHandler.endElement(uri, localName, qName); } }
class class_name[name] begin[{] method[endElement, return_type[void], modifier[public], parameter[uri, localName, qName]] begin[{] if[member[.DEBUG]] begin[{] call[System.out.println, parameter[binary_operation[literal["TransformerHandlerImpl#endElement: "], +, member[.qName]]]] ...
Keyword[public] Keyword[void] identifier[endElement] operator[SEP] identifier[String] identifier[uri] , identifier[String] identifier[localName] , identifier[String] identifier[qName] operator[SEP] Keyword[throws] identifier[SAXException] { Keyword[if] operator[SEP] identifier[DEBUG] operator[SEP] identifier[S...
public ServiceFuture<UserInner> getPublishingUserAsync(final ServiceCallback<UserInner> serviceCallback) { return ServiceFuture.fromResponse(getPublishingUserWithServiceResponseAsync(), serviceCallback); }
class class_name[name] begin[{] method[getPublishingUserAsync, return_type[type[ServiceFuture]], modifier[public], parameter[serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.getPublishingUserWithServiceResponseAsync, parameter[]], member[.serviceCallback]]]] end[}]...
Keyword[public] identifier[ServiceFuture] operator[<] identifier[UserInner] operator[>] identifier[getPublishingUserAsync] operator[SEP] Keyword[final] identifier[ServiceCallback] operator[<] identifier[UserInner] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] o...
private void countClassAccess(final @DottedClassName String calledClass) { if (calledClass.equals(clsName) || isAssociatedClass(calledClass)) { if (getPrevOpcode(1) != Const.ALOAD_0) { thisClsAccessCount++; } } else { String calledPackage = SignatureUt...
class class_name[name] begin[{] method[countClassAccess, return_type[void], modifier[private], parameter[calledClass]] begin[{] if[binary_operation[call[calledClass.equals, parameter[member[.clsName]]], ||, call[.isAssociatedClass, parameter[member[.calledClass]]]]] begin[{] ...
Keyword[private] Keyword[void] identifier[countClassAccess] operator[SEP] Keyword[final] annotation[@] identifier[DottedClassName] identifier[String] identifier[calledClass] operator[SEP] { Keyword[if] operator[SEP] identifier[calledClass] operator[SEP] identifier[equals] operator[SEP] identifier[clsName] operat...
@Override public StreamImpl openReadImpl() throws IOException { ClassLoader loader = Thread.currentThread().getContextClassLoader(); if (loader == null) { loader = ClassLoader.getSystemClassLoader(); } InputStream is = loader.getResourceAsStream(getTrimPath()); if (is == null) { ...
class class_name[name] begin[{] method[openReadImpl, return_type[type[StreamImpl]], modifier[public], parameter[]] begin[{] local_variable[type[ClassLoader], loader] if[binary_operation[member[.loader], ==, literal[null]]] begin[{] assign[member[.loader], call[Cl...
annotation[@] identifier[Override] Keyword[public] identifier[StreamImpl] identifier[openReadImpl] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[ClassLoader] identifier[loader] operator[=] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] op...
public CmsJspImageBean createRatioVariation(String ratioStr) { CmsJspImageBean result = null; try { int i = ratioStr.indexOf('-'); if (i > 0) { ratioStr = ratioStr.replace(',', '.'); double ratioW = Double.valueOf(ratioStr.substring(0, i)).doubl...
class class_name[name] begin[{] method[createRatioVariation, return_type[type[CmsJspImageBean]], modifier[public], parameter[ratioStr]] begin[{] local_variable[type[CmsJspImageBean], result] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=...
Keyword[public] identifier[CmsJspImageBean] identifier[createRatioVariation] operator[SEP] identifier[String] identifier[ratioStr] operator[SEP] { identifier[CmsJspImageBean] identifier[result] operator[=] Other[null] operator[SEP] Keyword[try] { Keyword[int] identifier[i] operator[=] identifier[ratio...
public static String uniquePath(String name, String ext) throws IOException { File file = File.createTempFile(name, ext); String path = file.getAbsolutePath(); file.delete(); return path; }
class class_name[name] begin[{] method[uniquePath, return_type[type[String]], modifier[public static], parameter[name, ext]] begin[{] local_variable[type[File], file] local_variable[type[String], path] call[file.delete, parameter[]] return[member[.path]] end[}] END[}...
Keyword[public] Keyword[static] identifier[String] identifier[uniquePath] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[ext] operator[SEP] Keyword[throws] identifier[IOException] { identifier[File] identifier[file] operator[=] identifier[File] operator[SEP] identifier[createT...
public String[] dev_inform(final DeviceProxy deviceProxy) throws DevFailed { checkIfTaco(deviceProxy, "dev_inform"); if (deviceProxy.taco_device == null && deviceProxy.devname != null) { build_connection(deviceProxy); } return deviceProxy.taco_device.dev_inform(); }
class class_name[name] begin[{] method[dev_inform, return_type[type[String]], modifier[public], parameter[deviceProxy]] begin[{] call[.checkIfTaco, parameter[member[.deviceProxy], literal["dev_inform"]]] if[binary_operation[binary_operation[member[deviceProxy.taco_device], ==, l...
Keyword[public] identifier[String] operator[SEP] operator[SEP] identifier[dev_inform] operator[SEP] Keyword[final] identifier[DeviceProxy] identifier[deviceProxy] operator[SEP] Keyword[throws] identifier[DevFailed] { identifier[checkIfTaco] operator[SEP] identifier[deviceProxy] , literal[String] operator[SEP] o...
public void init() { initConfigurators(); configuratorsBeforeInit(); initHistoryLevel(); initExpressionManager(); if (usingRelationalDatabase) { initDataSource(); } initAgendaFactory(); initHelpers(); initVariableTypes(); initBeans(); initScriptingEngines(); initC...
class class_name[name] begin[{] method[init, return_type[void], modifier[public], parameter[]] begin[{] call[.initConfigurators, parameter[]] call[.configuratorsBeforeInit, parameter[]] call[.initHistoryLevel, parameter[]] call[.initExpressionMana...
Keyword[public] Keyword[void] identifier[init] operator[SEP] operator[SEP] { identifier[initConfigurators] operator[SEP] operator[SEP] operator[SEP] identifier[configuratorsBeforeInit] operator[SEP] operator[SEP] operator[SEP] identifier[initHistoryLevel] operator[SEP] operator[SEP] operator[SEP] identifier[init...
@Bean public ServletRegistrationBean h2servletRegistration() { ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(new WebServlet()); servletRegistrationBean.addUrlMappings("/h2/*"); return servletRegistrationBean; }
class class_name[name] begin[{] method[h2servletRegistration, return_type[type[ServletRegistrationBean]], modifier[public], parameter[]] begin[{] local_variable[type[ServletRegistrationBean], servletRegistrationBean] call[servletRegistrationBean.addUrlMappings, parameter[literal["/h2/*"...
annotation[@] identifier[Bean] Keyword[public] identifier[ServletRegistrationBean] identifier[h2servletRegistration] operator[SEP] operator[SEP] { identifier[ServletRegistrationBean] identifier[servletRegistrationBean] operator[=] Keyword[new] identifier[ServletRegistrationBean] operator[SEP] Keyword[new] identi...
@Override public boolean isValid() { BigInteger maxNumberOfEdges = BigInteger.valueOf(getNumberOfNodes()); maxNumberOfEdges = maxNumberOfEdges.multiply(maxNumberOfEdges.subtract(BigInteger.ONE)); maxNumberOfEdges = maxNumberOfEdges.divide(BigInteger.valueOf(2)); return super.isValid...
class class_name[name] begin[{] method[isValid, return_type[type[boolean]], modifier[public], parameter[]] begin[{] local_variable[type[BigInteger], maxNumberOfEdges] assign[member[.maxNumberOfEdges], call[maxNumberOfEdges.multiply, parameter[call[maxNumberOfEdges.subtract, parameter[me...
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[isValid] operator[SEP] operator[SEP] { identifier[BigInteger] identifier[maxNumberOfEdges] operator[=] identifier[BigInteger] operator[SEP] identifier[valueOf] operator[SEP] identifier[getNumberOfNodes] operator[SEP] operator[SEP] ope...
public synchronized T get () { while (_count == 0) { try { wait(); } catch (InterruptedException e) {} } // pull the object off, and clear our reference to it T retval = _items[_start]; _items[_start] = null; _start = (_start + 1) % _size; _count...
class class_name[name] begin[{] method[get, return_type[type[T]], modifier[synchronized public], parameter[]] begin[{] while[binary_operation[member[._count], ==, literal[0]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=wait, pos...
Keyword[public] Keyword[synchronized] identifier[T] identifier[get] operator[SEP] operator[SEP] { Keyword[while] operator[SEP] identifier[_count] operator[==] Other[0] operator[SEP] { Keyword[try] { identifier[wait] operator[SEP] operator[SEP] operator[SEP] } Keywo...
protected double splitThresholdSq( Point2D_I32 a , Point2D_I32 b ) { return Math.max(2,a.distance2(b)* toleranceFractionSq); }
class class_name[name] begin[{] method[splitThresholdSq, return_type[type[double]], modifier[protected], parameter[a, b]] begin[{] return[call[Math.max, parameter[literal[2], binary_operation[call[a.distance2, parameter[member[.b]]], *, member[.toleranceFractionSq]]]]] end[}] END[}]
Keyword[protected] Keyword[double] identifier[splitThresholdSq] operator[SEP] identifier[Point2D_I32] identifier[a] , identifier[Point2D_I32] identifier[b] operator[SEP] { Keyword[return] identifier[Math] operator[SEP] identifier[max] operator[SEP] Other[2] , identifier[a] operator[SEP] identifier[distance2] o...
public OperationStatus updateRegexEntityRole(UUID appId, String versionId, UUID entityId, UUID roleId, UpdateRegexEntityRoleOptionalParameter updateRegexEntityRoleOptionalParameter) { return updateRegexEntityRoleWithServiceResponseAsync(appId, versionId, entityId, roleId, updateRegexEntityRoleOptionalParameter)...
class class_name[name] begin[{] method[updateRegexEntityRole, return_type[type[OperationStatus]], modifier[public], parameter[appId, versionId, entityId, roleId, updateRegexEntityRoleOptionalParameter]] begin[{] return[call[.updateRegexEntityRoleWithServiceResponseAsync, parameter[member[.appId], membe...
Keyword[public] identifier[OperationStatus] identifier[updateRegexEntityRole] operator[SEP] identifier[UUID] identifier[appId] , identifier[String] identifier[versionId] , identifier[UUID] identifier[entityId] , identifier[UUID] identifier[roleId] , identifier[UpdateRegexEntityRoleOptionalParameter] identifier[upda...
static public Variable findVariableWithAttributeValue(NetcdfDataset ds, String attName, String attValue) { for (Variable v : ds.getVariables()) { String haveValue = ds.findAttValueIgnoreCase(v, attName, null); if ((haveValue != null) && haveValue.equals(attValue)) return v; } // ...
class class_name[name] begin[{] method[findVariableWithAttributeValue, return_type[type[Variable]], modifier[public static], parameter[ds, attName, attValue]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimen...
Keyword[static] Keyword[public] identifier[Variable] identifier[findVariableWithAttributeValue] operator[SEP] identifier[NetcdfDataset] identifier[ds] , identifier[String] identifier[attName] , identifier[String] identifier[attValue] operator[SEP] { Keyword[for] operator[SEP] identifier[Variable] identifier[v]...
public void setErrors(java.util.Collection<BatchDeleteImportDataError> errors) { if (errors == null) { this.errors = null; return; } this.errors = new java.util.ArrayList<BatchDeleteImportDataError>(errors); }
class class_name[name] begin[{] method[setErrors, return_type[void], modifier[public], parameter[errors]] begin[{] if[binary_operation[member[.errors], ==, literal[null]]] begin[{] assign[THIS[member[None.errors]], literal[null]] return[None] else beg...
Keyword[public] Keyword[void] identifier[setErrors] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[BatchDeleteImportDataError] operator[>] identifier[errors] operator[SEP] { Keyword[if] operator[SEP] identifier[errors] operator[==] Other[...
public void streamResult(OutputStream os, HeadersAmp headers, String address, long qId, int sequence, List<Object> values, Throwable exn, ...
class class_name[name] begin[{] method[streamResult, return_type[void], modifier[public], parameter[os, headers, address, qId, sequence, values, exn, isComplete]] begin[{] call[.init, parameter[member[.os]]] local_variable[type[OutH3], out] if[binary_operation[member[.ou...
Keyword[public] Keyword[void] identifier[streamResult] operator[SEP] identifier[OutputStream] identifier[os] , identifier[HeadersAmp] identifier[headers] , identifier[String] identifier[address] , Keyword[long] identifier[qId] , Keyword[int] identifier[sequence] , identifier[List] operator[<] identifier[Object] op...
public static String convert32(String s) { try { byte[] bytes = s.getBytes(); MessageDigest md = MessageDigest.getInstance("MD5"); md.update(bytes); bytes = md.digest(); int j = bytes.length; char[] chars = new char[j * 2]; ...
class class_name[name] begin[{] method[convert32, return_type[type[String]], modifier[public static], parameter[s]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getBytes, postfix_op...
Keyword[public] Keyword[static] identifier[String] identifier[convert32] operator[SEP] identifier[String] identifier[s] operator[SEP] { Keyword[try] { Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] operator[=] identifier[s] operator[SEP] identifier[getBytes] operator[SEP] operator[SEP] op...
public int setDateTime(java.util.Date date, boolean bDisplayOption, int moveMode) { if (date != null) { m_calendar.setTime(date); m_calendar.set(Calendar.YEAR, DBConstants.FIRST_YEAR); m_calendar.set(Calendar.MONTH, Calendar.JANUARY); m_calendar.set(Ca...
class class_name[name] begin[{] method[setDateTime, return_type[type[int]], modifier[public], parameter[date, bDisplayOption, moveMode]] begin[{] if[binary_operation[member[.date], !=, literal[null]]] begin[{] call[m_calendar.setTime, parameter[member[.date]]] ...
Keyword[public] Keyword[int] identifier[setDateTime] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Date] identifier[date] , Keyword[boolean] identifier[bDisplayOption] , Keyword[int] identifier[moveMode] operator[SEP] { Keyword[if] operator[SEP] identifier[date] operato...
private void setDefaultSerializeSettings() { if (!serializeSettings.containsKey(ELEMENT_CONTENT_WHITESPACE)) { serializeSettings.put(ELEMENT_CONTENT_WHITESPACE, true); } if (!serializeSettings.containsKey(SPLIT_CDATA_SECTIONS)) { serializeSettings.put(SPLIT_CDATA_SECTION...
class class_name[name] begin[{] method[setDefaultSerializeSettings, return_type[void], modifier[private], parameter[]] begin[{] if[call[serializeSettings.containsKey, parameter[member[.ELEMENT_CONTENT_WHITESPACE]]]] begin[{] call[serializeSettings.put, parameter[member[....
Keyword[private] Keyword[void] identifier[setDefaultSerializeSettings] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[serializeSettings] operator[SEP] identifier[containsKey] operator[SEP] identifier[ELEMENT_CONTENT_WHITESPACE] operator[SEP] operator[SEP] { identifier[s...
public boolean matchesAssignment(WorkerHeartbeat whb, Map<Integer, LocalAssignment> assignedTasks) { boolean isMatch = true; LocalAssignment localAssignment = assignedTasks.get(whb.getPort()); if (localAssignment == null) { LOG.debug("Following worker has been removed, port=" + whb.g...
class class_name[name] begin[{] method[matchesAssignment, return_type[type[boolean]], modifier[public], parameter[whb, assignedTasks]] begin[{] local_variable[type[boolean], isMatch] local_variable[type[LocalAssignment], localAssignment] if[binary_operation[member[.localAssignme...
Keyword[public] Keyword[boolean] identifier[matchesAssignment] operator[SEP] identifier[WorkerHeartbeat] identifier[whb] , identifier[Map] operator[<] identifier[Integer] , identifier[LocalAssignment] operator[>] identifier[assignedTasks] operator[SEP] { Keyword[boolean] identifier[isMatch] operator[=] literal...
public void setProxy(String proxyHost, int proxyPort, String username, String password) { setProxy(proxyHost, proxyPort); proxyAuth = true; proxyUser = username; proxyPassword = password; }
class class_name[name] begin[{] method[setProxy, return_type[void], modifier[public], parameter[proxyHost, proxyPort, username, password]] begin[{] call[.setProxy, parameter[member[.proxyHost], member[.proxyPort]]] assign[member[.proxyAuth], literal[true]] assign...
Keyword[public] Keyword[void] identifier[setProxy] operator[SEP] identifier[String] identifier[proxyHost] , Keyword[int] identifier[proxyPort] , identifier[String] identifier[username] , identifier[String] identifier[password] operator[SEP] { identifier[setProxy] operator[SEP] identifier[proxyHost] , identif...
@ObjectiveCName("isLargeDialogMessage:") public boolean isLargeDialogMessage(ContentType contentType) { switch (contentType) { case SERVICE: case SERVICE_AVATAR: case SERVICE_AVATAR_REMOVED: case SERVICE_CREATED: case SERVICE_TITLE: cas...
class class_name[name] begin[{] method[isLargeDialogMessage, return_type[type[boolean]], modifier[public], parameter[contentType]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['SERVICE', 'SERVICE_AVATAR', 'SERVICE_AVATAR_REMOVED', 'SERVICE_CREATED', 'SERVICE_TITLE', 'SERVICE_LEAVE', 'SERVI...
annotation[@] identifier[ObjectiveCName] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[boolean] identifier[isLargeDialogMessage] operator[SEP] identifier[ContentType] identifier[contentType] operator[SEP] { Keyword[switch] operator[SEP] identifier[contentType] operator[SEP] { Key...
public void rollback(File rollbackToDir) { logger.info("Rolling back store '" + getName() + "'"); fileModificationLock.writeLock().lock(); try { if(rollbackToDir == null) throw new VoldemortException("Version directory specified to rollback is null"); if(...
class class_name[name] begin[{] method[rollback, return_type[void], modifier[public], parameter[rollbackToDir]] begin[{] call[logger.info, parameter[binary_operation[binary_operation[literal["Rolling back store '"], +, call[.getName, parameter[]]], +, literal["'"]]]] call[fileMo...
Keyword[public] Keyword[void] identifier[rollback] operator[SEP] identifier[File] identifier[rollbackToDir] operator[SEP] { identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operato...
String getCppName(Method method) { ClassMapping mapping = mappings.get(method.getDeclaringClass()); if (mapping != null) { String name = method.getName() + "(" + Datatype.generateJNISignature(method.getParameterTypes()) + ")"; Wrappe wrappedMethod = mapping.getMethods().findWrap...
class class_name[name] begin[{] method[getCppName, return_type[type[String]], modifier[default], parameter[method]] begin[{] local_variable[type[ClassMapping], mapping] if[binary_operation[member[.mapping], !=, literal[null]]] begin[{] local_variable[type[String], name] ...
identifier[String] identifier[getCppName] operator[SEP] identifier[Method] identifier[method] operator[SEP] { identifier[ClassMapping] identifier[mapping] operator[=] identifier[mappings] operator[SEP] identifier[get] operator[SEP] identifier[method] operator[SEP] identifier[getDeclaringClass] operator[SEP] oper...
public void add(final int[] e) { if (size == list.length) list = Array.copyOf(list, newSize()); list[size++] = e; }
class class_name[name] begin[{] method[add, return_type[void], modifier[public], parameter[e]] begin[{] if[binary_operation[member[.size], ==, member[list.length]]] begin[{] assign[member[.list], call[Array.copyOf, parameter[member[.list], call[.newSize, parameter[]]]]] else...
Keyword[public] Keyword[void] identifier[add] operator[SEP] Keyword[final] Keyword[int] operator[SEP] operator[SEP] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[size] operator[==] identifier[list] operator[SEP] identifier[length] operator[SEP] identifier[list] operator[=] identifier[Array] ...
public boolean join(Set<T> s1, Set<T> s2) { return s1.addAll(s2); }
class class_name[name] begin[{] method[join, return_type[type[boolean]], modifier[public], parameter[s1, s2]] begin[{] return[call[s1.addAll, parameter[member[.s2]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[join] operator[SEP] identifier[Set] operator[<] identifier[T] operator[>] identifier[s1] , identifier[Set] operator[<] identifier[T] operator[>] identifier[s2] operator[SEP] { Keyword[return] identifier[s1] operator[SEP] identifier[addAll] operator[SEP] identifier[s2]...
public void setXPathVariableResolver(XPathVariableResolver resolver) { // resolver cannot be null if (resolver == null) { String fmsg = XSLMessages.createXPATHMessage( XPATHErrorResources.ER_NULL_XPATH_VARIABLE_RESOLVER, new Object[] { CL...
class class_name[name] begin[{] method[setXPathVariableResolver, return_type[void], modifier[public], parameter[resolver]] begin[{] if[binary_operation[member[.resolver], ==, literal[null]]] begin[{] local_variable[type[String], fmsg] ThrowStatement(expression=ClassCreat...
Keyword[public] Keyword[void] identifier[setXPathVariableResolver] operator[SEP] identifier[XPathVariableResolver] identifier[resolver] operator[SEP] { Keyword[if] operator[SEP] identifier[resolver] operator[==] Other[null] operator[SEP] { identifier[String] identifier[fmsg] operator[=] identifier[XSL...
public SAMFormat getFormat(final Path path) throws PathNotFoundException { SAMFormat fmt = formatMap.get(path); if (fmt != null || formatMap.containsKey(path)) return fmt; if (givenMap) throw new IllegalArgumentException( "SAM format for '"+path+"' not in given map"); if (this.conf == null) throw...
class class_name[name] begin[{] method[getFormat, return_type[type[SAMFormat]], modifier[public], parameter[path]] begin[{] local_variable[type[SAMFormat], fmt] if[binary_operation[binary_operation[member[.fmt], !=, literal[null]], ||, call[formatMap.containsKey, parameter[member[.path]...
Keyword[public] identifier[SAMFormat] identifier[getFormat] operator[SEP] Keyword[final] identifier[Path] identifier[path] operator[SEP] Keyword[throws] identifier[PathNotFoundException] { identifier[SAMFormat] identifier[fmt] operator[=] identifier[formatMap] operator[SEP] identifier[get] operator[SEP] identifi...
@SuppressWarnings("unchecked") protected <E> GloboDnsRoot<E> parse(String responseAsString, Type type) throws GloboDnsException { try { GloboDnsRoot<E> globoDnsRoot = new GloboDnsRoot<E>(); if ("".equalsIgnoreCase(responseAsString)) { // Empty response, just return empty object return globoDnsRo...
class class_name[name] begin[{] method[parse, return_type[type[GloboDnsRoot]], modifier[protected], parameter[responseAsString, type]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, c...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] operator[<] identifier[E] operator[>] identifier[GloboDnsRoot] operator[<] identifier[E] operator[>] identifier[parse] operator[SEP] identifier[String] identifier[responseAsString] , identifier[Type] identifier[ty...
public static synchronized Process getProcess(String applicationName, String scopedInstancePath) { return PROCESS_MAP.get(toAgentId(applicationName, scopedInstancePath)); }
class class_name[name] begin[{] method[getProcess, return_type[type[Process]], modifier[synchronized public static], parameter[applicationName, scopedInstancePath]] begin[{] return[call[PROCESS_MAP.get, parameter[call[.toAgentId, parameter[member[.applicationName], member[.scopedInstancePath]]]]]] ...
Keyword[public] Keyword[static] Keyword[synchronized] identifier[Process] identifier[getProcess] operator[SEP] identifier[String] identifier[applicationName] , identifier[String] identifier[scopedInstancePath] operator[SEP] { Keyword[return] identifier[PROCESS_MAP] operator[SEP] identifier[get] operator[SEP] id...
public static void populateInterfaceElements( JvmDeclaredType jvmElement, Map<ActionPrototype, JvmOperation> operations, Map<String, JvmField> fields, IActionPrototypeProvider sarlSignatureProvider) { for (final JvmFeature feature : jvmElement.getAllFeatures()) { if (!"java.lang.Object".equals(feature....
class class_name[name] begin[{] method[populateInterfaceElements, return_type[void], modifier[public static], parameter[jvmElement, operations, fields, sarlSignatureProvider]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=Literal(postfix_operators=[], prefix_op...
Keyword[public] Keyword[static] Keyword[void] identifier[populateInterfaceElements] operator[SEP] identifier[JvmDeclaredType] identifier[jvmElement] , identifier[Map] operator[<] identifier[ActionPrototype] , identifier[JvmOperation] operator[>] identifier[operations] , identifier[Map] operator[<] identifier[String]...
public static SimpleColor getRandomColor(double opacity) { Random ran = new Random(); int b = ran.nextInt(255); int r = 255 - b; return new SimpleColor(b + ran.nextInt(r), b + ran.nextInt(r), b + ran.nextInt(r), opacity); }
class class_name[name] begin[{] method[getRandomColor, return_type[type[SimpleColor]], modifier[public static], parameter[opacity]] begin[{] local_variable[type[Random], ran] local_variable[type[int], b] local_variable[type[int], r] return[ClassCreator(arguments=[BinaryOperation...
Keyword[public] Keyword[static] identifier[SimpleColor] identifier[getRandomColor] operator[SEP] Keyword[double] identifier[opacity] operator[SEP] { identifier[Random] identifier[ran] operator[=] Keyword[new] identifier[Random] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[b] operator[=] iden...
public String convertCRCResourceManagementFmtQualToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); }
class class_name[name] begin[{] method[convertCRCResourceManagementFmtQualToString, return_type[type[String]], modifier[public], parameter[eDataType, instanceValue]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=instanceValue, postfix_operators=[], prefix_o...
Keyword[public] identifier[String] identifier[convertCRCResourceManagementFmtQualToString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[Object] identifier[instanceValue] operator[SEP] { Keyword[return] identifier[instanceValue] operator[==] Other[null] operator[?] Other[null] operator[...
@Override public void close() { LOG.entering(CLASS_NAME, "close"); synchronized (this.schedule) { if (this.isClosed) { LOG.exiting(CLASS_NAME, "close", "Clock has already been closed"); return; } this.isClosed = true; final Time stopEvent = new StopTime(Math.max(th...
class class_name[name] begin[{] method[close, return_type[void], modifier[public], parameter[]] begin[{] call[LOG.entering, parameter[member[.CLASS_NAME], literal["close"]]] SYNCHRONIZED[THIS[member[None.schedule]]] BEGIN[{] if[THIS[member[None.isClosed]]...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[entering] operator[SEP] identifier[CLASS_NAME] , literal[String] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] i...
private void shrink() { int oldCapacity = keys.length; if (oldCapacity <= LinearProbing.DEFAULT_INITIAL_CAPACITY) return; K oldKeys[] = keys; V oldValues[] = values; int newCapacity = oldCapacity >> 1; @SuppressWarnings("unchecked") K newKeys[] = (K[]) new Object[newCapacity]; @SuppressWarnings("unch...
class class_name[name] begin[{] method[shrink, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[int], oldCapacity] if[binary_operation[member[.oldCapacity], <=, member[LinearProbing.DEFAULT_INITIAL_CAPACITY]]] begin[{] return[None] else begin[{] No...
Keyword[private] Keyword[void] identifier[shrink] operator[SEP] operator[SEP] { Keyword[int] identifier[oldCapacity] operator[=] identifier[keys] operator[SEP] identifier[length] operator[SEP] Keyword[if] operator[SEP] identifier[oldCapacity] operator[<=] identifier[LinearProbing] operator[SEP] identifier[DEFAUL...
private void sendPingFrame(ChannelHandlerContext ctx, SendPingCommand msg, ChannelPromise promise) { // Don't check lifecycleManager.getShutdownStatus() since we want to allow pings after shutdown // but before termination. After termination, messages will no longer arrive because the // pipeline clea...
class class_name[name] begin[{] method[sendPingFrame, return_type[void], modifier[private], parameter[ctx, msg, promise]] begin[{] local_variable[type[PingCallback], callback] local_variable[type[Executor], executor] if[binary_operation[member[.ping], !=, literal[null]]] begin[{...
Keyword[private] Keyword[void] identifier[sendPingFrame] operator[SEP] identifier[ChannelHandlerContext] identifier[ctx] , identifier[SendPingCommand] identifier[msg] , identifier[ChannelPromise] identifier[promise] operator[SEP] { identifier[PingCallback] identifier[callback] operator[=] identifier[msg] opera...
@Nonnull public ApiFuture<WriteResult> create(@Nonnull Map<String, Object> fields) { WriteBatch writeBatch = firestore.batch(); return extractFirst(writeBatch.create(this, fields).commit()); }
class class_name[name] begin[{] method[create, return_type[type[ApiFuture]], modifier[public], parameter[fields]] begin[{] local_variable[type[WriteBatch], writeBatch] return[call[.extractFirst, parameter[call[writeBatch.create, parameter[THIS[], member[.fields]]]]]] end[}] END[}]
annotation[@] identifier[Nonnull] Keyword[public] identifier[ApiFuture] operator[<] identifier[WriteResult] operator[>] identifier[create] operator[SEP] annotation[@] identifier[Nonnull] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[fields] operator[SEP] { identifier...
public void add(ResourceCollection rc) { if (rc instanceof FileSet) { FileSet fs = (FileSet) rc; fs.setProject(getProject()); } resources.add(rc); }
class class_name[name] begin[{] method[add, return_type[void], modifier[public], parameter[rc]] begin[{] if[binary_operation[member[.rc], instanceof, type[FileSet]]] begin[{] local_variable[type[FileSet], fs] call[fs.setProject, parameter[call[.getProject, pa...
Keyword[public] Keyword[void] identifier[add] operator[SEP] identifier[ResourceCollection] identifier[rc] operator[SEP] { Keyword[if] operator[SEP] identifier[rc] Keyword[instanceof] identifier[FileSet] operator[SEP] { identifier[FileSet] identifier[fs] operator[=] operator[SEP] identifier[FileSet] op...
public boolean isWifiFake(String ipAddress, int port) { SocketChannel socketChannel = null; try { socketChannel = SocketChannel.open(); socketChannel.connect(new InetSocketAddress(ipAddress, port)); } catch (IOException e) { Log.d(TAG, "Current Wifi is stupid!!! by IOException"); return true; } catc...
class class_name[name] begin[{] method[isWifiFake, return_type[type[boolean]], modifier[public], parameter[ipAddress, port]] begin[{] local_variable[type[SocketChannel], socketChannel] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=socketChannel...
Keyword[public] Keyword[boolean] identifier[isWifiFake] operator[SEP] identifier[String] identifier[ipAddress] , Keyword[int] identifier[port] operator[SEP] { identifier[SocketChannel] identifier[socketChannel] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[socketChannel] operator[=]...
public void setHasBold(boolean v) { if (DocumentBlock_Type.featOkTst && ((DocumentBlock_Type)jcasType).casFeat_hasBold == null) jcasType.jcas.throwFeatMissing("hasBold", "ch.epfl.bbp.uima.types.DocumentBlock"); jcasType.ll_cas.ll_setBooleanValue(addr, ((DocumentBlock_Type)jcasType).casFeatCode_hasBold, v)...
class class_name[name] begin[{] method[setHasBold, return_type[void], modifier[public], parameter[v]] begin[{] if[binary_operation[member[DocumentBlock_Type.featOkTst], &&, binary_operation[Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, s...
Keyword[public] Keyword[void] identifier[setHasBold] operator[SEP] Keyword[boolean] identifier[v] operator[SEP] { Keyword[if] operator[SEP] identifier[DocumentBlock_Type] operator[SEP] identifier[featOkTst] operator[&&] operator[SEP] operator[SEP] identifier[DocumentBlock_Type] operator[SEP] identifier[jcasType]...
public synchronized String makeCompactString() { StringBuffer buffer = new StringBuffer(); boolean first = true; for(Group group: this){ for(Counter counter: group) { if (first) { first = false; } else { buffer.append(','); } buffer.append(group.g...
class class_name[name] begin[{] method[makeCompactString, return_type[type[String]], modifier[synchronized public], parameter[]] begin[{] local_variable[type[StringBuffer], buffer] local_variable[type[boolean], first] ForStatement(body=BlockStatement(label=None, statements=[ForStatement...
Keyword[public] Keyword[synchronized] identifier[String] identifier[makeCompactString] operator[SEP] operator[SEP] { identifier[StringBuffer] identifier[buffer] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[first] operator[=] literal[boole...
public void addMatrix(double[][] m) { assert (m.length == dim); assert (m[0].length == dim); // reset inverse transformation - needs recomputation. inv = null; // extend the matrix with an extra row and column double[][] ht = new double[dim + 1][dim + 1]; for(int i = 0; i < dim; i++) { ...
class class_name[name] begin[{] method[addMatrix, return_type[void], modifier[public], parameter[m]] begin[{] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[]), operandr=MemberReference(member=dim, pos...
Keyword[public] Keyword[void] identifier[addMatrix] operator[SEP] Keyword[double] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[m] operator[SEP] { Keyword[assert] operator[SEP] identifier[m] operator[SEP] identifier[length] operator[==] identifier[dim] operator[SEP] operator[SEP] Keyword[ass...
public ServiceFuture<Void> publishEventsAsync(String topicHostname, List<EventGridEvent> events, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(publishEventsWithServiceResponseAsync(topicHostname, events), serviceCallback); }
class class_name[name] begin[{] method[publishEventsAsync, return_type[type[ServiceFuture]], modifier[public], parameter[topicHostname, events, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.publishEventsWithServiceResponseAsync, parameter[member[.topicHostname], mem...
Keyword[public] identifier[ServiceFuture] operator[<] identifier[Void] operator[>] identifier[publishEventsAsync] operator[SEP] identifier[String] identifier[topicHostname] , identifier[List] operator[<] identifier[EventGridEvent] operator[>] identifier[events] , Keyword[final] identifier[ServiceCallback] operator[<]...
double findMax() { double max = exploded.stream().reduce(Double.MIN_VALUE, (x, y) -> x > y ? x : y); return max; }
class class_name[name] begin[{] method[findMax, return_type[type[double]], modifier[default], parameter[]] begin[{] local_variable[type[double], max] return[member[.max]] end[}] END[}]
Keyword[double] identifier[findMax] operator[SEP] operator[SEP] { Keyword[double] identifier[max] operator[=] identifier[exploded] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[reduce] operator[SEP] identifier[Double] operator[SEP] identifier[MIN_VALUE] , operator[SEP] id...
public void printSubgraph( Node node, String lead, int depthOfSubgraph, int maxDepthOfSubgraph ) throws RepositoryException { int currentDepth = node.getDepth() - depthOfSubgraph + 1; if (currentDepth > maxDepth...
class class_name[name] begin[{] method[printSubgraph, return_type[void], modifier[public], parameter[node, lead, depthOfSubgraph, maxDepthOfSubgraph]] begin[{] local_variable[type[int], currentDepth] if[binary_operation[member[.currentDepth], >, member[.maxDepthOfSubgraph]]] begin[{] re...
Keyword[public] Keyword[void] identifier[printSubgraph] operator[SEP] identifier[Node] identifier[node] , identifier[String] identifier[lead] , Keyword[int] identifier[depthOfSubgraph] , Keyword[int] identifier[maxDepthOfSubgraph] operator[SEP] Keyword[throws] identifier[RepositoryException] { Keyword[int] id...
void handleConref() { // Get pure conref targets final Set<URI> pureConrefTargets = new HashSet<>(conrefTargetSet.size()); for (final URI target: conrefTargetSet) { if (!nonConrefCopytoTargetSet.contains(target)) { pureConrefTargets.add(target); } ...
class class_name[name] begin[{] method[handleConref, return_type[void], modifier[default], parameter[]] begin[{] local_variable[type[Set], pureConrefTargets] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=target,...
Keyword[void] identifier[handleConref] operator[SEP] operator[SEP] { Keyword[final] identifier[Set] operator[<] identifier[URI] operator[>] identifier[pureConrefTargets] operator[=] Keyword[new] identifier[HashSet] operator[<] operator[>] operator[SEP] identifier[conrefTargetSet] operator[SEP] identifier[size] o...
private static String languageVersion(String language, String className, String methodOrFieldName, boolean isMethod) { StringBuilder sb = new StringBuilder(); try { Class<?> clz = Class.forName(className); sb.append(language); String version = isMethod ? (String) clz....
class class_name[name] begin[{] method[languageVersion, return_type[type[String]], modifier[private static], parameter[language, className, methodOrFieldName, isMethod]] begin[{] local_variable[type[StringBuilder], sb] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[Va...
Keyword[private] Keyword[static] identifier[String] identifier[languageVersion] operator[SEP] identifier[String] identifier[language] , identifier[String] identifier[className] , identifier[String] identifier[methodOrFieldName] , Keyword[boolean] identifier[isMethod] operator[SEP] { identifier[StringBuilder] ...
protected List<ImageDTO> extractImagesFromCursor(Cursor cursor, int offset, int limit) { List<ImageDTO> images = new ArrayList<>(); int count = 0; int begin = offset > 0 ? offset : 0; if (cursor.moveToPosition(begin)) { do { ImageDTO image = extractOneImageFro...
class class_name[name] begin[{] method[extractImagesFromCursor, return_type[type[List]], modifier[protected], parameter[cursor, offset, limit]] begin[{] local_variable[type[List], images] local_variable[type[int], count] local_variable[type[int], begin] if[call[cursor.mo...
Keyword[protected] identifier[List] operator[<] identifier[ImageDTO] operator[>] identifier[extractImagesFromCursor] operator[SEP] identifier[Cursor] identifier[cursor] , Keyword[int] identifier[offset] , Keyword[int] identifier[limit] operator[SEP] { identifier[List] operator[<] identifier[ImageDTO] operator[...
@Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case AfplibPackage.FNIRG__GCGID: return getGCGID(); case AfplibPackage.FNIRG__CHAR_INC: return getCharInc(); case AfplibPackage.FNIRG__ASCEND_HT: return getAscendHt(); case AfplibPackage.FNIR...
class class_name[name] begin[{] method[eGet, return_type[type[Object]], modifier[public], parameter[featureID, resolve, coreType]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=FNIRG__GCGID, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors...
annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[eGet] operator[SEP] Keyword[int] identifier[featureID] , Keyword[boolean] identifier[resolve] , Keyword[boolean] identifier[coreType] operator[SEP] { Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] { K...
protected Map<String, Object> prepareEntityUpdateKeyMap(BehaviorCommandMeta meta) { final Entity entity = extractArgumentEntity(meta); // always can get if entity update if (entity == null) { // no way, just in case return Collections.emptyMap(); } final DBMeta dbmeta = entit...
class class_name[name] begin[{] method[prepareEntityUpdateKeyMap, return_type[type[Map]], modifier[protected], parameter[meta]] begin[{] local_variable[type[Entity], entity] if[binary_operation[member[.entity], ==, literal[null]]] begin[{] return[call[Collections.emptyMap, p...
Keyword[protected] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[prepareEntityUpdateKeyMap] operator[SEP] identifier[BehaviorCommandMeta] identifier[meta] operator[SEP] { Keyword[final] identifier[Entity] identifier[entity] operator[=] identifier[extractArgumentEntit...
public String get(final long index) { return doWithJedis(new JedisCallable<String>() { @Override public String call(Jedis jedis) { return jedis.lindex(getKey(), index); } }); }
class class_name[name] begin[{] method[get, return_type[type[String]], modifier[public], parameter[index]] begin[{] return[call[.doWithJedis, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvoca...
Keyword[public] identifier[String] identifier[get] operator[SEP] Keyword[final] Keyword[long] identifier[index] operator[SEP] { Keyword[return] identifier[doWithJedis] operator[SEP] Keyword[new] identifier[JedisCallable] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] { annotati...
protected final char[] getCopyBuffer() { char[] buf = mCopyBuffer; if (buf == null) { mCopyBuffer = buf = mConfig.allocMediumCBuffer(DEFAULT_COPYBUFFER_LEN); } return buf; }
class class_name[name] begin[{] method[getCopyBuffer, return_type[type[char]], modifier[final protected], parameter[]] begin[{] local_variable[type[char], buf] if[binary_operation[member[.buf], ==, literal[null]]] begin[{] assign[member[.mCopyBuffer], assign[memb...
Keyword[protected] Keyword[final] Keyword[char] operator[SEP] operator[SEP] identifier[getCopyBuffer] operator[SEP] operator[SEP] { Keyword[char] operator[SEP] operator[SEP] identifier[buf] operator[=] identifier[mCopyBuffer] operator[SEP] Keyword[if] operator[SEP] identifier[buf] operator[==] Other[null] operat...
@TransactionAttribute(TransactionAttributeType.REQUIRED) public void submit(PushApplication pushApplication, InternalUnifiedPushMessage message) { logger.debug("Processing send request with '{}' payload", message.getMessage()); // collections for all the different variants: final VariantMap...
class class_name[name] begin[{] method[submit, return_type[void], modifier[public], parameter[pushApplication, message]] begin[{] call[logger.debug, parameter[literal["Processing send request with '{}' payload"], call[message.getMessage, parameter[]]]] local_variable[type[VariantMap], v...
annotation[@] identifier[TransactionAttribute] operator[SEP] identifier[TransactionAttributeType] operator[SEP] identifier[REQUIRED] operator[SEP] Keyword[public] Keyword[void] identifier[submit] operator[SEP] identifier[PushApplication] identifier[pushApplication] , identifier[InternalUnifiedPushMessage] identifier[m...
static String parse(final byte content[], final Metadata metadata, final int limit) throws TikaException, IOException { // check that its not unprivileged code like a script SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(new SpecialPermission()...
class class_name[name] begin[{] method[parse, return_type[type[String]], modifier[static], parameter[content, metadata, limit]] begin[{] local_variable[type[SecurityManager], sm] if[binary_operation[member[.sm], !=, literal[null]]] begin[{] call[sm.checkPermissio...
Keyword[static] identifier[String] identifier[parse] operator[SEP] Keyword[final] Keyword[byte] identifier[content] operator[SEP] operator[SEP] , Keyword[final] identifier[Metadata] identifier[metadata] , Keyword[final] Keyword[int] identifier[limit] operator[SEP] Keyword[throws] identifier[TikaException] , identifi...
public boolean contains(double lat, double lon) { if (lat < minLat || lat > maxLat || lon < minLon || lon > maxLon) { return false; } double rayStartLat = maxLat - (minLat / 2); double rayStartLon = minLon - epsilon; boolean inside = false; int len = this.la...
class class_name[name] begin[{] method[contains, return_type[type[boolean]], modifier[public], parameter[lat, lon]] begin[{] if[binary_operation[binary_operation[binary_operation[binary_operation[member[.lat], <, member[.minLat]], ||, binary_operation[member[.lat], >, member[.maxLat]]], ||, bin...
Keyword[public] Keyword[boolean] identifier[contains] operator[SEP] Keyword[double] identifier[lat] , Keyword[double] identifier[lon] operator[SEP] { Keyword[if] operator[SEP] identifier[lat] operator[<] identifier[minLat] operator[||] identifier[lat] operator[>] identifier[maxLat] operator[||] identifier[lon] ...
@Override public PointFeature next() throws NoSuchElementException { if (!hasNext()) { throw new NoSuchElementException("This iterator has no more elements."); } assert pointFeature != null; PointFeature ret = pointFeature; calcBounds(ret); pointFeature = null; // Feature has ...
class class_name[name] begin[{] method[next, return_type[type[PointFeature]], modifier[public], parameter[]] begin[{] if[call[.hasNext, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selecto...
annotation[@] identifier[Override] Keyword[public] identifier[PointFeature] identifier[next] operator[SEP] operator[SEP] Keyword[throws] identifier[NoSuchElementException] { Keyword[if] operator[SEP] operator[!] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new...
public static Document parseXml(final InputStream is, final String rootNames, final String forceNamespace) throws Exception { final Document doc; SAXParser parser; final SAXParserFactory factory = SAXParserFactory.newInstance(); parser = factory.newSAXParser(); final DocumentBuil...
class class_name[name] begin[{] method[parseXml, return_type[type[Document]], modifier[public static], parameter[is, rootNames, forceNamespace]] begin[{] local_variable[type[Document], doc] local_variable[type[SAXParser], parser] local_variable[type[SAXParserFactory], factory] ...
Keyword[public] Keyword[static] identifier[Document] identifier[parseXml] operator[SEP] Keyword[final] identifier[InputStream] identifier[is] , Keyword[final] identifier[String] identifier[rootNames] , Keyword[final] identifier[String] identifier[forceNamespace] operator[SEP] Keyword[throws] identifier[Exception] { ...
private static Pair keyValue(final String line) { final String[] parts = line.split("=", 2); if (parts.length == 2) { final String key = parts[0].trim(); final String value = parts[1].trim(); return new Pair(key, value); } // ignore invalid lines return null; }
class class_name[name] begin[{] method[keyValue, return_type[type[Pair]], modifier[private static], parameter[line]] begin[{] local_variable[type[String], parts] if[binary_operation[member[parts.length], ==, literal[2]]] begin[{] local_variable[type[String], key] ...
Keyword[private] Keyword[static] identifier[Pair] identifier[keyValue] operator[SEP] Keyword[final] identifier[String] identifier[line] operator[SEP] { Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[parts] operator[=] identifier[line] operator[SEP] identifier[split] operator[SEP] litera...
static public String listToJSONString(List<?> list) { if (list == null || list.size() == 0) { return "[]"; } StringBuilder sb = new StringBuilder("["); for (Object o : list) { buildAppendString(sb, o).append(',').append(' '); } return sb.delete(sb.length() - 2, sb.length()).append(']').toString(); }
class class_name[name] begin[{] method[listToJSONString, return_type[type[String]], modifier[public static], parameter[list]] begin[{] if[binary_operation[binary_operation[member[.list], ==, literal[null]], ||, binary_operation[call[list.size, parameter[]], ==, literal[0]]]] begin[{] ...
Keyword[static] Keyword[public] identifier[String] identifier[listToJSONString] operator[SEP] identifier[List] operator[<] operator[?] operator[>] identifier[list] operator[SEP] { Keyword[if] operator[SEP] identifier[list] operator[==] Other[null] operator[||] identifier[list] operator[SEP] identifier[size] oper...
public static void executeGrailsBootstraps(GrailsApplication application, WebApplicationContext webContext, ServletContext servletContext, GrailsPluginManager grailsPluginManager) { configureServletContextAttributes( servletContext, application, grails...
class class_name[name] begin[{] method[executeGrailsBootstraps, return_type[void], modifier[public static], parameter[application, webContext, servletContext, grailsPluginManager]] begin[{] call[.configureServletContextAttributes, parameter[member[.servletContext], member[.application], member[...
Keyword[public] Keyword[static] Keyword[void] identifier[executeGrailsBootstraps] operator[SEP] identifier[GrailsApplication] identifier[application] , identifier[WebApplicationContext] identifier[webContext] , identifier[ServletContext] identifier[servletContext] , identifier[GrailsPluginManager] identifier[grailsP...
protected InputStream getModelResourceAsStream() throws IOException { final ServletContext servletContext = context.getServletContext(); // Don't allow NPE, throw a more detailed exception if (servletContext == null) { throw new WroRuntimeException( "No servletContext is availabl...
class class_name[name] begin[{] method[getModelResourceAsStream, return_type[type[InputStream]], modifier[protected], parameter[]] begin[{] local_variable[type[ServletContext], servletContext] if[binary_operation[member[.servletContext], ==, literal[null]]] begin[{] ThrowSta...
Keyword[protected] identifier[InputStream] identifier[getModelResourceAsStream] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[final] identifier[ServletContext] identifier[servletContext] operator[=] identifier[context] operator[SEP] identifier[getServletContext] operator[SEP] oper...
public void setTSOffset(Integer newTSOffset) { Integer oldTSOffset = tsOffset; tsOffset = newTSOffset; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.FNNRG__TS_OFFSET, oldTSOffset, tsOffset)); }
class class_name[name] begin[{] method[setTSOffset, return_type[void], modifier[public], parameter[newTSOffset]] begin[{] local_variable[type[Integer], oldTSOffset] assign[member[.tsOffset], member[.newTSOffset]] if[call[.eNotificationRequired, parameter[]]] begin[{] ...
Keyword[public] Keyword[void] identifier[setTSOffset] operator[SEP] identifier[Integer] identifier[newTSOffset] operator[SEP] { identifier[Integer] identifier[oldTSOffset] operator[=] identifier[tsOffset] operator[SEP] identifier[tsOffset] operator[=] identifier[newTSOffset] operator[SEP] Keyword[if] operator[SE...
public void deleteNamespace(String namespaceId) { DeleteNamespaceRequest deleteNamespaceRequest = new DeleteNamespaceRequest().withId(namespaceId); getDiscoveryClient().deleteNamespace(deleteNamespaceRequest); }
class class_name[name] begin[{] method[deleteNamespace, return_type[void], modifier[public], parameter[namespaceId]] begin[{] local_variable[type[DeleteNamespaceRequest], deleteNamespaceRequest] call[.getDiscoveryClient, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[deleteNamespace] operator[SEP] identifier[String] identifier[namespaceId] operator[SEP] { identifier[DeleteNamespaceRequest] identifier[deleteNamespaceRequest] operator[=] Keyword[new] identifier[DeleteNamespaceRequest] operator[SEP] operator[SEP] operator[SEP] identifier...
public static String getEncryptCertId() { if (null == encryptCert) { String path = SDKConfig.getConfig().getEncryptCertPath(); if (!isEmpty(path)) { encryptCert = initCert(path); return encryptCert.getSerialNumber().toString(); } else { LogUtil.writeErrorLog("acpsdk.encryptCert.path is empty"); ...
class class_name[name] begin[{] method[getEncryptCertId, return_type[type[String]], modifier[public static], parameter[]] begin[{] if[binary_operation[literal[null], ==, member[.encryptCert]]] begin[{] local_variable[type[String], path] if[call[.isEmpty, para...
Keyword[public] Keyword[static] identifier[String] identifier[getEncryptCertId] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[encryptCert] operator[SEP] { identifier[String] identifier[path] operator[=] identifier[SDKConfig] operator[SEP] identifier[getCon...
private String durationToString(Duration duration) { String retVal = null; Duration absDuration = duration.abs(); int days = 0; if (absDuration.getSeconds() != 0) { days = (int) absDuration.getSeconds() / (24 * 60 * 60); } if (days != 0) { Duratio...
class class_name[name] begin[{] method[durationToString, return_type[type[String]], modifier[private], parameter[duration]] begin[{] local_variable[type[String], retVal] local_variable[type[Duration], absDuration] local_variable[type[int], days] if[binary_operation[call[...
Keyword[private] identifier[String] identifier[durationToString] operator[SEP] identifier[Duration] identifier[duration] operator[SEP] { identifier[String] identifier[retVal] operator[=] Other[null] operator[SEP] identifier[Duration] identifier[absDuration] operator[=] identifier[duration] operator[SEP] identifi...
public String getInitializationFooter(int numberOfPages, int selectedPage) { StringBuffer content = new StringBuffer(1024); content.append("top.dU(document,"); content.append(numberOfPages); content.append(","); content.append(selectedPage); content.append("); \n"); ...
class class_name[name] begin[{] method[getInitializationFooter, return_type[type[String]], modifier[public], parameter[numberOfPages, selectedPage]] begin[{] local_variable[type[StringBuffer], content] call[content.append, parameter[literal["top.dU(document,"]]] call[con...
Keyword[public] identifier[String] identifier[getInitializationFooter] operator[SEP] Keyword[int] identifier[numberOfPages] , Keyword[int] identifier[selectedPage] operator[SEP] { identifier[StringBuffer] identifier[content] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] Other[1024] operator[SE...
void asyncUpdate() { CmsRpcAction<Boolean> action = new CmsRpcAction<Boolean>() { @Override public void execute() { start(200, false); m_controller.getContainerpageService().checkContainerpageOrElementsChanged( CmsCoreProvid...
class class_name[name] begin[{] method[asyncUpdate, return_type[void], modifier[default], parameter[]] begin[{] local_variable[type[CmsRpcAction], action] call[action.execute, parameter[]] end[}] END[}]
Keyword[void] identifier[asyncUpdate] operator[SEP] operator[SEP] { identifier[CmsRpcAction] operator[<] identifier[Boolean] operator[>] identifier[action] operator[=] Keyword[new] identifier[CmsRpcAction] operator[<] identifier[Boolean] operator[>] operator[SEP] operator[SEP] { annotation[@] identifi...
protected final void multiply() { final int step = blockStripeSize, blockSize = blockStripeSize * blockStripeSize; for (int m = fromM; m < toM; m += step) { final int aRows = matrixA.layout.getRowsInBlock(m); for (int k = fromK; k < toK; k += step) { final int bCols = matrixB.layout.getColumnsInB...
class class_name[name] begin[{] method[multiply, return_type[void], modifier[final protected], parameter[]] begin[{] local_variable[type[int], step] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], i...
Keyword[protected] Keyword[final] Keyword[void] identifier[multiply] operator[SEP] operator[SEP] { Keyword[final] Keyword[int] identifier[step] operator[=] identifier[blockStripeSize] , identifier[blockSize] operator[=] identifier[blockStripeSize] operator[*] identifier[blockStripeSize] operator[SEP] Keyword[fo...
public void saveVCard(VCard vcard) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { // XEP-54 § 3.2 "A user may publish or update his or her vCard by sending an IQ of type "set" with no 'to' address…" vcard.setTo((Jid) null); vcard.setType(IQ.Type.set...
class class_name[name] begin[{] method[saveVCard, return_type[void], modifier[public], parameter[vcard]] begin[{] call[vcard.setTo, parameter[Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), type=ReferenceType(arguments=None, dimensio...
Keyword[public] Keyword[void] identifier[saveVCard] operator[SEP] identifier[VCard] identifier[vcard] operator[SEP] Keyword[throws] identifier[NoResponseException] , identifier[XMPPErrorException] , identifier[NotConnectedException] , identifier[InterruptedException] { identifier[vcard] operator[SEP] identifi...
public static <E> Stream<Stream<E>> group(Stream<E> stream, Predicate<? super E> splitter) { Objects.requireNonNull(stream); Objects.requireNonNull(splitter); return group(stream, splitter, true); }
class class_name[name] begin[{] method[group, return_type[type[Stream]], modifier[public static], parameter[stream, splitter]] begin[{] call[Objects.requireNonNull, parameter[member[.stream]]] call[Objects.requireNonNull, parameter[member[.splitter]]] return[call[.group,...
Keyword[public] Keyword[static] operator[<] identifier[E] operator[>] identifier[Stream] operator[<] identifier[Stream] operator[<] identifier[E] operator[>] operator[>] identifier[group] operator[SEP] identifier[Stream] operator[<] identifier[E] operator[>] identifier[stream] , identifier[Predicate] operator[<] opera...
@Override public int advance(int target) throws IOException { resetQueue(); Integer newTarget = target; do { newTarget = advanceToDoc(newTarget); } while (newTarget != null); return docId; }
class class_name[name] begin[{] method[advance, return_type[type[int]], modifier[public], parameter[target]] begin[{] call[.resetQueue, parameter[]] local_variable[type[Integer], newTarget] do[binary_operation[member[.newTarget], !=, literal[null]]] begin[{] ...
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[advance] operator[SEP] Keyword[int] identifier[target] operator[SEP] Keyword[throws] identifier[IOException] { identifier[resetQueue] operator[SEP] operator[SEP] operator[SEP] identifier[Integer] identifier[newTarget] operator[=] identifi...
public static short sArrayGet(short[] a, int i) { try { return a[i]; } catch (Throwable t) { return a[DefaultGroovyMethodsSupport.normaliseIndex(i,a.length)]; } }
class class_name[name] begin[{] method[sArrayGet, return_type[type[short]], modifier[public static], parameter[a, i]] begin[{] TryStatement(block=[ReturnStatement(expression=MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(m...
Keyword[public] Keyword[static] Keyword[short] identifier[sArrayGet] operator[SEP] Keyword[short] operator[SEP] operator[SEP] identifier[a] , Keyword[int] identifier[i] operator[SEP] { Keyword[try] { Keyword[return] identifier[a] operator[SEP] identifier[i] operator[SEP] operator[SEP] } ...
public List<String> getAnnotations() { AnnotationBuilder result = new AnnotationBuilder(); result.add(getNotNullAnnotation()); return result.getAnnotations(); }
class class_name[name] begin[{] method[getAnnotations, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[AnnotationBuilder], result] call[result.add, parameter[call[.getNotNullAnnotation, parameter[]]]] return[call[result.getAnnotations, parame...
Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[getAnnotations] operator[SEP] operator[SEP] { identifier[AnnotationBuilder] identifier[result] operator[=] Keyword[new] identifier[AnnotationBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] i...