code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public static boolean copyToFile(InputStream inputStream, File destFile) { try { OutputStream out = new FileOutputStream(destFile); try { byte[] buffer = new byte[4096]; int bytesRead; while ((bytesRead = inputStream.read(buffer)) >= 0) { ...
class class_name[name] begin[{] method[copyToFile, return_type[type[boolean]], modifier[public static], parameter[inputStream, destFile]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberRefere...
Keyword[public] Keyword[static] Keyword[boolean] identifier[copyToFile] operator[SEP] identifier[InputStream] identifier[inputStream] , identifier[File] identifier[destFile] operator[SEP] { Keyword[try] { identifier[OutputStream] identifier[out] operator[=] Keyword[new] identifier[FileOutputStream] o...
void refreshAfterWrite(String key, @Nullable String value) { requireArgument(refreshAfterWriteDuration == UNSET_INT, "refreshAfterWrite was already set"); refreshAfterWriteDuration = parseDuration(key, value); refreshAfterWriteTimeUnit = parseTimeUnit(key, value); }
class class_name[name] begin[{] method[refreshAfterWrite, return_type[void], modifier[default], parameter[key, value]] begin[{] call[.requireArgument, parameter[binary_operation[member[.refreshAfterWriteDuration], ==, member[.UNSET_INT]], literal["refreshAfterWrite was already set"]]] ...
Keyword[void] identifier[refreshAfterWrite] operator[SEP] identifier[String] identifier[key] , annotation[@] identifier[Nullable] identifier[String] identifier[value] operator[SEP] { identifier[requireArgument] operator[SEP] identifier[refreshAfterWriteDuration] operator[==] identifier[UNSET_INT] , literal[Str...
public static OAuthClientRequest getAuthorizationRequest(String clientId, String redirectUri) throws OAuthSystemException { return OAuthClientRequest .authorizationLocation(OAUTH2_AUTHORIZATION_URL) .setScope("public read write") .setResponseType(Respo...
class class_name[name] begin[{] method[getAuthorizationRequest, return_type[type[OAuthClientRequest]], modifier[public static], parameter[clientId, redirectUri]] begin[{] return[call[OAuthClientRequest.authorizationLocation, parameter[member[.OAUTH2_AUTHORIZATION_URL]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[OAuthClientRequest] identifier[getAuthorizationRequest] operator[SEP] identifier[String] identifier[clientId] , identifier[String] identifier[redirectUri] operator[SEP] Keyword[throws] identifier[OAuthSystemException] { Keyword[return] identifier[OAuthClientRequest] op...
public static long[] parseRange(String rangeValue) { int phyphen = rangeValue.indexOf('-'); if (phyphen == -1) { // this is a syntax error. return null; } try { if (phyphen == 0) { // -N (suffix-byte-range-spec) long end = Long.parseLong(rangeValue.substring(1)); if (end <= 0) return null; ...
class class_name[name] begin[{] method[parseRange, return_type[type[long]], modifier[public static], parameter[rangeValue]] begin[{] local_variable[type[int], phyphen] if[binary_operation[member[.phyphen], ==, literal[1]]] begin[{] return[literal[null]] else begin[{]...
Keyword[public] Keyword[static] Keyword[long] operator[SEP] operator[SEP] identifier[parseRange] operator[SEP] identifier[String] identifier[rangeValue] operator[SEP] { Keyword[int] identifier[phyphen] operator[=] identifier[rangeValue] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP...
public Optional<CacheHit<Entity>> getIfPresent(EntityType entityType, Object id) { EntityKey key = EntityKey.create(entityType, id); return Optional.ofNullable(cache.getIfPresent(key)) .map(cacheHit -> hydrate(cacheHit, entityType)); }
class class_name[name] begin[{] method[getIfPresent, return_type[type[Optional]], modifier[public], parameter[entityType, id]] begin[{] local_variable[type[EntityKey], key] return[call[Optional.ofNullable, parameter[call[cache.getIfPresent, parameter[member[.key]]]]]] end[}] END[}]
Keyword[public] identifier[Optional] operator[<] identifier[CacheHit] operator[<] identifier[Entity] operator[>] operator[>] identifier[getIfPresent] operator[SEP] identifier[EntityType] identifier[entityType] , identifier[Object] identifier[id] operator[SEP] { identifier[EntityKey] identifier[key] operator[=] ...
public CollectionDescriptorDef getRemoteCollection() { if (!hasProperty(PropertyHelper.OJB_PROPERTY_INDIRECTION_TABLE)) { return null; } ModelDef modelDef = (ModelDef)getOwner().getOwner(); String elementClassName = g...
class class_name[name] begin[{] method[getRemoteCollection, return_type[type[CollectionDescriptorDef]], modifier[public], parameter[]] begin[{] if[call[.hasProperty, parameter[member[PropertyHelper.OJB_PROPERTY_INDIRECTION_TABLE]]]] begin[{] return[literal[null]] else begin[...
Keyword[public] identifier[CollectionDescriptorDef] identifier[getRemoteCollection] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[hasProperty] operator[SEP] identifier[PropertyHelper] operator[SEP] identifier[OJB_PROPERTY_INDIRECTION_TABLE] operator[SEP] operator[SEP] { ...
public static int decodeValue(final short encodedSize) { final int value = encodedSize & 0xFFFF; if (value > MAX_ENC_VALUE) { throw new SketchesArgumentException("Maximum valid encoded value is " + Integer.toHexString(MAX_ENC_VALUE) + ", found: " + value); } final int p = (value >>...
class class_name[name] begin[{] method[decodeValue, return_type[type[int]], modifier[public static], parameter[encodedSize]] begin[{] local_variable[type[int], value] if[binary_operation[member[.value], >, member[.MAX_ENC_VALUE]]] begin[{] ThrowStatement(expression=ClassCrea...
Keyword[public] Keyword[static] Keyword[int] identifier[decodeValue] operator[SEP] Keyword[final] Keyword[short] identifier[encodedSize] operator[SEP] { Keyword[final] Keyword[int] identifier[value] operator[=] identifier[encodedSize] operator[&] literal[Integer] operator[SEP] Keyword[if] operator[SEP] identifie...
public void replace(BaseCell oldOne, BaseCell newOne) { VirtualLayoutManager layoutManager = getLayoutManager(); if (oldOne != null && newOne != null && mGroupBasicAdapter != null && layoutManager != null) { int replacePosition = mGroupBasicAdapter.getPositionByItem(oldOne); if (...
class class_name[name] begin[{] method[replace, return_type[void], modifier[public], parameter[oldOne, newOne]] begin[{] local_variable[type[VirtualLayoutManager], layoutManager] if[binary_operation[binary_operation[binary_operation[binary_operation[member[.oldOne], !=, literal[null]], ...
Keyword[public] Keyword[void] identifier[replace] operator[SEP] identifier[BaseCell] identifier[oldOne] , identifier[BaseCell] identifier[newOne] operator[SEP] { identifier[VirtualLayoutManager] identifier[layoutManager] operator[=] identifier[getLayoutManager] operator[SEP] operator[SEP] operator[SEP] Keyword[...
@Override public Object lookup(String name) { // Note: this context method is allowed from all bean methods, // except the constructor... which has not way to access // the context. Therefore, no 'state' checking needs // to be performed... just validate the pa...
class class_name[name] begin[{] method[lookup, return_type[type[Object]], modifier[public], parameter[name]] begin[{] if[binary_operation[member[.name], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=No...
annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[lookup] operator[SEP] identifier[String] identifier[name] operator[SEP] { Keyword[if] operator[SEP] identifier[name] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SE...
public Observable<ServiceResponseWithHeaders<Page<NodeFile>, FileListFromComputeNodeHeaders>> listFromComputeNodeSinglePageAsync(final String poolId, final String nodeId) { if (this.client.batchUrl() == null) { throw new IllegalArgumentException("Parameter this.client.batchUrl() is required and cann...
class class_name[name] begin[{] method[listFromComputeNodeSinglePageAsync, return_type[type[Observable]], modifier[public], parameter[poolId, nodeId]] begin[{] if[binary_operation[THIS[member[None.client]call[None.batchUrl, parameter[]]], ==, literal[null]]] begin[{] ThrowStatement(...
Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponseWithHeaders] operator[<] identifier[Page] operator[<] identifier[NodeFile] operator[>] , identifier[FileListFromComputeNodeHeaders] operator[>] operator[>] identifier[listFromComputeNodeSinglePageAsync] operator[SEP] Keyword[final] identifier...
public void showAddNodeDialog() { jcrService().getPrimaryTypes(node.getRepository(), node.getWorkspace(), null, false, new AsyncCallback<String[]>() { @Override public void onFailure(Throwable caught) { SC.say(caught.getMess...
class class_name[name] begin[{] method[showAddNodeDialog, return_type[void], modifier[public], parameter[]] begin[{] call[.jcrService, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[showAddNodeDialog] operator[SEP] operator[SEP] { identifier[jcrService] operator[SEP] operator[SEP] operator[SEP] identifier[getPrimaryTypes] operator[SEP] identifier[node] operator[SEP] identifier[getRepository] operator[SEP] operator[SEP] , identifier[node] operator[SE...
public static Object instantiateWrapperObject(Class<?> type, Object objectToInvokeUpon, String valueToAssign) { logger.entering(new Object[] { type, objectToInvokeUpon, valueToAssign }); validateParams(type, objectToInvokeUpon, valueToAssign); checkArgument(ClassUtils.isPrimitiveWrapper(type), ...
class class_name[name] begin[{] method[instantiateWrapperObject, return_type[type[Object]], modifier[public static], parameter[type, objectToInvokeUpon, valueToAssign]] begin[{] call[logger.entering, parameter[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberRefe...
Keyword[public] Keyword[static] identifier[Object] identifier[instantiateWrapperObject] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[type] , identifier[Object] identifier[objectToInvokeUpon] , identifier[String] identifier[valueToAssign] operator[SEP] { identifier[logger] oper...
private synchronized void createListenersComparator() { if (listenersComparator == null) { listenersComparator = new Comparator<ArrangeableProxyListener>() { @Override public int compare(ArrangeableProxyListener o1, ArrangeableProxyListener o2) { ...
class class_name[name] begin[{] method[createListenersComparator, return_type[void], modifier[synchronized private], parameter[]] begin[{] if[binary_operation[member[.listenersComparator], ==, literal[null]]] begin[{] assign[member[.listenersComparator], ClassCreator(arg...
Keyword[private] Keyword[synchronized] Keyword[void] identifier[createListenersComparator] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[listenersComparator] operator[==] Other[null] operator[SEP] { identifier[listenersComparator] operator[=] Keyword[new] identifier[Comparator] op...
public UpdateDocumentRequest withAttachments(AttachmentsSource... attachments) { if (this.attachments == null) { setAttachments(new com.amazonaws.internal.SdkInternalList<AttachmentsSource>(attachments.length)); } for (AttachmentsSource ele : attachments) { this.attachmen...
class class_name[name] begin[{] method[withAttachments, return_type[type[UpdateDocumentRequest]], modifier[public], parameter[attachments]] begin[{] if[binary_operation[THIS[member[None.attachments]], ==, literal[null]]] begin[{] call[.setAttachments, parameter[ClassCrea...
Keyword[public] identifier[UpdateDocumentRequest] identifier[withAttachments] operator[SEP] identifier[AttachmentsSource] operator[...] identifier[attachments] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[attachments] operator[==] Other[null] operator[SEP] { identif...
public <T extends DatabaseObject> T createSnapshot(T example, Database database) throws DatabaseException, InvalidExampleException { return createSnapshot(example, database, new SnapshotControl(database)); }
class class_name[name] begin[{] method[createSnapshot, return_type[type[T]], modifier[public], parameter[example, database]] begin[{] return[call[.createSnapshot, parameter[member[.example], member[.database], ClassCreator(arguments=[MemberReference(member=database, postfix_operators=[], prefix_operato...
Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[DatabaseObject] operator[>] identifier[T] identifier[createSnapshot] operator[SEP] identifier[T] identifier[example] , identifier[Database] identifier[database] operator[SEP] Keyword[throws] identifier[DatabaseException] , identifier[InvalidExample...
public CharSequence buildCharSequence(StringTrieBuilder.Option buildOption) { buildChars(buildOption); return CharBuffer.wrap(chars, chars.length-charsLength, charsLength); }
class class_name[name] begin[{] method[buildCharSequence, return_type[type[CharSequence]], modifier[public], parameter[buildOption]] begin[{] call[.buildChars, parameter[member[.buildOption]]] return[call[CharBuffer.wrap, parameter[member[.chars], binary_operation[member[chars.length], ...
Keyword[public] identifier[CharSequence] identifier[buildCharSequence] operator[SEP] identifier[StringTrieBuilder] operator[SEP] identifier[Option] identifier[buildOption] operator[SEP] { identifier[buildChars] operator[SEP] identifier[buildOption] operator[SEP] operator[SEP] Keyword[return] identifier[CharBuffe...
public void populateParameter(ActionRuntime runtime, OptionalThing<VirtualForm> optForm) throws ServletException { if (!optForm.isPresent()) { return; } final VirtualForm virtualForm = optForm.get(); if (handleJsonBody(runtime, virtualForm)) { return; } ...
class class_name[name] begin[{] method[populateParameter, return_type[void], modifier[public], parameter[runtime, optForm]] begin[{] if[call[optForm.isPresent, parameter[]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[VirtualForm], vir...
Keyword[public] Keyword[void] identifier[populateParameter] operator[SEP] identifier[ActionRuntime] identifier[runtime] , identifier[OptionalThing] operator[<] identifier[VirtualForm] operator[>] identifier[optForm] operator[SEP] Keyword[throws] identifier[ServletException] { Keyword[if] operator[SEP] operator[...
public static ApplicationDebugSettingsPlugin get() { final Application app = Application.get(); if (null == app) { throw new IllegalStateException( "No wicket application is bound to the current thread."); } final ApplicationDebugSettingsPlugin plugin = app.getMetaData(DEBUG_SETTINGS_PLUGIN_KEY); if...
class class_name[name] begin[{] method[get, return_type[type[ApplicationDebugSettingsPlugin]], modifier[public static], parameter[]] begin[{] local_variable[type[Application], app] if[binary_operation[literal[null], ==, member[.app]]] begin[{] ThrowStatement(expression=Class...
Keyword[public] Keyword[static] identifier[ApplicationDebugSettingsPlugin] identifier[get] operator[SEP] operator[SEP] { Keyword[final] identifier[Application] identifier[app] operator[=] identifier[Application] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Oth...
@Override public void process(HttpServerRequest vertxRequest, ContainerRequest jerseyRequest, Handler<Void> done) { jerseyRequest.setProperty(FIRST_BYTE_TIMER_CONTEXT, firstByteTimer.time()); jerseyRequest.setProperty(LAST_BYTE_TIMER_CONTEXT, lastByteTimer.time()); done.handle(null); }
class class_name[name] begin[{] method[process, return_type[void], modifier[public], parameter[vertxRequest, jerseyRequest, done]] begin[{] call[jerseyRequest.setProperty, parameter[member[.FIRST_BYTE_TIMER_CONTEXT], call[firstByteTimer.time, parameter[]]]] call[jerseyRequest.se...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[process] operator[SEP] identifier[HttpServerRequest] identifier[vertxRequest] , identifier[ContainerRequest] identifier[jerseyRequest] , identifier[Handler] operator[<] identifier[Void] operator[>] identifier[done] operator[SEP] { iden...
public String getTokens() { String tokens = attrMixin.getAttribute(TOKENS); return tokens.isEmpty() ? null : tokens; }
class class_name[name] begin[{] method[getTokens, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[String], tokens] return[TernaryExpression(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=tokens...
Keyword[public] identifier[String] identifier[getTokens] operator[SEP] operator[SEP] { identifier[String] identifier[tokens] operator[=] identifier[attrMixin] operator[SEP] identifier[getAttribute] operator[SEP] identifier[TOKENS] operator[SEP] operator[SEP] Keyword[return] identifier[tokens] operator[SEP] ident...
static public int checkFileType(ucar.unidata.io.RandomAccessFile raf) throws IOException { int format = 0; byte[] magic = new byte[MAGIC_NUMBER_LEN]; // If this is not an HDF5 file, then the magic number is at // position 0; If it is an HDF5 file, then we need to se...
class class_name[name] begin[{] method[checkFileType, return_type[type[int]], modifier[public static], parameter[raf]] begin[{] local_variable[type[int], format] local_variable[type[byte], magic] call[raf.seek, parameter[literal[0]]] if[binary_operation[call[raf....
Keyword[static] Keyword[public] Keyword[int] identifier[checkFileType] operator[SEP] identifier[ucar] operator[SEP] identifier[unidata] operator[SEP] identifier[io] operator[SEP] identifier[RandomAccessFile] identifier[raf] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[int] identifier[format] o...
public final Node getPropertyNode(String propertyName) { Property p = getSlot(propertyName); return p == null ? null : p.getNode(); }
class class_name[name] begin[{] method[getPropertyNode, return_type[type[Node]], modifier[final public], parameter[propertyName]] begin[{] local_variable[type[Property], p] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=p, postfix_operators=[], prefix_operato...
Keyword[public] Keyword[final] identifier[Node] identifier[getPropertyNode] operator[SEP] identifier[String] identifier[propertyName] operator[SEP] { identifier[Property] identifier[p] operator[=] identifier[getSlot] operator[SEP] identifier[propertyName] operator[SEP] operator[SEP] Keyword[return] identifier[p]...
protected void generateOtherFiles(RootDoc root, ClassTree classtree) throws Exception { super.generateOtherFiles(root, classtree); if (configuration.linksource) { SourceToHTMLConverter.convertRoot(configuration, root, DocPaths.SOURCE_OUTPUT); } if...
class class_name[name] begin[{] method[generateOtherFiles, return_type[void], modifier[protected], parameter[root, classtree]] begin[{] SuperMethodInvocation(arguments=[MemberReference(member=root, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=clas...
Keyword[protected] Keyword[void] identifier[generateOtherFiles] operator[SEP] identifier[RootDoc] identifier[root] , identifier[ClassTree] identifier[classtree] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[super] operator[SEP] identifier[generateOtherFiles] operator[SEP] identifier[root] , ide...
protected void cleanupConnection(Conversation conversation) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "cleanupConnection", conversation); ConversationState convState = (ConversationState) conversation.getAttachment(); ServerSideConnecti...
class class_name[name] begin[{] method[cleanupConnection, return_type[void], modifier[protected], parameter[conversation]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parame...
Keyword[protected] Keyword[void] identifier[cleanupConnection] operator[SEP] identifier[Conversation] identifier[conversation] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] i...
public void load(ClassLoader classLoader) { Map<String, GroovyRunner> map = runnerMap; // direct read if (map == null) { map = getMap(); // initialize and load (recursive call), result ignored if (classLoader == null) { // getMap() already loaded using a null clas...
class class_name[name] begin[{] method[load, return_type[void], modifier[public], parameter[classLoader]] begin[{] local_variable[type[Map], map] if[binary_operation[member[.map], ==, literal[null]]] begin[{] assign[member[.map], call[.getMap, parameter[]]] ...
Keyword[public] Keyword[void] identifier[load] operator[SEP] identifier[ClassLoader] identifier[classLoader] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[GroovyRunner] operator[>] identifier[map] operator[=] identifier[runnerMap] operator[SEP] Keyword[if] operator[SEP] identifier[...
@Override public Object apply(Object value, Object... params) { return super.asString(value).toLowerCase(); }
class class_name[name] begin[{] method[apply, return_type[type[Object]], modifier[public], parameter[value, params]] begin[{] return[SuperMethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=asString, postfix_operators=[...
annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[apply] operator[SEP] identifier[Object] identifier[value] , identifier[Object] operator[...] identifier[params] operator[SEP] { Keyword[return] Keyword[super] operator[SEP] identifier[asString] operator[SEP] identifier[value] opera...
public void setLabels(INDArray... labels) { if (labels != null && labels.length != this.numOutputArrays) { throw new IllegalArgumentException("Invalid output array: network has " + numOutputArrays + " outputs, but array is of length " + labels.length); } this.labe...
class class_name[name] begin[{] method[setLabels, return_type[void], modifier[public], parameter[labels]] begin[{] if[binary_operation[binary_operation[member[.labels], !=, literal[null]], &&, binary_operation[member[labels.length], !=, THIS[member[None.numOutputArrays]]]]] begin[{] ...
Keyword[public] Keyword[void] identifier[setLabels] operator[SEP] identifier[INDArray] operator[...] identifier[labels] operator[SEP] { Keyword[if] operator[SEP] identifier[labels] operator[!=] Other[null] operator[&&] identifier[labels] operator[SEP] identifier[length] operator[!=] Keyword[this] operator[SEP] i...
@Override public MediaResponse uploadMedia(String toUser, String filePath) { File file = new File(filePath); if (!file.exists()) { throw new WeChatException("文件[" + filePath + "]不存在"); } log.info("开始上传文件: {}", filePath); long size = file.length(); S...
class class_name[name] begin[{] method[uploadMedia, return_type[type[MediaResponse]], modifier[public], parameter[toUser, filePath]] begin[{] local_variable[type[File], file] if[call[file.exists, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Binary...
annotation[@] identifier[Override] Keyword[public] identifier[MediaResponse] identifier[uploadMedia] operator[SEP] identifier[String] identifier[toUser] , identifier[String] identifier[filePath] operator[SEP] { identifier[File] identifier[file] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[...
public synchronized void playMethodCalls(Memento memento, String [] savePoints) { String savePoint = null; MethodCallFact methodCallFact = null; SummaryException exceptions = new SummaryException(); //loop thru savepoints for (int i = 0; i < savePoints.length; i++) { savePoint = savePoints[i]...
class class_name[name] begin[{] method[playMethodCalls, return_type[void], modifier[synchronized public], parameter[memento, savePoints]] begin[{] local_variable[type[String], savePoint] local_variable[type[MethodCallFact], methodCallFact] local_variable[type[SummaryException], exceptio...
Keyword[public] Keyword[synchronized] Keyword[void] identifier[playMethodCalls] operator[SEP] identifier[Memento] identifier[memento] , identifier[String] operator[SEP] operator[SEP] identifier[savePoints] operator[SEP] { identifier[String] identifier[savePoint] operator[=] Other[null] operator[SEP] identifier[...
@Override public void getResult(final ContentHandler buf) throws SAXException { final String templateFilePath = paramTable.get(FileGenerator.PARAM_TEMPLATE); for (final Value value: valueSet) { buf.startElement(NULL_NS_URI, "stringfile", "stringfile", new AttributesBuilder().build()); ...
class class_name[name] begin[{] method[getResult, return_type[void], modifier[public], parameter[buf]] begin[{] local_variable[type[String], templateFilePath] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(memb...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[getResult] operator[SEP] Keyword[final] identifier[ContentHandler] identifier[buf] operator[SEP] Keyword[throws] identifier[SAXException] { Keyword[final] identifier[String] identifier[templateFilePath] operator[=] identifier[paramTable]...
private static void verifySignature( X509CertificateHolder cert, byte[] sig, byte[] data, AlgorithmIdentifier idf) throws CertificateException { try { String algorithm = SIGNATURE_OID_TO_STRING.get(idf.getAlgorithm()); if (algorithm == null) { throw new NoSuchAlgorithmExc...
class class_name[name] begin[{] method[verifySignature, return_type[void], modifier[private static], parameter[cert, sig, data, idf]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvoca...
Keyword[private] Keyword[static] Keyword[void] identifier[verifySignature] operator[SEP] identifier[X509CertificateHolder] identifier[cert] , Keyword[byte] operator[SEP] operator[SEP] identifier[sig] , Keyword[byte] operator[SEP] operator[SEP] identifier[data] , identifier[AlgorithmIdentifier] identifier[idf] operat...
private static void scale(double constant, double vector[]) { if (constant == 1.0) return; for (int i = 0; i < vector.length; i++) { vector[i] *= constant; } }
class class_name[name] begin[{] method[scale, return_type[void], modifier[private static], parameter[constant, vector]] begin[{] if[binary_operation[member[.constant], ==, literal[1.0]]] begin[{] return[None] else begin[{] None end[}] ForStatement(body=BlockStatement(lab...
Keyword[private] Keyword[static] Keyword[void] identifier[scale] operator[SEP] Keyword[double] identifier[constant] , Keyword[double] identifier[vector] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[constant] operator[==] literal[Float] operator[SEP] Keyword[return] operator[S...
public static void setTime(Calendar cal, Date time) { if (time != null) { Calendar startCalendar = popCalendar(time); cal.set(Calendar.HOUR_OF_DAY, startCalendar.get(Calendar.HOUR_OF_DAY)); cal.set(Calendar.MINUTE, startCalendar.get(Calendar.MINUTE)); cal.set(Calendar....
class class_name[name] begin[{] method[setTime, return_type[void], modifier[public static], parameter[cal, time]] begin[{] if[binary_operation[member[.time], !=, literal[null]]] begin[{] local_variable[type[Calendar], startCalendar] call[cal.set, parameter[me...
Keyword[public] Keyword[static] Keyword[void] identifier[setTime] operator[SEP] identifier[Calendar] identifier[cal] , identifier[Date] identifier[time] operator[SEP] { Keyword[if] operator[SEP] identifier[time] operator[!=] Other[null] operator[SEP] { identifier[Calendar] identifier[startCalendar] o...
public void setContentMD5(String md5Base64) { if(md5Base64 == null){ metadata.remove(Headers.CONTENT_MD5); }else{ metadata.put(Headers.CONTENT_MD5, md5Base64); } }
class class_name[name] begin[{] method[setContentMD5, return_type[void], modifier[public], parameter[md5Base64]] begin[{] if[binary_operation[member[.md5Base64], ==, literal[null]]] begin[{] call[metadata.remove, parameter[member[Headers.CONTENT_MD5]]] else begin...
Keyword[public] Keyword[void] identifier[setContentMD5] operator[SEP] identifier[String] identifier[md5Base64] operator[SEP] { Keyword[if] operator[SEP] identifier[md5Base64] operator[==] Other[null] operator[SEP] { identifier[metadata] operator[SEP] identifier[remove] operator[SEP] identifier[Headers...
public void setOption(String key) throws UnsupportedOption { if (key.equals(IGNORE_SCHEMA_ID)) { options.add(key); } else { throw new UnsupportedOption("DecodingOption '" + key + "' is unknown!"); } }
class class_name[name] begin[{] method[setOption, return_type[void], modifier[public], parameter[key]] begin[{] if[call[key.equals, parameter[member[.IGNORE_SCHEMA_ID]]]] begin[{] call[options.add, parameter[member[.key]]] else begin[{] ThrowStatement...
Keyword[public] Keyword[void] identifier[setOption] operator[SEP] identifier[String] identifier[key] operator[SEP] Keyword[throws] identifier[UnsupportedOption] { Keyword[if] operator[SEP] identifier[key] operator[SEP] identifier[equals] operator[SEP] identifier[IGNORE_SCHEMA_ID] operator[SEP] operator[SEP] { ...
protected boolean isForbidden(URI uri) { String scheme = uri.getScheme(); String host = uri.getHost(); int port = uri.getPort(); return isForbidden(scheme, host, port, true); }
class class_name[name] begin[{] method[isForbidden, return_type[type[boolean]], modifier[protected], parameter[uri]] begin[{] local_variable[type[String], scheme] local_variable[type[String], host] local_variable[type[int], port] return[call[.isForbidden, parameter[member[.schem...
Keyword[protected] Keyword[boolean] identifier[isForbidden] operator[SEP] identifier[URI] identifier[uri] operator[SEP] { identifier[String] identifier[scheme] operator[=] identifier[uri] operator[SEP] identifier[getScheme] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[host] operator[=]...
private HttpResponse getResponse(StringBuilder q, String _id) throws URISyntaxException, IOException, ClientProtocolException { URI uri = new URI(CouchDBConstants.PROTOCOL, null, httpHost.getHostName(), httpHost.getPort(), _id, q.toString(), null); HttpGet get = new HttpG...
class class_name[name] begin[{] method[getResponse, return_type[type[HttpResponse]], modifier[private], parameter[q, _id]] begin[{] local_variable[type[URI], uri] local_variable[type[HttpGet], get] call[get.addHeader, parameter[literal["Accept"], literal["application/json"]]] ...
Keyword[private] identifier[HttpResponse] identifier[getResponse] operator[SEP] identifier[StringBuilder] identifier[q] , identifier[String] identifier[_id] operator[SEP] Keyword[throws] identifier[URISyntaxException] , identifier[IOException] , identifier[ClientProtocolException] { identifier[URI] identifier...
@Override public ConversationReceiveListener dataReceived(WsByteBuffer data, int segmentType, int requestNumber, int priority, boolean allocatedFromBufferPool, ...
class class_name[name] begin[{] method[dataReceived, return_type[type[ConversationReceiveListener]], modifier[public], parameter[data, segmentType, requestNumber, priority, allocatedFromBufferPool, partOfExchange, conversation]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabl...
annotation[@] identifier[Override] Keyword[public] identifier[ConversationReceiveListener] identifier[dataReceived] operator[SEP] identifier[WsByteBuffer] identifier[data] , Keyword[int] identifier[segmentType] , Keyword[int] identifier[requestNumber] , Keyword[int] identifier[priority] , Keyword[boolean] identifie...
public Object startupService(BundleContext bundleContext) { try { Environment env = (Environment)this.getService(Env.class); // Note the order that I do this... this is because MainApplication may need access to the remoteapp during initialization Map<String, Object> prop...
class class_name[name] begin[{] method[startupService, return_type[type[Object]], modifier[public], parameter[bundleContext]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=This(postfix_operators=[], prefi...
Keyword[public] identifier[Object] identifier[startupService] operator[SEP] identifier[BundleContext] identifier[bundleContext] operator[SEP] { Keyword[try] { identifier[Environment] identifier[env] operator[=] operator[SEP] identifier[Environment] operator[SEP] Keyword[this] operator[SEP] identifier[...
double psfunc3(double x, double t1, double t2, int dim, int type) { // type: the type of curve // css: the class of index double beta; beta = 0.0; dim++; if (type == 31) { double xy = 4 * (x - 0.5); double rate = 1.0 * dim / nvar; beta = xy - 4 * (t1 * t1 * rate + t2 * (1...
class class_name[name] begin[{] method[psfunc3, return_type[type[double]], modifier[default], parameter[x, t1, t2, dim, type]] begin[{] local_variable[type[double], beta] assign[member[.beta], literal[0.0]] member[.dim] if[binary_operation[member[.type], ...
Keyword[double] identifier[psfunc3] operator[SEP] Keyword[double] identifier[x] , Keyword[double] identifier[t1] , Keyword[double] identifier[t2] , Keyword[int] identifier[dim] , Keyword[int] identifier[type] operator[SEP] { Keyword[double] identifier[beta] operator[SEP] identifier[beta] operator[=] literal[...
private PublishDocumentResponse publishDocument(PublishDocumentRequest request) { checkNotNull(request, "request should not be null."); checkNotNull(request.getDocumentId(), "documentId should not be null."); InternalRequest internalRequest = this.createRequest(HttpMethodName.PUT, request, DOC, ...
class class_name[name] begin[{] method[publishDocument, return_type[type[PublishDocumentResponse]], modifier[private], parameter[request]] begin[{] call[.checkNotNull, parameter[member[.request], literal["request should not be null."]]] call[.checkNotNull, parameter[call[request...
Keyword[private] identifier[PublishDocumentResponse] identifier[publishDocument] operator[SEP] identifier[PublishDocumentRequest] identifier[request] operator[SEP] { identifier[checkNotNull] operator[SEP] identifier[request] , literal[String] operator[SEP] operator[SEP] identifier[checkNotNull] operator[SEP] id...
private void sendRESTMessage(String url) { HttpInputStream response = null; try { logger.debug("Getting " + url); response = _webClient.get(url, false, _gSearchCredentials); int code = response.getStatusCode(); if (code != 200) { logger.war...
class class_name[name] begin[{] method[sendRESTMessage, return_type[void], modifier[private], parameter[url]] begin[{] local_variable[type[HttpInputStream], response] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operator...
Keyword[private] Keyword[void] identifier[sendRESTMessage] operator[SEP] identifier[String] identifier[url] operator[SEP] { identifier[HttpInputStream] identifier[response] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[Str...
public JSONObject deleteBy(Query query, RequestOptions requestOptions) throws AlgoliaException { String paramsString = query.getQueryString(); JSONObject body = new JSONObject(); try { body.put("params", paramsString); } catch (JSONException e) { throw new RuntimeException(e); } retu...
class class_name[name] begin[{] method[deleteBy, return_type[type[JSONObject]], modifier[public], parameter[query, requestOptions]] begin[{] local_variable[type[String], paramsString] local_variable[type[JSONObject], body] TryStatement(block=[StatementExpression(expression=MethodInvocat...
Keyword[public] identifier[JSONObject] identifier[deleteBy] operator[SEP] identifier[Query] identifier[query] , identifier[RequestOptions] identifier[requestOptions] operator[SEP] Keyword[throws] identifier[AlgoliaException] { identifier[String] identifier[paramsString] operator[=] identifier[query] operator[SE...
public void initRecord(boolean bDisplay) throws DBException { int iFieldCount = this.getFieldCount(); // Number of fields to read in for (int iFieldSeq = Constants.MAIN_FIELD; iFieldSeq < iFieldCount + Constants.MAIN_FIELD; iFieldSeq++) { FieldInfo field = this.getField(iFie...
class class_name[name] begin[{] method[initRecord, return_type[void], modifier[public], parameter[bDisplay]] begin[{] local_variable[type[int], iFieldCount] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensio...
Keyword[public] Keyword[void] identifier[initRecord] operator[SEP] Keyword[boolean] identifier[bDisplay] operator[SEP] Keyword[throws] identifier[DBException] { Keyword[int] identifier[iFieldCount] operator[=] Keyword[this] operator[SEP] identifier[getFieldCount] operator[SEP] operator[SEP] operator[SEP] Keyword...
public static boolean isPIDAlive(final int pid) throws IOException { final String ps = "ps"; final String command[] = new String[] { ps, "-fp", pid + "" }; final StringBuffer in = new StringBuffer(); final Process process = Runtime.getRuntime().exec(command); InputStream inStream = proces...
class class_name[name] begin[{] method[isPIDAlive, return_type[type[boolean]], modifier[public static], parameter[pid]] begin[{] local_variable[type[String], ps] local_variable[type[String], command] local_variable[type[StringBuffer], in] local_variable[type[Process], process] ...
Keyword[public] Keyword[static] Keyword[boolean] identifier[isPIDAlive] operator[SEP] Keyword[final] Keyword[int] identifier[pid] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[final] identifier[String] identifier[ps] operator[=] literal[String] operator[SEP] Keyword[final] identifier[String] id...
public String readLineNoChop() throws IOException { CharBuffer cb = new CharBuffer(); if (readLine(cb, false)) return cb.toString(); else if (cb.length() == 0) return null; else return cb.toString(); }
class class_name[name] begin[{] method[readLineNoChop, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[CharBuffer], cb] if[call[.readLine, parameter[member[.cb], literal[false]]]] begin[{] return[call[cb.toString, parameter[]]] else begin[{...
Keyword[public] identifier[String] identifier[readLineNoChop] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[CharBuffer] identifier[cb] operator[=] Keyword[new] identifier[CharBuffer] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[readLine] operat...
ManagerEvent addMember(BridgeEnterEvent event) { List<BridgeEnterEvent> remaining = null; synchronized (members) { if (members.put(event.getChannel(), event) == null && members.size() == 2) { remaining = new ArrayList<>(members.val...
class class_name[name] begin[{] method[addMember, return_type[type[ManagerEvent]], modifier[default], parameter[event]] begin[{] local_variable[type[List], remaining] SYNCHRONIZED[member[.members]] BEGIN[{] if[binary_operation[binary_operation[call[members.put, p...
identifier[ManagerEvent] identifier[addMember] operator[SEP] identifier[BridgeEnterEvent] identifier[event] operator[SEP] { identifier[List] operator[<] identifier[BridgeEnterEvent] operator[>] identifier[remaining] operator[=] Other[null] operator[SEP] Keyword[synchronized] operator[SEP] identifier[members] ope...
private WyalFile.VariableDeclaration[] generatePreconditionParameters(WyilFile.Decl.Callable declaration, LocalEnvironment environment) { Tuple<WyilFile.Decl.Variable> params = declaration.getParameters(); WyalFile.VariableDeclaration[] vars = new WyalFile.VariableDeclaration[params.size()]; // second, set ini...
class class_name[name] begin[{] method[generatePreconditionParameters, return_type[type[WyalFile]], modifier[private], parameter[declaration, environment]] begin[{] local_variable[type[Tuple], params] local_variable[type[WyalFile], vars] ForStatement(body=BlockStatement(label=None, stat...
Keyword[private] identifier[WyalFile] operator[SEP] identifier[VariableDeclaration] operator[SEP] operator[SEP] identifier[generatePreconditionParameters] operator[SEP] identifier[WyilFile] operator[SEP] identifier[Decl] operator[SEP] identifier[Callable] identifier[declaration] , identifier[LocalEnvironment] identifi...
public static String hexSHA512(String data, String salt) { Objects.requireNonNull(data, Required.DATA.toString()); Objects.requireNonNull(salt, Required.SALT.toString()); return DigestUtils.sha512Hex(data + salt); }
class class_name[name] begin[{] method[hexSHA512, return_type[type[String]], modifier[public static], parameter[data, salt]] begin[{] call[Objects.requireNonNull, parameter[member[.data], call[Required.DATA.toString, parameter[]]]] call[Objects.requireNonNull, parameter[member[....
Keyword[public] Keyword[static] identifier[String] identifier[hexSHA512] operator[SEP] identifier[String] identifier[data] , identifier[String] identifier[salt] operator[SEP] { identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[data] , identifier[Required] operator[SEP] ident...
public static void displayChains(TraceComponent logger, ChainData[] chains, String message, String prefix) { if (!logger.isDebugEnabled()) { return; } if (chains == null || chains.length == 0) { chTrace.debugTrace(logger, prefix + ", n...
class class_name[name] begin[{] method[displayChains, return_type[void], modifier[public static], parameter[logger, chains, message, prefix]] begin[{] if[call[logger.isDebugEnabled, parameter[]]] begin[{] return[None] else begin[{] None end[}] if[bina...
Keyword[public] Keyword[static] Keyword[void] identifier[displayChains] operator[SEP] identifier[TraceComponent] identifier[logger] , identifier[ChainData] operator[SEP] operator[SEP] identifier[chains] , identifier[String] identifier[message] , identifier[String] identifier[prefix] operator[SEP] { Keyword[if...
public final void synpred28_DRL5Expressions_fragment() throws RecognitionException { // src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:549:15: ( DOT ID ) // src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:549:16: DOT ID { match(input,DOT,FOLLOW_DOT_in_synpred28_DRL5Expressions2916);...
class class_name[name] begin[{] method[synpred28_DRL5Expressions_fragment, return_type[void], modifier[final public], parameter[]] begin[{] call[.match, parameter[member[.input], member[.DOT], member[.FOLLOW_DOT_in_synpred28_DRL5Expressions2916]]] if[member[state.failed]...
Keyword[public] Keyword[final] Keyword[void] identifier[synpred28_DRL5Expressions_fragment] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { { identifier[match] operator[SEP] identifier[input] , identifier[DOT] , identifier[FOLLOW_DOT_in_synpred28_DRL5Expressions2916] o...
public void putSecretValue(final String secretId, final String clientRequestToken, final Key key, final Stage stage) { putSecretValue(secretId, clientRequestToken, singletonList(key), stage); }
class class_name[name] begin[{] method[putSecretValue, return_type[void], modifier[public], parameter[secretId, clientRequestToken, key, stage]] begin[{] call[.putSecretValue, parameter[member[.secretId], member[.clientRequestToken], call[.singletonList, parameter[member[.key]]], member[.stage]...
Keyword[public] Keyword[void] identifier[putSecretValue] operator[SEP] Keyword[final] identifier[String] identifier[secretId] , Keyword[final] identifier[String] identifier[clientRequestToken] , Keyword[final] identifier[Key] identifier[key] , Keyword[final] identifier[Stage] identifier[stage] operator[SEP] { ...
public boolean await(long waitDuration, TimeUnit timeUnit) throws InterruptedException { return sync.tryAcquireSharedNanos(0, timeUnit.toNanos(waitDuration)); }
class class_name[name] begin[{] method[await, return_type[type[boolean]], modifier[public], parameter[waitDuration, timeUnit]] begin[{] return[call[sync.tryAcquireSharedNanos, parameter[literal[0], call[timeUnit.toNanos, parameter[member[.waitDuration]]]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[await] operator[SEP] Keyword[long] identifier[waitDuration] , identifier[TimeUnit] identifier[timeUnit] operator[SEP] Keyword[throws] identifier[InterruptedException] { Keyword[return] identifier[sync] operator[SEP] identifier[tryAcquireSharedNanos] operator[SEP] Othe...
public int getInt(String key, int defaultValue) { String value = get(key); if(value == null) return defaultValue; try { return Integer.parseInt(value); } catch (NumberFormatException e) { throw new IllegalArgumentException(key + " parameter should be a number"); }...
class class_name[name] begin[{] method[getInt, return_type[type[int]], modifier[public], parameter[key, defaultValue]] begin[{] local_variable[type[String], value] if[binary_operation[member[.value], ==, literal[null]]] begin[{] return[member[.defaultValue]] else begin[{] None ...
Keyword[public] Keyword[int] identifier[getInt] operator[SEP] identifier[String] identifier[key] , Keyword[int] identifier[defaultValue] operator[SEP] { identifier[String] identifier[value] operator[=] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier...
Rule Unicode() { return Sequence( '\\', Hex(), Optional(Hex(), Optional(Hex(), Optional(Hex(), Optional(Hex(), Optional(Hex()))))), Optional(Whitespace()) ); }
class class_name[name] begin[{] method[Unicode, return_type[type[Rule]], modifier[default], parameter[]] begin[{] return[call[.Sequence, parameter[literal['\\'], call[.Hex, parameter[]], call[.Optional, parameter[call[.Hex, parameter[]], call[.Optional, parameter[call[.Hex, parameter[]], call[.Optional...
identifier[Rule] identifier[Unicode] operator[SEP] operator[SEP] { Keyword[return] identifier[Sequence] operator[SEP] literal[String] , identifier[Hex] operator[SEP] operator[SEP] , identifier[Optional] operator[SEP] identifier[Hex] operator[SEP] operator[SEP] , identifier[Optional] operator[SEP] identifier[H...
public static <T> CachedObservable<T> cache(Observable<T> source) { return new CachedObservable<T>(source); }
class class_name[name] begin[{] method[cache, return_type[type[CachedObservable]], modifier[public static], parameter[source]] begin[{] return[ClassCreator(arguments=[MemberReference(member=source, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_argume...
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[CachedObservable] operator[<] identifier[T] operator[>] identifier[cache] operator[SEP] identifier[Observable] operator[<] identifier[T] operator[>] identifier[source] operator[SEP] { Keyword[return] Keyword[new] identifier[CachedOb...
public SelectStatement getPreparedSelectByPkStatement(ClassDescriptor cld) { SelectStatement sql; SqlForClass sfc = getSqlForClass(cld); sql = sfc.getSelectByPKSql(); if(sql == null) { sql = new SqlSelectByPkStatement(m_platform, cld, logger); ...
class class_name[name] begin[{] method[getPreparedSelectByPkStatement, return_type[type[SelectStatement]], modifier[public], parameter[cld]] begin[{] local_variable[type[SelectStatement], sql] local_variable[type[SqlForClass], sfc] assign[member[.sql], call[sfc.getSelectByPKSql,...
Keyword[public] identifier[SelectStatement] identifier[getPreparedSelectByPkStatement] operator[SEP] identifier[ClassDescriptor] identifier[cld] operator[SEP] { identifier[SelectStatement] identifier[sql] operator[SEP] identifier[SqlForClass] identifier[sfc] operator[=] identifier[getSqlForClass] operator[SEP] i...
@Override public void refreshFromMassive() throws RepositoryBackendException, RepositoryResourceException { try { _asset = _client.getAsset(_asset.get_id()); parseAttachmentsInAsset(); } catch (IOException ioe) { throw new RepositoryBackendIOException("Unable to o...
class class_name[name] begin[{] method[refreshFromMassive, return_type[void], modifier[public], parameter[]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=_asset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, va...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[refreshFromMassive] operator[SEP] operator[SEP] Keyword[throws] identifier[RepositoryBackendException] , identifier[RepositoryResourceException] { Keyword[try] { identifier[_asset] operator[=] identifier[_client] operator[SEP...
public BsonInt64 getInt64(final Object key, final BsonInt64 defaultValue) { if (!containsKey(key)) { return defaultValue; } return get(key).asInt64(); }
class class_name[name] begin[{] method[getInt64, return_type[type[BsonInt64]], modifier[public], parameter[key, defaultValue]] begin[{] if[call[.containsKey, parameter[member[.key]]]] begin[{] return[member[.defaultValue]] else begin[{] None end[}] return[cal...
Keyword[public] identifier[BsonInt64] identifier[getInt64] operator[SEP] Keyword[final] identifier[Object] identifier[key] , Keyword[final] identifier[BsonInt64] identifier[defaultValue] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[containsKey] operator[SEP] identifier[key] operator[SEP] ope...
static public DataCoding createCharacterEncodingGroup(byte characterEncoding) throws IllegalArgumentException { // bits 3 thru 0 of the encoding represent 16 languages // make sure the top bits 7 thru 4 are not set if ((characterEncoding & 0xF0) != 0) { throw new IllegalArgumentExcep...
class class_name[name] begin[{] method[createCharacterEncodingGroup, return_type[type[DataCoding]], modifier[public static], parameter[characterEncoding]] begin[{] if[binary_operation[binary_operation[member[.characterEncoding], &, literal[0xF0]], !=, literal[0]]] begin[{] ThrowStat...
Keyword[static] Keyword[public] identifier[DataCoding] identifier[createCharacterEncodingGroup] operator[SEP] Keyword[byte] identifier[characterEncoding] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] { Keyword[if] operator[SEP] operator[SEP] identifier[characterEncoding] operator[&] literal[...
boolean callbackUnregistered(final TransactionalProtocolClient old, final boolean shuttingDown) { // Disconnect the remote connection. // WFCORE-196 Do this out of the sync block to avoid deadlocks where in-flight requests can't // be informed that the channel has closed protocolClient.d...
class class_name[name] begin[{] method[callbackUnregistered, return_type[type[boolean]], modifier[default], parameter[old, shuttingDown]] begin[{] call[protocolClient.disconnected, parameter[member[.old]]] SYNCHRONIZED[THIS[]] BEGIN[{] if[binary_operation...
Keyword[boolean] identifier[callbackUnregistered] operator[SEP] Keyword[final] identifier[TransactionalProtocolClient] identifier[old] , Keyword[final] Keyword[boolean] identifier[shuttingDown] operator[SEP] { identifier[protocolClient] operator[SEP] identifier[disconnected] operator[SEP] identifier[old] operat...
private void scanXMLDeclOrTextDecl(boolean scanningTextDecl) throws IOException, JasperException { // scan decl scanXMLDeclOrTextDecl(scanningTextDecl, fStrings); fMarkupDepth--; // pseudo-attribute values String encodingPseudoAttr = fStrings[1]; // set encodi...
class class_name[name] begin[{] method[scanXMLDeclOrTextDecl, return_type[void], modifier[private], parameter[scanningTextDecl]] begin[{] call[.scanXMLDeclOrTextDecl, parameter[member[.scanningTextDecl], member[.fStrings]]] member[.fMarkupDepth] local_variable[type[Strin...
Keyword[private] Keyword[void] identifier[scanXMLDeclOrTextDecl] operator[SEP] Keyword[boolean] identifier[scanningTextDecl] operator[SEP] Keyword[throws] identifier[IOException] , identifier[JasperException] { identifier[scanXMLDeclOrTextDecl] operator[SEP] identifier[scanningTextDecl] , identifier[fStrings] ...
@Override public String toString4Where(final Object _value) throws EFapsException { String ret = ""; if (_value instanceof ReadableDateTime) { ret = Context.getDbType().getStr4DateTime((ReadableDateTime) _value); } else if (_value instanceof String) { ret ...
class class_name[name] begin[{] method[toString4Where, return_type[type[String]], modifier[public], parameter[_value]] begin[{] local_variable[type[String], ret] if[binary_operation[member[._value], instanceof, type[ReadableDateTime]]] begin[{] assign[member[.ret...
annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[toString4Where] operator[SEP] Keyword[final] identifier[Object] identifier[_value] operator[SEP] Keyword[throws] identifier[EFapsException] { identifier[String] identifier[ret] operator[=] literal[String] operator[SEP] Keyword[if] o...
@Override protected void addNavDetailLink(boolean link, Content liNav) { if (link) { liNav.addContent(writer.getHyperLink( SectionName.METHOD_DETAIL, contents.navMethod)); } else { liNav.addContent(contents.navMethod); } }
class class_name[name] begin[{] method[addNavDetailLink, return_type[void], modifier[protected], parameter[link, liNav]] begin[{] if[member[.link]] begin[{] call[liNav.addContent, parameter[call[writer.getHyperLink, parameter[member[SectionName.METHOD_DETAIL], member[con...
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[addNavDetailLink] operator[SEP] Keyword[boolean] identifier[link] , identifier[Content] identifier[liNav] operator[SEP] { Keyword[if] operator[SEP] identifier[link] operator[SEP] { identifier[liNav] operator[SEP] identifie...
private void undoPut() throws ObjectManagerException { final String methodName = "undoPut"; if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) trace.entry(this, cclass, methodName); // Give back all of the remaining space. owningToken.objectStor...
class class_name[name] begin[{] method[undoPut, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[String], methodName] if[binary_operation[call[Tracing.isAnyTracingEnabled, parameter[]], &&, call[trace.isEntryEnabled, parameter[]]]] begin[{] cal...
Keyword[private] Keyword[void] identifier[undoPut] operator[SEP] operator[SEP] Keyword[throws] identifier[ObjectManagerException] { Keyword[final] identifier[String] identifier[methodName] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[Tracing] operator[SEP] identifier[isAnyTracin...
private StorageNode getStorageNode(String groupName) { if (null == groupName) { return trackerClient.getStoreStorage(); } else { return trackerClient.getStoreStorage(groupName); } }
class class_name[name] begin[{] method[getStorageNode, return_type[type[StorageNode]], modifier[private], parameter[groupName]] begin[{] if[binary_operation[literal[null], ==, member[.groupName]]] begin[{] return[call[trackerClient.getStoreStorage, parameter[]]] else begin[{...
Keyword[private] identifier[StorageNode] identifier[getStorageNode] operator[SEP] identifier[String] identifier[groupName] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[groupName] operator[SEP] { Keyword[return] identifier[trackerClient] operator[SEP] identifier[getStor...
public final void rollbackRepositoryInfo() { SchematicEntry repositoryInfoEntry = this.documentStore.localStore().get(REPOSITORY_INFO_KEY); if (repositoryInfoEntry != null && initializingRepository) { localStore().runInTransaction(() -> { Document repoInfoDoc = repositoryInfo...
class class_name[name] begin[{] method[rollbackRepositoryInfo, return_type[void], modifier[final public], parameter[]] begin[{] local_variable[type[SchematicEntry], repositoryInfoEntry] if[binary_operation[binary_operation[member[.repositoryInfoEntry], !=, literal[null]], &&, member[.in...
Keyword[public] Keyword[final] Keyword[void] identifier[rollbackRepositoryInfo] operator[SEP] operator[SEP] { identifier[SchematicEntry] identifier[repositoryInfoEntry] operator[=] Keyword[this] operator[SEP] identifier[documentStore] operator[SEP] identifier[localStore] operator[SEP] operator[SEP] operator[SEP]...
private static boolean serialDocInclude(Doc doc) { if (doc.isEnum()) { return false; } Tag[] serial = doc.tags("serial"); if (serial.length > 0) { String serialtext = StringUtils.toLowerCase(serial[0].text()); if (serialtext.indexOf("exclude") >= 0) { ...
class class_name[name] begin[{] method[serialDocInclude, return_type[type[boolean]], modifier[private static], parameter[doc]] begin[{] if[call[doc.isEnum, parameter[]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[Tag], seria...
Keyword[private] Keyword[static] Keyword[boolean] identifier[serialDocInclude] operator[SEP] identifier[Doc] identifier[doc] operator[SEP] { Keyword[if] operator[SEP] identifier[doc] operator[SEP] identifier[isEnum] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[...
@Override public WarpResult execute() { try { executeWarp.fire(new ExecuteWarp(activity, warpContext)); Exception executionException = warpContext.getFirstException(); if (executionException != null) { propagateException(executionException); }...
class class_name[name] begin[{] method[execute, return_type[type[WarpResult]], modifier[public], parameter[]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=activity, postfix_operators=[], prefix_operators=[], quali...
annotation[@] identifier[Override] Keyword[public] identifier[WarpResult] identifier[execute] operator[SEP] operator[SEP] { Keyword[try] { identifier[executeWarp] operator[SEP] identifier[fire] operator[SEP] Keyword[new] identifier[ExecuteWarp] operator[SEP] identifier[activity] , identifier[warpCont...
public String convertIfcSoundScaleEnumToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); }
class class_name[name] begin[{] method[convertIfcSoundScaleEnumToString, return_type[type[String]], modifier[public], parameter[eDataType, instanceValue]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=instanceValue, postfix_operators=[], prefix_operators=[]...
Keyword[public] identifier[String] identifier[convertIfcSoundScaleEnumToString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[Object] identifier[instanceValue] operator[SEP] { Keyword[return] identifier[instanceValue] operator[==] Other[null] operator[?] Other[null] operator[:] identif...
private int getStatusBarHeight() { int result = 0; int resourceId = mHoldingActivity.getResources() .getIdentifier("status_bar_height", "dimen", "android"); if (resourceId > 0) { result = mHoldingActivity.getResources().getDimensionPixelSize(resourceId); } ...
class class_name[name] begin[{] method[getStatusBarHeight, return_type[type[int]], modifier[private], parameter[]] begin[{] local_variable[type[int], result] local_variable[type[int], resourceId] if[binary_operation[member[.resourceId], >, literal[0]]] begin[{] ...
Keyword[private] Keyword[int] identifier[getStatusBarHeight] operator[SEP] operator[SEP] { Keyword[int] identifier[result] operator[=] Other[0] operator[SEP] Keyword[int] identifier[resourceId] operator[=] identifier[mHoldingActivity] operator[SEP] identifier[getResources] operator[SEP] operator[SEP] operator[SE...
public static Date parseHttpDate(CharSequence txt, int start, int end) { int length = end - start; if (length == 0) { return null; } else if (length < 0) { throw new IllegalArgumentException("Can't have end < start"); } else if (length > 64) { throw ne...
class class_name[name] begin[{] method[parseHttpDate, return_type[type[Date]], modifier[public static], parameter[txt, start, end]] begin[{] local_variable[type[int], length] if[binary_operation[member[.length], ==, literal[0]]] begin[{] return[literal[null]] else be...
Keyword[public] Keyword[static] identifier[Date] identifier[parseHttpDate] operator[SEP] identifier[CharSequence] identifier[txt] , Keyword[int] identifier[start] , Keyword[int] identifier[end] operator[SEP] { Keyword[int] identifier[length] operator[=] identifier[end] operator[-] identifier[start] operator[SE...
private void connect(URI mesosMasterURI, FrameworkInfo frameworkInfo, SingularityMesosScheduler scheduler) throws URISyntaxException { MesosClientBuilder<Call, Event> clientBuilder = ProtobufMesosClientBuilder.schedulerUsingProtos() .mesosUri(mesosMasterURI) .applicationUserAgentEntry(UserAgentEntr...
class class_name[name] begin[{] method[connect, return_type[void], modifier[private], parameter[mesosMasterURI, frameworkInfo, scheduler]] begin[{] local_variable[type[MesosClientBuilder], clientBuilder] local_variable[type[Call], subscribeCall] local_variable[type[MesosClientBuilder], ...
Keyword[private] Keyword[void] identifier[connect] operator[SEP] identifier[URI] identifier[mesosMasterURI] , identifier[FrameworkInfo] identifier[frameworkInfo] , identifier[SingularityMesosScheduler] identifier[scheduler] operator[SEP] Keyword[throws] identifier[URISyntaxException] { identifier[MesosClientBu...
public OrientElement getElement(final Object id) { makeActive(); if (null == id) throw new IllegalArgumentException("id cannot be null"); if (id instanceof OrientElement) return (OrientElement) id; OIdentifiable rec; if (id instanceof OIdentifiable) rec = (OIdentifiable) id; ...
class class_name[name] begin[{] method[getElement, return_type[type[OrientElement]], modifier[public], parameter[id]] begin[{] call[.makeActive, parameter[]] if[binary_operation[literal[null], ==, member[.id]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(p...
Keyword[public] identifier[OrientElement] identifier[getElement] operator[SEP] Keyword[final] identifier[Object] identifier[id] operator[SEP] { identifier[makeActive] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[==] identifier[id] operator[SEP] Keyword[throw] Keyword[n...
public static Iterator<SaslClientFactory> getSaslClientFactories(ClassLoader classLoader, boolean includeGlobal) { return getFactories(SaslClientFactory.class, classLoader, includeGlobal); }
class class_name[name] begin[{] method[getSaslClientFactories, return_type[type[Iterator]], modifier[public static], parameter[classLoader, includeGlobal]] begin[{] return[call[.getFactories, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceTyp...
Keyword[public] Keyword[static] identifier[Iterator] operator[<] identifier[SaslClientFactory] operator[>] identifier[getSaslClientFactories] operator[SEP] identifier[ClassLoader] identifier[classLoader] , Keyword[boolean] identifier[includeGlobal] operator[SEP] { Keyword[return] identifier[getFactories] operat...
@Override public void showShareDialog(final Activity context, final Entity entity, int options, final SocialNetworkShareListener socialNetworkListener, final ShareDialogListener dialogListener) { shareDialogFactory.show(context, entity, socialNetworkListener, new ShareDialogListener() { SharePanelView dialogV...
class class_name[name] begin[{] method[showShareDialog, return_type[void], modifier[public], parameter[context, entity, options, socialNetworkListener, dialogListener]] begin[{] call[shareDialogFactory.show, parameter[member[.context], member[.entity], member[.socialNetworkListener], ClassCreat...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[showShareDialog] operator[SEP] Keyword[final] identifier[Activity] identifier[context] , Keyword[final] identifier[Entity] identifier[entity] , Keyword[int] identifier[options] , Keyword[final] identifier[SocialNetworkShareListener] identifi...
public final Object remove(Object key) { WeakEntry weakEntry = (WeakEntry) super.remove(key); Object value = null; if (weakEntry != null) { value = weakEntry.get(); weakEntry.clear(); } // if (weakEntry != null). clearUnreferencedEntries(); re...
class class_name[name] begin[{] method[remove, return_type[type[Object]], modifier[final public], parameter[key]] begin[{] local_variable[type[WeakEntry], weakEntry] local_variable[type[Object], value] if[binary_operation[member[.weakEntry], !=, literal[null]]] begin[{] ...
Keyword[public] Keyword[final] identifier[Object] identifier[remove] operator[SEP] identifier[Object] identifier[key] operator[SEP] { identifier[WeakEntry] identifier[weakEntry] operator[=] operator[SEP] identifier[WeakEntry] operator[SEP] Keyword[super] operator[SEP] identifier[remove] operator[SEP] identifier[...
public static <T> Map<Key<T>, Class<? extends T>> associateInterfaceToImplementations(Class<T> anInterface, Collection<Class<? extends T>> implementations, boolean overridingMode) { return BindingUtils.resolveBindingDefinitions(anInterface, implementations.stream() .filter(overriding...
class class_name[name] begin[{] method[associateInterfaceToImplementations, return_type[type[Map]], modifier[public static], parameter[anInterface, implementations, overridingMode]] begin[{] return[call[BindingUtils.resolveBindingDefinitions, parameter[member[.anInterface], call[implementations.stream,...
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Map] operator[<] identifier[Key] operator[<] identifier[T] operator[>] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] operator[>] identifier[associateInterfaceToImplementations] operator[SEP] identi...
public synchronized ListIterator<V> get(N name) { LinkedList<V> list = hash.get(name); if (list != null) { return list.listIterator(0); } else { return null; } }
class class_name[name] begin[{] method[get, return_type[type[ListIterator]], modifier[synchronized public], parameter[name]] begin[{] local_variable[type[LinkedList], list] if[binary_operation[member[.list], !=, literal[null]]] begin[{] return[call[list.listIterator, paramet...
Keyword[public] Keyword[synchronized] identifier[ListIterator] operator[<] identifier[V] operator[>] identifier[get] operator[SEP] identifier[N] identifier[name] operator[SEP] { identifier[LinkedList] operator[<] identifier[V] operator[>] identifier[list] operator[=] identifier[hash] operator[SEP] identifier[get...
static protected int isSimpleAsFeature(/* const */Geometry geometry, /* const */ SpatialReference spatialReference, boolean bForce, NonSimpleResult result, ProgressTracker progressTracker) { if (result != null) { result.m_reason = NonSimpleResult.Reason.NotDetermined; result.m_vertexIndex1 = -1; result.m...
class class_name[name] begin[{] method[isSimpleAsFeature, return_type[type[int]], modifier[protected static], parameter[geometry, spatialReference, bForce, result, progressTracker]] begin[{] if[binary_operation[member[.result], !=, literal[null]]] begin[{] assign[member[...
Keyword[static] Keyword[protected] Keyword[int] identifier[isSimpleAsFeature] operator[SEP] identifier[Geometry] identifier[geometry] , identifier[SpatialReference] identifier[spatialReference] , Keyword[boolean] identifier[bForce] , identifier[NonSimpleResult] identifier[result] , identifier[ProgressTracker] ident...
public static Expression alpha(Generator generator, FunctionCall input) { Color color = input.getExpectedColorParam(0); return new Number(color.getA(), String.valueOf(color.getA()), ""); }
class class_name[name] begin[{] method[alpha, return_type[type[Expression]], modifier[public static], parameter[generator, input]] begin[{] local_variable[type[Color], color] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getA, postfix_operators=[], prefix_operators=[], qu...
Keyword[public] Keyword[static] identifier[Expression] identifier[alpha] operator[SEP] identifier[Generator] identifier[generator] , identifier[FunctionCall] identifier[input] operator[SEP] { identifier[Color] identifier[color] operator[=] identifier[input] operator[SEP] identifier[getExpectedColorParam] operat...
private void fillToTheEnd() { if (timeSeries.getEndIndex() >= values.size()) { Decimal lastValue = values.get(values.size() - 1); values.addAll(Collections.nCopies(timeSeries.getEndIndex() - values.size() + 1, lastValue)); } }
class class_name[name] begin[{] method[fillToTheEnd, return_type[void], modifier[private], parameter[]] begin[{] if[binary_operation[call[timeSeries.getEndIndex, parameter[]], >=, call[values.size, parameter[]]]] begin[{] local_variable[type[Decimal], lastValue] ...
Keyword[private] Keyword[void] identifier[fillToTheEnd] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[timeSeries] operator[SEP] identifier[getEndIndex] operator[SEP] operator[SEP] operator[>=] identifier[values] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] { ...
public static String substringFirstFront(final String str, final String... delimiters) { assertStringNotNull(str); return doSubstringFirstRear(false, false, false, str, delimiters); }
class class_name[name] begin[{] method[substringFirstFront, return_type[type[String]], modifier[public static], parameter[str, delimiters]] begin[{] call[.assertStringNotNull, parameter[member[.str]]] return[call[.doSubstringFirstRear, parameter[literal[false], literal[false], literal[f...
Keyword[public] Keyword[static] identifier[String] identifier[substringFirstFront] operator[SEP] Keyword[final] identifier[String] identifier[str] , Keyword[final] identifier[String] operator[...] identifier[delimiters] operator[SEP] { identifier[assertStringNotNull] operator[SEP] identifier[str] operator[SEP] ...
private static Class<?> findInterface(Class<?> target) { if (target == null) { return null; } Class<?>[] interfaces = target.getInterfaces(); if (interfaces != null) { for (Class<?> c : TARGET_INTERFACES) { for (Class<?> i : interfaces) ...
class class_name[name] begin[{] method[findInterface, return_type[type[Class]], modifier[private static], parameter[target]] begin[{] if[binary_operation[member[.target], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_varia...
Keyword[private] Keyword[static] identifier[Class] operator[<] operator[?] operator[>] identifier[findInterface] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[target] operator[SEP] { Keyword[if] operator[SEP] identifier[target] operator[==] Other[null] operator[SEP] { ...
public InputSplit[] getSplits(JobConf job, int numSplits) throws IOException { ArrayList<FileSplit> splits = new ArrayList<FileSplit>(); for (FileStatus status : listLocatedStatus(job)) { Path fileName = status.getPath(); if (status.isDir()) { throw new IOException("Not a file: " + fileNam...
class class_name[name] begin[{] method[getSplits, return_type[type[InputSplit]], modifier[public], parameter[job, numSplits]] begin[{] local_variable[type[ArrayList], splits] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableD...
Keyword[public] identifier[InputSplit] operator[SEP] operator[SEP] identifier[getSplits] operator[SEP] identifier[JobConf] identifier[job] , Keyword[int] identifier[numSplits] operator[SEP] Keyword[throws] identifier[IOException] { identifier[ArrayList] operator[<] identifier[FileSplit] operator[>] identifier[s...
public static double henderson( double[][] data, int tp ) { int rows = data.length; int j = 1, n = 0; double dt = 0, muno, mdue, a, b, x, y, ydue, s_uno, s_due, smax = 0, tstar; for( int i = 1; i < rows; i++ ) { if (data[i][0] + tp <= data[(rows - 1)][0]) { ...
class class_name[name] begin[{] method[henderson, return_type[type[double]], modifier[public static], parameter[data, tp]] begin[{] local_variable[type[int], rows] local_variable[type[int], j] local_variable[type[double], dt] ForStatement(body=BlockStatement(label=None, statemen...
Keyword[public] Keyword[static] Keyword[double] identifier[henderson] operator[SEP] Keyword[double] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[data] , Keyword[int] identifier[tp] operator[SEP] { Keyword[int] identifier[rows] operator[=] identifier[data] operator[SEP] identifier[length] o...
public java.util.List<String> getNotificationARNs() { if (notificationARNs == null) { notificationARNs = new com.amazonaws.internal.SdkInternalList<String>(); } return notificationARNs; }
class class_name[name] begin[{] method[getNotificationARNs, return_type[type[java]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.notificationARNs], ==, literal[null]]] begin[{] assign[member[.notificationARNs], ClassCreator(arguments=[], body=None...
Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[getNotificationARNs] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[notificationARNs] operator[==] Other[null] operator[SEP] { identi...
private <R> R doWithReadLock(Action<K, V, R> action) { long stamp = sl.tryOptimisticRead(); R result = action.doWith(commonCache); if (!sl.validate(stamp)) { stamp = sl.readLock(); try { result = action.doWith(commonCache); } finally { ...
class class_name[name] begin[{] method[doWithReadLock, return_type[type[R]], modifier[private], parameter[action]] begin[{] local_variable[type[long], stamp] local_variable[type[R], result] if[call[sl.validate, parameter[member[.stamp]]]] begin[{] assign[...
Keyword[private] operator[<] identifier[R] operator[>] identifier[R] identifier[doWithReadLock] operator[SEP] identifier[Action] operator[<] identifier[K] , identifier[V] , identifier[R] operator[>] identifier[action] operator[SEP] { Keyword[long] identifier[stamp] operator[=] identifier[sl] operator[SEP] iden...
public static <T extends Number> T mode(Collection<T> values) { if (values.isEmpty()) throw new IllegalArgumentException( "No mode in an empty collection"); Counter<T> c = new ObjectCounter<T>(); for (T n : values) c.count(n); return c.max(); }
class class_name[name] begin[{] method[mode, return_type[type[T]], modifier[public static], parameter[values]] begin[{] if[call[values.isEmpty, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[...
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Number] operator[>] identifier[T] identifier[mode] operator[SEP] identifier[Collection] operator[<] identifier[T] operator[>] identifier[values] operator[SEP] { Keyword[if] operator[SEP] identifier[values] operator[SEP] identif...
public static Cell findCell(Sheet sheet, String cellRefValue) { val cellRef = new CellReference(cellRefValue); val row = sheet.getRow(cellRef.getRow()); if (row == null) { log.warn("unable to find row for " + cellRefValue); return null; } val cell = row.g...
class class_name[name] begin[{] method[findCell, return_type[type[Cell]], modifier[public static], parameter[sheet, cellRefValue]] begin[{] local_variable[type[val], cellRef] local_variable[type[val], row] if[binary_operation[member[.row], ==, literal[null]]] begin[{] ...
Keyword[public] Keyword[static] identifier[Cell] identifier[findCell] operator[SEP] identifier[Sheet] identifier[sheet] , identifier[String] identifier[cellRefValue] operator[SEP] { identifier[val] identifier[cellRef] operator[=] Keyword[new] identifier[CellReference] operator[SEP] identifier[cellRefValue] oper...
@Override public void removeByG_U_D(long groupId, long userId, boolean defaultWishList) { for (CommerceWishList commerceWishList : findByG_U_D(groupId, userId, defaultWishList, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceWishList); } }
class class_name[name] begin[{] method[removeByG_U_D, return_type[void], modifier[public], parameter[groupId, userId, defaultWishList]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=commerceWishList, p...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[removeByG_U_D] operator[SEP] Keyword[long] identifier[groupId] , Keyword[long] identifier[userId] , Keyword[boolean] identifier[defaultWishList] operator[SEP] { Keyword[for] operator[SEP] identifier[CommerceWishList] identifier[commerc...
@Route(method= HttpMethod.GET, uri = "/session/login") public Result login() { String user = session("connected"); if(user != null) { return ok("Already connected"); } else { session("connected", "wisdom"); return readSession(); } }
class class_name[name] begin[{] method[login, return_type[type[Result]], modifier[public], parameter[]] begin[{] local_variable[type[String], user] if[binary_operation[member[.user], !=, literal[null]]] begin[{] return[call[.ok, parameter[literal["Already connected"]]]] ...
annotation[@] identifier[Route] operator[SEP] identifier[method] operator[=] identifier[HttpMethod] operator[SEP] identifier[GET] , identifier[uri] operator[=] literal[String] operator[SEP] Keyword[public] identifier[Result] identifier[login] operator[SEP] operator[SEP] { identifier[String] identifier[user] ope...
@Override public DeleteWorkGroupResult deleteWorkGroup(DeleteWorkGroupRequest request) { request = beforeClientExecution(request); return executeDeleteWorkGroup(request); }
class class_name[name] begin[{] method[deleteWorkGroup, return_type[type[DeleteWorkGroupResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeDeleteWorkGroup, parameter[member[.req...
annotation[@] identifier[Override] Keyword[public] identifier[DeleteWorkGroupResult] identifier[deleteWorkGroup] operator[SEP] identifier[DeleteWorkGroupRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] o...
@SuppressWarnings("unchecked") private static Object resolveConflictWithResolver( final ConflictHandler conflictResolver, final BsonValue documentId, final ChangeEvent localEvent, final ChangeEvent remoteEvent ) { return conflictResolver.resolveConflict( documentId, local...
class class_name[name] begin[{] method[resolveConflictWithResolver, return_type[type[Object]], modifier[private static], parameter[conflictResolver, documentId, localEvent, remoteEvent]] begin[{] return[call[conflictResolver.resolveConflict, parameter[member[.documentId], member[.localEvent], member[.r...
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[static] identifier[Object] identifier[resolveConflictWithResolver] operator[SEP] Keyword[final] identifier[ConflictHandler] identifier[conflictResolver] , Keyword[final] identifier[BsonValue] identifier[docu...
public static String getPropertyGroupId(final ConfigurationMetadataProperty prop) { if (isCasProperty(prop)) { return StringUtils.substringBeforeLast(prop.getName(), "."); } return StringUtils.substringBeforeLast(prop.getId(), "."); }
class class_name[name] begin[{] method[getPropertyGroupId, return_type[type[String]], modifier[public static], parameter[prop]] begin[{] if[call[.isCasProperty, parameter[member[.prop]]]] begin[{] return[call[StringUtils.substringBeforeLast, parameter[call[prop.getName, parameter[]]...
Keyword[public] Keyword[static] identifier[String] identifier[getPropertyGroupId] operator[SEP] Keyword[final] identifier[ConfigurationMetadataProperty] identifier[prop] operator[SEP] { Keyword[if] operator[SEP] identifier[isCasProperty] operator[SEP] identifier[prop] operator[SEP] operator[SEP] { Key...
protected void registerVerticalGroupAttributes() { addAttributeProcessor(new VerticalGroupAlignmentLmlAttribute(), "groupAlign"); addAttributeProcessor(new VerticalGroupFillLmlAttribute(), "groupFill"); addAttributeProcessor(new VerticalGroupPaddingBottomLmlAttribute(), "groupPadBottom"); ...
class class_name[name] begin[{] method[registerVerticalGroupAttributes, return_type[void], modifier[protected], parameter[]] begin[{] call[.addAttributeProcessor, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifie...
Keyword[protected] Keyword[void] identifier[registerVerticalGroupAttributes] operator[SEP] operator[SEP] { identifier[addAttributeProcessor] operator[SEP] Keyword[new] identifier[VerticalGroupAlignmentLmlAttribute] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[addAttribute...
public final String getTags(final Priority priority) { if (priority == Priority.HIGH) { return high; } else if (priority == Priority.NORMAL) { return normal; } else { return low; } }
class class_name[name] begin[{] method[getTags, return_type[type[String]], modifier[final public], parameter[priority]] begin[{] if[binary_operation[member[.priority], ==, member[Priority.HIGH]]] begin[{] return[member[.high]] else begin[{] if[binary_operation[me...
Keyword[public] Keyword[final] identifier[String] identifier[getTags] operator[SEP] Keyword[final] identifier[Priority] identifier[priority] operator[SEP] { Keyword[if] operator[SEP] identifier[priority] operator[==] identifier[Priority] operator[SEP] identifier[HIGH] operator[SEP] { Keyword[return] i...
@Override public void clear() { this.root = null; this.first = null; this.last = null; this.size = 0; this.modCount++; }
class class_name[name] begin[{] method[clear, return_type[void], modifier[public], parameter[]] begin[{] assign[THIS[member[None.root]], literal[null]] assign[THIS[member[None.first]], literal[null]] assign[THIS[member[None.last]], literal[null]] ...
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[clear] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[root] operator[=] Other[null] operator[SEP] Keyword[this] operator[SEP] identifier[first] operator[=] Other[null] operator[SEP] Keyword[this] operator[SEP] ident...
private void stopSliding(boolean unhighlight, boolean fireEvent) { if (unhighlight) { DOM.setElementProperty(lineElement, "className", SLIDER_LINE); DOM.setElementProperty(knobImage.getElement(), "className", SLIDER_KNOB); } }
class class_name[name] begin[{] method[stopSliding, return_type[void], modifier[private], parameter[unhighlight, fireEvent]] begin[{] if[member[.unhighlight]] begin[{] call[DOM.setElementProperty, parameter[member[.lineElement], literal["className"], member[.SLIDER_LINE]...
Keyword[private] Keyword[void] identifier[stopSliding] operator[SEP] Keyword[boolean] identifier[unhighlight] , Keyword[boolean] identifier[fireEvent] operator[SEP] { Keyword[if] operator[SEP] identifier[unhighlight] operator[SEP] { identifier[DOM] operator[SEP] identifier[setElementProperty] operato...
protected void stopWebApp(Deployment deployment) throws Exception { WebDeploymentController context; try { context = deployment.getAttachment(WebDeploymentController.class); context.stop(); } catch (Exception e) { throw WSLogger.ROOT_LOGGER.stopContextPhaseFai...
class class_name[name] begin[{] method[stopWebApp, return_type[void], modifier[protected], parameter[deployment]] begin[{] local_variable[type[WebDeploymentController], context] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=context, postfix_ope...
Keyword[protected] Keyword[void] identifier[stopWebApp] operator[SEP] identifier[Deployment] identifier[deployment] operator[SEP] Keyword[throws] identifier[Exception] { identifier[WebDeploymentController] identifier[context] operator[SEP] Keyword[try] { identifier[context] operator[=] identifier[depl...