code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
private void dispatchLegacyEventIfNeeded(ManagerEvent event) { if (event instanceof DialBeginEvent) { DialEvent legacyEvent = new DialEvent((DialBeginEvent) event); dispatchEvent(legacyEvent); } }
class class_name[name] begin[{] method[dispatchLegacyEventIfNeeded, return_type[void], modifier[private], parameter[event]] begin[{] if[binary_operation[member[.event], instanceof, type[DialBeginEvent]]] begin[{] local_variable[type[DialEvent], legacyEvent] call[.dispatchEvent, parameter[member[.legacyEvent]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[dispatchLegacyEventIfNeeded] operator[SEP] identifier[ManagerEvent] identifier[event] operator[SEP] { Keyword[if] operator[SEP] identifier[event] Keyword[instanceof] identifier[DialBeginEvent] operator[SEP] { identifier[DialEvent] identifier[legacyEvent] operator[=] Keyword[new] identifier[DialEvent] operator[SEP] operator[SEP] identifier[DialBeginEvent] operator[SEP] identifier[event] operator[SEP] operator[SEP] identifier[dispatchEvent] operator[SEP] identifier[legacyEvent] operator[SEP] operator[SEP] } }
public Object tryGet() { Object o = null; if (head != null) { o = head.getContents(); head = head.getNext(); count--; if (head == null) { tail = null; count = 0; } } return o; }
class class_name[name] begin[{] method[tryGet, return_type[type[Object]], modifier[public], parameter[]] begin[{] local_variable[type[Object], o] if[binary_operation[member[.head], !=, literal[null]]] begin[{] assign[member[.o], call[head.getContents, parameter[]]] assign[member[.head], call[head.getNext, parameter[]]] member[.count] if[binary_operation[member[.head], ==, literal[null]]] begin[{] assign[member[.tail], literal[null]] assign[member[.count], literal[0]] else begin[{] None end[}] else begin[{] None end[}] return[member[.o]] end[}] END[}]
Keyword[public] identifier[Object] identifier[tryGet] operator[SEP] operator[SEP] { identifier[Object] identifier[o] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[head] operator[!=] Other[null] operator[SEP] { identifier[o] operator[=] identifier[head] operator[SEP] identifier[getContents] operator[SEP] operator[SEP] operator[SEP] identifier[head] operator[=] identifier[head] operator[SEP] identifier[getNext] operator[SEP] operator[SEP] operator[SEP] identifier[count] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[head] operator[==] Other[null] operator[SEP] { identifier[tail] operator[=] Other[null] operator[SEP] identifier[count] operator[=] Other[0] operator[SEP] } } Keyword[return] identifier[o] operator[SEP] }
protected void onKeepAliveResponse(ChannelHandlerContext ctx, CouchbaseResponse keepAliveResponse) { if (traceEnabled) { LOGGER.trace(logIdent(ctx, endpoint) + "keepAlive was answered, status " + keepAliveResponse.status()); } }
class class_name[name] begin[{] method[onKeepAliveResponse, return_type[void], modifier[protected], parameter[ctx, keepAliveResponse]] begin[{] if[member[.traceEnabled]] begin[{] call[LOGGER.trace, parameter[binary_operation[binary_operation[call[.logIdent, parameter[member[.ctx], member[.endpoint]]], +, literal["keepAlive was answered, status "]], +, call[keepAliveResponse.status, parameter[]]]]] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[onKeepAliveResponse] operator[SEP] identifier[ChannelHandlerContext] identifier[ctx] , identifier[CouchbaseResponse] identifier[keepAliveResponse] operator[SEP] { Keyword[if] operator[SEP] identifier[traceEnabled] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[trace] operator[SEP] identifier[logIdent] operator[SEP] identifier[ctx] , identifier[endpoint] operator[SEP] operator[+] literal[String] operator[+] identifier[keepAliveResponse] operator[SEP] identifier[status] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
private boolean checkInStagingAreaAndFileCache(final CacheKey key) { EncodedImage result = mStagingArea.get(key); if (result != null) { result.close(); FLog.v(TAG, "Found image for %s in staging area", key.getUriString()); mImageCacheStatsTracker.onStagingAreaHit(key); return true; } else { FLog.v(TAG, "Did not find image for %s in staging area", key.getUriString()); mImageCacheStatsTracker.onStagingAreaMiss(); try { return mFileCache.hasKey(key); } catch (Exception exception) { return false; } } }
class class_name[name] begin[{] method[checkInStagingAreaAndFileCache, return_type[type[boolean]], modifier[private], parameter[key]] begin[{] local_variable[type[EncodedImage], result] if[binary_operation[member[.result], !=, literal[null]]] begin[{] call[result.close, parameter[]] call[FLog.v, parameter[member[.TAG], literal["Found image for %s in staging area"], call[key.getUriString, parameter[]]]] call[mImageCacheStatsTracker.onStagingAreaHit, parameter[member[.key]]] return[literal[true]] else begin[{] call[FLog.v, parameter[member[.TAG], literal["Did not find image for %s in staging area"], call[key.getUriString, parameter[]]]] call[mImageCacheStatsTracker.onStagingAreaMiss, parameter[]] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=hasKey, postfix_operators=[], prefix_operators=[], qualifier=mFileCache, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=exception, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[checkInStagingAreaAndFileCache] operator[SEP] Keyword[final] identifier[CacheKey] identifier[key] operator[SEP] { identifier[EncodedImage] identifier[result] operator[=] identifier[mStagingArea] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[!=] Other[null] operator[SEP] { identifier[result] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[FLog] operator[SEP] identifier[v] operator[SEP] identifier[TAG] , literal[String] , identifier[key] operator[SEP] identifier[getUriString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[mImageCacheStatsTracker] operator[SEP] identifier[onStagingAreaHit] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { identifier[FLog] operator[SEP] identifier[v] operator[SEP] identifier[TAG] , literal[String] , identifier[key] operator[SEP] identifier[getUriString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[mImageCacheStatsTracker] operator[SEP] identifier[onStagingAreaMiss] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[return] identifier[mFileCache] operator[SEP] identifier[hasKey] operator[SEP] identifier[key] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[exception] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } }
public final int compareTo(final Period arg0) { // Throws documented exception if type is wrong or parameter is null if (arg0 == null) { throw new ClassCastException("Cannot compare this object to null"); } final int startCompare = getStart().compareTo(arg0.getStart()); if (startCompare != 0) { return startCompare; } // start dates are equal, compare end dates.. else if (duration == null) { final int endCompare = getEnd().compareTo(arg0.getEnd()); if (endCompare != 0) { return endCompare; } } // ..or durations return new TemporalAmountComparator().compare(getDuration(), arg0.getDuration()); }
class class_name[name] begin[{] method[compareTo, return_type[type[int]], modifier[final public], parameter[arg0]] begin[{] if[binary_operation[member[.arg0], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot compare this object to null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ClassCastException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[int], startCompare] if[binary_operation[member[.startCompare], !=, literal[0]]] begin[{] return[member[.startCompare]] else begin[{] if[binary_operation[member[.duration], ==, literal[null]]] begin[{] local_variable[type[int], endCompare] if[binary_operation[member[.endCompare], !=, literal[0]]] begin[{] return[member[.endCompare]] else begin[{] None end[}] else begin[{] None end[}] end[}] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDuration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getDuration, postfix_operators=[], prefix_operators=[], qualifier=arg0, selectors=[], type_arguments=None)], member=compare, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=TemporalAmountComparator, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[final] Keyword[int] identifier[compareTo] operator[SEP] Keyword[final] identifier[Period] identifier[arg0] operator[SEP] { Keyword[if] operator[SEP] identifier[arg0] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[ClassCastException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[final] Keyword[int] identifier[startCompare] operator[=] identifier[getStart] operator[SEP] operator[SEP] operator[SEP] identifier[compareTo] operator[SEP] identifier[arg0] operator[SEP] identifier[getStart] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[startCompare] operator[!=] Other[0] operator[SEP] { Keyword[return] identifier[startCompare] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[duration] operator[==] Other[null] operator[SEP] { Keyword[final] Keyword[int] identifier[endCompare] operator[=] identifier[getEnd] operator[SEP] operator[SEP] operator[SEP] identifier[compareTo] operator[SEP] identifier[arg0] operator[SEP] identifier[getEnd] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[endCompare] operator[!=] Other[0] operator[SEP] { Keyword[return] identifier[endCompare] operator[SEP] } } Keyword[return] Keyword[new] identifier[TemporalAmountComparator] operator[SEP] operator[SEP] operator[SEP] identifier[compare] operator[SEP] identifier[getDuration] operator[SEP] operator[SEP] , identifier[arg0] operator[SEP] identifier[getDuration] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public <T> T read(final InputStream input, Class<T> rootType) { try { try { reader = factory().createXMLEventReader(input); return read(rootType); } finally { if (reader != null) { reader.close(); } } } catch (RuntimeException ex) { throw ex; } catch (Exception ex) { throw new RuntimeException(ex); } }
class class_name[name] begin[{] method[read, return_type[type[T]], modifier[public], parameter[input, rootType]] begin[{] TryStatement(block=[TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=factory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createXMLEventReader, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=rootType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None), label=None)]))], label=None, resources=None)], catches=[CatchClause(block=[ThrowStatement(expression=MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['RuntimeException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[read] operator[SEP] Keyword[final] identifier[InputStream] identifier[input] , identifier[Class] operator[<] identifier[T] operator[>] identifier[rootType] operator[SEP] { Keyword[try] { Keyword[try] { identifier[reader] operator[=] identifier[factory] operator[SEP] operator[SEP] operator[SEP] identifier[createXMLEventReader] operator[SEP] identifier[input] operator[SEP] operator[SEP] Keyword[return] identifier[read] operator[SEP] identifier[rootType] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[if] operator[SEP] identifier[reader] operator[!=] Other[null] operator[SEP] { identifier[reader] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[RuntimeException] identifier[ex] operator[SEP] { Keyword[throw] identifier[ex] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[ex] operator[SEP] operator[SEP] } }
public void processAnnotations(Class<?> cl) { for (Field field : cl.getFields()) { processField(field); } for (Method method : cl.getMethods()) { processMethod(method); } }
class class_name[name] begin[{] method[processAnnotations, return_type[void], modifier[public], parameter[cl]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getFields, postfix_operators=[], prefix_operators=[], qualifier=cl, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=field)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Field, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processMethod, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getMethods, postfix_operators=[], prefix_operators=[], qualifier=cl, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=method)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None))), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[processAnnotations] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[cl] operator[SEP] { Keyword[for] operator[SEP] identifier[Field] identifier[field] operator[:] identifier[cl] operator[SEP] identifier[getFields] operator[SEP] operator[SEP] operator[SEP] { identifier[processField] operator[SEP] identifier[field] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[Method] identifier[method] operator[:] identifier[cl] operator[SEP] identifier[getMethods] operator[SEP] operator[SEP] operator[SEP] { identifier[processMethod] operator[SEP] identifier[method] operator[SEP] operator[SEP] } }
@Override public String getFormattedMessage(final String[] formats) { if (formats != null && formats.length > 0) { for (int i = 0; i < formats.length; i++) { final String format = formats[i]; if (Format.XML.name().equalsIgnoreCase(format)) { return asXml(); } else if (Format.FULL.name().equalsIgnoreCase(format)) { return asString(Format.FULL, null); } } return asString(null, null); } return asString(Format.FULL, null); }
class class_name[name] begin[{] method[getFormattedMessage, return_type[type[String]], modifier[public], parameter[formats]] begin[{] if[binary_operation[binary_operation[member[.formats], !=, literal[null]], &&, binary_operation[member[formats.length], >, literal[0]]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=formats, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=format)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=name, postfix_operators=[], prefix_operators=[], qualifier=Format.XML, selectors=[MethodInvocation(arguments=[MemberReference(member=format, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equalsIgnoreCase, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[], member=name, postfix_operators=[], prefix_operators=[], qualifier=Format.FULL, selectors=[MethodInvocation(arguments=[MemberReference(member=format, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equalsIgnoreCase, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=FULL, postfix_operators=[], prefix_operators=[], qualifier=Format, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=asString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=asXml, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=formats, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[call[.asString, parameter[literal[null], literal[null]]]] else begin[{] None end[}] return[call[.asString, parameter[member[Format.FULL], literal[null]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[getFormattedMessage] operator[SEP] Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[formats] operator[SEP] { Keyword[if] operator[SEP] identifier[formats] operator[!=] Other[null] operator[&&] identifier[formats] operator[SEP] identifier[length] operator[>] Other[0] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[formats] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[final] identifier[String] identifier[format] operator[=] identifier[formats] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Format] operator[SEP] identifier[XML] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[format] operator[SEP] operator[SEP] { Keyword[return] identifier[asXml] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[Format] operator[SEP] identifier[FULL] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[format] operator[SEP] operator[SEP] { Keyword[return] identifier[asString] operator[SEP] identifier[Format] operator[SEP] identifier[FULL] , Other[null] operator[SEP] operator[SEP] } } Keyword[return] identifier[asString] operator[SEP] Other[null] , Other[null] operator[SEP] operator[SEP] } Keyword[return] identifier[asString] operator[SEP] identifier[Format] operator[SEP] identifier[FULL] , Other[null] operator[SEP] operator[SEP] }
public Matrix4f reflect(Quaternionfc orientation, Vector3fc point) { return reflect(orientation, point, thisOrNew()); }
class class_name[name] begin[{] method[reflect, return_type[type[Matrix4f]], modifier[public], parameter[orientation, point]] begin[{] return[call[.reflect, parameter[member[.orientation], member[.point], call[.thisOrNew, parameter[]]]]] end[}] END[}]
Keyword[public] identifier[Matrix4f] identifier[reflect] operator[SEP] identifier[Quaternionfc] identifier[orientation] , identifier[Vector3fc] identifier[point] operator[SEP] { Keyword[return] identifier[reflect] operator[SEP] identifier[orientation] , identifier[point] , identifier[thisOrNew] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static Row insertRow(final Sheet sheet, final int rowIndex) { ArgUtils.notNull(sheet, "cell"); ArgUtils.notMin(rowIndex, 0, "rowIndex"); // 最終行を取得する int lastRow = sheet.getLastRowNum(); if(lastRow < rowIndex) { // データが定義されている範囲害の場合は、行を新たに作成して返す。 return sheet.createRow(rowIndex); } sheet.shiftRows(rowIndex, lastRow+1, 1); return sheet.createRow(rowIndex); }
class class_name[name] begin[{] method[insertRow, return_type[type[Row]], modifier[public static], parameter[sheet, rowIndex]] begin[{] call[ArgUtils.notNull, parameter[member[.sheet], literal["cell"]]] call[ArgUtils.notMin, parameter[member[.rowIndex], literal[0], literal["rowIndex"]]] local_variable[type[int], lastRow] if[binary_operation[member[.lastRow], <, member[.rowIndex]]] begin[{] return[call[sheet.createRow, parameter[member[.rowIndex]]]] else begin[{] None end[}] call[sheet.shiftRows, parameter[member[.rowIndex], binary_operation[member[.lastRow], +, literal[1]], literal[1]]] return[call[sheet.createRow, parameter[member[.rowIndex]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Row] identifier[insertRow] operator[SEP] Keyword[final] identifier[Sheet] identifier[sheet] , Keyword[final] Keyword[int] identifier[rowIndex] operator[SEP] { identifier[ArgUtils] operator[SEP] identifier[notNull] operator[SEP] identifier[sheet] , literal[String] operator[SEP] operator[SEP] identifier[ArgUtils] operator[SEP] identifier[notMin] operator[SEP] identifier[rowIndex] , Other[0] , literal[String] operator[SEP] operator[SEP] Keyword[int] identifier[lastRow] operator[=] identifier[sheet] operator[SEP] identifier[getLastRowNum] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[lastRow] operator[<] identifier[rowIndex] operator[SEP] { Keyword[return] identifier[sheet] operator[SEP] identifier[createRow] operator[SEP] identifier[rowIndex] operator[SEP] operator[SEP] } identifier[sheet] operator[SEP] identifier[shiftRows] operator[SEP] identifier[rowIndex] , identifier[lastRow] operator[+] Other[1] , Other[1] operator[SEP] operator[SEP] Keyword[return] identifier[sheet] operator[SEP] identifier[createRow] operator[SEP] identifier[rowIndex] operator[SEP] operator[SEP] }
public void errorFuture(UUID taskId, Exception e) { DistributedFuture<GROUP, Serializable> future = remove(taskId); if(future != null) { future.setException(e); } }
class class_name[name] begin[{] method[errorFuture, return_type[void], modifier[public], parameter[taskId, e]] begin[{] local_variable[type[DistributedFuture], future] if[binary_operation[member[.future], !=, literal[null]]] begin[{] call[future.setException, parameter[member[.e]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[errorFuture] operator[SEP] identifier[UUID] identifier[taskId] , identifier[Exception] identifier[e] operator[SEP] { identifier[DistributedFuture] operator[<] identifier[GROUP] , identifier[Serializable] operator[>] identifier[future] operator[=] identifier[remove] operator[SEP] identifier[taskId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[future] operator[!=] Other[null] operator[SEP] { identifier[future] operator[SEP] identifier[setException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
public static Crouton makeText(Activity activity, CharSequence text, Style style) { return new Crouton(activity, text, style); }
class class_name[name] begin[{] method[makeText, return_type[type[Crouton]], modifier[public static], parameter[activity, text, style]] begin[{] return[ClassCreator(arguments=[MemberReference(member=activity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=text, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=style, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Crouton, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Crouton] identifier[makeText] operator[SEP] identifier[Activity] identifier[activity] , identifier[CharSequence] identifier[text] , identifier[Style] identifier[style] operator[SEP] { Keyword[return] Keyword[new] identifier[Crouton] operator[SEP] identifier[activity] , identifier[text] , identifier[style] operator[SEP] operator[SEP] }
public String save(long start, long end) throws PiliException { SaveOptions args = new SaveOptions(start, end); return save(args); }
class class_name[name] begin[{] method[save, return_type[type[String]], modifier[public], parameter[start, end]] begin[{] local_variable[type[SaveOptions], args] return[call[.save, parameter[member[.args]]]] end[}] END[}]
Keyword[public] identifier[String] identifier[save] operator[SEP] Keyword[long] identifier[start] , Keyword[long] identifier[end] operator[SEP] Keyword[throws] identifier[PiliException] { identifier[SaveOptions] identifier[args] operator[=] Keyword[new] identifier[SaveOptions] operator[SEP] identifier[start] , identifier[end] operator[SEP] operator[SEP] Keyword[return] identifier[save] operator[SEP] identifier[args] operator[SEP] operator[SEP] }
@Override public int putAll(KTypeVTypeAssociativeContainer<? extends KType, ? extends VType> container) { final int count = size(); for (KTypeVTypeCursor<? extends KType, ? extends VType> c : container) { put(c.key, c.value); } return size() - count; }
class class_name[name] begin[{] method[putAll, return_type[type[int]], modifier[public], parameter[container]] begin[{] local_variable[type[int], count] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=container, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=c)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=extends, type=ReferenceType(arguments=None, dimensions=[], name=KType, sub_type=None)), TypeArgument(pattern_type=extends, type=ReferenceType(arguments=None, dimensions=[], name=VType, sub_type=None))], dimensions=[], name=KTypeVTypeCursor, sub_type=None))), label=None) return[binary_operation[call[.size, parameter[]], -, member[.count]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[putAll] operator[SEP] identifier[KTypeVTypeAssociativeContainer] operator[<] operator[?] Keyword[extends] identifier[KType] , operator[?] Keyword[extends] identifier[VType] operator[>] identifier[container] operator[SEP] { Keyword[final] Keyword[int] identifier[count] operator[=] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[KTypeVTypeCursor] operator[<] operator[?] Keyword[extends] identifier[KType] , operator[?] Keyword[extends] identifier[VType] operator[>] identifier[c] operator[:] identifier[container] operator[SEP] { identifier[put] operator[SEP] identifier[c] operator[SEP] identifier[key] , identifier[c] operator[SEP] identifier[value] operator[SEP] operator[SEP] } Keyword[return] identifier[size] operator[SEP] operator[SEP] operator[-] identifier[count] operator[SEP] }
public static double pdf(double x, double location, double shape) { final double v = (x - location) / shape; return 1. / (Math.PI * shape * (1 + v * v)); }
class class_name[name] begin[{] method[pdf, return_type[type[double]], modifier[public static], parameter[x, location, shape]] begin[{] local_variable[type[double], v] return[binary_operation[literal[1.], /, binary_operation[binary_operation[member[Math.PI], *, member[.shape]], *, binary_operation[literal[1], +, binary_operation[member[.v], *, member[.v]]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[pdf] operator[SEP] Keyword[double] identifier[x] , Keyword[double] identifier[location] , Keyword[double] identifier[shape] operator[SEP] { Keyword[final] Keyword[double] identifier[v] operator[=] operator[SEP] identifier[x] operator[-] identifier[location] operator[SEP] operator[/] identifier[shape] operator[SEP] Keyword[return] literal[Float] operator[/] operator[SEP] identifier[Math] operator[SEP] identifier[PI] operator[*] identifier[shape] operator[*] operator[SEP] Other[1] operator[+] identifier[v] operator[*] identifier[v] operator[SEP] operator[SEP] operator[SEP] }
public static long combineInts(String high, String low) throws NumberFormatException { int highInt = Integer.parseInt(high); int lowInt = Integer.parseInt(low); /* * Shift the high integer into the upper 32 bits and add the low * integer. However, since this is really a single set of bits split in * half, the low part cannot be treated as negative by itself. Since * Java has no unsigned types, the top half of the long created by * up-casting the lower integer must be zeroed out before it's added. */ return ((long)highInt << 32) + (lowInt & 0x00000000FFFFFFFFL); }
class class_name[name] begin[{] method[combineInts, return_type[type[long]], modifier[public static], parameter[high, low]] begin[{] local_variable[type[int], highInt] local_variable[type[int], lowInt] return[binary_operation[binary_operation[Cast(expression=MemberReference(member=highInt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=long)), <<, literal[32]], +, binary_operation[member[.lowInt], &, literal[0x00000000FFFFFFFFL]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[long] identifier[combineInts] operator[SEP] identifier[String] identifier[high] , identifier[String] identifier[low] operator[SEP] Keyword[throws] identifier[NumberFormatException] { Keyword[int] identifier[highInt] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[high] operator[SEP] operator[SEP] Keyword[int] identifier[lowInt] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[low] operator[SEP] operator[SEP] Keyword[return] operator[SEP] operator[SEP] Keyword[long] operator[SEP] identifier[highInt] operator[<<] Other[32] operator[SEP] operator[+] operator[SEP] identifier[lowInt] operator[&] literal[Integer] operator[SEP] operator[SEP] }
@Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case XbasePackage.XPOSTFIX_OPERATION__OPERAND: return basicSetOperand(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); }
class class_name[name] begin[{] method[eInverseRemove, return_type[type[NotificationChain]], modifier[public], parameter[otherEnd, featureID, msgs]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=XPOSTFIX_OPERATION__OPERAND, postfix_operators=[], prefix_operators=[], qualifier=XbasePackage, selectors=[])], statements=[ReturnStatement(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=msgs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=basicSetOperand, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])], expression=MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) return[SuperMethodInvocation(arguments=[MemberReference(member=otherEnd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=msgs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=eInverseRemove, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[NotificationChain] identifier[eInverseRemove] operator[SEP] identifier[InternalEObject] identifier[otherEnd] , Keyword[int] identifier[featureID] , identifier[NotificationChain] identifier[msgs] operator[SEP] { Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] { Keyword[case] identifier[XbasePackage] operator[SEP] identifier[XPOSTFIX_OPERATION__OPERAND] operator[:] Keyword[return] identifier[basicSetOperand] operator[SEP] Other[null] , identifier[msgs] operator[SEP] operator[SEP] } Keyword[return] Keyword[super] operator[SEP] identifier[eInverseRemove] operator[SEP] identifier[otherEnd] , identifier[featureID] , identifier[msgs] operator[SEP] operator[SEP] }
private static ClassNode getSerializeClass(ClassNode alias) { List<AnnotationNode> annotations = alias.getAnnotations(ClassHelper.make(AnnotationCollector.class)); if (!annotations.isEmpty()) { AnnotationNode annotationNode = annotations.get(0); Expression member = annotationNode.getMember("serializeClass"); if (member instanceof ClassExpression) { ClassExpression ce = (ClassExpression) member; if (!ce.getType().getName().equals(AnnotationCollector.class.getName())) { alias = ce.getType(); } } } return alias; }
class class_name[name] begin[{] method[getSerializeClass, return_type[type[ClassNode]], modifier[private static], parameter[alias]] begin[{] local_variable[type[List], annotations] if[call[annotations.isEmpty, parameter[]]] begin[{] local_variable[type[AnnotationNode], annotationNode] local_variable[type[Expression], member] if[binary_operation[member[.member], instanceof, type[ClassExpression]]] begin[{] local_variable[type[ClassExpression], ce] if[call[ce.getType, parameter[]]] begin[{] assign[member[.alias], call[ce.getType, parameter[]]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] return[member[.alias]] end[}] END[}]
Keyword[private] Keyword[static] identifier[ClassNode] identifier[getSerializeClass] operator[SEP] identifier[ClassNode] identifier[alias] operator[SEP] { identifier[List] operator[<] identifier[AnnotationNode] operator[>] identifier[annotations] operator[=] identifier[alias] operator[SEP] identifier[getAnnotations] operator[SEP] identifier[ClassHelper] operator[SEP] identifier[make] operator[SEP] identifier[AnnotationCollector] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[annotations] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[AnnotationNode] identifier[annotationNode] operator[=] identifier[annotations] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[Expression] identifier[member] operator[=] identifier[annotationNode] operator[SEP] identifier[getMember] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[member] Keyword[instanceof] identifier[ClassExpression] operator[SEP] { identifier[ClassExpression] identifier[ce] operator[=] operator[SEP] identifier[ClassExpression] operator[SEP] identifier[member] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[ce] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[AnnotationCollector] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[alias] operator[=] identifier[ce] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[return] identifier[alias] operator[SEP] }
public InclusMultiPos<E, L, R> inclus(Boolean left, Boolean right) { this.inclusive[0] = checkNotNull(left); this.inclusive[1] = checkNotNull(right); return this; }
class class_name[name] begin[{] method[inclus, return_type[type[InclusMultiPos]], modifier[public], parameter[left, right]] begin[{] assign[THIS[member[None.inclusive]ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))], call[.checkNotNull, parameter[member[.left]]]] assign[THIS[member[None.inclusive]ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))], call[.checkNotNull, parameter[member[.right]]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[InclusMultiPos] operator[<] identifier[E] , identifier[L] , identifier[R] operator[>] identifier[inclus] operator[SEP] identifier[Boolean] identifier[left] , identifier[Boolean] identifier[right] operator[SEP] { Keyword[this] operator[SEP] identifier[inclusive] operator[SEP] Other[0] operator[SEP] operator[=] identifier[checkNotNull] operator[SEP] identifier[left] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[inclusive] operator[SEP] Other[1] operator[SEP] operator[=] identifier[checkNotNull] operator[SEP] identifier[right] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public static SortedMap<String, String> getVersionMap(final URL anURL) { // Check sanity Validate.notNull(anURL, "anURL"); final SortedMap<String, String> toReturn = new TreeMap<String, String>(); try { final BufferedReader in = new BufferedReader(new InputStreamReader(anURL.openStream())); String aLine = null; while ((aLine = in.readLine()) != null) { final String trimmedLine = aLine.trim(); if (trimmedLine.contains(GENERATION_PREFIX)) { toReturn.put(BUILDTIME_KEY, aLine.substring(GENERATION_PREFIX.length())); } else if ("".equals(trimmedLine) || trimmedLine.startsWith("#")) { // Empty lines and comments should be ignored. continue; } else if (trimmedLine.contains("=")) { // Stash this for later use. StringTokenizer tok = new StringTokenizer(trimmedLine, KEY_VALUE_SEPARATOR, false); Validate.isTrue(tok.countTokens() == 2, "Found incorrect dependency.properties line [" + aLine + "]"); final String key = tok.nextToken().trim(); final String value = tok.nextToken().trim(); toReturn.put(key, value); } } } catch (IOException e) { throw new IllegalStateException("Could not parse dependency properties '" + anURL.toString() + "'", e); } // All done. return toReturn; }
class class_name[name] begin[{] method[getVersionMap, return_type[type[SortedMap]], modifier[public static], parameter[anURL]] begin[{] call[Validate.notNull, parameter[member[.anURL], literal["anURL"]]] local_variable[type[SortedMap], toReturn] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=openStream, postfix_operators=[], prefix_operators=[], qualifier=anURL, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InputStreamReader, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BufferedReader, sub_type=None)), name=in)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=BufferedReader, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=aLine)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=trim, postfix_operators=[], prefix_operators=[], qualifier=aLine, selectors=[], type_arguments=None), name=trimmedLine)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=GENERATION_PREFIX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=[], qualifier=trimmedLine, selectors=[], type_arguments=None), else_statement=IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=trimmedLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], value=""), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="#")], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=trimmedLine, selectors=[], type_arguments=None), operator=||), else_statement=IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="=")], member=contains, postfix_operators=[], prefix_operators=[], qualifier=trimmedLine, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=trimmedLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=KEY_VALUE_SEPARATOR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringTokenizer, sub_type=None)), name=tok)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringTokenizer, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=countTokens, postfix_operators=[], prefix_operators=[], qualifier=tok, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator===), BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Found incorrect dependency.properties line ["), operandr=MemberReference(member=aLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]"), operator=+)], member=isTrue, postfix_operators=[], prefix_operators=[], qualifier=Validate, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=nextToken, postfix_operators=[], prefix_operators=[], qualifier=tok, selectors=[MethodInvocation(arguments=[], member=trim, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=key)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=nextToken, postfix_operators=[], prefix_operators=[], qualifier=tok, selectors=[MethodInvocation(arguments=[], member=trim, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=value)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=toReturn, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=BUILDTIME_KEY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=GENERATION_PREFIX, selectors=[], type_arguments=None)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=aLine, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=toReturn, selectors=[], type_arguments=None), label=None)]))]), condition=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=aLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=readLine, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[], type_arguments=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not parse dependency properties '"), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=anURL, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'"), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) return[member[.toReturn]] end[}] END[}]
Keyword[public] Keyword[static] identifier[SortedMap] operator[<] identifier[String] , identifier[String] operator[>] identifier[getVersionMap] operator[SEP] Keyword[final] identifier[URL] identifier[anURL] operator[SEP] { identifier[Validate] operator[SEP] identifier[notNull] operator[SEP] identifier[anURL] , literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[SortedMap] operator[<] identifier[String] , identifier[String] operator[>] identifier[toReturn] operator[=] Keyword[new] identifier[TreeMap] operator[<] identifier[String] , identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[final] identifier[BufferedReader] identifier[in] operator[=] Keyword[new] identifier[BufferedReader] operator[SEP] Keyword[new] identifier[InputStreamReader] operator[SEP] identifier[anURL] operator[SEP] identifier[openStream] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[aLine] operator[=] Other[null] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[aLine] operator[=] identifier[in] operator[SEP] identifier[readLine] operator[SEP] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[final] identifier[String] identifier[trimmedLine] operator[=] identifier[aLine] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[trimmedLine] operator[SEP] identifier[contains] operator[SEP] identifier[GENERATION_PREFIX] operator[SEP] operator[SEP] { identifier[toReturn] operator[SEP] identifier[put] operator[SEP] identifier[BUILDTIME_KEY] , identifier[aLine] operator[SEP] identifier[substring] operator[SEP] identifier[GENERATION_PREFIX] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[trimmedLine] operator[SEP] operator[||] identifier[trimmedLine] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[continue] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[trimmedLine] operator[SEP] identifier[contains] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[StringTokenizer] identifier[tok] operator[=] Keyword[new] identifier[StringTokenizer] operator[SEP] identifier[trimmedLine] , identifier[KEY_VALUE_SEPARATOR] , literal[boolean] operator[SEP] operator[SEP] identifier[Validate] operator[SEP] identifier[isTrue] operator[SEP] identifier[tok] operator[SEP] identifier[countTokens] operator[SEP] operator[SEP] operator[==] Other[2] , literal[String] operator[+] identifier[aLine] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[key] operator[=] identifier[tok] operator[SEP] identifier[nextToken] operator[SEP] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[value] operator[=] identifier[tok] operator[SEP] identifier[nextToken] operator[SEP] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[toReturn] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[value] operator[SEP] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[anURL] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[+] literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[return] identifier[toReturn] operator[SEP] }
private String recvStatus() { if (!agent.sign()) { return EXITED; } // receive the status response final ZMsg msg = agent.recv(); if (msg == null) { return EXITED; } String status = msg.popString(); msg.destroy(); return status; }
class class_name[name] begin[{] method[recvStatus, return_type[type[String]], modifier[private], parameter[]] begin[{] if[call[agent.sign, parameter[]]] begin[{] return[member[.EXITED]] else begin[{] None end[}] local_variable[type[ZMsg], msg] if[binary_operation[member[.msg], ==, literal[null]]] begin[{] return[member[.EXITED]] else begin[{] None end[}] local_variable[type[String], status] call[msg.destroy, parameter[]] return[member[.status]] end[}] END[}]
Keyword[private] identifier[String] identifier[recvStatus] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[agent] operator[SEP] identifier[sign] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[EXITED] operator[SEP] } Keyword[final] identifier[ZMsg] identifier[msg] operator[=] identifier[agent] operator[SEP] identifier[recv] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[msg] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[EXITED] operator[SEP] } identifier[String] identifier[status] operator[=] identifier[msg] operator[SEP] identifier[popString] operator[SEP] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[destroy] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[status] operator[SEP] }
protected Object[] getKey(NodeId id) { if (getStorageModel() == SM_BINARY_KEYS) { return new Object[] { id.getRawBytes() }; } else { return new Object[] { id.getMostSignificantBits(), id.getLeastSignificantBits() }; } }
class class_name[name] begin[{] method[getKey, return_type[type[Object]], modifier[protected], parameter[id]] begin[{] if[binary_operation[call[.getStorageModel, parameter[]], ==, member[.SM_BINARY_KEYS]]] begin[{] return[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[], member=getRawBytes, postfix_operators=[], prefix_operators=[], qualifier=id, selectors=[], type_arguments=None)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))] else begin[{] return[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[], member=getMostSignificantBits, postfix_operators=[], prefix_operators=[], qualifier=id, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getLeastSignificantBits, postfix_operators=[], prefix_operators=[], qualifier=id, selectors=[], type_arguments=None)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))] end[}] end[}] END[}]
Keyword[protected] identifier[Object] operator[SEP] operator[SEP] identifier[getKey] operator[SEP] identifier[NodeId] identifier[id] operator[SEP] { Keyword[if] operator[SEP] identifier[getStorageModel] operator[SEP] operator[SEP] operator[==] identifier[SM_BINARY_KEYS] operator[SEP] { Keyword[return] Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[id] operator[SEP] identifier[getRawBytes] operator[SEP] operator[SEP] } operator[SEP] } Keyword[else] { Keyword[return] Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[id] operator[SEP] identifier[getMostSignificantBits] operator[SEP] operator[SEP] , identifier[id] operator[SEP] identifier[getLeastSignificantBits] operator[SEP] operator[SEP] } operator[SEP] } }
protected FilterOperator translate(String operator) { operator = operator.trim(); if (operator.equals("=") || operator.equals("==")) return FilterOperator.EQUAL; else if (operator.equals(">")) return FilterOperator.GREATER_THAN; else if (operator.equals(">=")) return FilterOperator.GREATER_THAN_OR_EQUAL; else if (operator.equals("<")) return FilterOperator.LESS_THAN; else if (operator.equals("<=")) return FilterOperator.LESS_THAN_OR_EQUAL; else if (operator.equals("!=") || operator.equals("<>")) //return FilterOperator.NOT_EQUAL; throw new UnsupportedOperationException("The Cloud Datastore SDK does not currently support 'NOT EQUAL' filters"); else if (operator.toLowerCase().equals("in")) //return FilterOperator.IN; throw new UnsupportedOperationException("The Cloud Datastore SDK does not currently support 'IN' filters"); else throw new IllegalArgumentException("Unknown operator '" + operator + "'"); }
class class_name[name] begin[{] method[translate, return_type[type[FilterOperator]], modifier[protected], parameter[operator]] begin[{] assign[member[.operator], call[operator.trim, parameter[]]] if[binary_operation[call[operator.equals, parameter[literal["="]]], ||, call[operator.equals, parameter[literal["=="]]]]] begin[{] return[member[FilterOperator.EQUAL]] else begin[{] if[call[operator.equals, parameter[literal[">"]]]] begin[{] return[member[FilterOperator.GREATER_THAN]] else begin[{] if[call[operator.equals, parameter[literal[">="]]]] begin[{] return[member[FilterOperator.GREATER_THAN_OR_EQUAL]] else begin[{] if[call[operator.equals, parameter[literal["<"]]]] begin[{] return[member[FilterOperator.LESS_THAN]] else begin[{] if[call[operator.equals, parameter[literal["<="]]]] begin[{] return[member[FilterOperator.LESS_THAN_OR_EQUAL]] else begin[{] if[binary_operation[call[operator.equals, parameter[literal["!="]]], ||, call[operator.equals, parameter[literal["<>"]]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The Cloud Datastore SDK does not currently support 'NOT EQUAL' filters")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UnsupportedOperationException, sub_type=None)), label=None) else begin[{] if[call[operator.toLowerCase, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The Cloud Datastore SDK does not currently support 'IN' filters")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UnsupportedOperationException, sub_type=None)), label=None) else begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unknown operator '"), operandr=MemberReference(member=operator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] END[}]
Keyword[protected] identifier[FilterOperator] identifier[translate] operator[SEP] identifier[String] identifier[operator] operator[SEP] { identifier[operator] operator[=] identifier[operator] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[operator] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[||] identifier[operator] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[FilterOperator] operator[SEP] identifier[EQUAL] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[operator] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[FilterOperator] operator[SEP] identifier[GREATER_THAN] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[operator] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[FilterOperator] operator[SEP] identifier[GREATER_THAN_OR_EQUAL] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[operator] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[FilterOperator] operator[SEP] identifier[LESS_THAN] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[operator] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[FilterOperator] operator[SEP] identifier[LESS_THAN_OR_EQUAL] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[operator] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[||] identifier[operator] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[UnsupportedOperationException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[operator] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[UnsupportedOperationException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[else] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[operator] operator[+] literal[String] operator[SEP] operator[SEP] }
public static byte[] decodeChecked(String input) { byte tmp[] = decode(input); if (tmp == null || tmp.length < 4) { return null; } byte[] bytes = copyOfRange(tmp, 0, tmp.length - 4); byte[] checksum = copyOfRange(tmp, tmp.length - 4, tmp.length); tmp = HashUtils.doubleSha256(bytes); byte[] hash = copyOfRange(tmp, 0, 4); if (!Arrays.equals(checksum, hash)) { return null; } return bytes; }
class class_name[name] begin[{] method[decodeChecked, return_type[type[byte]], modifier[public static], parameter[input]] begin[{] local_variable[type[byte], tmp] if[binary_operation[binary_operation[member[.tmp], ==, literal[null]], ||, binary_operation[member[tmp.length], <, literal[4]]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[byte], bytes] local_variable[type[byte], checksum] assign[member[.tmp], call[HashUtils.doubleSha256, parameter[member[.bytes]]]] local_variable[type[byte], hash] if[call[Arrays.equals, parameter[member[.checksum], member[.hash]]]] begin[{] return[literal[null]] else begin[{] None end[}] return[member[.bytes]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[decodeChecked] operator[SEP] identifier[String] identifier[input] operator[SEP] { Keyword[byte] identifier[tmp] operator[SEP] operator[SEP] operator[=] identifier[decode] operator[SEP] identifier[input] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tmp] operator[==] Other[null] operator[||] identifier[tmp] operator[SEP] identifier[length] operator[<] Other[4] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] operator[=] identifier[copyOfRange] operator[SEP] identifier[tmp] , Other[0] , identifier[tmp] operator[SEP] identifier[length] operator[-] Other[4] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[checksum] operator[=] identifier[copyOfRange] operator[SEP] identifier[tmp] , identifier[tmp] operator[SEP] identifier[length] operator[-] Other[4] , identifier[tmp] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[tmp] operator[=] identifier[HashUtils] operator[SEP] identifier[doubleSha256] operator[SEP] identifier[bytes] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[hash] operator[=] identifier[copyOfRange] operator[SEP] identifier[tmp] , Other[0] , Other[4] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[Arrays] operator[SEP] identifier[equals] operator[SEP] identifier[checksum] , identifier[hash] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[return] identifier[bytes] operator[SEP] }
public OnPremisesTagSet withOnPremisesTagSetList(java.util.Collection<java.util.List<TagFilter>> onPremisesTagSetList) { setOnPremisesTagSetList(onPremisesTagSetList); return this; }
class class_name[name] begin[{] method[withOnPremisesTagSetList, return_type[type[OnPremisesTagSet]], modifier[public], parameter[onPremisesTagSetList]] begin[{] call[.setOnPremisesTagSetList, parameter[member[.onPremisesTagSetList]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[OnPremisesTagSet] identifier[withOnPremisesTagSetList] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[TagFilter] operator[>] operator[>] identifier[onPremisesTagSetList] operator[SEP] { identifier[setOnPremisesTagSetList] operator[SEP] identifier[onPremisesTagSetList] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public static <A extends Annotation> Optional<A> findPropertyAnnotation( BeanPropertyDefinition beanPropertyDefinition, Class<A> annotationClass) { return tryGetFieldAnnotation(beanPropertyDefinition, annotationClass) .map(Optional::of).orElse(tryGetGetterAnnotation(beanPropertyDefinition, annotationClass)) .map(Optional::of).orElse(tryGetSetterAnnotation(beanPropertyDefinition, annotationClass)); }
class class_name[name] begin[{] method[findPropertyAnnotation, return_type[type[Optional]], modifier[public static], parameter[beanPropertyDefinition, annotationClass]] begin[{] return[call[.tryGetFieldAnnotation, parameter[member[.beanPropertyDefinition], member[.annotationClass]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[A] Keyword[extends] identifier[Annotation] operator[>] identifier[Optional] operator[<] identifier[A] operator[>] identifier[findPropertyAnnotation] operator[SEP] identifier[BeanPropertyDefinition] identifier[beanPropertyDefinition] , identifier[Class] operator[<] identifier[A] operator[>] identifier[annotationClass] operator[SEP] { Keyword[return] identifier[tryGetFieldAnnotation] operator[SEP] identifier[beanPropertyDefinition] , identifier[annotationClass] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[Optional] operator[::] identifier[of] operator[SEP] operator[SEP] identifier[orElse] operator[SEP] identifier[tryGetGetterAnnotation] operator[SEP] identifier[beanPropertyDefinition] , identifier[annotationClass] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[Optional] operator[::] identifier[of] operator[SEP] operator[SEP] identifier[orElse] operator[SEP] identifier[tryGetSetterAnnotation] operator[SEP] identifier[beanPropertyDefinition] , identifier[annotationClass] operator[SEP] operator[SEP] operator[SEP] }
@Override public void destroy() { System.out.printf("TdsInit.destroy() is called%n"); // prefs try { store.save(); } catch (IOException ioe) { ioe.printStackTrace(); startupLog.error("TdsInit: Prefs save failed", ioe); } // background threads if (cdmDiskCacheTimer != null) cdmDiskCacheTimer.cancel(); FileCache.shutdown(); // this handles background threads for all instances of FileCache DiskCache2.exit(); // this handles background threads for all instances of DiskCache2 thredds.inventory.bdb.MetadataManager.closeAll(); executor.shutdownNow(); /* try { catalogWatcher.close(); } catch (IOException ioe) { ioe.printStackTrace(); startupLog.error("catalogWatcher close failed", ioe); } */ // open file caches RandomAccessFile.shutdown(); NetcdfDataset.shutdown(); // memory caches GribCdmIndex.shutdown(); datasetManager.setDatasetTracker(null); // closes the existing tracker collectionUpdater.shutdown(); startupLog.info("TdsInit shutdown"); MDC.clear(); }
class class_name[name] begin[{] method[destroy, return_type[void], modifier[public], parameter[]] begin[{] call[System.out.printf, parameter[literal["TdsInit.destroy() is called%n"]]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=save, postfix_operators=[], prefix_operators=[], qualifier=store, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=ioe, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TdsInit: Prefs save failed"), MemberReference(member=ioe, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=startupLog, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ioe, types=['IOException']))], finally_block=None, label=None, resources=None) if[binary_operation[member[.cdmDiskCacheTimer], !=, literal[null]]] begin[{] call[cdmDiskCacheTimer.cancel, parameter[]] else begin[{] None end[}] call[FileCache.shutdown, parameter[]] call[DiskCache2.exit, parameter[]] call[thredds.inventory.bdb.MetadataManager.closeAll, parameter[]] call[executor.shutdownNow, parameter[]] call[RandomAccessFile.shutdown, parameter[]] call[NetcdfDataset.shutdown, parameter[]] call[GribCdmIndex.shutdown, parameter[]] call[datasetManager.setDatasetTracker, parameter[literal[null]]] call[collectionUpdater.shutdown, parameter[]] call[startupLog.info, parameter[literal["TdsInit shutdown"]]] call[MDC.clear, parameter[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[destroy] operator[SEP] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[printf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[try] { identifier[store] operator[SEP] identifier[save] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[ioe] operator[SEP] { identifier[ioe] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] identifier[startupLog] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[ioe] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[cdmDiskCacheTimer] operator[!=] Other[null] operator[SEP] identifier[cdmDiskCacheTimer] operator[SEP] identifier[cancel] operator[SEP] operator[SEP] operator[SEP] identifier[FileCache] operator[SEP] identifier[shutdown] operator[SEP] operator[SEP] operator[SEP] identifier[DiskCache2] operator[SEP] identifier[exit] operator[SEP] operator[SEP] operator[SEP] identifier[thredds] operator[SEP] identifier[inventory] operator[SEP] identifier[bdb] operator[SEP] identifier[MetadataManager] operator[SEP] identifier[closeAll] operator[SEP] operator[SEP] operator[SEP] identifier[executor] operator[SEP] identifier[shutdownNow] operator[SEP] operator[SEP] operator[SEP] identifier[RandomAccessFile] operator[SEP] identifier[shutdown] operator[SEP] operator[SEP] operator[SEP] identifier[NetcdfDataset] operator[SEP] identifier[shutdown] operator[SEP] operator[SEP] operator[SEP] identifier[GribCdmIndex] operator[SEP] identifier[shutdown] operator[SEP] operator[SEP] operator[SEP] identifier[datasetManager] operator[SEP] identifier[setDatasetTracker] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[collectionUpdater] operator[SEP] identifier[shutdown] operator[SEP] operator[SEP] operator[SEP] identifier[startupLog] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[MDC] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] }
public double[] getRow(int row) { double[] values = m.getRow(row); for (int i = 0; i < values.length; ++i) values[i] *= scales.get(i); return values; }
class class_name[name] begin[{] method[getRow, return_type[type[double]], modifier[public], parameter[row]] begin[{] local_variable[type[double], values] ForStatement(body=StatementExpression(expression=Assignment(expressionl=MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=*=, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=scales, selectors=[], type_arguments=None)), label=None), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=values, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None) return[member[.values]] end[}] END[}]
Keyword[public] Keyword[double] operator[SEP] operator[SEP] identifier[getRow] operator[SEP] Keyword[int] identifier[row] operator[SEP] { Keyword[double] operator[SEP] operator[SEP] identifier[values] operator[=] identifier[m] operator[SEP] identifier[getRow] operator[SEP] identifier[row] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[values] operator[SEP] identifier[length] operator[SEP] operator[++] identifier[i] operator[SEP] identifier[values] operator[SEP] identifier[i] operator[SEP] operator[*=] identifier[scales] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[return] identifier[values] operator[SEP] }
public boolean forceLoadTile(final OnlineTileSourceBase tileSource, final long pMapTileIndex) { try { final Drawable drawable = mTileDownloader.downloadTile(pMapTileIndex, mTileWriter, tileSource); return drawable != null; } catch (CantContinueException e) { return false; } }
class class_name[name] begin[{] method[forceLoadTile, return_type[type[boolean]], modifier[public], parameter[tileSource, pMapTileIndex]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=pMapTileIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=mTileWriter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tileSource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=downloadTile, postfix_operators=[], prefix_operators=[], qualifier=mTileDownloader, selectors=[], type_arguments=None), name=drawable)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Drawable, sub_type=None)), ReturnStatement(expression=BinaryOperation(operandl=MemberReference(member=drawable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['CantContinueException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[boolean] identifier[forceLoadTile] operator[SEP] Keyword[final] identifier[OnlineTileSourceBase] identifier[tileSource] , Keyword[final] Keyword[long] identifier[pMapTileIndex] operator[SEP] { Keyword[try] { Keyword[final] identifier[Drawable] identifier[drawable] operator[=] identifier[mTileDownloader] operator[SEP] identifier[downloadTile] operator[SEP] identifier[pMapTileIndex] , identifier[mTileWriter] , identifier[tileSource] operator[SEP] operator[SEP] Keyword[return] identifier[drawable] operator[!=] Other[null] operator[SEP] } Keyword[catch] operator[SEP] identifier[CantContinueException] identifier[e] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } }
public Set<String> getDetailPageTypes() { if (m_detailPageTypes != null) { return m_detailPageTypes; } Set<String> result = new HashSet<String>(); for (CmsADEConfigDataInternal configData : m_siteConfigurationsByPath.values()) { List<CmsDetailPageInfo> detailPageInfos = configData.getOwnDetailPages(); for (CmsDetailPageInfo info : detailPageInfos) { result.add(info.getType()); } } m_detailPageTypes = result; return result; }
class class_name[name] begin[{] method[getDetailPageTypes, return_type[type[Set]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.m_detailPageTypes], !=, literal[null]]] begin[{] return[member[.m_detailPageTypes]] else begin[{] None end[}] local_variable[type[Set], result] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getOwnDetailPages, postfix_operators=[], prefix_operators=[], qualifier=configData, selectors=[], type_arguments=None), name=detailPageInfos)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=CmsDetailPageInfo, sub_type=None))], dimensions=[], name=List, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=info, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=detailPageInfos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=info)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsDetailPageInfo, sub_type=None))), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=m_siteConfigurationsByPath, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=configData)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsADEConfigDataInternal, sub_type=None))), label=None) assign[member[.m_detailPageTypes], member[.result]] return[member[.result]] end[}] END[}]
Keyword[public] identifier[Set] operator[<] identifier[String] operator[>] identifier[getDetailPageTypes] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[m_detailPageTypes] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[m_detailPageTypes] operator[SEP] } identifier[Set] operator[<] identifier[String] operator[>] identifier[result] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[CmsADEConfigDataInternal] identifier[configData] operator[:] identifier[m_siteConfigurationsByPath] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[CmsDetailPageInfo] operator[>] identifier[detailPageInfos] operator[=] identifier[configData] operator[SEP] identifier[getOwnDetailPages] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[CmsDetailPageInfo] identifier[info] operator[:] identifier[detailPageInfos] operator[SEP] { identifier[result] operator[SEP] identifier[add] operator[SEP] identifier[info] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } identifier[m_detailPageTypes] operator[=] identifier[result] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
private BottomSheet.Builder createBottomSheetBuilder() { BottomSheet.Builder builder = new BottomSheet.Builder(getActivity()); builder.setStyle(getStyle()); if (shouldTitleBeShown()) { builder.setTitle(getBottomSheetTitle()); } if (shouldIconBeShown()) { builder.setIcon(android.R.drawable.ic_dialog_alert); } return builder; }
class class_name[name] begin[{] method[createBottomSheetBuilder, return_type[type[BottomSheet]], modifier[private], parameter[]] begin[{] local_variable[type[BottomSheet], builder] call[builder.setStyle, parameter[call[.getStyle, parameter[]]]] if[call[.shouldTitleBeShown, parameter[]]] begin[{] call[builder.setTitle, parameter[call[.getBottomSheetTitle, parameter[]]]] else begin[{] None end[}] if[call[.shouldIconBeShown, parameter[]]] begin[{] call[builder.setIcon, parameter[member[android.R.drawable.ic_dialog_alert]]] else begin[{] None end[}] return[member[.builder]] end[}] END[}]
Keyword[private] identifier[BottomSheet] operator[SEP] identifier[Builder] identifier[createBottomSheetBuilder] operator[SEP] operator[SEP] { identifier[BottomSheet] operator[SEP] identifier[Builder] identifier[builder] operator[=] Keyword[new] identifier[BottomSheet] operator[SEP] identifier[Builder] operator[SEP] identifier[getActivity] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[setStyle] operator[SEP] identifier[getStyle] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[shouldTitleBeShown] operator[SEP] operator[SEP] operator[SEP] { identifier[builder] operator[SEP] identifier[setTitle] operator[SEP] identifier[getBottomSheetTitle] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[shouldIconBeShown] operator[SEP] operator[SEP] operator[SEP] { identifier[builder] operator[SEP] identifier[setIcon] operator[SEP] identifier[android] operator[SEP] identifier[R] operator[SEP] identifier[drawable] operator[SEP] identifier[ic_dialog_alert] operator[SEP] operator[SEP] } Keyword[return] identifier[builder] operator[SEP] }
private void update(int seqNo, long guessedIndex) { long delta = guessedIndex - (((long) this.roc) << 16 | this.seqNum); /* update the replay bit mask */ if (delta > 0) { replayWindow = replayWindow << delta; replayWindow |= 1; } else { replayWindow |= (1 << delta); } if (seqNo > seqNum) { seqNum = seqNo & 0xffff; } if (this.guessedROC > this.roc) { roc = guessedROC; seqNum = seqNo & 0xffff; } }
class class_name[name] begin[{] method[update, return_type[void], modifier[private], parameter[seqNo, guessedIndex]] begin[{] local_variable[type[long], delta] if[binary_operation[member[.delta], >, literal[0]]] begin[{] assign[member[.replayWindow], binary_operation[member[.replayWindow], <<, member[.delta]]] assign[member[.replayWindow], literal[1]] else begin[{] assign[member[.replayWindow], binary_operation[literal[1], <<, member[.delta]]] end[}] if[binary_operation[member[.seqNo], >, member[.seqNum]]] begin[{] assign[member[.seqNum], binary_operation[member[.seqNo], &, literal[0xffff]]] else begin[{] None end[}] if[binary_operation[THIS[member[None.guessedROC]], >, THIS[member[None.roc]]]] begin[{] assign[member[.roc], member[.guessedROC]] assign[member[.seqNum], binary_operation[member[.seqNo], &, literal[0xffff]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[update] operator[SEP] Keyword[int] identifier[seqNo] , Keyword[long] identifier[guessedIndex] operator[SEP] { Keyword[long] identifier[delta] operator[=] identifier[guessedIndex] operator[-] operator[SEP] operator[SEP] operator[SEP] Keyword[long] operator[SEP] Keyword[this] operator[SEP] identifier[roc] operator[SEP] operator[<<] Other[16] operator[|] Keyword[this] operator[SEP] identifier[seqNum] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[delta] operator[>] Other[0] operator[SEP] { identifier[replayWindow] operator[=] identifier[replayWindow] operator[<<] identifier[delta] operator[SEP] identifier[replayWindow] operator[|=] Other[1] operator[SEP] } Keyword[else] { identifier[replayWindow] operator[|=] operator[SEP] Other[1] operator[<<] identifier[delta] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[seqNo] operator[>] identifier[seqNum] operator[SEP] { identifier[seqNum] operator[=] identifier[seqNo] operator[&] literal[Integer] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[guessedROC] operator[>] Keyword[this] operator[SEP] identifier[roc] operator[SEP] { identifier[roc] operator[=] identifier[guessedROC] operator[SEP] identifier[seqNum] operator[=] identifier[seqNo] operator[&] literal[Integer] operator[SEP] } }
public EClass getIfcSurfaceOfRevolution() { if (ifcSurfaceOfRevolutionEClass == null) { ifcSurfaceOfRevolutionEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(577); } return ifcSurfaceOfRevolutionEClass; }
class class_name[name] begin[{] method[getIfcSurfaceOfRevolution, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcSurfaceOfRevolutionEClass], ==, literal[null]]] begin[{] assign[member[.ifcSurfaceOfRevolutionEClass], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=Ifc2x3tc1Package, selectors=[])], member=getEPackage, postfix_operators=[], prefix_operators=[], qualifier=EPackage.Registry.INSTANCE, selectors=[MethodInvocation(arguments=[], member=getEClassifiers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=577)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=EClass, sub_type=None))] else begin[{] None end[}] return[member[.ifcSurfaceOfRevolutionEClass]] end[}] END[}]
Keyword[public] identifier[EClass] identifier[getIfcSurfaceOfRevolution] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcSurfaceOfRevolutionEClass] operator[==] Other[null] operator[SEP] { identifier[ifcSurfaceOfRevolutionEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[Ifc2x3tc1Package] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[577] operator[SEP] operator[SEP] } Keyword[return] identifier[ifcSurfaceOfRevolutionEClass] operator[SEP] }
@NotNull public Mode without(@NotNull Key<?> key) { return new Mode(Map(this.defs, key, null)); }
class class_name[name] begin[{] method[without, return_type[type[Mode]], modifier[public], parameter[key]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=defs, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=Map, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Mode, sub_type=None))] end[}] END[}]
annotation[@] identifier[NotNull] Keyword[public] identifier[Mode] identifier[without] operator[SEP] annotation[@] identifier[NotNull] identifier[Key] operator[<] operator[?] operator[>] identifier[key] operator[SEP] { Keyword[return] Keyword[new] identifier[Mode] operator[SEP] identifier[Map] operator[SEP] Keyword[this] operator[SEP] identifier[defs] , identifier[key] , Other[null] operator[SEP] operator[SEP] operator[SEP] }
public String lookup( byte[] code, int offset, int length ) { String result = null; Integer key = null; if( length == 1 ) { key = Integer.valueOf( code[offset] & 0xff ); result = (String)singleByteMappings.get( key ); } else if( length == 2 ) { int intKey = code[offset] & 0xff; intKey <<= 8; intKey += code[offset+1] & 0xff; key = Integer.valueOf( intKey ); result = (String)doubleByteMappings.get( key ); } return result; }
class class_name[name] begin[{] method[lookup, return_type[type[String]], modifier[public], parameter[code, offset, length]] begin[{] local_variable[type[String], result] local_variable[type[Integer], key] if[binary_operation[member[.length], ==, literal[1]]] begin[{] assign[member[.key], call[Integer.valueOf, parameter[binary_operation[member[.code], &, literal[0xff]]]]] assign[member[.result], Cast(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=singleByteMappings, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))] else begin[{] if[binary_operation[member[.length], ==, literal[2]]] begin[{] local_variable[type[int], intKey] assign[member[.intKey], literal[8]] assign[member[.intKey], binary_operation[member[.code], &, literal[0xff]]] assign[member[.key], call[Integer.valueOf, parameter[member[.intKey]]]] assign[member[.result], Cast(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=doubleByteMappings, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))] else begin[{] None end[}] end[}] return[member[.result]] end[}] END[}]
Keyword[public] identifier[String] identifier[lookup] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[code] , Keyword[int] identifier[offset] , Keyword[int] identifier[length] operator[SEP] { identifier[String] identifier[result] operator[=] Other[null] operator[SEP] identifier[Integer] identifier[key] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[length] operator[==] Other[1] operator[SEP] { identifier[key] operator[=] identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[code] operator[SEP] identifier[offset] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[SEP] identifier[result] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[singleByteMappings] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[length] operator[==] Other[2] operator[SEP] { Keyword[int] identifier[intKey] operator[=] identifier[code] operator[SEP] identifier[offset] operator[SEP] operator[&] literal[Integer] operator[SEP] identifier[intKey] operator[<<=] Other[8] operator[SEP] identifier[intKey] operator[+=] identifier[code] operator[SEP] identifier[offset] operator[+] Other[1] operator[SEP] operator[&] literal[Integer] operator[SEP] identifier[key] operator[=] identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[intKey] operator[SEP] operator[SEP] identifier[result] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[doubleByteMappings] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public static void assertXMLEqual(String err, Reader control, Reader test) throws SAXException, IOException { Diff diff = new Diff(control, test); assertXMLEqual(err, diff, true); }
class class_name[name] begin[{] method[assertXMLEqual, return_type[void], modifier[public static], parameter[err, control, test]] begin[{] local_variable[type[Diff], diff] call[.assertXMLEqual, parameter[member[.err], member[.diff], literal[true]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[assertXMLEqual] operator[SEP] identifier[String] identifier[err] , identifier[Reader] identifier[control] , identifier[Reader] identifier[test] operator[SEP] Keyword[throws] identifier[SAXException] , identifier[IOException] { identifier[Diff] identifier[diff] operator[=] Keyword[new] identifier[Diff] operator[SEP] identifier[control] , identifier[test] operator[SEP] operator[SEP] identifier[assertXMLEqual] operator[SEP] identifier[err] , identifier[diff] , literal[boolean] operator[SEP] operator[SEP] }
public List<ShowInfo> searchShow(String showName) throws TVRageException { if (!isValidString(showName)) { return new ArrayList<>(); } String tvrageURL = buildURL(API_SEARCH, showName).toString(); return TVRageParser.getSearchShow(tvrageURL); }
class class_name[name] begin[{] method[searchShow, return_type[type[List]], modifier[public], parameter[showName]] begin[{] if[call[.isValidString, parameter[member[.showName]]]] begin[{] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None))] else begin[{] None end[}] local_variable[type[String], tvrageURL] return[call[TVRageParser.getSearchShow, parameter[member[.tvrageURL]]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[ShowInfo] operator[>] identifier[searchShow] operator[SEP] identifier[String] identifier[showName] operator[SEP] Keyword[throws] identifier[TVRageException] { Keyword[if] operator[SEP] operator[!] identifier[isValidString] operator[SEP] identifier[showName] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] } identifier[String] identifier[tvrageURL] operator[=] identifier[buildURL] operator[SEP] identifier[API_SEARCH] , identifier[showName] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[TVRageParser] operator[SEP] identifier[getSearchShow] operator[SEP] identifier[tvrageURL] operator[SEP] operator[SEP] }
public static FDBigInteger valueOfMulPow52(long value, int p5, int p2) { assert p5 >= 0 : p5; assert p2 >= 0 : p2; int v0 = (int) value; int v1 = (int) (value >>> 32); int wordcount = p2 >> 5; int bitcount = p2 & 0x1f; if (p5 != 0) { if (p5 < SMALL_5_POW.length) { long pow5 = SMALL_5_POW[p5] & LONG_MASK; long carry = (v0 & LONG_MASK) * pow5; v0 = (int) carry; carry >>>= 32; carry = (v1 & LONG_MASK) * pow5 + carry; v1 = (int) carry; int v2 = (int) (carry >>> 32); if (bitcount == 0) { return new FDBigInteger(new int[]{v0, v1, v2}, wordcount); } else { return new FDBigInteger(new int[]{ v0 << bitcount, (v1 << bitcount) | (v0 >>> (32 - bitcount)), (v2 << bitcount) | (v1 >>> (32 - bitcount)), v2 >>> (32 - bitcount) }, wordcount); } } else { FDBigInteger pow5 = big5pow(p5); int[] r; if (v1 == 0) { r = new int[pow5.nWords + 1 + ((p2 != 0) ? 1 : 0)]; mult(pow5.data, pow5.nWords, v0, r); } else { r = new int[pow5.nWords + 2 + ((p2 != 0) ? 1 : 0)]; mult(pow5.data, pow5.nWords, v0, v1, r); } return (new FDBigInteger(r, pow5.offset)).leftShift(p2); } } else if (p2 != 0) { if (bitcount == 0) { return new FDBigInteger(new int[]{v0, v1}, wordcount); } else { return new FDBigInteger(new int[]{ v0 << bitcount, (v1 << bitcount) | (v0 >>> (32 - bitcount)), v1 >>> (32 - bitcount) }, wordcount); } } return new FDBigInteger(new int[]{v0, v1}, 0); }
class class_name[name] begin[{] method[valueOfMulPow52, return_type[type[FDBigInteger]], modifier[public static], parameter[value, p5, p2]] begin[{] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=p5, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), label=None, value=MemberReference(member=p5, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])) AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=p2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), label=None, value=MemberReference(member=p2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])) local_variable[type[int], v0] local_variable[type[int], v1] local_variable[type[int], wordcount] local_variable[type[int], bitcount] if[binary_operation[member[.p5], !=, literal[0]]] begin[{] if[binary_operation[member[.p5], <, member[SMALL_5_POW.length]]] begin[{] local_variable[type[long], pow5] local_variable[type[long], carry] assign[member[.v0], Cast(expression=MemberReference(member=carry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int))] assign[member[.carry], literal[32]] assign[member[.carry], binary_operation[binary_operation[binary_operation[member[.v1], &, member[.LONG_MASK]], *, member[.pow5]], +, member[.carry]]] assign[member[.v1], Cast(expression=MemberReference(member=carry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int))] local_variable[type[int], v2] if[binary_operation[member[.bitcount], ==, literal[0]]] begin[{] return[ClassCreator(arguments=[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=v0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=v1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=v2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int)), MemberReference(member=wordcount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FDBigInteger, sub_type=None))] else begin[{] return[ClassCreator(arguments=[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[BinaryOperation(operandl=MemberReference(member=v0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=bitcount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<<), BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=v1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=bitcount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<<), operandr=BinaryOperation(operandl=MemberReference(member=v0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32), operandr=MemberReference(member=bitcount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operator=>>>), operator=|), BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=v2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=bitcount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<<), operandr=BinaryOperation(operandl=MemberReference(member=v1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32), operandr=MemberReference(member=bitcount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operator=>>>), operator=|), BinaryOperation(operandl=MemberReference(member=v2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32), operandr=MemberReference(member=bitcount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operator=>>>)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int)), MemberReference(member=wordcount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FDBigInteger, sub_type=None))] end[}] else begin[{] local_variable[type[FDBigInteger], pow5] local_variable[type[int], r] if[binary_operation[member[.v1], ==, literal[0]]] begin[{] assign[member[.r], ArrayCreator(dimensions=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=nWords, postfix_operators=[], prefix_operators=[], qualifier=pow5, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), operandr=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=p2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), operator=+)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int))] call[.mult, parameter[member[pow5.data], member[pow5.nWords], member[.v0], member[.r]]] else begin[{] assign[member[.r], ArrayCreator(dimensions=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=nWords, postfix_operators=[], prefix_operators=[], qualifier=pow5, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=+), operandr=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=p2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), operator=+)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int))] call[.mult, parameter[member[pow5.data], member[pow5.nWords], member[.v0], member[.v1], member[.r]]] end[}] return[ClassCreator(arguments=[MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=pow5, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=p2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=leftShift, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=FDBigInteger, sub_type=None))] end[}] else begin[{] if[binary_operation[member[.p2], !=, literal[0]]] begin[{] if[binary_operation[member[.bitcount], ==, literal[0]]] begin[{] return[ClassCreator(arguments=[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=v0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=v1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int)), MemberReference(member=wordcount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FDBigInteger, sub_type=None))] else begin[{] return[ClassCreator(arguments=[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[BinaryOperation(operandl=MemberReference(member=v0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=bitcount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<<), BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=v1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=bitcount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<<), operandr=BinaryOperation(operandl=MemberReference(member=v0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32), operandr=MemberReference(member=bitcount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operator=>>>), operator=|), BinaryOperation(operandl=MemberReference(member=v1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32), operandr=MemberReference(member=bitcount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operator=>>>)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int)), MemberReference(member=wordcount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FDBigInteger, sub_type=None))] end[}] else begin[{] None end[}] end[}] return[ClassCreator(arguments=[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=v0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=v1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FDBigInteger, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[FDBigInteger] identifier[valueOfMulPow52] operator[SEP] Keyword[long] identifier[value] , Keyword[int] identifier[p5] , Keyword[int] identifier[p2] operator[SEP] { Keyword[assert] identifier[p5] operator[>=] Other[0] operator[:] identifier[p5] operator[SEP] Keyword[assert] identifier[p2] operator[>=] Other[0] operator[:] identifier[p2] operator[SEP] Keyword[int] identifier[v0] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[value] operator[SEP] Keyword[int] identifier[v1] operator[=] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[value] operator[>] operator[>] operator[>] Other[32] operator[SEP] operator[SEP] Keyword[int] identifier[wordcount] operator[=] identifier[p2] operator[>] operator[>] Other[5] operator[SEP] Keyword[int] identifier[bitcount] operator[=] identifier[p2] operator[&] literal[Integer] operator[SEP] Keyword[if] operator[SEP] identifier[p5] operator[!=] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[p5] operator[<] identifier[SMALL_5_POW] operator[SEP] identifier[length] operator[SEP] { Keyword[long] identifier[pow5] operator[=] identifier[SMALL_5_POW] operator[SEP] identifier[p5] operator[SEP] operator[&] identifier[LONG_MASK] operator[SEP] Keyword[long] identifier[carry] operator[=] operator[SEP] identifier[v0] operator[&] identifier[LONG_MASK] operator[SEP] operator[*] identifier[pow5] operator[SEP] identifier[v0] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[carry] operator[SEP] identifier[carry] operator[>>>=] Other[32] operator[SEP] identifier[carry] operator[=] operator[SEP] identifier[v1] operator[&] identifier[LONG_MASK] operator[SEP] operator[*] identifier[pow5] operator[+] identifier[carry] operator[SEP] identifier[v1] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[carry] operator[SEP] Keyword[int] identifier[v2] operator[=] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[carry] operator[>] operator[>] operator[>] Other[32] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[bitcount] operator[==] Other[0] operator[SEP] { Keyword[return] Keyword[new] identifier[FDBigInteger] operator[SEP] Keyword[new] Keyword[int] operator[SEP] operator[SEP] { identifier[v0] , identifier[v1] , identifier[v2] } , identifier[wordcount] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Keyword[new] identifier[FDBigInteger] operator[SEP] Keyword[new] Keyword[int] operator[SEP] operator[SEP] { identifier[v0] operator[<<] identifier[bitcount] , operator[SEP] identifier[v1] operator[<<] identifier[bitcount] operator[SEP] operator[|] operator[SEP] identifier[v0] operator[>] operator[>] operator[>] operator[SEP] Other[32] operator[-] identifier[bitcount] operator[SEP] operator[SEP] , operator[SEP] identifier[v2] operator[<<] identifier[bitcount] operator[SEP] operator[|] operator[SEP] identifier[v1] operator[>] operator[>] operator[>] operator[SEP] Other[32] operator[-] identifier[bitcount] operator[SEP] operator[SEP] , identifier[v2] operator[>] operator[>] operator[>] operator[SEP] Other[32] operator[-] identifier[bitcount] operator[SEP] } , identifier[wordcount] operator[SEP] operator[SEP] } } Keyword[else] { identifier[FDBigInteger] identifier[pow5] operator[=] identifier[big5pow] operator[SEP] identifier[p5] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[r] operator[SEP] Keyword[if] operator[SEP] identifier[v1] operator[==] Other[0] operator[SEP] { identifier[r] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[pow5] operator[SEP] identifier[nWords] operator[+] Other[1] operator[+] operator[SEP] operator[SEP] identifier[p2] operator[!=] Other[0] operator[SEP] operator[?] Other[1] operator[:] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[mult] operator[SEP] identifier[pow5] operator[SEP] identifier[data] , identifier[pow5] operator[SEP] identifier[nWords] , identifier[v0] , identifier[r] operator[SEP] operator[SEP] } Keyword[else] { identifier[r] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[pow5] operator[SEP] identifier[nWords] operator[+] Other[2] operator[+] operator[SEP] operator[SEP] identifier[p2] operator[!=] Other[0] operator[SEP] operator[?] Other[1] operator[:] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[mult] operator[SEP] identifier[pow5] operator[SEP] identifier[data] , identifier[pow5] operator[SEP] identifier[nWords] , identifier[v0] , identifier[v1] , identifier[r] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] Keyword[new] identifier[FDBigInteger] operator[SEP] identifier[r] , identifier[pow5] operator[SEP] identifier[offset] operator[SEP] operator[SEP] operator[SEP] identifier[leftShift] operator[SEP] identifier[p2] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[p2] operator[!=] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[bitcount] operator[==] Other[0] operator[SEP] { Keyword[return] Keyword[new] identifier[FDBigInteger] operator[SEP] Keyword[new] Keyword[int] operator[SEP] operator[SEP] { identifier[v0] , identifier[v1] } , identifier[wordcount] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Keyword[new] identifier[FDBigInteger] operator[SEP] Keyword[new] Keyword[int] operator[SEP] operator[SEP] { identifier[v0] operator[<<] identifier[bitcount] , operator[SEP] identifier[v1] operator[<<] identifier[bitcount] operator[SEP] operator[|] operator[SEP] identifier[v0] operator[>] operator[>] operator[>] operator[SEP] Other[32] operator[-] identifier[bitcount] operator[SEP] operator[SEP] , identifier[v1] operator[>] operator[>] operator[>] operator[SEP] Other[32] operator[-] identifier[bitcount] operator[SEP] } , identifier[wordcount] operator[SEP] operator[SEP] } } Keyword[return] Keyword[new] identifier[FDBigInteger] operator[SEP] Keyword[new] Keyword[int] operator[SEP] operator[SEP] { identifier[v0] , identifier[v1] } , Other[0] operator[SEP] operator[SEP] }
public static byte[] normalizeKey(byte[] keyData) { if (keyData == null) { return RSG.generate(16).getBytes(StandardCharsets.UTF_8); } else { return normalizeKey(new String(keyData, StandardCharsets.UTF_8)) .getBytes(StandardCharsets.UTF_8); } }
class class_name[name] begin[{] method[normalizeKey, return_type[type[byte]], modifier[public static], parameter[keyData]] begin[{] if[binary_operation[member[.keyData], ==, literal[null]]] begin[{] return[call[RSG.generate, parameter[literal[16]]]] else begin[{] return[call[.normalizeKey, parameter[ClassCreator(arguments=[MemberReference(member=keyData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=UTF_8, postfix_operators=[], prefix_operators=[], qualifier=StandardCharsets, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))]]] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[normalizeKey] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[keyData] operator[SEP] { Keyword[if] operator[SEP] identifier[keyData] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[RSG] operator[SEP] identifier[generate] operator[SEP] Other[16] operator[SEP] operator[SEP] identifier[getBytes] operator[SEP] identifier[StandardCharsets] operator[SEP] identifier[UTF_8] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[normalizeKey] operator[SEP] Keyword[new] identifier[String] operator[SEP] identifier[keyData] , identifier[StandardCharsets] operator[SEP] identifier[UTF_8] operator[SEP] operator[SEP] operator[SEP] identifier[getBytes] operator[SEP] identifier[StandardCharsets] operator[SEP] identifier[UTF_8] operator[SEP] operator[SEP] } }
public URLConnection get( Object key ) { synchronized( this ) // ensure no ConcurrentModificationException can occur. { Entry entry = m_hardStore.get( key ); if( entry == null ) { return null; } return entry.m_connection; } }
class class_name[name] begin[{] method[get, return_type[type[URLConnection]], modifier[public], parameter[key]] begin[{] SYNCHRONIZED[THIS[]] BEGIN[{] local_variable[type[Entry], entry] if[binary_operation[member[.entry], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] return[member[entry.m_connection]] END[}] end[}] END[}]
Keyword[public] identifier[URLConnection] identifier[get] operator[SEP] identifier[Object] identifier[key] operator[SEP] { Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] { identifier[Entry] identifier[entry] operator[=] identifier[m_hardStore] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[entry] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[return] identifier[entry] operator[SEP] identifier[m_connection] operator[SEP] } }
private <E> List<E> onIndexSearch(OracleNoSQLQueryInterpreter interpreter, EntityMetadata entityMetadata, MetamodelImpl metamodel, List<E> results, List<String> columnsToSelect) { Map<String, List> indexes = new HashMap<String, List>(); StringBuilder indexNamebuilder = new StringBuilder(); for (Object clause : interpreter.getClauseQueue()) { if (clause.getClass().isAssignableFrom(FilterClause.class)) { String fieldName = null; String clauseName = ((FilterClause) clause).getProperty(); StringTokenizer stringTokenizer = new StringTokenizer(clauseName, "."); // if need to select embedded columns if (stringTokenizer.countTokens() > 1) { fieldName = stringTokenizer.nextToken(); } fieldName = stringTokenizer.nextToken(); Object value = ((FilterClause) clause).getValue(); if (!indexes.containsKey(fieldName)) { indexNamebuilder.append(fieldName); indexNamebuilder.append(","); } indexes.put(fieldName, (List) value); } else { if (clause.toString().equalsIgnoreCase("OR")) { throw new QueryHandlerException("OR clause is not supported with oracle nosql db"); } } } // prepare index name and value. Table schemaTable = tableAPI.getTable(entityMetadata.getTableName()); String indexKeyName = indexNamebuilder.deleteCharAt(indexNamebuilder.length() - 1).toString(); Index index = schemaTable.getIndex(entityMetadata.getIndexProperties().get(indexKeyName).getName()); IndexKey indexKey = index.createIndexKey(); // StringBuilder indexNamebuilder = new StringBuilder(); for (String indexName : indexes.keySet()) { NoSqlDBUtils.add(schemaTable.getField(indexName), indexKey, indexes.get(indexName).get(0), indexName); } Iterator<Row> rowsIter = tableAPI.tableIterator(indexKey, null, null); Map<String, Object> relationMap = initialize(entityMetadata); try { results = scrollAndPopulate(null, entityMetadata, metamodel, schemaTable, rowsIter, relationMap, columnsToSelect); KunderaCoreUtils.printQueryWithFilterClause(interpreter.getClauseQueue(), entityMetadata.getTableName()); } catch (Exception e) { log.error("Error while finding records , Caused By :" + e + "."); throw new PersistenceException(e); } return results; }
class class_name[name] begin[{] method[onIndexSearch, return_type[type[List]], modifier[private], parameter[interpreter, entityMetadata, metamodel, results, columnsToSelect]] begin[{] local_variable[type[Map], indexes] local_variable[type[StringBuilder], indexNamebuilder] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=clause, selectors=[MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FilterClause, sub_type=None))], member=isAssignableFrom, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=clause, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="OR")], member=equalsIgnoreCase, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="OR clause is not supported with oracle nosql db")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=QueryHandlerException, sub_type=None)), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=fieldName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=clause, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=FilterClause, sub_type=None)), name=clauseName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=clauseName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringTokenizer, sub_type=None)), name=stringTokenizer)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringTokenizer, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=countTokens, postfix_operators=[], prefix_operators=[], qualifier=stringTokenizer, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=fieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=nextToken, postfix_operators=[], prefix_operators=[], qualifier=stringTokenizer, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=fieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=nextToken, postfix_operators=[], prefix_operators=[], qualifier=stringTokenizer, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=clause, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=FilterClause, sub_type=None)), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=fieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=['!'], qualifier=indexes, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=fieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=indexNamebuilder, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=",")], member=append, postfix_operators=[], prefix_operators=[], qualifier=indexNamebuilder, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=fieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=List, sub_type=None))], member=put, postfix_operators=[], prefix_operators=[], qualifier=indexes, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getClauseQueue, postfix_operators=[], prefix_operators=[], qualifier=interpreter, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=clause)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))), label=None) local_variable[type[Table], schemaTable] local_variable[type[String], indexKeyName] local_variable[type[Index], index] local_variable[type[IndexKey], indexKey] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=indexName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getField, postfix_operators=[], prefix_operators=[], qualifier=schemaTable, selectors=[], type_arguments=None), MemberReference(member=indexKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=indexName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=indexes, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=indexName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=NoSqlDBUtils, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=indexes, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=indexName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) local_variable[type[Iterator], rowsIter] local_variable[type[Map], relationMap] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=results, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=entityMetadata, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=metamodel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=schemaTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rowsIter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=relationMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=columnsToSelect, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=scrollAndPopulate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getClauseQueue, postfix_operators=[], prefix_operators=[], qualifier=interpreter, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getTableName, postfix_operators=[], prefix_operators=[], qualifier=entityMetadata, selectors=[], type_arguments=None)], member=printQueryWithFilterClause, postfix_operators=[], prefix_operators=[], qualifier=KunderaCoreUtils, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error while finding records , Caused By :"), operandr=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="."), operator=+)], member=error, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PersistenceException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) return[member[.results]] end[}] END[}]
Keyword[private] operator[<] identifier[E] operator[>] identifier[List] operator[<] identifier[E] operator[>] identifier[onIndexSearch] operator[SEP] identifier[OracleNoSQLQueryInterpreter] identifier[interpreter] , identifier[EntityMetadata] identifier[entityMetadata] , identifier[MetamodelImpl] identifier[metamodel] , identifier[List] operator[<] identifier[E] operator[>] identifier[results] , identifier[List] operator[<] identifier[String] operator[>] identifier[columnsToSelect] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[List] operator[>] identifier[indexes] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[List] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[indexNamebuilder] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Object] identifier[clause] operator[:] identifier[interpreter] operator[SEP] identifier[getClauseQueue] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[clause] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[FilterClause] operator[SEP] Keyword[class] operator[SEP] operator[SEP] { identifier[String] identifier[fieldName] operator[=] Other[null] operator[SEP] identifier[String] identifier[clauseName] operator[=] operator[SEP] operator[SEP] identifier[FilterClause] operator[SEP] identifier[clause] operator[SEP] operator[SEP] identifier[getProperty] operator[SEP] operator[SEP] operator[SEP] identifier[StringTokenizer] identifier[stringTokenizer] operator[=] Keyword[new] identifier[StringTokenizer] operator[SEP] identifier[clauseName] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[stringTokenizer] operator[SEP] identifier[countTokens] operator[SEP] operator[SEP] operator[>] Other[1] operator[SEP] { identifier[fieldName] operator[=] identifier[stringTokenizer] operator[SEP] identifier[nextToken] operator[SEP] operator[SEP] operator[SEP] } identifier[fieldName] operator[=] identifier[stringTokenizer] operator[SEP] identifier[nextToken] operator[SEP] operator[SEP] operator[SEP] identifier[Object] identifier[value] operator[=] operator[SEP] operator[SEP] identifier[FilterClause] operator[SEP] identifier[clause] operator[SEP] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[indexes] operator[SEP] identifier[containsKey] operator[SEP] identifier[fieldName] operator[SEP] operator[SEP] { identifier[indexNamebuilder] operator[SEP] identifier[append] operator[SEP] identifier[fieldName] operator[SEP] operator[SEP] identifier[indexNamebuilder] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[indexes] operator[SEP] identifier[put] operator[SEP] identifier[fieldName] , operator[SEP] identifier[List] operator[SEP] identifier[value] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[clause] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[QueryHandlerException] operator[SEP] literal[String] operator[SEP] operator[SEP] } } } identifier[Table] identifier[schemaTable] operator[=] identifier[tableAPI] operator[SEP] identifier[getTable] operator[SEP] identifier[entityMetadata] operator[SEP] identifier[getTableName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[indexKeyName] operator[=] identifier[indexNamebuilder] operator[SEP] identifier[deleteCharAt] operator[SEP] identifier[indexNamebuilder] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[Index] identifier[index] operator[=] identifier[schemaTable] operator[SEP] identifier[getIndex] operator[SEP] identifier[entityMetadata] operator[SEP] identifier[getIndexProperties] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[indexKeyName] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[IndexKey] identifier[indexKey] operator[=] identifier[index] operator[SEP] identifier[createIndexKey] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[indexName] operator[:] identifier[indexes] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { identifier[NoSqlDBUtils] operator[SEP] identifier[add] operator[SEP] identifier[schemaTable] operator[SEP] identifier[getField] operator[SEP] identifier[indexName] operator[SEP] , identifier[indexKey] , identifier[indexes] operator[SEP] identifier[get] operator[SEP] identifier[indexName] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] , identifier[indexName] operator[SEP] operator[SEP] } identifier[Iterator] operator[<] identifier[Row] operator[>] identifier[rowsIter] operator[=] identifier[tableAPI] operator[SEP] identifier[tableIterator] operator[SEP] identifier[indexKey] , Other[null] , Other[null] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[relationMap] operator[=] identifier[initialize] operator[SEP] identifier[entityMetadata] operator[SEP] operator[SEP] Keyword[try] { identifier[results] operator[=] identifier[scrollAndPopulate] operator[SEP] Other[null] , identifier[entityMetadata] , identifier[metamodel] , identifier[schemaTable] , identifier[rowsIter] , identifier[relationMap] , identifier[columnsToSelect] operator[SEP] operator[SEP] identifier[KunderaCoreUtils] operator[SEP] identifier[printQueryWithFilterClause] operator[SEP] identifier[interpreter] operator[SEP] identifier[getClauseQueue] operator[SEP] operator[SEP] , identifier[entityMetadata] operator[SEP] identifier[getTableName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[log] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[e] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[PersistenceException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[return] identifier[results] operator[SEP] }
public void load(CFMetaData cfm) { Pair<String, String> key = Pair.create(cfm.ksName, cfm.cfName); if (cfIdMap.containsKey(key)) throw new RuntimeException(String.format("Attempting to load already loaded column family %s.%s", cfm.ksName, cfm.cfName)); logger.debug("Adding {} to cfIdMap", cfm); cfIdMap.put(key, cfm.cfId); }
class class_name[name] begin[{] method[load, return_type[void], modifier[public], parameter[cfm]] begin[{] local_variable[type[Pair], key] if[call[cfIdMap.containsKey, parameter[member[.key]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Attempting to load already loaded column family %s.%s"), MemberReference(member=ksName, postfix_operators=[], prefix_operators=[], qualifier=cfm, selectors=[]), MemberReference(member=cfName, postfix_operators=[], prefix_operators=[], qualifier=cfm, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None) else begin[{] None end[}] call[logger.debug, parameter[literal["Adding {} to cfIdMap"], member[.cfm]]] call[cfIdMap.put, parameter[member[.key], member[cfm.cfId]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[load] operator[SEP] identifier[CFMetaData] identifier[cfm] operator[SEP] { identifier[Pair] operator[<] identifier[String] , identifier[String] operator[>] identifier[key] operator[=] identifier[Pair] operator[SEP] identifier[create] operator[SEP] identifier[cfm] operator[SEP] identifier[ksName] , identifier[cfm] operator[SEP] identifier[cfName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cfIdMap] operator[SEP] identifier[containsKey] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[cfm] operator[SEP] identifier[ksName] , identifier[cfm] operator[SEP] identifier[cfName] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[cfm] operator[SEP] operator[SEP] identifier[cfIdMap] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[cfm] operator[SEP] identifier[cfId] operator[SEP] operator[SEP] }
private void writeToDiskCache( final CacheKey key, final EncodedImage encodedImage) { FLog.v(TAG, "About to write to disk-cache for key %s", key.getUriString()); try { mFileCache.insert( key, new WriterCallback() { @Override public void write(OutputStream os) throws IOException { mPooledByteStreams.copy(encodedImage.getInputStream(), os); } } ); FLog.v(TAG, "Successful disk-cache write for key %s", key.getUriString()); } catch (IOException ioe) { // Log failure // TODO: 3697790 FLog.w(TAG, ioe, "Failed to write to disk-cache for key %s", key.getUriString()); } }
class class_name[name] begin[{] method[writeToDiskCache, return_type[void], modifier[private], parameter[key, encodedImage]] begin[{] call[FLog.v, parameter[member[.TAG], literal["About to write to disk-cache for key %s"], call[key.getUriString, parameter[]]]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getInputStream, postfix_operators=[], prefix_operators=[], qualifier=encodedImage, selectors=[], type_arguments=None), MemberReference(member=os, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=copy, postfix_operators=[], prefix_operators=[], qualifier=mPooledByteStreams, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=write, parameters=[FormalParameter(annotations=[], modifiers=set(), name=os, type=ReferenceType(arguments=None, dimensions=[], name=OutputStream, sub_type=None), varargs=False)], return_type=None, throws=['IOException'], type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WriterCallback, sub_type=None))], member=insert, postfix_operators=[], prefix_operators=[], qualifier=mFileCache, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TAG, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Successful disk-cache write for key %s"), MethodInvocation(arguments=[], member=getUriString, postfix_operators=[], prefix_operators=[], qualifier=key, selectors=[], type_arguments=None)], member=v, postfix_operators=[], prefix_operators=[], qualifier=FLog, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TAG, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ioe, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to write to disk-cache for key %s"), MethodInvocation(arguments=[], member=getUriString, postfix_operators=[], prefix_operators=[], qualifier=key, selectors=[], type_arguments=None)], member=w, postfix_operators=[], prefix_operators=[], qualifier=FLog, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ioe, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[writeToDiskCache] operator[SEP] Keyword[final] identifier[CacheKey] identifier[key] , Keyword[final] identifier[EncodedImage] identifier[encodedImage] operator[SEP] { identifier[FLog] operator[SEP] identifier[v] operator[SEP] identifier[TAG] , literal[String] , identifier[key] operator[SEP] identifier[getUriString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[mFileCache] operator[SEP] identifier[insert] operator[SEP] identifier[key] , Keyword[new] identifier[WriterCallback] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[write] operator[SEP] identifier[OutputStream] identifier[os] operator[SEP] Keyword[throws] identifier[IOException] { identifier[mPooledByteStreams] operator[SEP] identifier[copy] operator[SEP] identifier[encodedImage] operator[SEP] identifier[getInputStream] operator[SEP] operator[SEP] , identifier[os] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[FLog] operator[SEP] identifier[v] operator[SEP] identifier[TAG] , literal[String] , identifier[key] operator[SEP] identifier[getUriString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[ioe] operator[SEP] { identifier[FLog] operator[SEP] identifier[w] operator[SEP] identifier[TAG] , identifier[ioe] , literal[String] , identifier[key] operator[SEP] identifier[getUriString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
private static boolean isConstant(@Nullable ExprRootNode exprRoot) { return exprRoot != null && SimplifyExprVisitor.isConstant(exprRoot.getRoot()); }
class class_name[name] begin[{] method[isConstant, return_type[type[boolean]], modifier[private static], parameter[exprRoot]] begin[{] return[binary_operation[binary_operation[member[.exprRoot], !=, literal[null]], &&, call[SimplifyExprVisitor.isConstant, parameter[call[exprRoot.getRoot, parameter[]]]]]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[boolean] identifier[isConstant] operator[SEP] annotation[@] identifier[Nullable] identifier[ExprRootNode] identifier[exprRoot] operator[SEP] { Keyword[return] identifier[exprRoot] operator[!=] Other[null] operator[&&] identifier[SimplifyExprVisitor] operator[SEP] identifier[isConstant] operator[SEP] identifier[exprRoot] operator[SEP] identifier[getRoot] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public String addAlias(String indice,String alias){ String aliasJson = new StringBuilder().append("{\"actions\": [{\"add\": {\"index\":\"").append(indice).append("\",\"alias\": \"").append(alias).append("\"}}]}").toString(); return this.client.executeHttp("_aliases",aliasJson,ClientUtil.HTTP_POST); }
class class_name[name] begin[{] method[addAlias, return_type[type[String]], modifier[public], parameter[indice, alias]] begin[{] local_variable[type[String], aliasJson] return[THIS[member[None.client]call[None.executeHttp, parameter[literal["_aliases"], member[.aliasJson], member[ClientUtil.HTTP_POST]]]]] end[}] END[}]
Keyword[public] identifier[String] identifier[addAlias] operator[SEP] identifier[String] identifier[indice] , identifier[String] identifier[alias] operator[SEP] { identifier[String] identifier[aliasJson] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[indice] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[alias] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[executeHttp] operator[SEP] literal[String] , identifier[aliasJson] , identifier[ClientUtil] operator[SEP] identifier[HTTP_POST] operator[SEP] operator[SEP] }
public Object doFilter(Object object, Method method, Object[] params, AjaxFilterChain chain) throws Exception { // We allow anyone to authenticate if (authenticateName.equals(method.getName())) { return chain.doFilter(object, method, params); } Object user = getUser(); if (user != null) { return chain.doFilter(object, method, params); } throw new SecurityException("Not authenticated"); }
class class_name[name] begin[{] method[doFilter, return_type[type[Object]], modifier[public], parameter[object, method, params, chain]] begin[{] if[call[authenticateName.equals, parameter[call[method.getName, parameter[]]]]] begin[{] return[call[chain.doFilter, parameter[member[.object], member[.method], member[.params]]]] else begin[{] None end[}] local_variable[type[Object], user] if[binary_operation[member[.user], !=, literal[null]]] begin[{] return[call[chain.doFilter, parameter[member[.object], member[.method], member[.params]]]] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Not authenticated")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SecurityException, sub_type=None)), label=None) end[}] END[}]
Keyword[public] identifier[Object] identifier[doFilter] operator[SEP] identifier[Object] identifier[object] , identifier[Method] identifier[method] , identifier[Object] operator[SEP] operator[SEP] identifier[params] , identifier[AjaxFilterChain] identifier[chain] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[if] operator[SEP] identifier[authenticateName] operator[SEP] identifier[equals] operator[SEP] identifier[method] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[chain] operator[SEP] identifier[doFilter] operator[SEP] identifier[object] , identifier[method] , identifier[params] operator[SEP] operator[SEP] } identifier[Object] identifier[user] operator[=] identifier[getUser] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[user] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[chain] operator[SEP] identifier[doFilter] operator[SEP] identifier[object] , identifier[method] , identifier[params] operator[SEP] operator[SEP] } Keyword[throw] Keyword[new] identifier[SecurityException] operator[SEP] literal[String] operator[SEP] operator[SEP] }
public static void trace(final String message, final Supplier<?>... arguments) { if (MINIMUM_LEVEL_COVERS_TRACE) { provider.log(STACKTRACE_DEPTH, null, Level.TRACE, null, message, (Object[]) arguments); } }
class class_name[name] begin[{] method[trace, return_type[void], modifier[public static], parameter[message, arguments]] begin[{] if[member[.MINIMUM_LEVEL_COVERS_TRACE]] begin[{] call[provider.log, parameter[member[.STACKTRACE_DEPTH], literal[null], member[Level.TRACE], literal[null], member[.message], Cast(expression=MemberReference(member=arguments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[None], name=Object, sub_type=None))]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[trace] operator[SEP] Keyword[final] identifier[String] identifier[message] , Keyword[final] identifier[Supplier] operator[<] operator[?] operator[>] operator[...] identifier[arguments] operator[SEP] { Keyword[if] operator[SEP] identifier[MINIMUM_LEVEL_COVERS_TRACE] operator[SEP] { identifier[provider] operator[SEP] identifier[log] operator[SEP] identifier[STACKTRACE_DEPTH] , Other[null] , identifier[Level] operator[SEP] identifier[TRACE] , Other[null] , identifier[message] , operator[SEP] identifier[Object] operator[SEP] operator[SEP] operator[SEP] identifier[arguments] operator[SEP] operator[SEP] } }
public static <T extends ChronoEntity<T> & CalendarDate> StdCalendarElement<Integer, T> boundedWeekOfYear( Chronology<T> chronology, Weekmodel model ) { ChronoElement<Integer> e = findDayElement(chronology, "DAY_OF_YEAR"); if (e == null) { throw new IllegalArgumentException("Cannot derive a rule for given chronology: " + chronology); } return new CalendarWeekElement<>( "BOUNDED_WEEK_OF_YEAR", chronology.getChronoType(), 1, 52, '\u0000', model, e, true); }
class class_name[name] begin[{] method[boundedWeekOfYear, return_type[type[StdCalendarElement]], modifier[public static], parameter[chronology, model]] begin[{] local_variable[type[ChronoElement], e] if[binary_operation[member[.e], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot derive a rule for given chronology: "), operandr=MemberReference(member=chronology, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] return[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="BOUNDED_WEEK_OF_YEAR"), MethodInvocation(arguments=[], member=getChronoType, postfix_operators=[], prefix_operators=[], qualifier=chronology, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=52), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=''), MemberReference(member=model, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=CalendarWeekElement, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[ChronoEntity] operator[<] identifier[T] operator[>] operator[&] identifier[CalendarDate] operator[>] identifier[StdCalendarElement] operator[<] identifier[Integer] , identifier[T] operator[>] identifier[boundedWeekOfYear] operator[SEP] identifier[Chronology] operator[<] identifier[T] operator[>] identifier[chronology] , identifier[Weekmodel] identifier[model] operator[SEP] { identifier[ChronoElement] operator[<] identifier[Integer] operator[>] identifier[e] operator[=] identifier[findDayElement] operator[SEP] identifier[chronology] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[e] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[chronology] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[CalendarWeekElement] operator[<] operator[>] operator[SEP] literal[String] , identifier[chronology] operator[SEP] identifier[getChronoType] operator[SEP] operator[SEP] , Other[1] , Other[52] , literal[String] , identifier[model] , identifier[e] , literal[boolean] operator[SEP] operator[SEP] }
private static UInteger getCached(long value) { if (VALUES != null && value < VALUES.length) return VALUES[(int) value]; return null; }
class class_name[name] begin[{] method[getCached, return_type[type[UInteger]], modifier[private static], parameter[value]] begin[{] if[binary_operation[binary_operation[member[.VALUES], !=, literal[null]], &&, binary_operation[member[.value], <, member[VALUES.length]]]] begin[{] return[member[.VALUES]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[private] Keyword[static] identifier[UInteger] identifier[getCached] operator[SEP] Keyword[long] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[VALUES] operator[!=] Other[null] operator[&&] identifier[value] operator[<] identifier[VALUES] operator[SEP] identifier[length] operator[SEP] Keyword[return] identifier[VALUES] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[value] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] }
@Nonnull public static LLongIntPredicate longIntPredicateFrom(Consumer<LLongIntPredicateBuilder> buildingFunction) { LLongIntPredicateBuilder builder = new LLongIntPredicateBuilder(); buildingFunction.accept(builder); return builder.build(); }
class class_name[name] begin[{] method[longIntPredicateFrom, return_type[type[LLongIntPredicate]], modifier[public static], parameter[buildingFunction]] begin[{] local_variable[type[LLongIntPredicateBuilder], builder] call[buildingFunction.accept, parameter[member[.builder]]] return[call[builder.build, parameter[]]] end[}] END[}]
annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] identifier[LLongIntPredicate] identifier[longIntPredicateFrom] operator[SEP] identifier[Consumer] operator[<] identifier[LLongIntPredicateBuilder] operator[>] identifier[buildingFunction] operator[SEP] { identifier[LLongIntPredicateBuilder] identifier[builder] operator[=] Keyword[new] identifier[LLongIntPredicateBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[buildingFunction] operator[SEP] identifier[accept] operator[SEP] identifier[builder] operator[SEP] operator[SEP] Keyword[return] identifier[builder] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] }
private Content processParamTags(Element e, boolean isParams, List<? extends DocTree> paramTags, Map<String, String> rankMap, TagletWriter writer, Set<String> alreadyDocumented) { Messages messages = writer.configuration().getMessages(); Content result = writer.getOutputInstance(); if (!paramTags.isEmpty()) { CommentHelper ch = writer.configuration().utils.getCommentHelper(e); for (DocTree dt : paramTags) { String paramName = isParams ? ch.getParameterName(dt) : "<" + ch.getParameterName(dt) + ">"; if (!rankMap.containsKey(ch.getParameterName(dt))) { messages.warning(ch.getDocTreePath(dt), isParams ? "doclet.Parameters_warn" : "doclet.Type_Parameters_warn", paramName); } String rank = rankMap.get(ch.getParameterName(dt)); if (rank != null && alreadyDocumented.contains(rank)) { messages.warning(ch.getDocTreePath(dt), isParams ? "doclet.Parameters_dup_warn" : "doclet.Type_Parameters_dup_warn", paramName); } result.addContent(processParamTag(e, isParams, writer, dt, ch.getParameterName(dt), alreadyDocumented.isEmpty())); alreadyDocumented.add(rank); } } return result; }
class class_name[name] begin[{] method[processParamTags, return_type[type[Content]], modifier[private], parameter[e, isParams, paramTags, rankMap, writer, alreadyDocumented]] begin[{] local_variable[type[Messages], messages] local_variable[type[Content], result] if[call[paramTags.isEmpty, parameter[]]] begin[{] local_variable[type[CommentHelper], ch] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=MemberReference(member=isParams, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="<"), operandr=MethodInvocation(arguments=[MemberReference(member=dt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getParameterName, postfix_operators=[], prefix_operators=[], qualifier=ch, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=">"), operator=+), if_true=MethodInvocation(arguments=[MemberReference(member=dt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getParameterName, postfix_operators=[], prefix_operators=[], qualifier=ch, selectors=[], type_arguments=None)), name=paramName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=dt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getParameterName, postfix_operators=[], prefix_operators=[], qualifier=ch, selectors=[], type_arguments=None)], member=containsKey, postfix_operators=[], prefix_operators=['!'], qualifier=rankMap, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=dt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDocTreePath, postfix_operators=[], prefix_operators=[], qualifier=ch, selectors=[], type_arguments=None), TernaryExpression(condition=MemberReference(member=isParams, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="doclet.Type_Parameters_warn"), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="doclet.Parameters_warn")), MemberReference(member=paramName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warning, postfix_operators=[], prefix_operators=[], qualifier=messages, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=dt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getParameterName, postfix_operators=[], prefix_operators=[], qualifier=ch, selectors=[], type_arguments=None)], member=get, postfix_operators=[], prefix_operators=[], qualifier=rankMap, selectors=[], type_arguments=None), name=rank)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=rank, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[MemberReference(member=rank, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=[], qualifier=alreadyDocumented, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=dt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDocTreePath, postfix_operators=[], prefix_operators=[], qualifier=ch, selectors=[], type_arguments=None), TernaryExpression(condition=MemberReference(member=isParams, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="doclet.Type_Parameters_dup_warn"), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="doclet.Parameters_dup_warn")), MemberReference(member=paramName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warning, postfix_operators=[], prefix_operators=[], qualifier=messages, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=isParams, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=writer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=dt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=dt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getParameterName, postfix_operators=[], prefix_operators=[], qualifier=ch, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=alreadyDocumented, selectors=[], type_arguments=None)], member=processParamTag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=addContent, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=rank, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=alreadyDocumented, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=paramTags, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=dt)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DocTree, sub_type=None))), label=None) else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[private] identifier[Content] identifier[processParamTags] operator[SEP] identifier[Element] identifier[e] , Keyword[boolean] identifier[isParams] , identifier[List] operator[<] operator[?] Keyword[extends] identifier[DocTree] operator[>] identifier[paramTags] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[rankMap] , identifier[TagletWriter] identifier[writer] , identifier[Set] operator[<] identifier[String] operator[>] identifier[alreadyDocumented] operator[SEP] { identifier[Messages] identifier[messages] operator[=] identifier[writer] operator[SEP] identifier[configuration] operator[SEP] operator[SEP] operator[SEP] identifier[getMessages] operator[SEP] operator[SEP] operator[SEP] identifier[Content] identifier[result] operator[=] identifier[writer] operator[SEP] identifier[getOutputInstance] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[paramTags] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[CommentHelper] identifier[ch] operator[=] identifier[writer] operator[SEP] identifier[configuration] operator[SEP] operator[SEP] operator[SEP] identifier[utils] operator[SEP] identifier[getCommentHelper] operator[SEP] identifier[e] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[DocTree] identifier[dt] operator[:] identifier[paramTags] operator[SEP] { identifier[String] identifier[paramName] operator[=] identifier[isParams] operator[?] identifier[ch] operator[SEP] identifier[getParameterName] operator[SEP] identifier[dt] operator[SEP] operator[:] literal[String] operator[+] identifier[ch] operator[SEP] identifier[getParameterName] operator[SEP] identifier[dt] operator[SEP] operator[+] literal[String] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[rankMap] operator[SEP] identifier[containsKey] operator[SEP] identifier[ch] operator[SEP] identifier[getParameterName] operator[SEP] identifier[dt] operator[SEP] operator[SEP] operator[SEP] { identifier[messages] operator[SEP] identifier[warning] operator[SEP] identifier[ch] operator[SEP] identifier[getDocTreePath] operator[SEP] identifier[dt] operator[SEP] , identifier[isParams] operator[?] literal[String] operator[:] literal[String] , identifier[paramName] operator[SEP] operator[SEP] } identifier[String] identifier[rank] operator[=] identifier[rankMap] operator[SEP] identifier[get] operator[SEP] identifier[ch] operator[SEP] identifier[getParameterName] operator[SEP] identifier[dt] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[rank] operator[!=] Other[null] operator[&&] identifier[alreadyDocumented] operator[SEP] identifier[contains] operator[SEP] identifier[rank] operator[SEP] operator[SEP] { identifier[messages] operator[SEP] identifier[warning] operator[SEP] identifier[ch] operator[SEP] identifier[getDocTreePath] operator[SEP] identifier[dt] operator[SEP] , identifier[isParams] operator[?] literal[String] operator[:] literal[String] , identifier[paramName] operator[SEP] operator[SEP] } identifier[result] operator[SEP] identifier[addContent] operator[SEP] identifier[processParamTag] operator[SEP] identifier[e] , identifier[isParams] , identifier[writer] , identifier[dt] , identifier[ch] operator[SEP] identifier[getParameterName] operator[SEP] identifier[dt] operator[SEP] , identifier[alreadyDocumented] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[alreadyDocumented] operator[SEP] identifier[add] operator[SEP] identifier[rank] operator[SEP] operator[SEP] } } Keyword[return] identifier[result] operator[SEP] }
public static PagableQueryParams of(final Optional<String> optOffset, final Optional<Integer> optLimit) { return PagableQueryParams.of(optOffset, optLimit, Optional.<SortDirection> absent(), Optional.<Boolean> absent()); }
class class_name[name] begin[{] method[of, return_type[type[PagableQueryParams]], modifier[public static], parameter[optOffset, optLimit]] begin[{] return[call[PagableQueryParams.of, parameter[member[.optOffset], member[.optLimit], call[.Optional, parameter[]], call[.Optional, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[PagableQueryParams] identifier[of] operator[SEP] Keyword[final] identifier[Optional] operator[<] identifier[String] operator[>] identifier[optOffset] , Keyword[final] identifier[Optional] operator[<] identifier[Integer] operator[>] identifier[optLimit] operator[SEP] { Keyword[return] identifier[PagableQueryParams] operator[SEP] identifier[of] operator[SEP] identifier[optOffset] , identifier[optLimit] , identifier[Optional] operator[SEP] operator[<] identifier[SortDirection] operator[>] identifier[absent] operator[SEP] operator[SEP] , identifier[Optional] operator[SEP] operator[<] identifier[Boolean] operator[>] identifier[absent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private void removeAllRelatedFromCache(String groupId) { cache.remove(CacheHandler.GROUP_PREFIX + groupId, CacheType.MEMBERSHIP); }
class class_name[name] begin[{] method[removeAllRelatedFromCache, return_type[void], modifier[private], parameter[groupId]] begin[{] call[cache.remove, parameter[binary_operation[member[CacheHandler.GROUP_PREFIX], +, member[.groupId]], member[CacheType.MEMBERSHIP]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[removeAllRelatedFromCache] operator[SEP] identifier[String] identifier[groupId] operator[SEP] { identifier[cache] operator[SEP] identifier[remove] operator[SEP] identifier[CacheHandler] operator[SEP] identifier[GROUP_PREFIX] operator[+] identifier[groupId] , identifier[CacheType] operator[SEP] identifier[MEMBERSHIP] operator[SEP] operator[SEP] }
@Override public long until(Temporal endExclusive, TemporalUnit unit) { @SuppressWarnings("unchecked") ChronoLocalDateTime<D> end = (ChronoLocalDateTime<D>) toLocalDate().getChronology().localDateTime(endExclusive); if (unit instanceof ChronoUnit) { ChronoUnit f = (ChronoUnit) unit; if (f.isTimeBased()) { long amount = end.getLong(EPOCH_DAY) - date.getLong(EPOCH_DAY); switch (f) { case NANOS: amount = Jdk8Methods.safeMultiply(amount, NANOS_PER_DAY); break; case MICROS: amount = Jdk8Methods.safeMultiply(amount, MICROS_PER_DAY); break; case MILLIS: amount = Jdk8Methods.safeMultiply(amount, MILLIS_PER_DAY); break; case SECONDS: amount = Jdk8Methods.safeMultiply(amount, SECONDS_PER_DAY); break; case MINUTES: amount = Jdk8Methods.safeMultiply(amount, MINUTES_PER_DAY); break; case HOURS: amount = Jdk8Methods.safeMultiply(amount, HOURS_PER_DAY); break; case HALF_DAYS: amount = Jdk8Methods.safeMultiply(amount, 2); break; } return Jdk8Methods.safeAdd(amount, time.until(end.toLocalTime(), unit)); } ChronoLocalDate endDate = end.toLocalDate(); if (end.toLocalTime().isBefore(time)) { endDate = endDate.minus(1, ChronoUnit.DAYS); } return date.until(endDate, unit); } return unit.between(this, end); }
class class_name[name] begin[{] method[until, return_type[type[long]], modifier[public], parameter[endExclusive, unit]] begin[{] local_variable[type[ChronoLocalDateTime], end] if[binary_operation[member[.unit], instanceof, type[ChronoUnit]]] begin[{] local_variable[type[ChronoUnit], f] if[call[f.isTimeBased, parameter[]]] begin[{] local_variable[type[long], amount] SwitchStatement(cases=[SwitchStatementCase(case=['NANOS'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=amount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=amount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=NANOS_PER_DAY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=safeMultiply, postfix_operators=[], prefix_operators=[], qualifier=Jdk8Methods, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['MICROS'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=amount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=amount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=MICROS_PER_DAY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=safeMultiply, postfix_operators=[], prefix_operators=[], qualifier=Jdk8Methods, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['MILLIS'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=amount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=amount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=MILLIS_PER_DAY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=safeMultiply, postfix_operators=[], prefix_operators=[], qualifier=Jdk8Methods, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['SECONDS'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=amount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=amount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=SECONDS_PER_DAY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=safeMultiply, postfix_operators=[], prefix_operators=[], qualifier=Jdk8Methods, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['MINUTES'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=amount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=amount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=MINUTES_PER_DAY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=safeMultiply, postfix_operators=[], prefix_operators=[], qualifier=Jdk8Methods, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['HOURS'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=amount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=amount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=HOURS_PER_DAY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=safeMultiply, postfix_operators=[], prefix_operators=[], qualifier=Jdk8Methods, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['HALF_DAYS'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=amount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=amount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=safeMultiply, postfix_operators=[], prefix_operators=[], qualifier=Jdk8Methods, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) return[call[Jdk8Methods.safeAdd, parameter[member[.amount], call[time.until, parameter[call[end.toLocalTime, parameter[]], member[.unit]]]]]] else begin[{] None end[}] local_variable[type[ChronoLocalDate], endDate] if[call[end.toLocalTime, parameter[]]] begin[{] assign[member[.endDate], call[endDate.minus, parameter[literal[1], member[ChronoUnit.DAYS]]]] else begin[{] None end[}] return[call[date.until, parameter[member[.endDate], member[.unit]]]] else begin[{] None end[}] return[call[unit.between, parameter[THIS[], member[.end]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[long] identifier[until] operator[SEP] identifier[Temporal] identifier[endExclusive] , identifier[TemporalUnit] identifier[unit] operator[SEP] { annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[ChronoLocalDateTime] operator[<] identifier[D] operator[>] identifier[end] operator[=] operator[SEP] identifier[ChronoLocalDateTime] operator[<] identifier[D] operator[>] operator[SEP] identifier[toLocalDate] operator[SEP] operator[SEP] operator[SEP] identifier[getChronology] operator[SEP] operator[SEP] operator[SEP] identifier[localDateTime] operator[SEP] identifier[endExclusive] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[unit] Keyword[instanceof] identifier[ChronoUnit] operator[SEP] { identifier[ChronoUnit] identifier[f] operator[=] operator[SEP] identifier[ChronoUnit] operator[SEP] identifier[unit] operator[SEP] Keyword[if] operator[SEP] identifier[f] operator[SEP] identifier[isTimeBased] operator[SEP] operator[SEP] operator[SEP] { Keyword[long] identifier[amount] operator[=] identifier[end] operator[SEP] identifier[getLong] operator[SEP] identifier[EPOCH_DAY] operator[SEP] operator[-] identifier[date] operator[SEP] identifier[getLong] operator[SEP] identifier[EPOCH_DAY] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[f] operator[SEP] { Keyword[case] identifier[NANOS] operator[:] identifier[amount] operator[=] identifier[Jdk8Methods] operator[SEP] identifier[safeMultiply] operator[SEP] identifier[amount] , identifier[NANOS_PER_DAY] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[MICROS] operator[:] identifier[amount] operator[=] identifier[Jdk8Methods] operator[SEP] identifier[safeMultiply] operator[SEP] identifier[amount] , identifier[MICROS_PER_DAY] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[MILLIS] operator[:] identifier[amount] operator[=] identifier[Jdk8Methods] operator[SEP] identifier[safeMultiply] operator[SEP] identifier[amount] , identifier[MILLIS_PER_DAY] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[SECONDS] operator[:] identifier[amount] operator[=] identifier[Jdk8Methods] operator[SEP] identifier[safeMultiply] operator[SEP] identifier[amount] , identifier[SECONDS_PER_DAY] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[MINUTES] operator[:] identifier[amount] operator[=] identifier[Jdk8Methods] operator[SEP] identifier[safeMultiply] operator[SEP] identifier[amount] , identifier[MINUTES_PER_DAY] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[HOURS] operator[:] identifier[amount] operator[=] identifier[Jdk8Methods] operator[SEP] identifier[safeMultiply] operator[SEP] identifier[amount] , identifier[HOURS_PER_DAY] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[HALF_DAYS] operator[:] identifier[amount] operator[=] identifier[Jdk8Methods] operator[SEP] identifier[safeMultiply] operator[SEP] identifier[amount] , Other[2] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } Keyword[return] identifier[Jdk8Methods] operator[SEP] identifier[safeAdd] operator[SEP] identifier[amount] , identifier[time] operator[SEP] identifier[until] operator[SEP] identifier[end] operator[SEP] identifier[toLocalTime] operator[SEP] operator[SEP] , identifier[unit] operator[SEP] operator[SEP] operator[SEP] } identifier[ChronoLocalDate] identifier[endDate] operator[=] identifier[end] operator[SEP] identifier[toLocalDate] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[end] operator[SEP] identifier[toLocalTime] operator[SEP] operator[SEP] operator[SEP] identifier[isBefore] operator[SEP] identifier[time] operator[SEP] operator[SEP] { identifier[endDate] operator[=] identifier[endDate] operator[SEP] identifier[minus] operator[SEP] Other[1] , identifier[ChronoUnit] operator[SEP] identifier[DAYS] operator[SEP] operator[SEP] } Keyword[return] identifier[date] operator[SEP] identifier[until] operator[SEP] identifier[endDate] , identifier[unit] operator[SEP] operator[SEP] } Keyword[return] identifier[unit] operator[SEP] identifier[between] operator[SEP] Keyword[this] , identifier[end] operator[SEP] operator[SEP] }
public static <KEYTYPE, DATATYPE, ITEMTYPE extends ITreeItemWithID <KEYTYPE, DATATYPE, ITEMTYPE>> void sortByValue (@Nonnull final IBasicTree <DATATYPE, ITEMTYPE> aTree, @Nonnull final Comparator <? super DATATYPE> aValueComparator) { _sort (aTree, Comparator.comparing (IBasicTreeItem::getData, aValueComparator)); }
class class_name[name] begin[{] method[sortByValue, return_type[void], modifier[public static], parameter[aTree, aValueComparator]] begin[{] call[._sort, parameter[member[.aTree], call[Comparator.comparing, parameter[MethodReference(expression=MemberReference(member=IBasicTreeItem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), method=MemberReference(member=getData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[]), member[.aValueComparator]]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[KEYTYPE] , identifier[DATATYPE] , identifier[ITEMTYPE] Keyword[extends] identifier[ITreeItemWithID] operator[<] identifier[KEYTYPE] , identifier[DATATYPE] , identifier[ITEMTYPE] operator[>] operator[>] Keyword[void] identifier[sortByValue] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[IBasicTree] operator[<] identifier[DATATYPE] , identifier[ITEMTYPE] operator[>] identifier[aTree] , annotation[@] identifier[Nonnull] Keyword[final] identifier[Comparator] operator[<] operator[?] Keyword[super] identifier[DATATYPE] operator[>] identifier[aValueComparator] operator[SEP] { identifier[_sort] operator[SEP] identifier[aTree] , identifier[Comparator] operator[SEP] identifier[comparing] operator[SEP] identifier[IBasicTreeItem] operator[::] identifier[getData] , identifier[aValueComparator] operator[SEP] operator[SEP] operator[SEP] }
private void initFilters() { ditaWriterFilter = new DitaWriterFilter(); ditaWriterFilter.setLogger(logger); ditaWriterFilter.setJob(job); ditaWriterFilter.setEntityResolver(reader.getEntityResolver()); topicFragmentFilter = new TopicFragmentFilter(ATTRIBUTE_NAME_CONREF, ATTRIBUTE_NAME_CONREFEND); tempFileNameScheme.setBaseDir(job.getInputDir()); }
class class_name[name] begin[{] method[initFilters, return_type[void], modifier[private], parameter[]] begin[{] assign[member[.ditaWriterFilter], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DitaWriterFilter, sub_type=None))] call[ditaWriterFilter.setLogger, parameter[member[.logger]]] call[ditaWriterFilter.setJob, parameter[member[.job]]] call[ditaWriterFilter.setEntityResolver, parameter[call[reader.getEntityResolver, parameter[]]]] assign[member[.topicFragmentFilter], ClassCreator(arguments=[MemberReference(member=ATTRIBUTE_NAME_CONREF, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ATTRIBUTE_NAME_CONREFEND, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TopicFragmentFilter, sub_type=None))] call[tempFileNameScheme.setBaseDir, parameter[call[job.getInputDir, parameter[]]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[initFilters] operator[SEP] operator[SEP] { identifier[ditaWriterFilter] operator[=] Keyword[new] identifier[DitaWriterFilter] operator[SEP] operator[SEP] operator[SEP] identifier[ditaWriterFilter] operator[SEP] identifier[setLogger] operator[SEP] identifier[logger] operator[SEP] operator[SEP] identifier[ditaWriterFilter] operator[SEP] identifier[setJob] operator[SEP] identifier[job] operator[SEP] operator[SEP] identifier[ditaWriterFilter] operator[SEP] identifier[setEntityResolver] operator[SEP] identifier[reader] operator[SEP] identifier[getEntityResolver] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[topicFragmentFilter] operator[=] Keyword[new] identifier[TopicFragmentFilter] operator[SEP] identifier[ATTRIBUTE_NAME_CONREF] , identifier[ATTRIBUTE_NAME_CONREFEND] operator[SEP] operator[SEP] identifier[tempFileNameScheme] operator[SEP] identifier[setBaseDir] operator[SEP] identifier[job] operator[SEP] identifier[getInputDir] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public DateTimeFormatterBuilder appendInstant(int fractionalDigits) { if (fractionalDigits < -1 || fractionalDigits > 9) { throw new IllegalArgumentException("Invalid fractional digits: " + fractionalDigits); } appendInternal(new InstantPrinterParser(fractionalDigits)); return this; }
class class_name[name] begin[{] method[appendInstant, return_type[type[DateTimeFormatterBuilder]], modifier[public], parameter[fractionalDigits]] begin[{] if[binary_operation[binary_operation[member[.fractionalDigits], <, literal[1]], ||, binary_operation[member[.fractionalDigits], >, literal[9]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid fractional digits: "), operandr=MemberReference(member=fractionalDigits, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] call[.appendInternal, parameter[ClassCreator(arguments=[MemberReference(member=fractionalDigits, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InstantPrinterParser, sub_type=None))]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[DateTimeFormatterBuilder] identifier[appendInstant] operator[SEP] Keyword[int] identifier[fractionalDigits] operator[SEP] { Keyword[if] operator[SEP] identifier[fractionalDigits] operator[<] operator[-] Other[1] operator[||] identifier[fractionalDigits] operator[>] Other[9] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[fractionalDigits] operator[SEP] operator[SEP] } identifier[appendInternal] operator[SEP] Keyword[new] identifier[InstantPrinterParser] operator[SEP] identifier[fractionalDigits] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
void formatFractionalSeconds(StringBuilder b, ZonedDateTime d, int width) { // format up to 9 digits at nanosecond resolution. int nano = d.getNano(); int f = 100000000; while (width > 0 && f > 0) { int digit = nano / f; nano -= (digit * f); f /= 10; b.append(digit); width--; } // fill out any trailing zeros if any are requested while (width > 0) { b.append('0'); width--; } }
class class_name[name] begin[{] method[formatFractionalSeconds, return_type[void], modifier[default], parameter[b, d, width]] begin[{] local_variable[type[int], nano] local_variable[type[int], f] while[binary_operation[binary_operation[member[.width], >, literal[0]], &&, binary_operation[member[.f], >, literal[0]]]] begin[{] local_variable[type[int], digit] assign[member[.nano], binary_operation[member[.digit], *, member[.f]]] assign[member[.f], literal[10]] call[b.append, parameter[member[.digit]]] member[.width] end[}] while[binary_operation[member[.width], >, literal[0]]] begin[{] call[b.append, parameter[literal['0']]] member[.width] end[}] end[}] END[}]
Keyword[void] identifier[formatFractionalSeconds] operator[SEP] identifier[StringBuilder] identifier[b] , identifier[ZonedDateTime] identifier[d] , Keyword[int] identifier[width] operator[SEP] { Keyword[int] identifier[nano] operator[=] identifier[d] operator[SEP] identifier[getNano] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[f] operator[=] Other[100000000] operator[SEP] Keyword[while] operator[SEP] identifier[width] operator[>] Other[0] operator[&&] identifier[f] operator[>] Other[0] operator[SEP] { Keyword[int] identifier[digit] operator[=] identifier[nano] operator[/] identifier[f] operator[SEP] identifier[nano] operator[-=] operator[SEP] identifier[digit] operator[*] identifier[f] operator[SEP] operator[SEP] identifier[f] operator[/=] Other[10] operator[SEP] identifier[b] operator[SEP] identifier[append] operator[SEP] identifier[digit] operator[SEP] operator[SEP] identifier[width] operator[--] operator[SEP] } Keyword[while] operator[SEP] identifier[width] operator[>] Other[0] operator[SEP] { identifier[b] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[width] operator[--] operator[SEP] } }
public WorkProcessor<Page> merge(List<Type> keyTypes, List<Type> allTypes, List<WorkProcessor<Page>> channels, DriverYieldSignal driverYieldSignal) { InterpretedHashGenerator hashGenerator = createHashGenerator(keyTypes); return mergeSortedPages( channels, createHashPageWithPositionComparator(hashGenerator), IntStream.range(0, allTypes.size()).boxed().collect(toImmutableList()), allTypes, keepSameHashValuesWithinSinglePage(hashGenerator), true, memoryContext, driverYieldSignal); }
class class_name[name] begin[{] method[merge, return_type[type[WorkProcessor]], modifier[public], parameter[keyTypes, allTypes, channels, driverYieldSignal]] begin[{] local_variable[type[InterpretedHashGenerator], hashGenerator] return[call[.mergeSortedPages, parameter[member[.channels], call[.createHashPageWithPositionComparator, parameter[member[.hashGenerator]]], call[IntStream.range, parameter[literal[0], call[allTypes.size, parameter[]]]], member[.allTypes], call[.keepSameHashValuesWithinSinglePage, parameter[member[.hashGenerator]]], literal[true], member[.memoryContext], member[.driverYieldSignal]]]] end[}] END[}]
Keyword[public] identifier[WorkProcessor] operator[<] identifier[Page] operator[>] identifier[merge] operator[SEP] identifier[List] operator[<] identifier[Type] operator[>] identifier[keyTypes] , identifier[List] operator[<] identifier[Type] operator[>] identifier[allTypes] , identifier[List] operator[<] identifier[WorkProcessor] operator[<] identifier[Page] operator[>] operator[>] identifier[channels] , identifier[DriverYieldSignal] identifier[driverYieldSignal] operator[SEP] { identifier[InterpretedHashGenerator] identifier[hashGenerator] operator[=] identifier[createHashGenerator] operator[SEP] identifier[keyTypes] operator[SEP] operator[SEP] Keyword[return] identifier[mergeSortedPages] operator[SEP] identifier[channels] , identifier[createHashPageWithPositionComparator] operator[SEP] identifier[hashGenerator] operator[SEP] , identifier[IntStream] operator[SEP] identifier[range] operator[SEP] Other[0] , identifier[allTypes] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[boxed] operator[SEP] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[toImmutableList] operator[SEP] operator[SEP] operator[SEP] , identifier[allTypes] , identifier[keepSameHashValuesWithinSinglePage] operator[SEP] identifier[hashGenerator] operator[SEP] , literal[boolean] , identifier[memoryContext] , identifier[driverYieldSignal] operator[SEP] operator[SEP] }
public void setBackgroundMode(boolean backgroundMode) { if (!isBleAvailableOrSimulated()) { LogManager.w(TAG, "Method invocation will be ignored."); return; } mBackgroundModeUninitialized = false; if (backgroundMode != mBackgroundMode) { mBackgroundMode = backgroundMode; try { this.updateScanPeriods(); } catch (RemoteException e) { LogManager.e(TAG, "Cannot contact service to set scan periods"); } } }
class class_name[name] begin[{] method[setBackgroundMode, return_type[void], modifier[public], parameter[backgroundMode]] begin[{] if[call[.isBleAvailableOrSimulated, parameter[]]] begin[{] call[LogManager.w, parameter[member[.TAG], literal["Method invocation will be ignored."]]] return[None] else begin[{] None end[}] assign[member[.mBackgroundModeUninitialized], literal[false]] if[binary_operation[member[.backgroundMode], !=, member[.mBackgroundMode]]] begin[{] assign[member[.mBackgroundMode], member[.backgroundMode]] TryStatement(block=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=updateScanPeriods, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TAG, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot contact service to set scan periods")], member=e, postfix_operators=[], prefix_operators=[], qualifier=LogManager, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['RemoteException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setBackgroundMode] operator[SEP] Keyword[boolean] identifier[backgroundMode] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[isBleAvailableOrSimulated] operator[SEP] operator[SEP] operator[SEP] { identifier[LogManager] operator[SEP] identifier[w] operator[SEP] identifier[TAG] , literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[mBackgroundModeUninitialized] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[backgroundMode] operator[!=] identifier[mBackgroundMode] operator[SEP] { identifier[mBackgroundMode] operator[=] identifier[backgroundMode] operator[SEP] Keyword[try] { Keyword[this] operator[SEP] identifier[updateScanPeriods] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[RemoteException] identifier[e] operator[SEP] { identifier[LogManager] operator[SEP] identifier[e] operator[SEP] identifier[TAG] , literal[String] operator[SEP] operator[SEP] } } }
public void importData(CmsImportParameters parameters) throws CmsImportExportException, CmsXmlException { boolean run = false; try { // now find the correct import implementation Iterator<I_CmsImport> i = m_importImplementations.iterator(); while (i.hasNext()) { I_CmsImport importVersion = i.next(); if (importVersion.matches(parameters)) { m_report.println( Messages.get().container( Messages.RPT_IMPORT_VERSION_1, String.valueOf(importVersion.getVersion())), I_CmsReport.FORMAT_NOTE); // this is the correct import version, so call it for the import process importVersion.importData(m_cms, m_report, parameters); OpenCms.fireCmsEvent(new CmsEvent(I_CmsEventListener.EVENT_FLEX_PURGE_JSP_REPOSITORY, null)); run = true; break; } } if (!run) { m_report.println( Messages.get().container(Messages.RPT_IMPORT_DB_NO_CLASS_1, parameters.getPath()), I_CmsReport.FORMAT_WARNING); } } finally { OpenCms.fireCmsEvent( new CmsEvent(I_CmsEventListener.EVENT_CLEAR_OFFLINE_CACHES, Collections.<String, Object> emptyMap())); } }
class class_name[name] begin[{] method[importData, return_type[void], modifier[public], parameter[parameters]] begin[{] local_variable[type[boolean], run] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=iterator, postfix_operators=[], prefix_operators=[], qualifier=m_importImplementations, selectors=[], type_arguments=None), name=i)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=I_CmsImport, sub_type=None))], dimensions=[], name=Iterator, sub_type=None)), WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=i, selectors=[], type_arguments=None), name=importVersion)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=I_CmsImport, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=parameters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=matches, postfix_operators=[], prefix_operators=[], qualifier=importVersion, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[MethodInvocation(arguments=[MemberReference(member=RPT_IMPORT_VERSION_1, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[]), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getVersion, postfix_operators=[], prefix_operators=[], qualifier=importVersion, selectors=[], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], member=container, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=FORMAT_NOTE, postfix_operators=[], prefix_operators=[], qualifier=I_CmsReport, selectors=[])], member=println, postfix_operators=[], prefix_operators=[], qualifier=m_report, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=m_cms, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=m_report, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=parameters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=importData, postfix_operators=[], prefix_operators=[], qualifier=importVersion, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=EVENT_FLEX_PURGE_JSP_REPOSITORY, postfix_operators=[], prefix_operators=[], qualifier=I_CmsEventListener, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CmsEvent, sub_type=None))], member=fireCmsEvent, postfix_operators=[], prefix_operators=[], qualifier=OpenCms, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=run, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), BreakStatement(goto=None, label=None)]))]), condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=i, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=run, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[MethodInvocation(arguments=[MemberReference(member=RPT_IMPORT_DB_NO_CLASS_1, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[]), MethodInvocation(arguments=[], member=getPath, postfix_operators=[], prefix_operators=[], qualifier=parameters, selectors=[], type_arguments=None)], member=container, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=FORMAT_WARNING, postfix_operators=[], prefix_operators=[], qualifier=I_CmsReport, selectors=[])], member=println, postfix_operators=[], prefix_operators=[], qualifier=m_report, selectors=[], type_arguments=None), label=None)]))], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=EVENT_CLEAR_OFFLINE_CACHES, postfix_operators=[], prefix_operators=[], qualifier=I_CmsEventListener, selectors=[]), MethodInvocation(arguments=[], member=Collections, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CmsEvent, sub_type=None))], member=fireCmsEvent, postfix_operators=[], prefix_operators=[], qualifier=OpenCms, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[importData] operator[SEP] identifier[CmsImportParameters] identifier[parameters] operator[SEP] Keyword[throws] identifier[CmsImportExportException] , identifier[CmsXmlException] { Keyword[boolean] identifier[run] operator[=] literal[boolean] operator[SEP] Keyword[try] { identifier[Iterator] operator[<] identifier[I_CmsImport] operator[>] identifier[i] operator[=] identifier[m_importImplementations] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[i] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[I_CmsImport] identifier[importVersion] operator[=] identifier[i] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[importVersion] operator[SEP] identifier[matches] operator[SEP] identifier[parameters] operator[SEP] operator[SEP] { identifier[m_report] operator[SEP] identifier[println] operator[SEP] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[container] operator[SEP] identifier[Messages] operator[SEP] identifier[RPT_IMPORT_VERSION_1] , identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[importVersion] operator[SEP] identifier[getVersion] operator[SEP] operator[SEP] operator[SEP] operator[SEP] , identifier[I_CmsReport] operator[SEP] identifier[FORMAT_NOTE] operator[SEP] operator[SEP] identifier[importVersion] operator[SEP] identifier[importData] operator[SEP] identifier[m_cms] , identifier[m_report] , identifier[parameters] operator[SEP] operator[SEP] identifier[OpenCms] operator[SEP] identifier[fireCmsEvent] operator[SEP] Keyword[new] identifier[CmsEvent] operator[SEP] identifier[I_CmsEventListener] operator[SEP] identifier[EVENT_FLEX_PURGE_JSP_REPOSITORY] , Other[null] operator[SEP] operator[SEP] operator[SEP] identifier[run] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] } } Keyword[if] operator[SEP] operator[!] identifier[run] operator[SEP] { identifier[m_report] operator[SEP] identifier[println] operator[SEP] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[container] operator[SEP] identifier[Messages] operator[SEP] identifier[RPT_IMPORT_DB_NO_CLASS_1] , identifier[parameters] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] , identifier[I_CmsReport] operator[SEP] identifier[FORMAT_WARNING] operator[SEP] operator[SEP] } } Keyword[finally] { identifier[OpenCms] operator[SEP] identifier[fireCmsEvent] operator[SEP] Keyword[new] identifier[CmsEvent] operator[SEP] identifier[I_CmsEventListener] operator[SEP] identifier[EVENT_CLEAR_OFFLINE_CACHES] , identifier[Collections] operator[SEP] operator[<] identifier[String] , identifier[Object] operator[>] identifier[emptyMap] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public Charge confirmCapture(final ConfirmCaptureParams params) throws OpenpayServiceException, ServiceUnavailableException { String path = String.format(CAPTURE_FOR_MERCHANT_PATH, this.getMerchantId(), params.getChargeId()); return this.getJsonClient().post(path, params.asMap(), Charge.class); }
class class_name[name] begin[{] method[confirmCapture, return_type[type[Charge]], modifier[public], parameter[params]] begin[{] local_variable[type[String], path] return[THIS[call[None.getJsonClient, parameter[]]call[None.post, parameter[member[.path], call[params.asMap, parameter[]], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Charge, sub_type=None))]]]] end[}] END[}]
Keyword[public] identifier[Charge] identifier[confirmCapture] operator[SEP] Keyword[final] identifier[ConfirmCaptureParams] identifier[params] operator[SEP] Keyword[throws] identifier[OpenpayServiceException] , identifier[ServiceUnavailableException] { identifier[String] identifier[path] operator[=] identifier[String] operator[SEP] identifier[format] operator[SEP] identifier[CAPTURE_FOR_MERCHANT_PATH] , Keyword[this] operator[SEP] identifier[getMerchantId] operator[SEP] operator[SEP] , identifier[params] operator[SEP] identifier[getChargeId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] identifier[getJsonClient] operator[SEP] operator[SEP] operator[SEP] identifier[post] operator[SEP] identifier[path] , identifier[params] operator[SEP] identifier[asMap] operator[SEP] operator[SEP] , identifier[Charge] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
JMFSchema findSchema(long schemaId) throws MessageStoreException { Long storeId = schemaIndex.get(Long.valueOf(schemaId)); if (storeId != null) { AbstractItem item = findById(storeId.longValue()); return ((SchemaStoreItem)item).getSchema(); } else throw new MessageStoreException("Schema not found in store: " + schemaId); }
class class_name[name] begin[{] method[findSchema, return_type[type[JMFSchema]], modifier[default], parameter[schemaId]] begin[{] local_variable[type[Long], storeId] if[binary_operation[member[.storeId], !=, literal[null]]] begin[{] local_variable[type[AbstractItem], item] return[Cast(expression=MemberReference(member=item, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=SchemaStoreItem, sub_type=None))] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Schema not found in store: "), operandr=MemberReference(member=schemaId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MessageStoreException, sub_type=None)), label=None) end[}] end[}] END[}]
identifier[JMFSchema] identifier[findSchema] operator[SEP] Keyword[long] identifier[schemaId] operator[SEP] Keyword[throws] identifier[MessageStoreException] { identifier[Long] identifier[storeId] operator[=] identifier[schemaIndex] operator[SEP] identifier[get] operator[SEP] identifier[Long] operator[SEP] identifier[valueOf] operator[SEP] identifier[schemaId] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[storeId] operator[!=] Other[null] operator[SEP] { identifier[AbstractItem] identifier[item] operator[=] identifier[findById] operator[SEP] identifier[storeId] operator[SEP] identifier[longValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] operator[SEP] identifier[SchemaStoreItem] operator[SEP] identifier[item] operator[SEP] operator[SEP] identifier[getSchema] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[throw] Keyword[new] identifier[MessageStoreException] operator[SEP] literal[String] operator[+] identifier[schemaId] operator[SEP] operator[SEP] }
@Api public void setVisible(boolean visible) { this.visible = visible; if (googleMap != null) { String mapsId = map.getRasterContext().getId(this); Element gmap = DOM.getElementById(mapsId); UIObject.setVisible(gmap, visible); if (tosGroup != null) { UIObject.setVisible(tosGroup, visible); } if (visible) { triggerResize(googleMap); } } }
class class_name[name] begin[{] method[setVisible, return_type[void], modifier[public], parameter[visible]] begin[{] assign[THIS[member[None.visible]], member[.visible]] if[binary_operation[member[.googleMap], !=, literal[null]]] begin[{] local_variable[type[String], mapsId] local_variable[type[Element], gmap] call[UIObject.setVisible, parameter[member[.gmap], member[.visible]]] if[binary_operation[member[.tosGroup], !=, literal[null]]] begin[{] call[UIObject.setVisible, parameter[member[.tosGroup], member[.visible]]] else begin[{] None end[}] if[member[.visible]] begin[{] call[.triggerResize, parameter[member[.googleMap]]] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Api] Keyword[public] Keyword[void] identifier[setVisible] operator[SEP] Keyword[boolean] identifier[visible] operator[SEP] { Keyword[this] operator[SEP] identifier[visible] operator[=] identifier[visible] operator[SEP] Keyword[if] operator[SEP] identifier[googleMap] operator[!=] Other[null] operator[SEP] { identifier[String] identifier[mapsId] operator[=] identifier[map] operator[SEP] identifier[getRasterContext] operator[SEP] operator[SEP] operator[SEP] identifier[getId] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[Element] identifier[gmap] operator[=] identifier[DOM] operator[SEP] identifier[getElementById] operator[SEP] identifier[mapsId] operator[SEP] operator[SEP] identifier[UIObject] operator[SEP] identifier[setVisible] operator[SEP] identifier[gmap] , identifier[visible] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tosGroup] operator[!=] Other[null] operator[SEP] { identifier[UIObject] operator[SEP] identifier[setVisible] operator[SEP] identifier[tosGroup] , identifier[visible] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[visible] operator[SEP] { identifier[triggerResize] operator[SEP] identifier[googleMap] operator[SEP] operator[SEP] } } }
public boolean add(T res) { if (_dupesChecker != null) { RepositoryResourceMatchingData matchingData = ((RepositoryResourceImpl) res).createMatchingData(); if (!_dupesChecker.contains(matchingData)) { _dupesChecker.add(matchingData); _backingCollection.add(res); return true; } else { return false; } } else { _backingCollection.add(res); return true; } }
class class_name[name] begin[{] method[add, return_type[type[boolean]], modifier[public], parameter[res]] begin[{] if[binary_operation[member[._dupesChecker], !=, literal[null]]] begin[{] local_variable[type[RepositoryResourceMatchingData], matchingData] if[call[_dupesChecker.contains, parameter[member[.matchingData]]]] begin[{] call[_dupesChecker.add, parameter[member[.matchingData]]] call[_backingCollection.add, parameter[member[.res]]] return[literal[true]] else begin[{] return[literal[false]] end[}] else begin[{] call[_backingCollection.add, parameter[member[.res]]] return[literal[true]] end[}] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[add] operator[SEP] identifier[T] identifier[res] operator[SEP] { Keyword[if] operator[SEP] identifier[_dupesChecker] operator[!=] Other[null] operator[SEP] { identifier[RepositoryResourceMatchingData] identifier[matchingData] operator[=] operator[SEP] operator[SEP] identifier[RepositoryResourceImpl] operator[SEP] identifier[res] operator[SEP] operator[SEP] identifier[createMatchingData] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[_dupesChecker] operator[SEP] identifier[contains] operator[SEP] identifier[matchingData] operator[SEP] operator[SEP] { identifier[_dupesChecker] operator[SEP] identifier[add] operator[SEP] identifier[matchingData] operator[SEP] operator[SEP] identifier[_backingCollection] operator[SEP] identifier[add] operator[SEP] identifier[res] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[else] { identifier[_backingCollection] operator[SEP] identifier[add] operator[SEP] identifier[res] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } }
private Type parseBracketedType(EnclosingScope scope) { int start = index; match(LeftBrace); Type type = parseType(scope); match(RightBrace); return type; }
class class_name[name] begin[{] method[parseBracketedType, return_type[type[Type]], modifier[private], parameter[scope]] begin[{] local_variable[type[int], start] call[.match, parameter[member[.LeftBrace]]] local_variable[type[Type], type] call[.match, parameter[member[.RightBrace]]] return[member[.type]] end[}] END[}]
Keyword[private] identifier[Type] identifier[parseBracketedType] operator[SEP] identifier[EnclosingScope] identifier[scope] operator[SEP] { Keyword[int] identifier[start] operator[=] identifier[index] operator[SEP] identifier[match] operator[SEP] identifier[LeftBrace] operator[SEP] operator[SEP] identifier[Type] identifier[type] operator[=] identifier[parseType] operator[SEP] identifier[scope] operator[SEP] operator[SEP] identifier[match] operator[SEP] identifier[RightBrace] operator[SEP] operator[SEP] Keyword[return] identifier[type] operator[SEP] }
public void init(TacoTangoDevice tacoDevice, String devname, String nethost) throws DevFailed { Except.throw_exception("Api_TacoFailed", "Taco protocol not supported.\n" + "Patch JTango.jar if Taco is needed.", "TacoTangoDeviceDAODefaultImpl.TacoTangoDeviceDAODefaultImpl(" + devname + ")"); }
class class_name[name] begin[{] method[init, return_type[void], modifier[public], parameter[tacoDevice, devname, nethost]] begin[{] call[Except.throw_exception, parameter[literal["Api_TacoFailed"], binary_operation[literal["Taco protocol not supported.\n"], +, literal["Patch JTango.jar if Taco is needed."]], binary_operation[binary_operation[literal["TacoTangoDeviceDAODefaultImpl.TacoTangoDeviceDAODefaultImpl("], +, member[.devname]], +, literal[")"]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[init] operator[SEP] identifier[TacoTangoDevice] identifier[tacoDevice] , identifier[String] identifier[devname] , identifier[String] identifier[nethost] operator[SEP] Keyword[throws] identifier[DevFailed] { identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , literal[String] operator[+] literal[String] , literal[String] operator[+] identifier[devname] operator[+] literal[String] operator[SEP] operator[SEP] }
@Override protected void doPaint(Graphics2D g, JComponent c, int width, int height, Object[] extendedCacheKeys) { switch (state) { case BACKGROUND_DISABLED: case BACKGROUND_ENABLED: case BACKGROUND_ENABLED_WINDOWNOTFOCUSED: paintBackgroundEnabled(g, c, width, height); paintMaximizeEnabled(g, c, width, height); break; case BACKGROUND_MOUSEOVER: case BACKGROUND_MOUSEOVER_WINDOWNOTFOCUSED: paintBackgroundHover(g, c, width, height); paintMaximizeHover(g, c, width, height); break; case BACKGROUND_PRESSED: case BACKGROUND_PRESSED_WINDOWNOTFOCUSED: paintBackgroundPressed(g, c, width, height); paintMaximizePressed(g, c, width, height); break; case BACKGROUND_MAXIMIZED_DISABLED: case BACKGROUND_MAXIMIZED_ENABLED: case BACKGROUND_MAXIMIZED_ENABLED_WINDOWNOTFOCUSED: paintBackgroundEnabled(g, c, width, height); paintRestoreEnabled(g, c, width, height); break; case BACKGROUND_MAXIMIZED_MOUSEOVER: case BACKGROUND_MAXIMIZED_MOUSEOVER_WINDOWNOTFOCUSED: paintBackgroundHover(g, c, width, height); paintRestoreHover(g, c, width, height); break; case BACKGROUND_MAXIMIZED_PRESSED: case BACKGROUND_MAXIMIZED_PRESSED_WINDOWNOTFOCUSED: paintBackgroundPressed(g, c, width, height); paintRestorePressed(g, c, width, height); break; } }
class class_name[name] begin[{] method[doPaint, return_type[void], modifier[protected], parameter[g, c, width, height, extendedCacheKeys]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['BACKGROUND_DISABLED', 'BACKGROUND_ENABLED', 'BACKGROUND_ENABLED_WINDOWNOTFOCUSED'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=g, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=height, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=paintBackgroundEnabled, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=g, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=height, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=paintMaximizeEnabled, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['BACKGROUND_MOUSEOVER', 'BACKGROUND_MOUSEOVER_WINDOWNOTFOCUSED'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=g, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=height, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=paintBackgroundHover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=g, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=height, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=paintMaximizeHover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['BACKGROUND_PRESSED', 'BACKGROUND_PRESSED_WINDOWNOTFOCUSED'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=g, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=height, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=paintBackgroundPressed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=g, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=height, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=paintMaximizePressed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['BACKGROUND_MAXIMIZED_DISABLED', 'BACKGROUND_MAXIMIZED_ENABLED', 'BACKGROUND_MAXIMIZED_ENABLED_WINDOWNOTFOCUSED'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=g, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=height, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=paintBackgroundEnabled, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=g, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=height, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=paintRestoreEnabled, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['BACKGROUND_MAXIMIZED_MOUSEOVER', 'BACKGROUND_MAXIMIZED_MOUSEOVER_WINDOWNOTFOCUSED'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=g, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=height, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=paintBackgroundHover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=g, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=height, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=paintRestoreHover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['BACKGROUND_MAXIMIZED_PRESSED', 'BACKGROUND_MAXIMIZED_PRESSED_WINDOWNOTFOCUSED'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=g, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=height, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=paintBackgroundPressed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=g, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=height, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=paintRestorePressed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[doPaint] operator[SEP] identifier[Graphics2D] identifier[g] , identifier[JComponent] identifier[c] , Keyword[int] identifier[width] , Keyword[int] identifier[height] , identifier[Object] operator[SEP] operator[SEP] identifier[extendedCacheKeys] operator[SEP] { Keyword[switch] operator[SEP] identifier[state] operator[SEP] { Keyword[case] identifier[BACKGROUND_DISABLED] operator[:] Keyword[case] identifier[BACKGROUND_ENABLED] operator[:] Keyword[case] identifier[BACKGROUND_ENABLED_WINDOWNOTFOCUSED] operator[:] identifier[paintBackgroundEnabled] operator[SEP] identifier[g] , identifier[c] , identifier[width] , identifier[height] operator[SEP] operator[SEP] identifier[paintMaximizeEnabled] operator[SEP] identifier[g] , identifier[c] , identifier[width] , identifier[height] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[BACKGROUND_MOUSEOVER] operator[:] Keyword[case] identifier[BACKGROUND_MOUSEOVER_WINDOWNOTFOCUSED] operator[:] identifier[paintBackgroundHover] operator[SEP] identifier[g] , identifier[c] , identifier[width] , identifier[height] operator[SEP] operator[SEP] identifier[paintMaximizeHover] operator[SEP] identifier[g] , identifier[c] , identifier[width] , identifier[height] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[BACKGROUND_PRESSED] operator[:] Keyword[case] identifier[BACKGROUND_PRESSED_WINDOWNOTFOCUSED] operator[:] identifier[paintBackgroundPressed] operator[SEP] identifier[g] , identifier[c] , identifier[width] , identifier[height] operator[SEP] operator[SEP] identifier[paintMaximizePressed] operator[SEP] identifier[g] , identifier[c] , identifier[width] , identifier[height] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[BACKGROUND_MAXIMIZED_DISABLED] operator[:] Keyword[case] identifier[BACKGROUND_MAXIMIZED_ENABLED] operator[:] Keyword[case] identifier[BACKGROUND_MAXIMIZED_ENABLED_WINDOWNOTFOCUSED] operator[:] identifier[paintBackgroundEnabled] operator[SEP] identifier[g] , identifier[c] , identifier[width] , identifier[height] operator[SEP] operator[SEP] identifier[paintRestoreEnabled] operator[SEP] identifier[g] , identifier[c] , identifier[width] , identifier[height] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[BACKGROUND_MAXIMIZED_MOUSEOVER] operator[:] Keyword[case] identifier[BACKGROUND_MAXIMIZED_MOUSEOVER_WINDOWNOTFOCUSED] operator[:] identifier[paintBackgroundHover] operator[SEP] identifier[g] , identifier[c] , identifier[width] , identifier[height] operator[SEP] operator[SEP] identifier[paintRestoreHover] operator[SEP] identifier[g] , identifier[c] , identifier[width] , identifier[height] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[BACKGROUND_MAXIMIZED_PRESSED] operator[:] Keyword[case] identifier[BACKGROUND_MAXIMIZED_PRESSED_WINDOWNOTFOCUSED] operator[:] identifier[paintBackgroundPressed] operator[SEP] identifier[g] , identifier[c] , identifier[width] , identifier[height] operator[SEP] operator[SEP] identifier[paintRestorePressed] operator[SEP] identifier[g] , identifier[c] , identifier[width] , identifier[height] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } }
public void run() { // need <bean id="..." class="org.esupportail.commons.context.ApplicationContextHolder" /> ApplicationContext applicationContext = ApplicationContextHolder.getContext(); SessionFactory sessionFactory = HibernateUtils.getSessionFactory(applicationContext); boolean participate = HibernateUtils.openSession(sessionFactory); try { if (logger.isDebugEnabled()) { logger.debug("Starting new Thread to manage ack with : " + " - smid : " + acknowledgment.getSmsId() + " - ack status : " + acknowledgment.getSmsStatus()); } // Send the ack to the business layer final AckManagerBusiness ackManagerBusiness = (AckManagerBusiness) applicationContext.getBean(ACK_BUSINESS_MGR_BEAN_NAME); ackManagerBusiness.manageAck(acknowledgment); // error case, rollback } catch (RuntimeException e) { logger.error("Catching exception in AckManagerThread, now rollback : ", e); throw e; // close the session every time } finally { HibernateUtils.closeSession(sessionFactory, participate); } }
class class_name[name] begin[{] method[run, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[ApplicationContext], applicationContext] local_variable[type[SessionFactory], sessionFactory] local_variable[type[boolean], participate] TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Starting new Thread to manage ack with : "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" - smid : "), operator=+), operandr=MethodInvocation(arguments=[], member=getSmsId, postfix_operators=[], prefix_operators=[], qualifier=acknowledgment, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" - ack status : "), operator=+), operandr=MethodInvocation(arguments=[], member=getSmsStatus, postfix_operators=[], prefix_operators=[], qualifier=acknowledgment, selectors=[], type_arguments=None), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=ACK_BUSINESS_MGR_BEAN_NAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getBean, postfix_operators=[], prefix_operators=[], qualifier=applicationContext, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=AckManagerBusiness, sub_type=None)), name=ackManagerBusiness)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=AckManagerBusiness, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=acknowledgment, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=manageAck, postfix_operators=[], prefix_operators=[], qualifier=ackManagerBusiness, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Catching exception in AckManagerThread, now rollback : "), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['RuntimeException']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sessionFactory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=participate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=closeSession, postfix_operators=[], prefix_operators=[], qualifier=HibernateUtils, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] { identifier[ApplicationContext] identifier[applicationContext] operator[=] identifier[ApplicationContextHolder] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] identifier[SessionFactory] identifier[sessionFactory] operator[=] identifier[HibernateUtils] operator[SEP] identifier[getSessionFactory] operator[SEP] identifier[applicationContext] operator[SEP] operator[SEP] Keyword[boolean] identifier[participate] operator[=] identifier[HibernateUtils] operator[SEP] identifier[openSession] operator[SEP] identifier[sessionFactory] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] literal[String] operator[+] identifier[acknowledgment] operator[SEP] identifier[getSmsId] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[acknowledgment] operator[SEP] identifier[getSmsStatus] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[AckManagerBusiness] identifier[ackManagerBusiness] operator[=] operator[SEP] identifier[AckManagerBusiness] operator[SEP] identifier[applicationContext] operator[SEP] identifier[getBean] operator[SEP] identifier[ACK_BUSINESS_MGR_BEAN_NAME] operator[SEP] operator[SEP] identifier[ackManagerBusiness] operator[SEP] identifier[manageAck] operator[SEP] identifier[acknowledgment] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[RuntimeException] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] identifier[e] operator[SEP] } Keyword[finally] { identifier[HibernateUtils] operator[SEP] identifier[closeSession] operator[SEP] identifier[sessionFactory] , identifier[participate] operator[SEP] operator[SEP] } }
public ImmutableSet<String> getFileAsStringSet(String param) throws IOException { return FileUtils.loadStringSet(Files.asCharSource(getExistingFile(param), Charsets.UTF_8)); }
class class_name[name] begin[{] method[getFileAsStringSet, return_type[type[ImmutableSet]], modifier[public], parameter[param]] begin[{] return[call[FileUtils.loadStringSet, parameter[call[Files.asCharSource, parameter[call[.getExistingFile, parameter[member[.param]]], member[Charsets.UTF_8]]]]]] end[}] END[}]
Keyword[public] identifier[ImmutableSet] operator[<] identifier[String] operator[>] identifier[getFileAsStringSet] operator[SEP] identifier[String] identifier[param] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[return] identifier[FileUtils] operator[SEP] identifier[loadStringSet] operator[SEP] identifier[Files] operator[SEP] identifier[asCharSource] operator[SEP] identifier[getExistingFile] operator[SEP] identifier[param] operator[SEP] , identifier[Charsets] operator[SEP] identifier[UTF_8] operator[SEP] operator[SEP] operator[SEP] }
private byte[] recvFromNodeCheckBigMsg(final NodeStruct node, final ReefNetworkGroupCommProtos.GroupCommMessage.Type msgType) { LOG.entering("OperatorTopologyStructImpl", "recvFromNodeCheckBigMsg", new Object[]{node, msgType}); byte[] retVal = receiveFromNode(node, false); if (retVal != null && retVal.length == 0) { LOG.finest(getQualifiedName() + " Got msg that node " + node.getId() + " has large data and is ready to send it. Sending ACK to receive data."); sendToNode(Utils.EMPTY_BYTE_ARR, msgType, node); retVal = receiveFromNode(node, true); if (retVal != null) { LOG.finest(getQualifiedName() + " Received large msg from node " + node.getId() + ". Will process it after ACKing."); sendToNode(Utils.EMPTY_BYTE_ARR, msgType, node); } else { LOG.warning(getQualifiedName() + "Expected large msg from node " + node.getId() + " but received nothing."); } } LOG.exiting("OperatorTopologyStructImpl", "recvFromNodeCheckBigMsg"); return retVal; }
class class_name[name] begin[{] method[recvFromNodeCheckBigMsg, return_type[type[byte]], modifier[private], parameter[node, msgType]] begin[{] call[LOG.entering, parameter[literal["OperatorTopologyStructImpl"], literal["recvFromNodeCheckBigMsg"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=msgType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]] local_variable[type[byte], retVal] if[binary_operation[binary_operation[member[.retVal], !=, literal[null]], &&, binary_operation[member[retVal.length], ==, literal[0]]]] begin[{] call[LOG.finest, parameter[binary_operation[binary_operation[binary_operation[call[.getQualifiedName, parameter[]], +, literal[" Got msg that node "]], +, call[node.getId, parameter[]]], +, literal[" has large data and is ready to send it. Sending ACK to receive data."]]]] call[.sendToNode, parameter[member[Utils.EMPTY_BYTE_ARR], member[.msgType], member[.node]]] assign[member[.retVal], call[.receiveFromNode, parameter[member[.node], literal[true]]]] if[binary_operation[member[.retVal], !=, literal[null]]] begin[{] call[LOG.finest, parameter[binary_operation[binary_operation[binary_operation[call[.getQualifiedName, parameter[]], +, literal[" Received large msg from node "]], +, call[node.getId, parameter[]]], +, literal[". Will process it after ACKing."]]]] call[.sendToNode, parameter[member[Utils.EMPTY_BYTE_ARR], member[.msgType], member[.node]]] else begin[{] call[LOG.warning, parameter[binary_operation[binary_operation[binary_operation[call[.getQualifiedName, parameter[]], +, literal["Expected large msg from node "]], +, call[node.getId, parameter[]]], +, literal[" but received nothing."]]]] end[}] else begin[{] None end[}] call[LOG.exiting, parameter[literal["OperatorTopologyStructImpl"], literal["recvFromNodeCheckBigMsg"]]] return[member[.retVal]] end[}] END[}]
Keyword[private] Keyword[byte] operator[SEP] operator[SEP] identifier[recvFromNodeCheckBigMsg] operator[SEP] Keyword[final] identifier[NodeStruct] identifier[node] , Keyword[final] identifier[ReefNetworkGroupCommProtos] operator[SEP] identifier[GroupCommMessage] operator[SEP] identifier[Type] identifier[msgType] operator[SEP] { identifier[LOG] operator[SEP] identifier[entering] operator[SEP] literal[String] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[node] , identifier[msgType] } operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[retVal] operator[=] identifier[receiveFromNode] operator[SEP] identifier[node] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[retVal] operator[!=] Other[null] operator[&&] identifier[retVal] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { identifier[LOG] operator[SEP] identifier[finest] operator[SEP] identifier[getQualifiedName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[node] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[sendToNode] operator[SEP] identifier[Utils] operator[SEP] identifier[EMPTY_BYTE_ARR] , identifier[msgType] , identifier[node] operator[SEP] operator[SEP] identifier[retVal] operator[=] identifier[receiveFromNode] operator[SEP] identifier[node] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[retVal] operator[!=] Other[null] operator[SEP] { identifier[LOG] operator[SEP] identifier[finest] operator[SEP] identifier[getQualifiedName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[node] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[sendToNode] operator[SEP] identifier[Utils] operator[SEP] identifier[EMPTY_BYTE_ARR] , identifier[msgType] , identifier[node] operator[SEP] operator[SEP] } Keyword[else] { identifier[LOG] operator[SEP] identifier[warning] operator[SEP] identifier[getQualifiedName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[node] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } } identifier[LOG] operator[SEP] identifier[exiting] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[retVal] operator[SEP] }
public void restoreState(FacesContext context, Object state) { if (context == null) { throw new NullPointerException(); } if (state == null) { return; } methodExpressionOneArg = (MethodExpression) ((Object[]) state)[0]; methodExpressionZeroArg = (MethodExpression) ((Object[]) state)[1]; }
class class_name[name] begin[{] method[restoreState, return_type[void], modifier[public], parameter[context, state]] begin[{] if[binary_operation[member[.context], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NullPointerException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.state], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] assign[member[.methodExpressionOneArg], Cast(expression=Cast(expression=MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[None], name=Object, sub_type=None)), type=ReferenceType(arguments=None, dimensions=[], name=MethodExpression, sub_type=None))] assign[member[.methodExpressionZeroArg], Cast(expression=Cast(expression=MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[None], name=Object, sub_type=None)), type=ReferenceType(arguments=None, dimensions=[], name=MethodExpression, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[void] identifier[restoreState] operator[SEP] identifier[FacesContext] identifier[context] , identifier[Object] identifier[state] operator[SEP] { Keyword[if] operator[SEP] identifier[context] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[state] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } identifier[methodExpressionOneArg] operator[=] operator[SEP] identifier[MethodExpression] operator[SEP] operator[SEP] operator[SEP] identifier[Object] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[methodExpressionZeroArg] operator[=] operator[SEP] identifier[MethodExpression] operator[SEP] operator[SEP] operator[SEP] identifier[Object] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] operator[SEP] Other[1] operator[SEP] operator[SEP] }
private ImmutableSubstitution<NonFunctionalTerm> selectDownSubstitution( ImmutableSubstitution<NonFunctionalTerm> simplificationSubstitution, ImmutableSet<Variable> rightVariables) { ImmutableMap<Variable, NonFunctionalTerm> newMap = simplificationSubstitution.getImmutableMap().entrySet().stream() .filter(e -> rightVariables.contains(e.getKey())) .collect(ImmutableCollectors.toMap()); return substitutionFactory.getSubstitution(newMap); }
class class_name[name] begin[{] method[selectDownSubstitution, return_type[type[ImmutableSubstitution]], modifier[private], parameter[simplificationSubstitution, rightVariables]] begin[{] local_variable[type[ImmutableMap], newMap] return[call[substitutionFactory.getSubstitution, parameter[member[.newMap]]]] end[}] END[}]
Keyword[private] identifier[ImmutableSubstitution] operator[<] identifier[NonFunctionalTerm] operator[>] identifier[selectDownSubstitution] operator[SEP] identifier[ImmutableSubstitution] operator[<] identifier[NonFunctionalTerm] operator[>] identifier[simplificationSubstitution] , identifier[ImmutableSet] operator[<] identifier[Variable] operator[>] identifier[rightVariables] operator[SEP] { identifier[ImmutableMap] operator[<] identifier[Variable] , identifier[NonFunctionalTerm] operator[>] identifier[newMap] operator[=] identifier[simplificationSubstitution] operator[SEP] identifier[getImmutableMap] operator[SEP] operator[SEP] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[e] operator[->] identifier[rightVariables] operator[SEP] identifier[contains] operator[SEP] identifier[e] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[ImmutableCollectors] operator[SEP] identifier[toMap] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[substitutionFactory] operator[SEP] identifier[getSubstitution] operator[SEP] identifier[newMap] operator[SEP] operator[SEP] }
@Override public void visit(final Trailer trailer) { final GedWriterLine line = new GedWriterLine(getLevel(), trailer, getLevel() + " TRLR"); getLines().add(line); handleChildren(trailer); }
class class_name[name] begin[{] method[visit, return_type[void], modifier[public], parameter[trailer]] begin[{] local_variable[type[GedWriterLine], line] call[.getLines, parameter[]] call[.handleChildren, parameter[member[.trailer]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[visit] operator[SEP] Keyword[final] identifier[Trailer] identifier[trailer] operator[SEP] { Keyword[final] identifier[GedWriterLine] identifier[line] operator[=] Keyword[new] identifier[GedWriterLine] operator[SEP] identifier[getLevel] operator[SEP] operator[SEP] , identifier[trailer] , identifier[getLevel] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[getLines] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[line] operator[SEP] operator[SEP] identifier[handleChildren] operator[SEP] identifier[trailer] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") @Override public EList<IfcDefinitionSelect> getRelatedObjects() { return (EList<IfcDefinitionSelect>) eGet(Ifc4Package.Literals.IFC_REL_ASSOCIATES__RELATED_OBJECTS, true); }
class class_name[name] begin[{] method[getRelatedObjects, return_type[type[EList]], modifier[public], parameter[]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=IFC_REL_ASSOCIATES__RELATED_OBJECTS, postfix_operators=[], prefix_operators=[], qualifier=Ifc4Package.Literals, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=eGet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=IfcDefinitionSelect, sub_type=None))], dimensions=[], name=EList, sub_type=None))] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[EList] operator[<] identifier[IfcDefinitionSelect] operator[>] identifier[getRelatedObjects] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] identifier[EList] operator[<] identifier[IfcDefinitionSelect] operator[>] operator[SEP] identifier[eGet] operator[SEP] identifier[Ifc4Package] operator[SEP] identifier[Literals] operator[SEP] identifier[IFC_REL_ASSOCIATES__RELATED_OBJECTS] , literal[boolean] operator[SEP] operator[SEP] }
public static void init(final String _appKey, final Set<UUID> _loginRoles) { if (AppAccessHandler.HANDLER == null) { AppAccessHandler.HANDLER = new AppAccessHandler(_appKey, _loginRoles); } }
class class_name[name] begin[{] method[init, return_type[void], modifier[public static], parameter[_appKey, _loginRoles]] begin[{] if[binary_operation[member[AppAccessHandler.HANDLER], ==, literal[null]]] begin[{] assign[member[AppAccessHandler.HANDLER], ClassCreator(arguments=[MemberReference(member=_appKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=_loginRoles, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AppAccessHandler, sub_type=None))] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[init] operator[SEP] Keyword[final] identifier[String] identifier[_appKey] , Keyword[final] identifier[Set] operator[<] identifier[UUID] operator[>] identifier[_loginRoles] operator[SEP] { Keyword[if] operator[SEP] identifier[AppAccessHandler] operator[SEP] identifier[HANDLER] operator[==] Other[null] operator[SEP] { identifier[AppAccessHandler] operator[SEP] identifier[HANDLER] operator[=] Keyword[new] identifier[AppAccessHandler] operator[SEP] identifier[_appKey] , identifier[_loginRoles] operator[SEP] operator[SEP] } }
public boolean setPageSize(Rectangle pageSize) { this.pageSize = pageSize; DocListener listener; for (Iterator iterator = listeners.iterator(); iterator.hasNext();) { listener = (DocListener) iterator.next(); listener.setPageSize(pageSize); } return true; }
class class_name[name] begin[{] method[setPageSize, return_type[type[boolean]], modifier[public], parameter[pageSize]] begin[{] assign[THIS[member[None.pageSize]], member[.pageSize]] local_variable[type[DocListener], listener] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=listener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=iterator, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=DocListener, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=pageSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setPageSize, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=iterator, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=iterator, postfix_operators=[], prefix_operators=[], qualifier=listeners, selectors=[], type_arguments=None), name=iterator)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Iterator, sub_type=None)), update=None), label=None) return[literal[true]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[setPageSize] operator[SEP] identifier[Rectangle] identifier[pageSize] operator[SEP] { Keyword[this] operator[SEP] identifier[pageSize] operator[=] identifier[pageSize] operator[SEP] identifier[DocListener] identifier[listener] operator[SEP] Keyword[for] operator[SEP] identifier[Iterator] identifier[iterator] operator[=] identifier[listeners] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[listener] operator[=] operator[SEP] identifier[DocListener] operator[SEP] identifier[iterator] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[listener] operator[SEP] identifier[setPageSize] operator[SEP] identifier[pageSize] operator[SEP] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public void addFeaturePath( String featurePath, String filter ) { if (!featurePaths.contains(featurePath)) { featurePaths.add(featurePath); if (filter == null) { filter = ""; } featureFilter.add(filter); } }
class class_name[name] begin[{] method[addFeaturePath, return_type[void], modifier[public], parameter[featurePath, filter]] begin[{] if[call[featurePaths.contains, parameter[member[.featurePath]]]] begin[{] call[featurePaths.add, parameter[member[.featurePath]]] if[binary_operation[member[.filter], ==, literal[null]]] begin[{] assign[member[.filter], literal[""]] else begin[{] None end[}] call[featureFilter.add, parameter[member[.filter]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[addFeaturePath] operator[SEP] identifier[String] identifier[featurePath] , identifier[String] identifier[filter] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[featurePaths] operator[SEP] identifier[contains] operator[SEP] identifier[featurePath] operator[SEP] operator[SEP] { identifier[featurePaths] operator[SEP] identifier[add] operator[SEP] identifier[featurePath] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[filter] operator[==] Other[null] operator[SEP] { identifier[filter] operator[=] literal[String] operator[SEP] } identifier[featureFilter] operator[SEP] identifier[add] operator[SEP] identifier[filter] operator[SEP] operator[SEP] } }
@Override public void destroy() { // Clean up any open resources. if (null != redisClient) { redisClient.disconnect(); redisClient.close(); redisClient = null; } super.destroy(); }
class class_name[name] begin[{] method[destroy, return_type[void], modifier[public], parameter[]] begin[{] if[binary_operation[literal[null], !=, member[.redisClient]]] begin[{] call[redisClient.disconnect, parameter[]] call[redisClient.close, parameter[]] assign[member[.redisClient], literal[null]] else begin[{] None end[}] SuperMethodInvocation(arguments=[], member=destroy, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[destroy] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[!=] identifier[redisClient] operator[SEP] { identifier[redisClient] operator[SEP] identifier[disconnect] operator[SEP] operator[SEP] operator[SEP] identifier[redisClient] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[redisClient] operator[=] Other[null] operator[SEP] } Keyword[super] operator[SEP] identifier[destroy] operator[SEP] operator[SEP] operator[SEP] }
private String getUrl() { MockWebServer mockWebServer = getSource(); if (!this.started) { intializeMockWebServer(mockWebServer); } String url = mockWebServer.url("").url().toExternalForm(); return url.substring(0, url.length() - 1); }
class class_name[name] begin[{] method[getUrl, return_type[type[String]], modifier[private], parameter[]] begin[{] local_variable[type[MockWebServer], mockWebServer] if[THIS[member[None.started]]] begin[{] call[.intializeMockWebServer, parameter[member[.mockWebServer]]] else begin[{] None end[}] local_variable[type[String], url] return[call[url.substring, parameter[literal[0], binary_operation[call[url.length, parameter[]], -, literal[1]]]]] end[}] END[}]
Keyword[private] identifier[String] identifier[getUrl] operator[SEP] operator[SEP] { identifier[MockWebServer] identifier[mockWebServer] operator[=] identifier[getSource] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] Keyword[this] operator[SEP] identifier[started] operator[SEP] { identifier[intializeMockWebServer] operator[SEP] identifier[mockWebServer] operator[SEP] operator[SEP] } identifier[String] identifier[url] operator[=] identifier[mockWebServer] operator[SEP] identifier[url] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[url] operator[SEP] operator[SEP] operator[SEP] identifier[toExternalForm] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[url] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[url] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] }
public static GoogleMapShape addShapeToMap(GoogleMap map, GoogleMapShape shape) { GoogleMapShape addedShape = null; switch (shape.getShapeType()) { case LAT_LNG: addedShape = new GoogleMapShape(shape.getGeometryType(), GoogleMapShapeType.MARKER, addLatLngToMap(map, (LatLng) shape.getShape())); break; case MARKER_OPTIONS: addedShape = new GoogleMapShape(shape.getGeometryType(), GoogleMapShapeType.MARKER, addMarkerOptionsToMap(map, (MarkerOptions) shape.getShape())); break; case POLYLINE_OPTIONS: addedShape = new GoogleMapShape(shape.getGeometryType(), GoogleMapShapeType.POLYLINE, addPolylineToMap(map, (PolylineOptions) shape.getShape())); break; case POLYGON_OPTIONS: addedShape = new GoogleMapShape(shape.getGeometryType(), GoogleMapShapeType.POLYGON, addPolygonToMap(map, (PolygonOptions) shape.getShape())); break; case MULTI_LAT_LNG: addedShape = new GoogleMapShape(shape.getGeometryType(), GoogleMapShapeType.MULTI_MARKER, addLatLngsToMap(map, (MultiLatLng) shape.getShape())); break; case MULTI_POLYLINE_OPTIONS: addedShape = new GoogleMapShape(shape.getGeometryType(), GoogleMapShapeType.MULTI_POLYLINE, addPolylinesToMap(map, (MultiPolylineOptions) shape.getShape())); break; case MULTI_POLYGON_OPTIONS: addedShape = new GoogleMapShape(shape.getGeometryType(), GoogleMapShapeType.MULTI_POLYGON, addPolygonsToMap(map, (MultiPolygonOptions) shape.getShape())); break; case COLLECTION: List<GoogleMapShape> addedShapeList = new ArrayList<GoogleMapShape>(); @SuppressWarnings("unchecked") List<GoogleMapShape> shapeList = (List<GoogleMapShape>) shape .getShape(); for (GoogleMapShape shapeListItem : shapeList) { addedShapeList.add(addShapeToMap(map, shapeListItem)); } addedShape = new GoogleMapShape(shape.getGeometryType(), GoogleMapShapeType.COLLECTION, addedShapeList); break; default: throw new GeoPackageException("Unsupported Shape Type: " + shape.getShapeType()); } return addedShape; }
class class_name[name] begin[{] method[addShapeToMap, return_type[type[GoogleMapShape]], modifier[public static], parameter[map, shape]] begin[{] local_variable[type[GoogleMapShape], addedShape] SwitchStatement(cases=[SwitchStatementCase(case=['LAT_LNG'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=addedShape, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getGeometryType, postfix_operators=[], prefix_operators=[], qualifier=shape, selectors=[], type_arguments=None), MemberReference(member=MARKER, postfix_operators=[], prefix_operators=[], qualifier=GoogleMapShapeType, selectors=[]), MethodInvocation(arguments=[MemberReference(member=map, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MethodInvocation(arguments=[], member=getShape, postfix_operators=[], prefix_operators=[], qualifier=shape, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=LatLng, sub_type=None))], member=addLatLngToMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GoogleMapShape, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['MARKER_OPTIONS'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=addedShape, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getGeometryType, postfix_operators=[], prefix_operators=[], qualifier=shape, selectors=[], type_arguments=None), MemberReference(member=MARKER, postfix_operators=[], prefix_operators=[], qualifier=GoogleMapShapeType, selectors=[]), MethodInvocation(arguments=[MemberReference(member=map, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MethodInvocation(arguments=[], member=getShape, postfix_operators=[], prefix_operators=[], qualifier=shape, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=MarkerOptions, sub_type=None))], member=addMarkerOptionsToMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GoogleMapShape, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['POLYLINE_OPTIONS'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=addedShape, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getGeometryType, postfix_operators=[], prefix_operators=[], qualifier=shape, selectors=[], type_arguments=None), MemberReference(member=POLYLINE, postfix_operators=[], prefix_operators=[], qualifier=GoogleMapShapeType, selectors=[]), MethodInvocation(arguments=[MemberReference(member=map, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MethodInvocation(arguments=[], member=getShape, postfix_operators=[], prefix_operators=[], qualifier=shape, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=PolylineOptions, sub_type=None))], member=addPolylineToMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GoogleMapShape, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['POLYGON_OPTIONS'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=addedShape, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getGeometryType, postfix_operators=[], prefix_operators=[], qualifier=shape, selectors=[], type_arguments=None), MemberReference(member=POLYGON, postfix_operators=[], prefix_operators=[], qualifier=GoogleMapShapeType, selectors=[]), MethodInvocation(arguments=[MemberReference(member=map, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MethodInvocation(arguments=[], member=getShape, postfix_operators=[], prefix_operators=[], qualifier=shape, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=PolygonOptions, sub_type=None))], member=addPolygonToMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GoogleMapShape, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['MULTI_LAT_LNG'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=addedShape, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getGeometryType, postfix_operators=[], prefix_operators=[], qualifier=shape, selectors=[], type_arguments=None), MemberReference(member=MULTI_MARKER, postfix_operators=[], prefix_operators=[], qualifier=GoogleMapShapeType, selectors=[]), MethodInvocation(arguments=[MemberReference(member=map, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MethodInvocation(arguments=[], member=getShape, postfix_operators=[], prefix_operators=[], qualifier=shape, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=MultiLatLng, sub_type=None))], member=addLatLngsToMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GoogleMapShape, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['MULTI_POLYLINE_OPTIONS'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=addedShape, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getGeometryType, postfix_operators=[], prefix_operators=[], qualifier=shape, selectors=[], type_arguments=None), MemberReference(member=MULTI_POLYLINE, postfix_operators=[], prefix_operators=[], qualifier=GoogleMapShapeType, selectors=[]), MethodInvocation(arguments=[MemberReference(member=map, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MethodInvocation(arguments=[], member=getShape, postfix_operators=[], prefix_operators=[], qualifier=shape, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=MultiPolylineOptions, sub_type=None))], member=addPolylinesToMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GoogleMapShape, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['MULTI_POLYGON_OPTIONS'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=addedShape, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getGeometryType, postfix_operators=[], prefix_operators=[], qualifier=shape, selectors=[], type_arguments=None), MemberReference(member=MULTI_POLYGON, postfix_operators=[], prefix_operators=[], qualifier=GoogleMapShapeType, selectors=[]), MethodInvocation(arguments=[MemberReference(member=map, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MethodInvocation(arguments=[], member=getShape, postfix_operators=[], prefix_operators=[], qualifier=shape, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=MultiPolygonOptions, sub_type=None))], member=addPolygonsToMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GoogleMapShape, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['COLLECTION'], statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=GoogleMapShape, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None)), name=addedShapeList)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=GoogleMapShape, sub_type=None))], dimensions=[], name=List, sub_type=None)), LocalVariableDeclaration(annotations=[Annotation(element=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="unchecked"), name=SuppressWarnings)], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=getShape, postfix_operators=[], prefix_operators=[], qualifier=shape, selectors=[], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=GoogleMapShape, sub_type=None))], dimensions=[], name=List, sub_type=None)), name=shapeList)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=GoogleMapShape, sub_type=None))], dimensions=[], name=List, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=map, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=shapeListItem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addShapeToMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=addedShapeList, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=shapeList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=shapeListItem)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=GoogleMapShape, sub_type=None))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=addedShape, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getGeometryType, postfix_operators=[], prefix_operators=[], qualifier=shape, selectors=[], type_arguments=None), MemberReference(member=COLLECTION, postfix_operators=[], prefix_operators=[], qualifier=GoogleMapShapeType, selectors=[]), MemberReference(member=addedShapeList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GoogleMapShape, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unsupported Shape Type: "), operandr=MethodInvocation(arguments=[], member=getShapeType, postfix_operators=[], prefix_operators=[], qualifier=shape, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GeoPackageException, sub_type=None)), label=None)])], expression=MethodInvocation(arguments=[], member=getShapeType, postfix_operators=[], prefix_operators=[], qualifier=shape, selectors=[], type_arguments=None), label=None) return[member[.addedShape]] end[}] END[}]
Keyword[public] Keyword[static] identifier[GoogleMapShape] identifier[addShapeToMap] operator[SEP] identifier[GoogleMap] identifier[map] , identifier[GoogleMapShape] identifier[shape] operator[SEP] { identifier[GoogleMapShape] identifier[addedShape] operator[=] Other[null] operator[SEP] Keyword[switch] operator[SEP] identifier[shape] operator[SEP] identifier[getShapeType] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] identifier[LAT_LNG] operator[:] identifier[addedShape] operator[=] Keyword[new] identifier[GoogleMapShape] operator[SEP] identifier[shape] operator[SEP] identifier[getGeometryType] operator[SEP] operator[SEP] , identifier[GoogleMapShapeType] operator[SEP] identifier[MARKER] , identifier[addLatLngToMap] operator[SEP] identifier[map] , operator[SEP] identifier[LatLng] operator[SEP] identifier[shape] operator[SEP] identifier[getShape] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[MARKER_OPTIONS] operator[:] identifier[addedShape] operator[=] Keyword[new] identifier[GoogleMapShape] operator[SEP] identifier[shape] operator[SEP] identifier[getGeometryType] operator[SEP] operator[SEP] , identifier[GoogleMapShapeType] operator[SEP] identifier[MARKER] , identifier[addMarkerOptionsToMap] operator[SEP] identifier[map] , operator[SEP] identifier[MarkerOptions] operator[SEP] identifier[shape] operator[SEP] identifier[getShape] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[POLYLINE_OPTIONS] operator[:] identifier[addedShape] operator[=] Keyword[new] identifier[GoogleMapShape] operator[SEP] identifier[shape] operator[SEP] identifier[getGeometryType] operator[SEP] operator[SEP] , identifier[GoogleMapShapeType] operator[SEP] identifier[POLYLINE] , identifier[addPolylineToMap] operator[SEP] identifier[map] , operator[SEP] identifier[PolylineOptions] operator[SEP] identifier[shape] operator[SEP] identifier[getShape] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[POLYGON_OPTIONS] operator[:] identifier[addedShape] operator[=] Keyword[new] identifier[GoogleMapShape] operator[SEP] identifier[shape] operator[SEP] identifier[getGeometryType] operator[SEP] operator[SEP] , identifier[GoogleMapShapeType] operator[SEP] identifier[POLYGON] , identifier[addPolygonToMap] operator[SEP] identifier[map] , operator[SEP] identifier[PolygonOptions] operator[SEP] identifier[shape] operator[SEP] identifier[getShape] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[MULTI_LAT_LNG] operator[:] identifier[addedShape] operator[=] Keyword[new] identifier[GoogleMapShape] operator[SEP] identifier[shape] operator[SEP] identifier[getGeometryType] operator[SEP] operator[SEP] , identifier[GoogleMapShapeType] operator[SEP] identifier[MULTI_MARKER] , identifier[addLatLngsToMap] operator[SEP] identifier[map] , operator[SEP] identifier[MultiLatLng] operator[SEP] identifier[shape] operator[SEP] identifier[getShape] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[MULTI_POLYLINE_OPTIONS] operator[:] identifier[addedShape] operator[=] Keyword[new] identifier[GoogleMapShape] operator[SEP] identifier[shape] operator[SEP] identifier[getGeometryType] operator[SEP] operator[SEP] , identifier[GoogleMapShapeType] operator[SEP] identifier[MULTI_POLYLINE] , identifier[addPolylinesToMap] operator[SEP] identifier[map] , operator[SEP] identifier[MultiPolylineOptions] operator[SEP] identifier[shape] operator[SEP] identifier[getShape] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[MULTI_POLYGON_OPTIONS] operator[:] identifier[addedShape] operator[=] Keyword[new] identifier[GoogleMapShape] operator[SEP] identifier[shape] operator[SEP] identifier[getGeometryType] operator[SEP] operator[SEP] , identifier[GoogleMapShapeType] operator[SEP] identifier[MULTI_POLYGON] , identifier[addPolygonsToMap] operator[SEP] identifier[map] , operator[SEP] identifier[MultiPolygonOptions] operator[SEP] identifier[shape] operator[SEP] identifier[getShape] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[COLLECTION] operator[:] identifier[List] operator[<] identifier[GoogleMapShape] operator[>] identifier[addedShapeList] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[GoogleMapShape] operator[>] operator[SEP] operator[SEP] operator[SEP] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[List] operator[<] identifier[GoogleMapShape] operator[>] identifier[shapeList] operator[=] operator[SEP] identifier[List] operator[<] identifier[GoogleMapShape] operator[>] operator[SEP] identifier[shape] operator[SEP] identifier[getShape] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[GoogleMapShape] identifier[shapeListItem] operator[:] identifier[shapeList] operator[SEP] { identifier[addedShapeList] operator[SEP] identifier[add] operator[SEP] identifier[addShapeToMap] operator[SEP] identifier[map] , identifier[shapeListItem] operator[SEP] operator[SEP] operator[SEP] } identifier[addedShape] operator[=] Keyword[new] identifier[GoogleMapShape] operator[SEP] identifier[shape] operator[SEP] identifier[getGeometryType] operator[SEP] operator[SEP] , identifier[GoogleMapShapeType] operator[SEP] identifier[COLLECTION] , identifier[addedShapeList] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[GeoPackageException] operator[SEP] literal[String] operator[+] identifier[shape] operator[SEP] identifier[getShapeType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[addedShape] operator[SEP] }
@Override public EClass getIfcEnergyMeasure() { if (ifcEnergyMeasureEClass == null) { ifcEnergyMeasureEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) .getEClassifiers().get(805); } return ifcEnergyMeasureEClass; }
class class_name[name] begin[{] method[getIfcEnergyMeasure, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcEnergyMeasureEClass], ==, literal[null]]] begin[{] assign[member[.ifcEnergyMeasureEClass], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=Ifc4Package, selectors=[])], member=getEPackage, postfix_operators=[], prefix_operators=[], qualifier=EPackage.Registry.INSTANCE, selectors=[MethodInvocation(arguments=[], member=getEClassifiers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=805)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=EClass, sub_type=None))] else begin[{] None end[}] return[member[.ifcEnergyMeasureEClass]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcEnergyMeasure] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcEnergyMeasureEClass] operator[==] Other[null] operator[SEP] { identifier[ifcEnergyMeasureEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[Ifc4Package] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[805] operator[SEP] operator[SEP] } Keyword[return] identifier[ifcEnergyMeasureEClass] operator[SEP] }
public static RealMatrix getColumRange (RealMatrix matrix, int start, int end) { return matrix.getSubMatrix(0, matrix.getRowDimension() - 1, start, end); }
class class_name[name] begin[{] method[getColumRange, return_type[type[RealMatrix]], modifier[public static], parameter[matrix, start, end]] begin[{] return[call[matrix.getSubMatrix, parameter[literal[0], binary_operation[call[matrix.getRowDimension, parameter[]], -, literal[1]], member[.start], member[.end]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[RealMatrix] identifier[getColumRange] operator[SEP] identifier[RealMatrix] identifier[matrix] , Keyword[int] identifier[start] , Keyword[int] identifier[end] operator[SEP] { Keyword[return] identifier[matrix] operator[SEP] identifier[getSubMatrix] operator[SEP] Other[0] , identifier[matrix] operator[SEP] identifier[getRowDimension] operator[SEP] operator[SEP] operator[-] Other[1] , identifier[start] , identifier[end] operator[SEP] operator[SEP] }
private boolean isInterruptTransitively(Throwable e) { do { if (e instanceof InterruptedException) { return true; } e = e.getCause(); } while (e != null); return false; }
class class_name[name] begin[{] method[isInterruptTransitively, return_type[type[boolean]], modifier[private], parameter[e]] begin[{] do[binary_operation[member[.e], !=, literal[null]]] begin[{] if[binary_operation[member[.e], instanceof, type[InterruptedException]]] begin[{] return[literal[true]] else begin[{] None end[}] assign[member[.e], call[e.getCause, parameter[]]] end[}] return[literal[false]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[isInterruptTransitively] operator[SEP] identifier[Throwable] identifier[e] operator[SEP] { Keyword[do] { Keyword[if] operator[SEP] identifier[e] Keyword[instanceof] identifier[InterruptedException] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[e] operator[=] identifier[e] operator[SEP] identifier[getCause] operator[SEP] operator[SEP] operator[SEP] } Keyword[while] operator[SEP] identifier[e] operator[!=] Other[null] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
private void startWorkerIfNeeded() { // Perform a compare-and-swap retry loop for synchronization to make sure we don't start more // workers than desired. int currentCount = mPendingWorkers.get(); while (currentCount < mMaxConcurrency) { int updatedCount = currentCount + 1; if (mPendingWorkers.compareAndSet(currentCount, updatedCount)) { // Start a new worker. FLog.v(TAG, "%s: starting worker %d of %d", mName, updatedCount, mMaxConcurrency); mExecutor.execute(mTaskRunner); break; } // else: compareAndSet failed due to race; snapshot the new count and try again FLog.v(TAG, "%s: race in startWorkerIfNeeded; retrying", mName); currentCount = mPendingWorkers.get(); } }
class class_name[name] begin[{] method[startWorkerIfNeeded, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[int], currentCount] while[binary_operation[member[.currentCount], <, member[.mMaxConcurrency]]] begin[{] local_variable[type[int], updatedCount] if[call[mPendingWorkers.compareAndSet, parameter[member[.currentCount], member[.updatedCount]]]] begin[{] call[FLog.v, parameter[member[.TAG], literal["%s: starting worker %d of %d"], member[.mName], member[.updatedCount], member[.mMaxConcurrency]]] call[mExecutor.execute, parameter[member[.mTaskRunner]]] BreakStatement(goto=None, label=None) else begin[{] None end[}] call[FLog.v, parameter[member[.TAG], literal["%s: race in startWorkerIfNeeded; retrying"], member[.mName]]] assign[member[.currentCount], call[mPendingWorkers.get, parameter[]]] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[startWorkerIfNeeded] operator[SEP] operator[SEP] { Keyword[int] identifier[currentCount] operator[=] identifier[mPendingWorkers] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[currentCount] operator[<] identifier[mMaxConcurrency] operator[SEP] { Keyword[int] identifier[updatedCount] operator[=] identifier[currentCount] operator[+] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[mPendingWorkers] operator[SEP] identifier[compareAndSet] operator[SEP] identifier[currentCount] , identifier[updatedCount] operator[SEP] operator[SEP] { identifier[FLog] operator[SEP] identifier[v] operator[SEP] identifier[TAG] , literal[String] , identifier[mName] , identifier[updatedCount] , identifier[mMaxConcurrency] operator[SEP] operator[SEP] identifier[mExecutor] operator[SEP] identifier[execute] operator[SEP] identifier[mTaskRunner] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } identifier[FLog] operator[SEP] identifier[v] operator[SEP] identifier[TAG] , literal[String] , identifier[mName] operator[SEP] operator[SEP] identifier[currentCount] operator[=] identifier[mPendingWorkers] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] } }
public Observable<Contacts> getCertificateContactsAsync(String vaultBaseUrl) { return getCertificateContactsWithServiceResponseAsync(vaultBaseUrl).map(new Func1<ServiceResponse<Contacts>, Contacts>() { @Override public Contacts call(ServiceResponse<Contacts> response) { return response.body(); } }); }
class class_name[name] begin[{] method[getCertificateContactsAsync, return_type[type[Observable]], modifier[public], parameter[vaultBaseUrl]] begin[{] return[call[.getCertificateContactsWithServiceResponseAsync, parameter[member[.vaultBaseUrl]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[Contacts] operator[>] identifier[getCertificateContactsAsync] operator[SEP] identifier[String] identifier[vaultBaseUrl] operator[SEP] { Keyword[return] identifier[getCertificateContactsWithServiceResponseAsync] operator[SEP] identifier[vaultBaseUrl] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[Contacts] operator[>] , identifier[Contacts] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Contacts] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[Contacts] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public ApiResponse<AllianceIconsResponse> getAlliancesAllianceIdIconsWithHttpInfo(Integer allianceId, String datasource, String ifNoneMatch) throws ApiException { com.squareup.okhttp.Call call = getAlliancesAllianceIdIconsValidateBeforeCall(allianceId, datasource, ifNoneMatch, null); Type localVarReturnType = new TypeToken<AllianceIconsResponse>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
class class_name[name] begin[{] method[getAlliancesAllianceIdIconsWithHttpInfo, return_type[type[ApiResponse]], modifier[public], parameter[allianceId, datasource, ifNoneMatch]] begin[{] local_variable[type[com], call] local_variable[type[Type], localVarReturnType] return[call[apiClient.execute, parameter[member[.call], member[.localVarReturnType]]]] end[}] END[}]
Keyword[public] identifier[ApiResponse] operator[<] identifier[AllianceIconsResponse] operator[>] identifier[getAlliancesAllianceIdIconsWithHttpInfo] operator[SEP] identifier[Integer] identifier[allianceId] , identifier[String] identifier[datasource] , identifier[String] identifier[ifNoneMatch] operator[SEP] Keyword[throws] identifier[ApiException] { identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Call] identifier[call] operator[=] identifier[getAlliancesAllianceIdIconsValidateBeforeCall] operator[SEP] identifier[allianceId] , identifier[datasource] , identifier[ifNoneMatch] , Other[null] operator[SEP] operator[SEP] identifier[Type] identifier[localVarReturnType] operator[=] Keyword[new] identifier[TypeToken] operator[<] identifier[AllianceIconsResponse] operator[>] operator[SEP] operator[SEP] { } operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[apiClient] operator[SEP] identifier[execute] operator[SEP] identifier[call] , identifier[localVarReturnType] operator[SEP] operator[SEP] }
public HollowHistoricalStateDataAccess createConsistentOrdinalHistoricalStateFromDoubleSnapshot(long version, HollowReadStateEngine previous) { return new HollowHistoricalStateDataAccess(totalHistory, version, previous, IdentityOrdinalRemapper.INSTANCE, Collections.<String, HollowHistoricalSchemaChange>emptyMap()); }
class class_name[name] begin[{] method[createConsistentOrdinalHistoricalStateFromDoubleSnapshot, return_type[type[HollowHistoricalStateDataAccess]], modifier[public], parameter[version, previous]] begin[{] return[ClassCreator(arguments=[MemberReference(member=totalHistory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=previous, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=INSTANCE, postfix_operators=[], prefix_operators=[], qualifier=IdentityOrdinalRemapper, selectors=[]), MethodInvocation(arguments=[], member=Collections, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=HollowHistoricalSchemaChange, sub_type=None))])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HollowHistoricalStateDataAccess, sub_type=None))] end[}] END[}]
Keyword[public] identifier[HollowHistoricalStateDataAccess] identifier[createConsistentOrdinalHistoricalStateFromDoubleSnapshot] operator[SEP] Keyword[long] identifier[version] , identifier[HollowReadStateEngine] identifier[previous] operator[SEP] { Keyword[return] Keyword[new] identifier[HollowHistoricalStateDataAccess] operator[SEP] identifier[totalHistory] , identifier[version] , identifier[previous] , identifier[IdentityOrdinalRemapper] operator[SEP] identifier[INSTANCE] , identifier[Collections] operator[SEP] operator[<] identifier[String] , identifier[HollowHistoricalSchemaChange] operator[>] identifier[emptyMap] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Nullable public static EmailAddress getAsEmailAddress (@Nullable final InternetAddress aInternetAddress) { return aInternetAddress == null ? null : new EmailAddress (aInternetAddress.getAddress (), aInternetAddress.getPersonal ()); }
class class_name[name] begin[{] method[getAsEmailAddress, return_type[type[EmailAddress]], modifier[public static], parameter[aInternetAddress]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=aInternetAddress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getAddress, postfix_operators=[], prefix_operators=[], qualifier=aInternetAddress, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getPersonal, postfix_operators=[], prefix_operators=[], qualifier=aInternetAddress, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=EmailAddress, sub_type=None)), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))] end[}] END[}]
annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[EmailAddress] identifier[getAsEmailAddress] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[InternetAddress] identifier[aInternetAddress] operator[SEP] { Keyword[return] identifier[aInternetAddress] operator[==] Other[null] operator[?] Other[null] operator[:] Keyword[new] identifier[EmailAddress] operator[SEP] identifier[aInternetAddress] operator[SEP] identifier[getAddress] operator[SEP] operator[SEP] , identifier[aInternetAddress] operator[SEP] identifier[getPersonal] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static Properties stringToProperties(String str, Properties props) { String[] propsStr = str.trim().split(",\\s*"); for (String term : propsStr) { int divLoc = term.indexOf('='); String key; String value; if (divLoc >= 0) { key = term.substring(0, divLoc).trim(); value = term.substring(divLoc + 1).trim(); } else { key = term.trim(); value = "true"; } props.setProperty(key, value); } return props; }
class class_name[name] begin[{] method[stringToProperties, return_type[type[Properties]], modifier[public static], parameter[str, props]] begin[{] local_variable[type[String], propsStr] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='=')], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=term, selectors=[], type_arguments=None), name=divLoc)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=divLoc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=trim, postfix_operators=[], prefix_operators=[], qualifier=term, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="true")), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=divLoc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=term, selectors=[MethodInvocation(arguments=[], member=trim, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=divLoc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=term, selectors=[MethodInvocation(arguments=[], member=trim, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setProperty, postfix_operators=[], prefix_operators=[], qualifier=props, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=propsStr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=term)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[member[.props]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Properties] identifier[stringToProperties] operator[SEP] identifier[String] identifier[str] , identifier[Properties] identifier[props] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[propsStr] operator[=] identifier[str] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[term] operator[:] identifier[propsStr] operator[SEP] { Keyword[int] identifier[divLoc] operator[=] identifier[term] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[key] operator[SEP] identifier[String] identifier[value] operator[SEP] Keyword[if] operator[SEP] identifier[divLoc] operator[>=] Other[0] operator[SEP] { identifier[key] operator[=] identifier[term] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[divLoc] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[value] operator[=] identifier[term] operator[SEP] identifier[substring] operator[SEP] identifier[divLoc] operator[+] Other[1] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[key] operator[=] identifier[term] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[value] operator[=] literal[String] operator[SEP] } identifier[props] operator[SEP] identifier[setProperty] operator[SEP] identifier[key] , identifier[value] operator[SEP] operator[SEP] } Keyword[return] identifier[props] operator[SEP] }
public Method getMethod(String name, Class... parameterTypes) throws NoSuchMethodException, SecurityException { _throw(); return null; }
class class_name[name] begin[{] method[getMethod, return_type[type[Method]], modifier[public], parameter[name, parameterTypes]] begin[{] call[._throw, parameter[]] return[literal[null]] end[}] END[}]
Keyword[public] identifier[Method] identifier[getMethod] operator[SEP] identifier[String] identifier[name] , identifier[Class] operator[...] identifier[parameterTypes] operator[SEP] Keyword[throws] identifier[NoSuchMethodException] , identifier[SecurityException] { identifier[_throw] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] }
private List<ClassName> enclosingClasses() { List<ClassName> result = new ArrayList<>(); for (ClassName c = this; c != null; c = c.enclosingClassName) { result.add(c); } Collections.reverse(result); return result; }
class class_name[name] begin[{] method[enclosingClasses, return_type[type[List]], modifier[private], parameter[]] begin[{] local_variable[type[List], result] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), name=c)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ClassName, sub_type=None)), update=[Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=enclosingClassName, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[]))]), label=None) call[Collections.reverse, parameter[member[.result]]] return[member[.result]] end[}] END[}]
Keyword[private] identifier[List] operator[<] identifier[ClassName] operator[>] identifier[enclosingClasses] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[ClassName] operator[>] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ClassName] identifier[c] operator[=] Keyword[this] operator[SEP] identifier[c] operator[!=] Other[null] operator[SEP] identifier[c] operator[=] identifier[c] operator[SEP] identifier[enclosingClassName] operator[SEP] { identifier[result] operator[SEP] identifier[add] operator[SEP] identifier[c] operator[SEP] operator[SEP] } identifier[Collections] operator[SEP] identifier[reverse] operator[SEP] identifier[result] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
protected boolean hasAttribute(List<Element> elements, String attributeName, boolean checkValue) { boolean hasAttribute = true; if (!checkValue) { for (Element e : elements) { hasAttribute = e.hasAttribute(attributeName) ? hasAttribute : false; } } else { String attributeValue = null; for (Element e : elements) { attributeValue = attributeValue == null ? e.getAttribute(attributeName) : attributeValue; hasAttribute = e.getAttribute(attributeName).equals(attributeValue) ? hasAttribute : false; } } return hasAttribute; }
class class_name[name] begin[{] method[hasAttribute, return_type[type[boolean]], modifier[protected], parameter[elements, attributeName, checkValue]] begin[{] local_variable[type[boolean], hasAttribute] if[member[.checkValue]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=hasAttribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=TernaryExpression(condition=MethodInvocation(arguments=[MemberReference(member=attributeName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=hasAttribute, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), if_true=MemberReference(member=hasAttribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=elements, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None))), label=None) else begin[{] local_variable[type[String], attributeValue] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=attributeValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=attributeValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MemberReference(member=attributeValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[MemberReference(member=attributeName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAttribute, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=hasAttribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=TernaryExpression(condition=MethodInvocation(arguments=[MemberReference(member=attributeName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAttribute, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[MethodInvocation(arguments=[MemberReference(member=attributeValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), if_true=MemberReference(member=hasAttribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=elements, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None))), label=None) end[}] return[member[.hasAttribute]] end[}] END[}]
Keyword[protected] Keyword[boolean] identifier[hasAttribute] operator[SEP] identifier[List] operator[<] identifier[Element] operator[>] identifier[elements] , identifier[String] identifier[attributeName] , Keyword[boolean] identifier[checkValue] operator[SEP] { Keyword[boolean] identifier[hasAttribute] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[checkValue] operator[SEP] { Keyword[for] operator[SEP] identifier[Element] identifier[e] operator[:] identifier[elements] operator[SEP] { identifier[hasAttribute] operator[=] identifier[e] operator[SEP] identifier[hasAttribute] operator[SEP] identifier[attributeName] operator[SEP] operator[?] identifier[hasAttribute] operator[:] literal[boolean] operator[SEP] } } Keyword[else] { identifier[String] identifier[attributeValue] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[Element] identifier[e] operator[:] identifier[elements] operator[SEP] { identifier[attributeValue] operator[=] identifier[attributeValue] operator[==] Other[null] operator[?] identifier[e] operator[SEP] identifier[getAttribute] operator[SEP] identifier[attributeName] operator[SEP] operator[:] identifier[attributeValue] operator[SEP] identifier[hasAttribute] operator[=] identifier[e] operator[SEP] identifier[getAttribute] operator[SEP] identifier[attributeName] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[attributeValue] operator[SEP] operator[?] identifier[hasAttribute] operator[:] literal[boolean] operator[SEP] } } Keyword[return] identifier[hasAttribute] operator[SEP] }
public void doLogin(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if (!common.checkPost(request, response)) return; String username = request.getParameter("username"); if (username == null) { response.sendError(400, "Missing field \"username\"."); return; } String usernameError = checkUsername(username); if (usernameError != null) { response.sendError(400, "Invalid username: " + usernameError); return; } // Lookup user. If the user doesn't exist, create it. User user; synchronized (common.userDb) { user = common.userDb.get(username); if (user == null) { user = new User(); user.username = username; user.dropboxAccessToken = null; common.userDb.put(user.username, user); common.saveUserDb(); } } request.getSession().setAttribute("logged-in-username", user.username); response.sendRedirect("/"); }
class class_name[name] begin[{] method[doLogin, return_type[void], modifier[public], parameter[request, response]] begin[{] if[call[common.checkPost, parameter[member[.request], member[.response]]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[String], username] if[binary_operation[member[.username], ==, literal[null]]] begin[{] call[response.sendError, parameter[literal[400], literal["Missing field \"username\"."]]] return[None] else begin[{] None end[}] local_variable[type[String], usernameError] if[binary_operation[member[.usernameError], !=, literal[null]]] begin[{] call[response.sendError, parameter[literal[400], binary_operation[literal["Invalid username: "], +, member[.usernameError]]]] return[None] else begin[{] None end[}] local_variable[type[User], user] SYNCHRONIZED[member[common.userDb]] BEGIN[{] assign[member[.user], call[common.userDb.get, parameter[member[.username]]]] if[binary_operation[member[.user], ==, literal[null]]] begin[{] assign[member[.user], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=User, sub_type=None))] assign[member[user.username], member[.username]] assign[member[user.dropboxAccessToken], literal[null]] call[common.userDb.put, parameter[member[user.username], member[.user]]] call[common.saveUserDb, parameter[]] else begin[{] None end[}] END[}] call[request.getSession, parameter[]] call[response.sendRedirect, parameter[literal["/"]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[doLogin] operator[SEP] identifier[HttpServletRequest] identifier[request] , identifier[HttpServletResponse] identifier[response] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ServletException] { Keyword[if] operator[SEP] operator[!] identifier[common] operator[SEP] identifier[checkPost] operator[SEP] identifier[request] , identifier[response] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[String] identifier[username] operator[=] identifier[request] operator[SEP] identifier[getParameter] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[username] operator[==] Other[null] operator[SEP] { identifier[response] operator[SEP] identifier[sendError] operator[SEP] Other[400] , literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[String] identifier[usernameError] operator[=] identifier[checkUsername] operator[SEP] identifier[username] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[usernameError] operator[!=] Other[null] operator[SEP] { identifier[response] operator[SEP] identifier[sendError] operator[SEP] Other[400] , literal[String] operator[+] identifier[usernameError] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[User] identifier[user] operator[SEP] Keyword[synchronized] operator[SEP] identifier[common] operator[SEP] identifier[userDb] operator[SEP] { identifier[user] operator[=] identifier[common] operator[SEP] identifier[userDb] operator[SEP] identifier[get] operator[SEP] identifier[username] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[user] operator[==] Other[null] operator[SEP] { identifier[user] operator[=] Keyword[new] identifier[User] operator[SEP] operator[SEP] operator[SEP] identifier[user] operator[SEP] identifier[username] operator[=] identifier[username] operator[SEP] identifier[user] operator[SEP] identifier[dropboxAccessToken] operator[=] Other[null] operator[SEP] identifier[common] operator[SEP] identifier[userDb] operator[SEP] identifier[put] operator[SEP] identifier[user] operator[SEP] identifier[username] , identifier[user] operator[SEP] operator[SEP] identifier[common] operator[SEP] identifier[saveUserDb] operator[SEP] operator[SEP] operator[SEP] } } identifier[request] operator[SEP] identifier[getSession] operator[SEP] operator[SEP] operator[SEP] identifier[setAttribute] operator[SEP] literal[String] , identifier[user] operator[SEP] identifier[username] operator[SEP] operator[SEP] identifier[response] operator[SEP] identifier[sendRedirect] operator[SEP] literal[String] operator[SEP] operator[SEP] }
public String convertIfcConstructionMaterialResourceTypeEnumToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); }
class class_name[name] begin[{] method[convertIfcConstructionMaterialResourceTypeEnumToString, return_type[type[String]], modifier[public], parameter[eDataType, instanceValue]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=instanceValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=instanceValue, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))] end[}] END[}]
Keyword[public] identifier[String] identifier[convertIfcConstructionMaterialResourceTypeEnumToString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[Object] identifier[instanceValue] operator[SEP] { Keyword[return] identifier[instanceValue] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[instanceValue] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public StringClauses append(String key, StringClauses subclauses) { Validate.notNull(StringUtil.trimToNull(key), "key must be a non-null, non-empty value"); key = StringUtil.trimToEmpty(key).toLowerCase(); if (clauses.containsKey(key)) { throw new IllegalArgumentException("Cannot add clause with key '" + key + "' because it is already defined"); } clauses.put(key, subclauses); return this; }
class class_name[name] begin[{] method[append, return_type[type[StringClauses]], modifier[public], parameter[key, subclauses]] begin[{] call[Validate.notNull, parameter[call[StringUtil.trimToNull, parameter[member[.key]]], literal["key must be a non-null, non-empty value"]]] assign[member[.key], call[StringUtil.trimToEmpty, parameter[member[.key]]]] if[call[clauses.containsKey, parameter[member[.key]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot add clause with key '"), operandr=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' because it is already defined"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] call[clauses.put, parameter[member[.key], member[.subclauses]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[StringClauses] identifier[append] operator[SEP] identifier[String] identifier[key] , identifier[StringClauses] identifier[subclauses] operator[SEP] { identifier[Validate] operator[SEP] identifier[notNull] operator[SEP] identifier[StringUtil] operator[SEP] identifier[trimToNull] operator[SEP] identifier[key] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[key] operator[=] identifier[StringUtil] operator[SEP] identifier[trimToEmpty] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[clauses] operator[SEP] identifier[containsKey] operator[SEP] identifier[key] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[key] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[clauses] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[subclauses] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public static final float toJulian(Date date) { Calendar c = Calendar.getInstance(); c.setTime(date); return toJulian(c); }
class class_name[name] begin[{] method[toJulian, return_type[type[float]], modifier[final public static], parameter[date]] begin[{] local_variable[type[Calendar], c] call[c.setTime, parameter[member[.date]]] return[call[.toJulian, parameter[member[.c]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[final] Keyword[float] identifier[toJulian] operator[SEP] identifier[Date] identifier[date] operator[SEP] { identifier[Calendar] identifier[c] operator[=] identifier[Calendar] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[c] operator[SEP] identifier[setTime] operator[SEP] identifier[date] operator[SEP] operator[SEP] Keyword[return] identifier[toJulian] operator[SEP] identifier[c] operator[SEP] operator[SEP] }
public void unproject(double x, double y, double z, double[] out) { glu.gluUnProject(x, y, z, modelview, 0, projection, 0, viewp, 0, out, 0); }
class class_name[name] begin[{] method[unproject, return_type[void], modifier[public], parameter[x, y, z, out]] begin[{] call[glu.gluUnProject, parameter[member[.x], member[.y], member[.z], member[.modelview], literal[0], member[.projection], literal[0], member[.viewp], literal[0], member[.out], literal[0]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[unproject] operator[SEP] Keyword[double] identifier[x] , Keyword[double] identifier[y] , Keyword[double] identifier[z] , Keyword[double] operator[SEP] operator[SEP] identifier[out] operator[SEP] { identifier[glu] operator[SEP] identifier[gluUnProject] operator[SEP] identifier[x] , identifier[y] , identifier[z] , identifier[modelview] , Other[0] , identifier[projection] , Other[0] , identifier[viewp] , Other[0] , identifier[out] , Other[0] operator[SEP] operator[SEP] }
public void updateNewModuleSelector() { ComboBox newModuleSelector = createModuleSelector(); ((AbstractLayout)(m_moduleSelector.getParent())).replaceComponent(m_moduleSelector, newModuleSelector); m_moduleSelector = newModuleSelector; m_moduleSelector.addValueChangeListener(new ValueChangeListener() { private static final long serialVersionUID = 1L; public void valueChange(ValueChangeEvent event) { String moduleName = (String)(event.getProperty().getValue()); addSelectableModule(moduleName); updateNewModuleSelector(); } }); }
class class_name[name] begin[{] method[updateNewModuleSelector, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[ComboBox], newModuleSelector] Cast(expression=MethodInvocation(arguments=[], member=getParent, postfix_operators=[], prefix_operators=[], qualifier=m_moduleSelector, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=AbstractLayout, sub_type=None)) assign[member[.m_moduleSelector], member[.newModuleSelector]] call[m_moduleSelector.addValueChangeListener, parameter[ClassCreator(arguments=[], body=[FieldDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1L), name=serialVersionUID)], documentation=None, modifiers={'final', 'private', 'static'}, type=BasicType(dimensions=[], name=long)), MethodDeclaration(annotations=[], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=getProperty, postfix_operators=[], prefix_operators=[], qualifier=event, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), name=moduleName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=moduleName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addSelectableModule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=updateNewModuleSelector, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=valueChange, parameters=[FormalParameter(annotations=[], modifiers=set(), name=event, type=ReferenceType(arguments=None, dimensions=[], name=ValueChangeEvent, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ValueChangeListener, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[void] identifier[updateNewModuleSelector] operator[SEP] operator[SEP] { identifier[ComboBox] identifier[newModuleSelector] operator[=] identifier[createModuleSelector] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[AbstractLayout] operator[SEP] operator[SEP] identifier[m_moduleSelector] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[replaceComponent] operator[SEP] identifier[m_moduleSelector] , identifier[newModuleSelector] operator[SEP] operator[SEP] identifier[m_moduleSelector] operator[=] identifier[newModuleSelector] operator[SEP] identifier[m_moduleSelector] operator[SEP] identifier[addValueChangeListener] operator[SEP] Keyword[new] identifier[ValueChangeListener] operator[SEP] operator[SEP] { Keyword[private] Keyword[static] Keyword[final] Keyword[long] identifier[serialVersionUID] operator[=] Other[1L] operator[SEP] Keyword[public] Keyword[void] identifier[valueChange] operator[SEP] identifier[ValueChangeEvent] identifier[event] operator[SEP] { identifier[String] identifier[moduleName] operator[=] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[event] operator[SEP] identifier[getProperty] operator[SEP] operator[SEP] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addSelectableModule] operator[SEP] identifier[moduleName] operator[SEP] operator[SEP] identifier[updateNewModuleSelector] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public void forward( ServletRequest request, ServletResponse response ) throws ServletException, IOException { ScopedRequestImpl scopedRequest = ( ScopedRequestImpl ) ScopedServletUtils.unwrapRequest( request ); assert scopedRequest != null : request.getClass().getName(); scopedRequest.setForwardedURI( _uri ); scopedRequest.doForward(); }
class class_name[name] begin[{] method[forward, return_type[void], modifier[public], parameter[request, response]] begin[{] local_variable[type[ScopedRequestImpl], scopedRequest] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=scopedRequest, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)) call[scopedRequest.setForwardedURI, parameter[member[._uri]]] call[scopedRequest.doForward, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[forward] operator[SEP] identifier[ServletRequest] identifier[request] , identifier[ServletResponse] identifier[response] operator[SEP] Keyword[throws] identifier[ServletException] , identifier[IOException] { identifier[ScopedRequestImpl] identifier[scopedRequest] operator[=] operator[SEP] identifier[ScopedRequestImpl] operator[SEP] identifier[ScopedServletUtils] operator[SEP] identifier[unwrapRequest] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[assert] identifier[scopedRequest] operator[!=] Other[null] operator[:] identifier[request] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[scopedRequest] operator[SEP] identifier[setForwardedURI] operator[SEP] identifier[_uri] operator[SEP] operator[SEP] identifier[scopedRequest] operator[SEP] identifier[doForward] operator[SEP] operator[SEP] operator[SEP] }