code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public ServiceFuture<Void> resizeAsync(String poolId, PoolResizeParameter poolResizeParameter, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromHeaderResponse(resizeWithServiceResponseAsync(poolId, poolResizeParameter), serviceCallback); }
class class_name[name] begin[{] method[resizeAsync, return_type[type[ServiceFuture]], modifier[public], parameter[poolId, poolResizeParameter, serviceCallback]] begin[{] return[call[ServiceFuture.fromHeaderResponse, parameter[call[.resizeWithServiceResponseAsync, parameter[member[.poolId], member[.poolResizeParameter]]], member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[Void] operator[>] identifier[resizeAsync] operator[SEP] identifier[String] identifier[poolId] , identifier[PoolResizeParameter] identifier[poolResizeParameter] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[Void] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromHeaderResponse] operator[SEP] identifier[resizeWithServiceResponseAsync] operator[SEP] identifier[poolId] , identifier[poolResizeParameter] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP] }
@Override public TopicSubscriber createSubscriber(Topic topic) throws JMSException { return createSubscriber(topic,null,false); }
class class_name[name] begin[{] method[createSubscriber, return_type[type[TopicSubscriber]], modifier[public], parameter[topic]] begin[{] return[call[.createSubscriber, parameter[member[.topic], literal[null], literal[false]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[TopicSubscriber] identifier[createSubscriber] operator[SEP] identifier[Topic] identifier[topic] operator[SEP] Keyword[throws] identifier[JMSException] { Keyword[return] identifier[createSubscriber] operator[SEP] identifier[topic] , Other[null] , literal[boolean] operator[SEP] operator[SEP] }
public Observable<ServiceResponseWithHeaders<Page<CloudJobSchedule>, JobScheduleListHeaders>> listNextWithServiceResponseAsync(final String nextPageLink, final JobScheduleListNextOptions jobScheduleListNextOptions) { return listNextSinglePageAsync(nextPageLink, jobScheduleListNextOptions) .concatMap(new Func1<ServiceResponseWithHeaders<Page<CloudJobSchedule>, JobScheduleListHeaders>, Observable<ServiceResponseWithHeaders<Page<CloudJobSchedule>, JobScheduleListHeaders>>>() { @Override public Observable<ServiceResponseWithHeaders<Page<CloudJobSchedule>, JobScheduleListHeaders>> call(ServiceResponseWithHeaders<Page<CloudJobSchedule>, JobScheduleListHeaders> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink, jobScheduleListNextOptions)); } }); }
class class_name[name] begin[{] method[listNextWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[nextPageLink, jobScheduleListNextOptions]] begin[{] return[call[.listNextSinglePageAsync, parameter[member[.nextPageLink], member[.jobScheduleListNextOptions]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponseWithHeaders] operator[<] identifier[Page] operator[<] identifier[CloudJobSchedule] operator[>] , identifier[JobScheduleListHeaders] operator[>] operator[>] identifier[listNextWithServiceResponseAsync] operator[SEP] Keyword[final] identifier[String] identifier[nextPageLink] , Keyword[final] identifier[JobScheduleListNextOptions] identifier[jobScheduleListNextOptions] operator[SEP] { Keyword[return] identifier[listNextSinglePageAsync] operator[SEP] identifier[nextPageLink] , identifier[jobScheduleListNextOptions] operator[SEP] operator[SEP] identifier[concatMap] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponseWithHeaders] operator[<] identifier[Page] operator[<] identifier[CloudJobSchedule] operator[>] , identifier[JobScheduleListHeaders] operator[>] , identifier[Observable] operator[<] identifier[ServiceResponseWithHeaders] operator[<] identifier[Page] operator[<] identifier[CloudJobSchedule] operator[>] , identifier[JobScheduleListHeaders] operator[>] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponseWithHeaders] operator[<] identifier[Page] operator[<] identifier[CloudJobSchedule] operator[>] , identifier[JobScheduleListHeaders] operator[>] operator[>] identifier[call] operator[SEP] identifier[ServiceResponseWithHeaders] operator[<] identifier[Page] operator[<] identifier[CloudJobSchedule] operator[>] , identifier[JobScheduleListHeaders] operator[>] identifier[page] operator[SEP] { identifier[String] identifier[nextPageLink] operator[=] identifier[page] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] identifier[nextPageLink] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nextPageLink] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[Observable] operator[SEP] identifier[just] operator[SEP] identifier[page] operator[SEP] operator[SEP] } Keyword[return] identifier[Observable] operator[SEP] identifier[just] operator[SEP] identifier[page] operator[SEP] operator[SEP] identifier[concatWith] operator[SEP] identifier[listNextWithServiceResponseAsync] operator[SEP] identifier[nextPageLink] , identifier[jobScheduleListNextOptions] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
private static String getVersionFromPom() { final String absolutePath = new File(BuildVersion.class.getResource(BuildVersion.class .getSimpleName() + ".class").getPath()) .getParentFile().getParentFile().getParentFile().getParentFile().getParentFile() .getParentFile().getParentFile().getAbsolutePath(); final File file = new File(absolutePath + "/pom.xml"); try (InputStreamReader reader = new InputStreamReader(new FileInputStream(file), StandardCharsets.UTF_8)) { final MavenXpp3Reader xpp3Reader = new MavenXpp3Reader(); Model model = xpp3Reader.read(reader); return model.getVersion(); } catch (NoClassDefFoundError e) { // if you want to get the version possibly in development add in to your pom // pax-url-aether.jar return null; } catch (Exception e) { return null; } }
class class_name[name] begin[{] method[getVersionFromPom, return_type[type[String]], modifier[private static], parameter[]] begin[{] local_variable[type[String], absolutePath] local_variable[type[File], file] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MavenXpp3Reader, sub_type=None)), name=xpp3Reader)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=MavenXpp3Reader, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=xpp3Reader, selectors=[], type_arguments=None), name=model)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Model, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[], member=getVersion, postfix_operators=[], prefix_operators=[], qualifier=model, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['NoClassDefFoundError'])), CatchClause(block=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=reader, type=ReferenceType(arguments=None, dimensions=[], name=InputStreamReader, sub_type=None), value=ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=file, 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=FileInputStream, sub_type=None)), 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=InputStreamReader, sub_type=None)))]) end[}] END[}]
Keyword[private] Keyword[static] identifier[String] identifier[getVersionFromPom] operator[SEP] operator[SEP] { Keyword[final] identifier[String] identifier[absolutePath] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[BuildVersion] operator[SEP] Keyword[class] operator[SEP] identifier[getResource] operator[SEP] identifier[BuildVersion] operator[SEP] Keyword[class] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getParentFile] operator[SEP] operator[SEP] operator[SEP] identifier[getParentFile] operator[SEP] operator[SEP] operator[SEP] identifier[getParentFile] operator[SEP] operator[SEP] operator[SEP] identifier[getParentFile] operator[SEP] operator[SEP] operator[SEP] identifier[getParentFile] operator[SEP] operator[SEP] operator[SEP] identifier[getParentFile] operator[SEP] operator[SEP] operator[SEP] identifier[getParentFile] operator[SEP] operator[SEP] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[File] identifier[file] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[absolutePath] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[try] operator[SEP] identifier[InputStreamReader] identifier[reader] operator[=] Keyword[new] identifier[InputStreamReader] operator[SEP] Keyword[new] identifier[FileInputStream] operator[SEP] identifier[file] operator[SEP] , identifier[StandardCharsets] operator[SEP] identifier[UTF_8] operator[SEP] operator[SEP] { Keyword[final] identifier[MavenXpp3Reader] identifier[xpp3Reader] operator[=] Keyword[new] identifier[MavenXpp3Reader] operator[SEP] operator[SEP] operator[SEP] identifier[Model] identifier[model] operator[=] identifier[xpp3Reader] operator[SEP] identifier[read] operator[SEP] identifier[reader] operator[SEP] operator[SEP] Keyword[return] identifier[model] operator[SEP] identifier[getVersion] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NoClassDefFoundError] identifier[e] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[return] Other[null] operator[SEP] } }
public static Integer[] valuesOf(int[] array) { Integer[] dest = new Integer[array.length]; for (int i = 0; i < array.length; i++) { dest[i] = Integer.valueOf(array[i]); } return dest; }
class class_name[name] begin[{] method[valuesOf, return_type[type[Integer]], modifier[public static], parameter[array]] begin[{] local_variable[type[Integer], dest] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dest, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Integer, 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=array, 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[.dest]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Integer] operator[SEP] operator[SEP] identifier[valuesOf] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[array] operator[SEP] { identifier[Integer] operator[SEP] operator[SEP] identifier[dest] operator[=] Keyword[new] identifier[Integer] operator[SEP] identifier[array] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[array] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[dest] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[array] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[dest] operator[SEP] }
@Override public void run() { try { waitUntilServerIsInitialized(); recoveryLog.log("Start recovery."); while (true) { if (shutdown) { break; } ConsumerJournalEntry cje = reader.readJournalEntry(); if (cje == null) { break; } cje.invokeMethod(delegate, recoveryLog); cje.close(); } reader.shutdown(); recoveryLog.log("Recovery complete."); } catch (Throwable e) { /* * It makes sense to catch Exception here, because any uncaught * exception will not be reported - there is no console to print the * stack trace! It might not be appropriate to catch Throwable, but * it's the only way we can know about missing class files and such. * Of course, if we catch an OutOfMemoryError or a * VirtualMachineError, all bets are off. */ logger.error("Error during Journal recovery", e); String stackTrace = JournalHelper.captureStackTrace(e); recoveryLog.log("PROBLEM: " + stackTrace); recoveryLog.log("Recovery terminated prematurely."); } finally { recoveryLog.shutdown(); } }
class class_name[name] begin[{] method[run, return_type[void], modifier[public], parameter[]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=waitUntilServerIsInitialized, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Start recovery.")], member=log, postfix_operators=[], prefix_operators=[], qualifier=recoveryLog, selectors=[], type_arguments=None), label=None), WhileStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=shutdown, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=readJournalEntry, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None), name=cje)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ConsumerJournalEntry, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=cje, 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=[BreakStatement(goto=None, label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=delegate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=recoveryLog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=invokeMethod, postfix_operators=[], prefix_operators=[], qualifier=cje, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=cje, selectors=[], type_arguments=None), label=None)]), condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=shutdown, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Recovery complete.")], member=log, postfix_operators=[], prefix_operators=[], qualifier=recoveryLog, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error during Journal recovery"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=captureStackTrace, postfix_operators=[], prefix_operators=[], qualifier=JournalHelper, selectors=[], type_arguments=None), name=stackTrace)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="PROBLEM: "), operandr=MemberReference(member=stackTrace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=log, postfix_operators=[], prefix_operators=[], qualifier=recoveryLog, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Recovery terminated prematurely.")], member=log, postfix_operators=[], prefix_operators=[], qualifier=recoveryLog, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Throwable']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=shutdown, postfix_operators=[], prefix_operators=[], qualifier=recoveryLog, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] { Keyword[try] { identifier[waitUntilServerIsInitialized] operator[SEP] operator[SEP] operator[SEP] identifier[recoveryLog] operator[SEP] identifier[log] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[while] operator[SEP] literal[boolean] operator[SEP] { Keyword[if] operator[SEP] identifier[shutdown] operator[SEP] { Keyword[break] operator[SEP] } identifier[ConsumerJournalEntry] identifier[cje] operator[=] identifier[reader] operator[SEP] identifier[readJournalEntry] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cje] operator[==] Other[null] operator[SEP] { Keyword[break] operator[SEP] } identifier[cje] operator[SEP] identifier[invokeMethod] operator[SEP] identifier[delegate] , identifier[recoveryLog] operator[SEP] operator[SEP] identifier[cje] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } identifier[reader] operator[SEP] identifier[shutdown] operator[SEP] operator[SEP] operator[SEP] identifier[recoveryLog] operator[SEP] identifier[log] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] identifier[String] identifier[stackTrace] operator[=] identifier[JournalHelper] operator[SEP] identifier[captureStackTrace] operator[SEP] identifier[e] operator[SEP] operator[SEP] identifier[recoveryLog] operator[SEP] identifier[log] operator[SEP] literal[String] operator[+] identifier[stackTrace] operator[SEP] operator[SEP] identifier[recoveryLog] operator[SEP] identifier[log] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[finally] { identifier[recoveryLog] operator[SEP] identifier[shutdown] operator[SEP] operator[SEP] operator[SEP] } }
public Graphics2D renderContent() { View view = null; ViewFactory factory = getEditorKit().getViewFactory(); if (factory instanceof SwingBoxViewFactory) { view = ((SwingBoxViewFactory) factory).getViewport(); } if (view != null) { int w = (int) view.getPreferredSpan(View.X_AXIS); int h = (int) view.getPreferredSpan(View.Y_AXIS); Rectangle rec = new Rectangle(w, h); BufferedImage img = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB); Graphics2D g = img.createGraphics(); g.setClip(rec); view.paint(g, rec); return g; } return null; }
class class_name[name] begin[{] method[renderContent, return_type[type[Graphics2D]], modifier[public], parameter[]] begin[{] local_variable[type[View], view] local_variable[type[ViewFactory], factory] if[binary_operation[member[.factory], instanceof, type[SwingBoxViewFactory]]] begin[{] assign[member[.view], Cast(expression=MemberReference(member=factory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=SwingBoxViewFactory, sub_type=None))] else begin[{] None end[}] if[binary_operation[member[.view], !=, literal[null]]] begin[{] local_variable[type[int], w] local_variable[type[int], h] local_variable[type[Rectangle], rec] local_variable[type[BufferedImage], img] local_variable[type[Graphics2D], g] call[g.setClip, parameter[member[.rec]]] call[view.paint, parameter[member[.g], member[.rec]]] return[member[.g]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[public] identifier[Graphics2D] identifier[renderContent] operator[SEP] operator[SEP] { identifier[View] identifier[view] operator[=] Other[null] operator[SEP] identifier[ViewFactory] identifier[factory] operator[=] identifier[getEditorKit] operator[SEP] operator[SEP] operator[SEP] identifier[getViewFactory] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[factory] Keyword[instanceof] identifier[SwingBoxViewFactory] operator[SEP] { identifier[view] operator[=] operator[SEP] operator[SEP] identifier[SwingBoxViewFactory] operator[SEP] identifier[factory] operator[SEP] operator[SEP] identifier[getViewport] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[view] operator[!=] Other[null] operator[SEP] { Keyword[int] identifier[w] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[view] operator[SEP] identifier[getPreferredSpan] operator[SEP] identifier[View] operator[SEP] identifier[X_AXIS] operator[SEP] operator[SEP] Keyword[int] identifier[h] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[view] operator[SEP] identifier[getPreferredSpan] operator[SEP] identifier[View] operator[SEP] identifier[Y_AXIS] operator[SEP] operator[SEP] identifier[Rectangle] identifier[rec] operator[=] Keyword[new] identifier[Rectangle] operator[SEP] identifier[w] , identifier[h] operator[SEP] operator[SEP] identifier[BufferedImage] identifier[img] operator[=] Keyword[new] identifier[BufferedImage] operator[SEP] identifier[w] , identifier[h] , identifier[BufferedImage] operator[SEP] identifier[TYPE_INT_RGB] operator[SEP] operator[SEP] identifier[Graphics2D] identifier[g] operator[=] identifier[img] operator[SEP] identifier[createGraphics] operator[SEP] operator[SEP] operator[SEP] identifier[g] operator[SEP] identifier[setClip] operator[SEP] identifier[rec] operator[SEP] operator[SEP] identifier[view] operator[SEP] identifier[paint] operator[SEP] identifier[g] , identifier[rec] operator[SEP] operator[SEP] Keyword[return] identifier[g] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
private void setFormat() { if(getMinorTickSpacing() == (int) getMinorTickSpacing()){ format = "%.0f"; } else { // BigDecimal dec = new BigDecimal(getMinorTickSpacing()); // String s = String.valueOf(getMinorTickSpacing()); // int precision = s.substring(s.lastIndexOf('.')+1).length(); // format = FormatUtils.getFloatFormat(precision); format = FormatUtils.getFloatFormat(MathUtils.getRHD(minorTickSpacing)); } }
class class_name[name] begin[{] method[setFormat, return_type[void], modifier[private], parameter[]] begin[{] if[binary_operation[call[.getMinorTickSpacing, parameter[]], ==, Cast(expression=MethodInvocation(arguments=[], member=getMinorTickSpacing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int))]] begin[{] assign[member[.format], literal["%.0f"]] else begin[{] assign[member[.format], call[FormatUtils.getFloatFormat, parameter[call[MathUtils.getRHD, parameter[member[.minorTickSpacing]]]]]] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[setFormat] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[getMinorTickSpacing] operator[SEP] operator[SEP] operator[==] operator[SEP] Keyword[int] operator[SEP] identifier[getMinorTickSpacing] operator[SEP] operator[SEP] operator[SEP] { identifier[format] operator[=] literal[String] operator[SEP] } Keyword[else] { identifier[format] operator[=] identifier[FormatUtils] operator[SEP] identifier[getFloatFormat] operator[SEP] identifier[MathUtils] operator[SEP] identifier[getRHD] operator[SEP] identifier[minorTickSpacing] operator[SEP] operator[SEP] operator[SEP] } }
@Nonnull public static <T> LObjDblConsumerBuilder<T> objDblConsumer(Consumer<LObjDblConsumer<T>> consumer) { return new LObjDblConsumerBuilder(consumer); }
class class_name[name] begin[{] method[objDblConsumer, return_type[type[LObjDblConsumerBuilder]], modifier[public static], parameter[consumer]] begin[{] return[ClassCreator(arguments=[MemberReference(member=consumer, 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=LObjDblConsumerBuilder, sub_type=None))] end[}] END[}]
annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[LObjDblConsumerBuilder] operator[<] identifier[T] operator[>] identifier[objDblConsumer] operator[SEP] identifier[Consumer] operator[<] identifier[LObjDblConsumer] operator[<] identifier[T] operator[>] operator[>] identifier[consumer] operator[SEP] { Keyword[return] Keyword[new] identifier[LObjDblConsumerBuilder] operator[SEP] identifier[consumer] operator[SEP] operator[SEP] }
public TableWriteItems addHashAndRangePrimaryKeysToDelete( String hashKeyName, String rangeKeyName, Object ... alternatingHashRangeKeyValues) { if (alternatingHashRangeKeyValues.length % 2 != 0) { throw new IllegalArgumentException( "The multiple hash and range key values must alternate"); } for (int i =0; i < alternatingHashRangeKeyValues.length; i+=2) { Object hashKeyValue = alternatingHashRangeKeyValues[i]; Object rangeKeyValue = alternatingHashRangeKeyValues[i+1]; this.addPrimaryKeyToDelete( new PrimaryKey() .addComponent(hashKeyName, hashKeyValue) .addComponent(rangeKeyName, rangeKeyValue) ); } return this; }
class class_name[name] begin[{] method[addHashAndRangePrimaryKeysToDelete, return_type[type[TableWriteItems]], modifier[public], parameter[hashKeyName, rangeKeyName, alternatingHashRangeKeyValues]] begin[{] if[binary_operation[binary_operation[member[alternatingHashRangeKeyValues.length], %, literal[2]], !=, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The multiple hash and range key values must alternate")], 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[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=alternatingHashRangeKeyValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=hashKeyValue)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=alternatingHashRangeKeyValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), name=rangeKeyValue)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=hashKeyName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=hashKeyValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addComponent, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=rangeKeyName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rangeKeyValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addComponent, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=PrimaryKey, sub_type=None))], member=addPrimaryKeyToDelete, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, 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=alternatingHashRangeKeyValues, 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=[Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2))]), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[TableWriteItems] identifier[addHashAndRangePrimaryKeysToDelete] operator[SEP] identifier[String] identifier[hashKeyName] , identifier[String] identifier[rangeKeyName] , identifier[Object] operator[...] identifier[alternatingHashRangeKeyValues] operator[SEP] { Keyword[if] operator[SEP] identifier[alternatingHashRangeKeyValues] operator[SEP] identifier[length] operator[%] Other[2] operator[!=] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[alternatingHashRangeKeyValues] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[+=] Other[2] operator[SEP] { identifier[Object] identifier[hashKeyValue] operator[=] identifier[alternatingHashRangeKeyValues] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[Object] identifier[rangeKeyValue] operator[=] identifier[alternatingHashRangeKeyValues] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[addPrimaryKeyToDelete] operator[SEP] Keyword[new] identifier[PrimaryKey] operator[SEP] operator[SEP] operator[SEP] identifier[addComponent] operator[SEP] identifier[hashKeyName] , identifier[hashKeyValue] operator[SEP] operator[SEP] identifier[addComponent] operator[SEP] identifier[rangeKeyName] , identifier[rangeKeyValue] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public ScreenComponent setupDefaultView(ScreenLoc itsLocation, ComponentParent targetScreen, Convert converter, int iDisplayFieldDesc, Map<String, Object> properties) { converter = new DateConverter((Converter)converter, DBConstants.DATE_FORMAT); return super.setupDefaultView(itsLocation, targetScreen, converter, iDisplayFieldDesc, properties); }
class class_name[name] begin[{] method[setupDefaultView, return_type[type[ScreenComponent]], modifier[public], parameter[itsLocation, targetScreen, converter, iDisplayFieldDesc, properties]] begin[{] assign[member[.converter], ClassCreator(arguments=[Cast(expression=MemberReference(member=converter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Converter, sub_type=None)), MemberReference(member=DATE_FORMAT, postfix_operators=[], prefix_operators=[], qualifier=DBConstants, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DateConverter, sub_type=None))] return[SuperMethodInvocation(arguments=[MemberReference(member=itsLocation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=targetScreen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=converter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=iDisplayFieldDesc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=properties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setupDefaultView, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] END[}]
Keyword[public] identifier[ScreenComponent] identifier[setupDefaultView] operator[SEP] identifier[ScreenLoc] identifier[itsLocation] , identifier[ComponentParent] identifier[targetScreen] , identifier[Convert] identifier[converter] , Keyword[int] identifier[iDisplayFieldDesc] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[properties] operator[SEP] { identifier[converter] operator[=] Keyword[new] identifier[DateConverter] operator[SEP] operator[SEP] identifier[Converter] operator[SEP] identifier[converter] , identifier[DBConstants] operator[SEP] identifier[DATE_FORMAT] operator[SEP] operator[SEP] Keyword[return] Keyword[super] operator[SEP] identifier[setupDefaultView] operator[SEP] identifier[itsLocation] , identifier[targetScreen] , identifier[converter] , identifier[iDisplayFieldDesc] , identifier[properties] operator[SEP] operator[SEP] }
public Vector3f rotateAxis(float angle, float x, float y, float z) { return rotateAxis(angle, x, y, z, thisOrNew()); }
class class_name[name] begin[{] method[rotateAxis, return_type[type[Vector3f]], modifier[public], parameter[angle, x, y, z]] begin[{] return[call[.rotateAxis, parameter[member[.angle], member[.x], member[.y], member[.z], call[.thisOrNew, parameter[]]]]] end[}] END[}]
Keyword[public] identifier[Vector3f] identifier[rotateAxis] operator[SEP] Keyword[float] identifier[angle] , Keyword[float] identifier[x] , Keyword[float] identifier[y] , Keyword[float] identifier[z] operator[SEP] { Keyword[return] identifier[rotateAxis] operator[SEP] identifier[angle] , identifier[x] , identifier[y] , identifier[z] , identifier[thisOrNew] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
protected RegistryAuth registryAuth() throws MojoExecutionException { if (settings != null && serverId != null) { final Server server = settings.getServer(serverId); if (server != null) { final RegistryAuth.Builder registryAuthBuilder = RegistryAuth.builder(); final String username = server.getUsername(); String password = server.getPassword(); if (secDispatcher != null) { try { password = secDispatcher.decrypt(password); } catch (SecDispatcherException ex) { throw new MojoExecutionException("Cannot decrypt password from settings", ex); } } final String email = getEmail(server); if (!isNullOrEmpty(username)) { registryAuthBuilder.username(username); } if (!isNullOrEmpty(email)) { registryAuthBuilder.email(email); } if (!isNullOrEmpty(password)) { registryAuthBuilder.password(password); } if (!isNullOrEmpty(registryUrl)) { registryAuthBuilder.serverAddress(registryUrl); } return registryAuthBuilder.build(); } else { // settings.xml has no entry for the configured serverId, warn the user getLog().warn("No entry found in settings.xml for serverId=" + serverId + ", cannot configure authentication for that registry"); } } return null; }
class class_name[name] begin[{] method[registryAuth, return_type[type[RegistryAuth]], modifier[protected], parameter[]] begin[{] if[binary_operation[binary_operation[member[.settings], !=, literal[null]], &&, binary_operation[member[.serverId], !=, literal[null]]]] begin[{] local_variable[type[Server], server] if[binary_operation[member[.server], !=, literal[null]]] begin[{] local_variable[type[RegistryAuth], registryAuthBuilder] local_variable[type[String], username] local_variable[type[String], password] if[binary_operation[member[.secDispatcher], !=, literal[null]]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=password, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=password, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=decrypt, postfix_operators=[], prefix_operators=[], qualifier=secDispatcher, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot decrypt password from settings"), 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=MojoExecutionException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['SecDispatcherException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] local_variable[type[String], email] if[call[.isNullOrEmpty, parameter[member[.username]]]] begin[{] call[registryAuthBuilder.username, parameter[member[.username]]] else begin[{] None end[}] if[call[.isNullOrEmpty, parameter[member[.email]]]] begin[{] call[registryAuthBuilder.email, parameter[member[.email]]] else begin[{] None end[}] if[call[.isNullOrEmpty, parameter[member[.password]]]] begin[{] call[registryAuthBuilder.password, parameter[member[.password]]] else begin[{] None end[}] if[call[.isNullOrEmpty, parameter[member[.registryUrl]]]] begin[{] call[registryAuthBuilder.serverAddress, parameter[member[.registryUrl]]] else begin[{] None end[}] return[call[registryAuthBuilder.build, parameter[]]] else begin[{] call[.getLog, parameter[]] end[}] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[protected] identifier[RegistryAuth] identifier[registryAuth] operator[SEP] operator[SEP] Keyword[throws] identifier[MojoExecutionException] { Keyword[if] operator[SEP] identifier[settings] operator[!=] Other[null] operator[&&] identifier[serverId] operator[!=] Other[null] operator[SEP] { Keyword[final] identifier[Server] identifier[server] operator[=] identifier[settings] operator[SEP] identifier[getServer] operator[SEP] identifier[serverId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[server] operator[!=] Other[null] operator[SEP] { Keyword[final] identifier[RegistryAuth] operator[SEP] identifier[Builder] identifier[registryAuthBuilder] operator[=] identifier[RegistryAuth] operator[SEP] identifier[builder] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[username] operator[=] identifier[server] operator[SEP] identifier[getUsername] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[password] operator[=] identifier[server] operator[SEP] identifier[getPassword] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[secDispatcher] operator[!=] Other[null] operator[SEP] { Keyword[try] { identifier[password] operator[=] identifier[secDispatcher] operator[SEP] identifier[decrypt] operator[SEP] identifier[password] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SecDispatcherException] identifier[ex] operator[SEP] { Keyword[throw] Keyword[new] identifier[MojoExecutionException] operator[SEP] literal[String] , identifier[ex] operator[SEP] operator[SEP] } } Keyword[final] identifier[String] identifier[email] operator[=] identifier[getEmail] operator[SEP] identifier[server] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isNullOrEmpty] operator[SEP] identifier[username] operator[SEP] operator[SEP] { identifier[registryAuthBuilder] operator[SEP] identifier[username] operator[SEP] identifier[username] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[isNullOrEmpty] operator[SEP] identifier[email] operator[SEP] operator[SEP] { identifier[registryAuthBuilder] operator[SEP] identifier[email] operator[SEP] identifier[email] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[isNullOrEmpty] operator[SEP] identifier[password] operator[SEP] operator[SEP] { identifier[registryAuthBuilder] operator[SEP] identifier[password] operator[SEP] identifier[password] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[isNullOrEmpty] operator[SEP] identifier[registryUrl] operator[SEP] operator[SEP] { identifier[registryAuthBuilder] operator[SEP] identifier[serverAddress] operator[SEP] identifier[registryUrl] operator[SEP] operator[SEP] } Keyword[return] identifier[registryAuthBuilder] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[serverId] operator[+] literal[String] operator[SEP] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
private Polygon parsePolygon(ValueGetter data, boolean haveZ, boolean haveM, int srid) { int holecount = data.getInt() - 1; LinearRing[] rings = new LinearRing[holecount]; LinearRing shell = this.parseLinearRing(data, haveZ, haveM); shell.setSRID(srid); for(int i = 0; i < holecount; ++i) { rings[i] = this.parseLinearRing(data, haveZ, haveM); rings[i].setSRID(srid); } return JtsGeometry.geofac.createPolygon(shell, rings); }
class class_name[name] begin[{] method[parsePolygon, return_type[type[Polygon]], modifier[private], parameter[data, haveZ, haveM, srid]] begin[{] local_variable[type[int], holecount] local_variable[type[LinearRing], rings] local_variable[type[LinearRing], shell] call[shell.setSRID, parameter[member[.srid]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=rings, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=haveZ, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=haveM, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseLinearRing, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])), label=None), StatementExpression(expression=MemberReference(member=rings, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[MemberReference(member=srid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setSRID, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=holecount, postfix_operators=[], prefix_operators=[], qualifier=, 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[JtsGeometry.geofac.createPolygon, parameter[member[.shell], member[.rings]]]] end[}] END[}]
Keyword[private] identifier[Polygon] identifier[parsePolygon] operator[SEP] identifier[ValueGetter] identifier[data] , Keyword[boolean] identifier[haveZ] , Keyword[boolean] identifier[haveM] , Keyword[int] identifier[srid] operator[SEP] { Keyword[int] identifier[holecount] operator[=] identifier[data] operator[SEP] identifier[getInt] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] identifier[LinearRing] operator[SEP] operator[SEP] identifier[rings] operator[=] Keyword[new] identifier[LinearRing] operator[SEP] identifier[holecount] operator[SEP] operator[SEP] identifier[LinearRing] identifier[shell] operator[=] Keyword[this] operator[SEP] identifier[parseLinearRing] operator[SEP] identifier[data] , identifier[haveZ] , identifier[haveM] operator[SEP] operator[SEP] identifier[shell] operator[SEP] identifier[setSRID] operator[SEP] identifier[srid] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[holecount] operator[SEP] operator[++] identifier[i] operator[SEP] { identifier[rings] operator[SEP] identifier[i] operator[SEP] operator[=] Keyword[this] operator[SEP] identifier[parseLinearRing] operator[SEP] identifier[data] , identifier[haveZ] , identifier[haveM] operator[SEP] operator[SEP] identifier[rings] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[setSRID] operator[SEP] identifier[srid] operator[SEP] operator[SEP] } Keyword[return] identifier[JtsGeometry] operator[SEP] identifier[geofac] operator[SEP] identifier[createPolygon] operator[SEP] identifier[shell] , identifier[rings] operator[SEP] operator[SEP] }
protected final JSerializerType getKeySerializerFromType( JType type, boolean subtype, boolean useDefault ) throws UnsupportedTypeException, UnableToCompleteException { JSerializerType.Builder builder = new JSerializerType.Builder().type( type ); if ( null != type.isWildcard() ) { // For wildcard type, we use the base type to find the serializer. type = type.isWildcard().getBaseType(); } if ( null != type.isRawType() ) { // For raw type, we use the base type to find the serializer. type = type.isRawType().getBaseType(); } JTypeParameter typeParameter = type.isTypeParameter(); if ( null != typeParameter ) { // It's a type parameter like T in 'MyClass<T>' if ( !subtype || typeParameter.getDeclaringClass() == getMapperInfo().get().getType() ) { // The serializer is created for the main type so we use the serializer field declared for this type. return builder.instance( CodeBlock.builder() .add( String.format( TYPE_PARAMETER_SERIALIZER_FIELD_NAME, typeParameter.getOrdinal() ) ) .add( ".key()" ) .build() ) .build(); } else { // There is no declared serializer so we use the base type to find a serializer. type = typeParameter.getBaseType(); } } Optional<MapperInstance> keySerializer = configuration.getKeySerializer( type ); if ( keySerializer.isPresent() ) { // The type is configured in AbstractConfiguration. if ( null != type.isParameterized() || null != type.isGenericType() ) { JClassType[] typeArgs; if ( null != type.isGenericType() ) { typeArgs = type.isGenericType().asParameterizedByWildcards().getTypeArgs(); } else { typeArgs = type.isParameterized().getTypeArgs(); } ImmutableList.Builder<JSerializerType> parametersSerializerBuilder = ImmutableList.builder(); for ( int i = 0; i < typeArgs.length; i++ ) { JSerializerType parameterSerializerType; if ( keySerializer.get().getParameters().length <= i ) { break; } if ( MapperType.KEY_SERIALIZER == keySerializer.get().getParameters()[i] ) { parameterSerializerType = getKeySerializerFromType( typeArgs[i] ); } else { parameterSerializerType = getJsonSerializerFromType( typeArgs[i], subtype ); } parametersSerializerBuilder.add( parameterSerializerType ); } ImmutableList<JSerializerType> parametersSerializer = parametersSerializerBuilder.build(); builder.parameters( parametersSerializer ); builder.instance( methodCallCodeWithJMapperTypeParameters( keySerializer.get(), parametersSerializer ) ); } else { // The serializer has no parameters. builder.instance( methodCallCode( keySerializer.get() ) ); } return builder.build(); } if ( typeOracle.isEnum( type ) || typeOracle.isEnumSupertype( type ) ) { keySerializer = configuration.getKeySerializer( typeOracle.getEnum() ); return builder.instance( methodCallCode( keySerializer.get() ) ).build(); } if ( useDefault ) { keySerializer = configuration.getKeySerializer( typeOracle.getJavaLangObject() ); if ( keySerializer.isPresent() ) { builder.instance( methodCallCode( keySerializer.get() ) ); return builder.build(); } } String message = "Type '" + type.getQualifiedSourceName() + "' is not supported as map's key"; logger.log( TreeLogger.Type.WARN, message ); throw new UnsupportedTypeException( message ); }
class class_name[name] begin[{] method[getKeySerializerFromType, return_type[type[JSerializerType]], modifier[final protected], parameter[type, subtype, useDefault]] begin[{] local_variable[type[JSerializerType], builder] if[binary_operation[literal[null], !=, call[type.isWildcard, parameter[]]]] begin[{] assign[member[.type], call[type.isWildcard, parameter[]]] else begin[{] None end[}] if[binary_operation[literal[null], !=, call[type.isRawType, parameter[]]]] begin[{] assign[member[.type], call[type.isRawType, parameter[]]] else begin[{] None end[}] local_variable[type[JTypeParameter], typeParameter] if[binary_operation[literal[null], !=, member[.typeParameter]]] begin[{] if[binary_operation[member[.subtype], ||, binary_operation[call[typeParameter.getDeclaringClass, parameter[]], ==, call[.getMapperInfo, parameter[]]]]] begin[{] return[call[builder.instance, parameter[call[CodeBlock.builder, parameter[]]]]] else begin[{] assign[member[.type], call[typeParameter.getBaseType, parameter[]]] end[}] else begin[{] None end[}] local_variable[type[Optional], keySerializer] if[call[keySerializer.isPresent, parameter[]]] begin[{] if[binary_operation[binary_operation[literal[null], !=, call[type.isParameterized, parameter[]]], ||, binary_operation[literal[null], !=, call[type.isGenericType, parameter[]]]]] begin[{] local_variable[type[JClassType], typeArgs] if[binary_operation[literal[null], !=, call[type.isGenericType, parameter[]]]] begin[{] assign[member[.typeArgs], call[type.isGenericType, parameter[]]] else begin[{] assign[member[.typeArgs], call[type.isParameterized, parameter[]]] end[}] local_variable[type[ImmutableList], parametersSerializerBuilder] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=parameterSerializerType)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JSerializerType, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=keySerializer, selectors=[MethodInvocation(arguments=[], member=getParameters, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MemberReference(member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=KEY_SERIALIZER, postfix_operators=[], prefix_operators=[], qualifier=MapperType, selectors=[]), operandr=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=keySerializer, selectors=[MethodInvocation(arguments=[], member=getParameters, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))], type_arguments=None), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=parameterSerializerType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=typeArgs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), MemberReference(member=subtype, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getJsonSerializerFromType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=parameterSerializerType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=typeArgs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=getKeySerializerFromType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=parameterSerializerType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=parametersSerializerBuilder, 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=typeArgs, 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) local_variable[type[ImmutableList], parametersSerializer] call[builder.parameters, parameter[member[.parametersSerializer]]] call[builder.instance, parameter[call[.methodCallCodeWithJMapperTypeParameters, parameter[call[keySerializer.get, parameter[]], member[.parametersSerializer]]]]] else begin[{] call[builder.instance, parameter[call[.methodCallCode, parameter[call[keySerializer.get, parameter[]]]]]] end[}] return[call[builder.build, parameter[]]] else begin[{] None end[}] if[binary_operation[call[typeOracle.isEnum, parameter[member[.type]]], ||, call[typeOracle.isEnumSupertype, parameter[member[.type]]]]] begin[{] assign[member[.keySerializer], call[configuration.getKeySerializer, parameter[call[typeOracle.getEnum, parameter[]]]]] return[call[builder.instance, parameter[call[.methodCallCode, parameter[call[keySerializer.get, parameter[]]]]]]] else begin[{] None end[}] if[member[.useDefault]] begin[{] assign[member[.keySerializer], call[configuration.getKeySerializer, parameter[call[typeOracle.getJavaLangObject, parameter[]]]]] if[call[keySerializer.isPresent, parameter[]]] begin[{] call[builder.instance, parameter[call[.methodCallCode, parameter[call[keySerializer.get, parameter[]]]]]] return[call[builder.build, parameter[]]] else begin[{] None end[}] else begin[{] None end[}] local_variable[type[String], message] call[logger.log, parameter[member[TreeLogger.Type.WARN], member[.message]]] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=message, 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=UnsupportedTypeException, sub_type=None)), label=None) end[}] END[}]
Keyword[protected] Keyword[final] identifier[JSerializerType] identifier[getKeySerializerFromType] operator[SEP] identifier[JType] identifier[type] , Keyword[boolean] identifier[subtype] , Keyword[boolean] identifier[useDefault] operator[SEP] Keyword[throws] identifier[UnsupportedTypeException] , identifier[UnableToCompleteException] { identifier[JSerializerType] operator[SEP] identifier[Builder] identifier[builder] operator[=] Keyword[new] identifier[JSerializerType] operator[SEP] identifier[Builder] operator[SEP] operator[SEP] operator[SEP] identifier[type] operator[SEP] identifier[type] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[type] operator[SEP] identifier[isWildcard] operator[SEP] operator[SEP] operator[SEP] { identifier[type] operator[=] identifier[type] operator[SEP] identifier[isWildcard] operator[SEP] operator[SEP] operator[SEP] identifier[getBaseType] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Other[null] operator[!=] identifier[type] operator[SEP] identifier[isRawType] operator[SEP] operator[SEP] operator[SEP] { identifier[type] operator[=] identifier[type] operator[SEP] identifier[isRawType] operator[SEP] operator[SEP] operator[SEP] identifier[getBaseType] operator[SEP] operator[SEP] operator[SEP] } identifier[JTypeParameter] identifier[typeParameter] operator[=] identifier[type] operator[SEP] identifier[isTypeParameter] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[typeParameter] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[subtype] operator[||] identifier[typeParameter] operator[SEP] identifier[getDeclaringClass] operator[SEP] operator[SEP] operator[==] identifier[getMapperInfo] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[builder] operator[SEP] identifier[instance] operator[SEP] identifier[CodeBlock] operator[SEP] identifier[builder] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] identifier[TYPE_PARAMETER_SERIALIZER_FIELD_NAME] , identifier[typeParameter] operator[SEP] identifier[getOrdinal] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[type] operator[=] identifier[typeParameter] operator[SEP] identifier[getBaseType] operator[SEP] operator[SEP] operator[SEP] } } identifier[Optional] operator[<] identifier[MapperInstance] operator[>] identifier[keySerializer] operator[=] identifier[configuration] operator[SEP] identifier[getKeySerializer] operator[SEP] identifier[type] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[keySerializer] operator[SEP] identifier[isPresent] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[!=] identifier[type] operator[SEP] identifier[isParameterized] operator[SEP] operator[SEP] operator[||] Other[null] operator[!=] identifier[type] operator[SEP] identifier[isGenericType] operator[SEP] operator[SEP] operator[SEP] { identifier[JClassType] operator[SEP] operator[SEP] identifier[typeArgs] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[type] operator[SEP] identifier[isGenericType] operator[SEP] operator[SEP] operator[SEP] { identifier[typeArgs] operator[=] identifier[type] operator[SEP] identifier[isGenericType] operator[SEP] operator[SEP] operator[SEP] identifier[asParameterizedByWildcards] operator[SEP] operator[SEP] operator[SEP] identifier[getTypeArgs] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[typeArgs] operator[=] identifier[type] operator[SEP] identifier[isParameterized] operator[SEP] operator[SEP] operator[SEP] identifier[getTypeArgs] operator[SEP] operator[SEP] operator[SEP] } identifier[ImmutableList] operator[SEP] identifier[Builder] operator[<] identifier[JSerializerType] operator[>] identifier[parametersSerializerBuilder] operator[=] identifier[ImmutableList] operator[SEP] identifier[builder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[typeArgs] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[JSerializerType] identifier[parameterSerializerType] operator[SEP] Keyword[if] operator[SEP] identifier[keySerializer] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[getParameters] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[<=] identifier[i] operator[SEP] { Keyword[break] operator[SEP] } Keyword[if] operator[SEP] identifier[MapperType] operator[SEP] identifier[KEY_SERIALIZER] operator[==] identifier[keySerializer] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[getParameters] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[SEP] operator[SEP] { identifier[parameterSerializerType] operator[=] identifier[getKeySerializerFromType] operator[SEP] identifier[typeArgs] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[parameterSerializerType] operator[=] identifier[getJsonSerializerFromType] operator[SEP] identifier[typeArgs] operator[SEP] identifier[i] operator[SEP] , identifier[subtype] operator[SEP] operator[SEP] } identifier[parametersSerializerBuilder] operator[SEP] identifier[add] operator[SEP] identifier[parameterSerializerType] operator[SEP] operator[SEP] } identifier[ImmutableList] operator[<] identifier[JSerializerType] operator[>] identifier[parametersSerializer] operator[=] identifier[parametersSerializerBuilder] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[parameters] operator[SEP] identifier[parametersSerializer] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[instance] operator[SEP] identifier[methodCallCodeWithJMapperTypeParameters] operator[SEP] identifier[keySerializer] operator[SEP] identifier[get] operator[SEP] operator[SEP] , identifier[parametersSerializer] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[builder] operator[SEP] identifier[instance] operator[SEP] identifier[methodCallCode] operator[SEP] identifier[keySerializer] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[builder] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[typeOracle] operator[SEP] identifier[isEnum] operator[SEP] identifier[type] operator[SEP] operator[||] identifier[typeOracle] operator[SEP] identifier[isEnumSupertype] operator[SEP] identifier[type] operator[SEP] operator[SEP] { identifier[keySerializer] operator[=] identifier[configuration] operator[SEP] identifier[getKeySerializer] operator[SEP] identifier[typeOracle] operator[SEP] identifier[getEnum] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[builder] operator[SEP] identifier[instance] operator[SEP] identifier[methodCallCode] operator[SEP] identifier[keySerializer] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[useDefault] operator[SEP] { identifier[keySerializer] operator[=] identifier[configuration] operator[SEP] identifier[getKeySerializer] operator[SEP] identifier[typeOracle] operator[SEP] identifier[getJavaLangObject] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[keySerializer] operator[SEP] identifier[isPresent] operator[SEP] operator[SEP] operator[SEP] { identifier[builder] operator[SEP] identifier[instance] operator[SEP] identifier[methodCallCode] operator[SEP] identifier[keySerializer] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[builder] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] } } identifier[String] identifier[message] operator[=] literal[String] operator[+] identifier[type] operator[SEP] identifier[getQualifiedSourceName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] identifier[logger] operator[SEP] identifier[log] operator[SEP] identifier[TreeLogger] operator[SEP] identifier[Type] operator[SEP] identifier[WARN] , identifier[message] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[UnsupportedTypeException] operator[SEP] identifier[message] operator[SEP] operator[SEP] }
@Override public void close() { if (!this.closed.getAndSet(true)) { this.metricReporter.cancel(true); this.metrics.close(); this.rolloverProcessor.close(); this.writeProcessor.close(); // Close active ledger. WriteLedger writeLedger; synchronized (this.lock) { writeLedger = this.writeLedger; this.writeLedger = null; this.logMetadata = null; } // Close the write queue and cancel the pending writes. this.writes.close().forEach(w -> w.fail(new CancellationException("BookKeeperLog has been closed."), true)); if (writeLedger != null) { try { Ledgers.close(writeLedger.ledger); } catch (DurableDataLogException bkEx) { log.error("{}: Unable to close LedgerHandle for Ledger {}.", this.traceObjectId, writeLedger.ledger.getId(), bkEx); } } log.info("{}: Closed.", this.traceObjectId); } }
class class_name[name] begin[{] method[close, return_type[void], modifier[public], parameter[]] begin[{] if[THIS[member[None.closed]call[None.getAndSet, parameter[literal[true]]]]] begin[{] THIS[member[None.metricReporter]call[None.cancel, parameter[literal[true]]]] THIS[member[None.metrics]call[None.close, parameter[]]] THIS[member[None.rolloverProcessor]call[None.close, parameter[]]] THIS[member[None.writeProcessor]call[None.close, parameter[]]] local_variable[type[WriteLedger], writeLedger] SYNCHRONIZED[THIS[member[None.lock]]] BEGIN[{] assign[member[.writeLedger], THIS[member[None.writeLedger]]] assign[THIS[member[None.writeLedger]], literal[null]] assign[THIS[member[None.logMetadata]], literal[null]] END[}] THIS[member[None.writes]call[None.close, parameter[]]call[None.forEach, parameter[LambdaExpression(body=MethodInvocation(arguments=[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="BookKeeperLog has been closed.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CancellationException, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=fail, postfix_operators=[], prefix_operators=[], qualifier=w, selectors=[], type_arguments=None), parameters=[MemberReference(member=w, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]]] if[binary_operation[member[.writeLedger], !=, literal[null]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ledger, postfix_operators=[], prefix_operators=[], qualifier=writeLedger, selectors=[])], member=close, postfix_operators=[], prefix_operators=[], qualifier=Ledgers, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="{}: Unable to close LedgerHandle for Ledger {}."), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=traceObjectId, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=writeLedger.ledger, selectors=[], type_arguments=None), MemberReference(member=bkEx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=bkEx, types=['DurableDataLogException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] call[log.info, parameter[literal["{}: Closed."], THIS[member[None.traceObjectId]]]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] Keyword[this] operator[SEP] identifier[closed] operator[SEP] identifier[getAndSet] operator[SEP] literal[boolean] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[metricReporter] operator[SEP] identifier[cancel] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[metrics] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[rolloverProcessor] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[writeProcessor] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[WriteLedger] identifier[writeLedger] operator[SEP] Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] identifier[lock] operator[SEP] { identifier[writeLedger] operator[=] Keyword[this] operator[SEP] identifier[writeLedger] operator[SEP] Keyword[this] operator[SEP] identifier[writeLedger] operator[=] Other[null] operator[SEP] Keyword[this] operator[SEP] identifier[logMetadata] operator[=] Other[null] operator[SEP] } Keyword[this] operator[SEP] identifier[writes] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[forEach] operator[SEP] identifier[w] operator[->] identifier[w] operator[SEP] identifier[fail] operator[SEP] Keyword[new] identifier[CancellationException] operator[SEP] literal[String] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[writeLedger] operator[!=] Other[null] operator[SEP] { Keyword[try] { identifier[Ledgers] operator[SEP] identifier[close] operator[SEP] identifier[writeLedger] operator[SEP] identifier[ledger] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[DurableDataLogException] identifier[bkEx] operator[SEP] { identifier[log] operator[SEP] identifier[error] operator[SEP] literal[String] , Keyword[this] operator[SEP] identifier[traceObjectId] , identifier[writeLedger] operator[SEP] identifier[ledger] operator[SEP] identifier[getId] operator[SEP] operator[SEP] , identifier[bkEx] operator[SEP] operator[SEP] } } identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] , Keyword[this] operator[SEP] identifier[traceObjectId] operator[SEP] operator[SEP] } }
@Override public CommerceSubscriptionEntry fetchByG_U_Last(long groupId, long userId, OrderByComparator<CommerceSubscriptionEntry> orderByComparator) { int count = countByG_U(groupId, userId); if (count == 0) { return null; } List<CommerceSubscriptionEntry> list = findByG_U(groupId, userId, count - 1, count, orderByComparator); if (!list.isEmpty()) { return list.get(0); } return null; }
class class_name[name] begin[{] method[fetchByG_U_Last, return_type[type[CommerceSubscriptionEntry]], modifier[public], parameter[groupId, userId, orderByComparator]] begin[{] local_variable[type[int], count] if[binary_operation[member[.count], ==, literal[0]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[List], list] if[call[list.isEmpty, parameter[]]] begin[{] return[call[list.get, parameter[literal[0]]]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CommerceSubscriptionEntry] identifier[fetchByG_U_Last] operator[SEP] Keyword[long] identifier[groupId] , Keyword[long] identifier[userId] , identifier[OrderByComparator] operator[<] identifier[CommerceSubscriptionEntry] operator[>] identifier[orderByComparator] operator[SEP] { Keyword[int] identifier[count] operator[=] identifier[countByG_U] operator[SEP] identifier[groupId] , identifier[userId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[count] operator[==] Other[0] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[List] operator[<] identifier[CommerceSubscriptionEntry] operator[>] identifier[list] operator[=] identifier[findByG_U] operator[SEP] identifier[groupId] , identifier[userId] , identifier[count] operator[-] Other[1] , identifier[count] , identifier[orderByComparator] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[list] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[list] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public static IdentifierExtension findFirst(Collection<? extends Extension> extensions) { for (Extension extension : extensions) { if (IDENTIFIER_EXTENSION_ID == extension.getId()) return (IdentifierExtension)extension; } return null; }
class class_name[name] begin[{] method[findFirst, return_type[type[IdentifierExtension]], modifier[public static], parameter[extensions]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=IDENTIFIER_EXTENSION_ID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=extension, selectors=[], type_arguments=None), operator===), else_statement=None, label=None, then_statement=ReturnStatement(expression=Cast(expression=MemberReference(member=extension, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=IdentifierExtension, sub_type=None)), label=None))]), control=EnhancedForControl(iterable=MemberReference(member=extensions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=extension)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Extension, sub_type=None))), label=None) return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] identifier[IdentifierExtension] identifier[findFirst] operator[SEP] identifier[Collection] operator[<] operator[?] Keyword[extends] identifier[Extension] operator[>] identifier[extensions] operator[SEP] { Keyword[for] operator[SEP] identifier[Extension] identifier[extension] operator[:] identifier[extensions] operator[SEP] { Keyword[if] operator[SEP] identifier[IDENTIFIER_EXTENSION_ID] operator[==] identifier[extension] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[IdentifierExtension] operator[SEP] identifier[extension] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
private void determineChangesSince(File file, long lastScanTime) { try { if (GlobalConfiguration.verboseMode && log.isLoggable(Level.INFO)) { log.info("Firing file changed event " + file); } listener.fileChanged(file); if (file.isDirectory()) { File[] filesOfInterest = file.listFiles(new RecentChangeFilter(lastScanTime)); for (File f : filesOfInterest) { if (f.isDirectory()) { determineChangesSince(f, lastScanTime); } else { if (GlobalConfiguration.verboseMode && log.isLoggable(Level.INFO)) { log.info("Observed last modification time change for " + f + " (lastScanTime=" + lastScanTime + ")"); log.info("Firing file changed event " + file); } listener.fileChanged(f); } } } } catch (Throwable t) { if (log.isLoggable(Level.SEVERE)) { log.log(Level.SEVERE, "FileWatcher caught serious error, see cause", t); } } }
class class_name[name] begin[{] method[determineChangesSince, return_type[void], modifier[private], parameter[file, lastScanTime]] begin[{] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=verboseMode, postfix_operators=[], prefix_operators=[], qualifier=GlobalConfiguration, selectors=[]), operandr=MethodInvocation(arguments=[MemberReference(member=INFO, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[])], member=isLoggable, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Firing file changed event "), operandr=MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=info, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fileChanged, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isDirectory, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=lastScanTime, 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=RecentChangeFilter, sub_type=None))], member=listFiles, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[], type_arguments=None), name=filesOfInterest)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=File, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isDirectory, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=verboseMode, postfix_operators=[], prefix_operators=[], qualifier=GlobalConfiguration, selectors=[]), operandr=MethodInvocation(arguments=[MemberReference(member=INFO, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[])], member=isLoggable, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), operator=&&), 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="Observed last modification time change for "), operandr=MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" (lastScanTime="), operator=+), operandr=MemberReference(member=lastScanTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=")"), operator=+)], member=info, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Firing file changed event "), operandr=MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=info, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fileChanged, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lastScanTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=determineChangesSince, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=filesOfInterest, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=f)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))), label=None)]))], catches=[CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=SEVERE, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[])], member=isLoggable, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SEVERE, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="FileWatcher caught serious error, see cause"), MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=log, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[determineChangesSince] operator[SEP] identifier[File] identifier[file] , Keyword[long] identifier[lastScanTime] operator[SEP] { Keyword[try] { Keyword[if] operator[SEP] identifier[GlobalConfiguration] operator[SEP] identifier[verboseMode] operator[&&] identifier[log] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[INFO] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[file] operator[SEP] operator[SEP] } identifier[listener] operator[SEP] identifier[fileChanged] operator[SEP] identifier[file] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[file] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] { identifier[File] operator[SEP] operator[SEP] identifier[filesOfInterest] operator[=] identifier[file] operator[SEP] identifier[listFiles] operator[SEP] Keyword[new] identifier[RecentChangeFilter] operator[SEP] identifier[lastScanTime] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[File] identifier[f] operator[:] identifier[filesOfInterest] operator[SEP] { Keyword[if] operator[SEP] identifier[f] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] { identifier[determineChangesSince] operator[SEP] identifier[f] , identifier[lastScanTime] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[GlobalConfiguration] operator[SEP] identifier[verboseMode] operator[&&] identifier[log] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[INFO] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[f] operator[+] literal[String] operator[+] identifier[lastScanTime] operator[+] literal[String] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[file] operator[SEP] operator[SEP] } identifier[listener] operator[SEP] identifier[fileChanged] operator[SEP] identifier[f] operator[SEP] operator[SEP] } } } } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[SEVERE] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[SEVERE] , literal[String] , identifier[t] operator[SEP] operator[SEP] } } }
@SuppressWarnings("unchecked") static <K, V> Map<K, V> dynamicallyCastMap(Map<?, ?> map, Class<K> keyType, Class<V> valueType) { if (map == null) { return null; } assert checkCollectionMembers(map.keySet(), keyType) : "The map contains keys with a type other than " + keyType.getName(); assert checkCollectionMembers(map.values(), valueType) : "The map contains values with a type other than " + valueType.getName(); return (Map<K, V>) map; }
class class_name[name] begin[{] method[dynamicallyCastMap, return_type[type[Map]], modifier[static], parameter[map, keyType, valueType]] begin[{] if[binary_operation[member[.map], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] AssertStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), MemberReference(member=keyType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkCollectionMembers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None, value=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The map contains keys with a type other than "), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=keyType, selectors=[], type_arguments=None), operator=+)) AssertStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), MemberReference(member=valueType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkCollectionMembers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None, value=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The map contains values with a type other than "), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=valueType, selectors=[], type_arguments=None), operator=+)) return[Cast(expression=MemberReference(member=map, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=K, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None))], dimensions=[], name=Map, sub_type=None))] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[dynamicallyCastMap] operator[SEP] identifier[Map] operator[<] operator[?] , operator[?] operator[>] identifier[map] , identifier[Class] operator[<] identifier[K] operator[>] identifier[keyType] , identifier[Class] operator[<] identifier[V] operator[>] identifier[valueType] operator[SEP] { Keyword[if] operator[SEP] identifier[map] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[assert] identifier[checkCollectionMembers] operator[SEP] identifier[map] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] , identifier[keyType] operator[SEP] operator[:] literal[String] operator[+] identifier[keyType] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[assert] identifier[checkCollectionMembers] operator[SEP] identifier[map] operator[SEP] identifier[values] operator[SEP] operator[SEP] , identifier[valueType] operator[SEP] operator[:] literal[String] operator[+] identifier[valueType] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] operator[SEP] identifier[map] operator[SEP] }
public GoogleImage updateName(GoogleImage googleImage, String name, String urlName) { googleImage.setName(name); googleImage.setUrlName(urlName); getEntityManager().persist(googleImage); return googleImage; }
class class_name[name] begin[{] method[updateName, return_type[type[GoogleImage]], modifier[public], parameter[googleImage, name, urlName]] begin[{] call[googleImage.setName, parameter[member[.name]]] call[googleImage.setUrlName, parameter[member[.urlName]]] call[.getEntityManager, parameter[]] return[member[.googleImage]] end[}] END[}]
Keyword[public] identifier[GoogleImage] identifier[updateName] operator[SEP] identifier[GoogleImage] identifier[googleImage] , identifier[String] identifier[name] , identifier[String] identifier[urlName] operator[SEP] { identifier[googleImage] operator[SEP] identifier[setName] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[googleImage] operator[SEP] identifier[setUrlName] operator[SEP] identifier[urlName] operator[SEP] operator[SEP] identifier[getEntityManager] operator[SEP] operator[SEP] operator[SEP] identifier[persist] operator[SEP] identifier[googleImage] operator[SEP] operator[SEP] Keyword[return] identifier[googleImage] operator[SEP] }
public static Version resolveVersion(MinecraftDirectory minecraftDir, String version) throws IOException { Objects.requireNonNull(minecraftDir); Objects.requireNonNull(version); if (doesVersionExist(minecraftDir, version)) { try { return getVersionParser().parseVersion(resolveVersionHierarchy(version, minecraftDir), PlatformDescription.current()); } catch (JSONException e) { throw new IOException("Couldn't parse version json: " + version, e); } } else { return null; } }
class class_name[name] begin[{] method[resolveVersion, return_type[type[Version]], modifier[public static], parameter[minecraftDir, version]] begin[{] call[Objects.requireNonNull, parameter[member[.minecraftDir]]] call[Objects.requireNonNull, parameter[member[.version]]] if[call[.doesVersionExist, parameter[member[.minecraftDir], member[.version]]]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getVersionParser, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=minecraftDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=resolveVersionHierarchy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=current, postfix_operators=[], prefix_operators=[], qualifier=PlatformDescription, selectors=[], type_arguments=None)], member=parseVersion, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Couldn't parse version json: "), operandr=MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=IOException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['JSONException']))], finally_block=None, label=None, resources=None) else begin[{] return[literal[null]] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[Version] identifier[resolveVersion] operator[SEP] identifier[MinecraftDirectory] identifier[minecraftDir] , identifier[String] identifier[version] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[minecraftDir] operator[SEP] operator[SEP] identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[version] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[doesVersionExist] operator[SEP] identifier[minecraftDir] , identifier[version] operator[SEP] operator[SEP] { Keyword[try] { Keyword[return] identifier[getVersionParser] operator[SEP] operator[SEP] operator[SEP] identifier[parseVersion] operator[SEP] identifier[resolveVersionHierarchy] operator[SEP] identifier[version] , identifier[minecraftDir] operator[SEP] , identifier[PlatformDescription] operator[SEP] identifier[current] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[JSONException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[version] , identifier[e] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[return] Other[null] operator[SEP] } }
@Override public CreateRequestValidatorResult createRequestValidator(CreateRequestValidatorRequest request) { request = beforeClientExecution(request); return executeCreateRequestValidator(request); }
class class_name[name] begin[{] method[createRequestValidator, return_type[type[CreateRequestValidatorResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeCreateRequestValidator, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CreateRequestValidatorResult] identifier[createRequestValidator] operator[SEP] identifier[CreateRequestValidatorRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeCreateRequestValidator] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public void marshall(StreamDescription streamDescription, ProtocolMarshaller protocolMarshaller) { if (streamDescription == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(streamDescription.getStreamName(), STREAMNAME_BINDING); protocolMarshaller.marshall(streamDescription.getStreamARN(), STREAMARN_BINDING); protocolMarshaller.marshall(streamDescription.getStreamStatus(), STREAMSTATUS_BINDING); protocolMarshaller.marshall(streamDescription.getShards(), SHARDS_BINDING); protocolMarshaller.marshall(streamDescription.getHasMoreShards(), HASMORESHARDS_BINDING); protocolMarshaller.marshall(streamDescription.getRetentionPeriodHours(), RETENTIONPERIODHOURS_BINDING); protocolMarshaller.marshall(streamDescription.getStreamCreationTimestamp(), STREAMCREATIONTIMESTAMP_BINDING); protocolMarshaller.marshall(streamDescription.getEnhancedMonitoring(), ENHANCEDMONITORING_BINDING); protocolMarshaller.marshall(streamDescription.getEncryptionType(), ENCRYPTIONTYPE_BINDING); protocolMarshaller.marshall(streamDescription.getKeyId(), KEYID_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[streamDescription, protocolMarshaller]] begin[{] if[binary_operation[member[.streamDescription], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getStreamName, postfix_operators=[], prefix_operators=[], qualifier=streamDescription, selectors=[], type_arguments=None), MemberReference(member=STREAMNAME_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getStreamARN, postfix_operators=[], prefix_operators=[], qualifier=streamDescription, selectors=[], type_arguments=None), MemberReference(member=STREAMARN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getStreamStatus, postfix_operators=[], prefix_operators=[], qualifier=streamDescription, selectors=[], type_arguments=None), MemberReference(member=STREAMSTATUS_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getShards, postfix_operators=[], prefix_operators=[], qualifier=streamDescription, selectors=[], type_arguments=None), MemberReference(member=SHARDS_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getHasMoreShards, postfix_operators=[], prefix_operators=[], qualifier=streamDescription, selectors=[], type_arguments=None), MemberReference(member=HASMORESHARDS_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getRetentionPeriodHours, postfix_operators=[], prefix_operators=[], qualifier=streamDescription, selectors=[], type_arguments=None), MemberReference(member=RETENTIONPERIODHOURS_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getStreamCreationTimestamp, postfix_operators=[], prefix_operators=[], qualifier=streamDescription, selectors=[], type_arguments=None), MemberReference(member=STREAMCREATIONTIMESTAMP_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getEnhancedMonitoring, postfix_operators=[], prefix_operators=[], qualifier=streamDescription, selectors=[], type_arguments=None), MemberReference(member=ENHANCEDMONITORING_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getEncryptionType, postfix_operators=[], prefix_operators=[], qualifier=streamDescription, selectors=[], type_arguments=None), MemberReference(member=ENCRYPTIONTYPE_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKeyId, postfix_operators=[], prefix_operators=[], qualifier=streamDescription, selectors=[], type_arguments=None), MemberReference(member=KEYID_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), 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=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[StreamDescription] identifier[streamDescription] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[streamDescription] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[streamDescription] operator[SEP] identifier[getStreamName] operator[SEP] operator[SEP] , identifier[STREAMNAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[streamDescription] operator[SEP] identifier[getStreamARN] operator[SEP] operator[SEP] , identifier[STREAMARN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[streamDescription] operator[SEP] identifier[getStreamStatus] operator[SEP] operator[SEP] , identifier[STREAMSTATUS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[streamDescription] operator[SEP] identifier[getShards] operator[SEP] operator[SEP] , identifier[SHARDS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[streamDescription] operator[SEP] identifier[getHasMoreShards] operator[SEP] operator[SEP] , identifier[HASMORESHARDS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[streamDescription] operator[SEP] identifier[getRetentionPeriodHours] operator[SEP] operator[SEP] , identifier[RETENTIONPERIODHOURS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[streamDescription] operator[SEP] identifier[getStreamCreationTimestamp] operator[SEP] operator[SEP] , identifier[STREAMCREATIONTIMESTAMP_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[streamDescription] operator[SEP] identifier[getEnhancedMonitoring] operator[SEP] operator[SEP] , identifier[ENHANCEDMONITORING_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[streamDescription] operator[SEP] identifier[getEncryptionType] operator[SEP] operator[SEP] , identifier[ENCRYPTIONTYPE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[streamDescription] operator[SEP] identifier[getKeyId] operator[SEP] operator[SEP] , identifier[KEYID_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
int accumDefaultEntity( java.io.Writer writer, char ch, int i, char[] chars, int len, boolean fromTextNode, boolean escLF) throws IOException { if (!escLF && CharInfo.S_LINEFEED == ch) { writer.write(m_lineSep, 0, m_lineSepLen); } else { // if this is text node character and a special one of those, // or if this is a character from attribute value and a special one of those if ((fromTextNode && m_charInfo.shouldMapTextChar(ch)) || (!fromTextNode && m_charInfo.shouldMapAttrChar(ch))) { String outputStringForChar = m_charInfo.getOutputStringForChar(ch); if (null != outputStringForChar) { writer.write(outputStringForChar); } else return i; } else return i; } return i + 1; }
class class_name[name] begin[{] method[accumDefaultEntity, return_type[type[int]], modifier[default], parameter[writer, ch, i, chars, len, fromTextNode, escLF]] begin[{] if[binary_operation[member[.escLF], &&, binary_operation[member[CharInfo.S_LINEFEED], ==, member[.ch]]]] begin[{] call[writer.write, parameter[member[.m_lineSep], literal[0], member[.m_lineSepLen]]] else begin[{] if[binary_operation[binary_operation[member[.fromTextNode], &&, call[m_charInfo.shouldMapTextChar, parameter[member[.ch]]]], ||, binary_operation[member[.fromTextNode], &&, call[m_charInfo.shouldMapAttrChar, parameter[member[.ch]]]]]] begin[{] local_variable[type[String], outputStringForChar] if[binary_operation[literal[null], !=, member[.outputStringForChar]]] begin[{] call[writer.write, parameter[member[.outputStringForChar]]] else begin[{] return[member[.i]] end[}] else begin[{] return[member[.i]] end[}] end[}] return[binary_operation[member[.i], +, literal[1]]] end[}] END[}]
Keyword[int] identifier[accumDefaultEntity] operator[SEP] identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[Writer] identifier[writer] , Keyword[char] identifier[ch] , Keyword[int] identifier[i] , Keyword[char] operator[SEP] operator[SEP] identifier[chars] , Keyword[int] identifier[len] , Keyword[boolean] identifier[fromTextNode] , Keyword[boolean] identifier[escLF] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] operator[!] identifier[escLF] operator[&&] identifier[CharInfo] operator[SEP] identifier[S_LINEFEED] operator[==] identifier[ch] operator[SEP] { identifier[writer] operator[SEP] identifier[write] operator[SEP] identifier[m_lineSep] , Other[0] , identifier[m_lineSepLen] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] operator[SEP] identifier[fromTextNode] operator[&&] identifier[m_charInfo] operator[SEP] identifier[shouldMapTextChar] operator[SEP] identifier[ch] operator[SEP] operator[SEP] operator[||] operator[SEP] operator[!] identifier[fromTextNode] operator[&&] identifier[m_charInfo] operator[SEP] identifier[shouldMapAttrChar] operator[SEP] identifier[ch] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[outputStringForChar] operator[=] identifier[m_charInfo] operator[SEP] identifier[getOutputStringForChar] operator[SEP] identifier[ch] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[outputStringForChar] operator[SEP] { identifier[writer] operator[SEP] identifier[write] operator[SEP] identifier[outputStringForChar] operator[SEP] operator[SEP] } Keyword[else] Keyword[return] identifier[i] operator[SEP] } Keyword[else] Keyword[return] identifier[i] operator[SEP] } Keyword[return] identifier[i] operator[+] Other[1] operator[SEP] }
private static long floorDiv(long x, long y) { return BigDecimal.valueOf(x).divide(BigDecimal.valueOf(y), 0, RoundingMode.FLOOR).longValue(); }
class class_name[name] begin[{] method[floorDiv, return_type[type[long]], modifier[private static], parameter[x, y]] begin[{] return[call[BigDecimal.valueOf, parameter[member[.x]]]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[long] identifier[floorDiv] operator[SEP] Keyword[long] identifier[x] , Keyword[long] identifier[y] operator[SEP] { Keyword[return] identifier[BigDecimal] operator[SEP] identifier[valueOf] operator[SEP] identifier[x] operator[SEP] operator[SEP] identifier[divide] operator[SEP] identifier[BigDecimal] operator[SEP] identifier[valueOf] operator[SEP] identifier[y] operator[SEP] , Other[0] , identifier[RoundingMode] operator[SEP] identifier[FLOOR] operator[SEP] operator[SEP] identifier[longValue] operator[SEP] operator[SEP] operator[SEP] }
public static int issueDeleteDurableRequest( MessageProcessor MP, String subName, String userName, SIBUuid8 remoteMEUuid) throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "issueDeleteDurableRequest", new Object[] {MP, subName, userName, remoteMEUuid}); long requestID = MP.nextTick(); ControlMessage msg = createDurableDeleteDurable(MP, subName, userName, requestID, remoteMEUuid); Object result = issueRequest(MP, msg, remoteMEUuid, DELETEDURABLE_RETRY_TIMEOUT, -1, // 219870: retry forever, otherwise use DELETEDURABLE_NUMTRIES, requestID); if (result == null) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "issueDeleteDurableRequest", "SIResourceException"); // Timeout, throw a general error throw new SIResourceException( nls.getFormattedMessage( "REMOTE_DURABLE_TIMEOUT_ERROR_CWSIP0631", new Object[] { "delete", subName, remoteMEUuid}, null)); } // Otherwise, reply should always be a ControlDurableConfirm with a status code if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "issueDeleteDurableRequest", new Integer(((ControlDurableConfirm) result).getStatus())); return ((ControlDurableConfirm) result).getStatus(); }
class class_name[name] begin[{] method[issueDeleteDurableRequest, return_type[type[int]], modifier[public static], parameter[MP, subName, userName, remoteMEUuid]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["issueDeleteDurableRequest"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=MP, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=subName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=userName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=remoteMEUuid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]] else begin[{] None end[}] local_variable[type[long], requestID] local_variable[type[ControlMessage], msg] local_variable[type[Object], result] if[binary_operation[member[.result], ==, literal[null]]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["issueDeleteDurableRequest"], literal["SIResourceException"]]] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="REMOTE_DURABLE_TIMEOUT_ERROR_CWSIP0631"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="delete"), MemberReference(member=subName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=remoteMEUuid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=getFormattedMessage, postfix_operators=[], prefix_operators=[], qualifier=nls, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SIResourceException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["issueDeleteDurableRequest"], ClassCreator(arguments=[Cast(expression=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ControlDurableConfirm, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Integer, sub_type=None))]] else begin[{] None end[}] return[Cast(expression=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ControlDurableConfirm, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[issueDeleteDurableRequest] operator[SEP] identifier[MessageProcessor] identifier[MP] , identifier[String] identifier[subName] , identifier[String] identifier[userName] , identifier[SIBUuid8] identifier[remoteMEUuid] operator[SEP] Keyword[throws] identifier[SIResourceException] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[MP] , identifier[subName] , identifier[userName] , identifier[remoteMEUuid] } operator[SEP] operator[SEP] Keyword[long] identifier[requestID] operator[=] identifier[MP] operator[SEP] identifier[nextTick] operator[SEP] operator[SEP] operator[SEP] identifier[ControlMessage] identifier[msg] operator[=] identifier[createDurableDeleteDurable] operator[SEP] identifier[MP] , identifier[subName] , identifier[userName] , identifier[requestID] , identifier[remoteMEUuid] operator[SEP] operator[SEP] identifier[Object] identifier[result] operator[=] identifier[issueRequest] operator[SEP] identifier[MP] , identifier[msg] , identifier[remoteMEUuid] , identifier[DELETEDURABLE_RETRY_TIMEOUT] , operator[-] Other[1] , identifier[requestID] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[SIResourceException] operator[SEP] identifier[nls] operator[SEP] identifier[getFormattedMessage] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { literal[String] , identifier[subName] , identifier[remoteMEUuid] } , Other[null] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Integer] operator[SEP] operator[SEP] operator[SEP] identifier[ControlDurableConfirm] operator[SEP] identifier[result] operator[SEP] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] operator[SEP] identifier[ControlDurableConfirm] operator[SEP] identifier[result] operator[SEP] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] operator[SEP] }
@Override protected Collection<Object> elementsOf(Object facetValue) { int length = Array.getLength(facetValue); List<Object> list = new ArrayList<>(length); for (int i = 0; i < length; i++) { list.add(Array.get(facetValue, i)); } return list; }
class class_name[name] begin[{] method[elementsOf, return_type[type[Collection]], modifier[protected], parameter[facetValue]] begin[{] local_variable[type[int], length] local_variable[type[List], list] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=facetValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=Array, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=list, 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=, 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[.list]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] identifier[Collection] operator[<] identifier[Object] operator[>] identifier[elementsOf] operator[SEP] identifier[Object] identifier[facetValue] operator[SEP] { Keyword[int] identifier[length] operator[=] identifier[Array] operator[SEP] identifier[getLength] operator[SEP] identifier[facetValue] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Object] operator[>] identifier[list] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[list] operator[SEP] identifier[add] operator[SEP] identifier[Array] operator[SEP] identifier[get] operator[SEP] identifier[facetValue] , identifier[i] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[list] operator[SEP] }
@Deprecated @SuppressWarnings("deprecation") public void push(String eventName, HashMap<String, Object> chargeDetails, ArrayList<HashMap<String, Object>> items) throws InvalidEventNameException { // This method is for only charged events if (!eventName.equals(Constants.CHARGED_EVENT)) { throw new InvalidEventNameException("Not a charged event"); } CleverTapAPI cleverTapAPI = weakReference.get(); if(cleverTapAPI == null){ Logger.d("CleverTap Instance is null."); } else { cleverTapAPI.pushChargedEvent(chargeDetails, items); } }
class class_name[name] begin[{] method[push, return_type[void], modifier[public], parameter[eventName, chargeDetails, items]] begin[{] if[call[eventName.equals, parameter[member[Constants.CHARGED_EVENT]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Not a charged event")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InvalidEventNameException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[CleverTapAPI], cleverTapAPI] if[binary_operation[member[.cleverTapAPI], ==, literal[null]]] begin[{] call[Logger.d, parameter[literal["CleverTap Instance is null."]]] else begin[{] call[cleverTapAPI.pushChargedEvent, parameter[member[.chargeDetails], member[.items]]] end[}] end[}] END[}]
annotation[@] identifier[Deprecated] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[push] operator[SEP] identifier[String] identifier[eventName] , identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] identifier[chargeDetails] , identifier[ArrayList] operator[<] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] operator[>] identifier[items] operator[SEP] Keyword[throws] identifier[InvalidEventNameException] { Keyword[if] operator[SEP] operator[!] identifier[eventName] operator[SEP] identifier[equals] operator[SEP] identifier[Constants] operator[SEP] identifier[CHARGED_EVENT] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[InvalidEventNameException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[CleverTapAPI] identifier[cleverTapAPI] operator[=] identifier[weakReference] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cleverTapAPI] operator[==] Other[null] operator[SEP] { identifier[Logger] operator[SEP] identifier[d] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[cleverTapAPI] operator[SEP] identifier[pushChargedEvent] operator[SEP] identifier[chargeDetails] , identifier[items] operator[SEP] operator[SEP] } }
public void setAutomationExecutionMetadataList(java.util.Collection<AutomationExecutionMetadata> automationExecutionMetadataList) { if (automationExecutionMetadataList == null) { this.automationExecutionMetadataList = null; return; } this.automationExecutionMetadataList = new com.amazonaws.internal.SdkInternalList<AutomationExecutionMetadata>(automationExecutionMetadataList); }
class class_name[name] begin[{] method[setAutomationExecutionMetadataList, return_type[void], modifier[public], parameter[automationExecutionMetadataList]] begin[{] if[binary_operation[member[.automationExecutionMetadataList], ==, literal[null]]] begin[{] assign[THIS[member[None.automationExecutionMetadataList]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.automationExecutionMetadataList]], ClassCreator(arguments=[MemberReference(member=automationExecutionMetadataList, 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=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=amazonaws, sub_type=ReferenceType(arguments=None, dimensions=None, name=internal, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=AutomationExecutionMetadata, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setAutomationExecutionMetadataList] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[AutomationExecutionMetadata] operator[>] identifier[automationExecutionMetadataList] operator[SEP] { Keyword[if] operator[SEP] identifier[automationExecutionMetadataList] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[automationExecutionMetadataList] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[automationExecutionMetadataList] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[AutomationExecutionMetadata] operator[>] operator[SEP] identifier[automationExecutionMetadataList] operator[SEP] operator[SEP] }
public static void log (@Nonnull final Logger aLogger, @Nonnull final IHasErrorLevel aErrorLevelProvider, @Nonnull final String sMsg) { log (aLogger, aErrorLevelProvider.getErrorLevel (), sMsg, null); }
class class_name[name] begin[{] method[log, return_type[void], modifier[public static], parameter[aLogger, aErrorLevelProvider, sMsg]] begin[{] call[.log, parameter[member[.aLogger], call[aErrorLevelProvider.getErrorLevel, parameter[]], member[.sMsg], literal[null]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[log] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[Logger] identifier[aLogger] , annotation[@] identifier[Nonnull] Keyword[final] identifier[IHasErrorLevel] identifier[aErrorLevelProvider] , annotation[@] identifier[Nonnull] Keyword[final] identifier[String] identifier[sMsg] operator[SEP] { identifier[log] operator[SEP] identifier[aLogger] , identifier[aErrorLevelProvider] operator[SEP] identifier[getErrorLevel] operator[SEP] operator[SEP] , identifier[sMsg] , Other[null] operator[SEP] operator[SEP] }
static File resolveAbsolutely(String pathToResolve, MavenProject project) { // avoid an NPE if the Maven project is not needed by DockerPathUtil return DockerPathUtil.resolveAbsolutely(pathToResolve, (project == null) ? null : project.getBasedir().getAbsolutePath()); }
class class_name[name] begin[{] method[resolveAbsolutely, return_type[type[File]], modifier[static], parameter[pathToResolve, project]] begin[{] return[call[DockerPathUtil.resolveAbsolutely, parameter[member[.pathToResolve], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=project, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[], member=getBasedir, postfix_operators=[], prefix_operators=[], qualifier=project, selectors=[MethodInvocation(arguments=[], member=getAbsolutePath, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))]]] end[}] END[}]
Keyword[static] identifier[File] identifier[resolveAbsolutely] operator[SEP] identifier[String] identifier[pathToResolve] , identifier[MavenProject] identifier[project] operator[SEP] { Keyword[return] identifier[DockerPathUtil] operator[SEP] identifier[resolveAbsolutely] operator[SEP] identifier[pathToResolve] , operator[SEP] identifier[project] operator[==] Other[null] operator[SEP] operator[?] Other[null] operator[:] identifier[project] operator[SEP] identifier[getBasedir] operator[SEP] operator[SEP] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public Object send( String... args ) throws Exception { assertArgumentsCount( args ); return field.get( target ); }
class class_name[name] begin[{] method[send, return_type[type[Object]], modifier[public], parameter[args]] begin[{] call[.assertArgumentsCount, parameter[member[.args]]] return[call[field.get, parameter[member[.target]]]] end[}] END[}]
Keyword[public] identifier[Object] identifier[send] operator[SEP] identifier[String] operator[...] identifier[args] operator[SEP] Keyword[throws] identifier[Exception] { identifier[assertArgumentsCount] operator[SEP] identifier[args] operator[SEP] operator[SEP] Keyword[return] identifier[field] operator[SEP] identifier[get] operator[SEP] identifier[target] operator[SEP] operator[SEP] }
private Number readNumber() throws IOException { StringBuffer sb = new StringBuffer(); int l = lineNo; int c = colNo; while (isDigitChar(lastChar)) { sb.append((char)lastChar); readChar(); } // convert it! String string = sb.toString(); try { if (-1 != string.indexOf('.')) { return Double.valueOf(string); } String sign = ""; if (string.startsWith("-")) { sign = "-"; string = string.substring(1); } if (string.toUpperCase().startsWith("0X")) { return Long.valueOf(sign + string.substring(2),16); } if (string.equals("0")) { return new Long(0); } else if (string.startsWith("0") && string.length() > 1) { return Long.valueOf(sign + string.substring(1),8); } /** * We have to check for the exponential and treat appropriately * Exponentials should be treated as Doubles. */ if (string.indexOf("e") != -1 || string.indexOf("E") != -1) { return Double.valueOf(sign + string); } else { return Long.valueOf(sign + string,10); } } catch (NumberFormatException e) { IOException iox = new IOException("Invalid number literal " + onLineCol(l,c)); iox.initCause(e); throw iox; } }
class class_name[name] begin[{] method[readNumber, return_type[type[Number]], modifier[private], parameter[]] begin[{] local_variable[type[StringBuffer], sb] local_variable[type[int], l] local_variable[type[int], c] while[call[.isDigitChar, parameter[member[.lastChar]]]] begin[{] call[sb.append, parameter[Cast(expression=MemberReference(member=lastChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=char))]] call[.readChar, parameter[]] end[}] local_variable[type[String], string] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='.')], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=string, selectors=[], type_arguments=None), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=string, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), name=sign)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="-")], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=string, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=sign, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="-")), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=string, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=string, selectors=[], type_arguments=None)), label=None)])), IfStatement(condition=MethodInvocation(arguments=[], member=toUpperCase, postfix_operators=[], prefix_operators=[], qualifier=string, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="0X")], member=startsWith, 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=[BinaryOperation(operandl=MemberReference(member=sign, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=string, selectors=[], type_arguments=None), operator=+), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="0")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=string, selectors=[], type_arguments=None), else_statement=IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="0")], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=string, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=string, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=sign, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=string, selectors=[], type_arguments=None), operator=+), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=ClassCreator(arguments=[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=Long, sub_type=None)), label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="e")], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=string, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator=!=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="E")], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=string, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator=!=), operator=||), else_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=sign, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=string, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=sign, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=string, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid number literal "), operandr=MethodInvocation(arguments=[MemberReference(member=l, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onLineCol, postfix_operators=[], prefix_operators=[], qualifier=, 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=IOException, sub_type=None)), name=iox)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=IOException, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=initCause, postfix_operators=[], prefix_operators=[], qualifier=iox, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=MemberReference(member=iox, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['NumberFormatException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] identifier[Number] identifier[readNumber] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[StringBuffer] identifier[sb] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[l] operator[=] identifier[lineNo] operator[SEP] Keyword[int] identifier[c] operator[=] identifier[colNo] operator[SEP] Keyword[while] operator[SEP] identifier[isDigitChar] operator[SEP] identifier[lastChar] operator[SEP] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] operator[SEP] Keyword[char] operator[SEP] identifier[lastChar] operator[SEP] operator[SEP] identifier[readChar] operator[SEP] operator[SEP] operator[SEP] } identifier[String] identifier[string] operator[=] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] operator[-] Other[1] operator[!=] identifier[string] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] identifier[Double] operator[SEP] identifier[valueOf] operator[SEP] identifier[string] operator[SEP] operator[SEP] } identifier[String] identifier[sign] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[string] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[sign] operator[=] literal[String] operator[SEP] identifier[string] operator[=] identifier[string] operator[SEP] identifier[substring] operator[SEP] Other[1] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[string] operator[SEP] identifier[toUpperCase] operator[SEP] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] identifier[Long] operator[SEP] identifier[valueOf] operator[SEP] identifier[sign] operator[+] identifier[string] operator[SEP] identifier[substring] operator[SEP] Other[2] operator[SEP] , Other[16] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[string] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[Long] operator[SEP] Other[0] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[string] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[&&] identifier[string] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[1] operator[SEP] { Keyword[return] identifier[Long] operator[SEP] identifier[valueOf] operator[SEP] identifier[sign] operator[+] identifier[string] operator[SEP] identifier[substring] operator[SEP] Other[1] operator[SEP] , Other[8] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[string] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[!=] operator[-] Other[1] operator[||] identifier[string] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[!=] operator[-] Other[1] operator[SEP] { Keyword[return] identifier[Double] operator[SEP] identifier[valueOf] operator[SEP] identifier[sign] operator[+] identifier[string] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[Long] operator[SEP] identifier[valueOf] operator[SEP] identifier[sign] operator[+] identifier[string] , Other[10] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[NumberFormatException] identifier[e] operator[SEP] { identifier[IOException] identifier[iox] operator[=] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[onLineCol] operator[SEP] identifier[l] , identifier[c] operator[SEP] operator[SEP] operator[SEP] identifier[iox] operator[SEP] identifier[initCause] operator[SEP] identifier[e] operator[SEP] operator[SEP] Keyword[throw] identifier[iox] operator[SEP] } }
public int getScrollableBlockIncrement ( Rectangle visibleRect, int orientation, int direction) { if (orientation == SwingConstants.HORIZONTAL) { return visibleRect.width; } else { return visibleRect.height; } }
class class_name[name] begin[{] method[getScrollableBlockIncrement, return_type[type[int]], modifier[public], parameter[visibleRect, orientation, direction]] begin[{] if[binary_operation[member[.orientation], ==, member[SwingConstants.HORIZONTAL]]] begin[{] return[member[visibleRect.width]] else begin[{] return[member[visibleRect.height]] end[}] end[}] END[}]
Keyword[public] Keyword[int] identifier[getScrollableBlockIncrement] operator[SEP] identifier[Rectangle] identifier[visibleRect] , Keyword[int] identifier[orientation] , Keyword[int] identifier[direction] operator[SEP] { Keyword[if] operator[SEP] identifier[orientation] operator[==] identifier[SwingConstants] operator[SEP] identifier[HORIZONTAL] operator[SEP] { Keyword[return] identifier[visibleRect] operator[SEP] identifier[width] operator[SEP] } Keyword[else] { Keyword[return] identifier[visibleRect] operator[SEP] identifier[height] operator[SEP] } }
@Override public boolean getIsReplicated() { for (StmtTableScan tableScan : m_subqueryStmt.allScans()) { if ( ! tableScan.getIsReplicated()) { return false; } } return true; }
class class_name[name] begin[{] method[getIsReplicated, return_type[type[boolean]], modifier[public], parameter[]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getIsReplicated, postfix_operators=[], prefix_operators=['!'], qualifier=tableScan, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=allScans, postfix_operators=[], prefix_operators=[], qualifier=m_subqueryStmt, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=tableScan)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StmtTableScan, sub_type=None))), label=None) return[literal[true]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[getIsReplicated] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[StmtTableScan] identifier[tableScan] operator[:] identifier[m_subqueryStmt] operator[SEP] identifier[allScans] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[tableScan] operator[SEP] identifier[getIsReplicated] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
public synchronized static SSLSocketFactory getTrustingSSLSocketFactory() { if (socketFactory != null) return socketFactory; TrustManager[] trustManagers = new TrustManager[] { new TrustEverythingSSLTrustManager() }; SSLContext sc; try { sc = SSLContext.getInstance("SSL"); sc.init(null, trustManagers, null); } catch (GeneralSecurityException e) { throw new RuntimeException("This is a BUG in Selenium; please report it", e); } socketFactory = sc.getSocketFactory(); return socketFactory; }
class class_name[name] begin[{] method[getTrustingSSLSocketFactory, return_type[type[SSLSocketFactory]], modifier[synchronized public static], parameter[]] begin[{] if[binary_operation[member[.socketFactory], !=, literal[null]]] begin[{] return[member[.socketFactory]] else begin[{] None end[}] local_variable[type[TrustManager], trustManagers] local_variable[type[SSLContext], sc] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=sc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="SSL")], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=SSLContext, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=trustManagers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=init, postfix_operators=[], prefix_operators=[], qualifier=sc, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="This is a BUG in Selenium; please report it"), 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=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['GeneralSecurityException']))], finally_block=None, label=None, resources=None) assign[member[.socketFactory], call[sc.getSocketFactory, parameter[]]] return[member[.socketFactory]] end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[static] identifier[SSLSocketFactory] identifier[getTrustingSSLSocketFactory] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[socketFactory] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[socketFactory] operator[SEP] identifier[TrustManager] operator[SEP] operator[SEP] identifier[trustManagers] operator[=] Keyword[new] identifier[TrustManager] operator[SEP] operator[SEP] { Keyword[new] identifier[TrustEverythingSSLTrustManager] operator[SEP] operator[SEP] } operator[SEP] identifier[SSLContext] identifier[sc] operator[SEP] Keyword[try] { identifier[sc] operator[=] identifier[SSLContext] operator[SEP] identifier[getInstance] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sc] operator[SEP] identifier[init] operator[SEP] Other[null] , identifier[trustManagers] , Other[null] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[GeneralSecurityException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } identifier[socketFactory] operator[=] identifier[sc] operator[SEP] identifier[getSocketFactory] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[socketFactory] operator[SEP] }
static DiscordianDate create(int prolepticYear, int month, int dayOfMonth) { DiscordianChronology.YEAR_RANGE.checkValidValue(prolepticYear, YEAR); DiscordianChronology.MONTH_OF_YEAR_RANGE.checkValidValue(month, MONTH_OF_YEAR); DiscordianChronology.DAY_OF_MONTH_RANGE.checkValidValue(dayOfMonth, DAY_OF_MONTH); if (month == 0 || dayOfMonth == 0) { if (month != 0 || dayOfMonth != 0) { throw new DateTimeException("Invalid date '" + month + " " + dayOfMonth + "' as St. Tib's Day is the only special day inserted in a non-existent month."); } else if (!DiscordianChronology.INSTANCE.isLeapYear(prolepticYear)) { throw new DateTimeException("Invalid date 'St. Tibs Day' as '" + prolepticYear + "' is not a leap year"); } } return new DiscordianDate(prolepticYear, month, dayOfMonth); }
class class_name[name] begin[{] method[create, return_type[type[DiscordianDate]], modifier[static], parameter[prolepticYear, month, dayOfMonth]] begin[{] call[DiscordianChronology.YEAR_RANGE.checkValidValue, parameter[member[.prolepticYear], member[.YEAR]]] call[DiscordianChronology.MONTH_OF_YEAR_RANGE.checkValidValue, parameter[member[.month], member[.MONTH_OF_YEAR]]] call[DiscordianChronology.DAY_OF_MONTH_RANGE.checkValidValue, parameter[member[.dayOfMonth], member[.DAY_OF_MONTH]]] if[binary_operation[binary_operation[member[.month], ==, literal[0]], ||, binary_operation[member[.dayOfMonth], ==, literal[0]]]] begin[{] if[binary_operation[binary_operation[member[.month], !=, literal[0]], ||, binary_operation[member[.dayOfMonth], !=, literal[0]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid date '"), operandr=MemberReference(member=month, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" "), operator=+), operandr=MemberReference(member=dayOfMonth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' as St. Tib's Day is the only special day inserted in a non-existent month."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DateTimeException, sub_type=None)), label=None) else begin[{] if[call[DiscordianChronology.INSTANCE.isLeapYear, parameter[member[.prolepticYear]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid date 'St. Tibs Day' as '"), operandr=MemberReference(member=prolepticYear, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' is not a leap year"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DateTimeException, sub_type=None)), label=None) else begin[{] None end[}] end[}] else begin[{] None end[}] return[ClassCreator(arguments=[MemberReference(member=prolepticYear, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=month, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=dayOfMonth, 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=DiscordianDate, sub_type=None))] end[}] END[}]
Keyword[static] identifier[DiscordianDate] identifier[create] operator[SEP] Keyword[int] identifier[prolepticYear] , Keyword[int] identifier[month] , Keyword[int] identifier[dayOfMonth] operator[SEP] { identifier[DiscordianChronology] operator[SEP] identifier[YEAR_RANGE] operator[SEP] identifier[checkValidValue] operator[SEP] identifier[prolepticYear] , identifier[YEAR] operator[SEP] operator[SEP] identifier[DiscordianChronology] operator[SEP] identifier[MONTH_OF_YEAR_RANGE] operator[SEP] identifier[checkValidValue] operator[SEP] identifier[month] , identifier[MONTH_OF_YEAR] operator[SEP] operator[SEP] identifier[DiscordianChronology] operator[SEP] identifier[DAY_OF_MONTH_RANGE] operator[SEP] identifier[checkValidValue] operator[SEP] identifier[dayOfMonth] , identifier[DAY_OF_MONTH] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[month] operator[==] Other[0] operator[||] identifier[dayOfMonth] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[month] operator[!=] Other[0] operator[||] identifier[dayOfMonth] operator[!=] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[DateTimeException] operator[SEP] literal[String] operator[+] identifier[month] operator[+] literal[String] operator[+] identifier[dayOfMonth] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[!] identifier[DiscordianChronology] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[isLeapYear] operator[SEP] identifier[prolepticYear] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[DateTimeException] operator[SEP] literal[String] operator[+] identifier[prolepticYear] operator[+] literal[String] operator[SEP] operator[SEP] } } Keyword[return] Keyword[new] identifier[DiscordianDate] operator[SEP] identifier[prolepticYear] , identifier[month] , identifier[dayOfMonth] operator[SEP] operator[SEP] }
@Override public RecordStreamWithMetadata<DO, SO> processStream(RecordStreamWithMetadata<DI, SI> inputStream, WorkUnitState workUnitState) throws SchemaConversionException { return this.embeddedConverter.processStream(inputStream, workUnitState); }
class class_name[name] begin[{] method[processStream, return_type[type[RecordStreamWithMetadata]], modifier[public], parameter[inputStream, workUnitState]] begin[{] return[THIS[member[None.embeddedConverter]call[None.processStream, parameter[member[.inputStream], member[.workUnitState]]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[RecordStreamWithMetadata] operator[<] identifier[DO] , identifier[SO] operator[>] identifier[processStream] operator[SEP] identifier[RecordStreamWithMetadata] operator[<] identifier[DI] , identifier[SI] operator[>] identifier[inputStream] , identifier[WorkUnitState] identifier[workUnitState] operator[SEP] Keyword[throws] identifier[SchemaConversionException] { Keyword[return] Keyword[this] operator[SEP] identifier[embeddedConverter] operator[SEP] identifier[processStream] operator[SEP] identifier[inputStream] , identifier[workUnitState] operator[SEP] operator[SEP] }
protected static Function<Triple, Triple> convertMementoReferences( final IdentifierConverter<Resource, FedoraResource> translator, final IdentifierConverter<Resource, FedoraResource> internalTranslator) { return t -> { final String subjectURI = t.getSubject().getURI(); // Remove any hash components from the subject while locating the original resource final String subjectPath; final int hashIndex = subjectURI.indexOf("#"); if (hashIndex != -1) { subjectPath = subjectURI.substring(0, hashIndex); } else { subjectPath = subjectURI; } final Resource subject = createResource(subjectPath); final FedoraResource subjResc = translator.convert(subject); org.apache.jena.graph.Node subjectNode = translator.reverse().convert(subjResc.getOriginalResource()).asNode(); // Add the hash component back into the subject uri. Note: we cannot convert the memento hash URI // to the original as a jcr node, as the hash may not exist for the original at this point. if (hashIndex != -1) { subjectNode = createURI(subjectNode.getURI() + subjectURI.substring(hashIndex)); } org.apache.jena.graph.Node objectNode = t.getObject(); if (t.getObject().isURI()) { final Resource object = createResource(t.getObject().getURI()); if (internalTranslator.inDomain(object)) { final FedoraResource objResc = internalTranslator.convert(object); final Resource newObject = translator.reverse().convert(objResc); objectNode = newObject.asNode(); } } return new Triple(subjectNode, t.getPredicate(), objectNode); }; }
class class_name[name] begin[{] method[convertMementoReferences, return_type[type[Function]], modifier[static protected], parameter[translator, internalTranslator]] begin[{] return[LambdaExpression(body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getSubject, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[MethodInvocation(arguments=[], member=getURI, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=subjectURI)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=subjectPath)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="#")], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=subjectURI, selectors=[], type_arguments=None), name=hashIndex)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=hashIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=subjectPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=subjectURI, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=subjectPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=hashIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=subjectURI, selectors=[], type_arguments=None)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=subjectPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createResource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=subject)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Resource, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=subject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convert, postfix_operators=[], prefix_operators=[], qualifier=translator, selectors=[], type_arguments=None), name=subjResc)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=FedoraResource, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=reverse, postfix_operators=[], prefix_operators=[], qualifier=translator, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getOriginalResource, postfix_operators=[], prefix_operators=[], qualifier=subjResc, selectors=[], type_arguments=None)], member=convert, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=asNode, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=subjectNode)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=org, sub_type=ReferenceType(arguments=None, dimensions=None, name=apache, sub_type=ReferenceType(arguments=None, dimensions=None, name=jena, sub_type=ReferenceType(arguments=None, dimensions=None, name=graph, sub_type=ReferenceType(arguments=None, dimensions=None, name=Node, sub_type=None)))))), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=hashIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=subjectNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=getURI, postfix_operators=[], prefix_operators=[], qualifier=subjectNode, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=hashIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=subjectURI, selectors=[], type_arguments=None), operator=+)], member=createURI, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getObject, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None), name=objectNode)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=org, sub_type=ReferenceType(arguments=None, dimensions=None, name=apache, sub_type=ReferenceType(arguments=None, dimensions=None, name=jena, sub_type=ReferenceType(arguments=None, dimensions=None, name=graph, sub_type=ReferenceType(arguments=None, dimensions=None, name=Node, sub_type=None)))))), IfStatement(condition=MethodInvocation(arguments=[], member=getObject, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[MethodInvocation(arguments=[], member=isURI, 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=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getObject, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[MethodInvocation(arguments=[], member=getURI, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=createResource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=object)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Resource, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=inDomain, postfix_operators=[], prefix_operators=[], qualifier=internalTranslator, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convert, postfix_operators=[], prefix_operators=[], qualifier=internalTranslator, selectors=[], type_arguments=None), name=objResc)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=FedoraResource, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=reverse, postfix_operators=[], prefix_operators=[], qualifier=translator, selectors=[MethodInvocation(arguments=[MemberReference(member=objResc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convert, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=newObject)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Resource, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=objectNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=asNode, postfix_operators=[], prefix_operators=[], qualifier=newObject, selectors=[], type_arguments=None)), label=None)]))])), ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=subjectNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getPredicate, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None), MemberReference(member=objectNode, 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=Triple, sub_type=None)), label=None)], parameters=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])] end[}] END[}]
Keyword[protected] Keyword[static] identifier[Function] operator[<] identifier[Triple] , identifier[Triple] operator[>] identifier[convertMementoReferences] operator[SEP] Keyword[final] identifier[IdentifierConverter] operator[<] identifier[Resource] , identifier[FedoraResource] operator[>] identifier[translator] , Keyword[final] identifier[IdentifierConverter] operator[<] identifier[Resource] , identifier[FedoraResource] operator[>] identifier[internalTranslator] operator[SEP] { Keyword[return] identifier[t] operator[->] { Keyword[final] identifier[String] identifier[subjectURI] operator[=] identifier[t] operator[SEP] identifier[getSubject] operator[SEP] operator[SEP] operator[SEP] identifier[getURI] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[subjectPath] operator[SEP] Keyword[final] Keyword[int] identifier[hashIndex] operator[=] identifier[subjectURI] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[hashIndex] operator[!=] operator[-] Other[1] operator[SEP] { identifier[subjectPath] operator[=] identifier[subjectURI] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[hashIndex] operator[SEP] operator[SEP] } Keyword[else] { identifier[subjectPath] operator[=] identifier[subjectURI] operator[SEP] } Keyword[final] identifier[Resource] identifier[subject] operator[=] identifier[createResource] operator[SEP] identifier[subjectPath] operator[SEP] operator[SEP] Keyword[final] identifier[FedoraResource] identifier[subjResc] operator[=] identifier[translator] operator[SEP] identifier[convert] operator[SEP] identifier[subject] operator[SEP] operator[SEP] identifier[org] operator[SEP] identifier[apache] operator[SEP] identifier[jena] operator[SEP] identifier[graph] operator[SEP] identifier[Node] identifier[subjectNode] operator[=] identifier[translator] operator[SEP] identifier[reverse] operator[SEP] operator[SEP] operator[SEP] identifier[convert] operator[SEP] identifier[subjResc] operator[SEP] identifier[getOriginalResource] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[asNode] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[hashIndex] operator[!=] operator[-] Other[1] operator[SEP] { identifier[subjectNode] operator[=] identifier[createURI] operator[SEP] identifier[subjectNode] operator[SEP] identifier[getURI] operator[SEP] operator[SEP] operator[+] identifier[subjectURI] operator[SEP] identifier[substring] operator[SEP] identifier[hashIndex] operator[SEP] operator[SEP] operator[SEP] } identifier[org] operator[SEP] identifier[apache] operator[SEP] identifier[jena] operator[SEP] identifier[graph] operator[SEP] identifier[Node] identifier[objectNode] operator[=] identifier[t] operator[SEP] identifier[getObject] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[t] operator[SEP] identifier[getObject] operator[SEP] operator[SEP] operator[SEP] identifier[isURI] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[Resource] identifier[object] operator[=] identifier[createResource] operator[SEP] identifier[t] operator[SEP] identifier[getObject] operator[SEP] operator[SEP] operator[SEP] identifier[getURI] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[internalTranslator] operator[SEP] identifier[inDomain] operator[SEP] identifier[object] operator[SEP] operator[SEP] { Keyword[final] identifier[FedoraResource] identifier[objResc] operator[=] identifier[internalTranslator] operator[SEP] identifier[convert] operator[SEP] identifier[object] operator[SEP] operator[SEP] Keyword[final] identifier[Resource] identifier[newObject] operator[=] identifier[translator] operator[SEP] identifier[reverse] operator[SEP] operator[SEP] operator[SEP] identifier[convert] operator[SEP] identifier[objResc] operator[SEP] operator[SEP] identifier[objectNode] operator[=] identifier[newObject] operator[SEP] identifier[asNode] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] Keyword[new] identifier[Triple] operator[SEP] identifier[subjectNode] , identifier[t] operator[SEP] identifier[getPredicate] operator[SEP] operator[SEP] , identifier[objectNode] operator[SEP] operator[SEP] } operator[SEP] }
private static Environment of(@NonNull InputStream is) { try { var environment = new Environment(); environment.props.load(new InputStreamReader(is, "UTF-8")); return environment; } catch (IOException e) { throw new IllegalStateException(e); } finally { IOKit.closeQuietly(is); } }
class class_name[name] begin[{] method[of, return_type[type[Environment]], modifier[private static], parameter[is]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Environment, sub_type=None)), name=environment)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=var, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="UTF-8")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InputStreamReader, sub_type=None))], member=load, postfix_operators=[], prefix_operators=[], qualifier=environment.props, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=environment, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[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=IllegalStateException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=closeQuietly, postfix_operators=[], prefix_operators=[], qualifier=IOKit, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[static] identifier[Environment] identifier[of] operator[SEP] annotation[@] identifier[NonNull] identifier[InputStream] identifier[is] operator[SEP] { Keyword[try] { identifier[var] identifier[environment] operator[=] Keyword[new] identifier[Environment] operator[SEP] operator[SEP] operator[SEP] identifier[environment] operator[SEP] identifier[props] operator[SEP] identifier[load] operator[SEP] Keyword[new] identifier[InputStreamReader] operator[SEP] identifier[is] , literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[environment] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[finally] { identifier[IOKit] operator[SEP] identifier[closeQuietly] operator[SEP] identifier[is] operator[SEP] operator[SEP] } }
public void ready(VirtualConnection readyVc) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "ready", readyVc); AcceptListener acceptListener = (AcceptListener) config.getPropertyBag() .get(JFapChannelFactory.ACCEPT_LISTENER); // begin F189351 if (acceptListener == null) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "null accept listener - obtaining one from factory"); acceptListener = ServerConnectionManagerImpl.getAcceptListenerFactory().manufactureAcceptListener(); } // begin F196678.10 Map properties = config.getPropertyBag(); int heartbeatInterval = determineHeartbeatInterval(properties); int heartbeatTimeout = determineHeartbeatTimeout(properties); // end F196678.10 // At this point here we leave explicit channel framework land and trot into the land of // abstraction. As such, create the channel framework implementation classes directly and // pass them into the JFap channel common code. CFWNetworkConnection conn = new CFWNetworkConnection(readyVc); InboundConnection connection = null; try { connection = new InboundConnection(new CFWNetworkConnectionContext(conn, this), conn, acceptListener, heartbeatInterval, heartbeatTimeout); } catch (FrameworkException fe) { //At this point the underlying TCP/IP connection has gone away. //We can't throw an Exception so there is little we can do here other than FFDC. //The channel framework should close everything down gracefully. FFDCFilter.processException(fe, "com.ibm.ws.sib.jfapchannel.impl.JFapInboundConnLink", JFapChannelConstants.JFAPINBOUNDCONNLINK_READY_03); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Exception occurred creating InboundConnection"); if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.exception(this, tc, fe); } if (connection != null) { ConversationImpl conversation = new ConversationImpl(Connection.FIRST_CONVERSATION_ID, true, connection, null); // begin F176003 // Try asking the user for a conversation receive listener to use ConversationReceiveListener rl = null; try { rl = acceptListener.acceptConnection(conversation); } catch (Throwable t) { FFDCFilter.processException (t, "com.ibm.ws.sib.jfapchannel.impl.JFapInboundConnLink", JFapChannelConstants.JFAPINBOUNDCONNLINK_READY_01); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Exception occurred in acceptConnection callback"); if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.exception(this, tc, t); } // If the user supplied a null receive listener, or an exception occurred in // the callback, supply a receive listener of our own as a temporary mesure // until we get the chance to close the conversation. if (rl == null) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "Null receive listener, closing conversation"); conversation.setDefaultReceiveListener(new CloseConversationReceiveListener()); try { conversation = connection.startNewConversation(conversation); conversation.close(); // D196125 } catch (SIException e) { FFDCFilter.processException (e, "com.ibm.ws.sib.jfapchannel.impl.JFapInboundConnLink", JFapChannelConstants.JFAPINBOUNDCONNLINK_READY_02); if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.exception(this, tc, e); // Something went badly wrong closing the convesation - take down the // connection. connection.invalidate(true, e, "SIConnectionLostException thrown during conversation close"); // D224570 } } else { conversation.setDefaultReceiveListener(rl); try { connection.startNewConversation(conversation); } catch (SIResourceException e) { // No FFDC code needed // (it will have been FFDC'ed at source) try { conversation.close(); } catch (SIConnectionLostException e2) { // No FFDC code needed // (it is already broken - we don't care) } connection.invalidate(true, e, "Resource exception thrown when starting new conversation"); } } } // end F176003 if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "ready"); }
class class_name[name] begin[{] method[ready, return_type[void], modifier[public], parameter[readyVc]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[THIS[], member[.tc], literal["ready"], member[.readyVc]]] else begin[{] None end[}] local_variable[type[AcceptListener], acceptListener] if[binary_operation[member[.acceptListener], ==, literal[null]]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[SibTr.debug, parameter[THIS[], member[.tc], literal["null accept listener - obtaining one from factory"]]] else begin[{] None end[}] assign[member[.acceptListener], call[ServerConnectionManagerImpl.getAcceptListenerFactory, parameter[]]] else begin[{] None end[}] local_variable[type[Map], properties] local_variable[type[int], heartbeatInterval] local_variable[type[int], heartbeatTimeout] local_variable[type[CFWNetworkConnection], conn] local_variable[type[InboundConnection], connection] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=connection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CFWNetworkConnectionContext, sub_type=None)), MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=acceptListener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=heartbeatInterval, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=heartbeatTimeout, 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=InboundConnection, sub_type=None))), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=fe, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ws.sib.jfapchannel.impl.JFapInboundConnLink"), MemberReference(member=JFAPINBOUNDCONNLINK_READY_03, postfix_operators=[], prefix_operators=[], qualifier=JFapChannelConstants, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Exception occurred creating InboundConnection")], member=debug, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isEventEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fe, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=exception, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=fe, types=['FrameworkException']))], finally_block=None, label=None, resources=None) if[binary_operation[member[.connection], !=, literal[null]]] begin[{] local_variable[type[ConversationImpl], conversation] local_variable[type[ConversationReceiveListener], rl] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=rl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=conversation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=acceptConnection, postfix_operators=[], prefix_operators=[], qualifier=acceptListener, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ws.sib.jfapchannel.impl.JFapInboundConnLink"), MemberReference(member=JFAPINBOUNDCONNLINK_READY_01, postfix_operators=[], prefix_operators=[], qualifier=JFapChannelConstants, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Exception occurred in acceptConnection callback")], member=debug, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isEventEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=exception, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=None, label=None, resources=None) if[binary_operation[member[.rl], ==, literal[null]]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[SibTr.debug, parameter[member[.tc], literal["Null receive listener, closing conversation"]]] else begin[{] None end[}] call[conversation.setDefaultReceiveListener, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CloseConversationReceiveListener, sub_type=None))]] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=conversation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=conversation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=startNewConversation, postfix_operators=[], prefix_operators=[], qualifier=connection, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=conversation, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ws.sib.jfapchannel.impl.JFapInboundConnLink"), MemberReference(member=JFAPINBOUNDCONNLINK_READY_02, postfix_operators=[], prefix_operators=[], qualifier=JFapChannelConstants, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isEventEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=exception, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="SIConnectionLostException thrown during conversation close")], member=invalidate, postfix_operators=[], prefix_operators=[], qualifier=connection, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SIException']))], finally_block=None, label=None, resources=None) else begin[{] call[conversation.setDefaultReceiveListener, parameter[member[.rl]]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=conversation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=startNewConversation, postfix_operators=[], prefix_operators=[], qualifier=connection, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=conversation, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e2, types=['SIConnectionLostException']))], finally_block=None, label=None, resources=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Resource exception thrown when starting new conversation")], member=invalidate, postfix_operators=[], prefix_operators=[], qualifier=connection, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SIResourceException']))], finally_block=None, label=None, resources=None) end[}] else begin[{] None end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[THIS[], member[.tc], literal["ready"]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[ready] operator[SEP] identifier[VirtualConnection] identifier[readyVc] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] Keyword[this] , identifier[tc] , literal[String] , identifier[readyVc] operator[SEP] operator[SEP] identifier[AcceptListener] identifier[acceptListener] operator[=] operator[SEP] identifier[AcceptListener] operator[SEP] identifier[config] operator[SEP] identifier[getPropertyBag] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[JFapChannelFactory] operator[SEP] identifier[ACCEPT_LISTENER] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[acceptListener] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] identifier[acceptListener] operator[=] identifier[ServerConnectionManagerImpl] operator[SEP] identifier[getAcceptListenerFactory] operator[SEP] operator[SEP] operator[SEP] identifier[manufactureAcceptListener] operator[SEP] operator[SEP] operator[SEP] } identifier[Map] identifier[properties] operator[=] identifier[config] operator[SEP] identifier[getPropertyBag] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[heartbeatInterval] operator[=] identifier[determineHeartbeatInterval] operator[SEP] identifier[properties] operator[SEP] operator[SEP] Keyword[int] identifier[heartbeatTimeout] operator[=] identifier[determineHeartbeatTimeout] operator[SEP] identifier[properties] operator[SEP] operator[SEP] identifier[CFWNetworkConnection] identifier[conn] operator[=] Keyword[new] identifier[CFWNetworkConnection] operator[SEP] identifier[readyVc] operator[SEP] operator[SEP] identifier[InboundConnection] identifier[connection] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[connection] operator[=] Keyword[new] identifier[InboundConnection] operator[SEP] Keyword[new] identifier[CFWNetworkConnectionContext] operator[SEP] identifier[conn] , Keyword[this] operator[SEP] , identifier[conn] , identifier[acceptListener] , identifier[heartbeatInterval] , identifier[heartbeatTimeout] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[FrameworkException] identifier[fe] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[fe] , literal[String] , identifier[JFapChannelConstants] operator[SEP] identifier[JFAPINBOUNDCONNLINK_READY_03] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEventEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exception] operator[SEP] Keyword[this] , identifier[tc] , identifier[fe] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[connection] operator[!=] Other[null] operator[SEP] { identifier[ConversationImpl] identifier[conversation] operator[=] Keyword[new] identifier[ConversationImpl] operator[SEP] identifier[Connection] operator[SEP] identifier[FIRST_CONVERSATION_ID] , literal[boolean] , identifier[connection] , Other[null] operator[SEP] operator[SEP] identifier[ConversationReceiveListener] identifier[rl] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[rl] operator[=] identifier[acceptListener] operator[SEP] identifier[acceptConnection] operator[SEP] identifier[conversation] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[t] , literal[String] , identifier[JFapChannelConstants] operator[SEP] identifier[JFAPINBOUNDCONNLINK_READY_01] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEventEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exception] operator[SEP] Keyword[this] , identifier[tc] , identifier[t] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[rl] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] identifier[conversation] operator[SEP] identifier[setDefaultReceiveListener] operator[SEP] Keyword[new] identifier[CloseConversationReceiveListener] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[conversation] operator[=] identifier[connection] operator[SEP] identifier[startNewConversation] operator[SEP] identifier[conversation] operator[SEP] operator[SEP] identifier[conversation] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SIException] identifier[e] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[e] , literal[String] , identifier[JFapChannelConstants] operator[SEP] identifier[JFAPINBOUNDCONNLINK_READY_02] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEventEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exception] operator[SEP] Keyword[this] , identifier[tc] , identifier[e] operator[SEP] operator[SEP] identifier[connection] operator[SEP] identifier[invalidate] operator[SEP] literal[boolean] , identifier[e] , literal[String] operator[SEP] operator[SEP] } } Keyword[else] { identifier[conversation] operator[SEP] identifier[setDefaultReceiveListener] operator[SEP] identifier[rl] operator[SEP] operator[SEP] Keyword[try] { identifier[connection] operator[SEP] identifier[startNewConversation] operator[SEP] identifier[conversation] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SIResourceException] identifier[e] operator[SEP] { Keyword[try] { identifier[conversation] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SIConnectionLostException] identifier[e2] operator[SEP] { } identifier[connection] operator[SEP] identifier[invalidate] operator[SEP] literal[boolean] , identifier[e] , literal[String] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] }
@Override public String getLabel() { if (label != null) // LIGHTWEIGHT EDGE return label; else if (rawElement != null) { if (settings != null && settings.isUseClassForEdgeLabel()) { final String clsName = getRecord().getClassName(); if (!OrientEdgeType.CLASS_NAME.equals(clsName)) // RETURN THE CLASS NAME return OrientBaseGraph.decodeClassName(clsName); } setCurrentGraphInThreadLocal(); final ODocument doc = rawElement.getRecord(); if (doc == null) return null; final String label = doc.field(OrientElement.LABEL_FIELD_NAME); if (label != null) return OrientBaseGraph.decodeClassName(label); } return null; }
class class_name[name] begin[{] method[getLabel, return_type[type[String]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.label], !=, literal[null]]] begin[{] return[member[.label]] else begin[{] if[binary_operation[member[.rawElement], !=, literal[null]]] begin[{] if[binary_operation[binary_operation[member[.settings], !=, literal[null]], &&, call[settings.isUseClassForEdgeLabel, parameter[]]]] begin[{] local_variable[type[String], clsName] if[call[OrientEdgeType.CLASS_NAME.equals, parameter[member[.clsName]]]] begin[{] return[call[OrientBaseGraph.decodeClassName, parameter[member[.clsName]]]] else begin[{] None end[}] else begin[{] None end[}] call[.setCurrentGraphInThreadLocal, parameter[]] local_variable[type[ODocument], doc] if[binary_operation[member[.doc], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[String], label] if[binary_operation[member[.label], !=, literal[null]]] begin[{] return[call[OrientBaseGraph.decodeClassName, parameter[member[.label]]]] else begin[{] None end[}] else begin[{] None end[}] end[}] return[literal[null]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[getLabel] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[label] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[label] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[rawElement] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[settings] operator[!=] Other[null] operator[&&] identifier[settings] operator[SEP] identifier[isUseClassForEdgeLabel] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[String] identifier[clsName] operator[=] identifier[getRecord] operator[SEP] operator[SEP] operator[SEP] identifier[getClassName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[OrientEdgeType] operator[SEP] identifier[CLASS_NAME] operator[SEP] identifier[equals] operator[SEP] identifier[clsName] operator[SEP] operator[SEP] Keyword[return] identifier[OrientBaseGraph] operator[SEP] identifier[decodeClassName] operator[SEP] identifier[clsName] operator[SEP] operator[SEP] } identifier[setCurrentGraphInThreadLocal] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[ODocument] identifier[doc] operator[=] identifier[rawElement] operator[SEP] identifier[getRecord] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[doc] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[final] identifier[String] identifier[label] operator[=] identifier[doc] operator[SEP] identifier[field] operator[SEP] identifier[OrientElement] operator[SEP] identifier[LABEL_FIELD_NAME] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[label] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[OrientBaseGraph] operator[SEP] identifier[decodeClassName] operator[SEP] identifier[label] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
private synchronized boolean pessimisticInsert( InsertStack stack, Object new1) { _vno++; if ((_vno&1) == 1) { if (root() == null) { addFirstNode(new1); _population++; } else { InsertNodes point = stack.insertNodes(); findInsert( point, stack, new1); if (point.isDuplicate()) stack.markDuplicate(); else { finishInsert(point, stack, new1); _population++; } } } synchronized(stack) { } _vno++; _pessimisticInserts++; return optimisticWorked; }
class class_name[name] begin[{] method[pessimisticInsert, return_type[type[boolean]], modifier[synchronized private], parameter[stack, new1]] begin[{] member[._vno] if[binary_operation[binary_operation[member[._vno], &, literal[1]], ==, literal[1]]] begin[{] if[binary_operation[call[.root, parameter[]], ==, literal[null]]] begin[{] call[.addFirstNode, parameter[member[.new1]]] member[._population] else begin[{] local_variable[type[InsertNodes], point] call[.findInsert, parameter[member[.point], member[.stack], member[.new1]]] if[call[point.isDuplicate, parameter[]]] begin[{] call[stack.markDuplicate, parameter[]] else begin[{] call[.finishInsert, parameter[member[.point], member[.stack], member[.new1]]] member[._population] end[}] end[}] else begin[{] None end[}] SYNCHRONIZED[member[.stack]] BEGIN[{] END[}] member[._vno] member[._pessimisticInserts] return[member[.optimisticWorked]] end[}] END[}]
Keyword[private] Keyword[synchronized] Keyword[boolean] identifier[pessimisticInsert] operator[SEP] identifier[InsertStack] identifier[stack] , identifier[Object] identifier[new1] operator[SEP] { identifier[_vno] operator[++] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[_vno] operator[&] Other[1] operator[SEP] operator[==] Other[1] operator[SEP] { Keyword[if] operator[SEP] identifier[root] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[addFirstNode] operator[SEP] identifier[new1] operator[SEP] operator[SEP] identifier[_population] operator[++] operator[SEP] } Keyword[else] { identifier[InsertNodes] identifier[point] operator[=] identifier[stack] operator[SEP] identifier[insertNodes] operator[SEP] operator[SEP] operator[SEP] identifier[findInsert] operator[SEP] identifier[point] , identifier[stack] , identifier[new1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[point] operator[SEP] identifier[isDuplicate] operator[SEP] operator[SEP] operator[SEP] identifier[stack] operator[SEP] identifier[markDuplicate] operator[SEP] operator[SEP] operator[SEP] Keyword[else] { identifier[finishInsert] operator[SEP] identifier[point] , identifier[stack] , identifier[new1] operator[SEP] operator[SEP] identifier[_population] operator[++] operator[SEP] } } } Keyword[synchronized] operator[SEP] identifier[stack] operator[SEP] { } identifier[_vno] operator[++] operator[SEP] identifier[_pessimisticInserts] operator[++] operator[SEP] Keyword[return] identifier[optimisticWorked] operator[SEP] }
protected Http buildHttpPostAuthRequest() { return new Http(HttpMethod.POST.name(), duoProperties.getDuoApiHost(), String.format("/auth/v%s/auth", AUTH_API_VERSION)); }
class class_name[name] begin[{] method[buildHttpPostAuthRequest, return_type[type[Http]], modifier[protected], parameter[]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=name, postfix_operators=[], prefix_operators=[], qualifier=HttpMethod.POST, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getDuoApiHost, postfix_operators=[], prefix_operators=[], qualifier=duoProperties, selectors=[], type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/auth/v%s/auth"), MemberReference(member=AUTH_API_VERSION, postfix_operators=[], prefix_operators=[], qualifier=, 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=Http, sub_type=None))] end[}] END[}]
Keyword[protected] identifier[Http] identifier[buildHttpPostAuthRequest] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[Http] operator[SEP] identifier[HttpMethod] operator[SEP] identifier[POST] operator[SEP] identifier[name] operator[SEP] operator[SEP] , identifier[duoProperties] operator[SEP] identifier[getDuoApiHost] operator[SEP] operator[SEP] , identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[AUTH_API_VERSION] operator[SEP] operator[SEP] operator[SEP] }
public void setSeqnum(Integer newSeqnum) { Integer oldSeqnum = seqnum; seqnum = newSeqnum; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.UP_3I_FINISHING_OPERATION__SEQNUM, oldSeqnum, seqnum)); }
class class_name[name] begin[{] method[setSeqnum, return_type[void], modifier[public], parameter[newSeqnum]] begin[{] local_variable[type[Integer], oldSeqnum] assign[member[.seqnum], member[.newSeqnum]] if[call[.eNotificationRequired, parameter[]]] begin[{] call[.eNotify, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=SET, postfix_operators=[], prefix_operators=[], qualifier=Notification, selectors=[]), MemberReference(member=UP_3I_FINISHING_OPERATION__SEQNUM, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[]), MemberReference(member=oldSeqnum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=seqnum, 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=ENotificationImpl, sub_type=None))]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setSeqnum] operator[SEP] identifier[Integer] identifier[newSeqnum] operator[SEP] { identifier[Integer] identifier[oldSeqnum] operator[=] identifier[seqnum] operator[SEP] identifier[seqnum] operator[=] identifier[newSeqnum] operator[SEP] Keyword[if] operator[SEP] identifier[eNotificationRequired] operator[SEP] operator[SEP] operator[SEP] identifier[eNotify] operator[SEP] Keyword[new] identifier[ENotificationImpl] operator[SEP] Keyword[this] , identifier[Notification] operator[SEP] identifier[SET] , identifier[AfplibPackage] operator[SEP] identifier[UP_3I_FINISHING_OPERATION__SEQNUM] , identifier[oldSeqnum] , identifier[seqnum] operator[SEP] operator[SEP] operator[SEP] }
public void setPort(int p_port) throws MalformedURIException { if (p_port >= 0 && p_port <= 65535) { if (m_host == null) { throw new MalformedURIException( XMLMessages.createXMLMessage(XMLErrorResources.ER_PORT_WHEN_HOST_NULL, null)); //"Port cannot be set when host is null!"); } } else if (p_port != -1) { throw new MalformedURIException(XMLMessages.createXMLMessage(XMLErrorResources.ER_INVALID_PORT, null)); //"Invalid port number!"); } m_port = p_port; }
class class_name[name] begin[{] method[setPort, return_type[void], modifier[public], parameter[p_port]] begin[{] if[binary_operation[binary_operation[member[.p_port], >=, literal[0]], &&, binary_operation[member[.p_port], <=, literal[65535]]]] begin[{] if[binary_operation[member[.m_host], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=ER_PORT_WHEN_HOST_NULL, postfix_operators=[], prefix_operators=[], qualifier=XMLErrorResources, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=createXMLMessage, postfix_operators=[], prefix_operators=[], qualifier=XMLMessages, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MalformedURIException, sub_type=None)), label=None) else begin[{] None end[}] else begin[{] if[binary_operation[member[.p_port], !=, literal[1]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=ER_INVALID_PORT, postfix_operators=[], prefix_operators=[], qualifier=XMLErrorResources, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=createXMLMessage, postfix_operators=[], prefix_operators=[], qualifier=XMLMessages, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MalformedURIException, sub_type=None)), label=None) else begin[{] None end[}] end[}] assign[member[.m_port], member[.p_port]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setPort] operator[SEP] Keyword[int] identifier[p_port] operator[SEP] Keyword[throws] identifier[MalformedURIException] { Keyword[if] operator[SEP] identifier[p_port] operator[>=] Other[0] operator[&&] identifier[p_port] operator[<=] Other[65535] operator[SEP] { Keyword[if] operator[SEP] identifier[m_host] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[MalformedURIException] operator[SEP] identifier[XMLMessages] operator[SEP] identifier[createXMLMessage] operator[SEP] identifier[XMLErrorResources] operator[SEP] identifier[ER_PORT_WHEN_HOST_NULL] , Other[null] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[p_port] operator[!=] operator[-] Other[1] operator[SEP] { Keyword[throw] Keyword[new] identifier[MalformedURIException] operator[SEP] identifier[XMLMessages] operator[SEP] identifier[createXMLMessage] operator[SEP] identifier[XMLErrorResources] operator[SEP] identifier[ER_INVALID_PORT] , Other[null] operator[SEP] operator[SEP] operator[SEP] } identifier[m_port] operator[=] identifier[p_port] operator[SEP] }
private int primUpdate(IPermission perm, PreparedStatement ps) throws Exception { java.sql.Timestamp ts = null; // UPDATE COLUMNS: ps.clearParameters(); // TYPE: if (perm.getType() == null) { ps.setNull(1, Types.VARCHAR); } else { ps.setString(1, perm.getType()); } // EFFECTIVE: if (perm.getEffective() == null) { ps.setNull(2, Types.TIMESTAMP); } else { ts = new java.sql.Timestamp(perm.getEffective().getTime()); ps.setTimestamp(2, ts); } // EXPIRES: if (perm.getExpires() == null) { ps.setNull(3, Types.TIMESTAMP); } else { ts = new java.sql.Timestamp(perm.getExpires().getTime()); ps.setTimestamp(3, ts); } // WHERE COLUMNS: ps.setString(4, perm.getOwner()); ps.setInt(5, getPrincipalType(perm)); ps.setString(6, getPrincipalKey(perm)); ps.setString(7, perm.getActivity()); ps.setString(8, perm.getTarget()); if (log.isDebugEnabled()) log.debug("RDBMPermissionImpl.primUpdate(): " + ps); return ps.executeUpdate(); }
class class_name[name] begin[{] method[primUpdate, return_type[type[int]], modifier[private], parameter[perm, ps]] begin[{] local_variable[type[java], ts] call[ps.clearParameters, parameter[]] if[binary_operation[call[perm.getType, parameter[]], ==, literal[null]]] begin[{] call[ps.setNull, parameter[literal[1], member[Types.VARCHAR]]] else begin[{] call[ps.setString, parameter[literal[1], call[perm.getType, parameter[]]]] end[}] if[binary_operation[call[perm.getEffective, parameter[]], ==, literal[null]]] begin[{] call[ps.setNull, parameter[literal[2], member[Types.TIMESTAMP]]] else begin[{] assign[member[.ts], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getEffective, postfix_operators=[], prefix_operators=[], qualifier=perm, selectors=[MethodInvocation(arguments=[], member=getTime, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=sql, sub_type=ReferenceType(arguments=None, dimensions=None, name=Timestamp, sub_type=None))))] call[ps.setTimestamp, parameter[literal[2], member[.ts]]] end[}] if[binary_operation[call[perm.getExpires, parameter[]], ==, literal[null]]] begin[{] call[ps.setNull, parameter[literal[3], member[Types.TIMESTAMP]]] else begin[{] assign[member[.ts], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getExpires, postfix_operators=[], prefix_operators=[], qualifier=perm, selectors=[MethodInvocation(arguments=[], member=getTime, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=sql, sub_type=ReferenceType(arguments=None, dimensions=None, name=Timestamp, sub_type=None))))] call[ps.setTimestamp, parameter[literal[3], member[.ts]]] end[}] call[ps.setString, parameter[literal[4], call[perm.getOwner, parameter[]]]] call[ps.setInt, parameter[literal[5], call[.getPrincipalType, parameter[member[.perm]]]]] call[ps.setString, parameter[literal[6], call[.getPrincipalKey, parameter[member[.perm]]]]] call[ps.setString, parameter[literal[7], call[perm.getActivity, parameter[]]]] call[ps.setString, parameter[literal[8], call[perm.getTarget, parameter[]]]] if[call[log.isDebugEnabled, parameter[]]] begin[{] call[log.debug, parameter[binary_operation[literal["RDBMPermissionImpl.primUpdate(): "], +, member[.ps]]]] else begin[{] None end[}] return[call[ps.executeUpdate, parameter[]]] end[}] END[}]
Keyword[private] Keyword[int] identifier[primUpdate] operator[SEP] identifier[IPermission] identifier[perm] , identifier[PreparedStatement] identifier[ps] operator[SEP] Keyword[throws] identifier[Exception] { identifier[java] operator[SEP] identifier[sql] operator[SEP] identifier[Timestamp] identifier[ts] operator[=] Other[null] operator[SEP] identifier[ps] operator[SEP] identifier[clearParameters] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[perm] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[ps] operator[SEP] identifier[setNull] operator[SEP] Other[1] , identifier[Types] operator[SEP] identifier[VARCHAR] operator[SEP] operator[SEP] } Keyword[else] { identifier[ps] operator[SEP] identifier[setString] operator[SEP] Other[1] , identifier[perm] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[perm] operator[SEP] identifier[getEffective] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[ps] operator[SEP] identifier[setNull] operator[SEP] Other[2] , identifier[Types] operator[SEP] identifier[TIMESTAMP] operator[SEP] operator[SEP] } Keyword[else] { identifier[ts] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[sql] operator[SEP] identifier[Timestamp] operator[SEP] identifier[perm] operator[SEP] identifier[getEffective] operator[SEP] operator[SEP] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ps] operator[SEP] identifier[setTimestamp] operator[SEP] Other[2] , identifier[ts] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[perm] operator[SEP] identifier[getExpires] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[ps] operator[SEP] identifier[setNull] operator[SEP] Other[3] , identifier[Types] operator[SEP] identifier[TIMESTAMP] operator[SEP] operator[SEP] } Keyword[else] { identifier[ts] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[sql] operator[SEP] identifier[Timestamp] operator[SEP] identifier[perm] operator[SEP] identifier[getExpires] operator[SEP] operator[SEP] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ps] operator[SEP] identifier[setTimestamp] operator[SEP] Other[3] , identifier[ts] operator[SEP] operator[SEP] } identifier[ps] operator[SEP] identifier[setString] operator[SEP] Other[4] , identifier[perm] operator[SEP] identifier[getOwner] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ps] operator[SEP] identifier[setInt] operator[SEP] Other[5] , identifier[getPrincipalType] operator[SEP] identifier[perm] operator[SEP] operator[SEP] operator[SEP] identifier[ps] operator[SEP] identifier[setString] operator[SEP] Other[6] , identifier[getPrincipalKey] operator[SEP] identifier[perm] operator[SEP] operator[SEP] operator[SEP] identifier[ps] operator[SEP] identifier[setString] operator[SEP] Other[7] , identifier[perm] operator[SEP] identifier[getActivity] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ps] operator[SEP] identifier[setString] operator[SEP] Other[8] , identifier[perm] operator[SEP] identifier[getTarget] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[ps] operator[SEP] operator[SEP] Keyword[return] identifier[ps] operator[SEP] identifier[executeUpdate] operator[SEP] operator[SEP] operator[SEP] }
public static int[] today() { Calendar today = Calendar.getInstance(); int year = today.get(Calendar.YEAR); int month = today.get(Calendar.MONTH) + 1; int date = today.get(Calendar.DATE); return calElement(year, month, date); }
class class_name[name] begin[{] method[today, return_type[type[int]], modifier[public static], parameter[]] begin[{] local_variable[type[Calendar], today] local_variable[type[int], year] local_variable[type[int], month] local_variable[type[int], date] return[call[.calElement, parameter[member[.year], member[.month], member[.date]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] operator[SEP] operator[SEP] identifier[today] operator[SEP] operator[SEP] { identifier[Calendar] identifier[today] operator[=] identifier[Calendar] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[year] operator[=] identifier[today] operator[SEP] identifier[get] operator[SEP] identifier[Calendar] operator[SEP] identifier[YEAR] operator[SEP] operator[SEP] Keyword[int] identifier[month] operator[=] identifier[today] operator[SEP] identifier[get] operator[SEP] identifier[Calendar] operator[SEP] identifier[MONTH] operator[SEP] operator[+] Other[1] operator[SEP] Keyword[int] identifier[date] operator[=] identifier[today] operator[SEP] identifier[get] operator[SEP] identifier[Calendar] operator[SEP] identifier[DATE] operator[SEP] operator[SEP] Keyword[return] identifier[calElement] operator[SEP] identifier[year] , identifier[month] , identifier[date] operator[SEP] operator[SEP] }
public static void commandLineCompile(String[] args, boolean lookupUnnamedFiles) throws Exception { Options options = createCompilationOptions(); CommandLineParser cliParser = new GroovyInternalPosixParser(); CommandLine cli; cli = cliParser.parse(options, args); if (cli.hasOption('h')) { displayHelp(options); return; } if (cli.hasOption('v')) { displayVersion(); return; } displayStackTraceOnError = cli.hasOption('e'); CompilerConfiguration configuration = generateCompilerConfigurationFromOptions(cli); // // Load the file name list String[] filenames = generateFileNamesFromOptions(cli); boolean fileNameErrors = filenames == null; if (!fileNameErrors && (filenames.length == 0)) { displayHelp(options); return; } fileNameErrors = fileNameErrors && !validateFiles(filenames); if (!fileNameErrors) { doCompilation(configuration, null, filenames, lookupUnnamedFiles); } }
class class_name[name] begin[{] method[commandLineCompile, return_type[void], modifier[public static], parameter[args, lookupUnnamedFiles]] begin[{] local_variable[type[Options], options] local_variable[type[CommandLineParser], cliParser] local_variable[type[CommandLine], cli] assign[member[.cli], call[cliParser.parse, parameter[member[.options], member[.args]]]] if[call[cli.hasOption, parameter[literal['h']]]] begin[{] call[.displayHelp, parameter[member[.options]]] return[None] else begin[{] None end[}] if[call[cli.hasOption, parameter[literal['v']]]] begin[{] call[.displayVersion, parameter[]] return[None] else begin[{] None end[}] assign[member[.displayStackTraceOnError], call[cli.hasOption, parameter[literal['e']]]] local_variable[type[CompilerConfiguration], configuration] local_variable[type[String], filenames] local_variable[type[boolean], fileNameErrors] if[binary_operation[member[.fileNameErrors], &&, binary_operation[member[filenames.length], ==, literal[0]]]] begin[{] call[.displayHelp, parameter[member[.options]]] return[None] else begin[{] None end[}] assign[member[.fileNameErrors], binary_operation[member[.fileNameErrors], &&, call[.validateFiles, parameter[member[.filenames]]]]] if[member[.fileNameErrors]] begin[{] call[.doCompilation, parameter[member[.configuration], literal[null], member[.filenames], member[.lookupUnnamedFiles]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[commandLineCompile] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] , Keyword[boolean] identifier[lookupUnnamedFiles] operator[SEP] Keyword[throws] identifier[Exception] { identifier[Options] identifier[options] operator[=] identifier[createCompilationOptions] operator[SEP] operator[SEP] operator[SEP] identifier[CommandLineParser] identifier[cliParser] operator[=] Keyword[new] identifier[GroovyInternalPosixParser] operator[SEP] operator[SEP] operator[SEP] identifier[CommandLine] identifier[cli] operator[SEP] identifier[cli] operator[=] identifier[cliParser] operator[SEP] identifier[parse] operator[SEP] identifier[options] , identifier[args] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cli] operator[SEP] identifier[hasOption] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[displayHelp] operator[SEP] identifier[options] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[if] operator[SEP] identifier[cli] operator[SEP] identifier[hasOption] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[displayVersion] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[displayStackTraceOnError] operator[=] identifier[cli] operator[SEP] identifier[hasOption] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[CompilerConfiguration] identifier[configuration] operator[=] identifier[generateCompilerConfigurationFromOptions] operator[SEP] identifier[cli] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[filenames] operator[=] identifier[generateFileNamesFromOptions] operator[SEP] identifier[cli] operator[SEP] operator[SEP] Keyword[boolean] identifier[fileNameErrors] operator[=] identifier[filenames] operator[==] Other[null] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[fileNameErrors] operator[&&] operator[SEP] identifier[filenames] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] operator[SEP] { identifier[displayHelp] operator[SEP] identifier[options] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[fileNameErrors] operator[=] identifier[fileNameErrors] operator[&&] operator[!] identifier[validateFiles] operator[SEP] identifier[filenames] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[fileNameErrors] operator[SEP] { identifier[doCompilation] operator[SEP] identifier[configuration] , Other[null] , identifier[filenames] , identifier[lookupUnnamedFiles] operator[SEP] operator[SEP] } }
public final void mC_STYLE_SINGLE_LINE_COMMENT() throws RecognitionException { try { int _type = C_STYLE_SINGLE_LINE_COMMENT; int _channel = DEFAULT_TOKEN_CHANNEL; // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:319:5: ( '//' (~ ( '\\r' | '\\n' ) )* ( EOL | EOF ) ) // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:319:7: '//' (~ ( '\\r' | '\\n' ) )* ( EOL | EOF ) { match("//"); if (state.failed) return; // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:319:12: (~ ( '\\r' | '\\n' ) )* loop57: while (true) { int alt57=2; int LA57_0 = input.LA(1); if ( ((LA57_0 >= '\u0000' && LA57_0 <= '\t')||(LA57_0 >= '\u000B' && LA57_0 <= '\f')||(LA57_0 >= '\u000E' && LA57_0 <= '\uFFFF')) ) { alt57=1; } switch (alt57) { case 1 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g: { if ( (input.LA(1) >= '\u0000' && input.LA(1) <= '\t')||(input.LA(1) >= '\u000B' && input.LA(1) <= '\f')||(input.LA(1) >= '\u000E' && input.LA(1) <= '\uFFFF') ) { input.consume(); state.failed=false; } else { if (state.backtracking>0) {state.failed=true; return;} MismatchedSetException mse = new MismatchedSetException(null,input); recover(mse); throw mse; } } break; default : break loop57; } } // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:319:28: ( EOL | EOF ) int alt58=2; int LA58_0 = input.LA(1); if ( (LA58_0=='\n'||LA58_0=='\r') ) { alt58=1; } else { alt58=2; } switch (alt58) { case 1 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:319:29: EOL { mEOL(); if (state.failed) return; } break; case 2 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:319:33: EOF { match(EOF); if (state.failed) return; } break; } if ( state.backtracking==0 ) { _channel=HIDDEN; } } state.type = _type; state.channel = _channel; } finally { // do for sure before leaving } }
class class_name[name] begin[{] method[mC_STYLE_SINGLE_LINE_COMMENT, return_type[void], modifier[final public], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=C_STYLE_SINGLE_LINE_COMMENT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=_type)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=DEFAULT_TOKEN_CHANNEL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=_channel)], modifiers=set(), type=BasicType(dimensions=[], name=int)), BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="//")], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None)), WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt57)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA57_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA57_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=''), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA57_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\t'), operator=<=), operator=&&), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA57_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=' '), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA57_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\f'), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA57_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=''), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA57_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='￿'), operator=<=), operator=&&), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt57, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)])), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=''), operator=>=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\t'), operator=<=), operator=&&), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=' '), operator=>=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\f'), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=''), operator=>=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='￿'), operator=<=), operator=&&), operator=||), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), ReturnStatement(expression=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=input, 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=MismatchedSetException, sub_type=None)), name=mse)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MismatchedSetException, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=mse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=MemberReference(member=mse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=consume, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=loop57, label=None)])], expression=MemberReference(member=alt57, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=loop57), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt58)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA58_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA58_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\n'), operator===), operandr=BinaryOperation(operandl=MemberReference(member=LA58_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\r'), operator===), operator=||), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt58, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt58, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)])), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mEOL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=EOF, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=alt58, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=_channel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=HIDDEN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))]), StatementExpression(expression=Assignment(expressionl=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=MemberReference(member=_type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=MemberReference(member=_channel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)], catches=None, finally_block=[], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[mC_STYLE_SINGLE_LINE_COMMENT] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { Keyword[try] { Keyword[int] identifier[_type] operator[=] identifier[C_STYLE_SINGLE_LINE_COMMENT] operator[SEP] Keyword[int] identifier[_channel] operator[=] identifier[DEFAULT_TOKEN_CHANNEL] operator[SEP] { identifier[match] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] identifier[loop57] operator[:] Keyword[while] operator[SEP] literal[boolean] operator[SEP] { Keyword[int] identifier[alt57] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA57_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] operator[SEP] identifier[LA57_0] operator[>=] literal[String] operator[&&] identifier[LA57_0] operator[<=] literal[String] operator[SEP] operator[||] operator[SEP] identifier[LA57_0] operator[>=] literal[String] operator[&&] identifier[LA57_0] operator[<=] literal[String] operator[SEP] operator[||] operator[SEP] identifier[LA57_0] operator[>=] literal[String] operator[&&] identifier[LA57_0] operator[<=] literal[String] operator[SEP] operator[SEP] operator[SEP] { identifier[alt57] operator[=] Other[1] operator[SEP] } Keyword[switch] operator[SEP] identifier[alt57] operator[SEP] { Keyword[case] Other[1] operator[:] { Keyword[if] operator[SEP] operator[SEP] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[>=] literal[String] operator[&&] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[<=] literal[String] operator[SEP] operator[||] operator[SEP] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[>=] literal[String] operator[&&] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[<=] literal[String] operator[SEP] operator[||] operator[SEP] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[>=] literal[String] operator[&&] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[<=] literal[String] operator[SEP] operator[SEP] { identifier[input] operator[SEP] identifier[consume] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[=] literal[boolean] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[>] Other[0] operator[SEP] { identifier[state] operator[SEP] identifier[failed] operator[=] literal[boolean] operator[SEP] Keyword[return] operator[SEP] } identifier[MismatchedSetException] identifier[mse] operator[=] Keyword[new] identifier[MismatchedSetException] operator[SEP] Other[null] , identifier[input] operator[SEP] operator[SEP] identifier[recover] operator[SEP] identifier[mse] operator[SEP] operator[SEP] Keyword[throw] identifier[mse] operator[SEP] } } Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[break] identifier[loop57] operator[SEP] } } Keyword[int] identifier[alt58] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA58_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA58_0] operator[==] literal[String] operator[||] identifier[LA58_0] operator[==] literal[String] operator[SEP] operator[SEP] { identifier[alt58] operator[=] Other[1] operator[SEP] } Keyword[else] { identifier[alt58] operator[=] Other[2] operator[SEP] } Keyword[switch] operator[SEP] identifier[alt58] operator[SEP] { Keyword[case] Other[1] operator[:] { identifier[mEOL] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[2] operator[:] { identifier[match] operator[SEP] identifier[EOF] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] } Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[_channel] operator[=] identifier[HIDDEN] operator[SEP] } } identifier[state] operator[SEP] identifier[type] operator[=] identifier[_type] operator[SEP] identifier[state] operator[SEP] identifier[channel] operator[=] identifier[_channel] operator[SEP] } Keyword[finally] { } }
private static void addProperties(EndpointReferenceType epr, SLProperties props) { MetadataType metadata = WSAEndpointReferenceUtils.getSetMetadata(epr); ServiceLocatorPropertiesType jaxbProps = SLPropertiesConverter.toServiceLocatorPropertiesType(props); JAXBElement<ServiceLocatorPropertiesType> slp = SL_OBJECT_FACTORY.createServiceLocatorProperties(jaxbProps); metadata.getAny().add(slp); }
class class_name[name] begin[{] method[addProperties, return_type[void], modifier[private static], parameter[epr, props]] begin[{] local_variable[type[MetadataType], metadata] local_variable[type[ServiceLocatorPropertiesType], jaxbProps] local_variable[type[JAXBElement], slp] call[metadata.getAny, parameter[]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[addProperties] operator[SEP] identifier[EndpointReferenceType] identifier[epr] , identifier[SLProperties] identifier[props] operator[SEP] { identifier[MetadataType] identifier[metadata] operator[=] identifier[WSAEndpointReferenceUtils] operator[SEP] identifier[getSetMetadata] operator[SEP] identifier[epr] operator[SEP] operator[SEP] identifier[ServiceLocatorPropertiesType] identifier[jaxbProps] operator[=] identifier[SLPropertiesConverter] operator[SEP] identifier[toServiceLocatorPropertiesType] operator[SEP] identifier[props] operator[SEP] operator[SEP] identifier[JAXBElement] operator[<] identifier[ServiceLocatorPropertiesType] operator[>] identifier[slp] operator[=] identifier[SL_OBJECT_FACTORY] operator[SEP] identifier[createServiceLocatorProperties] operator[SEP] identifier[jaxbProps] operator[SEP] operator[SEP] identifier[metadata] operator[SEP] identifier[getAny] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[slp] operator[SEP] operator[SEP] }
public boolean diff(Node right, Buffer rightBuffer) throws IOException { Buffer leftBuffer; int leftChunk; int rightChunk; boolean result; leftBuffer = getWorld().getBuffer(); try (InputStream leftSrc = newInputStream(); InputStream rightSrc = right.newInputStream()) { result = false; do { leftChunk = leftBuffer.fill(leftSrc); rightChunk = rightBuffer.fill(rightSrc); if (leftChunk != rightChunk || leftBuffer.diff(rightBuffer, leftChunk)) { result = true; break; } } while (leftChunk > 0); } return result; }
class class_name[name] begin[{] method[diff, return_type[type[boolean]], modifier[public], parameter[right, rightBuffer]] begin[{] local_variable[type[Buffer], leftBuffer] local_variable[type[int], leftChunk] local_variable[type[int], rightChunk] local_variable[type[boolean], result] assign[member[.leftBuffer], call[.getWorld, parameter[]]] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), DoStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=leftChunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=leftSrc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fill, postfix_operators=[], prefix_operators=[], qualifier=leftBuffer, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=rightChunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=rightSrc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fill, postfix_operators=[], prefix_operators=[], qualifier=rightBuffer, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=leftChunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=rightChunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), operandr=MethodInvocation(arguments=[MemberReference(member=rightBuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=leftChunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=diff, postfix_operators=[], prefix_operators=[], qualifier=leftBuffer, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, 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=BinaryOperation(operandl=MemberReference(member=leftChunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), label=None)], catches=None, finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=leftSrc, type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None), value=MethodInvocation(arguments=[], member=newInputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), TryResource(annotations=[], modifiers=set(), name=rightSrc, type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None), value=MethodInvocation(arguments=[], member=newInputStream, postfix_operators=[], prefix_operators=[], qualifier=right, selectors=[], type_arguments=None))]) return[member[.result]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[diff] operator[SEP] identifier[Node] identifier[right] , identifier[Buffer] identifier[rightBuffer] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Buffer] identifier[leftBuffer] operator[SEP] Keyword[int] identifier[leftChunk] operator[SEP] Keyword[int] identifier[rightChunk] operator[SEP] Keyword[boolean] identifier[result] operator[SEP] identifier[leftBuffer] operator[=] identifier[getWorld] operator[SEP] operator[SEP] operator[SEP] identifier[getBuffer] operator[SEP] operator[SEP] operator[SEP] Keyword[try] operator[SEP] identifier[InputStream] identifier[leftSrc] operator[=] identifier[newInputStream] operator[SEP] operator[SEP] operator[SEP] identifier[InputStream] identifier[rightSrc] operator[=] identifier[right] operator[SEP] identifier[newInputStream] operator[SEP] operator[SEP] operator[SEP] { identifier[result] operator[=] literal[boolean] operator[SEP] Keyword[do] { identifier[leftChunk] operator[=] identifier[leftBuffer] operator[SEP] identifier[fill] operator[SEP] identifier[leftSrc] operator[SEP] operator[SEP] identifier[rightChunk] operator[=] identifier[rightBuffer] operator[SEP] identifier[fill] operator[SEP] identifier[rightSrc] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[leftChunk] operator[!=] identifier[rightChunk] operator[||] identifier[leftBuffer] operator[SEP] identifier[diff] operator[SEP] identifier[rightBuffer] , identifier[leftChunk] operator[SEP] operator[SEP] { identifier[result] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] } } Keyword[while] operator[SEP] identifier[leftChunk] operator[>] Other[0] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public K getCurrentKey() { lock.lock(); try { Thread currentThread = Thread.currentThread(); for (Entry<K,Thread> entry : threadMap.entrySet()) { if (currentThread.equals(entry.getValue())) { return entry.getKey(); } } return null; } finally { lock.unlock(); } }
class class_name[name] begin[{] method[getCurrentKey, return_type[type[K]], modifier[public], parameter[]] begin[{] call[lock.lock, parameter[]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=currentThread, postfix_operators=[], prefix_operators=[], qualifier=Thread, selectors=[], type_arguments=None), name=currentThread)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Thread, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=[], qualifier=currentThread, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=threadMap, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=K, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Thread, sub_type=None))], dimensions=[], name=Entry, sub_type=None))), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=unlock, postfix_operators=[], prefix_operators=[], qualifier=lock, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] identifier[K] identifier[getCurrentKey] operator[SEP] operator[SEP] { identifier[lock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[Thread] identifier[currentThread] operator[=] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Entry] operator[<] identifier[K] , identifier[Thread] operator[>] identifier[entry] operator[:] identifier[threadMap] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[currentThread] operator[SEP] identifier[equals] operator[SEP] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] Other[null] operator[SEP] } Keyword[finally] { identifier[lock] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP] } }
private static OptionalEntity<RelatedContent> getEntity(final CreateForm form, final String username, final long currentTime) { switch (form.crudMode) { case CrudMode.CREATE: return OptionalEntity.of(new RelatedContent()).map(entity -> { entity.setCreatedBy(username); entity.setCreatedTime(currentTime); return entity; }); case CrudMode.EDIT: if (form instanceof EditForm) { return ComponentUtil.getComponent(RelatedContentService.class).getRelatedContent(((EditForm) form).id); } break; default: break; } return OptionalEntity.empty(); }
class class_name[name] begin[{] method[getEntity, return_type[type[OptionalEntity]], modifier[private static], parameter[form, username, currentTime]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=CREATE, postfix_operators=[], prefix_operators=[], qualifier=CrudMode, selectors=[])], statements=[ReturnStatement(expression=MethodInvocation(arguments=[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RelatedContent, sub_type=None))], member=of, postfix_operators=[], prefix_operators=[], qualifier=OptionalEntity, selectors=[MethodInvocation(arguments=[LambdaExpression(body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=username, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setCreatedBy, postfix_operators=[], prefix_operators=[], qualifier=entity, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=currentTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setCreatedTime, postfix_operators=[], prefix_operators=[], qualifier=entity, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=entity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], parameters=[MemberReference(member=entity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])], member=map, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), SwitchStatementCase(case=[MemberReference(member=EDIT, postfix_operators=[], prefix_operators=[], qualifier=CrudMode, selectors=[])], statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=form, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=EditForm, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RelatedContentService, sub_type=None))], member=getComponent, postfix_operators=[], prefix_operators=[], qualifier=ComponentUtil, selectors=[MethodInvocation(arguments=[Cast(expression=MemberReference(member=form, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=EditForm, sub_type=None))], member=getRelatedContent, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)])), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=None, label=None)])], expression=MemberReference(member=crudMode, postfix_operators=[], prefix_operators=[], qualifier=form, selectors=[]), label=None) return[call[OptionalEntity.empty, parameter[]]] end[}] END[}]
Keyword[private] Keyword[static] identifier[OptionalEntity] operator[<] identifier[RelatedContent] operator[>] identifier[getEntity] operator[SEP] Keyword[final] identifier[CreateForm] identifier[form] , Keyword[final] identifier[String] identifier[username] , Keyword[final] Keyword[long] identifier[currentTime] operator[SEP] { Keyword[switch] operator[SEP] identifier[form] operator[SEP] identifier[crudMode] operator[SEP] { Keyword[case] identifier[CrudMode] operator[SEP] identifier[CREATE] operator[:] Keyword[return] identifier[OptionalEntity] operator[SEP] identifier[of] operator[SEP] Keyword[new] identifier[RelatedContent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[entity] operator[->] { identifier[entity] operator[SEP] identifier[setCreatedBy] operator[SEP] identifier[username] operator[SEP] operator[SEP] identifier[entity] operator[SEP] identifier[setCreatedTime] operator[SEP] identifier[currentTime] operator[SEP] operator[SEP] Keyword[return] identifier[entity] operator[SEP] } operator[SEP] operator[SEP] Keyword[case] identifier[CrudMode] operator[SEP] identifier[EDIT] operator[:] Keyword[if] operator[SEP] identifier[form] Keyword[instanceof] identifier[EditForm] operator[SEP] { Keyword[return] identifier[ComponentUtil] operator[SEP] identifier[getComponent] operator[SEP] identifier[RelatedContentService] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[getRelatedContent] operator[SEP] operator[SEP] operator[SEP] identifier[EditForm] operator[SEP] identifier[form] operator[SEP] operator[SEP] identifier[id] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[break] operator[SEP] } Keyword[return] identifier[OptionalEntity] operator[SEP] identifier[empty] operator[SEP] operator[SEP] operator[SEP] }
public T set(int index, T element) { if (index == 0) { T previousElement = this.element1; this.element1 = element; return previousElement; } throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + this.size()); }
class class_name[name] begin[{] method[set, return_type[type[T]], modifier[public], parameter[index, element]] begin[{] if[binary_operation[member[.index], ==, literal[0]]] begin[{] local_variable[type[T], previousElement] assign[THIS[member[None.element1]], member[.element]] return[member[.previousElement]] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Index: "), operandr=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", Size: "), operator=+), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=size, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IndexOutOfBoundsException, sub_type=None)), label=None) end[}] END[}]
Keyword[public] identifier[T] identifier[set] operator[SEP] Keyword[int] identifier[index] , identifier[T] identifier[element] operator[SEP] { Keyword[if] operator[SEP] identifier[index] operator[==] Other[0] operator[SEP] { identifier[T] identifier[previousElement] operator[=] Keyword[this] operator[SEP] identifier[element1] operator[SEP] Keyword[this] operator[SEP] identifier[element1] operator[=] identifier[element] operator[SEP] Keyword[return] identifier[previousElement] operator[SEP] } Keyword[throw] Keyword[new] identifier[IndexOutOfBoundsException] operator[SEP] literal[String] operator[+] identifier[index] operator[+] literal[String] operator[+] Keyword[this] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void setViewBox(final double west, final double north, final double east, final double south) { this.viewBox = new BoundingBox(); this.viewBox.setWest(west); this.viewBox.setNorth(north); this.viewBox.setEast(east); this.viewBox.setSouth(south); }
class class_name[name] begin[{] method[setViewBox, return_type[void], modifier[public], parameter[west, north, east, south]] begin[{] assign[THIS[member[None.viewBox]], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BoundingBox, sub_type=None))] THIS[member[None.viewBox]call[None.setWest, parameter[member[.west]]]] THIS[member[None.viewBox]call[None.setNorth, parameter[member[.north]]]] THIS[member[None.viewBox]call[None.setEast, parameter[member[.east]]]] THIS[member[None.viewBox]call[None.setSouth, parameter[member[.south]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setViewBox] operator[SEP] Keyword[final] Keyword[double] identifier[west] , Keyword[final] Keyword[double] identifier[north] , Keyword[final] Keyword[double] identifier[east] , Keyword[final] Keyword[double] identifier[south] operator[SEP] { Keyword[this] operator[SEP] identifier[viewBox] operator[=] Keyword[new] identifier[BoundingBox] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[viewBox] operator[SEP] identifier[setWest] operator[SEP] identifier[west] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[viewBox] operator[SEP] identifier[setNorth] operator[SEP] identifier[north] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[viewBox] operator[SEP] identifier[setEast] operator[SEP] identifier[east] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[viewBox] operator[SEP] identifier[setSouth] operator[SEP] identifier[south] operator[SEP] operator[SEP] }
public final void removeEntries(Iterator<Entry<?>> entries) { if (entries != null) { while (entries.hasNext()) { removeEntry(entries.next()); } } }
class class_name[name] begin[{] method[removeEntries, return_type[void], modifier[final public], parameter[entries]] begin[{] if[binary_operation[member[.entries], !=, literal[null]]] begin[{] while[call[entries.hasNext, parameter[]]] begin[{] call[.removeEntry, parameter[call[entries.next, parameter[]]]] end[}] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[removeEntries] operator[SEP] identifier[Iterator] operator[<] identifier[Entry] operator[<] operator[?] operator[>] operator[>] identifier[entries] operator[SEP] { Keyword[if] operator[SEP] identifier[entries] operator[!=] Other[null] operator[SEP] { Keyword[while] operator[SEP] identifier[entries] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[removeEntry] operator[SEP] identifier[entries] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } }
public Quaterniond rotateAxis(double angle, double axisX, double axisY, double axisZ) { return rotateAxis(angle, axisX, axisY, axisZ, this); }
class class_name[name] begin[{] method[rotateAxis, return_type[type[Quaterniond]], modifier[public], parameter[angle, axisX, axisY, axisZ]] begin[{] return[call[.rotateAxis, parameter[member[.angle], member[.axisX], member[.axisY], member[.axisZ], THIS[]]]] end[}] END[}]
Keyword[public] identifier[Quaterniond] identifier[rotateAxis] operator[SEP] Keyword[double] identifier[angle] , Keyword[double] identifier[axisX] , Keyword[double] identifier[axisY] , Keyword[double] identifier[axisZ] operator[SEP] { Keyword[return] identifier[rotateAxis] operator[SEP] identifier[angle] , identifier[axisX] , identifier[axisY] , identifier[axisZ] , Keyword[this] operator[SEP] operator[SEP] }
public Point3d getGridPointFrom3dCoordinates(Point3d coord) throws Exception { Point3d gridPoint = new Point3d(); if (coord.x >= minx & coord.x <= maxx) { gridPoint.x = (int) Math.round(Math.abs(minx - coord.x) / latticeConstant); } else { throw new Exception("CDKGridError: Given coordinates are not in grid"); } if (coord.y >= miny & coord.y <= maxy) { gridPoint.y = (int) Math.round(Math.abs(miny - coord.y) / latticeConstant); } else { throw new Exception("CDKGridError: Given coordinates are not in grid"); } if (coord.z >= minz & coord.z <= maxz) { gridPoint.z = (int) Math.round(Math.abs(minz - coord.z) / latticeConstant); } else { throw new Exception("CDKGridError: Given coordinates are not in grid"); } return gridPoint; }
class class_name[name] begin[{] method[getGridPointFrom3dCoordinates, return_type[type[Point3d]], modifier[public], parameter[coord]] begin[{] local_variable[type[Point3d], gridPoint] if[binary_operation[binary_operation[member[coord.x], >=, member[.minx]], &, binary_operation[member[coord.x], <=, member[.maxx]]]] begin[{] assign[member[gridPoint.x], Cast(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=minx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=coord, selectors=[]), operator=-)], member=abs, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operandr=MemberReference(member=latticeConstant, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=/)], member=round, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int))] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="CDKGridError: Given coordinates are not in grid")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Exception, sub_type=None)), label=None) end[}] if[binary_operation[binary_operation[member[coord.y], >=, member[.miny]], &, binary_operation[member[coord.y], <=, member[.maxy]]]] begin[{] assign[member[gridPoint.y], Cast(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=miny, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=coord, selectors=[]), operator=-)], member=abs, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operandr=MemberReference(member=latticeConstant, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=/)], member=round, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int))] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="CDKGridError: Given coordinates are not in grid")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Exception, sub_type=None)), label=None) end[}] if[binary_operation[binary_operation[member[coord.z], >=, member[.minz]], &, binary_operation[member[coord.z], <=, member[.maxz]]]] begin[{] assign[member[gridPoint.z], Cast(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=minz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=z, postfix_operators=[], prefix_operators=[], qualifier=coord, selectors=[]), operator=-)], member=abs, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operandr=MemberReference(member=latticeConstant, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=/)], member=round, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int))] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="CDKGridError: Given coordinates are not in grid")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Exception, sub_type=None)), label=None) end[}] return[member[.gridPoint]] end[}] END[}]
Keyword[public] identifier[Point3d] identifier[getGridPointFrom3dCoordinates] operator[SEP] identifier[Point3d] identifier[coord] operator[SEP] Keyword[throws] identifier[Exception] { identifier[Point3d] identifier[gridPoint] operator[=] Keyword[new] identifier[Point3d] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[coord] operator[SEP] identifier[x] operator[>=] identifier[minx] operator[&] identifier[coord] operator[SEP] identifier[x] operator[<=] identifier[maxx] operator[SEP] { identifier[gridPoint] operator[SEP] identifier[x] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[Math] operator[SEP] identifier[round] operator[SEP] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[minx] operator[-] identifier[coord] operator[SEP] identifier[x] operator[SEP] operator[/] identifier[latticeConstant] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[Exception] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[coord] operator[SEP] identifier[y] operator[>=] identifier[miny] operator[&] identifier[coord] operator[SEP] identifier[y] operator[<=] identifier[maxy] operator[SEP] { identifier[gridPoint] operator[SEP] identifier[y] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[Math] operator[SEP] identifier[round] operator[SEP] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[miny] operator[-] identifier[coord] operator[SEP] identifier[y] operator[SEP] operator[/] identifier[latticeConstant] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[Exception] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[coord] operator[SEP] identifier[z] operator[>=] identifier[minz] operator[&] identifier[coord] operator[SEP] identifier[z] operator[<=] identifier[maxz] operator[SEP] { identifier[gridPoint] operator[SEP] identifier[z] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[Math] operator[SEP] identifier[round] operator[SEP] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[minz] operator[-] identifier[coord] operator[SEP] identifier[z] operator[SEP] operator[/] identifier[latticeConstant] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[Exception] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[gridPoint] operator[SEP] }
public static <T> Constructor<T> getNoArgConstructor(Class<T> clazz) { try { Constructor<T> ctor = clazz.getDeclaredConstructor(new Class[0]); ctor.setAccessible(true); return ctor; } catch (NoSuchMethodException e) { // lame there is no way to tell if the class is a nonstatic inner class if (clazz.isMemberClass() || clazz.isAnonymousClass() || clazz.isLocalClass()) throw new IllegalStateException(clazz.getName() + " must be static and must have a no-arg constructor", e); else throw new IllegalStateException(clazz.getName() + " must have a no-arg constructor", e); } }
class class_name[name] begin[{] method[getNoArgConstructor, return_type[type[Constructor]], modifier[public static], parameter[clazz]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Class, sub_type=None))], member=getDeclaredConstructor, postfix_operators=[], prefix_operators=[], qualifier=clazz, selectors=[], type_arguments=None), name=ctor)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=Constructor, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setAccessible, postfix_operators=[], prefix_operators=[], qualifier=ctor, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=ctor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isMemberClass, postfix_operators=[], prefix_operators=[], qualifier=clazz, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isAnonymousClass, postfix_operators=[], prefix_operators=[], qualifier=clazz, selectors=[], type_arguments=None), operator=||), operandr=MethodInvocation(arguments=[], member=isLocalClass, postfix_operators=[], prefix_operators=[], qualifier=clazz, selectors=[], type_arguments=None), operator=||), else_statement=ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=clazz, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" must have a no-arg constructor"), 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, then_statement=ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=clazz, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" must be static and must have a no-arg constructor"), 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=['NoSuchMethodException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Constructor] operator[<] identifier[T] operator[>] identifier[getNoArgConstructor] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[clazz] operator[SEP] { Keyword[try] { identifier[Constructor] operator[<] identifier[T] operator[>] identifier[ctor] operator[=] identifier[clazz] operator[SEP] identifier[getDeclaredConstructor] operator[SEP] Keyword[new] identifier[Class] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[ctor] operator[SEP] identifier[setAccessible] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[return] identifier[ctor] operator[SEP] } Keyword[catch] operator[SEP] identifier[NoSuchMethodException] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[clazz] operator[SEP] identifier[isMemberClass] operator[SEP] operator[SEP] operator[||] identifier[clazz] operator[SEP] identifier[isAnonymousClass] operator[SEP] operator[SEP] operator[||] identifier[clazz] operator[SEP] identifier[isLocalClass] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] identifier[clazz] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] , identifier[e] operator[SEP] operator[SEP] Keyword[else] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] identifier[clazz] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] , identifier[e] operator[SEP] operator[SEP] } }
public ServiceFuture<OcrResult> recognizePrintedTextAsync(boolean detectOrientation, String url, RecognizePrintedTextOptionalParameter recognizePrintedTextOptionalParameter, final ServiceCallback<OcrResult> serviceCallback) { return ServiceFuture.fromResponse(recognizePrintedTextWithServiceResponseAsync(detectOrientation, url, recognizePrintedTextOptionalParameter), serviceCallback); }
class class_name[name] begin[{] method[recognizePrintedTextAsync, return_type[type[ServiceFuture]], modifier[public], parameter[detectOrientation, url, recognizePrintedTextOptionalParameter, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.recognizePrintedTextWithServiceResponseAsync, parameter[member[.detectOrientation], member[.url], member[.recognizePrintedTextOptionalParameter]]], member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[OcrResult] operator[>] identifier[recognizePrintedTextAsync] operator[SEP] Keyword[boolean] identifier[detectOrientation] , identifier[String] identifier[url] , identifier[RecognizePrintedTextOptionalParameter] identifier[recognizePrintedTextOptionalParameter] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[OcrResult] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromResponse] operator[SEP] identifier[recognizePrintedTextWithServiceResponseAsync] operator[SEP] identifier[detectOrientation] , identifier[url] , identifier[recognizePrintedTextOptionalParameter] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP] }
public static FieldFilter create(Class<?> type, FieldMatcher mathcer) { FieldFilter ff = new FieldFilter(); ff.set(type, mathcer); return ff; }
class class_name[name] begin[{] method[create, return_type[type[FieldFilter]], modifier[public static], parameter[type, mathcer]] begin[{] local_variable[type[FieldFilter], ff] call[ff.set, parameter[member[.type], member[.mathcer]]] return[member[.ff]] end[}] END[}]
Keyword[public] Keyword[static] identifier[FieldFilter] identifier[create] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[type] , identifier[FieldMatcher] identifier[mathcer] operator[SEP] { identifier[FieldFilter] identifier[ff] operator[=] Keyword[new] identifier[FieldFilter] operator[SEP] operator[SEP] operator[SEP] identifier[ff] operator[SEP] identifier[set] operator[SEP] identifier[type] , identifier[mathcer] operator[SEP] operator[SEP] Keyword[return] identifier[ff] operator[SEP] }
public void traverse(int pos) throws org.xml.sax.SAXException { // %REVIEW% Why isn't this just traverse(pos,pos)? int top = pos; // Remember the root of this subtree while (DTM.NULL != pos) { startNode(pos); int nextNode = m_dtm.getFirstChild(pos); while (DTM.NULL == nextNode) { endNode(pos); if (top == pos) break; nextNode = m_dtm.getNextSibling(pos); if (DTM.NULL == nextNode) { pos = m_dtm.getParent(pos); if ((DTM.NULL == pos) || (top == pos)) { // %REVIEW% This condition isn't tested in traverse(pos,top) // -- bug? if (DTM.NULL != pos) endNode(pos); nextNode = DTM.NULL; break; } } } pos = nextNode; } }
class class_name[name] begin[{] method[traverse, return_type[void], modifier[public], parameter[pos]] begin[{] local_variable[type[int], top] while[binary_operation[member[DTM.NULL], !=, member[.pos]]] begin[{] call[.startNode, parameter[member[.pos]]] local_variable[type[int], nextNode] while[binary_operation[member[DTM.NULL], ==, member[.nextNode]]] begin[{] call[.endNode, parameter[member[.pos]]] if[binary_operation[member[.top], ==, member[.pos]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] assign[member[.nextNode], call[m_dtm.getNextSibling, parameter[member[.pos]]]] if[binary_operation[member[DTM.NULL], ==, member[.nextNode]]] begin[{] assign[member[.pos], call[m_dtm.getParent, parameter[member[.pos]]]] if[binary_operation[binary_operation[member[DTM.NULL], ==, member[.pos]], ||, binary_operation[member[.top], ==, member[.pos]]]] begin[{] if[binary_operation[member[DTM.NULL], !=, member[.pos]]] begin[{] call[.endNode, parameter[member[.pos]]] else begin[{] None end[}] assign[member[.nextNode], member[DTM.NULL]] BreakStatement(goto=None, label=None) else begin[{] None end[}] else begin[{] None end[}] end[}] assign[member[.pos], member[.nextNode]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[traverse] operator[SEP] Keyword[int] identifier[pos] operator[SEP] Keyword[throws] identifier[org] operator[SEP] identifier[xml] operator[SEP] identifier[sax] operator[SEP] identifier[SAXException] { Keyword[int] identifier[top] operator[=] identifier[pos] operator[SEP] Keyword[while] operator[SEP] identifier[DTM] operator[SEP] identifier[NULL] operator[!=] identifier[pos] operator[SEP] { identifier[startNode] operator[SEP] identifier[pos] operator[SEP] operator[SEP] Keyword[int] identifier[nextNode] operator[=] identifier[m_dtm] operator[SEP] identifier[getFirstChild] operator[SEP] identifier[pos] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[DTM] operator[SEP] identifier[NULL] operator[==] identifier[nextNode] operator[SEP] { identifier[endNode] operator[SEP] identifier[pos] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[top] operator[==] identifier[pos] operator[SEP] Keyword[break] operator[SEP] identifier[nextNode] operator[=] identifier[m_dtm] operator[SEP] identifier[getNextSibling] operator[SEP] identifier[pos] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[DTM] operator[SEP] identifier[NULL] operator[==] identifier[nextNode] operator[SEP] { identifier[pos] operator[=] identifier[m_dtm] operator[SEP] identifier[getParent] operator[SEP] identifier[pos] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[DTM] operator[SEP] identifier[NULL] operator[==] identifier[pos] operator[SEP] operator[||] operator[SEP] identifier[top] operator[==] identifier[pos] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[DTM] operator[SEP] identifier[NULL] operator[!=] identifier[pos] operator[SEP] identifier[endNode] operator[SEP] identifier[pos] operator[SEP] operator[SEP] identifier[nextNode] operator[=] identifier[DTM] operator[SEP] identifier[NULL] operator[SEP] Keyword[break] operator[SEP] } } } identifier[pos] operator[=] identifier[nextNode] operator[SEP] } }
public void disableConnector(String connectorClass) { ConnectorEntry connector = connectors.get(connectorClass); if(connector != null) connectors.get(connectorClass).disableConnector(); }
class class_name[name] begin[{] method[disableConnector, return_type[void], modifier[public], parameter[connectorClass]] begin[{] local_variable[type[ConnectorEntry], connector] if[binary_operation[member[.connector], !=, literal[null]]] begin[{] call[connectors.get, parameter[member[.connectorClass]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[disableConnector] operator[SEP] identifier[String] identifier[connectorClass] operator[SEP] { identifier[ConnectorEntry] identifier[connector] operator[=] identifier[connectors] operator[SEP] identifier[get] operator[SEP] identifier[connectorClass] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[connector] operator[!=] Other[null] operator[SEP] identifier[connectors] operator[SEP] identifier[get] operator[SEP] identifier[connectorClass] operator[SEP] operator[SEP] identifier[disableConnector] operator[SEP] operator[SEP] operator[SEP] }
@Override public boolean contains(AttributeKey<?> key) { return (this.outer.contains(key) || this.inner.contains(key)); }
class class_name[name] begin[{] method[contains, return_type[type[boolean]], modifier[public], parameter[key]] begin[{] return[binary_operation[THIS[member[None.outer]call[None.contains, parameter[member[.key]]]], ||, THIS[member[None.inner]call[None.contains, parameter[member[.key]]]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[contains] operator[SEP] identifier[AttributeKey] operator[<] operator[?] operator[>] identifier[key] operator[SEP] { Keyword[return] operator[SEP] Keyword[this] operator[SEP] identifier[outer] operator[SEP] identifier[contains] operator[SEP] identifier[key] operator[SEP] operator[||] Keyword[this] operator[SEP] identifier[inner] operator[SEP] identifier[contains] operator[SEP] identifier[key] operator[SEP] operator[SEP] operator[SEP] }
@XmlElementDecl(namespace = "http://schema.intuit.com/finance/v3", name = "PriceLevel", substitutionHeadNamespace = "http://schema.intuit.com/finance/v3", substitutionHeadName = "IntuitObject") public JAXBElement<PriceLevel> createPriceLevel(PriceLevel value) { return new JAXBElement<PriceLevel>(_PriceLevel_QNAME, PriceLevel.class, null, value); }
class class_name[name] begin[{] method[createPriceLevel, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=_PriceLevel_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PriceLevel, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], 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=PriceLevel, sub_type=None))], dimensions=None, name=JAXBElement, sub_type=None))] end[}] END[}]
annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] , identifier[substitutionHeadNamespace] operator[=] literal[String] , identifier[substitutionHeadName] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[PriceLevel] operator[>] identifier[createPriceLevel] operator[SEP] identifier[PriceLevel] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[PriceLevel] operator[>] operator[SEP] identifier[_PriceLevel_QNAME] , identifier[PriceLevel] operator[SEP] Keyword[class] , Other[null] , identifier[value] operator[SEP] operator[SEP] }
public static void hexDump(PrintStream out, Object obj) { // TODO Change this to use hexDumpAddress instead of toByteArray byte[] bytes = toByteArray(obj); hexDumpBytes(out, 0, bytes); }
class class_name[name] begin[{] method[hexDump, return_type[void], modifier[public static], parameter[out, obj]] begin[{] local_variable[type[byte], bytes] call[.hexDumpBytes, parameter[member[.out], literal[0], member[.bytes]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[hexDump] operator[SEP] identifier[PrintStream] identifier[out] , identifier[Object] identifier[obj] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] operator[=] identifier[toByteArray] operator[SEP] identifier[obj] operator[SEP] operator[SEP] identifier[hexDumpBytes] operator[SEP] identifier[out] , Other[0] , identifier[bytes] operator[SEP] operator[SEP] }
public ContainerTx getCurrentTx(SynchronizationRegistryUOWScope uowId, boolean isLocal) throws CSITransactionRolledbackException { final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); // d532639.2 if (isTraceOn && tc.isEntryEnabled()) Tr.entry(tc, "getCurrentTx (" + ContainerTx.uowIdToString(uowId) + ", " + (isLocal ? "local" : "global") + ")"); ContainerTx result = null; SynchronizationRegistryUOWScope currTxKey = uowId; // If there is no transaction, then this is probably BMT and either // an EJB 1.1 module or the BMT transaction has been rolled back. // In either case, just allow the method to continue without a // ContainerTx. If there is a transaction, then look for an existing // ContainerTx, or create one if not found. if (currTxKey != null) { result = (ContainerTx) currTxKey.getResource(containerTxResourceKey); if (result == null) { result = ivEJBRuntime.createContainerTx(this, !isLocal, currTxKey, uowCtrl); try { uowCtrl.enlistWithTransaction(currTxKey, result); } catch (CSIException ex) { FFDCFilter.processException(ex, CLASS_NAME + ".getCurrentTx", "1305", this); uowCtrl.setRollbackOnly(); throw new CSITransactionRolledbackException("Enlistment with transaction failed", ex); } currTxKey.putResource(containerTxResourceKey, result); } } if (isTraceOn && tc.isEntryEnabled()) Tr.exit(tc, "getCurrentTx : " + result); return result; }
class class_name[name] begin[{] method[getCurrentTx, return_type[type[ContainerTx]], modifier[public], parameter[uowId, isLocal]] begin[{] local_variable[type[boolean], isTraceOn] if[binary_operation[member[.isTraceOn], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.entry, parameter[member[.tc], binary_operation[binary_operation[binary_operation[binary_operation[literal["getCurrentTx ("], +, call[ContainerTx.uowIdToString, parameter[member[.uowId]]]], +, literal[", "]], +, TernaryExpression(condition=MemberReference(member=isLocal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="global"), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="local"))], +, literal[")"]]]] else begin[{] None end[}] local_variable[type[ContainerTx], result] local_variable[type[SynchronizationRegistryUOWScope], currTxKey] if[binary_operation[member[.currTxKey], !=, literal[null]]] begin[{] assign[member[.result], Cast(expression=MethodInvocation(arguments=[MemberReference(member=containerTxResourceKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getResource, postfix_operators=[], prefix_operators=[], qualifier=currTxKey, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=ContainerTx, sub_type=None))] if[binary_operation[member[.result], ==, literal[null]]] begin[{] assign[member[.result], call[ivEJBRuntime.createContainerTx, parameter[THIS[], member[.isLocal], member[.currTxKey], member[.uowCtrl]]]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=currTxKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=enlistWithTransaction, postfix_operators=[], prefix_operators=[], qualifier=uowCtrl, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=CLASS_NAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".getCurrentTx"), operator=+), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1305"), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=setRollbackOnly, postfix_operators=[], prefix_operators=[], qualifier=uowCtrl, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Enlistment with transaction failed"), 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=CSITransactionRolledbackException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['CSIException']))], finally_block=None, label=None, resources=None) call[currTxKey.putResource, parameter[member[.containerTxResourceKey], member[.result]]] else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[member[.isTraceOn], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.exit, parameter[member[.tc], binary_operation[literal["getCurrentTx : "], +, member[.result]]]] else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] identifier[ContainerTx] identifier[getCurrentTx] operator[SEP] identifier[SynchronizationRegistryUOWScope] identifier[uowId] , Keyword[boolean] identifier[isLocal] operator[SEP] Keyword[throws] identifier[CSITransactionRolledbackException] { Keyword[final] Keyword[boolean] identifier[isTraceOn] operator[=] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[ContainerTx] operator[SEP] identifier[uowIdToString] operator[SEP] identifier[uowId] operator[SEP] operator[+] literal[String] operator[+] operator[SEP] identifier[isLocal] operator[?] literal[String] operator[:] literal[String] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[ContainerTx] identifier[result] operator[=] Other[null] operator[SEP] identifier[SynchronizationRegistryUOWScope] identifier[currTxKey] operator[=] identifier[uowId] operator[SEP] Keyword[if] operator[SEP] identifier[currTxKey] operator[!=] Other[null] operator[SEP] { identifier[result] operator[=] operator[SEP] identifier[ContainerTx] operator[SEP] identifier[currTxKey] operator[SEP] identifier[getResource] operator[SEP] identifier[containerTxResourceKey] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[==] Other[null] operator[SEP] { identifier[result] operator[=] identifier[ivEJBRuntime] operator[SEP] identifier[createContainerTx] operator[SEP] Keyword[this] , operator[!] identifier[isLocal] , identifier[currTxKey] , identifier[uowCtrl] operator[SEP] operator[SEP] Keyword[try] { identifier[uowCtrl] operator[SEP] identifier[enlistWithTransaction] operator[SEP] identifier[currTxKey] , identifier[result] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[CSIException] identifier[ex] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[ex] , identifier[CLASS_NAME] operator[+] literal[String] , literal[String] , Keyword[this] operator[SEP] operator[SEP] identifier[uowCtrl] operator[SEP] identifier[setRollbackOnly] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[CSITransactionRolledbackException] operator[SEP] literal[String] , identifier[ex] operator[SEP] operator[SEP] } identifier[currTxKey] operator[SEP] identifier[putResource] operator[SEP] identifier[containerTxResourceKey] , identifier[result] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[result] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "TopoComplex", substitutionHeadNamespace = "http://www.opengis.net/gml", substitutionHeadName = "_Topology") public JAXBElement<TopoComplexType> createTopoComplex(TopoComplexType value) { return new JAXBElement<TopoComplexType>(_TopoComplex_QNAME, TopoComplexType.class, null, value); }
class class_name[name] begin[{] method[createTopoComplex, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=_TopoComplex_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TopoComplexType, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], 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=TopoComplexType, sub_type=None))], dimensions=None, name=JAXBElement, sub_type=None))] end[}] END[}]
annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] , identifier[substitutionHeadNamespace] operator[=] literal[String] , identifier[substitutionHeadName] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[TopoComplexType] operator[>] identifier[createTopoComplex] operator[SEP] identifier[TopoComplexType] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[TopoComplexType] operator[>] operator[SEP] identifier[_TopoComplex_QNAME] , identifier[TopoComplexType] operator[SEP] Keyword[class] , Other[null] , identifier[value] operator[SEP] operator[SEP] }
public void setEventTypes(java.util.Collection<String> eventTypes) { if (eventTypes == null) { this.eventTypes = null; return; } this.eventTypes = new java.util.ArrayList<String>(eventTypes); }
class class_name[name] begin[{] method[setEventTypes, return_type[void], modifier[public], parameter[eventTypes]] begin[{] if[binary_operation[member[.eventTypes], ==, literal[null]]] begin[{] assign[THIS[member[None.eventTypes]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.eventTypes]], ClassCreator(arguments=[MemberReference(member=eventTypes, 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=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setEventTypes] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[eventTypes] operator[SEP] { Keyword[if] operator[SEP] identifier[eventTypes] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[eventTypes] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[eventTypes] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] identifier[eventTypes] operator[SEP] operator[SEP] }
public void addAxis(Matrix4d axis, int order, SymmetryType type) { axes.add(new Axis(axis,order,type,axes.size(),0)); }
class class_name[name] begin[{] method[addAxis, return_type[void], modifier[public], parameter[axis, order, type]] begin[{] call[axes.add, parameter[ClassCreator(arguments=[MemberReference(member=axis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=order, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=axes, selectors=[], type_arguments=None), 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=Axis, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addAxis] operator[SEP] identifier[Matrix4d] identifier[axis] , Keyword[int] identifier[order] , identifier[SymmetryType] identifier[type] operator[SEP] { identifier[axes] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Axis] operator[SEP] identifier[axis] , identifier[order] , identifier[type] , identifier[axes] operator[SEP] identifier[size] operator[SEP] operator[SEP] , Other[0] operator[SEP] operator[SEP] operator[SEP] }
private static boolean[] findIncludedColumns(List<OrcProto.Type> types, Configuration conf) { String includedStr = conf.get(ColumnProjectionUtils.READ_COLUMN_IDS_CONF_STR); if (includedStr == null || includedStr.trim().length() == 0) { return null; } else { int numColumns = types.size(); boolean[] result = new boolean[numColumns]; result[0] = true; OrcProto.Type root = types.get(0); List<Integer> included = ColumnProjectionUtils.getReadColumnIDs(conf); for(int i=0; i < root.getSubtypesCount(); ++i) { if (included.contains(i)) { includeColumnRecursive(types, result, root.getSubtypes(i)); } } // if we are filtering at least one column, return the boolean array for(boolean include: result) { if (!include) { return result; } } return null; } }
class class_name[name] begin[{] method[findIncludedColumns, return_type[type[boolean]], modifier[private static], parameter[types, conf]] begin[{] local_variable[type[String], includedStr] if[binary_operation[binary_operation[member[.includedStr], ==, literal[null]], ||, binary_operation[call[includedStr.trim, parameter[]], ==, literal[0]]]] begin[{] return[literal[null]] else begin[{] local_variable[type[int], numColumns] local_variable[type[boolean], result] assign[member[.result], literal[true]] local_variable[type[OrcProto], root] local_variable[type[List], included] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=[], qualifier=included, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=types, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getSubtypes, postfix_operators=[], prefix_operators=[], qualifier=root, selectors=[], type_arguments=None)], member=includeColumnRecursive, 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=MethodInvocation(arguments=[], member=getSubtypesCount, postfix_operators=[], prefix_operators=[], qualifier=root, selectors=[], type_arguments=None), 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) ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=include, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=include)], modifiers=set(), type=BasicType(dimensions=[], name=boolean))), label=None) return[literal[null]] end[}] end[}] END[}]
Keyword[private] Keyword[static] Keyword[boolean] operator[SEP] operator[SEP] identifier[findIncludedColumns] operator[SEP] identifier[List] operator[<] identifier[OrcProto] operator[SEP] identifier[Type] operator[>] identifier[types] , identifier[Configuration] identifier[conf] operator[SEP] { identifier[String] identifier[includedStr] operator[=] identifier[conf] operator[SEP] identifier[get] operator[SEP] identifier[ColumnProjectionUtils] operator[SEP] identifier[READ_COLUMN_IDS_CONF_STR] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[includedStr] operator[==] Other[null] operator[||] identifier[includedStr] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[else] { Keyword[int] identifier[numColumns] operator[=] identifier[types] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] operator[SEP] operator[SEP] identifier[result] operator[=] Keyword[new] Keyword[boolean] operator[SEP] identifier[numColumns] operator[SEP] operator[SEP] identifier[result] operator[SEP] Other[0] operator[SEP] operator[=] literal[boolean] operator[SEP] identifier[OrcProto] operator[SEP] identifier[Type] identifier[root] operator[=] identifier[types] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Integer] operator[>] identifier[included] operator[=] identifier[ColumnProjectionUtils] operator[SEP] identifier[getReadColumnIDs] operator[SEP] identifier[conf] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[root] operator[SEP] identifier[getSubtypesCount] operator[SEP] operator[SEP] operator[SEP] operator[++] identifier[i] operator[SEP] { Keyword[if] operator[SEP] identifier[included] operator[SEP] identifier[contains] operator[SEP] identifier[i] operator[SEP] operator[SEP] { identifier[includeColumnRecursive] operator[SEP] identifier[types] , identifier[result] , identifier[root] operator[SEP] identifier[getSubtypes] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] Keyword[boolean] identifier[include] operator[:] identifier[result] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[include] operator[SEP] { Keyword[return] identifier[result] operator[SEP] } } Keyword[return] Other[null] operator[SEP] } }
private static <A extends Annotation> A getAnnotation( AnnotatedElement from, Class<A> annotationType, Set<AnnotatedElement> visited) { if( visited.contains(from) ) return null; visited.add(from); A ann = from.getAnnotation( annotationType ); if( ann != null) return ann; for ( Annotation metaAnn : from.getAnnotations() ) { ann = getAnnotation(metaAnn.annotationType(), annotationType, visited); if ( ann != null ) { return ann; } } return null; }
class class_name[name] begin[{] method[getAnnotation, return_type[type[A]], modifier[private static], parameter[from, annotationType, visited]] begin[{] if[call[visited.contains, parameter[member[.from]]]] begin[{] return[literal[null]] else begin[{] None end[}] call[visited.add, parameter[member[.from]]] local_variable[type[A], ann] if[binary_operation[member[.ann], !=, literal[null]]] begin[{] return[member[.ann]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=ann, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=annotationType, postfix_operators=[], prefix_operators=[], qualifier=metaAnn, selectors=[], type_arguments=None), MemberReference(member=annotationType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=visited, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAnnotation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ann, 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=[ReturnStatement(expression=MemberReference(member=ann, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getAnnotations, postfix_operators=[], prefix_operators=[], qualifier=from, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=metaAnn)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Annotation, sub_type=None))), label=None) return[literal[null]] end[}] END[}]
Keyword[private] Keyword[static] operator[<] identifier[A] Keyword[extends] identifier[Annotation] operator[>] identifier[A] identifier[getAnnotation] operator[SEP] identifier[AnnotatedElement] identifier[from] , identifier[Class] operator[<] identifier[A] operator[>] identifier[annotationType] , identifier[Set] operator[<] identifier[AnnotatedElement] operator[>] identifier[visited] operator[SEP] { Keyword[if] operator[SEP] identifier[visited] operator[SEP] identifier[contains] operator[SEP] identifier[from] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[visited] operator[SEP] identifier[add] operator[SEP] identifier[from] operator[SEP] operator[SEP] identifier[A] identifier[ann] operator[=] identifier[from] operator[SEP] identifier[getAnnotation] operator[SEP] identifier[annotationType] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ann] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[ann] operator[SEP] Keyword[for] operator[SEP] identifier[Annotation] identifier[metaAnn] operator[:] identifier[from] operator[SEP] identifier[getAnnotations] operator[SEP] operator[SEP] operator[SEP] { identifier[ann] operator[=] identifier[getAnnotation] operator[SEP] identifier[metaAnn] operator[SEP] identifier[annotationType] operator[SEP] operator[SEP] , identifier[annotationType] , identifier[visited] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ann] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[ann] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
CallEvent[] makeRandomEvent() { long callId = ++lastCallIdUsed; // get agentid Integer agentId = agentsAvailable.poll(); if (agentId == null) { return null; } // get phone number Long phoneNo = phoneNumbersAvailable.poll(); assert(phoneNo != null); // voltdb timestamp type uses micros from epoch Date startTS = new Date(currentSystemMilliTimestamp); long durationms = -1; long meancalldurationms = config.meancalldurationseconds * 1000; long maxcalldurationms = config.maxcalldurationseconds * 1000; double stddev = meancalldurationms / 2.0; // repeat until in the range (0..maxcalldurationms] while ((durationms <= 0) || (durationms > maxcalldurationms)) { durationms = (long) (rand.nextGaussian() * stddev) + meancalldurationms; } Date endTS = new Date(startTS.getTime() + durationms); CallEvent[] event = new CallEvent[2]; event[0] = new CallEvent(callId, agentId, phoneNo, startTS, null); event[1] = new CallEvent(callId, agentId, phoneNo, null, endTS); // some debugging code //System.out.println("Creating event with range:"); //System.out.println(new Date(startTS.getTime() / 1000)); //System.out.println(new Date(endTS.getTime() / 1000)); return event; }
class class_name[name] begin[{] method[makeRandomEvent, return_type[type[CallEvent]], modifier[default], parameter[]] begin[{] local_variable[type[long], callId] local_variable[type[Integer], agentId] if[binary_operation[member[.agentId], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[Long], phoneNo] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=phoneNo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=None) local_variable[type[Date], startTS] local_variable[type[long], durationms] local_variable[type[long], meancalldurationms] local_variable[type[long], maxcalldurationms] local_variable[type[double], stddev] while[binary_operation[binary_operation[member[.durationms], <=, literal[0]], ||, binary_operation[member[.durationms], >, member[.maxcalldurationms]]]] begin[{] assign[member[.durationms], binary_operation[Cast(expression=BinaryOperation(operandl=MethodInvocation(arguments=[], member=nextGaussian, postfix_operators=[], prefix_operators=[], qualifier=rand, selectors=[], type_arguments=None), operandr=MemberReference(member=stddev, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), type=BasicType(dimensions=[], name=long)), +, member[.meancalldurationms]]] end[}] local_variable[type[Date], endTS] local_variable[type[CallEvent], event] assign[member[.event], ClassCreator(arguments=[MemberReference(member=callId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=agentId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=phoneNo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=startTS, postfix_operators=[], prefix_operators=[], qualifier=, 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=CallEvent, sub_type=None))] assign[member[.event], ClassCreator(arguments=[MemberReference(member=callId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=agentId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=phoneNo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=endTS, 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=CallEvent, sub_type=None))] return[member[.event]] end[}] END[}]
identifier[CallEvent] operator[SEP] operator[SEP] identifier[makeRandomEvent] operator[SEP] operator[SEP] { Keyword[long] identifier[callId] operator[=] operator[++] identifier[lastCallIdUsed] operator[SEP] identifier[Integer] identifier[agentId] operator[=] identifier[agentsAvailable] operator[SEP] identifier[poll] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[agentId] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[Long] identifier[phoneNo] operator[=] identifier[phoneNumbersAvailable] operator[SEP] identifier[poll] operator[SEP] operator[SEP] operator[SEP] Keyword[assert] operator[SEP] identifier[phoneNo] operator[!=] Other[null] operator[SEP] operator[SEP] identifier[Date] identifier[startTS] operator[=] Keyword[new] identifier[Date] operator[SEP] identifier[currentSystemMilliTimestamp] operator[SEP] operator[SEP] Keyword[long] identifier[durationms] operator[=] operator[-] Other[1] operator[SEP] Keyword[long] identifier[meancalldurationms] operator[=] identifier[config] operator[SEP] identifier[meancalldurationseconds] operator[*] Other[1000] operator[SEP] Keyword[long] identifier[maxcalldurationms] operator[=] identifier[config] operator[SEP] identifier[maxcalldurationseconds] operator[*] Other[1000] operator[SEP] Keyword[double] identifier[stddev] operator[=] identifier[meancalldurationms] operator[/] literal[Float] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[durationms] operator[<=] Other[0] operator[SEP] operator[||] operator[SEP] identifier[durationms] operator[>] identifier[maxcalldurationms] operator[SEP] operator[SEP] { identifier[durationms] operator[=] operator[SEP] Keyword[long] operator[SEP] operator[SEP] identifier[rand] operator[SEP] identifier[nextGaussian] operator[SEP] operator[SEP] operator[*] identifier[stddev] operator[SEP] operator[+] identifier[meancalldurationms] operator[SEP] } identifier[Date] identifier[endTS] operator[=] Keyword[new] identifier[Date] operator[SEP] identifier[startTS] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[+] identifier[durationms] operator[SEP] operator[SEP] identifier[CallEvent] operator[SEP] operator[SEP] identifier[event] operator[=] Keyword[new] identifier[CallEvent] operator[SEP] Other[2] operator[SEP] operator[SEP] identifier[event] operator[SEP] Other[0] operator[SEP] operator[=] Keyword[new] identifier[CallEvent] operator[SEP] identifier[callId] , identifier[agentId] , identifier[phoneNo] , identifier[startTS] , Other[null] operator[SEP] operator[SEP] identifier[event] operator[SEP] Other[1] operator[SEP] operator[=] Keyword[new] identifier[CallEvent] operator[SEP] identifier[callId] , identifier[agentId] , identifier[phoneNo] , Other[null] , identifier[endTS] operator[SEP] operator[SEP] Keyword[return] identifier[event] operator[SEP] }
private void getRubygemsSetupScript(RubyStringBuilder builder) { File[] gemPaths = gemsConfig.getGemPath(); if (gemHome == null && gemPaths == null) { return; } builder.appendLine("# Set up GEM_HOME and GEM_PATH for running outside of maven"); builder.appendLine(); if (gemHome != null) { builder.appendLine("ENV['GEM_HOME']='" + gemHome + "'"); } if (gemPaths != null) { builder.append("ENV['GEM_PATH']='"); String sep = ""; for(File path: gemPaths) { builder.append(sep + path); sep = System.getProperty("path.separator"); } builder.appendLine("'"); } builder.appendLine(); }
class class_name[name] begin[{] method[getRubygemsSetupScript, return_type[void], modifier[private], parameter[builder]] begin[{] local_variable[type[File], gemPaths] if[binary_operation[binary_operation[member[.gemHome], ==, literal[null]], &&, binary_operation[member[.gemPaths], ==, literal[null]]]] begin[{] return[None] else begin[{] None end[}] call[builder.appendLine, parameter[literal["# Set up GEM_HOME and GEM_PATH for running outside of maven"]]] call[builder.appendLine, parameter[]] if[binary_operation[member[.gemHome], !=, literal[null]]] begin[{] call[builder.appendLine, parameter[binary_operation[binary_operation[literal["ENV['GEM_HOME']='"], +, member[.gemHome]], +, literal["'"]]]] else begin[{] None end[}] if[binary_operation[member[.gemPaths], !=, literal[null]]] begin[{] call[builder.append, parameter[literal["ENV['GEM_PATH']='"]]] local_variable[type[String], sep] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=sep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=append, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=sep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="path.separator")], member=getProperty, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None)), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=gemPaths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=path)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))), label=None) call[builder.appendLine, parameter[literal["'"]]] else begin[{] None end[}] call[builder.appendLine, parameter[]] end[}] END[}]
Keyword[private] Keyword[void] identifier[getRubygemsSetupScript] operator[SEP] identifier[RubyStringBuilder] identifier[builder] operator[SEP] { identifier[File] operator[SEP] operator[SEP] identifier[gemPaths] operator[=] identifier[gemsConfig] operator[SEP] identifier[getGemPath] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[gemHome] operator[==] Other[null] operator[&&] identifier[gemPaths] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } identifier[builder] operator[SEP] identifier[appendLine] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[appendLine] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[gemHome] operator[!=] Other[null] operator[SEP] { identifier[builder] operator[SEP] identifier[appendLine] operator[SEP] literal[String] operator[+] identifier[gemHome] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[gemPaths] operator[!=] Other[null] operator[SEP] { identifier[builder] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[sep] operator[=] literal[String] operator[SEP] Keyword[for] operator[SEP] identifier[File] identifier[path] operator[:] identifier[gemPaths] operator[SEP] { identifier[builder] operator[SEP] identifier[append] operator[SEP] identifier[sep] operator[+] identifier[path] operator[SEP] operator[SEP] identifier[sep] operator[=] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[builder] operator[SEP] identifier[appendLine] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[builder] operator[SEP] identifier[appendLine] operator[SEP] operator[SEP] operator[SEP] }
private ComparisonState compareCharacterData(CharacterData control, XPathContext controlContext, CharacterData test, XPathContext testContext) { return compare(new Comparison(ComparisonType.TEXT_VALUE, control, getXPath(controlContext), control.getData(), getParentXPath(controlContext), test, getXPath(testContext), test.getData(), getParentXPath(testContext))); }
class class_name[name] begin[{] method[compareCharacterData, return_type[type[ComparisonState]], modifier[private], parameter[control, controlContext, test, testContext]] begin[{] return[call[.compare, parameter[ClassCreator(arguments=[MemberReference(member=TEXT_VALUE, postfix_operators=[], prefix_operators=[], qualifier=ComparisonType, selectors=[]), MemberReference(member=control, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=controlContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getXPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getData, postfix_operators=[], prefix_operators=[], qualifier=control, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=controlContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getParentXPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=test, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=testContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getXPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getData, postfix_operators=[], prefix_operators=[], qualifier=test, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=testContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getParentXPath, 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=Comparison, sub_type=None))]]] end[}] END[}]
Keyword[private] identifier[ComparisonState] identifier[compareCharacterData] operator[SEP] identifier[CharacterData] identifier[control] , identifier[XPathContext] identifier[controlContext] , identifier[CharacterData] identifier[test] , identifier[XPathContext] identifier[testContext] operator[SEP] { Keyword[return] identifier[compare] operator[SEP] Keyword[new] identifier[Comparison] operator[SEP] identifier[ComparisonType] operator[SEP] identifier[TEXT_VALUE] , identifier[control] , identifier[getXPath] operator[SEP] identifier[controlContext] operator[SEP] , identifier[control] operator[SEP] identifier[getData] operator[SEP] operator[SEP] , identifier[getParentXPath] operator[SEP] identifier[controlContext] operator[SEP] , identifier[test] , identifier[getXPath] operator[SEP] identifier[testContext] operator[SEP] , identifier[test] operator[SEP] identifier[getData] operator[SEP] operator[SEP] , identifier[getParentXPath] operator[SEP] identifier[testContext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public PlanNode findAncestor( Type firstTypeToFind, Type... additionalTypesToFind ) { return findAncestor(EnumSet.of(firstTypeToFind, additionalTypesToFind)); }
class class_name[name] begin[{] method[findAncestor, return_type[type[PlanNode]], modifier[public], parameter[firstTypeToFind, additionalTypesToFind]] begin[{] return[call[.findAncestor, parameter[call[EnumSet.of, parameter[member[.firstTypeToFind], member[.additionalTypesToFind]]]]]] end[}] END[}]
Keyword[public] identifier[PlanNode] identifier[findAncestor] operator[SEP] identifier[Type] identifier[firstTypeToFind] , identifier[Type] operator[...] identifier[additionalTypesToFind] operator[SEP] { Keyword[return] identifier[findAncestor] operator[SEP] identifier[EnumSet] operator[SEP] identifier[of] operator[SEP] identifier[firstTypeToFind] , identifier[additionalTypesToFind] operator[SEP] operator[SEP] operator[SEP] }
public byte read(int offset) throws IOException { if (ensureBuffer(offset, 1) > 0) { this.pos = offset + 1; return this.buffer[offset]; } throw new EOFException(); }
class class_name[name] begin[{] method[read, return_type[type[byte]], modifier[public], parameter[offset]] begin[{] if[binary_operation[call[.ensureBuffer, parameter[member[.offset], literal[1]]], >, literal[0]]] begin[{] assign[THIS[member[None.pos]], binary_operation[member[.offset], +, literal[1]]] return[THIS[member[None.buffer]ArraySelector(index=MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=EOFException, sub_type=None)), label=None) end[}] END[}]
Keyword[public] Keyword[byte] identifier[read] operator[SEP] Keyword[int] identifier[offset] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[ensureBuffer] operator[SEP] identifier[offset] , Other[1] operator[SEP] operator[>] Other[0] operator[SEP] { Keyword[this] operator[SEP] identifier[pos] operator[=] identifier[offset] operator[+] Other[1] operator[SEP] Keyword[return] Keyword[this] operator[SEP] identifier[buffer] operator[SEP] identifier[offset] operator[SEP] operator[SEP] } Keyword[throw] Keyword[new] identifier[EOFException] operator[SEP] operator[SEP] operator[SEP] }
public static String insertIndex(String key, Integer index) { if (index == null) return key; int pos = key.indexOf('.'); if (pos >= 0) { return key.substring(0, pos) + '[' + index + ']' + key.substring(pos); } else { return key + '[' + index + ']'; } }
class class_name[name] begin[{] method[insertIndex, return_type[type[String]], modifier[public static], parameter[key, index]] begin[{] if[binary_operation[member[.index], ==, literal[null]]] begin[{] return[member[.key]] else begin[{] None end[}] local_variable[type[int], pos] if[binary_operation[member[.pos], >=, literal[0]]] begin[{] return[binary_operation[binary_operation[binary_operation[binary_operation[call[key.substring, parameter[literal[0], member[.pos]]], +, literal['[']], +, member[.index]], +, literal[']']], +, call[key.substring, parameter[member[.pos]]]]] else begin[{] return[binary_operation[binary_operation[binary_operation[member[.key], +, literal['[']], +, member[.index]], +, literal[']']]] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[insertIndex] operator[SEP] identifier[String] identifier[key] , identifier[Integer] identifier[index] operator[SEP] { Keyword[if] operator[SEP] identifier[index] operator[==] Other[null] operator[SEP] Keyword[return] identifier[key] operator[SEP] Keyword[int] identifier[pos] operator[=] identifier[key] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pos] operator[>=] Other[0] operator[SEP] { Keyword[return] identifier[key] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[pos] operator[SEP] operator[+] literal[String] operator[+] identifier[index] operator[+] literal[String] operator[+] identifier[key] operator[SEP] identifier[substring] operator[SEP] identifier[pos] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[key] operator[+] literal[String] operator[+] identifier[index] operator[+] literal[String] operator[SEP] } }
public static ProtocolFamily convert(InternetProtocolFamily family) { switch (family) { case IPv4: return StandardProtocolFamily.INET; case IPv6: return StandardProtocolFamily.INET6; default: throw new IllegalArgumentException(); } }
class class_name[name] begin[{] method[convert, return_type[type[ProtocolFamily]], modifier[public static], parameter[family]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['IPv4'], statements=[ReturnStatement(expression=MemberReference(member=INET, postfix_operators=[], prefix_operators=[], qualifier=StandardProtocolFamily, selectors=[]), label=None)]), SwitchStatementCase(case=['IPv6'], statements=[ReturnStatement(expression=MemberReference(member=INET6, postfix_operators=[], prefix_operators=[], qualifier=StandardProtocolFamily, selectors=[]), label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[], 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)])], expression=MemberReference(member=family, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[ProtocolFamily] identifier[convert] operator[SEP] identifier[InternetProtocolFamily] identifier[family] operator[SEP] { Keyword[switch] operator[SEP] identifier[family] operator[SEP] { Keyword[case] identifier[IPv4] operator[:] Keyword[return] identifier[StandardProtocolFamily] operator[SEP] identifier[INET] operator[SEP] Keyword[case] identifier[IPv6] operator[:] Keyword[return] identifier[StandardProtocolFamily] operator[SEP] identifier[INET6] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] operator[SEP] operator[SEP] } }
public static <T> JacksonDBCollection<T, Object> wrap(DBCollection dbCollection, Class<T> type) { return new JacksonDBCollection<T, Object>(dbCollection, DEFAULT_OBJECT_MAPPER.constructType(type), DEFAULT_OBJECT_MAPPER.constructType(Object.class), DEFAULT_OBJECT_MAPPER, null); }
class class_name[name] begin[{] method[wrap, return_type[type[JacksonDBCollection]], modifier[public static], parameter[dbCollection, type]] begin[{] return[ClassCreator(arguments=[MemberReference(member=dbCollection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=constructType, postfix_operators=[], prefix_operators=[], qualifier=DEFAULT_OBJECT_MAPPER, selectors=[], type_arguments=None), MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=constructType, postfix_operators=[], prefix_operators=[], qualifier=DEFAULT_OBJECT_MAPPER, selectors=[], type_arguments=None), MemberReference(member=DEFAULT_OBJECT_MAPPER, postfix_operators=[], prefix_operators=[], qualifier=, 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=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=None, name=JacksonDBCollection, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[JacksonDBCollection] operator[<] identifier[T] , identifier[Object] operator[>] identifier[wrap] operator[SEP] identifier[DBCollection] identifier[dbCollection] , identifier[Class] operator[<] identifier[T] operator[>] identifier[type] operator[SEP] { Keyword[return] Keyword[new] identifier[JacksonDBCollection] operator[<] identifier[T] , identifier[Object] operator[>] operator[SEP] identifier[dbCollection] , identifier[DEFAULT_OBJECT_MAPPER] operator[SEP] identifier[constructType] operator[SEP] identifier[type] operator[SEP] , identifier[DEFAULT_OBJECT_MAPPER] operator[SEP] identifier[constructType] operator[SEP] identifier[Object] operator[SEP] Keyword[class] operator[SEP] , identifier[DEFAULT_OBJECT_MAPPER] , Other[null] operator[SEP] operator[SEP] }
public static List<Integer> toIntegerList(int[] array) { List<Integer> result = new ArrayList<Integer>(array.length); for (int partitionId : array) { result.add(partitionId); } return result; }
class class_name[name] begin[{] method[toIntegerList, return_type[type[List]], modifier[public static], parameter[array]] begin[{] local_variable[type[List], result] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=partitionId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=partitionId)], modifiers=set(), type=BasicType(dimensions=[], name=int))), label=None) return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[Integer] operator[>] identifier[toIntegerList] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[array] operator[SEP] { identifier[List] operator[<] identifier[Integer] operator[>] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Integer] operator[>] operator[SEP] identifier[array] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[partitionId] operator[:] identifier[array] operator[SEP] { identifier[result] operator[SEP] identifier[add] operator[SEP] identifier[partitionId] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public synchronized int addColumn(Vector col) { if (isFinished) throw new IllegalStateException( "Cannot add columns to a MatrixBuilder that is finished"); DoubleVector column = Vectors.asDouble(col); if (column.length() > numRows) numRows = column.length(); // Vector instances can take on the maximum possible array size when the // vector length isn't specified. This ruins the matrix size // specification since the matrix shouldn't actually be that big. // However, because this is an implementation artifact, we can't check // for it explicitly with an exception. Therefore, put in an assert to // indicate what is likely going on if asserts are enabled for debugging // they symptoms. assert column.length() != Integer.MAX_VALUE : "adding a column whose " + "length is Integer.MAX_VALUE (was likley left unspecified in the " + " constructor)."; // Special case for sparse Vectors, for which we already know the // non-zero indices for the column if (column instanceof SparseVector) { SparseVector s = (SparseVector)column; int[] nonZero = s.getNonZeroIndices(); nonZeroValues += nonZero.length; System.out.println(nonZero.length); try { matrixDos.writeInt(nonZero.length); for (int i : nonZero) { double val = column.get(i); matrixDos.writeInt(i); // write the row index matrixDos.writeFloat((float)val); } } catch (IOException ioe) { throw new IOError(ioe); } } // For dense Vectors, find which values are non-zero and write only // those else { int nonZero = 0; for (int i = 0; i < column.length(); ++i) { double d = column.get(i); if (d != 0d) nonZero++; } // Update the matrix count nonZeroValues += nonZero; try { matrixDos.writeInt(nonZero); // Write the number of non-zero values in the column for (int i = 0; i < column.length(); ++i) { double value = column.get(i); if (value != 0d) { matrixDos.writeInt(i); // write the row index matrixDos.writeFloat((float)value); } } } catch (IOException ioe) { throw new IOError(ioe); } } return ++curCol; }
class class_name[name] begin[{] method[addColumn, return_type[type[int]], modifier[synchronized public], parameter[col]] begin[{] if[member[.isFinished]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot add columns to a MatrixBuilder that is finished")], 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) else begin[{] None end[}] local_variable[type[DoubleVector], column] if[binary_operation[call[column.length, parameter[]], >, member[.numRows]]] begin[{] assign[member[.numRows], call[column.length, parameter[]]] else begin[{] None end[}] AssertStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=column, selectors=[], type_arguments=None), operandr=MemberReference(member=MAX_VALUE, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[]), operator=!=), label=None, value=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="adding a column whose "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="length is Integer.MAX_VALUE (was likley left unspecified in the "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" constructor)."), operator=+)) if[binary_operation[member[.column], instanceof, type[SparseVector]]] begin[{] local_variable[type[SparseVector], s] local_variable[type[int], nonZero] assign[member[.nonZeroValues], member[nonZero.length]] call[System.out.println, parameter[member[nonZero.length]]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=nonZero, selectors=[])], member=writeInt, postfix_operators=[], prefix_operators=[], qualifier=matrixDos, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=column, selectors=[], type_arguments=None), name=val)], modifiers=set(), type=BasicType(dimensions=[], name=double)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeInt, postfix_operators=[], prefix_operators=[], qualifier=matrixDos, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=float))], member=writeFloat, postfix_operators=[], prefix_operators=[], qualifier=matrixDos, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=nonZero, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int))), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=ioe, 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=IOError, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ioe, types=['IOException']))], finally_block=None, label=None, resources=None) else begin[{] local_variable[type[int], nonZero] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=column, selectors=[], type_arguments=None), name=d)], modifiers=set(), type=BasicType(dimensions=[], name=double)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0d), operator=!=), else_statement=None, label=None, then_statement=StatementExpression(expression=MemberReference(member=nonZero, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=column, selectors=[], type_arguments=None), 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) assign[member[.nonZeroValues], member[.nonZero]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=nonZero, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeInt, postfix_operators=[], prefix_operators=[], qualifier=matrixDos, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=column, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=BasicType(dimensions=[], name=double)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0d), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeInt, postfix_operators=[], prefix_operators=[], qualifier=matrixDos, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=float))], member=writeFloat, postfix_operators=[], prefix_operators=[], qualifier=matrixDos, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=column, selectors=[], type_arguments=None), 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)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=ioe, 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=IOError, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ioe, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] return[member[.curCol]] end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[int] identifier[addColumn] operator[SEP] identifier[Vector] identifier[col] operator[SEP] { Keyword[if] operator[SEP] identifier[isFinished] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[DoubleVector] identifier[column] operator[=] identifier[Vectors] operator[SEP] identifier[asDouble] operator[SEP] identifier[col] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[column] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] identifier[numRows] operator[SEP] identifier[numRows] operator[=] identifier[column] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[assert] identifier[column] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[!=] identifier[Integer] operator[SEP] identifier[MAX_VALUE] operator[:] literal[String] operator[+] literal[String] operator[+] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[column] Keyword[instanceof] identifier[SparseVector] operator[SEP] { identifier[SparseVector] identifier[s] operator[=] operator[SEP] identifier[SparseVector] operator[SEP] identifier[column] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[nonZero] operator[=] identifier[s] operator[SEP] identifier[getNonZeroIndices] operator[SEP] operator[SEP] operator[SEP] identifier[nonZeroValues] operator[+=] identifier[nonZero] operator[SEP] identifier[length] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[nonZero] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[try] { identifier[matrixDos] operator[SEP] identifier[writeInt] operator[SEP] identifier[nonZero] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[:] identifier[nonZero] operator[SEP] { Keyword[double] identifier[val] operator[=] identifier[column] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[matrixDos] operator[SEP] identifier[writeInt] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[matrixDos] operator[SEP] identifier[writeFloat] operator[SEP] operator[SEP] Keyword[float] operator[SEP] identifier[val] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[IOException] identifier[ioe] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOError] operator[SEP] identifier[ioe] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[int] identifier[nonZero] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[column] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[++] identifier[i] operator[SEP] { Keyword[double] identifier[d] operator[=] identifier[column] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[d] operator[!=] literal[Float] operator[SEP] identifier[nonZero] operator[++] operator[SEP] } identifier[nonZeroValues] operator[+=] identifier[nonZero] operator[SEP] Keyword[try] { identifier[matrixDos] operator[SEP] identifier[writeInt] operator[SEP] identifier[nonZero] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[column] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[++] identifier[i] operator[SEP] { Keyword[double] identifier[value] operator[=] identifier[column] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[!=] literal[Float] operator[SEP] { identifier[matrixDos] operator[SEP] identifier[writeInt] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[matrixDos] operator[SEP] identifier[writeFloat] operator[SEP] operator[SEP] Keyword[float] operator[SEP] identifier[value] operator[SEP] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[IOException] identifier[ioe] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOError] operator[SEP] identifier[ioe] operator[SEP] operator[SEP] } } Keyword[return] operator[++] identifier[curCol] operator[SEP] }
public void startEnvSetup(boolean transactional) throws Exception { // set classloader if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE)) { logger.logp(Level.FINE, CLASS_NAME, "startEnvSetup", "enter"); } ClassLoader origCl = ThreadContextHelper.getContextClassLoader(); final ClassLoader warClassLoader = getClassLoaderInternal(); if (warClassLoader != origCl) { ThreadContextHelper.setClassLoader(warClassLoader); } else { origCl = null; } // createCollaboratorHelper(); webAppNameSpaceCollab.preInvoke(getModuleMetaData().getCollaboratorComponentMetaData()); // transaction preinvoke Object tx = null; if (transactional) { tx = txCollab.preInvoke(null, this.isServlet23); } UnsynchronizedStack envObjectStack = (UnsynchronizedStack) envObject.get(); if (envObjectStack == null) { envObjectStack = new UnsynchronizedStack(); envObject.set(envObjectStack); } envObjectStack.push(new EnvObject(origCl, tx)); if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE)) { logger.logp(Level.FINE, CLASS_NAME, "startEnvSetup", "exit"); } }
class class_name[name] begin[{] method[startEnvSetup, return_type[void], modifier[public], parameter[transactional]] begin[{] if[binary_operation[call[com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[logger.isLoggable, parameter[member[Level.FINE]]]]] begin[{] call[logger.logp, parameter[member[Level.FINE], member[.CLASS_NAME], literal["startEnvSetup"], literal["enter"]]] else begin[{] None end[}] local_variable[type[ClassLoader], origCl] local_variable[type[ClassLoader], warClassLoader] if[binary_operation[member[.warClassLoader], !=, member[.origCl]]] begin[{] call[ThreadContextHelper.setClassLoader, parameter[member[.warClassLoader]]] else begin[{] assign[member[.origCl], literal[null]] end[}] call[webAppNameSpaceCollab.preInvoke, parameter[call[.getModuleMetaData, parameter[]]]] local_variable[type[Object], tx] if[member[.transactional]] begin[{] assign[member[.tx], call[txCollab.preInvoke, parameter[literal[null], THIS[member[None.isServlet23]]]]] else begin[{] None end[}] local_variable[type[UnsynchronizedStack], envObjectStack] if[binary_operation[member[.envObjectStack], ==, literal[null]]] begin[{] assign[member[.envObjectStack], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UnsynchronizedStack, sub_type=None))] call[envObject.set, parameter[member[.envObjectStack]]] else begin[{] None end[}] call[envObjectStack.push, parameter[ClassCreator(arguments=[MemberReference(member=origCl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tx, 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=EnvObject, sub_type=None))]] if[binary_operation[call[com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[logger.isLoggable, parameter[member[Level.FINE]]]]] begin[{] call[logger.logp, parameter[member[Level.FINE], member[.CLASS_NAME], literal["startEnvSetup"], literal["exit"]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[startEnvSetup] operator[SEP] Keyword[boolean] identifier[transactional] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[if] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ejs] operator[SEP] identifier[ras] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[logger] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[FINE] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[logp] operator[SEP] identifier[Level] operator[SEP] identifier[FINE] , identifier[CLASS_NAME] , literal[String] , literal[String] operator[SEP] operator[SEP] } identifier[ClassLoader] identifier[origCl] operator[=] identifier[ThreadContextHelper] operator[SEP] identifier[getContextClassLoader] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[ClassLoader] identifier[warClassLoader] operator[=] identifier[getClassLoaderInternal] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[warClassLoader] operator[!=] identifier[origCl] operator[SEP] { identifier[ThreadContextHelper] operator[SEP] identifier[setClassLoader] operator[SEP] identifier[warClassLoader] operator[SEP] operator[SEP] } Keyword[else] { identifier[origCl] operator[=] Other[null] operator[SEP] } identifier[webAppNameSpaceCollab] operator[SEP] identifier[preInvoke] operator[SEP] identifier[getModuleMetaData] operator[SEP] operator[SEP] operator[SEP] identifier[getCollaboratorComponentMetaData] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Object] identifier[tx] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[transactional] operator[SEP] { identifier[tx] operator[=] identifier[txCollab] operator[SEP] identifier[preInvoke] operator[SEP] Other[null] , Keyword[this] operator[SEP] identifier[isServlet23] operator[SEP] operator[SEP] } identifier[UnsynchronizedStack] identifier[envObjectStack] operator[=] operator[SEP] identifier[UnsynchronizedStack] operator[SEP] identifier[envObject] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[envObjectStack] operator[==] Other[null] operator[SEP] { identifier[envObjectStack] operator[=] Keyword[new] identifier[UnsynchronizedStack] operator[SEP] operator[SEP] operator[SEP] identifier[envObject] operator[SEP] identifier[set] operator[SEP] identifier[envObjectStack] operator[SEP] operator[SEP] } identifier[envObjectStack] operator[SEP] identifier[push] operator[SEP] Keyword[new] identifier[EnvObject] operator[SEP] identifier[origCl] , identifier[tx] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ejs] operator[SEP] identifier[ras] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[logger] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[FINE] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[logp] operator[SEP] identifier[Level] operator[SEP] identifier[FINE] , identifier[CLASS_NAME] , literal[String] , literal[String] operator[SEP] operator[SEP] } }
boolean checkReplay(int seqNo, long guessedIndex) { // compute the index of previously received packet and its // delta to the new received packet long localIndex = (((long) this.roc) << 16) | this.seqNum; long delta = guessedIndex - localIndex; if (delta > 0) { /* Packet not yet received */ return true; } else { if (-delta > REPLAY_WINDOW_SIZE) { /* Packet too old */ return false; } else { if (((this.replayWindow >> (-delta)) & 0x1) != 0) { /* Packet already received ! */ return false; } else { /* Packet not yet received */ return true; } } } }
class class_name[name] begin[{] method[checkReplay, return_type[type[boolean]], modifier[default], parameter[seqNo, guessedIndex]] begin[{] local_variable[type[long], localIndex] local_variable[type[long], delta] if[binary_operation[member[.delta], >, literal[0]]] begin[{] return[literal[true]] else begin[{] if[binary_operation[member[.delta], >, member[.REPLAY_WINDOW_SIZE]]] begin[{] return[literal[false]] else begin[{] if[binary_operation[binary_operation[binary_operation[THIS[member[None.replayWindow]], >>, member[.delta]], &, literal[0x1]], !=, literal[0]]] begin[{] return[literal[false]] else begin[{] return[literal[true]] end[}] end[}] end[}] end[}] END[}]
Keyword[boolean] identifier[checkReplay] operator[SEP] Keyword[int] identifier[seqNo] , Keyword[long] identifier[guessedIndex] operator[SEP] { Keyword[long] identifier[localIndex] operator[=] operator[SEP] operator[SEP] operator[SEP] Keyword[long] operator[SEP] Keyword[this] operator[SEP] identifier[roc] operator[SEP] operator[<<] Other[16] operator[SEP] operator[|] Keyword[this] operator[SEP] identifier[seqNum] operator[SEP] Keyword[long] identifier[delta] operator[=] identifier[guessedIndex] operator[-] identifier[localIndex] operator[SEP] Keyword[if] operator[SEP] identifier[delta] operator[>] Other[0] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] operator[-] identifier[delta] operator[>] identifier[REPLAY_WINDOW_SIZE] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[replayWindow] operator[>] operator[>] operator[SEP] operator[-] identifier[delta] operator[SEP] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[!=] Other[0] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { Keyword[return] literal[boolean] operator[SEP] } } } }
public void delete(String job, Map<String, String> groupingKey) throws IOException { doRequest(null, job, groupingKey, "DELETE"); }
class class_name[name] begin[{] method[delete, return_type[void], modifier[public], parameter[job, groupingKey]] begin[{] call[.doRequest, parameter[literal[null], member[.job], member[.groupingKey], literal["DELETE"]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[delete] operator[SEP] identifier[String] identifier[job] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[groupingKey] operator[SEP] Keyword[throws] identifier[IOException] { identifier[doRequest] operator[SEP] Other[null] , identifier[job] , identifier[groupingKey] , literal[String] operator[SEP] operator[SEP] }
public SDVariable slice(String name, SDVariable input, int[] begin, int[] size) { SDVariable ret = f().slice(input, begin, size); return updateVariableNameAndReference(ret, name); }
class class_name[name] begin[{] method[slice, return_type[type[SDVariable]], modifier[public], parameter[name, input, begin, size]] begin[{] local_variable[type[SDVariable], ret] return[call[.updateVariableNameAndReference, parameter[member[.ret], member[.name]]]] end[}] END[}]
Keyword[public] identifier[SDVariable] identifier[slice] operator[SEP] identifier[String] identifier[name] , identifier[SDVariable] identifier[input] , Keyword[int] operator[SEP] operator[SEP] identifier[begin] , Keyword[int] operator[SEP] operator[SEP] identifier[size] operator[SEP] { identifier[SDVariable] identifier[ret] operator[=] identifier[f] operator[SEP] operator[SEP] operator[SEP] identifier[slice] operator[SEP] identifier[input] , identifier[begin] , identifier[size] operator[SEP] operator[SEP] Keyword[return] identifier[updateVariableNameAndReference] operator[SEP] identifier[ret] , identifier[name] operator[SEP] operator[SEP] }
private Map<Environment, Collection<ArtifactIdentifier>> getArtifactIdentifiers(List<Environment> environments) { Map<Environment, Collection<ArtifactIdentifier>> rt = new HashMap<>(); for (Environment env : environments) { Set<ArtifactIdentifier> ids = new HashSet<>(); if (env.getUnits() != null) { for (DeployableUnit du : env.getUnits()) { String artifactName = du.getName(); String artifactExtension = null; int dotIdx = artifactName.lastIndexOf('.'); if (dotIdx > 0) { // If idx is 0 starts with a dot... in which case not an extension artifactName = artifactName.substring(0, dotIdx); artifactExtension = artifactName.substring(dotIdx); } ArtifactIdentifier id = new ArtifactIdentifier(null, artifactName, du.getVersion(), null, artifactExtension); ids.add(id); } } rt.put(env, new ArrayList<>(ids)); } return rt; }
class class_name[name] begin[{] method[getArtifactIdentifiers, return_type[type[Map]], modifier[private], parameter[environments]] begin[{] local_variable[type[Map], rt] ForStatement(body=BlockStatement(label=None, 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=[], dimensions=None, name=HashSet, sub_type=None)), name=ids)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ArtifactIdentifier, sub_type=None))], dimensions=[], name=Set, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getUnits, postfix_operators=[], prefix_operators=[], qualifier=env, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=du, selectors=[], type_arguments=None), name=artifactName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=artifactExtension)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='.')], member=lastIndexOf, postfix_operators=[], prefix_operators=[], qualifier=artifactName, selectors=[], type_arguments=None), name=dotIdx)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=dotIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=artifactName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=dotIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=artifactName, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=artifactExtension, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=dotIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=artifactName, selectors=[], type_arguments=None)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=artifactName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getVersion, postfix_operators=[], prefix_operators=[], qualifier=du, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=artifactExtension, 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=ArtifactIdentifier, sub_type=None)), name=id)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ArtifactIdentifier, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=ids, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getUnits, postfix_operators=[], prefix_operators=[], qualifier=env, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=du)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DeployableUnit, sub_type=None))), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=env, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MemberReference(member=ids, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None))], member=put, postfix_operators=[], prefix_operators=[], qualifier=rt, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=environments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=env)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Environment, sub_type=None))), label=None) return[member[.rt]] end[}] END[}]
Keyword[private] identifier[Map] operator[<] identifier[Environment] , identifier[Collection] operator[<] identifier[ArtifactIdentifier] operator[>] operator[>] identifier[getArtifactIdentifiers] operator[SEP] identifier[List] operator[<] identifier[Environment] operator[>] identifier[environments] operator[SEP] { identifier[Map] operator[<] identifier[Environment] , identifier[Collection] operator[<] identifier[ArtifactIdentifier] operator[>] operator[>] identifier[rt] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Environment] identifier[env] operator[:] identifier[environments] operator[SEP] { identifier[Set] operator[<] identifier[ArtifactIdentifier] operator[>] identifier[ids] operator[=] Keyword[new] identifier[HashSet] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[env] operator[SEP] identifier[getUnits] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[DeployableUnit] identifier[du] operator[:] identifier[env] operator[SEP] identifier[getUnits] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[artifactName] operator[=] identifier[du] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[artifactExtension] operator[=] Other[null] operator[SEP] Keyword[int] identifier[dotIdx] operator[=] identifier[artifactName] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dotIdx] operator[>] Other[0] operator[SEP] { identifier[artifactName] operator[=] identifier[artifactName] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[dotIdx] operator[SEP] operator[SEP] identifier[artifactExtension] operator[=] identifier[artifactName] operator[SEP] identifier[substring] operator[SEP] identifier[dotIdx] operator[SEP] operator[SEP] } identifier[ArtifactIdentifier] identifier[id] operator[=] Keyword[new] identifier[ArtifactIdentifier] operator[SEP] Other[null] , identifier[artifactName] , identifier[du] operator[SEP] identifier[getVersion] operator[SEP] operator[SEP] , Other[null] , identifier[artifactExtension] operator[SEP] operator[SEP] identifier[ids] operator[SEP] identifier[add] operator[SEP] identifier[id] operator[SEP] operator[SEP] } } identifier[rt] operator[SEP] identifier[put] operator[SEP] identifier[env] , Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[ids] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[rt] operator[SEP] }
public void remove() throws TransactionRequiredLocalException, TransactionRolledbackLocalException, SLEEException { if (logger.isDebugEnabled()) { logger.debug("removing profile with name " + getProfileName() + " from table with name " + getProfileTableName()); } sleeContainer.getTransactionManager().mandateTransaction(); try { ProfileEntity profileEntity = profileObject.getProfileEntity(); if (profileEntity != null) { // confirm it is still the same tx checkTransaction(); // remove profileEntity.remove(); } else { // there is no profile assigned to the object if(getProfileTable().find(getProfileName()) == null) { // this exception has priority throw new NoSuchObjectLocalException("the profile with name "+getProfileName()+" was not found on table with name "+getProfileTableName()); } else { throw new IllegalStateException("the profile object is no longer valid"); } } } catch (RuntimeException e) { try { profileObject.invalidateObject(); sleeContainer.getTransactionManager().setRollbackOnly(); } catch (SystemException e1) { throw new SLEEException(e1.getMessage(),e1); }; throw new TransactionRolledbackLocalException(e.getMessage(),e); } }
class class_name[name] begin[{] method[remove, return_type[void], modifier[public], parameter[]] begin[{] if[call[logger.isDebugEnabled, parameter[]]] begin[{] call[logger.debug, parameter[binary_operation[binary_operation[binary_operation[literal["removing profile with name "], +, call[.getProfileName, parameter[]]], +, literal[" from table with name "]], +, call[.getProfileTableName, parameter[]]]]] else begin[{] None end[}] call[sleeContainer.getTransactionManager, parameter[]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getProfileEntity, postfix_operators=[], prefix_operators=[], qualifier=profileObject, selectors=[], type_arguments=None), name=profileEntity)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ProfileEntity, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=profileEntity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getProfileTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getProfileName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=find, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="the profile object is no longer valid")], 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, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="the profile with name "), operandr=MethodInvocation(arguments=[], member=getProfileName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" was not found on table with name "), operator=+), operandr=MethodInvocation(arguments=[], member=getProfileTableName, postfix_operators=[], prefix_operators=[], qualifier=, 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=NoSuchObjectLocalException, sub_type=None)), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=checkTransaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=remove, postfix_operators=[], prefix_operators=[], qualifier=profileEntity, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=invalidateObject, postfix_operators=[], prefix_operators=[], qualifier=profileObject, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getTransactionManager, postfix_operators=[], prefix_operators=[], qualifier=sleeContainer, selectors=[MethodInvocation(arguments=[], member=setRollbackOnly, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e1, selectors=[], type_arguments=None), MemberReference(member=e1, 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=SLEEException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e1, types=['SystemException']))], finally_block=None, label=None, resources=None), Statement(label=None), ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), 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=TransactionRolledbackLocalException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['RuntimeException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[remove] operator[SEP] operator[SEP] Keyword[throws] identifier[TransactionRequiredLocalException] , identifier[TransactionRolledbackLocalException] , identifier[SLEEException] { 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[+] identifier[getProfileName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[getProfileTableName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[sleeContainer] operator[SEP] identifier[getTransactionManager] operator[SEP] operator[SEP] operator[SEP] identifier[mandateTransaction] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[ProfileEntity] identifier[profileEntity] operator[=] identifier[profileObject] operator[SEP] identifier[getProfileEntity] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[profileEntity] operator[!=] Other[null] operator[SEP] { identifier[checkTransaction] operator[SEP] operator[SEP] operator[SEP] identifier[profileEntity] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[getProfileTable] operator[SEP] operator[SEP] operator[SEP] identifier[find] operator[SEP] identifier[getProfileName] operator[SEP] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NoSuchObjectLocalException] operator[SEP] literal[String] operator[+] identifier[getProfileName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[getProfileTableName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[RuntimeException] identifier[e] operator[SEP] { Keyword[try] { identifier[profileObject] operator[SEP] identifier[invalidateObject] operator[SEP] operator[SEP] operator[SEP] identifier[sleeContainer] operator[SEP] identifier[getTransactionManager] operator[SEP] operator[SEP] operator[SEP] identifier[setRollbackOnly] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SystemException] identifier[e1] operator[SEP] { Keyword[throw] Keyword[new] identifier[SLEEException] operator[SEP] identifier[e1] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e1] operator[SEP] operator[SEP] } operator[SEP] Keyword[throw] Keyword[new] identifier[TransactionRolledbackLocalException] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public void refresh(String vaultName, String resourceGroupName, String fabricName, String filter) { refreshWithServiceResponseAsync(vaultName, resourceGroupName, fabricName, filter).toBlocking().single().body(); }
class class_name[name] begin[{] method[refresh, return_type[void], modifier[public], parameter[vaultName, resourceGroupName, fabricName, filter]] begin[{] call[.refreshWithServiceResponseAsync, parameter[member[.vaultName], member[.resourceGroupName], member[.fabricName], member[.filter]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[refresh] operator[SEP] identifier[String] identifier[vaultName] , identifier[String] identifier[resourceGroupName] , identifier[String] identifier[fabricName] , identifier[String] identifier[filter] operator[SEP] { identifier[refreshWithServiceResponseAsync] operator[SEP] identifier[vaultName] , identifier[resourceGroupName] , identifier[fabricName] , identifier[filter] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[single] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] }
public void flush() throws IOException { try { flushIfPossible(true); checkState(pendingRequests.isEmpty(), "pendingRequests should be empty after flush"); checkState(responseFutures.isEmpty(), "responseFutures should be empty after flush"); } finally { requestsExecutor.shutdown(); try { if (!requestsExecutor.awaitTermination(1, TimeUnit.SECONDS)) { logger.atWarning().log("Forcibly shutting down batch helper thread pool."); requestsExecutor.shutdownNow(); } } catch (InterruptedException e) { logger.atFine().withCause(e).log( "Failed to await termination: forcibly shutting down batch helper thread pool."); requestsExecutor.shutdownNow(); } } }
class class_name[name] begin[{] method[flush, return_type[void], modifier[public], parameter[]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=flushIfPossible, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=pendingRequests, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="pendingRequests should be empty after flush")], member=checkState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=responseFutures, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="responseFutures should be empty after flush")], member=checkState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=shutdown, postfix_operators=[], prefix_operators=[], qualifier=requestsExecutor, selectors=[], type_arguments=None), label=None), TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), MemberReference(member=SECONDS, postfix_operators=[], prefix_operators=[], qualifier=TimeUnit, selectors=[])], member=awaitTermination, postfix_operators=[], prefix_operators=['!'], qualifier=requestsExecutor, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=atWarning, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Forcibly shutting down batch helper thread pool.")], member=log, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=shutdownNow, postfix_operators=[], prefix_operators=[], qualifier=requestsExecutor, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=atFine, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withCause, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to await termination: forcibly shutting down batch helper thread pool.")], member=log, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=shutdownNow, postfix_operators=[], prefix_operators=[], qualifier=requestsExecutor, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InterruptedException']))], finally_block=None, label=None, resources=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[flush] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[try] { identifier[flushIfPossible] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[checkState] operator[SEP] identifier[pendingRequests] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[checkState] operator[SEP] identifier[responseFutures] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] } Keyword[finally] { identifier[requestsExecutor] operator[SEP] identifier[shutdown] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] operator[!] identifier[requestsExecutor] operator[SEP] identifier[awaitTermination] operator[SEP] Other[1] , identifier[TimeUnit] operator[SEP] identifier[SECONDS] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[atWarning] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[requestsExecutor] operator[SEP] identifier[shutdownNow] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[InterruptedException] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[atFine] operator[SEP] operator[SEP] operator[SEP] identifier[withCause] operator[SEP] identifier[e] operator[SEP] operator[SEP] identifier[log] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[requestsExecutor] operator[SEP] identifier[shutdownNow] operator[SEP] operator[SEP] operator[SEP] } } }
public static float noise(float x, float y, float z, float w) { float n0, n1, n2, n3, n4; // Noise contributions from the five corners // Skew the (x,y,z,w) space to determine which cell of 24 simplices we're in float s = (x + y + z + w) * F4; // Factor for 4D skewing int i = fastfloor(x + s); int j = fastfloor(y + s); int k = fastfloor(z + s); int l = fastfloor(w + s); float t = (i + j + k + l) * G4; // Factor for 4D unskewing float X0 = i - t; // Unskew the cell origin back to (x,y,z,w) space float Y0 = j - t; float Z0 = k - t; float W0 = l - t; float x0 = x - X0; // The x,y,z,w distances from the cell origin float y0 = y - Y0; float z0 = z - Z0; float w0 = w - W0; // For the 4D case, the simplex is a 4D shape I won't even try to describe. // To find out which of the 24 possible simplices we're in, we need to // determine the magnitude ordering of x0, y0, z0 and w0. // Six pair-wise comparisons are performed between each possible pair // of the four coordinates, and the results are used to rank the numbers. int rankx = 0; int ranky = 0; int rankz = 0; int rankw = 0; if (x0 > y0) rankx++; else ranky++; if (x0 > z0) rankx++; else rankz++; if (x0 > w0) rankx++; else rankw++; if (y0 > z0) ranky++; else rankz++; if (y0 > w0) ranky++; else rankw++; if (z0 > w0) rankz++; else rankw++; int i1, j1, k1, l1; // The integer offsets for the second simplex corner int i2, j2, k2, l2; // The integer offsets for the third simplex corner int i3, j3, k3, l3; // The integer offsets for the fourth simplex corner // simplex[c] is a 4-vector with the numbers 0, 1, 2 and 3 in some order. // Many values of c will never occur, since e.g. x>y>z>w makes x<z, y<w and x<w // impossible. Only the 24 indices which have non-zero entries make any sense. // We use a thresholding to set the coordinates in turn from the largest magnitude. // Rank 3 denotes the largest coordinate. i1 = rankx >= 3 ? 1 : 0; j1 = ranky >= 3 ? 1 : 0; k1 = rankz >= 3 ? 1 : 0; l1 = rankw >= 3 ? 1 : 0; // Rank 2 denotes the second largest coordinate. i2 = rankx >= 2 ? 1 : 0; j2 = ranky >= 2 ? 1 : 0; k2 = rankz >= 2 ? 1 : 0; l2 = rankw >= 2 ? 1 : 0; // Rank 1 denotes the second smallest coordinate. i3 = rankx >= 1 ? 1 : 0; j3 = ranky >= 1 ? 1 : 0; k3 = rankz >= 1 ? 1 : 0; l3 = rankw >= 1 ? 1 : 0; // The fifth corner has all coordinate offsets = 1, so no need to compute that. float x1 = x0 - i1 + G4; // Offsets for second corner in (x,y,z,w) coords float y1 = y0 - j1 + G4; float z1 = z0 - k1 + G4; float w1 = w0 - l1 + G4; float x2 = x0 - i2 + 2.0f * G4; // Offsets for third corner in (x,y,z,w) coords float y2 = y0 - j2 + 2.0f * G4; float z2 = z0 - k2 + 2.0f * G4; float w2 = w0 - l2 + 2.0f * G4; float x3 = x0 - i3 + 3.0f * G4; // Offsets for fourth corner in (x,y,z,w) coords float y3 = y0 - j3 + 3.0f * G4; float z3 = z0 - k3 + 3.0f * G4; float w3 = w0 - l3 + 3.0f * G4; float x4 = x0 - 1.0f + 4.0f * G4; // Offsets for last corner in (x,y,z,w) coords float y4 = y0 - 1.0f + 4.0f * G4; float z4 = z0 - 1.0f + 4.0f * G4; float w4 = w0 - 1.0f + 4.0f * G4; // Work out the hashed gradient indices of the five simplex corners int ii = i & 255; int jj = j & 255; int kk = k & 255; int ll = l & 255; int gi0 = (perm[ii + perm[jj + perm[kk + perm[ll]&0xFF]&0xFF]&0xFF]&0xFF) % 32; int gi1 = (perm[ii + i1 + perm[jj + j1 + perm[kk + k1 + perm[ll + l1]&0xFF]&0xFF]&0xFF]&0xFF) % 32; int gi2 = (perm[ii + i2 + perm[jj + j2 + perm[kk + k2 + perm[ll + l2]&0xFF]&0xFF]&0xFF]&0xFF) % 32; int gi3 = (perm[ii + i3 + perm[jj + j3 + perm[kk + k3 + perm[ll + l3]&0xFF]&0xFF]&0xFF]&0xFF) % 32; int gi4 = (perm[ii + 1 + perm[jj + 1 + perm[kk + 1 + perm[ll + 1]&0xFF]&0xFF]&0xFF]&0xFF) % 32; // Calculate the contribution from the five corners float t0 = 0.6f - x0 * x0 - y0 * y0 - z0 * z0 - w0 * w0; if (t0 < 0.0f) n0 = 0.0f; else { t0 *= t0; n0 = t0 * t0 * dot(grad4[gi0], x0, y0, z0, w0); } float t1 = 0.6f - x1 * x1 - y1 * y1 - z1 * z1 - w1 * w1; if (t1 < 0.0f) n1 = 0.0f; else { t1 *= t1; n1 = t1 * t1 * dot(grad4[gi1], x1, y1, z1, w1); } float t2 = 0.6f - x2 * x2 - y2 * y2 - z2 * z2 - w2 * w2; if (t2 < 0.0f) n2 = 0.0f; else { t2 *= t2; n2 = t2 * t2 * dot(grad4[gi2], x2, y2, z2, w2); } float t3 = 0.6f - x3 * x3 - y3 * y3 - z3 * z3 - w3 * w3; if (t3 < 0.0f) n3 = 0.0f; else { t3 *= t3; n3 = t3 * t3 * dot(grad4[gi3], x3, y3, z3, w3); } float t4 = 0.6f - x4 * x4 - y4 * y4 - z4 * z4 - w4 * w4; if (t4 < 0.0f) n4 = 0.0f; else { t4 *= t4; n4 = t4 * t4 * dot(grad4[gi4], x4, y4, z4, w4); } // Sum up and scale the result to cover the range [-1,1] return 27.0f * (n0 + n1 + n2 + n3 + n4); }
class class_name[name] begin[{] method[noise, return_type[type[float]], modifier[public static], parameter[x, y, z, w]] begin[{] local_variable[type[float], n0] local_variable[type[float], s] local_variable[type[int], i] local_variable[type[int], j] local_variable[type[int], k] local_variable[type[int], l] local_variable[type[float], t] local_variable[type[float], X0] local_variable[type[float], Y0] local_variable[type[float], Z0] local_variable[type[float], W0] local_variable[type[float], x0] local_variable[type[float], y0] local_variable[type[float], z0] local_variable[type[float], w0] local_variable[type[int], rankx] local_variable[type[int], ranky] local_variable[type[int], rankz] local_variable[type[int], rankw] if[binary_operation[member[.x0], >, member[.y0]]] begin[{] member[.rankx] else begin[{] member[.ranky] end[}] if[binary_operation[member[.x0], >, member[.z0]]] begin[{] member[.rankx] else begin[{] member[.rankz] end[}] if[binary_operation[member[.x0], >, member[.w0]]] begin[{] member[.rankx] else begin[{] member[.rankw] end[}] if[binary_operation[member[.y0], >, member[.z0]]] begin[{] member[.ranky] else begin[{] member[.rankz] end[}] if[binary_operation[member[.y0], >, member[.w0]]] begin[{] member[.ranky] else begin[{] member[.rankw] end[}] if[binary_operation[member[.z0], >, member[.w0]]] begin[{] member[.rankz] else begin[{] member[.rankw] end[}] local_variable[type[int], i1] local_variable[type[int], i2] local_variable[type[int], i3] assign[member[.i1], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=rankx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), 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))] assign[member[.j1], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=ranky, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), 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))] assign[member[.k1], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=rankz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), 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))] assign[member[.l1], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=rankw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), 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))] assign[member[.i2], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=rankx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), 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))] assign[member[.j2], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=ranky, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), 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))] assign[member[.k2], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=rankz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), 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))] assign[member[.l2], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=rankw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), 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))] assign[member[.i3], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=rankx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), 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))] assign[member[.j3], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=ranky, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), 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))] assign[member[.k3], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=rankz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), 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))] assign[member[.l3], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=rankw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), 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))] local_variable[type[float], x1] local_variable[type[float], y1] local_variable[type[float], z1] local_variable[type[float], w1] local_variable[type[float], x2] local_variable[type[float], y2] local_variable[type[float], z2] local_variable[type[float], w2] local_variable[type[float], x3] local_variable[type[float], y3] local_variable[type[float], z3] local_variable[type[float], w3] local_variable[type[float], x4] local_variable[type[float], y4] local_variable[type[float], z4] local_variable[type[float], w4] local_variable[type[int], ii] local_variable[type[int], jj] local_variable[type[int], kk] local_variable[type[int], ll] local_variable[type[int], gi0] local_variable[type[int], gi1] local_variable[type[int], gi2] local_variable[type[int], gi3] local_variable[type[int], gi4] local_variable[type[float], t0] if[binary_operation[member[.t0], <, literal[0.0f]]] begin[{] assign[member[.n0], literal[0.0f]] else begin[{] assign[member[.t0], member[.t0]] assign[member[.n0], binary_operation[binary_operation[member[.t0], *, member[.t0]], *, call[.dot, parameter[member[.grad4], member[.x0], member[.y0], member[.z0], member[.w0]]]]] end[}] local_variable[type[float], t1] if[binary_operation[member[.t1], <, literal[0.0f]]] begin[{] assign[member[.n1], literal[0.0f]] else begin[{] assign[member[.t1], member[.t1]] assign[member[.n1], binary_operation[binary_operation[member[.t1], *, member[.t1]], *, call[.dot, parameter[member[.grad4], member[.x1], member[.y1], member[.z1], member[.w1]]]]] end[}] local_variable[type[float], t2] if[binary_operation[member[.t2], <, literal[0.0f]]] begin[{] assign[member[.n2], literal[0.0f]] else begin[{] assign[member[.t2], member[.t2]] assign[member[.n2], binary_operation[binary_operation[member[.t2], *, member[.t2]], *, call[.dot, parameter[member[.grad4], member[.x2], member[.y2], member[.z2], member[.w2]]]]] end[}] local_variable[type[float], t3] if[binary_operation[member[.t3], <, literal[0.0f]]] begin[{] assign[member[.n3], literal[0.0f]] else begin[{] assign[member[.t3], member[.t3]] assign[member[.n3], binary_operation[binary_operation[member[.t3], *, member[.t3]], *, call[.dot, parameter[member[.grad4], member[.x3], member[.y3], member[.z3], member[.w3]]]]] end[}] local_variable[type[float], t4] if[binary_operation[member[.t4], <, literal[0.0f]]] begin[{] assign[member[.n4], literal[0.0f]] else begin[{] assign[member[.t4], member[.t4]] assign[member[.n4], binary_operation[binary_operation[member[.t4], *, member[.t4]], *, call[.dot, parameter[member[.grad4], member[.x4], member[.y4], member[.z4], member[.w4]]]]] end[}] return[binary_operation[literal[27.0f], *, binary_operation[binary_operation[binary_operation[binary_operation[member[.n0], +, member[.n1]], +, member[.n2]], +, member[.n3]], +, member[.n4]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[float] identifier[noise] operator[SEP] Keyword[float] identifier[x] , Keyword[float] identifier[y] , Keyword[float] identifier[z] , Keyword[float] identifier[w] operator[SEP] { Keyword[float] identifier[n0] , identifier[n1] , identifier[n2] , identifier[n3] , identifier[n4] operator[SEP] Keyword[float] identifier[s] operator[=] operator[SEP] identifier[x] operator[+] identifier[y] operator[+] identifier[z] operator[+] identifier[w] operator[SEP] operator[*] identifier[F4] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[fastfloor] operator[SEP] identifier[x] operator[+] identifier[s] operator[SEP] operator[SEP] Keyword[int] identifier[j] operator[=] identifier[fastfloor] operator[SEP] identifier[y] operator[+] identifier[s] operator[SEP] operator[SEP] Keyword[int] identifier[k] operator[=] identifier[fastfloor] operator[SEP] identifier[z] operator[+] identifier[s] operator[SEP] operator[SEP] Keyword[int] identifier[l] operator[=] identifier[fastfloor] operator[SEP] identifier[w] operator[+] identifier[s] operator[SEP] operator[SEP] Keyword[float] identifier[t] operator[=] operator[SEP] identifier[i] operator[+] identifier[j] operator[+] identifier[k] operator[+] identifier[l] operator[SEP] operator[*] identifier[G4] operator[SEP] Keyword[float] identifier[X0] operator[=] identifier[i] operator[-] identifier[t] operator[SEP] Keyword[float] identifier[Y0] operator[=] identifier[j] operator[-] identifier[t] operator[SEP] Keyword[float] identifier[Z0] operator[=] identifier[k] operator[-] identifier[t] operator[SEP] Keyword[float] identifier[W0] operator[=] identifier[l] operator[-] identifier[t] operator[SEP] Keyword[float] identifier[x0] operator[=] identifier[x] operator[-] identifier[X0] operator[SEP] Keyword[float] identifier[y0] operator[=] identifier[y] operator[-] identifier[Y0] operator[SEP] Keyword[float] identifier[z0] operator[=] identifier[z] operator[-] identifier[Z0] operator[SEP] Keyword[float] identifier[w0] operator[=] identifier[w] operator[-] identifier[W0] operator[SEP] Keyword[int] identifier[rankx] operator[=] Other[0] operator[SEP] Keyword[int] identifier[ranky] operator[=] Other[0] operator[SEP] Keyword[int] identifier[rankz] operator[=] Other[0] operator[SEP] Keyword[int] identifier[rankw] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[x0] operator[>] identifier[y0] operator[SEP] identifier[rankx] operator[++] operator[SEP] Keyword[else] identifier[ranky] operator[++] operator[SEP] Keyword[if] operator[SEP] identifier[x0] operator[>] identifier[z0] operator[SEP] identifier[rankx] operator[++] operator[SEP] Keyword[else] identifier[rankz] operator[++] operator[SEP] Keyword[if] operator[SEP] identifier[x0] operator[>] identifier[w0] operator[SEP] identifier[rankx] operator[++] operator[SEP] Keyword[else] identifier[rankw] operator[++] operator[SEP] Keyword[if] operator[SEP] identifier[y0] operator[>] identifier[z0] operator[SEP] identifier[ranky] operator[++] operator[SEP] Keyword[else] identifier[rankz] operator[++] operator[SEP] Keyword[if] operator[SEP] identifier[y0] operator[>] identifier[w0] operator[SEP] identifier[ranky] operator[++] operator[SEP] Keyword[else] identifier[rankw] operator[++] operator[SEP] Keyword[if] operator[SEP] identifier[z0] operator[>] identifier[w0] operator[SEP] identifier[rankz] operator[++] operator[SEP] Keyword[else] identifier[rankw] operator[++] operator[SEP] Keyword[int] identifier[i1] , identifier[j1] , identifier[k1] , identifier[l1] operator[SEP] Keyword[int] identifier[i2] , identifier[j2] , identifier[k2] , identifier[l2] operator[SEP] Keyword[int] identifier[i3] , identifier[j3] , identifier[k3] , identifier[l3] operator[SEP] identifier[i1] operator[=] identifier[rankx] operator[>=] Other[3] operator[?] Other[1] operator[:] Other[0] operator[SEP] identifier[j1] operator[=] identifier[ranky] operator[>=] Other[3] operator[?] Other[1] operator[:] Other[0] operator[SEP] identifier[k1] operator[=] identifier[rankz] operator[>=] Other[3] operator[?] Other[1] operator[:] Other[0] operator[SEP] identifier[l1] operator[=] identifier[rankw] operator[>=] Other[3] operator[?] Other[1] operator[:] Other[0] operator[SEP] identifier[i2] operator[=] identifier[rankx] operator[>=] Other[2] operator[?] Other[1] operator[:] Other[0] operator[SEP] identifier[j2] operator[=] identifier[ranky] operator[>=] Other[2] operator[?] Other[1] operator[:] Other[0] operator[SEP] identifier[k2] operator[=] identifier[rankz] operator[>=] Other[2] operator[?] Other[1] operator[:] Other[0] operator[SEP] identifier[l2] operator[=] identifier[rankw] operator[>=] Other[2] operator[?] Other[1] operator[:] Other[0] operator[SEP] identifier[i3] operator[=] identifier[rankx] operator[>=] Other[1] operator[?] Other[1] operator[:] Other[0] operator[SEP] identifier[j3] operator[=] identifier[ranky] operator[>=] Other[1] operator[?] Other[1] operator[:] Other[0] operator[SEP] identifier[k3] operator[=] identifier[rankz] operator[>=] Other[1] operator[?] Other[1] operator[:] Other[0] operator[SEP] identifier[l3] operator[=] identifier[rankw] operator[>=] Other[1] operator[?] Other[1] operator[:] Other[0] operator[SEP] Keyword[float] identifier[x1] operator[=] identifier[x0] operator[-] identifier[i1] operator[+] identifier[G4] operator[SEP] Keyword[float] identifier[y1] operator[=] identifier[y0] operator[-] identifier[j1] operator[+] identifier[G4] operator[SEP] Keyword[float] identifier[z1] operator[=] identifier[z0] operator[-] identifier[k1] operator[+] identifier[G4] operator[SEP] Keyword[float] identifier[w1] operator[=] identifier[w0] operator[-] identifier[l1] operator[+] identifier[G4] operator[SEP] Keyword[float] identifier[x2] operator[=] identifier[x0] operator[-] identifier[i2] operator[+] literal[Float] operator[*] identifier[G4] operator[SEP] Keyword[float] identifier[y2] operator[=] identifier[y0] operator[-] identifier[j2] operator[+] literal[Float] operator[*] identifier[G4] operator[SEP] Keyword[float] identifier[z2] operator[=] identifier[z0] operator[-] identifier[k2] operator[+] literal[Float] operator[*] identifier[G4] operator[SEP] Keyword[float] identifier[w2] operator[=] identifier[w0] operator[-] identifier[l2] operator[+] literal[Float] operator[*] identifier[G4] operator[SEP] Keyword[float] identifier[x3] operator[=] identifier[x0] operator[-] identifier[i3] operator[+] literal[Float] operator[*] identifier[G4] operator[SEP] Keyword[float] identifier[y3] operator[=] identifier[y0] operator[-] identifier[j3] operator[+] literal[Float] operator[*] identifier[G4] operator[SEP] Keyword[float] identifier[z3] operator[=] identifier[z0] operator[-] identifier[k3] operator[+] literal[Float] operator[*] identifier[G4] operator[SEP] Keyword[float] identifier[w3] operator[=] identifier[w0] operator[-] identifier[l3] operator[+] literal[Float] operator[*] identifier[G4] operator[SEP] Keyword[float] identifier[x4] operator[=] identifier[x0] operator[-] literal[Float] operator[+] literal[Float] operator[*] identifier[G4] operator[SEP] Keyword[float] identifier[y4] operator[=] identifier[y0] operator[-] literal[Float] operator[+] literal[Float] operator[*] identifier[G4] operator[SEP] Keyword[float] identifier[z4] operator[=] identifier[z0] operator[-] literal[Float] operator[+] literal[Float] operator[*] identifier[G4] operator[SEP] Keyword[float] identifier[w4] operator[=] identifier[w0] operator[-] literal[Float] operator[+] literal[Float] operator[*] identifier[G4] operator[SEP] Keyword[int] identifier[ii] operator[=] identifier[i] operator[&] Other[255] operator[SEP] Keyword[int] identifier[jj] operator[=] identifier[j] operator[&] Other[255] operator[SEP] Keyword[int] identifier[kk] operator[=] identifier[k] operator[&] Other[255] operator[SEP] Keyword[int] identifier[ll] operator[=] identifier[l] operator[&] Other[255] operator[SEP] Keyword[int] identifier[gi0] operator[=] operator[SEP] identifier[perm] operator[SEP] identifier[ii] operator[+] identifier[perm] operator[SEP] identifier[jj] operator[+] identifier[perm] operator[SEP] identifier[kk] operator[+] identifier[perm] operator[SEP] identifier[ll] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[%] Other[32] operator[SEP] Keyword[int] identifier[gi1] operator[=] operator[SEP] identifier[perm] operator[SEP] identifier[ii] operator[+] identifier[i1] operator[+] identifier[perm] operator[SEP] identifier[jj] operator[+] identifier[j1] operator[+] identifier[perm] operator[SEP] identifier[kk] operator[+] identifier[k1] operator[+] identifier[perm] operator[SEP] identifier[ll] operator[+] identifier[l1] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[%] Other[32] operator[SEP] Keyword[int] identifier[gi2] operator[=] operator[SEP] identifier[perm] operator[SEP] identifier[ii] operator[+] identifier[i2] operator[+] identifier[perm] operator[SEP] identifier[jj] operator[+] identifier[j2] operator[+] identifier[perm] operator[SEP] identifier[kk] operator[+] identifier[k2] operator[+] identifier[perm] operator[SEP] identifier[ll] operator[+] identifier[l2] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[%] Other[32] operator[SEP] Keyword[int] identifier[gi3] operator[=] operator[SEP] identifier[perm] operator[SEP] identifier[ii] operator[+] identifier[i3] operator[+] identifier[perm] operator[SEP] identifier[jj] operator[+] identifier[j3] operator[+] identifier[perm] operator[SEP] identifier[kk] operator[+] identifier[k3] operator[+] identifier[perm] operator[SEP] identifier[ll] operator[+] identifier[l3] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[%] Other[32] operator[SEP] Keyword[int] identifier[gi4] operator[=] operator[SEP] identifier[perm] operator[SEP] identifier[ii] operator[+] Other[1] operator[+] identifier[perm] operator[SEP] identifier[jj] operator[+] Other[1] operator[+] identifier[perm] operator[SEP] identifier[kk] operator[+] Other[1] operator[+] identifier[perm] operator[SEP] identifier[ll] operator[+] Other[1] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[%] Other[32] operator[SEP] Keyword[float] identifier[t0] operator[=] literal[Float] operator[-] identifier[x0] operator[*] identifier[x0] operator[-] identifier[y0] operator[*] identifier[y0] operator[-] identifier[z0] operator[*] identifier[z0] operator[-] identifier[w0] operator[*] identifier[w0] operator[SEP] Keyword[if] operator[SEP] identifier[t0] operator[<] literal[Float] operator[SEP] identifier[n0] operator[=] literal[Float] operator[SEP] Keyword[else] { identifier[t0] operator[*=] identifier[t0] operator[SEP] identifier[n0] operator[=] identifier[t0] operator[*] identifier[t0] operator[*] identifier[dot] operator[SEP] identifier[grad4] operator[SEP] identifier[gi0] operator[SEP] , identifier[x0] , identifier[y0] , identifier[z0] , identifier[w0] operator[SEP] operator[SEP] } Keyword[float] identifier[t1] operator[=] literal[Float] operator[-] identifier[x1] operator[*] identifier[x1] operator[-] identifier[y1] operator[*] identifier[y1] operator[-] identifier[z1] operator[*] identifier[z1] operator[-] identifier[w1] operator[*] identifier[w1] operator[SEP] Keyword[if] operator[SEP] identifier[t1] operator[<] literal[Float] operator[SEP] identifier[n1] operator[=] literal[Float] operator[SEP] Keyword[else] { identifier[t1] operator[*=] identifier[t1] operator[SEP] identifier[n1] operator[=] identifier[t1] operator[*] identifier[t1] operator[*] identifier[dot] operator[SEP] identifier[grad4] operator[SEP] identifier[gi1] operator[SEP] , identifier[x1] , identifier[y1] , identifier[z1] , identifier[w1] operator[SEP] operator[SEP] } Keyword[float] identifier[t2] operator[=] literal[Float] operator[-] identifier[x2] operator[*] identifier[x2] operator[-] identifier[y2] operator[*] identifier[y2] operator[-] identifier[z2] operator[*] identifier[z2] operator[-] identifier[w2] operator[*] identifier[w2] operator[SEP] Keyword[if] operator[SEP] identifier[t2] operator[<] literal[Float] operator[SEP] identifier[n2] operator[=] literal[Float] operator[SEP] Keyword[else] { identifier[t2] operator[*=] identifier[t2] operator[SEP] identifier[n2] operator[=] identifier[t2] operator[*] identifier[t2] operator[*] identifier[dot] operator[SEP] identifier[grad4] operator[SEP] identifier[gi2] operator[SEP] , identifier[x2] , identifier[y2] , identifier[z2] , identifier[w2] operator[SEP] operator[SEP] } Keyword[float] identifier[t3] operator[=] literal[Float] operator[-] identifier[x3] operator[*] identifier[x3] operator[-] identifier[y3] operator[*] identifier[y3] operator[-] identifier[z3] operator[*] identifier[z3] operator[-] identifier[w3] operator[*] identifier[w3] operator[SEP] Keyword[if] operator[SEP] identifier[t3] operator[<] literal[Float] operator[SEP] identifier[n3] operator[=] literal[Float] operator[SEP] Keyword[else] { identifier[t3] operator[*=] identifier[t3] operator[SEP] identifier[n3] operator[=] identifier[t3] operator[*] identifier[t3] operator[*] identifier[dot] operator[SEP] identifier[grad4] operator[SEP] identifier[gi3] operator[SEP] , identifier[x3] , identifier[y3] , identifier[z3] , identifier[w3] operator[SEP] operator[SEP] } Keyword[float] identifier[t4] operator[=] literal[Float] operator[-] identifier[x4] operator[*] identifier[x4] operator[-] identifier[y4] operator[*] identifier[y4] operator[-] identifier[z4] operator[*] identifier[z4] operator[-] identifier[w4] operator[*] identifier[w4] operator[SEP] Keyword[if] operator[SEP] identifier[t4] operator[<] literal[Float] operator[SEP] identifier[n4] operator[=] literal[Float] operator[SEP] Keyword[else] { identifier[t4] operator[*=] identifier[t4] operator[SEP] identifier[n4] operator[=] identifier[t4] operator[*] identifier[t4] operator[*] identifier[dot] operator[SEP] identifier[grad4] operator[SEP] identifier[gi4] operator[SEP] , identifier[x4] , identifier[y4] , identifier[z4] , identifier[w4] operator[SEP] operator[SEP] } Keyword[return] literal[Float] operator[*] operator[SEP] identifier[n0] operator[+] identifier[n1] operator[+] identifier[n2] operator[+] identifier[n3] operator[+] identifier[n4] operator[SEP] operator[SEP] }
public void setAuditSourceId(String sourceId, String enterpriseSiteId) { setAuditSourceId(sourceId, enterpriseSiteId, (RFC3881AuditSourceTypes[])null); }
class class_name[name] begin[{] method[setAuditSourceId, return_type[void], modifier[public], parameter[sourceId, enterpriseSiteId]] begin[{] call[.setAuditSourceId, parameter[member[.sourceId], member[.enterpriseSiteId], Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), type=ReferenceType(arguments=None, dimensions=[None], name=RFC3881AuditSourceTypes, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setAuditSourceId] operator[SEP] identifier[String] identifier[sourceId] , identifier[String] identifier[enterpriseSiteId] operator[SEP] { identifier[setAuditSourceId] operator[SEP] identifier[sourceId] , identifier[enterpriseSiteId] , operator[SEP] identifier[RFC3881AuditSourceTypes] operator[SEP] operator[SEP] operator[SEP] Other[null] operator[SEP] operator[SEP] }
public com.google.protobuf.ByteString getFilenameBytes() { java.lang.Object ref = filename_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); filename_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } }
class class_name[name] begin[{] method[getFilenameBytes, return_type[type[com]], modifier[public], parameter[]] begin[{] local_variable[type[java], ref] if[binary_operation[member[.ref], instanceof, type[java]]] begin[{] local_variable[type[com], b] assign[member[.filename_], member[.b]] return[member[.b]] else begin[{] return[Cast(expression=MemberReference(member=ref, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=google, sub_type=ReferenceType(arguments=None, dimensions=None, name=protobuf, sub_type=ReferenceType(arguments=None, dimensions=None, name=ByteString, sub_type=None)))))] end[}] end[}] END[}]
Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[ByteString] identifier[getFilenameBytes] operator[SEP] operator[SEP] { identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[Object] identifier[ref] operator[=] identifier[filename_] operator[SEP] Keyword[if] operator[SEP] identifier[ref] Keyword[instanceof] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] operator[SEP] { identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[ByteString] identifier[b] operator[=] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[ByteString] operator[SEP] identifier[copyFromUtf8] operator[SEP] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] operator[SEP] identifier[ref] operator[SEP] operator[SEP] identifier[filename_] operator[=] identifier[b] operator[SEP] Keyword[return] identifier[b] operator[SEP] } Keyword[else] { Keyword[return] operator[SEP] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[ByteString] operator[SEP] identifier[ref] operator[SEP] } }
public void setModelMatrix(float[] mat) { if (mat.length != 16) { throw new IllegalArgumentException("Size not equal to 16."); } getTransform().setModelMatrix(mat); if (mTransformCache.setModelMatrix(mat)) { onTransformChanged(); } }
class class_name[name] begin[{] method[setModelMatrix, return_type[void], modifier[public], parameter[mat]] begin[{] if[binary_operation[member[mat.length], !=, literal[16]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Size not equal to 16.")], 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[.getTransform, parameter[]] if[call[mTransformCache.setModelMatrix, parameter[member[.mat]]]] begin[{] call[.onTransformChanged, parameter[]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setModelMatrix] operator[SEP] Keyword[float] operator[SEP] operator[SEP] identifier[mat] operator[SEP] { Keyword[if] operator[SEP] identifier[mat] operator[SEP] identifier[length] operator[!=] Other[16] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[getTransform] operator[SEP] operator[SEP] operator[SEP] identifier[setModelMatrix] operator[SEP] identifier[mat] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mTransformCache] operator[SEP] identifier[setModelMatrix] operator[SEP] identifier[mat] operator[SEP] operator[SEP] { identifier[onTransformChanged] operator[SEP] operator[SEP] operator[SEP] } }
public void trace(String msg) { logIfEnabled(Level.TRACE, null, msg, UNKNOWN_ARG, UNKNOWN_ARG, UNKNOWN_ARG, null); }
class class_name[name] begin[{] method[trace, return_type[void], modifier[public], parameter[msg]] begin[{] call[.logIfEnabled, parameter[member[Level.TRACE], literal[null], member[.msg], member[.UNKNOWN_ARG], member[.UNKNOWN_ARG], member[.UNKNOWN_ARG], literal[null]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[trace] operator[SEP] identifier[String] identifier[msg] operator[SEP] { identifier[logIfEnabled] operator[SEP] identifier[Level] operator[SEP] identifier[TRACE] , Other[null] , identifier[msg] , identifier[UNKNOWN_ARG] , identifier[UNKNOWN_ARG] , identifier[UNKNOWN_ARG] , Other[null] operator[SEP] operator[SEP] }
public void marshall(DescribePendingMaintenanceActionsRequest describePendingMaintenanceActionsRequest, ProtocolMarshaller protocolMarshaller) { if (describePendingMaintenanceActionsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(describePendingMaintenanceActionsRequest.getReplicationInstanceArn(), REPLICATIONINSTANCEARN_BINDING); protocolMarshaller.marshall(describePendingMaintenanceActionsRequest.getFilters(), FILTERS_BINDING); protocolMarshaller.marshall(describePendingMaintenanceActionsRequest.getMarker(), MARKER_BINDING); protocolMarshaller.marshall(describePendingMaintenanceActionsRequest.getMaxRecords(), MAXRECORDS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[describePendingMaintenanceActionsRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.describePendingMaintenanceActionsRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getReplicationInstanceArn, postfix_operators=[], prefix_operators=[], qualifier=describePendingMaintenanceActionsRequest, selectors=[], type_arguments=None), MemberReference(member=REPLICATIONINSTANCEARN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getFilters, postfix_operators=[], prefix_operators=[], qualifier=describePendingMaintenanceActionsRequest, selectors=[], type_arguments=None), MemberReference(member=FILTERS_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMarker, postfix_operators=[], prefix_operators=[], qualifier=describePendingMaintenanceActionsRequest, selectors=[], type_arguments=None), MemberReference(member=MARKER_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMaxRecords, postfix_operators=[], prefix_operators=[], qualifier=describePendingMaintenanceActionsRequest, selectors=[], type_arguments=None), MemberReference(member=MAXRECORDS_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), 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=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DescribePendingMaintenanceActionsRequest] identifier[describePendingMaintenanceActionsRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[describePendingMaintenanceActionsRequest] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[describePendingMaintenanceActionsRequest] operator[SEP] identifier[getReplicationInstanceArn] operator[SEP] operator[SEP] , identifier[REPLICATIONINSTANCEARN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[describePendingMaintenanceActionsRequest] operator[SEP] identifier[getFilters] operator[SEP] operator[SEP] , identifier[FILTERS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[describePendingMaintenanceActionsRequest] operator[SEP] identifier[getMarker] operator[SEP] operator[SEP] , identifier[MARKER_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[describePendingMaintenanceActionsRequest] operator[SEP] identifier[getMaxRecords] operator[SEP] operator[SEP] , identifier[MAXRECORDS_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
@Override public void save() throws BlogClientException { try { if (getToken() == null) { final ClientAtomService clientService = ((AtomBlog) getBlog()).getService(); final ClientCollection clientCollection = collection.getClientCollection(); final ClientMediaEntry clientEntry = new ClientMediaEntry(clientService, clientCollection, getTitle(), "", getContent().getType(), getBytes()); copyToRomeEntry(clientEntry); collection.getClientCollection().addEntry(clientEntry); editURI = clientEntry.getEditURI(); } else { final ClientAtomService clientService = ((AtomBlog) getBlog()).getService(); final ClientMediaEntry clientEntry = (ClientMediaEntry) clientService.getEntry(editURI); clientEntry.update(); } } catch (final Exception e) { throw new BlogClientException("Error creating entry", e); } }
class class_name[name] begin[{] method[save, return_type[void], modifier[public], parameter[]] begin[{] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getToken, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=getBlog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=AtomBlog, sub_type=None)), name=clientService)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=ClientAtomService, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=editURI, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getEntry, postfix_operators=[], prefix_operators=[], qualifier=clientService, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=ClientMediaEntry, sub_type=None)), name=clientEntry)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=ClientMediaEntry, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=update, postfix_operators=[], prefix_operators=[], qualifier=clientEntry, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=getBlog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=AtomBlog, sub_type=None)), name=clientService)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=ClientAtomService, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getClientCollection, postfix_operators=[], prefix_operators=[], qualifier=collection, selectors=[], type_arguments=None), name=clientCollection)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=ClientCollection, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=clientService, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=clientCollection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getTitle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), MethodInvocation(arguments=[], member=getContent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getType, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MethodInvocation(arguments=[], member=getBytes, 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=ClientMediaEntry, sub_type=None)), name=clientEntry)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=ClientMediaEntry, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=clientEntry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=copyToRomeEntry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getClientCollection, postfix_operators=[], prefix_operators=[], qualifier=collection, selectors=[MethodInvocation(arguments=[MemberReference(member=clientEntry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addEntry, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=editURI, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getEditURI, postfix_operators=[], prefix_operators=[], qualifier=clientEntry, selectors=[], type_arguments=None)), label=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error creating entry"), 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=BlogClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[save] operator[SEP] operator[SEP] Keyword[throws] identifier[BlogClientException] { Keyword[try] { Keyword[if] operator[SEP] identifier[getToken] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[final] identifier[ClientAtomService] identifier[clientService] operator[=] operator[SEP] operator[SEP] identifier[AtomBlog] operator[SEP] identifier[getBlog] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getService] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[ClientCollection] identifier[clientCollection] operator[=] identifier[collection] operator[SEP] identifier[getClientCollection] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[ClientMediaEntry] identifier[clientEntry] operator[=] Keyword[new] identifier[ClientMediaEntry] operator[SEP] identifier[clientService] , identifier[clientCollection] , identifier[getTitle] operator[SEP] operator[SEP] , literal[String] , identifier[getContent] operator[SEP] operator[SEP] operator[SEP] identifier[getType] operator[SEP] operator[SEP] , identifier[getBytes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[copyToRomeEntry] operator[SEP] identifier[clientEntry] operator[SEP] operator[SEP] identifier[collection] operator[SEP] identifier[getClientCollection] operator[SEP] operator[SEP] operator[SEP] identifier[addEntry] operator[SEP] identifier[clientEntry] operator[SEP] operator[SEP] identifier[editURI] operator[=] identifier[clientEntry] operator[SEP] identifier[getEditURI] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[final] identifier[ClientAtomService] identifier[clientService] operator[=] operator[SEP] operator[SEP] identifier[AtomBlog] operator[SEP] identifier[getBlog] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getService] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[ClientMediaEntry] identifier[clientEntry] operator[=] operator[SEP] identifier[ClientMediaEntry] operator[SEP] identifier[clientService] operator[SEP] identifier[getEntry] operator[SEP] identifier[editURI] operator[SEP] operator[SEP] identifier[clientEntry] operator[SEP] identifier[update] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] Keyword[final] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[BlogClientException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } }
public java.util.List<com.google.api.Monitoring.MonitoringDestination> getProducerDestinationsList() { return producerDestinations_; }
class class_name[name] begin[{] method[getProducerDestinationsList, return_type[type[java]], modifier[public], parameter[]] begin[{] return[member[.producerDestinations_]] end[}] END[}]
Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[Monitoring] operator[SEP] identifier[MonitoringDestination] operator[>] identifier[getProducerDestinationsList] operator[SEP] operator[SEP] { Keyword[return] identifier[producerDestinations_] operator[SEP] }