code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public static <I> CompactDFA<I> minimizeDFA(DFA<?, I> dfa, Alphabet<I> alphabet) { return minimizeDFA(dfa, alphabet, PruningMode.PRUNE_AFTER); }
class class_name[name] begin[{] method[minimizeDFA, return_type[type[CompactDFA]], modifier[public static], parameter[dfa, alphabet]] begin[{] return[call[.minimizeDFA, parameter[member[.dfa], member[.alphabet], member[PruningMode.PRUNE_AFTER]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[I] operator[>] identifier[CompactDFA] operator[<] identifier[I] operator[>] identifier[minimizeDFA] operator[SEP] identifier[DFA] operator[<] operator[?] , identifier[I] operator[>] identifier[dfa] , identifier[Alphabet] operator[<] identifier[I] operator[>] identifier[alphabet] operator[SEP] { Keyword[return] identifier[minimizeDFA] operator[SEP] identifier[dfa] , identifier[alphabet] , identifier[PruningMode] operator[SEP] identifier[PRUNE_AFTER] operator[SEP] operator[SEP] }
public static ErrorMessageFactory elementsShouldBeAtMost(Object actual, int times, Matcher<?> condition) { return new ElementsShouldBeAtMost(actual, times, condition); }
class class_name[name] begin[{] method[elementsShouldBeAtMost, return_type[type[ErrorMessageFactory]], modifier[public static], parameter[actual, times, condition]] begin[{] return[ClassCreator(arguments=[MemberReference(member=actual, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=times, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=condition, 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=ElementsShouldBeAtMost, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[ErrorMessageFactory] identifier[elementsShouldBeAtMost] operator[SEP] identifier[Object] identifier[actual] , Keyword[int] identifier[times] , identifier[Matcher] operator[<] operator[?] operator[>] identifier[condition] operator[SEP] { Keyword[return] Keyword[new] identifier[ElementsShouldBeAtMost] operator[SEP] identifier[actual] , identifier[times] , identifier[condition] operator[SEP] operator[SEP] }
public void addCoords(Point3d[] iAtoms, BoundingBox icoordbounds, Point3d[] jAtoms, BoundingBox jcoordbounds) { this.iAtoms = iAtoms; this.iAtomObjects = null; if (icoordbounds!=null) { this.ibounds = icoordbounds; } else { this.ibounds = new BoundingBox(this.iAtoms); } this.jAtoms = jAtoms; this.jAtomObjects = null; if (jAtoms==iAtoms) { this.jbounds=ibounds; } else { if (jcoordbounds!=null) { this.jbounds = jcoordbounds; } else { this.jbounds = new BoundingBox(this.jAtoms); } } fillGrid(); }
class class_name[name] begin[{] method[addCoords, return_type[void], modifier[public], parameter[iAtoms, icoordbounds, jAtoms, jcoordbounds]] begin[{] assign[THIS[member[None.iAtoms]], member[.iAtoms]] assign[THIS[member[None.iAtomObjects]], literal[null]] if[binary_operation[member[.icoordbounds], !=, literal[null]]] begin[{] assign[THIS[member[None.ibounds]], member[.icoordbounds]] else begin[{] assign[THIS[member[None.ibounds]], ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=iAtoms, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BoundingBox, sub_type=None))] end[}] assign[THIS[member[None.jAtoms]], member[.jAtoms]] assign[THIS[member[None.jAtomObjects]], literal[null]] if[binary_operation[member[.jAtoms], ==, member[.iAtoms]]] begin[{] assign[THIS[member[None.jbounds]], member[.ibounds]] else begin[{] if[binary_operation[member[.jcoordbounds], !=, literal[null]]] begin[{] assign[THIS[member[None.jbounds]], member[.jcoordbounds]] else begin[{] assign[THIS[member[None.jbounds]], ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=jAtoms, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BoundingBox, sub_type=None))] end[}] end[}] call[.fillGrid, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addCoords] operator[SEP] identifier[Point3d] operator[SEP] operator[SEP] identifier[iAtoms] , identifier[BoundingBox] identifier[icoordbounds] , identifier[Point3d] operator[SEP] operator[SEP] identifier[jAtoms] , identifier[BoundingBox] identifier[jcoordbounds] operator[SEP] { Keyword[this] operator[SEP] identifier[iAtoms] operator[=] identifier[iAtoms] operator[SEP] Keyword[this] operator[SEP] identifier[iAtomObjects] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[icoordbounds] operator[!=] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[ibounds] operator[=] identifier[icoordbounds] operator[SEP] } Keyword[else] { Keyword[this] operator[SEP] identifier[ibounds] operator[=] Keyword[new] identifier[BoundingBox] operator[SEP] Keyword[this] operator[SEP] identifier[iAtoms] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[jAtoms] operator[=] identifier[jAtoms] operator[SEP] Keyword[this] operator[SEP] identifier[jAtomObjects] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[jAtoms] operator[==] identifier[iAtoms] operator[SEP] { Keyword[this] operator[SEP] identifier[jbounds] operator[=] identifier[ibounds] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[jcoordbounds] operator[!=] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[jbounds] operator[=] identifier[jcoordbounds] operator[SEP] } Keyword[else] { Keyword[this] operator[SEP] identifier[jbounds] operator[=] Keyword[new] identifier[BoundingBox] operator[SEP] Keyword[this] operator[SEP] identifier[jAtoms] operator[SEP] operator[SEP] } } identifier[fillGrid] operator[SEP] operator[SEP] operator[SEP] }
public final ContentSummary computeContentSummary() { long[] a = computeContentSummary(new long[]{0,0,0,0}); return new ContentSummary(a[0], a[1], a[2], getNsQuota(), a[3], getDsQuota()); }
class class_name[name] begin[{] method[computeContentSummary, return_type[type[ContentSummary]], modifier[final public], parameter[]] begin[{] local_variable[type[long], a] return[ClassCreator(arguments=[MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2))]), MethodInvocation(arguments=[], member=getNsQuota, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3))]), MethodInvocation(arguments=[], member=getDsQuota, 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=ContentSummary, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[final] identifier[ContentSummary] identifier[computeContentSummary] operator[SEP] operator[SEP] { Keyword[long] operator[SEP] operator[SEP] identifier[a] operator[=] identifier[computeContentSummary] operator[SEP] Keyword[new] Keyword[long] operator[SEP] operator[SEP] { Other[0] , Other[0] , Other[0] , Other[0] } operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ContentSummary] operator[SEP] identifier[a] operator[SEP] Other[0] operator[SEP] , identifier[a] operator[SEP] Other[1] operator[SEP] , identifier[a] operator[SEP] Other[2] operator[SEP] , identifier[getNsQuota] operator[SEP] operator[SEP] , identifier[a] operator[SEP] Other[3] operator[SEP] , identifier[getDsQuota] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public int printOptions(Options options) { Collection<Option> optList = options.getAllOptions(); StringBuilder sb = new StringBuilder(); int leftWidth = 0; if (!options.isEmpty()) { leftWidth = renderOptions(sb, optList); if (sb.length() > 0) { if (StringUtils.hasLength(options.getTitle())) { console.writeLine(options.getTitle()); } console.writeLine(sb.toString()); } } return leftWidth; }
class class_name[name] begin[{] method[printOptions, return_type[type[int]], modifier[public], parameter[options]] begin[{] local_variable[type[Collection], optList] local_variable[type[StringBuilder], sb] local_variable[type[int], leftWidth] if[call[options.isEmpty, parameter[]]] begin[{] assign[member[.leftWidth], call[.renderOptions, parameter[member[.sb], member[.optList]]]] if[binary_operation[call[sb.length, parameter[]], >, literal[0]]] begin[{] if[call[StringUtils.hasLength, parameter[call[options.getTitle, parameter[]]]]] begin[{] call[console.writeLine, parameter[call[options.getTitle, parameter[]]]] else begin[{] None end[}] call[console.writeLine, parameter[call[sb.toString, parameter[]]]] else begin[{] None end[}] else begin[{] None end[}] return[member[.leftWidth]] end[}] END[}]
Keyword[public] Keyword[int] identifier[printOptions] operator[SEP] identifier[Options] identifier[options] operator[SEP] { identifier[Collection] operator[<] identifier[Option] operator[>] identifier[optList] operator[=] identifier[options] operator[SEP] identifier[getAllOptions] operator[SEP] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[leftWidth] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[options] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[leftWidth] operator[=] identifier[renderOptions] operator[SEP] identifier[sb] , identifier[optList] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sb] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[hasLength] operator[SEP] identifier[options] operator[SEP] identifier[getTitle] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[console] operator[SEP] identifier[writeLine] operator[SEP] identifier[options] operator[SEP] identifier[getTitle] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[console] operator[SEP] identifier[writeLine] operator[SEP] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[leftWidth] operator[SEP] }
public static Builder newBuilderForEmulator(int port) { Builder builder = newBuilder().setProjectId("fake-project").setInstanceId("fake-instance"); builder .stubSettings() .setCredentialsProvider(NoCredentialsProvider.create()) .setEndpoint("localhost:" + port) .setTransportChannelProvider( InstantiatingGrpcChannelProvider.newBuilder() .setPoolSize(1) .setChannelConfigurator( new ApiFunction<ManagedChannelBuilder, ManagedChannelBuilder>() { @Override public ManagedChannelBuilder apply(ManagedChannelBuilder input) { return input.usePlaintext(); } }) .build()); return builder; }
class class_name[name] begin[{] method[newBuilderForEmulator, return_type[type[Builder]], modifier[public static], parameter[port]] begin[{] local_variable[type[Builder], builder] call[builder.stubSettings, parameter[]] return[member[.builder]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Builder] identifier[newBuilderForEmulator] operator[SEP] Keyword[int] identifier[port] operator[SEP] { identifier[Builder] identifier[builder] operator[=] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setProjectId] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[setInstanceId] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[stubSettings] operator[SEP] operator[SEP] operator[SEP] identifier[setCredentialsProvider] operator[SEP] identifier[NoCredentialsProvider] operator[SEP] identifier[create] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setEndpoint] operator[SEP] literal[String] operator[+] identifier[port] operator[SEP] operator[SEP] identifier[setTransportChannelProvider] operator[SEP] identifier[InstantiatingGrpcChannelProvider] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setPoolSize] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[setChannelConfigurator] operator[SEP] Keyword[new] identifier[ApiFunction] operator[<] identifier[ManagedChannelBuilder] , identifier[ManagedChannelBuilder] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[ManagedChannelBuilder] identifier[apply] operator[SEP] identifier[ManagedChannelBuilder] identifier[input] operator[SEP] { Keyword[return] identifier[input] operator[SEP] identifier[usePlaintext] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[builder] operator[SEP] }
public static void setUserPreference( Element compViewNode, String attributeName, IPerson person) { Document doc = compViewNode.getOwnerDocument(); NodeList nodes = doc.getElementsByTagName("layout"); boolean layoutOwner = false; Attr attrib; Element e; // Search Elements in nodelist for (int i = 0; i < nodes.getLength(); i++) { e = (Element) nodes.item(i); attrib = e.getAttributeNodeNS(Constants.NS_URI, Constants.LCL_FRAGMENT_NAME); if (attrib != null) { layoutOwner = true; } } if (!layoutOwner) { Element plfNode = HandlerUtils.getPLFNode( compViewNode, person, true, // create if not found false); if (plfNode.getAttributeNodeNS(Constants.NS_URI, Constants.LCL_ORIGIN) != null) EditManager.addPrefsDirective(plfNode, attributeName, person); } }
class class_name[name] begin[{] method[setUserPreference, return_type[void], modifier[public static], parameter[compViewNode, attributeName, person]] begin[{] local_variable[type[Document], doc] local_variable[type[NodeList], nodes] local_variable[type[boolean], layoutOwner] local_variable[type[Attr], attrib] local_variable[type[Element], e] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=item, postfix_operators=[], prefix_operators=[], qualifier=nodes, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=attrib, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=NS_URI, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[]), MemberReference(member=LCL_FRAGMENT_NAME, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[])], member=getAttributeNodeNS, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=attrib, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=layoutOwner, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getLength, postfix_operators=[], prefix_operators=[], qualifier=nodes, 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) if[member[.layoutOwner]] begin[{] local_variable[type[Element], plfNode] if[binary_operation[call[plfNode.getAttributeNodeNS, parameter[member[Constants.NS_URI], member[Constants.LCL_ORIGIN]]], !=, literal[null]]] begin[{] call[EditManager.addPrefsDirective, parameter[member[.plfNode], member[.attributeName], member[.person]]] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[setUserPreference] operator[SEP] identifier[Element] identifier[compViewNode] , identifier[String] identifier[attributeName] , identifier[IPerson] identifier[person] operator[SEP] { identifier[Document] identifier[doc] operator[=] identifier[compViewNode] operator[SEP] identifier[getOwnerDocument] operator[SEP] operator[SEP] operator[SEP] identifier[NodeList] identifier[nodes] operator[=] identifier[doc] operator[SEP] identifier[getElementsByTagName] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[boolean] identifier[layoutOwner] operator[=] literal[boolean] operator[SEP] identifier[Attr] identifier[attrib] operator[SEP] identifier[Element] identifier[e] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[nodes] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[e] operator[=] operator[SEP] identifier[Element] operator[SEP] identifier[nodes] operator[SEP] identifier[item] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[attrib] operator[=] identifier[e] operator[SEP] identifier[getAttributeNodeNS] operator[SEP] identifier[Constants] operator[SEP] identifier[NS_URI] , identifier[Constants] operator[SEP] identifier[LCL_FRAGMENT_NAME] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[attrib] operator[!=] Other[null] operator[SEP] { identifier[layoutOwner] operator[=] literal[boolean] operator[SEP] } } Keyword[if] operator[SEP] operator[!] identifier[layoutOwner] operator[SEP] { identifier[Element] identifier[plfNode] operator[=] identifier[HandlerUtils] operator[SEP] identifier[getPLFNode] operator[SEP] identifier[compViewNode] , identifier[person] , literal[boolean] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[plfNode] operator[SEP] identifier[getAttributeNodeNS] operator[SEP] identifier[Constants] operator[SEP] identifier[NS_URI] , identifier[Constants] operator[SEP] identifier[LCL_ORIGIN] operator[SEP] operator[!=] Other[null] operator[SEP] identifier[EditManager] operator[SEP] identifier[addPrefsDirective] operator[SEP] identifier[plfNode] , identifier[attributeName] , identifier[person] operator[SEP] operator[SEP] } }
protected void notifyListeners() { Iterator it = listeners.iterator(); while (it.hasNext()) { ((ComponentListener) it.next()).componentActivated(this); } }
class class_name[name] begin[{] method[notifyListeners, return_type[void], modifier[protected], parameter[]] begin[{] local_variable[type[Iterator], it] while[call[it.hasNext, parameter[]]] begin[{] Cast(expression=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=ComponentListener, sub_type=None)) end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[notifyListeners] operator[SEP] operator[SEP] { identifier[Iterator] identifier[it] operator[=] identifier[listeners] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[it] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { operator[SEP] operator[SEP] identifier[ComponentListener] operator[SEP] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[componentActivated] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } }
private void parseFields(Element e, Object o) { for (GoConfigFieldWriter field : new GoConfigClassWriter(o.getClass(), configCache, registry).getAllFields(o)) { field.setValueIfNotNull(e, o); } }
class class_name[name] begin[{] method[parseFields, return_type[void], modifier[private], parameter[e, o]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setValueIfNotNull, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), MemberReference(member=configCache, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=registry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAllFields, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=GoConfigClassWriter, sub_type=None)), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=field)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=GoConfigFieldWriter, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[parseFields] operator[SEP] identifier[Element] identifier[e] , identifier[Object] identifier[o] operator[SEP] { Keyword[for] operator[SEP] identifier[GoConfigFieldWriter] identifier[field] operator[:] Keyword[new] identifier[GoConfigClassWriter] operator[SEP] identifier[o] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] , identifier[configCache] , identifier[registry] operator[SEP] operator[SEP] identifier[getAllFields] operator[SEP] identifier[o] operator[SEP] operator[SEP] { identifier[field] operator[SEP] identifier[setValueIfNotNull] operator[SEP] identifier[e] , identifier[o] operator[SEP] operator[SEP] } }
private void buttonExportSettingsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonExportSettingsActionPerformed StringBuffer sb = new StringBuffer(); sb.append(clusteringAlgoPanel0.getStreamValueAsCLIString()+"\n"); sb.append(clusteringAlgoPanel0.getAlgorithm0ValueAsCLIString()+"\n"); sb.append(clusteringAlgoPanel0.getAlgorithm1ValueAsCLIString()+"\n"); System.out.println(sb); logPanel.addText(sb.toString()); }
class class_name[name] begin[{] method[buttonExportSettingsActionPerformed, return_type[void], modifier[private], parameter[evt]] begin[{] local_variable[type[StringBuffer], sb] call[sb.append, parameter[binary_operation[call[clusteringAlgoPanel0.getStreamValueAsCLIString, parameter[]], +, literal["\n"]]]] call[sb.append, parameter[binary_operation[call[clusteringAlgoPanel0.getAlgorithm0ValueAsCLIString, parameter[]], +, literal["\n"]]]] call[sb.append, parameter[binary_operation[call[clusteringAlgoPanel0.getAlgorithm1ValueAsCLIString, parameter[]], +, literal["\n"]]]] call[System.out.println, parameter[member[.sb]]] call[logPanel.addText, parameter[call[sb.toString, parameter[]]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[buttonExportSettingsActionPerformed] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[ActionEvent] identifier[evt] operator[SEP] { identifier[StringBuffer] identifier[sb] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[clusteringAlgoPanel0] operator[SEP] identifier[getStreamValueAsCLIString] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[clusteringAlgoPanel0] operator[SEP] identifier[getAlgorithm0ValueAsCLIString] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[clusteringAlgoPanel0] operator[SEP] identifier[getAlgorithm1ValueAsCLIString] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[sb] operator[SEP] operator[SEP] identifier[logPanel] operator[SEP] identifier[addText] operator[SEP] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static int getIdOrAllocateFor(String slashedClassName) { int id = getIdFor(slashedClassName); if (id == -1) { id = allocateId(slashedClassName); } return id; }
class class_name[name] begin[{] method[getIdOrAllocateFor, return_type[type[int]], modifier[public static], parameter[slashedClassName]] begin[{] local_variable[type[int], id] if[binary_operation[member[.id], ==, literal[1]]] begin[{] assign[member[.id], call[.allocateId, parameter[member[.slashedClassName]]]] else begin[{] None end[}] return[member[.id]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[getIdOrAllocateFor] operator[SEP] identifier[String] identifier[slashedClassName] operator[SEP] { Keyword[int] identifier[id] operator[=] identifier[getIdFor] operator[SEP] identifier[slashedClassName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[id] operator[==] operator[-] Other[1] operator[SEP] { identifier[id] operator[=] identifier[allocateId] operator[SEP] identifier[slashedClassName] operator[SEP] operator[SEP] } Keyword[return] identifier[id] operator[SEP] }
public void setUpToClass(final Class<?> clazz) { if (clazz != null) { final Object object = getObject(); if (object != null && !clazz.isInstance(object)) { throw new IllegalArgumentException("Specified class is not a superclass of the object"); } } this.upToClass = clazz; }
class class_name[name] begin[{] method[setUpToClass, return_type[void], modifier[public], parameter[clazz]] begin[{] if[binary_operation[member[.clazz], !=, literal[null]]] begin[{] local_variable[type[Object], object] if[binary_operation[binary_operation[member[.object], !=, literal[null]], &&, call[clazz.isInstance, parameter[member[.object]]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Specified class is not a superclass of the object")], 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[}] else begin[{] None end[}] assign[THIS[member[None.upToClass]], member[.clazz]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setUpToClass] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[SEP] { Keyword[if] operator[SEP] identifier[clazz] operator[!=] Other[null] operator[SEP] { Keyword[final] identifier[Object] identifier[object] operator[=] identifier[getObject] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[object] operator[!=] Other[null] operator[&&] operator[!] identifier[clazz] operator[SEP] identifier[isInstance] operator[SEP] identifier[object] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } } Keyword[this] operator[SEP] identifier[upToClass] operator[=] identifier[clazz] operator[SEP] }
private static Style.FillRule parseFillRule(String val) { if ("nonzero".equals(val)) return Style.FillRule.NonZero; if ("evenodd".equals(val)) return Style.FillRule.EvenOdd; return null; }
class class_name[name] begin[{] method[parseFillRule, return_type[type[Style]], modifier[private static], parameter[val]] begin[{] if[literal["nonzero"]] begin[{] return[member[Style.FillRule.NonZero]] else begin[{] None end[}] if[literal["evenodd"]] begin[{] return[member[Style.FillRule.EvenOdd]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[private] Keyword[static] identifier[Style] operator[SEP] identifier[FillRule] identifier[parseFillRule] operator[SEP] identifier[String] identifier[val] operator[SEP] { Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[val] operator[SEP] operator[SEP] Keyword[return] identifier[Style] operator[SEP] identifier[FillRule] operator[SEP] identifier[NonZero] operator[SEP] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[val] operator[SEP] operator[SEP] Keyword[return] identifier[Style] operator[SEP] identifier[FillRule] operator[SEP] identifier[EvenOdd] operator[SEP] Keyword[return] Other[null] operator[SEP] }
public void updateBlocks(World world, MBlockState state) { AxisAlignedBB[] aabbs = AABBUtils.getCollisionBoundingBoxes(world, state, true); for (AxisAlignedBB aabb : aabbs) { if (aabb == null) continue; for (BlockPos pos : BlockPosUtils.getAllInBox(aabb)) world.neighborChanged(pos, state.getBlock(), state.getPos()); } }
class class_name[name] begin[{] method[updateBlocks, return_type[void], modifier[public], parameter[world, state]] begin[{] local_variable[type[AxisAlignedBB], aabbs] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=aabb, 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=ContinueStatement(goto=None, label=None)), ForStatement(body=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getBlock, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getPos, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[], type_arguments=None)], member=neighborChanged, postfix_operators=[], prefix_operators=[], qualifier=world, selectors=[], type_arguments=None), label=None), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=aabb, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAllInBox, postfix_operators=[], prefix_operators=[], qualifier=BlockPosUtils, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=pos)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BlockPos, sub_type=None))), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=aabbs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=aabb)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AxisAlignedBB, sub_type=None))), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[updateBlocks] operator[SEP] identifier[World] identifier[world] , identifier[MBlockState] identifier[state] operator[SEP] { identifier[AxisAlignedBB] operator[SEP] operator[SEP] identifier[aabbs] operator[=] identifier[AABBUtils] operator[SEP] identifier[getCollisionBoundingBoxes] operator[SEP] identifier[world] , identifier[state] , literal[boolean] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[AxisAlignedBB] identifier[aabb] operator[:] identifier[aabbs] operator[SEP] { Keyword[if] operator[SEP] identifier[aabb] operator[==] Other[null] operator[SEP] Keyword[continue] operator[SEP] Keyword[for] operator[SEP] identifier[BlockPos] identifier[pos] operator[:] identifier[BlockPosUtils] operator[SEP] identifier[getAllInBox] operator[SEP] identifier[aabb] operator[SEP] operator[SEP] identifier[world] operator[SEP] identifier[neighborChanged] operator[SEP] identifier[pos] , identifier[state] operator[SEP] identifier[getBlock] operator[SEP] operator[SEP] , identifier[state] operator[SEP] identifier[getPos] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public Properties getAttributeValueAsEncryptedProperties(final String _key, final boolean _concatenate) throws EFapsException { final Properties properties = getAttributeValueAsProperties(_key, _concatenate); final StandardPBEStringEncryptor encryptor = new StandardPBEStringEncryptor(); encryptor.setConfig(SystemConfiguration.getPBEConfig()); final Properties props = new EncryptableProperties(properties, encryptor); return props; }
class class_name[name] begin[{] method[getAttributeValueAsEncryptedProperties, return_type[type[Properties]], modifier[public], parameter[_key, _concatenate]] begin[{] local_variable[type[Properties], properties] local_variable[type[StandardPBEStringEncryptor], encryptor] call[encryptor.setConfig, parameter[call[SystemConfiguration.getPBEConfig, parameter[]]]] local_variable[type[Properties], props] return[member[.props]] end[}] END[}]
Keyword[public] identifier[Properties] identifier[getAttributeValueAsEncryptedProperties] operator[SEP] Keyword[final] identifier[String] identifier[_key] , Keyword[final] Keyword[boolean] identifier[_concatenate] operator[SEP] Keyword[throws] identifier[EFapsException] { Keyword[final] identifier[Properties] identifier[properties] operator[=] identifier[getAttributeValueAsProperties] operator[SEP] identifier[_key] , identifier[_concatenate] operator[SEP] operator[SEP] Keyword[final] identifier[StandardPBEStringEncryptor] identifier[encryptor] operator[=] Keyword[new] identifier[StandardPBEStringEncryptor] operator[SEP] operator[SEP] operator[SEP] identifier[encryptor] operator[SEP] identifier[setConfig] operator[SEP] identifier[SystemConfiguration] operator[SEP] identifier[getPBEConfig] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Properties] identifier[props] operator[=] Keyword[new] identifier[EncryptableProperties] operator[SEP] identifier[properties] , identifier[encryptor] operator[SEP] operator[SEP] Keyword[return] identifier[props] operator[SEP] }
protected BigDecimal round(double val){ BigDecimal value = new BigDecimal(val); if(val!=0.0){ value = value.setScale(3, BigDecimal.ROUND_DOWN); } return value; }
class class_name[name] begin[{] method[round, return_type[type[BigDecimal]], modifier[protected], parameter[val]] begin[{] local_variable[type[BigDecimal], value] if[binary_operation[member[.val], !=, literal[0.0]]] begin[{] assign[member[.value], call[value.setScale, parameter[literal[3], member[BigDecimal.ROUND_DOWN]]]] else begin[{] None end[}] return[member[.value]] end[}] END[}]
Keyword[protected] identifier[BigDecimal] identifier[round] operator[SEP] Keyword[double] identifier[val] operator[SEP] { identifier[BigDecimal] identifier[value] operator[=] Keyword[new] identifier[BigDecimal] operator[SEP] identifier[val] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[val] operator[!=] literal[Float] operator[SEP] { identifier[value] operator[=] identifier[value] operator[SEP] identifier[setScale] operator[SEP] Other[3] , identifier[BigDecimal] operator[SEP] identifier[ROUND_DOWN] operator[SEP] operator[SEP] } Keyword[return] identifier[value] operator[SEP] }
public <RO> SingleRuleContext<DPO, Collection<DPO>, RO> check(Collection<Rule<Collection<DPO>, RO>> rules) { List<Rule<Collection<DPO>, RO>> addedRules = new ArrayList<Rule<Collection<DPO>, RO>>(); if (rules != null) { addedRules.addAll(rules); } // Change context return new SingleRuleContext<DPO, Collection<DPO>, RO>(addedTriggers, addedDataProviders, GeneralValidator.MappingStrategy.JOIN, null, addedRules); }
class class_name[name] begin[{] method[check, return_type[type[SingleRuleContext]], modifier[public], parameter[rules]] begin[{] local_variable[type[List], addedRules] if[binary_operation[member[.rules], !=, literal[null]]] begin[{] call[addedRules.addAll, parameter[member[.rules]]] else begin[{] None end[}] return[ClassCreator(arguments=[MemberReference(member=addedTriggers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=addedDataProviders, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=JOIN, postfix_operators=[], prefix_operators=[], qualifier=GeneralValidator.MappingStrategy, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=addedRules, 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=DPO, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=DPO, sub_type=None))], dimensions=[], name=Collection, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=RO, sub_type=None))], dimensions=None, name=SingleRuleContext, sub_type=None))] end[}] END[}]
Keyword[public] operator[<] identifier[RO] operator[>] identifier[SingleRuleContext] operator[<] identifier[DPO] , identifier[Collection] operator[<] identifier[DPO] operator[>] , identifier[RO] operator[>] identifier[check] operator[SEP] identifier[Collection] operator[<] identifier[Rule] operator[<] identifier[Collection] operator[<] identifier[DPO] operator[>] , identifier[RO] operator[>] operator[>] identifier[rules] operator[SEP] { identifier[List] operator[<] identifier[Rule] operator[<] identifier[Collection] operator[<] identifier[DPO] operator[>] , identifier[RO] operator[>] operator[>] identifier[addedRules] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Rule] operator[<] identifier[Collection] operator[<] identifier[DPO] operator[>] , identifier[RO] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[rules] operator[!=] Other[null] operator[SEP] { identifier[addedRules] operator[SEP] identifier[addAll] operator[SEP] identifier[rules] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[SingleRuleContext] operator[<] identifier[DPO] , identifier[Collection] operator[<] identifier[DPO] operator[>] , identifier[RO] operator[>] operator[SEP] identifier[addedTriggers] , identifier[addedDataProviders] , identifier[GeneralValidator] operator[SEP] identifier[MappingStrategy] operator[SEP] identifier[JOIN] , Other[null] , identifier[addedRules] operator[SEP] operator[SEP] }
private static AddOn getAddOn(Collection<AddOn> addOns, String id) { for (AddOn addOn : addOns) { if (addOn.getId().equals(id)) { return addOn; } } return null; }
class class_name[name] begin[{] method[getAddOn, return_type[type[AddOn]], modifier[private static], parameter[addOns, id]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=addOn, selectors=[MethodInvocation(arguments=[MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, 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=MemberReference(member=addOn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=addOns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=addOn)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AddOn, sub_type=None))), label=None) return[literal[null]] end[}] END[}]
Keyword[private] Keyword[static] identifier[AddOn] identifier[getAddOn] operator[SEP] identifier[Collection] operator[<] identifier[AddOn] operator[>] identifier[addOns] , identifier[String] identifier[id] operator[SEP] { Keyword[for] operator[SEP] identifier[AddOn] identifier[addOn] operator[:] identifier[addOns] operator[SEP] { Keyword[if] operator[SEP] identifier[addOn] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[id] operator[SEP] operator[SEP] { Keyword[return] identifier[addOn] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
protected void unassignFromUserObjectInDb(final Type _unassignType, final JAASSystem _jaasSystem, final AbstractUserObject _object) throws EFapsException { Connection con = null; try { con = Context.getConnection(); Statement stmt = null; final StringBuilder cmd = new StringBuilder(); try { cmd.append("delete from ").append(_unassignType.getMainTable().getSqlTable()).append(" ").append( "where USERJAASSYSTEM=").append(_jaasSystem.getId()).append(" ").append( "and USERABSTRACTFROM=").append(getId()).append(" ").append("and USERABSTRACTTO=") .append(_object.getId()); stmt = con.createStatement(); stmt.executeUpdate(cmd.toString()); } catch (final SQLException e) { AbstractUserObject.LOG.error("could not execute '" + cmd.toString() + "' to unassign user object '" + toString() + "' from object '" + _object + "' for JAAS system '" + _jaasSystem + "' ", e); throw new EFapsException(getClass(), "unassignFromUserObjectInDb.SQLException", e, cmd.toString(), getName()); } finally { try { if (stmt != null) { stmt.close(); } con.commit(); } catch (final SQLException e) { AbstractUserObject.LOG.error("Could not close a statement.", e); } } } finally { try { if (con != null && !con.isClosed()) { con.close(); } } catch (final SQLException e) { throw new CacheReloadException("Cannot read a type for an attribute.", e); } } }
class class_name[name] begin[{] method[unassignFromUserObjectInDb, return_type[void], modifier[protected], parameter[_unassignType, _jaasSystem, _object]] begin[{] local_variable[type[Connection], con] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=con, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getConnection, postfix_operators=[], prefix_operators=[], qualifier=Context, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=stmt)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Statement, sub_type=None)), 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=StringBuilder, sub_type=None)), name=cmd)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=StringBuilder, sub_type=None)), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="delete from ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=cmd, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMainTable, postfix_operators=[], prefix_operators=[], qualifier=_unassignType, selectors=[MethodInvocation(arguments=[], member=getSqlTable, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" ")], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="where USERJAASSYSTEM=")], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=_jaasSystem, selectors=[], type_arguments=None)], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" ")], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="and USERABSTRACTFROM=")], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" ")], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="and USERABSTRACTTO=")], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=_object, selectors=[], type_arguments=None)], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=stmt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=createStatement, postfix_operators=[], prefix_operators=[], qualifier=con, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=cmd, selectors=[], type_arguments=None)], member=executeUpdate, postfix_operators=[], prefix_operators=[], qualifier=stmt, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="could not execute '"), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=cmd, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' to unassign user object '"), operator=+), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' from object '"), operator=+), operandr=MemberReference(member=_object, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' for JAAS system '"), operator=+), operandr=MemberReference(member=_jaasSystem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' "), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=AbstractUserObject.LOG, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="unassignFromUserObjectInDb.SQLException"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=cmd, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getName, 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=EFapsException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SQLException']))], finally_block=[TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=stmt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=stmt, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[], member=commit, postfix_operators=[], prefix_operators=[], qualifier=con, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not close a statement."), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=AbstractUserObject.LOG, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SQLException']))], finally_block=None, label=None, resources=None)], label=None, resources=None)], catches=None, finally_block=[TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=con, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[], member=isClosed, postfix_operators=[], prefix_operators=['!'], qualifier=con, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=con, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot read a type for an attribute."), 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=CacheReloadException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SQLException']))], finally_block=None, label=None, resources=None)], label=None, resources=None) end[}] END[}]
Keyword[protected] Keyword[void] identifier[unassignFromUserObjectInDb] operator[SEP] Keyword[final] identifier[Type] identifier[_unassignType] , Keyword[final] identifier[JAASSystem] identifier[_jaasSystem] , Keyword[final] identifier[AbstractUserObject] identifier[_object] operator[SEP] Keyword[throws] identifier[EFapsException] { identifier[Connection] identifier[con] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[con] operator[=] identifier[Context] operator[SEP] identifier[getConnection] operator[SEP] operator[SEP] operator[SEP] identifier[Statement] identifier[stmt] operator[=] Other[null] operator[SEP] Keyword[final] identifier[StringBuilder] identifier[cmd] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[cmd] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[_unassignType] operator[SEP] identifier[getMainTable] operator[SEP] operator[SEP] operator[SEP] identifier[getSqlTable] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[_jaasSystem] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[_object] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[stmt] operator[=] identifier[con] operator[SEP] identifier[createStatement] operator[SEP] operator[SEP] operator[SEP] identifier[stmt] operator[SEP] identifier[executeUpdate] operator[SEP] identifier[cmd] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[SQLException] identifier[e] operator[SEP] { identifier[AbstractUserObject] operator[SEP] identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[cmd] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[toString] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[_object] operator[+] literal[String] operator[+] identifier[_jaasSystem] operator[+] literal[String] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[EFapsException] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] , literal[String] , identifier[e] , identifier[cmd] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[try] { Keyword[if] operator[SEP] identifier[stmt] operator[!=] Other[null] operator[SEP] { identifier[stmt] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } identifier[con] operator[SEP] identifier[commit] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[SQLException] identifier[e] operator[SEP] { identifier[AbstractUserObject] operator[SEP] identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } } } Keyword[finally] { Keyword[try] { Keyword[if] operator[SEP] identifier[con] operator[!=] Other[null] operator[&&] operator[!] identifier[con] operator[SEP] identifier[isClosed] operator[SEP] operator[SEP] operator[SEP] { identifier[con] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] Keyword[final] identifier[SQLException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[CacheReloadException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } } }
public T watch(DeterministicKey accountKey) { checkState(accountPath == null, "either watch or accountPath"); this.watchingKey = accountKey; this.isFollowing = false; return self(); }
class class_name[name] begin[{] method[watch, return_type[type[T]], modifier[public], parameter[accountKey]] begin[{] call[.checkState, parameter[binary_operation[member[.accountPath], ==, literal[null]], literal["either watch or accountPath"]]] assign[THIS[member[None.watchingKey]], member[.accountKey]] assign[THIS[member[None.isFollowing]], literal[false]] return[call[.self, parameter[]]] end[}] END[}]
Keyword[public] identifier[T] identifier[watch] operator[SEP] identifier[DeterministicKey] identifier[accountKey] operator[SEP] { identifier[checkState] operator[SEP] identifier[accountPath] operator[==] Other[null] , literal[String] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[watchingKey] operator[=] identifier[accountKey] operator[SEP] Keyword[this] operator[SEP] identifier[isFollowing] operator[=] literal[boolean] operator[SEP] Keyword[return] identifier[self] operator[SEP] operator[SEP] operator[SEP] }
@Override public ListLaunchPathsResult listLaunchPaths(ListLaunchPathsRequest request) { request = beforeClientExecution(request); return executeListLaunchPaths(request); }
class class_name[name] begin[{] method[listLaunchPaths, return_type[type[ListLaunchPathsResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeListLaunchPaths, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ListLaunchPathsResult] identifier[listLaunchPaths] operator[SEP] identifier[ListLaunchPathsRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeListLaunchPaths] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
private boolean isAddToLoadBalancerSuspended(String asgAccountId, String asgName) { AutoScalingGroup asg; if(asgAccountId == null || asgAccountId.equals(accountId)) { asg = retrieveAutoScalingGroup(asgName); } else { asg = retrieveAutoScalingGroupCrossAccount(asgAccountId, asgName); } if (asg == null) { logger.warn("The ASG information for {} could not be found. So returning false.", asgName); return false; } return isAddToLoadBalancerSuspended(asg); }
class class_name[name] begin[{] method[isAddToLoadBalancerSuspended, return_type[type[boolean]], modifier[private], parameter[asgAccountId, asgName]] begin[{] local_variable[type[AutoScalingGroup], asg] if[binary_operation[binary_operation[member[.asgAccountId], ==, literal[null]], ||, call[asgAccountId.equals, parameter[member[.accountId]]]]] begin[{] assign[member[.asg], call[.retrieveAutoScalingGroup, parameter[member[.asgName]]]] else begin[{] assign[member[.asg], call[.retrieveAutoScalingGroupCrossAccount, parameter[member[.asgAccountId], member[.asgName]]]] end[}] if[binary_operation[member[.asg], ==, literal[null]]] begin[{] call[logger.warn, parameter[literal["The ASG information for {} could not be found. So returning false."], member[.asgName]]] return[literal[false]] else begin[{] None end[}] return[call[.isAddToLoadBalancerSuspended, parameter[member[.asg]]]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[isAddToLoadBalancerSuspended] operator[SEP] identifier[String] identifier[asgAccountId] , identifier[String] identifier[asgName] operator[SEP] { identifier[AutoScalingGroup] identifier[asg] operator[SEP] Keyword[if] operator[SEP] identifier[asgAccountId] operator[==] Other[null] operator[||] identifier[asgAccountId] operator[SEP] identifier[equals] operator[SEP] identifier[accountId] operator[SEP] operator[SEP] { identifier[asg] operator[=] identifier[retrieveAutoScalingGroup] operator[SEP] identifier[asgName] operator[SEP] operator[SEP] } Keyword[else] { identifier[asg] operator[=] identifier[retrieveAutoScalingGroupCrossAccount] operator[SEP] identifier[asgAccountId] , identifier[asgName] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[asg] operator[==] Other[null] operator[SEP] { identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[asgName] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[return] identifier[isAddToLoadBalancerSuspended] operator[SEP] identifier[asg] operator[SEP] operator[SEP] }
protected UtilImpl_BidirectionalMap getAnnotationsMap(ScanPolicy policy, AnnotationCategory category) { return getPolicyData(policy).getTargetData(category); }
class class_name[name] begin[{] method[getAnnotationsMap, return_type[type[UtilImpl_BidirectionalMap]], modifier[protected], parameter[policy, category]] begin[{] return[call[.getPolicyData, parameter[member[.policy]]]] end[}] END[}]
Keyword[protected] identifier[UtilImpl_BidirectionalMap] identifier[getAnnotationsMap] operator[SEP] identifier[ScanPolicy] identifier[policy] , identifier[AnnotationCategory] identifier[category] operator[SEP] { Keyword[return] identifier[getPolicyData] operator[SEP] identifier[policy] operator[SEP] operator[SEP] identifier[getTargetData] operator[SEP] identifier[category] operator[SEP] operator[SEP] }
@Nonnull @ReturnsMutableCopy public static ICommonsList <File> getDirectoryContent (@Nonnull final File aDirectory, @Nonnull final FilenameFilter aFilenameFilter) { ValueEnforcer.notNull (aDirectory, "Directory"); ValueEnforcer.notNull (aFilenameFilter, "FilenameFilter"); return _getDirectoryContent (aDirectory, aDirectory.listFiles (aFilenameFilter)); }
class class_name[name] begin[{] method[getDirectoryContent, return_type[type[ICommonsList]], modifier[public static], parameter[aDirectory, aFilenameFilter]] begin[{] call[ValueEnforcer.notNull, parameter[member[.aDirectory], literal["Directory"]]] call[ValueEnforcer.notNull, parameter[member[.aFilenameFilter], literal["FilenameFilter"]]] return[call[._getDirectoryContent, parameter[member[.aDirectory], call[aDirectory.listFiles, parameter[member[.aFilenameFilter]]]]]] end[}] END[}]
annotation[@] identifier[Nonnull] annotation[@] identifier[ReturnsMutableCopy] Keyword[public] Keyword[static] identifier[ICommonsList] operator[<] identifier[File] operator[>] identifier[getDirectoryContent] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[File] identifier[aDirectory] , annotation[@] identifier[Nonnull] Keyword[final] identifier[FilenameFilter] identifier[aFilenameFilter] operator[SEP] { identifier[ValueEnforcer] operator[SEP] identifier[notNull] operator[SEP] identifier[aDirectory] , literal[String] operator[SEP] operator[SEP] identifier[ValueEnforcer] operator[SEP] identifier[notNull] operator[SEP] identifier[aFilenameFilter] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[_getDirectoryContent] operator[SEP] identifier[aDirectory] , identifier[aDirectory] operator[SEP] identifier[listFiles] operator[SEP] identifier[aFilenameFilter] operator[SEP] operator[SEP] operator[SEP] }
protected void cacheExtension(URI uri) { // extract extension file name from URI String uriStr = uri.toString().toLowerCase(); if (uriStr.endsWith("/")) { uriStr = uriStr.substring(0, uriStr.length() - 1); } String fileName = uriStr.substring(uriStr.lastIndexOf('/')); if (fileName.endsWith(".xesext") == false) { fileName += ".xesext"; } File cacheFile = new File(XRuntimeUtils.getExtensionCacheFolder().getAbsolutePath() + File.separator + fileName); if (uri.toString().equals(DATAUSAGE_EXTENSION_URI)) { InputStream in = XExtensionManager.class.getResourceAsStream(DATAUSAGE_EXTENSION_LOCAL_PATH); try { final Path targetPath = cacheFile.toPath(); Files.copy(in, targetPath); XLogging.log("Cached XES extension '" + uri + "'", XLogging.Importance.DEBUG); } catch (IOException ex) { ex.printStackTrace(); } } else { // download extension file to cache directory try { byte[] buffer = new byte[1024]; BufferedOutputStream bos; try (BufferedInputStream bis = new BufferedInputStream(uri.toURL() .openStream())) { cacheFile.createNewFile(); bos = new BufferedOutputStream( new FileOutputStream(cacheFile)); int read = bis.read(buffer); while (read >= 0) { bos.write(buffer, 0, read); read = bis.read(buffer); } } bos.flush(); bos.close(); XLogging.log("Cached XES extension '" + uri + "'", XLogging.Importance.DEBUG); } catch (IOException e) { e.printStackTrace(); } } }
class class_name[name] begin[{] method[cacheExtension, return_type[void], modifier[protected], parameter[uri]] begin[{] local_variable[type[String], uriStr] if[call[uriStr.endsWith, parameter[literal["/"]]]] begin[{] assign[member[.uriStr], call[uriStr.substring, parameter[literal[0], binary_operation[call[uriStr.length, parameter[]], -, literal[1]]]]] else begin[{] None end[}] local_variable[type[String], fileName] if[binary_operation[call[fileName.endsWith, parameter[literal[".xesext"]]], ==, literal[false]]] begin[{] assign[member[.fileName], literal[".xesext"]] else begin[{] None end[}] local_variable[type[File], cacheFile] if[call[uri.toString, parameter[]]] begin[{] local_variable[type[InputStream], in] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=toPath, postfix_operators=[], prefix_operators=[], qualifier=cacheFile, selectors=[], type_arguments=None), name=targetPath)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Path, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=targetPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=copy, postfix_operators=[], prefix_operators=[], qualifier=Files, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cached XES extension '"), operandr=MemberReference(member=uri, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'"), operator=+), MemberReference(member=DEBUG, postfix_operators=[], prefix_operators=[], qualifier=XLogging.Importance, selectors=[])], member=log, postfix_operators=[], prefix_operators=[], qualifier=XLogging, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['IOException']))], finally_block=None, label=None, resources=None) else begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1024)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte)), name=buffer)], modifiers=set(), type=BasicType(dimensions=[None], name=byte)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=bos)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BufferedOutputStream, sub_type=None)), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=createNewFile, postfix_operators=[], prefix_operators=[], qualifier=cacheFile, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=bos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=cacheFile, 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=FileOutputStream, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BufferedOutputStream, sub_type=None))), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=bis, selectors=[], type_arguments=None), name=read)], modifiers=set(), type=BasicType(dimensions=[], name=int)), WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=bos, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=bis, selectors=[], type_arguments=None)), label=None)]), condition=BinaryOperation(operandl=MemberReference(member=read, 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=bis, type=ReferenceType(arguments=None, dimensions=[], name=BufferedInputStream, sub_type=None), value=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toURL, postfix_operators=[], prefix_operators=[], qualifier=uri, selectors=[MethodInvocation(arguments=[], member=openStream, 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=BufferedInputStream, sub_type=None)))]), StatementExpression(expression=MethodInvocation(arguments=[], member=flush, postfix_operators=[], prefix_operators=[], qualifier=bos, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=bos, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cached XES extension '"), operandr=MemberReference(member=uri, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'"), operator=+), MemberReference(member=DEBUG, postfix_operators=[], prefix_operators=[], qualifier=XLogging.Importance, selectors=[])], member=log, postfix_operators=[], prefix_operators=[], qualifier=XLogging, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[cacheExtension] operator[SEP] identifier[URI] identifier[uri] operator[SEP] { identifier[String] identifier[uriStr] operator[=] identifier[uri] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[uriStr] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[uriStr] operator[=] identifier[uriStr] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[uriStr] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] } identifier[String] identifier[fileName] operator[=] identifier[uriStr] operator[SEP] identifier[substring] operator[SEP] identifier[uriStr] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[fileName] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[==] literal[boolean] operator[SEP] { identifier[fileName] operator[+=] literal[String] operator[SEP] } identifier[File] identifier[cacheFile] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[XRuntimeUtils] operator[SEP] identifier[getExtensionCacheFolder] operator[SEP] operator[SEP] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[+] identifier[File] operator[SEP] identifier[separator] operator[+] identifier[fileName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[uri] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[DATAUSAGE_EXTENSION_URI] operator[SEP] operator[SEP] { identifier[InputStream] identifier[in] operator[=] identifier[XExtensionManager] operator[SEP] Keyword[class] operator[SEP] identifier[getResourceAsStream] operator[SEP] identifier[DATAUSAGE_EXTENSION_LOCAL_PATH] operator[SEP] operator[SEP] Keyword[try] { Keyword[final] identifier[Path] identifier[targetPath] operator[=] identifier[cacheFile] operator[SEP] identifier[toPath] operator[SEP] operator[SEP] operator[SEP] identifier[Files] operator[SEP] identifier[copy] operator[SEP] identifier[in] , identifier[targetPath] operator[SEP] operator[SEP] identifier[XLogging] operator[SEP] identifier[log] operator[SEP] literal[String] operator[+] identifier[uri] operator[+] literal[String] , identifier[XLogging] operator[SEP] identifier[Importance] operator[SEP] identifier[DEBUG] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[ex] operator[SEP] { identifier[ex] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[try] { Keyword[byte] operator[SEP] operator[SEP] identifier[buffer] operator[=] Keyword[new] Keyword[byte] operator[SEP] Other[1024] operator[SEP] operator[SEP] identifier[BufferedOutputStream] identifier[bos] operator[SEP] Keyword[try] operator[SEP] identifier[BufferedInputStream] identifier[bis] operator[=] Keyword[new] identifier[BufferedInputStream] operator[SEP] identifier[uri] operator[SEP] identifier[toURL] operator[SEP] operator[SEP] operator[SEP] identifier[openStream] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[cacheFile] operator[SEP] identifier[createNewFile] operator[SEP] operator[SEP] operator[SEP] identifier[bos] operator[=] Keyword[new] identifier[BufferedOutputStream] operator[SEP] Keyword[new] identifier[FileOutputStream] operator[SEP] identifier[cacheFile] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[read] operator[=] identifier[bis] operator[SEP] identifier[read] operator[SEP] identifier[buffer] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[read] operator[>=] Other[0] operator[SEP] { identifier[bos] operator[SEP] identifier[write] operator[SEP] identifier[buffer] , Other[0] , identifier[read] operator[SEP] operator[SEP] identifier[read] operator[=] identifier[bis] operator[SEP] identifier[read] operator[SEP] identifier[buffer] operator[SEP] operator[SEP] } } identifier[bos] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] identifier[bos] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[XLogging] operator[SEP] identifier[log] operator[SEP] literal[String] operator[+] identifier[uri] operator[+] literal[String] , identifier[XLogging] operator[SEP] identifier[Importance] operator[SEP] identifier[DEBUG] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[e] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } } }
public final void forInit() throws RecognitionException { int forInit_StartIndex = input.index(); ParserRuleReturnScope variableModifier12 =null; ParserRuleReturnScope type13 =null; try { if ( state.backtracking>0 && alreadyParsedRule(input, 101) ) { return; } // src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1056:5: ( ( variableModifier )* type variableDeclarators | expressionList ) int alt137=2; switch ( input.LA(1) ) { case 58: case 83: { alt137=1; } break; case Identifier: { switch ( input.LA(2) ) { case 53: { int LA137_26 = input.LA(3); if ( (synpred198_Java()) ) { alt137=1; } else if ( (true) ) { alt137=2; } } break; case 47: { int LA137_27 = input.LA(3); if ( (synpred198_Java()) ) { alt137=1; } else if ( (true) ) { alt137=2; } } break; case 59: { int LA137_28 = input.LA(3); if ( (synpred198_Java()) ) { alt137=1; } else if ( (true) ) { alt137=2; } } break; case Identifier: { alt137=1; } break; case EOF: case 30: case 31: case 32: case 33: case 34: case 35: case 36: case 38: case 39: case 40: case 41: case 42: case 43: case 44: case 45: case 46: case 49: case 50: case 52: case 54: case 55: case 56: case 57: case 61: case 62: case 91: case 122: case 123: case 124: { alt137=2; } break; default: if (state.backtracking>0) {state.failed=true; return;} int nvaeMark = input.mark(); try { input.consume(); NoViableAltException nvae = new NoViableAltException("", 137, 3, input); throw nvae; } finally { input.rewind(nvaeMark); } } } break; case 65: case 67: case 71: case 77: case 85: case 92: case 94: case 105: { switch ( input.LA(2) ) { case 59: { int LA137_55 = input.LA(3); if ( (synpred198_Java()) ) { alt137=1; } else if ( (true) ) { alt137=2; } } break; case Identifier: { alt137=1; } break; case 47: { alt137=2; } break; default: if (state.backtracking>0) {state.failed=true; return;} int nvaeMark = input.mark(); try { input.consume(); NoViableAltException nvae = new NoViableAltException("", 137, 4, input); throw nvae; } finally { input.rewind(nvaeMark); } } } break; case CharacterLiteral: case DecimalLiteral: case FloatingPointLiteral: case HexLiteral: case OctalLiteral: case StringLiteral: case 29: case 36: case 40: case 41: case 44: case 45: case 53: case 70: case 79: case 80: case 82: case 97: case 98: case 108: case 111: case 115: case 118: case 126: { alt137=2; } break; default: if (state.backtracking>0) {state.failed=true; return;} NoViableAltException nvae = new NoViableAltException("", 137, 0, input); throw nvae; } switch (alt137) { case 1 : // src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1056:7: ( variableModifier )* type variableDeclarators { // src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1056:7: ( variableModifier )* loop136: while (true) { int alt136=2; int LA136_0 = input.LA(1); if ( (LA136_0==58||LA136_0==83) ) { alt136=1; } switch (alt136) { case 1 : // src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1056:9: variableModifier { pushFollow(FOLLOW_variableModifier_in_forInit4596); variableModifier12=variableModifier(); state._fsp--; if (state.failed) return; if ( state.backtracking==0 ) { VarDecl_stack.peek().descr.updateStart( ((CommonToken)(variableModifier12!=null?(variableModifier12.start):null)).getStartIndex() - 1 ); VarDecl_stack.peek().descr.addModifier( (variableModifier12!=null?input.toString(variableModifier12.start,variableModifier12.stop):null) ); } } break; default : break loop136; } } pushFollow(FOLLOW_type_in_forInit4631); type13=type(); state._fsp--; if (state.failed) return; if ( state.backtracking==0 ) { VarDecl_stack.peek().descr.updateStart( ((CommonToken)(type13!=null?(type13.start):null)).getStartIndex() - 1 ); VarDecl_stack.peek().descr.setType( (type13!=null?input.toString(type13.start,type13.stop):null) ); VarDecl_stack.peek().descr.setEnd( ((CommonToken)(type13!=null?(type13.stop):null)).getStopIndex() ); } pushFollow(FOLLOW_variableDeclarators_in_forInit4651); variableDeclarators(); state._fsp--; if (state.failed) return; } break; case 2 : // src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1069:7: expressionList { pushFollow(FOLLOW_expressionList_in_forInit4659); expressionList(); state._fsp--; if (state.failed) return; } break; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { // do for sure before leaving if ( state.backtracking>0 ) { memoize(input, 101, forInit_StartIndex); } } }
class class_name[name] begin[{] method[forInit, return_type[void], modifier[final public], parameter[]] begin[{] local_variable[type[int], forInit_StartIndex] local_variable[type[ParserRuleReturnScope], variableModifier12] local_variable[type[ParserRuleReturnScope], type13] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), operandr=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=101)], member=alreadyParsedRule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt137)], modifiers=set(), type=BasicType(dimensions=[], name=int)), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=58), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=83)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt137, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['Identifier'], statements=[BlockStatement(label=None, statements=[SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=53)], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA137_26)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred198_Java, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=IfStatement(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt137, 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=alt137, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=47)], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA137_27)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred198_Java, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=IfStatement(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt137, 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=alt137, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=59)], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA137_28)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred198_Java, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=IfStatement(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt137, 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=alt137, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['Identifier'], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt137, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['EOF', Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=30), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=31), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=33), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=34), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=35), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=36), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=38), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=39), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=40), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=41), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=42), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=43), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=44), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=45), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=46), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=49), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=50), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=52), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=54), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=55), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=56), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=57), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=61), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=62), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=91), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=122), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=123), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=124)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt137, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], 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=MethodInvocation(arguments=[], member=mark, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=nvaeMark)], modifiers=set(), type=BasicType(dimensions=[], name=int)), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=consume, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=137), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), 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=NoViableAltException, sub_type=None)), name=nvae)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NoViableAltException, sub_type=None)), ThrowStatement(expression=MemberReference(member=nvae, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=nvaeMark, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rewind, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), label=None)], label=None, resources=None)])], expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=65), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=67), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=71), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=77), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=85), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=92), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=94), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=105)], statements=[BlockStatement(label=None, statements=[SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=59)], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA137_55)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred198_Java, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=IfStatement(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt137, 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=alt137, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['Identifier'], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt137, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=47)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt137, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], 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=MethodInvocation(arguments=[], member=mark, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=nvaeMark)], modifiers=set(), type=BasicType(dimensions=[], name=int)), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=consume, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=137), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), 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=NoViableAltException, sub_type=None)), name=nvae)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NoViableAltException, sub_type=None)), ThrowStatement(expression=MemberReference(member=nvae, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=nvaeMark, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rewind, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), label=None)], label=None, resources=None)])], expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['CharacterLiteral', 'DecimalLiteral', 'FloatingPointLiteral', 'HexLiteral', 'OctalLiteral', 'StringLiteral', Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=29), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=36), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=40), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=41), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=44), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=45), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=53), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=70), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=79), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=80), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=82), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=97), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=98), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=108), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=111), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=115), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=118), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=126)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt137, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], 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=""), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=137), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), 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=NoViableAltException, sub_type=None)), name=nvae)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NoViableAltException, sub_type=None)), ThrowStatement(expression=MemberReference(member=nvae, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])], expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), label=None), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt136)], 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=LA136_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA136_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=58), operator===), operandr=BinaryOperation(operandl=MemberReference(member=LA136_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=83), operator===), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt136, 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=[MemberReference(member=FOLLOW_variableModifier_in_forInit4596, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=variableModifier12, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=variableModifier, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), 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)), 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=MethodInvocation(arguments=[], member=peek, postfix_operators=[], prefix_operators=[], qualifier=VarDecl_stack, selectors=[MemberReference(member=descr, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[BinaryOperation(operandl=Cast(expression=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=variableModifier12, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=variableModifier12, selectors=[])), type=ReferenceType(arguments=None, dimensions=[], name=CommonToken, sub_type=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=updateStart, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=peek, postfix_operators=[], prefix_operators=[], qualifier=VarDecl_stack, selectors=[MemberReference(member=descr, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=variableModifier12, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=MethodInvocation(arguments=[MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=variableModifier12, selectors=[]), MemberReference(member=stop, postfix_operators=[], prefix_operators=[], qualifier=variableModifier12, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None))], member=addModifier, 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=loop136, label=None)])], expression=MemberReference(member=alt136, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=loop136), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_type_in_forInit4631, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=type13, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), 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)), 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=MethodInvocation(arguments=[], member=peek, postfix_operators=[], prefix_operators=[], qualifier=VarDecl_stack, selectors=[MemberReference(member=descr, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[BinaryOperation(operandl=Cast(expression=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=type13, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=type13, selectors=[])), type=ReferenceType(arguments=None, dimensions=[], name=CommonToken, sub_type=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=updateStart, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=peek, postfix_operators=[], prefix_operators=[], qualifier=VarDecl_stack, selectors=[MemberReference(member=descr, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=type13, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=MethodInvocation(arguments=[MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=type13, selectors=[]), MemberReference(member=stop, postfix_operators=[], prefix_operators=[], qualifier=type13, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None))], member=setType, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=peek, postfix_operators=[], prefix_operators=[], qualifier=VarDecl_stack, selectors=[MemberReference(member=descr, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Cast(expression=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=type13, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=MemberReference(member=stop, postfix_operators=[], prefix_operators=[], qualifier=type13, selectors=[])), type=ReferenceType(arguments=None, dimensions=[], name=CommonToken, sub_type=None))], member=setEnd, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_variableDeclarators_in_forInit4651, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=variableDeclarators, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), 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=FOLLOW_expressionList_in_forInit4659, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=expressionList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), 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=alt137, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=reportError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=[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=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=101), MemberReference(member=forInit_StartIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=memoize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[forInit] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { Keyword[int] identifier[forInit_StartIndex] operator[=] identifier[input] operator[SEP] identifier[index] operator[SEP] operator[SEP] operator[SEP] identifier[ParserRuleReturnScope] identifier[variableModifier12] operator[=] Other[null] operator[SEP] identifier[ParserRuleReturnScope] identifier[type13] operator[=] Other[null] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[>] Other[0] operator[&&] identifier[alreadyParsedRule] operator[SEP] identifier[input] , Other[101] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } Keyword[int] identifier[alt137] operator[=] Other[2] operator[SEP] Keyword[switch] operator[SEP] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] { Keyword[case] Other[58] operator[:] Keyword[case] Other[83] operator[:] { identifier[alt137] operator[=] Other[1] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[Identifier] operator[:] { Keyword[switch] operator[SEP] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[2] operator[SEP] operator[SEP] { Keyword[case] Other[53] operator[:] { Keyword[int] identifier[LA137_26] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred198_Java] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[alt137] operator[=] Other[1] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[SEP] literal[boolean] operator[SEP] operator[SEP] { identifier[alt137] operator[=] Other[2] operator[SEP] } } Keyword[break] operator[SEP] Keyword[case] Other[47] operator[:] { Keyword[int] identifier[LA137_27] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred198_Java] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[alt137] operator[=] Other[1] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[SEP] literal[boolean] operator[SEP] operator[SEP] { identifier[alt137] operator[=] Other[2] operator[SEP] } } Keyword[break] operator[SEP] Keyword[case] Other[59] operator[:] { Keyword[int] identifier[LA137_28] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred198_Java] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[alt137] operator[=] Other[1] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[SEP] literal[boolean] operator[SEP] operator[SEP] { identifier[alt137] operator[=] Other[2] operator[SEP] } } Keyword[break] operator[SEP] Keyword[case] identifier[Identifier] operator[:] { identifier[alt137] operator[=] Other[1] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[EOF] operator[:] Keyword[case] Other[30] operator[:] Keyword[case] Other[31] operator[:] Keyword[case] Other[32] operator[:] Keyword[case] Other[33] operator[:] Keyword[case] Other[34] operator[:] Keyword[case] Other[35] operator[:] Keyword[case] Other[36] operator[:] Keyword[case] Other[38] operator[:] Keyword[case] Other[39] operator[:] Keyword[case] Other[40] operator[:] Keyword[case] Other[41] operator[:] Keyword[case] Other[42] operator[:] Keyword[case] Other[43] operator[:] Keyword[case] Other[44] operator[:] Keyword[case] Other[45] operator[:] Keyword[case] Other[46] operator[:] Keyword[case] Other[49] operator[:] Keyword[case] Other[50] operator[:] Keyword[case] Other[52] operator[:] Keyword[case] Other[54] operator[:] Keyword[case] Other[55] operator[:] Keyword[case] Other[56] operator[:] Keyword[case] Other[57] operator[:] Keyword[case] Other[61] operator[:] Keyword[case] Other[62] operator[:] Keyword[case] Other[91] operator[:] Keyword[case] Other[122] operator[:] Keyword[case] Other[123] operator[:] Keyword[case] Other[124] operator[:] { identifier[alt137] operator[=] Other[2] operator[SEP] } Keyword[break] operator[SEP] Keyword[default] operator[:] 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] } Keyword[int] identifier[nvaeMark] operator[=] identifier[input] operator[SEP] identifier[mark] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[input] operator[SEP] identifier[consume] operator[SEP] operator[SEP] operator[SEP] identifier[NoViableAltException] identifier[nvae] operator[=] Keyword[new] identifier[NoViableAltException] operator[SEP] literal[String] , Other[137] , Other[3] , identifier[input] operator[SEP] operator[SEP] Keyword[throw] identifier[nvae] operator[SEP] } Keyword[finally] { identifier[input] operator[SEP] identifier[rewind] operator[SEP] identifier[nvaeMark] operator[SEP] operator[SEP] } } } Keyword[break] operator[SEP] Keyword[case] Other[65] operator[:] Keyword[case] Other[67] operator[:] Keyword[case] Other[71] operator[:] Keyword[case] Other[77] operator[:] Keyword[case] Other[85] operator[:] Keyword[case] Other[92] operator[:] Keyword[case] Other[94] operator[:] Keyword[case] Other[105] operator[:] { Keyword[switch] operator[SEP] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[2] operator[SEP] operator[SEP] { Keyword[case] Other[59] operator[:] { Keyword[int] identifier[LA137_55] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred198_Java] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[alt137] operator[=] Other[1] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[SEP] literal[boolean] operator[SEP] operator[SEP] { identifier[alt137] operator[=] Other[2] operator[SEP] } } Keyword[break] operator[SEP] Keyword[case] identifier[Identifier] operator[:] { identifier[alt137] operator[=] Other[1] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[47] operator[:] { identifier[alt137] operator[=] Other[2] operator[SEP] } Keyword[break] operator[SEP] Keyword[default] operator[:] 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] } Keyword[int] identifier[nvaeMark] operator[=] identifier[input] operator[SEP] identifier[mark] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[input] operator[SEP] identifier[consume] operator[SEP] operator[SEP] operator[SEP] identifier[NoViableAltException] identifier[nvae] operator[=] Keyword[new] identifier[NoViableAltException] operator[SEP] literal[String] , Other[137] , Other[4] , identifier[input] operator[SEP] operator[SEP] Keyword[throw] identifier[nvae] operator[SEP] } Keyword[finally] { identifier[input] operator[SEP] identifier[rewind] operator[SEP] identifier[nvaeMark] operator[SEP] operator[SEP] } } } Keyword[break] operator[SEP] Keyword[case] identifier[CharacterLiteral] operator[:] Keyword[case] identifier[DecimalLiteral] operator[:] Keyword[case] identifier[FloatingPointLiteral] operator[:] Keyword[case] identifier[HexLiteral] operator[:] Keyword[case] identifier[OctalLiteral] operator[:] Keyword[case] identifier[StringLiteral] operator[:] Keyword[case] Other[29] operator[:] Keyword[case] Other[36] operator[:] Keyword[case] Other[40] operator[:] Keyword[case] Other[41] operator[:] Keyword[case] Other[44] operator[:] Keyword[case] Other[45] operator[:] Keyword[case] Other[53] operator[:] Keyword[case] Other[70] operator[:] Keyword[case] Other[79] operator[:] Keyword[case] Other[80] operator[:] Keyword[case] Other[82] operator[:] Keyword[case] Other[97] operator[:] Keyword[case] Other[98] operator[:] Keyword[case] Other[108] operator[:] Keyword[case] Other[111] operator[:] Keyword[case] Other[115] operator[:] Keyword[case] Other[118] operator[:] Keyword[case] Other[126] operator[:] { identifier[alt137] operator[=] Other[2] operator[SEP] } Keyword[break] operator[SEP] Keyword[default] operator[:] 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[NoViableAltException] identifier[nvae] operator[=] Keyword[new] identifier[NoViableAltException] operator[SEP] literal[String] , Other[137] , Other[0] , identifier[input] operator[SEP] operator[SEP] Keyword[throw] identifier[nvae] operator[SEP] } Keyword[switch] operator[SEP] identifier[alt137] operator[SEP] { Keyword[case] Other[1] operator[:] { identifier[loop136] operator[:] Keyword[while] operator[SEP] literal[boolean] operator[SEP] { Keyword[int] identifier[alt136] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA136_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA136_0] operator[==] Other[58] operator[||] identifier[LA136_0] operator[==] Other[83] operator[SEP] operator[SEP] { identifier[alt136] operator[=] Other[1] operator[SEP] } Keyword[switch] operator[SEP] identifier[alt136] operator[SEP] { Keyword[case] Other[1] operator[:] { identifier[pushFollow] operator[SEP] identifier[FOLLOW_variableModifier_in_forInit4596] operator[SEP] operator[SEP] identifier[variableModifier12] operator[=] identifier[variableModifier] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[VarDecl_stack] operator[SEP] identifier[peek] operator[SEP] operator[SEP] operator[SEP] identifier[descr] operator[SEP] identifier[updateStart] operator[SEP] operator[SEP] operator[SEP] identifier[CommonToken] operator[SEP] operator[SEP] identifier[variableModifier12] operator[!=] Other[null] operator[?] operator[SEP] identifier[variableModifier12] operator[SEP] identifier[start] operator[SEP] operator[:] Other[null] operator[SEP] operator[SEP] operator[SEP] identifier[getStartIndex] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] identifier[VarDecl_stack] operator[SEP] identifier[peek] operator[SEP] operator[SEP] operator[SEP] identifier[descr] operator[SEP] identifier[addModifier] operator[SEP] operator[SEP] identifier[variableModifier12] operator[!=] Other[null] operator[?] identifier[input] operator[SEP] identifier[toString] operator[SEP] identifier[variableModifier12] operator[SEP] identifier[start] , identifier[variableModifier12] operator[SEP] identifier[stop] operator[SEP] operator[:] Other[null] operator[SEP] operator[SEP] operator[SEP] } } Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[break] identifier[loop136] operator[SEP] } } identifier[pushFollow] operator[SEP] identifier[FOLLOW_type_in_forInit4631] operator[SEP] operator[SEP] identifier[type13] operator[=] identifier[type] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[VarDecl_stack] operator[SEP] identifier[peek] operator[SEP] operator[SEP] operator[SEP] identifier[descr] operator[SEP] identifier[updateStart] operator[SEP] operator[SEP] operator[SEP] identifier[CommonToken] operator[SEP] operator[SEP] identifier[type13] operator[!=] Other[null] operator[?] operator[SEP] identifier[type13] operator[SEP] identifier[start] operator[SEP] operator[:] Other[null] operator[SEP] operator[SEP] operator[SEP] identifier[getStartIndex] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] identifier[VarDecl_stack] operator[SEP] identifier[peek] operator[SEP] operator[SEP] operator[SEP] identifier[descr] operator[SEP] identifier[setType] operator[SEP] operator[SEP] identifier[type13] operator[!=] Other[null] operator[?] identifier[input] operator[SEP] identifier[toString] operator[SEP] identifier[type13] operator[SEP] identifier[start] , identifier[type13] operator[SEP] identifier[stop] operator[SEP] operator[:] Other[null] operator[SEP] operator[SEP] operator[SEP] identifier[VarDecl_stack] operator[SEP] identifier[peek] operator[SEP] operator[SEP] operator[SEP] identifier[descr] operator[SEP] identifier[setEnd] operator[SEP] operator[SEP] operator[SEP] identifier[CommonToken] operator[SEP] operator[SEP] identifier[type13] operator[!=] Other[null] operator[?] operator[SEP] identifier[type13] operator[SEP] identifier[stop] operator[SEP] operator[:] Other[null] operator[SEP] operator[SEP] operator[SEP] identifier[getStopIndex] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_variableDeclarators_in_forInit4651] operator[SEP] operator[SEP] identifier[variableDeclarators] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] 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[pushFollow] operator[SEP] identifier[FOLLOW_expressionList_in_forInit4659] operator[SEP] operator[SEP] identifier[expressionList] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] } } Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[re] operator[SEP] { identifier[reportError] operator[SEP] identifier[re] operator[SEP] operator[SEP] identifier[recover] operator[SEP] identifier[input] , identifier[re] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[>] Other[0] operator[SEP] { identifier[memoize] operator[SEP] identifier[input] , Other[101] , identifier[forInit_StartIndex] operator[SEP] operator[SEP] } } }
private static int decode4to3(byte[] src, int len, byte[] dest, int offset) { // Example: Dk or Dk== if (len == 2 || (src[2] == EQUALS_SIGN && src[3] == EQUALS_SIGN)) { int outBuff = (validate(src[0]) << 18) | (validate(src[1]) << 12); dest[offset] = (byte) (outBuff >>> 16); return 1; } // Example: DkL or DkL= if (len == 3 || src[3] == EQUALS_SIGN) { int outBuff = (validate(src[0]) << 18) | (validate(src[1]) << 12) | (validate(src[2]) << 6); dest[offset] = (byte) (outBuff >>> 16); dest[offset + 1] = (byte) (outBuff >>> 8); return 2; } // Example: DkLE int outBuff = (validate(src[0]) << 18) | (validate(src[1]) << 12) | (validate(src[2]) << 6) | (validate(src[3])); dest[offset] = (byte) (outBuff >>> 16); dest[offset + 1] = (byte) (outBuff >>> 8); dest[offset + 2] = (byte) (outBuff); return 3; }
class class_name[name] begin[{] method[decode4to3, return_type[type[int]], modifier[private static], parameter[src, len, dest, offset]] begin[{] if[binary_operation[binary_operation[member[.len], ==, literal[2]], ||, binary_operation[binary_operation[member[.src], ==, member[.EQUALS_SIGN]], &&, binary_operation[member[.src], ==, member[.EQUALS_SIGN]]]]] begin[{] local_variable[type[int], outBuff] assign[member[.dest], Cast(expression=BinaryOperation(operandl=MemberReference(member=outBuff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16), operator=>>>), type=BasicType(dimensions=[], name=byte))] return[literal[1]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.len], ==, literal[3]], ||, binary_operation[member[.src], ==, member[.EQUALS_SIGN]]]] begin[{] local_variable[type[int], outBuff] assign[member[.dest], Cast(expression=BinaryOperation(operandl=MemberReference(member=outBuff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16), operator=>>>), type=BasicType(dimensions=[], name=byte))] assign[member[.dest], Cast(expression=BinaryOperation(operandl=MemberReference(member=outBuff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=>>>), type=BasicType(dimensions=[], name=byte))] return[literal[2]] else begin[{] None end[}] local_variable[type[int], outBuff] assign[member[.dest], Cast(expression=BinaryOperation(operandl=MemberReference(member=outBuff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16), operator=>>>), type=BasicType(dimensions=[], name=byte))] assign[member[.dest], Cast(expression=BinaryOperation(operandl=MemberReference(member=outBuff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=>>>), type=BasicType(dimensions=[], name=byte))] assign[member[.dest], Cast(expression=MemberReference(member=outBuff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=byte))] return[literal[3]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[int] identifier[decode4to3] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[src] , Keyword[int] identifier[len] , Keyword[byte] operator[SEP] operator[SEP] identifier[dest] , Keyword[int] identifier[offset] operator[SEP] { Keyword[if] operator[SEP] identifier[len] operator[==] Other[2] operator[||] operator[SEP] identifier[src] operator[SEP] Other[2] operator[SEP] operator[==] identifier[EQUALS_SIGN] operator[&&] identifier[src] operator[SEP] Other[3] operator[SEP] operator[==] identifier[EQUALS_SIGN] operator[SEP] operator[SEP] { Keyword[int] identifier[outBuff] operator[=] operator[SEP] identifier[validate] operator[SEP] identifier[src] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[<<] Other[18] operator[SEP] operator[|] operator[SEP] identifier[validate] operator[SEP] identifier[src] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[<<] Other[12] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[offset] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[outBuff] operator[>] operator[>] operator[>] Other[16] operator[SEP] operator[SEP] Keyword[return] Other[1] operator[SEP] } Keyword[if] operator[SEP] identifier[len] operator[==] Other[3] operator[||] identifier[src] operator[SEP] Other[3] operator[SEP] operator[==] identifier[EQUALS_SIGN] operator[SEP] { Keyword[int] identifier[outBuff] operator[=] operator[SEP] identifier[validate] operator[SEP] identifier[src] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[<<] Other[18] operator[SEP] operator[|] operator[SEP] identifier[validate] operator[SEP] identifier[src] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[<<] Other[12] operator[SEP] operator[|] operator[SEP] identifier[validate] operator[SEP] identifier[src] operator[SEP] Other[2] operator[SEP] operator[SEP] operator[<<] Other[6] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[offset] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[outBuff] operator[>] operator[>] operator[>] Other[16] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[offset] operator[+] Other[1] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[outBuff] operator[>] operator[>] operator[>] Other[8] operator[SEP] operator[SEP] Keyword[return] Other[2] operator[SEP] } Keyword[int] identifier[outBuff] operator[=] operator[SEP] identifier[validate] operator[SEP] identifier[src] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[<<] Other[18] operator[SEP] operator[|] operator[SEP] identifier[validate] operator[SEP] identifier[src] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[<<] Other[12] operator[SEP] operator[|] operator[SEP] identifier[validate] operator[SEP] identifier[src] operator[SEP] Other[2] operator[SEP] operator[SEP] operator[<<] Other[6] operator[SEP] operator[|] operator[SEP] identifier[validate] operator[SEP] identifier[src] operator[SEP] Other[3] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[offset] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[outBuff] operator[>] operator[>] operator[>] Other[16] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[offset] operator[+] Other[1] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[outBuff] operator[>] operator[>] operator[>] Other[8] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[offset] operator[+] Other[2] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[outBuff] operator[SEP] operator[SEP] Keyword[return] Other[3] operator[SEP] }
public static ZooSchema schema(PersistenceManager pm) { DBTracer.logCall(ZooJdoHelper.class, pm); return ((PersistenceManagerImpl)pm).getSession().schema(); }
class class_name[name] begin[{] method[schema, return_type[type[ZooSchema]], modifier[public static], parameter[pm]] begin[{] call[DBTracer.logCall, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ZooJdoHelper, sub_type=None)), member[.pm]]] return[Cast(expression=MemberReference(member=pm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=PersistenceManagerImpl, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[ZooSchema] identifier[schema] operator[SEP] identifier[PersistenceManager] identifier[pm] operator[SEP] { identifier[DBTracer] operator[SEP] identifier[logCall] operator[SEP] identifier[ZooJdoHelper] operator[SEP] Keyword[class] , identifier[pm] operator[SEP] operator[SEP] Keyword[return] operator[SEP] operator[SEP] identifier[PersistenceManagerImpl] operator[SEP] identifier[pm] operator[SEP] operator[SEP] identifier[getSession] operator[SEP] operator[SEP] operator[SEP] identifier[schema] operator[SEP] operator[SEP] operator[SEP] }
public static Category of(String description, Setting... settings) { return new Category(description, Group.of(settings)); }
class class_name[name] begin[{] method[of, return_type[type[Category]], modifier[public static], parameter[description, settings]] begin[{] return[ClassCreator(arguments=[MemberReference(member=description, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=settings, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=of, postfix_operators=[], prefix_operators=[], qualifier=Group, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Category, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Category] identifier[of] operator[SEP] identifier[String] identifier[description] , identifier[Setting] operator[...] identifier[settings] operator[SEP] { Keyword[return] Keyword[new] identifier[Category] operator[SEP] identifier[description] , identifier[Group] operator[SEP] identifier[of] operator[SEP] identifier[settings] operator[SEP] operator[SEP] operator[SEP] }
@Override public com.liferay.commerce.model.CPDefinitionInventory createCPDefinitionInventory( long CPDefinitionInventoryId) { return _cpDefinitionInventoryLocalService.createCPDefinitionInventory(CPDefinitionInventoryId); }
class class_name[name] begin[{] method[createCPDefinitionInventory, return_type[type[com]], modifier[public], parameter[CPDefinitionInventoryId]] begin[{] return[call[_cpDefinitionInventoryLocalService.createCPDefinitionInventory, parameter[member[.CPDefinitionInventoryId]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[model] operator[SEP] identifier[CPDefinitionInventory] identifier[createCPDefinitionInventory] operator[SEP] Keyword[long] identifier[CPDefinitionInventoryId] operator[SEP] { Keyword[return] identifier[_cpDefinitionInventoryLocalService] operator[SEP] identifier[createCPDefinitionInventory] operator[SEP] identifier[CPDefinitionInventoryId] operator[SEP] operator[SEP] }
public static void setUtc(Date time) { setClock(Clock.fixed(time.toInstant(), ZoneId.of("UTC"))); }
class class_name[name] begin[{] method[setUtc, return_type[void], modifier[public static], parameter[time]] begin[{] call[.setClock, parameter[call[Clock.fixed, parameter[call[time.toInstant, parameter[]], call[ZoneId.of, parameter[literal["UTC"]]]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[setUtc] operator[SEP] identifier[Date] identifier[time] operator[SEP] { identifier[setClock] operator[SEP] identifier[Clock] operator[SEP] identifier[fixed] operator[SEP] identifier[time] operator[SEP] identifier[toInstant] operator[SEP] operator[SEP] , identifier[ZoneId] operator[SEP] identifier[of] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
protected void print(Object s) throws IOException { out.write(Convert.escapeUnicode(s.toString())); }
class class_name[name] begin[{] method[print, return_type[void], modifier[protected], parameter[s]] begin[{] call[out.write, parameter[call[Convert.escapeUnicode, parameter[call[s.toString, parameter[]]]]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[print] operator[SEP] identifier[Object] identifier[s] operator[SEP] Keyword[throws] identifier[IOException] { identifier[out] operator[SEP] identifier[write] operator[SEP] identifier[Convert] operator[SEP] identifier[escapeUnicode] operator[SEP] identifier[s] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static GeometryTypeInfo readGeometryType(ByteReader reader) { // Read the single byte order byte byte byteOrderValue = reader.readByte(); ByteOrder byteOrder = byteOrderValue == 0 ? ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN; reader.setByteOrder(byteOrder); // Read the geometry type unsigned integer long unsignedGeometryTypeCode = reader.readUnsignedInt(); // Check for 2.5D geometry types boolean hasZ = false; if (unsignedGeometryTypeCode > WKB25D) { hasZ = true; unsignedGeometryTypeCode -= WKB25D; } int geometryTypeCode = (int) unsignedGeometryTypeCode; // Determine the geometry type GeometryType geometryType = GeometryCodes .getGeometryType(geometryTypeCode); // Determine if the geometry has a z (3d) or m (linear referencing // system) value if (!hasZ) { hasZ = GeometryCodes.hasZ(geometryTypeCode); } boolean hasM = GeometryCodes.hasM(geometryTypeCode); GeometryTypeInfo geometryInfo = new GeometryTypeInfo(geometryTypeCode, geometryType, hasZ, hasM); return geometryInfo; }
class class_name[name] begin[{] method[readGeometryType, return_type[type[GeometryTypeInfo]], modifier[public static], parameter[reader]] begin[{] local_variable[type[byte], byteOrderValue] local_variable[type[ByteOrder], byteOrder] call[reader.setByteOrder, parameter[member[.byteOrder]]] local_variable[type[long], unsignedGeometryTypeCode] local_variable[type[boolean], hasZ] if[binary_operation[member[.unsignedGeometryTypeCode], >, member[.WKB25D]]] begin[{] assign[member[.hasZ], literal[true]] assign[member[.unsignedGeometryTypeCode], member[.WKB25D]] else begin[{] None end[}] local_variable[type[int], geometryTypeCode] local_variable[type[GeometryType], geometryType] if[member[.hasZ]] begin[{] assign[member[.hasZ], call[GeometryCodes.hasZ, parameter[member[.geometryTypeCode]]]] else begin[{] None end[}] local_variable[type[boolean], hasM] local_variable[type[GeometryTypeInfo], geometryInfo] return[member[.geometryInfo]] end[}] END[}]
Keyword[public] Keyword[static] identifier[GeometryTypeInfo] identifier[readGeometryType] operator[SEP] identifier[ByteReader] identifier[reader] operator[SEP] { Keyword[byte] identifier[byteOrderValue] operator[=] identifier[reader] operator[SEP] identifier[readByte] operator[SEP] operator[SEP] operator[SEP] identifier[ByteOrder] identifier[byteOrder] operator[=] identifier[byteOrderValue] operator[==] Other[0] operator[?] identifier[ByteOrder] operator[SEP] identifier[BIG_ENDIAN] operator[:] identifier[ByteOrder] operator[SEP] identifier[LITTLE_ENDIAN] operator[SEP] identifier[reader] operator[SEP] identifier[setByteOrder] operator[SEP] identifier[byteOrder] operator[SEP] operator[SEP] Keyword[long] identifier[unsignedGeometryTypeCode] operator[=] identifier[reader] operator[SEP] identifier[readUnsignedInt] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[hasZ] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[unsignedGeometryTypeCode] operator[>] identifier[WKB25D] operator[SEP] { identifier[hasZ] operator[=] literal[boolean] operator[SEP] identifier[unsignedGeometryTypeCode] operator[-=] identifier[WKB25D] operator[SEP] } Keyword[int] identifier[geometryTypeCode] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[unsignedGeometryTypeCode] operator[SEP] identifier[GeometryType] identifier[geometryType] operator[=] identifier[GeometryCodes] operator[SEP] identifier[getGeometryType] operator[SEP] identifier[geometryTypeCode] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[hasZ] operator[SEP] { identifier[hasZ] operator[=] identifier[GeometryCodes] operator[SEP] identifier[hasZ] operator[SEP] identifier[geometryTypeCode] operator[SEP] operator[SEP] } Keyword[boolean] identifier[hasM] operator[=] identifier[GeometryCodes] operator[SEP] identifier[hasM] operator[SEP] identifier[geometryTypeCode] operator[SEP] operator[SEP] identifier[GeometryTypeInfo] identifier[geometryInfo] operator[=] Keyword[new] identifier[GeometryTypeInfo] operator[SEP] identifier[geometryTypeCode] , identifier[geometryType] , identifier[hasZ] , identifier[hasM] operator[SEP] operator[SEP] Keyword[return] identifier[geometryInfo] operator[SEP] }
public Complex subtract(Complex c) { Complex ret = new Complex(real, imag); ret.mutableSubtract(c); return ret; }
class class_name[name] begin[{] method[subtract, return_type[type[Complex]], modifier[public], parameter[c]] begin[{] local_variable[type[Complex], ret] call[ret.mutableSubtract, parameter[member[.c]]] return[member[.ret]] end[}] END[}]
Keyword[public] identifier[Complex] identifier[subtract] operator[SEP] identifier[Complex] identifier[c] operator[SEP] { identifier[Complex] identifier[ret] operator[=] Keyword[new] identifier[Complex] operator[SEP] identifier[real] , identifier[imag] operator[SEP] operator[SEP] identifier[ret] operator[SEP] identifier[mutableSubtract] operator[SEP] identifier[c] operator[SEP] operator[SEP] Keyword[return] identifier[ret] operator[SEP] }
protected void checkAndAddListInjections(final BuildData buildData, final Document doc, final ITopicNode topicNode, final Map<String, TranslationDetails> translations) { final DocBookXMLPreProcessor preProcessor = buildData.getXMLPreProcessor(); final List<Integer> types = Arrays.asList(DocBookXMLPreProcessor.ORDEREDLIST_INJECTION_POINT, DocBookXMLPreProcessor.ITEMIZEDLIST_INJECTION_POINT, DocBookXMLPreProcessor.LIST_INJECTION_POINT); final HashMap<org.w3c.dom.Node, InjectionListData> customInjections = new HashMap<org.w3c.dom.Node, InjectionListData>(); preProcessor.collectInjectionData(buildData.getContentSpec(), topicNode, new ArrayList<String>(), doc, buildData.getBuildDatabase(), new ArrayList<String>(), customInjections, buildData.isUseFixedUrls(), types); // Now convert the custom injection points for (final org.w3c.dom.Node customInjectionCommentNode : customInjections.keySet()) { final InjectionListData injectionListData = customInjections.get(customInjectionCommentNode); /* * this may not be true if we are not building all related topics */ if (injectionListData.listItems.size() != 0) { for (final List<Element> elements : injectionListData.listItems) { final Element para = doc.createElement("para"); for (final Element element : elements) { para.appendChild(element); } final String translationString = XMLUtilities.convertNodeToString(para, false); translations.put(translationString, new TranslationDetails(translationString, false, "para")); } } } }
class class_name[name] begin[{] method[checkAndAddListInjections, return_type[void], modifier[protected], parameter[buildData, doc, topicNode, translations]] begin[{] local_variable[type[DocBookXMLPreProcessor], preProcessor] local_variable[type[List], types] local_variable[type[HashMap], customInjections] call[preProcessor.collectInjectionData, parameter[call[buildData.getContentSpec, parameter[]], member[.topicNode], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None)), member[.doc], call[buildData.getBuildDatabase, parameter[]], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None)), member[.customInjections], call[buildData.isUseFixedUrls, parameter[]], member[.types]]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=customInjectionCommentNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=customInjections, selectors=[], type_arguments=None), name=injectionListData)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=InjectionListData, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=injectionListData.listItems, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), 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=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="para")], member=createElement, postfix_operators=[], prefix_operators=[], qualifier=doc, selectors=[], type_arguments=None), name=para)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=element, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=appendChild, postfix_operators=[], prefix_operators=[], qualifier=para, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=elements, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=element)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None))), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=para, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=convertNodeToString, postfix_operators=[], prefix_operators=[], qualifier=XMLUtilities, selectors=[], type_arguments=None), name=translationString)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=translationString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MemberReference(member=translationString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="para")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TranslationDetails, sub_type=None))], member=put, postfix_operators=[], prefix_operators=[], qualifier=translations, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=listItems, postfix_operators=[], prefix_operators=[], qualifier=injectionListData, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=elements)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None))], dimensions=[], name=List, sub_type=None))), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=customInjections, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=customInjectionCommentNode)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=org, sub_type=ReferenceType(arguments=None, dimensions=None, name=w3c, sub_type=ReferenceType(arguments=None, dimensions=None, name=dom, sub_type=ReferenceType(arguments=None, dimensions=None, name=Node, sub_type=None)))))), label=None) end[}] END[}]
Keyword[protected] Keyword[void] identifier[checkAndAddListInjections] operator[SEP] Keyword[final] identifier[BuildData] identifier[buildData] , Keyword[final] identifier[Document] identifier[doc] , Keyword[final] identifier[ITopicNode] identifier[topicNode] , Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[TranslationDetails] operator[>] identifier[translations] operator[SEP] { Keyword[final] identifier[DocBookXMLPreProcessor] identifier[preProcessor] operator[=] identifier[buildData] operator[SEP] identifier[getXMLPreProcessor] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[Integer] operator[>] identifier[types] operator[=] identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[DocBookXMLPreProcessor] operator[SEP] identifier[ORDEREDLIST_INJECTION_POINT] , identifier[DocBookXMLPreProcessor] operator[SEP] identifier[ITEMIZEDLIST_INJECTION_POINT] , identifier[DocBookXMLPreProcessor] operator[SEP] identifier[LIST_INJECTION_POINT] operator[SEP] operator[SEP] Keyword[final] identifier[HashMap] operator[<] identifier[org] operator[SEP] identifier[w3c] operator[SEP] identifier[dom] operator[SEP] identifier[Node] , identifier[InjectionListData] operator[>] identifier[customInjections] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[org] operator[SEP] identifier[w3c] operator[SEP] identifier[dom] operator[SEP] identifier[Node] , identifier[InjectionListData] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[preProcessor] operator[SEP] identifier[collectInjectionData] operator[SEP] identifier[buildData] operator[SEP] identifier[getContentSpec] operator[SEP] operator[SEP] , identifier[topicNode] , Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] , identifier[doc] , identifier[buildData] operator[SEP] identifier[getBuildDatabase] operator[SEP] operator[SEP] , Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] , identifier[customInjections] , identifier[buildData] operator[SEP] identifier[isUseFixedUrls] operator[SEP] operator[SEP] , identifier[types] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[org] operator[SEP] identifier[w3c] operator[SEP] identifier[dom] operator[SEP] identifier[Node] identifier[customInjectionCommentNode] operator[:] identifier[customInjections] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[InjectionListData] identifier[injectionListData] operator[=] identifier[customInjections] operator[SEP] identifier[get] operator[SEP] identifier[customInjectionCommentNode] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[injectionListData] operator[SEP] identifier[listItems] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[!=] Other[0] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[Element] operator[>] identifier[elements] operator[:] identifier[injectionListData] operator[SEP] identifier[listItems] operator[SEP] { Keyword[final] identifier[Element] identifier[para] operator[=] identifier[doc] operator[SEP] identifier[createElement] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[Element] identifier[element] operator[:] identifier[elements] operator[SEP] { identifier[para] operator[SEP] identifier[appendChild] operator[SEP] identifier[element] operator[SEP] operator[SEP] } Keyword[final] identifier[String] identifier[translationString] operator[=] identifier[XMLUtilities] operator[SEP] identifier[convertNodeToString] operator[SEP] identifier[para] , literal[boolean] operator[SEP] operator[SEP] identifier[translations] operator[SEP] identifier[put] operator[SEP] identifier[translationString] , Keyword[new] identifier[TranslationDetails] operator[SEP] identifier[translationString] , literal[boolean] , literal[String] operator[SEP] operator[SEP] operator[SEP] } } } }
public static <T extends MethodDescription> ElementMatcher.Junction<T> isOverriddenFrom(ElementMatcher<? super TypeDescription> matcher) { return isOverriddenFromGeneric(erasure(matcher)); }
class class_name[name] begin[{] method[isOverriddenFrom, return_type[type[ElementMatcher]], modifier[public static], parameter[matcher]] begin[{] return[call[.isOverriddenFromGeneric, parameter[call[.erasure, parameter[member[.matcher]]]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[MethodDescription] operator[>] identifier[ElementMatcher] operator[SEP] identifier[Junction] operator[<] identifier[T] operator[>] identifier[isOverriddenFrom] operator[SEP] identifier[ElementMatcher] operator[<] operator[?] Keyword[super] identifier[TypeDescription] operator[>] identifier[matcher] operator[SEP] { Keyword[return] identifier[isOverriddenFromGeneric] operator[SEP] identifier[erasure] operator[SEP] identifier[matcher] operator[SEP] operator[SEP] operator[SEP] }
public static Vector getBitDouble(int[] data, int offset) throws Exception { Vector v = new Vector(); int type = ((Integer)getBits(data, 2, offset)).intValue(); int read = 2; double val = 0.0; if (type==0x00) { byte[] bytes = (byte[])getBits(data, 64, (offset+2)); ByteBuffer bb = ByteBuffer.wrap(bytes); bb.order(ByteOrder.LITTLE_ENDIAN); val = bb.getDouble(); read = 66; } else if (type==0x01) { val = 1.0; } else if (type==0x02) { val = 0.0; } else { System.out.println("Bad type at bit offset: " + offset); } v.add(new Integer(offset+read)); v.add(new Double(val)); return v; }
class class_name[name] begin[{] method[getBitDouble, return_type[type[Vector]], modifier[public static], parameter[data, offset]] begin[{] local_variable[type[Vector], v] local_variable[type[int], type] local_variable[type[int], read] local_variable[type[double], val] if[binary_operation[member[.type], ==, literal[0x00]]] begin[{] local_variable[type[byte], bytes] local_variable[type[ByteBuffer], bb] call[bb.order, parameter[member[ByteOrder.LITTLE_ENDIAN]]] assign[member[.val], call[bb.getDouble, parameter[]]] assign[member[.read], literal[66]] else begin[{] if[binary_operation[member[.type], ==, literal[0x01]]] begin[{] assign[member[.val], literal[1.0]] else begin[{] if[binary_operation[member[.type], ==, literal[0x02]]] begin[{] assign[member[.val], literal[0.0]] else begin[{] call[System.out.println, parameter[binary_operation[literal["Bad type at bit offset: "], +, member[.offset]]]] end[}] end[}] end[}] call[v.add, parameter[ClassCreator(arguments=[BinaryOperation(operandl=MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Integer, sub_type=None))]] call[v.add, parameter[ClassCreator(arguments=[MemberReference(member=val, 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=Double, sub_type=None))]] return[member[.v]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Vector] identifier[getBitDouble] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[data] , Keyword[int] identifier[offset] operator[SEP] Keyword[throws] identifier[Exception] { identifier[Vector] identifier[v] operator[=] Keyword[new] identifier[Vector] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[type] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[getBits] operator[SEP] identifier[data] , Other[2] , identifier[offset] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[read] operator[=] Other[2] operator[SEP] Keyword[double] identifier[val] operator[=] literal[Float] operator[SEP] Keyword[if] operator[SEP] identifier[type] operator[==] literal[Integer] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] identifier[getBits] operator[SEP] identifier[data] , Other[64] , operator[SEP] identifier[offset] operator[+] Other[2] operator[SEP] operator[SEP] operator[SEP] identifier[ByteBuffer] identifier[bb] operator[=] identifier[ByteBuffer] operator[SEP] identifier[wrap] operator[SEP] identifier[bytes] operator[SEP] operator[SEP] identifier[bb] operator[SEP] identifier[order] operator[SEP] identifier[ByteOrder] operator[SEP] identifier[LITTLE_ENDIAN] operator[SEP] operator[SEP] identifier[val] operator[=] identifier[bb] operator[SEP] identifier[getDouble] operator[SEP] operator[SEP] operator[SEP] identifier[read] operator[=] Other[66] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[type] operator[==] literal[Integer] operator[SEP] { identifier[val] operator[=] literal[Float] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[type] operator[==] literal[Integer] operator[SEP] { identifier[val] operator[=] literal[Float] operator[SEP] } Keyword[else] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[offset] operator[SEP] operator[SEP] } identifier[v] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Integer] operator[SEP] identifier[offset] operator[+] identifier[read] operator[SEP] operator[SEP] operator[SEP] identifier[v] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Double] operator[SEP] identifier[val] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[v] operator[SEP] }
protected HealthResult getHealthResult() { HealthResult.Builder builder = HealthResult.builder(getName()); try { builder.details(getHealthInformation()); builder.status(this.healthStatus); } catch (Exception e) { builder.status(HealthStatus.DOWN); builder.exception(e); } return builder.build(); }
class class_name[name] begin[{] method[getHealthResult, return_type[type[HealthResult]], modifier[protected], parameter[]] begin[{] local_variable[type[HealthResult], builder] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getHealthInformation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=details, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=healthStatus, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], member=status, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=DOWN, postfix_operators=[], prefix_operators=[], qualifier=HealthStatus, selectors=[])], member=status, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=exception, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) return[call[builder.build, parameter[]]] end[}] END[}]
Keyword[protected] identifier[HealthResult] identifier[getHealthResult] operator[SEP] operator[SEP] { identifier[HealthResult] operator[SEP] identifier[Builder] identifier[builder] operator[=] identifier[HealthResult] operator[SEP] identifier[builder] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[builder] operator[SEP] identifier[details] operator[SEP] identifier[getHealthInformation] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[status] operator[SEP] Keyword[this] operator[SEP] identifier[healthStatus] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[builder] operator[SEP] identifier[status] operator[SEP] identifier[HealthStatus] operator[SEP] identifier[DOWN] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[exception] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[return] identifier[builder] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] }
@Override public Object getObjectInstance(JavaColonNamespace namespace, String name) throws NamingException { // Get the ComponentMetaData for the currently active component. // There is no comp namespace if there is no active component. ComponentMetaData cmd = ComponentMetaDataAccessorImpl.getComponentMetaDataAccessor().getComponentMetaData(); if (cmd == null) { return null; } if (JavaColonNamespace.COMP_WS.equals(namespace) && EXTENDED_JTA_TRANSACTION.equals(name)) { return ExtendedJTATransactionFactory.createExtendedJTATransaction(); } return null; }
class class_name[name] begin[{] method[getObjectInstance, return_type[type[Object]], modifier[public], parameter[namespace, name]] begin[{] local_variable[type[ComponentMetaData], cmd] if[binary_operation[member[.cmd], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] if[binary_operation[call[JavaColonNamespace.COMP_WS.equals, parameter[member[.namespace]]], &&, call[EXTENDED_JTA_TRANSACTION.equals, parameter[member[.name]]]]] begin[{] return[call[ExtendedJTATransactionFactory.createExtendedJTATransaction, parameter[]]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[getObjectInstance] operator[SEP] identifier[JavaColonNamespace] identifier[namespace] , identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[NamingException] { identifier[ComponentMetaData] identifier[cmd] operator[=] identifier[ComponentMetaDataAccessorImpl] operator[SEP] identifier[getComponentMetaDataAccessor] operator[SEP] operator[SEP] operator[SEP] identifier[getComponentMetaData] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cmd] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[JavaColonNamespace] operator[SEP] identifier[COMP_WS] operator[SEP] identifier[equals] operator[SEP] identifier[namespace] operator[SEP] operator[&&] identifier[EXTENDED_JTA_TRANSACTION] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] operator[SEP] { Keyword[return] identifier[ExtendedJTATransactionFactory] operator[SEP] identifier[createExtendedJTATransaction] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public Observable<TopicSharedAccessKeysInner> regenerateKeyAsync(String resourceGroupName, String topicName, String keyName) { return regenerateKeyWithServiceResponseAsync(resourceGroupName, topicName, keyName).map(new Func1<ServiceResponse<TopicSharedAccessKeysInner>, TopicSharedAccessKeysInner>() { @Override public TopicSharedAccessKeysInner call(ServiceResponse<TopicSharedAccessKeysInner> response) { return response.body(); } }); }
class class_name[name] begin[{] method[regenerateKeyAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, topicName, keyName]] begin[{] return[call[.regenerateKeyWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.topicName], member[.keyName]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[TopicSharedAccessKeysInner] operator[>] identifier[regenerateKeyAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[topicName] , identifier[String] identifier[keyName] operator[SEP] { Keyword[return] identifier[regenerateKeyWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[topicName] , identifier[keyName] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[TopicSharedAccessKeysInner] operator[>] , identifier[TopicSharedAccessKeysInner] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[TopicSharedAccessKeysInner] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[TopicSharedAccessKeysInner] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public static String dateToStr(Date date, String format) { return new SimpleDateFormat(format).format(date); }
class class_name[name] begin[{] method[dateToStr, return_type[type[String]], modifier[public static], parameter[date, format]] begin[{] return[ClassCreator(arguments=[MemberReference(member=format, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=date, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=SimpleDateFormat, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[dateToStr] operator[SEP] identifier[Date] identifier[date] , identifier[String] identifier[format] operator[SEP] { Keyword[return] Keyword[new] identifier[SimpleDateFormat] operator[SEP] identifier[format] operator[SEP] operator[SEP] identifier[format] operator[SEP] identifier[date] operator[SEP] operator[SEP] }
public void setRaidArrayIds(java.util.Collection<String> raidArrayIds) { if (raidArrayIds == null) { this.raidArrayIds = null; return; } this.raidArrayIds = new com.amazonaws.internal.SdkInternalList<String>(raidArrayIds); }
class class_name[name] begin[{] method[setRaidArrayIds, return_type[void], modifier[public], parameter[raidArrayIds]] begin[{] if[binary_operation[member[.raidArrayIds], ==, literal[null]]] begin[{] assign[THIS[member[None.raidArrayIds]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.raidArrayIds]], ClassCreator(arguments=[MemberReference(member=raidArrayIds, 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=String, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setRaidArrayIds] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[raidArrayIds] operator[SEP] { Keyword[if] operator[SEP] identifier[raidArrayIds] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[raidArrayIds] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[raidArrayIds] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[String] operator[>] operator[SEP] identifier[raidArrayIds] operator[SEP] operator[SEP] }
@Override public UpdateUploadResult updateUpload(UpdateUploadRequest request) { request = beforeClientExecution(request); return executeUpdateUpload(request); }
class class_name[name] begin[{] method[updateUpload, return_type[type[UpdateUploadResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeUpdateUpload, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[UpdateUploadResult] identifier[updateUpload] operator[SEP] identifier[UpdateUploadRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeUpdateUpload] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
@Override public void emitted(Map<String, Object>log) { if (socket == null) return; ByteArrayOutputStream messageBuffer = new ByteArrayOutputStream(1024); Writer messageWriter = null; try { messageWriter = new OutputStreamWriter(messageBuffer, "utf-8"); JsonWriter jsonWriter = new JsonWriter(messageWriter); jsonWriter.write(log); messageWriter.write("\n"); } catch (IOException e) { throw new InternalSpockError(e); } finally { IoUtil.closeQuietly(messageWriter); } ByteArrayOutputStream sizeBuffer = new ByteArrayOutputStream(); Writer sizeWriter = null; try { sizeWriter = new OutputStreamWriter(sizeBuffer, "utf-8"); sizeWriter.write(String.valueOf(messageBuffer.size())); sizeWriter.write("\n"); } catch (IOException e) { throw new InternalSpockError(e); } finally { IoUtil.closeQuietly(sizeWriter); } try { socket.getOutputStream().write(sizeBuffer.toByteArray()); socket.getOutputStream().write(messageBuffer.toByteArray()); socket.getOutputStream().flush(); } catch (Exception e) { IoUtil.closeQuietly(socket); socket = null; throw new ExtensionException("Error sending data to report server. " + "Server address: $reportServerAddress Server port: $reportServerPort", e); } }
class class_name[name] begin[{] method[emitted, return_type[void], modifier[public], parameter[log]] begin[{] if[binary_operation[member[.socket], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[ByteArrayOutputStream], messageBuffer] local_variable[type[Writer], messageWriter] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=messageWriter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=messageBuffer, 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=OutputStreamWriter, sub_type=None))), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=messageWriter, 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=JsonWriter, sub_type=None)), name=jsonWriter)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JsonWriter, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=log, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=jsonWriter, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n")], member=write, postfix_operators=[], prefix_operators=[], qualifier=messageWriter, selectors=[], type_arguments=None), 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=InternalSpockError, 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=messageWriter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=closeQuietly, postfix_operators=[], prefix_operators=[], qualifier=IoUtil, selectors=[], type_arguments=None), label=None)], label=None, resources=None) local_variable[type[ByteArrayOutputStream], sizeBuffer] local_variable[type[Writer], sizeWriter] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=sizeWriter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=sizeBuffer, 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=OutputStreamWriter, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=messageBuffer, selectors=[], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], member=write, postfix_operators=[], prefix_operators=[], qualifier=sizeWriter, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n")], member=write, postfix_operators=[], prefix_operators=[], qualifier=sizeWriter, selectors=[], type_arguments=None), 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=InternalSpockError, 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=sizeWriter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=closeQuietly, postfix_operators=[], prefix_operators=[], qualifier=IoUtil, selectors=[], type_arguments=None), label=None)], label=None, resources=None) TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=getOutputStream, postfix_operators=[], prefix_operators=[], qualifier=socket, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toByteArray, postfix_operators=[], prefix_operators=[], qualifier=sizeBuffer, selectors=[], type_arguments=None)], member=write, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getOutputStream, postfix_operators=[], prefix_operators=[], qualifier=socket, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toByteArray, postfix_operators=[], prefix_operators=[], qualifier=messageBuffer, selectors=[], type_arguments=None)], member=write, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getOutputStream, postfix_operators=[], prefix_operators=[], qualifier=socket, selectors=[MethodInvocation(arguments=[], member=flush, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=socket, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=closeQuietly, postfix_operators=[], prefix_operators=[], qualifier=IoUtil, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=socket, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error sending data to report server. "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Server address: $reportServerAddress Server port: $reportServerPort"), 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=ExtensionException, 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[emitted] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[log] operator[SEP] { Keyword[if] operator[SEP] identifier[socket] operator[==] Other[null] operator[SEP] Keyword[return] operator[SEP] identifier[ByteArrayOutputStream] identifier[messageBuffer] operator[=] Keyword[new] identifier[ByteArrayOutputStream] operator[SEP] Other[1024] operator[SEP] operator[SEP] identifier[Writer] identifier[messageWriter] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[messageWriter] operator[=] Keyword[new] identifier[OutputStreamWriter] operator[SEP] identifier[messageBuffer] , literal[String] operator[SEP] operator[SEP] identifier[JsonWriter] identifier[jsonWriter] operator[=] Keyword[new] identifier[JsonWriter] operator[SEP] identifier[messageWriter] operator[SEP] operator[SEP] identifier[jsonWriter] operator[SEP] identifier[write] operator[SEP] identifier[log] operator[SEP] operator[SEP] identifier[messageWriter] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[InternalSpockError] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[finally] { identifier[IoUtil] operator[SEP] identifier[closeQuietly] operator[SEP] identifier[messageWriter] operator[SEP] operator[SEP] } identifier[ByteArrayOutputStream] identifier[sizeBuffer] operator[=] Keyword[new] identifier[ByteArrayOutputStream] operator[SEP] operator[SEP] operator[SEP] identifier[Writer] identifier[sizeWriter] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[sizeWriter] operator[=] Keyword[new] identifier[OutputStreamWriter] operator[SEP] identifier[sizeBuffer] , literal[String] operator[SEP] operator[SEP] identifier[sizeWriter] operator[SEP] identifier[write] operator[SEP] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[messageBuffer] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[sizeWriter] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[InternalSpockError] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[finally] { identifier[IoUtil] operator[SEP] identifier[closeQuietly] operator[SEP] identifier[sizeWriter] operator[SEP] operator[SEP] } Keyword[try] { identifier[socket] operator[SEP] identifier[getOutputStream] operator[SEP] operator[SEP] operator[SEP] identifier[write] operator[SEP] identifier[sizeBuffer] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[socket] operator[SEP] identifier[getOutputStream] operator[SEP] operator[SEP] operator[SEP] identifier[write] operator[SEP] identifier[messageBuffer] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[socket] operator[SEP] identifier[getOutputStream] operator[SEP] operator[SEP] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[IoUtil] operator[SEP] identifier[closeQuietly] operator[SEP] identifier[socket] operator[SEP] operator[SEP] identifier[socket] operator[=] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[ExtensionException] operator[SEP] literal[String] operator[+] literal[String] , identifier[e] operator[SEP] operator[SEP] } }
public boolean startup(String[] args) { if (args != null && args.length > 0 && args[0].equals("stop")) { shutdownHook.run(); return false; } // Do not call addShutdownHook inside Apache Commons Daemon Service Runner if (new Throwable().getStackTrace().length == 2) { Runtime.getRuntime().addShutdownHook(shutdownHook); } return true; }
class class_name[name] begin[{] method[startup, return_type[type[boolean]], modifier[public], parameter[args]] begin[{] if[binary_operation[binary_operation[binary_operation[member[.args], !=, literal[null]], &&, binary_operation[member[args.length], >, literal[0]]], &&, member[.args]]] begin[{] call[shutdownHook.run, parameter[]] return[literal[false]] else begin[{] None end[}] if[binary_operation[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getStackTrace, 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=ReferenceType(arguments=None, dimensions=None, name=Throwable, sub_type=None)), ==, literal[2]]] begin[{] call[Runtime.getRuntime, parameter[]] else begin[{] None end[}] return[literal[true]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[startup] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] { Keyword[if] operator[SEP] identifier[args] operator[!=] Other[null] operator[&&] identifier[args] operator[SEP] identifier[length] operator[>] Other[0] operator[&&] identifier[args] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[shutdownHook] operator[SEP] identifier[run] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] Keyword[new] identifier[Throwable] operator[SEP] operator[SEP] operator[SEP] identifier[getStackTrace] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[==] Other[2] operator[SEP] { identifier[Runtime] operator[SEP] identifier[getRuntime] operator[SEP] operator[SEP] operator[SEP] identifier[addShutdownHook] operator[SEP] identifier[shutdownHook] operator[SEP] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public static String toJson(Calendar cal) { if (cal == null) { return NULL_VALUE; } CharBuf buffer = CharBuf.create(26); writeDate(cal.getTime(), buffer); return buffer.toString(); }
class class_name[name] begin[{] method[toJson, return_type[type[String]], modifier[public static], parameter[cal]] begin[{] if[binary_operation[member[.cal], ==, literal[null]]] begin[{] return[member[.NULL_VALUE]] else begin[{] None end[}] local_variable[type[CharBuf], buffer] call[.writeDate, parameter[call[cal.getTime, parameter[]], member[.buffer]]] return[call[buffer.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[toJson] operator[SEP] identifier[Calendar] identifier[cal] operator[SEP] { Keyword[if] operator[SEP] identifier[cal] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[NULL_VALUE] operator[SEP] } identifier[CharBuf] identifier[buffer] operator[=] identifier[CharBuf] operator[SEP] identifier[create] operator[SEP] Other[26] operator[SEP] operator[SEP] identifier[writeDate] operator[SEP] identifier[cal] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] , identifier[buffer] operator[SEP] operator[SEP] Keyword[return] identifier[buffer] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public DateTime plusDays(int days) { if (days == 0) { return this; } long instant = getChronology().days().add(getMillis(), days); return withMillis(instant); }
class class_name[name] begin[{] method[plusDays, return_type[type[DateTime]], modifier[public], parameter[days]] begin[{] if[binary_operation[member[.days], ==, literal[0]]] begin[{] return[THIS[]] else begin[{] None end[}] local_variable[type[long], instant] return[call[.withMillis, parameter[member[.instant]]]] end[}] END[}]
Keyword[public] identifier[DateTime] identifier[plusDays] operator[SEP] Keyword[int] identifier[days] operator[SEP] { Keyword[if] operator[SEP] identifier[days] operator[==] Other[0] operator[SEP] { Keyword[return] Keyword[this] operator[SEP] } Keyword[long] identifier[instant] operator[=] identifier[getChronology] operator[SEP] operator[SEP] operator[SEP] identifier[days] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[getMillis] operator[SEP] operator[SEP] , identifier[days] operator[SEP] operator[SEP] Keyword[return] identifier[withMillis] operator[SEP] identifier[instant] operator[SEP] operator[SEP] }
public static final Number getZeroForClazz(Class<? extends Number> clazz) { if (Double.class.isAssignableFrom(clazz) || Float.class.isAssignableFrom(clazz)) { // use doubleValue() return Double.valueOf(0d); } else { return Long.valueOf(0l); } }
class class_name[name] begin[{] method[getZeroForClazz, return_type[type[Number]], modifier[final public static], parameter[clazz]] begin[{] if[binary_operation[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isAssignableFrom, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Double, sub_type=None)), ||, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isAssignableFrom, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Float, sub_type=None))]] begin[{] return[call[Double.valueOf, parameter[literal[0d]]]] else begin[{] return[call[Long.valueOf, parameter[literal[0l]]]] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[final] identifier[Number] identifier[getZeroForClazz] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Number] operator[>] identifier[clazz] operator[SEP] { Keyword[if] operator[SEP] identifier[Double] operator[SEP] Keyword[class] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[clazz] operator[SEP] operator[||] identifier[Float] operator[SEP] Keyword[class] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[clazz] operator[SEP] operator[SEP] { Keyword[return] identifier[Double] operator[SEP] identifier[valueOf] operator[SEP] literal[Float] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[Long] operator[SEP] identifier[valueOf] operator[SEP] Other[0l] operator[SEP] operator[SEP] } }
public SVNRepository repository(String urlstr) throws SVNException { ISVNAuthenticationManager authenticationManager; String userinfo; SVNURL url; int idx; String username; String password; url = SVNURL.parseURIEncoded(urlstr); userinfo = url.getUserInfo(); if (userinfo != null) { idx = userinfo.indexOf(':'); if (idx == -1) { username = userinfo; password = null; } else { username = userinfo.substring(0, idx); password = userinfo.substring(idx + 1); } authenticationManager = authenticationManager(username, password); } else { authenticationManager = defaultAuthenticationManager == null ? authenticationManager(null, null) : defaultAuthenticationManager; } return repository(url, authenticationManager); }
class class_name[name] begin[{] method[repository, return_type[type[SVNRepository]], modifier[public], parameter[urlstr]] begin[{] local_variable[type[ISVNAuthenticationManager], authenticationManager] local_variable[type[String], userinfo] local_variable[type[SVNURL], url] local_variable[type[int], idx] local_variable[type[String], username] local_variable[type[String], password] assign[member[.url], call[SVNURL.parseURIEncoded, parameter[member[.urlstr]]]] assign[member[.userinfo], call[url.getUserInfo, parameter[]]] if[binary_operation[member[.userinfo], !=, literal[null]]] begin[{] assign[member[.idx], call[userinfo.indexOf, parameter[literal[':']]]] if[binary_operation[member[.idx], ==, literal[1]]] begin[{] assign[member[.username], member[.userinfo]] assign[member[.password], literal[null]] else begin[{] assign[member[.username], call[userinfo.substring, parameter[literal[0], member[.idx]]]] assign[member[.password], call[userinfo.substring, parameter[binary_operation[member[.idx], +, literal[1]]]]] end[}] assign[member[.authenticationManager], call[.authenticationManager, parameter[member[.username], member[.password]]]] else begin[{] assign[member[.authenticationManager], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=defaultAuthenticationManager, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MemberReference(member=defaultAuthenticationManager, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=authenticationManager, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None))] end[}] return[call[.repository, parameter[member[.url], member[.authenticationManager]]]] end[}] END[}]
Keyword[public] identifier[SVNRepository] identifier[repository] operator[SEP] identifier[String] identifier[urlstr] operator[SEP] Keyword[throws] identifier[SVNException] { identifier[ISVNAuthenticationManager] identifier[authenticationManager] operator[SEP] identifier[String] identifier[userinfo] operator[SEP] identifier[SVNURL] identifier[url] operator[SEP] Keyword[int] identifier[idx] operator[SEP] identifier[String] identifier[username] operator[SEP] identifier[String] identifier[password] operator[SEP] identifier[url] operator[=] identifier[SVNURL] operator[SEP] identifier[parseURIEncoded] operator[SEP] identifier[urlstr] operator[SEP] operator[SEP] identifier[userinfo] operator[=] identifier[url] operator[SEP] identifier[getUserInfo] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[userinfo] operator[!=] Other[null] operator[SEP] { identifier[idx] operator[=] identifier[userinfo] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[idx] operator[==] operator[-] Other[1] operator[SEP] { identifier[username] operator[=] identifier[userinfo] operator[SEP] identifier[password] operator[=] Other[null] operator[SEP] } Keyword[else] { identifier[username] operator[=] identifier[userinfo] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[idx] operator[SEP] operator[SEP] identifier[password] operator[=] identifier[userinfo] operator[SEP] identifier[substring] operator[SEP] identifier[idx] operator[+] Other[1] operator[SEP] operator[SEP] } identifier[authenticationManager] operator[=] identifier[authenticationManager] operator[SEP] identifier[username] , identifier[password] operator[SEP] operator[SEP] } Keyword[else] { identifier[authenticationManager] operator[=] identifier[defaultAuthenticationManager] operator[==] Other[null] operator[?] identifier[authenticationManager] operator[SEP] Other[null] , Other[null] operator[SEP] operator[:] identifier[defaultAuthenticationManager] operator[SEP] } Keyword[return] identifier[repository] operator[SEP] identifier[url] , identifier[authenticationManager] operator[SEP] operator[SEP] }
public void Divide(double scalar) { if (scalar == 0) { try { throw new ArithmeticException("Can not divide by zero."); } catch (Exception e) { e.printStackTrace(); } } this.real /= scalar; this.imaginary /= scalar; }
class class_name[name] begin[{] method[Divide, return_type[void], modifier[public], parameter[scalar]] begin[{] if[binary_operation[member[.scalar], ==, literal[0]]] begin[{] TryStatement(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Can not divide by zero.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ArithmeticException, sub_type=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] assign[THIS[member[None.real]], member[.scalar]] assign[THIS[member[None.imaginary]], member[.scalar]] end[}] END[}]
Keyword[public] Keyword[void] identifier[Divide] operator[SEP] Keyword[double] identifier[scalar] operator[SEP] { Keyword[if] operator[SEP] identifier[scalar] operator[==] Other[0] operator[SEP] { Keyword[try] { Keyword[throw] Keyword[new] identifier[ArithmeticException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[e] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } } Keyword[this] operator[SEP] identifier[real] operator[/=] identifier[scalar] operator[SEP] Keyword[this] operator[SEP] identifier[imaginary] operator[/=] identifier[scalar] operator[SEP] }
public static <A extends Analyzer<?>> AnalyzerBeanDescriptor<A> ofAnalyzer(Class<A> analyzerClass) { return new AnnotationBasedAnalyzerBeanDescriptor<A>(analyzerClass); }
class class_name[name] begin[{] method[ofAnalyzer, return_type[type[AnalyzerBeanDescriptor]], modifier[public static], parameter[analyzerClass]] begin[{] return[ClassCreator(arguments=[MemberReference(member=analyzerClass, 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=A, sub_type=None))], dimensions=None, name=AnnotationBasedAnalyzerBeanDescriptor, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[A] Keyword[extends] identifier[Analyzer] operator[<] operator[?] operator[>] operator[>] identifier[AnalyzerBeanDescriptor] operator[<] identifier[A] operator[>] identifier[ofAnalyzer] operator[SEP] identifier[Class] operator[<] identifier[A] operator[>] identifier[analyzerClass] operator[SEP] { Keyword[return] Keyword[new] identifier[AnnotationBasedAnalyzerBeanDescriptor] operator[<] identifier[A] operator[>] operator[SEP] identifier[analyzerClass] operator[SEP] operator[SEP] }
public DescribeServicesRequest withServices(String... services) { if (this.services == null) { setServices(new com.amazonaws.internal.SdkInternalList<String>(services.length)); } for (String ele : services) { this.services.add(ele); } return this; }
class class_name[name] begin[{] method[withServices, return_type[type[DescribeServicesRequest]], modifier[public], parameter[services]] begin[{] if[binary_operation[THIS[member[None.services]], ==, literal[null]]] begin[{] call[.setServices, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=services, 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=String, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=services, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=services, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ele)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[DescribeServicesRequest] identifier[withServices] operator[SEP] identifier[String] operator[...] identifier[services] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[services] operator[==] Other[null] operator[SEP] { identifier[setServices] operator[SEP] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[String] operator[>] operator[SEP] identifier[services] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[String] identifier[ele] operator[:] identifier[services] operator[SEP] { Keyword[this] operator[SEP] identifier[services] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public void dispose() { if (onSubscribe.disposed.compareAndSet(false, true)) { for (Object chunk : onSubscribe.chunks) { ReferenceCountUtil.release(chunk); } onSubscribe.chunks.clear(); } }
class class_name[name] begin[{] method[dispose, return_type[void], modifier[public], parameter[]] begin[{] if[call[onSubscribe.disposed.compareAndSet, parameter[literal[false], literal[true]]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=chunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=release, postfix_operators=[], prefix_operators=[], qualifier=ReferenceCountUtil, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=chunks, postfix_operators=[], prefix_operators=[], qualifier=onSubscribe, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=chunk)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))), label=None) call[onSubscribe.chunks.clear, parameter[]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[dispose] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[onSubscribe] operator[SEP] identifier[disposed] operator[SEP] identifier[compareAndSet] operator[SEP] literal[boolean] , literal[boolean] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[Object] identifier[chunk] operator[:] identifier[onSubscribe] operator[SEP] identifier[chunks] operator[SEP] { identifier[ReferenceCountUtil] operator[SEP] identifier[release] operator[SEP] identifier[chunk] operator[SEP] operator[SEP] } identifier[onSubscribe] operator[SEP] identifier[chunks] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] } }
@Override public int size() { if (indics != null) { return indics.size(); } indics = new HashMap<Integer, Pair<Integer, Integer>>(); int size = 0; TestSequence rtests = repeat.getTests(); int count = rtests.size(); for (int r = from; r <= to; r++) { if (r == 0) { indics.put(size, new Pair<Integer, Integer>(r, 0)); size++; continue; } int[] c = new int[r]; for (int i = 0; i < r; i++) { c[i] = count; } Permutor p = new Permutor(c); int j = 0; while (p.hasNext()) { j++; p.next(); indics.put(size, new Pair<Integer, Integer>(r, j)); size++; } } return size; }
class class_name[name] begin[{] method[size, return_type[type[int]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.indics], !=, literal[null]]] begin[{] return[call[indics.size, parameter[]]] else begin[{] None end[}] assign[member[.indics], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))], dimensions=[], name=Pair, sub_type=None))], dimensions=None, name=HashMap, sub_type=None))] local_variable[type[int], size] local_variable[type[TestSequence], rtests] local_variable[type[int], count] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=r, 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=MethodInvocation(arguments=[MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))], dimensions=None, name=Pair, sub_type=None))], member=put, postfix_operators=[], prefix_operators=[], qualifier=indics, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=size, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int)), name=c)], modifiers=set(), type=BasicType(dimensions=[None], name=int)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=r, 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), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=c, 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=Permutor, sub_type=None)), name=p)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Permutor, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=j, 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=Integer, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))], dimensions=None, name=Pair, sub_type=None))], member=put, postfix_operators=[], prefix_operators=[], qualifier=indics, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=size, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]), condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=to, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=from, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=r)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=r, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.size]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[size] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[indics] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[indics] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] } identifier[indics] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[Integer] , identifier[Pair] operator[<] identifier[Integer] , identifier[Integer] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[size] operator[=] Other[0] operator[SEP] identifier[TestSequence] identifier[rtests] operator[=] identifier[repeat] operator[SEP] identifier[getTests] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[count] operator[=] identifier[rtests] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[r] operator[=] identifier[from] operator[SEP] identifier[r] operator[<=] identifier[to] operator[SEP] identifier[r] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[r] operator[==] Other[0] operator[SEP] { identifier[indics] operator[SEP] identifier[put] operator[SEP] identifier[size] , Keyword[new] identifier[Pair] operator[<] identifier[Integer] , identifier[Integer] operator[>] operator[SEP] identifier[r] , Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[++] operator[SEP] Keyword[continue] operator[SEP] } Keyword[int] operator[SEP] operator[SEP] identifier[c] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[r] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[r] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[c] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[count] operator[SEP] } identifier[Permutor] identifier[p] operator[=] Keyword[new] identifier[Permutor] operator[SEP] identifier[c] operator[SEP] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] identifier[p] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[j] operator[++] operator[SEP] identifier[p] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[indics] operator[SEP] identifier[put] operator[SEP] identifier[size] , Keyword[new] identifier[Pair] operator[<] identifier[Integer] , identifier[Integer] operator[>] operator[SEP] identifier[r] , identifier[j] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[++] operator[SEP] } } Keyword[return] identifier[size] operator[SEP] }
private boolean validBooleanExpression(Node expr) { if (isBooleanOperation(expr)) { return validBooleanOperation(expr); } if (!isOperation(expr)) { warnInvalidExpression("boolean", expr); return false; } if (!isValidPredicate(getCallName(expr))) { warnInvalid("boolean predicate", expr); return false; } Keywords keyword = nameToKeyword(getCallName(expr)); if (!checkParameterCount(expr, keyword)) { return false; } switch (keyword.kind) { case TYPE_PREDICATE: return validTypePredicate(expr, getCallParamCount(expr)); case STRING_PREDICATE: return validStringPredicate(expr, getCallParamCount(expr)); case TYPEVAR_PREDICATE: return validTypevarPredicate(expr, getCallParamCount(expr)); default: throw new IllegalStateException("Invalid boolean expression"); } }
class class_name[name] begin[{] method[validBooleanExpression, return_type[type[boolean]], modifier[private], parameter[expr]] begin[{] if[call[.isBooleanOperation, parameter[member[.expr]]]] begin[{] return[call[.validBooleanOperation, parameter[member[.expr]]]] else begin[{] None end[}] if[call[.isOperation, parameter[member[.expr]]]] begin[{] call[.warnInvalidExpression, parameter[literal["boolean"], member[.expr]]] return[literal[false]] else begin[{] None end[}] if[call[.isValidPredicate, parameter[call[.getCallName, parameter[member[.expr]]]]]] begin[{] call[.warnInvalid, parameter[literal["boolean predicate"], member[.expr]]] return[literal[false]] else begin[{] None end[}] local_variable[type[Keywords], keyword] if[call[.checkParameterCount, parameter[member[.expr], member[.keyword]]]] begin[{] return[literal[false]] else begin[{] None end[}] SwitchStatement(cases=[SwitchStatementCase(case=['TYPE_PREDICATE'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=expr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=expr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getCallParamCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=validTypePredicate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=['STRING_PREDICATE'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=expr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=expr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getCallParamCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=validStringPredicate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=['TYPEVAR_PREDICATE'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=expr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=expr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getCallParamCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=validTypevarPredicate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid boolean expression")], 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)])], expression=MemberReference(member=kind, postfix_operators=[], prefix_operators=[], qualifier=keyword, selectors=[]), label=None) end[}] END[}]
Keyword[private] Keyword[boolean] identifier[validBooleanExpression] operator[SEP] identifier[Node] identifier[expr] operator[SEP] { Keyword[if] operator[SEP] identifier[isBooleanOperation] operator[SEP] identifier[expr] operator[SEP] operator[SEP] { Keyword[return] identifier[validBooleanOperation] operator[SEP] identifier[expr] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[isOperation] operator[SEP] identifier[expr] operator[SEP] operator[SEP] { identifier[warnInvalidExpression] operator[SEP] literal[String] , identifier[expr] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[isValidPredicate] operator[SEP] identifier[getCallName] operator[SEP] identifier[expr] operator[SEP] operator[SEP] operator[SEP] { identifier[warnInvalid] operator[SEP] literal[String] , identifier[expr] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } identifier[Keywords] identifier[keyword] operator[=] identifier[nameToKeyword] operator[SEP] identifier[getCallName] operator[SEP] identifier[expr] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[checkParameterCount] operator[SEP] identifier[expr] , identifier[keyword] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[switch] operator[SEP] identifier[keyword] operator[SEP] identifier[kind] operator[SEP] { Keyword[case] identifier[TYPE_PREDICATE] operator[:] Keyword[return] identifier[validTypePredicate] operator[SEP] identifier[expr] , identifier[getCallParamCount] operator[SEP] identifier[expr] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[STRING_PREDICATE] operator[:] Keyword[return] identifier[validStringPredicate] operator[SEP] identifier[expr] , identifier[getCallParamCount] operator[SEP] identifier[expr] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[TYPEVAR_PREDICATE] operator[:] Keyword[return] identifier[validTypevarPredicate] operator[SEP] identifier[expr] , identifier[getCallParamCount] operator[SEP] identifier[expr] operator[SEP] operator[SEP] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } }
@Override public void eSet(int featureID, Object newValue) { switch (featureID) { case AfplibPackage.BEGIN_IMAGE__OBJTYPE: setOBJTYPE((Integer)newValue); return; } super.eSet(featureID, newValue); }
class class_name[name] begin[{] method[eSet, return_type[void], modifier[public], parameter[featureID, newValue]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=BEGIN_IMAGE__OBJTYPE, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=newValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))], member=setOBJTYPE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)])], expression=MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) SuperMethodInvocation(arguments=[MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=newValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=eSet, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[eSet] operator[SEP] Keyword[int] identifier[featureID] , identifier[Object] identifier[newValue] operator[SEP] { Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] { Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[BEGIN_IMAGE__OBJTYPE] operator[:] identifier[setOBJTYPE] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[newValue] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[super] operator[SEP] identifier[eSet] operator[SEP] identifier[featureID] , identifier[newValue] operator[SEP] operator[SEP] }
public String outputNameFor(String output) { Report report = openReport(output); return outputNameOf(report); }
class class_name[name] begin[{] method[outputNameFor, return_type[type[String]], modifier[public], parameter[output]] begin[{] local_variable[type[Report], report] return[call[.outputNameOf, parameter[member[.report]]]] end[}] END[}]
Keyword[public] identifier[String] identifier[outputNameFor] operator[SEP] identifier[String] identifier[output] operator[SEP] { identifier[Report] identifier[report] operator[=] identifier[openReport] operator[SEP] identifier[output] operator[SEP] operator[SEP] Keyword[return] identifier[outputNameOf] operator[SEP] identifier[report] operator[SEP] operator[SEP] }
public static int cufftExecR2C(cufftHandle plan, Pointer rIdata, Pointer cOdata) { return checkResult(cufftExecR2CNative(plan, rIdata, cOdata)); }
class class_name[name] begin[{] method[cufftExecR2C, return_type[type[int]], modifier[public static], parameter[plan, rIdata, cOdata]] begin[{] return[call[.checkResult, parameter[call[.cufftExecR2CNative, parameter[member[.plan], member[.rIdata], member[.cOdata]]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[cufftExecR2C] operator[SEP] identifier[cufftHandle] identifier[plan] , identifier[Pointer] identifier[rIdata] , identifier[Pointer] identifier[cOdata] operator[SEP] { Keyword[return] identifier[checkResult] operator[SEP] identifier[cufftExecR2CNative] operator[SEP] identifier[plan] , identifier[rIdata] , identifier[cOdata] operator[SEP] operator[SEP] operator[SEP] }
protected static String makeFilename(File directory, final String keyspace, final String columnFamily) { final Set<Descriptor> existing = new HashSet<Descriptor>(); directory.list(new FilenameFilter() { public boolean accept(File dir, String name) { Pair<Descriptor, Component> p = SSTable.tryComponentFromFilename(dir, name); Descriptor desc = p == null ? null : p.left; if (desc == null) return false; if (desc.cfname.equals(columnFamily)) existing.add(desc); return false; } }); int maxGen = generation.getAndIncrement(); for (Descriptor desc : existing) { while (desc.generation > maxGen) { maxGen = generation.getAndIncrement(); } } return new Descriptor(directory, keyspace, columnFamily, maxGen + 1, Descriptor.Type.TEMP).filenameFor(Component.DATA); }
class class_name[name] begin[{] method[makeFilename, return_type[type[String]], modifier[static protected], parameter[directory, keyspace, columnFamily]] begin[{] local_variable[type[Set], existing] call[directory.list, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=dir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=tryComponentFromFilename, postfix_operators=[], prefix_operators=[], qualifier=SSTable, selectors=[], type_arguments=None), name=p)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Descriptor, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Component, sub_type=None))], dimensions=[], name=Pair, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MemberReference(member=left, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[]), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), name=desc)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Descriptor, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=desc, 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=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=columnFamily, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=desc.cfname, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=desc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=existing, selectors=[], type_arguments=None), label=None)), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)], documentation=None, modifiers={'public'}, name=accept, parameters=[FormalParameter(annotations=[], modifiers=set(), name=dir, type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=name, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), varargs=False)], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FilenameFilter, sub_type=None))]] local_variable[type[int], maxGen] ForStatement(body=BlockStatement(label=None, statements=[WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=maxGen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getAndIncrement, postfix_operators=[], prefix_operators=[], qualifier=generation, selectors=[], type_arguments=None)), label=None)]), condition=BinaryOperation(operandl=MemberReference(member=generation, postfix_operators=[], prefix_operators=[], qualifier=desc, selectors=[]), operandr=MemberReference(member=maxGen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=existing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=desc)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Descriptor, sub_type=None))), label=None) return[ClassCreator(arguments=[MemberReference(member=directory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=keyspace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=columnFamily, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=maxGen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), MemberReference(member=TEMP, postfix_operators=[], prefix_operators=[], qualifier=Descriptor.Type, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=DATA, postfix_operators=[], prefix_operators=[], qualifier=Component, selectors=[])], member=filenameFor, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Descriptor, sub_type=None))] end[}] END[}]
Keyword[protected] Keyword[static] identifier[String] identifier[makeFilename] operator[SEP] identifier[File] identifier[directory] , Keyword[final] identifier[String] identifier[keyspace] , Keyword[final] identifier[String] identifier[columnFamily] operator[SEP] { Keyword[final] identifier[Set] operator[<] identifier[Descriptor] operator[>] identifier[existing] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[Descriptor] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[directory] operator[SEP] identifier[list] operator[SEP] Keyword[new] identifier[FilenameFilter] operator[SEP] operator[SEP] { Keyword[public] Keyword[boolean] identifier[accept] operator[SEP] identifier[File] identifier[dir] , identifier[String] identifier[name] operator[SEP] { identifier[Pair] operator[<] identifier[Descriptor] , identifier[Component] operator[>] identifier[p] operator[=] identifier[SSTable] operator[SEP] identifier[tryComponentFromFilename] operator[SEP] identifier[dir] , identifier[name] operator[SEP] operator[SEP] identifier[Descriptor] identifier[desc] operator[=] identifier[p] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[p] operator[SEP] identifier[left] operator[SEP] Keyword[if] operator[SEP] identifier[desc] operator[==] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[desc] operator[SEP] identifier[cfname] operator[SEP] identifier[equals] operator[SEP] identifier[columnFamily] operator[SEP] operator[SEP] identifier[existing] operator[SEP] identifier[add] operator[SEP] identifier[desc] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } } operator[SEP] operator[SEP] Keyword[int] identifier[maxGen] operator[=] identifier[generation] operator[SEP] identifier[getAndIncrement] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Descriptor] identifier[desc] operator[:] identifier[existing] operator[SEP] { Keyword[while] operator[SEP] identifier[desc] operator[SEP] identifier[generation] operator[>] identifier[maxGen] operator[SEP] { identifier[maxGen] operator[=] identifier[generation] operator[SEP] identifier[getAndIncrement] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] Keyword[new] identifier[Descriptor] operator[SEP] identifier[directory] , identifier[keyspace] , identifier[columnFamily] , identifier[maxGen] operator[+] Other[1] , identifier[Descriptor] operator[SEP] identifier[Type] operator[SEP] identifier[TEMP] operator[SEP] operator[SEP] identifier[filenameFor] operator[SEP] identifier[Component] operator[SEP] identifier[DATA] operator[SEP] operator[SEP] }
void setsDateSeriesHiddenFlag(boolean hide) { m_hideSeriesInstances = hide; if (m_hideSeriesInstances) { m_toggleSeriesButton.addStyleName(OpenCmsTheme.BUTTON_PRESSED); } else { m_toggleSeriesButton.removeStyleName(OpenCmsTheme.BUTTON_PRESSED); } }
class class_name[name] begin[{] method[setsDateSeriesHiddenFlag, return_type[void], modifier[default], parameter[hide]] begin[{] assign[member[.m_hideSeriesInstances], member[.hide]] if[member[.m_hideSeriesInstances]] begin[{] call[m_toggleSeriesButton.addStyleName, parameter[member[OpenCmsTheme.BUTTON_PRESSED]]] else begin[{] call[m_toggleSeriesButton.removeStyleName, parameter[member[OpenCmsTheme.BUTTON_PRESSED]]] end[}] end[}] END[}]
Keyword[void] identifier[setsDateSeriesHiddenFlag] operator[SEP] Keyword[boolean] identifier[hide] operator[SEP] { identifier[m_hideSeriesInstances] operator[=] identifier[hide] operator[SEP] Keyword[if] operator[SEP] identifier[m_hideSeriesInstances] operator[SEP] { identifier[m_toggleSeriesButton] operator[SEP] identifier[addStyleName] operator[SEP] identifier[OpenCmsTheme] operator[SEP] identifier[BUTTON_PRESSED] operator[SEP] operator[SEP] } Keyword[else] { identifier[m_toggleSeriesButton] operator[SEP] identifier[removeStyleName] operator[SEP] identifier[OpenCmsTheme] operator[SEP] identifier[BUTTON_PRESSED] operator[SEP] operator[SEP] } }
static public ByteBuffer newDirectBuffer (long address, int size) { if (directByteBufferConstructor == null) throw new UnsupportedOperationException("No direct ByteBuffer constructor is available."); try { return directByteBufferConstructor.newInstance(address, size, null); } catch (Exception ex) { throw new KryoException("Error creating a ByteBuffer at address: " + address, ex); } }
class class_name[name] begin[{] method[newDirectBuffer, return_type[type[ByteBuffer]], modifier[public static], parameter[address, size]] begin[{] if[binary_operation[member[.directByteBufferConstructor], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No direct ByteBuffer constructor is available.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UnsupportedOperationException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=address, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=directByteBufferConstructor, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error creating a ByteBuffer at address: "), operandr=MemberReference(member=address, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), 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=KryoException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[static] Keyword[public] identifier[ByteBuffer] identifier[newDirectBuffer] operator[SEP] Keyword[long] identifier[address] , Keyword[int] identifier[size] operator[SEP] { Keyword[if] operator[SEP] identifier[directByteBufferConstructor] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[UnsupportedOperationException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[try] { Keyword[return] identifier[directByteBufferConstructor] operator[SEP] identifier[newInstance] operator[SEP] identifier[address] , identifier[size] , Other[null] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { Keyword[throw] Keyword[new] identifier[KryoException] operator[SEP] literal[String] operator[+] identifier[address] , identifier[ex] operator[SEP] operator[SEP] } }
@Override public FullEntity<?> toEntity(final Object pojo) { if (pojo instanceof FullEntity<?>) { return (FullEntity<?>)pojo; } else { @SuppressWarnings("unchecked") final EntityMetadata<Object> meta = (EntityMetadata<Object>)ofy.factory().getMetadata(pojo.getClass()); return meta.save(pojo, new SaveContext()); } }
class class_name[name] begin[{] method[toEntity, return_type[type[FullEntity]], modifier[public], parameter[pojo]] begin[{] if[binary_operation[member[.pojo], instanceof, type[FullEntity]]] begin[{] return[Cast(expression=MemberReference(member=pojo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=FullEntity, sub_type=None))] else begin[{] local_variable[type[EntityMetadata], meta] return[call[meta.save, parameter[member[.pojo], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SaveContext, sub_type=None))]]] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[FullEntity] operator[<] operator[?] operator[>] identifier[toEntity] operator[SEP] Keyword[final] identifier[Object] identifier[pojo] operator[SEP] { Keyword[if] operator[SEP] identifier[pojo] Keyword[instanceof] identifier[FullEntity] operator[<] operator[?] operator[>] operator[SEP] { Keyword[return] operator[SEP] identifier[FullEntity] operator[<] operator[?] operator[>] operator[SEP] identifier[pojo] operator[SEP] } Keyword[else] { annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[final] identifier[EntityMetadata] operator[<] identifier[Object] operator[>] identifier[meta] operator[=] operator[SEP] identifier[EntityMetadata] operator[<] identifier[Object] operator[>] operator[SEP] identifier[ofy] operator[SEP] identifier[factory] operator[SEP] operator[SEP] operator[SEP] identifier[getMetadata] operator[SEP] identifier[pojo] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[meta] operator[SEP] identifier[save] operator[SEP] identifier[pojo] , Keyword[new] identifier[SaveContext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public boolean processMVBasedQueryFix(StmtTableScan mvTableScan, Set<SchemaColumn> scanColumns, JoinNode joinTree, List<ParsedColInfo> displayColumns, List<ParsedColInfo> groupByColumns) { // Check valid cases first //@TODO if ( ! (mvTableScan instanceof StmtTargetTableScan)) { return false; } Table table = ((StmtTargetTableScan)mvTableScan).getTargetTable(); assert (table != null); String mvTableName = table.getTypeName(); Table srcTable = table.getMaterializer(); if (srcTable == null) { return false; } if (table.getIsreplicated()) { return false; } // Justify whether partition column is in group by column list or not if (table.getPartitioncolumn() != null) { return false; } m_mvTableScan = mvTableScan; Set<String> mvDDLGroupbyColumnNames = new HashSet<>(); List<Column> mvColumnArray = CatalogUtil.getSortedCatalogItems(table.getColumns(), "index"); String mvTableAlias = getMVTableAlias(); // Get the number of group-by columns. int numOfGroupByColumns; MaterializedViewInfo mvInfo = srcTable.getViews().get(mvTableName); if (mvInfo != null) { // single table view String complexGroupbyJson = mvInfo.getGroupbyexpressionsjson(); if (complexGroupbyJson.length() > 0) { List<AbstractExpression> mvComplexGroupbyCols = null; try { mvComplexGroupbyCols = AbstractExpression.fromJSONArrayString(complexGroupbyJson, null); } catch (JSONException e) { e.printStackTrace(); } numOfGroupByColumns = mvComplexGroupbyCols.size(); } else { numOfGroupByColumns = mvInfo.getGroupbycols().size(); } } else { // joined table view MaterializedViewHandlerInfo mvHandlerInfo = table.getMvhandlerinfo().get("mvHandlerInfo"); numOfGroupByColumns = mvHandlerInfo.getGroupbycolumncount(); } if (scanColumns.isEmpty() && numOfGroupByColumns == 0) { // This is an edge case that can happen if the view // has no group by keys, and we are just // doing a count(*) on the output of the view. // // Having no GB keys or scan columns would cause us to // produce plan nodes that have a 0-column output schema. // We can't handle this in several places, so add the // count(*) column from the view to the scan columns. Column mvCol = mvColumnArray.get(0); // this is the "count(*)" column. TupleValueExpression tve = new TupleValueExpression( mvTableName, mvTableAlias, mvCol, 0); tve.setOrigStmtId(mvTableScan.getStatementId()); String colName = mvCol.getName(); SchemaColumn scol = new SchemaColumn(mvTableName, mvTableAlias, colName, colName, tve); scanColumns.add(scol); } // Start to do real materialized view processing to fix the duplicates problem. // (1) construct new projection columns for scan plan node. Set<SchemaColumn> mvDDLGroupbyColumns = new HashSet<>(); NodeSchema inlineProjSchema = new NodeSchema(); for (SchemaColumn scol: scanColumns) { inlineProjSchema.addColumn(scol); } for (int i = 0; i < numOfGroupByColumns; i++) { Column mvCol = mvColumnArray.get(i); String colName = mvCol.getName(); TupleValueExpression tve = new TupleValueExpression( mvTableName, mvTableAlias, mvCol, i); tve.setOrigStmtId(mvTableScan.getStatementId()); mvDDLGroupbyColumnNames.add(colName); SchemaColumn scol = new SchemaColumn(mvTableName, mvTableAlias, colName, colName, tve); mvDDLGroupbyColumns.add(scol); if (!scanColumns.contains(scol)) { scanColumns.add(scol); // construct new projection columns for scan plan node. inlineProjSchema.addColumn(scol); } } // Record the re-aggregation type for each scan columns. Map<String, ExpressionType> mvColumnReAggType = new HashMap<>(); for (int i = numOfGroupByColumns; i < mvColumnArray.size(); i++) { Column mvCol = mvColumnArray.get(i); ExpressionType reAggType = ExpressionType.get(mvCol.getAggregatetype()); if (reAggType == ExpressionType.AGGREGATE_COUNT_STAR || reAggType == ExpressionType.AGGREGATE_COUNT) { reAggType = ExpressionType.AGGREGATE_SUM; } mvColumnReAggType.put(mvCol.getName(), reAggType); } assert (inlineProjSchema.size() > 0); m_scanInlinedProjectionNode = new ProjectionPlanNode(inlineProjSchema); // (2) Construct the reAggregation Node. // Construct the reAggregation plan node's aggSchema m_reAggNode = new HashAggregatePlanNode(); int outputColumnIndex = 0; // inlineProjSchema contains the group by columns, while aggSchema may do not. NodeSchema aggSchema = new NodeSchema(); // Construct reAggregation node's aggregation and group by list. for (SchemaColumn scol: inlineProjSchema) { if (mvDDLGroupbyColumns.contains(scol)) { // Add group by expression. m_reAggNode.addGroupByExpression(scol.getExpression()); } else { ExpressionType reAggType = mvColumnReAggType.get(scol.getColumnName()); assert(reAggType != null); AbstractExpression agg_input_expr = scol.getExpression(); assert(agg_input_expr instanceof TupleValueExpression); // Add aggregation information. m_reAggNode.addAggregate(reAggType, false, outputColumnIndex, agg_input_expr); } aggSchema.addColumn(scol); outputColumnIndex++; } assert (aggSchema.size() > 0); m_reAggNode.setOutputSchema(aggSchema); // Collect all TVEs that need to be do re-aggregation in coordinator. List<TupleValueExpression> needReAggTVEs = new ArrayList<>(); List<AbstractExpression> aggPostExprs = new ArrayList<>(); for (int i = numOfGroupByColumns; i < mvColumnArray.size(); i++) { Column mvCol = mvColumnArray.get(i); TupleValueExpression tve = new TupleValueExpression( mvTableName, mvTableAlias, mvCol, -1); tve.setOrigStmtId(mvTableScan.getStatementId()); needReAggTVEs.add(tve); } collectReAggNodePostExpressions(joinTree, needReAggTVEs, aggPostExprs); AbstractExpression aggPostExpr = ExpressionUtil.combinePredicates(aggPostExprs); // Add post filters for the reAggregation node. m_reAggNode.setPostPredicate(aggPostExpr); // ENG-5386 if (m_edgeCaseQueryNoFixNeeded && edgeCaseQueryNoFixNeeded(mvDDLGroupbyColumnNames, mvColumnReAggType, displayColumns, groupByColumns)) { return false; } m_needed = true; return true; }
class class_name[name] begin[{] method[processMVBasedQueryFix, return_type[type[boolean]], modifier[public], parameter[mvTableScan, scanColumns, joinTree, displayColumns, groupByColumns]] begin[{] if[binary_operation[member[.mvTableScan], instanceof, type[StmtTargetTableScan]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[Table], table] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=table, 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[String], mvTableName] local_variable[type[Table], srcTable] if[binary_operation[member[.srcTable], ==, literal[null]]] begin[{] return[literal[false]] else begin[{] None end[}] if[call[table.getIsreplicated, parameter[]]] begin[{] return[literal[false]] else begin[{] None end[}] if[binary_operation[call[table.getPartitioncolumn, parameter[]], !=, literal[null]]] begin[{] return[literal[false]] else begin[{] None end[}] assign[member[.m_mvTableScan], member[.mvTableScan]] local_variable[type[Set], mvDDLGroupbyColumnNames] local_variable[type[List], mvColumnArray] local_variable[type[String], mvTableAlias] local_variable[type[int], numOfGroupByColumns] local_variable[type[MaterializedViewInfo], mvInfo] if[binary_operation[member[.mvInfo], !=, literal[null]]] begin[{] local_variable[type[String], complexGroupbyJson] if[binary_operation[call[complexGroupbyJson.length, parameter[]], >, literal[0]]] begin[{] local_variable[type[List], mvComplexGroupbyCols] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=mvComplexGroupbyCols, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=complexGroupbyJson, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=fromJSONArrayString, postfix_operators=[], prefix_operators=[], qualifier=AbstractExpression, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['JSONException']))], finally_block=None, label=None, resources=None) assign[member[.numOfGroupByColumns], call[mvComplexGroupbyCols.size, parameter[]]] else begin[{] assign[member[.numOfGroupByColumns], call[mvInfo.getGroupbycols, parameter[]]] end[}] else begin[{] local_variable[type[MaterializedViewHandlerInfo], mvHandlerInfo] assign[member[.numOfGroupByColumns], call[mvHandlerInfo.getGroupbycolumncount, parameter[]]] end[}] if[binary_operation[call[scanColumns.isEmpty, parameter[]], &&, binary_operation[member[.numOfGroupByColumns], ==, literal[0]]]] begin[{] local_variable[type[Column], mvCol] local_variable[type[TupleValueExpression], tve] call[tve.setOrigStmtId, parameter[call[mvTableScan.getStatementId, parameter[]]]] local_variable[type[String], colName] local_variable[type[SchemaColumn], scol] call[scanColumns.add, parameter[member[.scol]]] else begin[{] None end[}] local_variable[type[Set], mvDDLGroupbyColumns] local_variable[type[NodeSchema], inlineProjSchema] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=scol, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addColumn, postfix_operators=[], prefix_operators=[], qualifier=inlineProjSchema, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=scanColumns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=scol)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SchemaColumn, sub_type=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=mvColumnArray, selectors=[], type_arguments=None), name=mvCol)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Column, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=mvCol, selectors=[], type_arguments=None), name=colName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=mvTableName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=mvTableAlias, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=mvCol, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, 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=TupleValueExpression, sub_type=None)), name=tve)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TupleValueExpression, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getStatementId, postfix_operators=[], prefix_operators=[], qualifier=mvTableScan, selectors=[], type_arguments=None)], member=setOrigStmtId, postfix_operators=[], prefix_operators=[], qualifier=tve, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=colName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=mvDDLGroupbyColumnNames, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=mvTableName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=mvTableAlias, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=colName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=colName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tve, 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=SchemaColumn, sub_type=None)), name=scol)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SchemaColumn, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=scol, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=mvDDLGroupbyColumns, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=scol, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=['!'], qualifier=scanColumns, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=scol, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=scanColumns, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=scol, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addColumn, postfix_operators=[], prefix_operators=[], qualifier=inlineProjSchema, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=numOfGroupByColumns, 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) local_variable[type[Map], mvColumnReAggType] 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=mvColumnArray, selectors=[], type_arguments=None), name=mvCol)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Column, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAggregatetype, postfix_operators=[], prefix_operators=[], qualifier=mvCol, selectors=[], type_arguments=None)], member=get, postfix_operators=[], prefix_operators=[], qualifier=ExpressionType, selectors=[], type_arguments=None), name=reAggType)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ExpressionType, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=reAggType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=AGGREGATE_COUNT_STAR, postfix_operators=[], prefix_operators=[], qualifier=ExpressionType, selectors=[]), operator===), operandr=BinaryOperation(operandl=MemberReference(member=reAggType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=AGGREGATE_COUNT, postfix_operators=[], prefix_operators=[], qualifier=ExpressionType, selectors=[]), operator===), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=reAggType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=AGGREGATE_SUM, postfix_operators=[], prefix_operators=[], qualifier=ExpressionType, selectors=[])), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=mvCol, selectors=[], type_arguments=None), MemberReference(member=reAggType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=mvColumnReAggType, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=mvColumnArray, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=numOfGroupByColumns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) AssertStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=inlineProjSchema, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), label=None, value=None) assign[member[.m_scanInlinedProjectionNode], ClassCreator(arguments=[MemberReference(member=inlineProjSchema, 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=ProjectionPlanNode, sub_type=None))] assign[member[.m_reAggNode], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HashAggregatePlanNode, sub_type=None))] local_variable[type[int], outputColumnIndex] local_variable[type[NodeSchema], aggSchema] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=scol, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=[], qualifier=mvDDLGroupbyColumns, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getColumnName, postfix_operators=[], prefix_operators=[], qualifier=scol, selectors=[], type_arguments=None)], member=get, postfix_operators=[], prefix_operators=[], qualifier=mvColumnReAggType, selectors=[], type_arguments=None), name=reAggType)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ExpressionType, sub_type=None)), AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=reAggType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getExpression, postfix_operators=[], prefix_operators=[], qualifier=scol, selectors=[], type_arguments=None), name=agg_input_expr)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AbstractExpression, sub_type=None)), AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=agg_input_expr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=TupleValueExpression, sub_type=None), operator=instanceof), label=None, value=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=reAggType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), MemberReference(member=outputColumnIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=agg_input_expr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addAggregate, postfix_operators=[], prefix_operators=[], qualifier=m_reAggNode, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getExpression, postfix_operators=[], prefix_operators=[], qualifier=scol, selectors=[], type_arguments=None)], member=addGroupByExpression, postfix_operators=[], prefix_operators=[], qualifier=m_reAggNode, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=scol, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addColumn, postfix_operators=[], prefix_operators=[], qualifier=aggSchema, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=outputColumnIndex, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=inlineProjSchema, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=scol)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SchemaColumn, sub_type=None))), label=None) AssertStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=aggSchema, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), label=None, value=None) call[m_reAggNode.setOutputSchema, parameter[member[.aggSchema]]] local_variable[type[List], needReAggTVEs] local_variable[type[List], aggPostExprs] 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=mvColumnArray, selectors=[], type_arguments=None), name=mvCol)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Column, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=mvTableName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=mvTableAlias, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=mvCol, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TupleValueExpression, sub_type=None)), name=tve)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TupleValueExpression, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getStatementId, postfix_operators=[], prefix_operators=[], qualifier=mvTableScan, selectors=[], type_arguments=None)], member=setOrigStmtId, postfix_operators=[], prefix_operators=[], qualifier=tve, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tve, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=needReAggTVEs, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=mvColumnArray, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=numOfGroupByColumns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) call[.collectReAggNodePostExpressions, parameter[member[.joinTree], member[.needReAggTVEs], member[.aggPostExprs]]] local_variable[type[AbstractExpression], aggPostExpr] call[m_reAggNode.setPostPredicate, parameter[member[.aggPostExpr]]] if[binary_operation[member[.m_edgeCaseQueryNoFixNeeded], &&, call[.edgeCaseQueryNoFixNeeded, parameter[member[.mvDDLGroupbyColumnNames], member[.mvColumnReAggType], member[.displayColumns], member[.groupByColumns]]]]] begin[{] return[literal[false]] else begin[{] None end[}] assign[member[.m_needed], literal[true]] return[literal[true]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[processMVBasedQueryFix] operator[SEP] identifier[StmtTableScan] identifier[mvTableScan] , identifier[Set] operator[<] identifier[SchemaColumn] operator[>] identifier[scanColumns] , identifier[JoinNode] identifier[joinTree] , identifier[List] operator[<] identifier[ParsedColInfo] operator[>] identifier[displayColumns] , identifier[List] operator[<] identifier[ParsedColInfo] operator[>] identifier[groupByColumns] operator[SEP] { Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[mvTableScan] Keyword[instanceof] identifier[StmtTargetTableScan] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[Table] identifier[table] operator[=] operator[SEP] operator[SEP] identifier[StmtTargetTableScan] operator[SEP] identifier[mvTableScan] operator[SEP] operator[SEP] identifier[getTargetTable] operator[SEP] operator[SEP] operator[SEP] Keyword[assert] operator[SEP] identifier[table] operator[!=] Other[null] operator[SEP] operator[SEP] identifier[String] identifier[mvTableName] operator[=] identifier[table] operator[SEP] identifier[getTypeName] operator[SEP] operator[SEP] operator[SEP] identifier[Table] identifier[srcTable] operator[=] identifier[table] operator[SEP] identifier[getMaterializer] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[srcTable] operator[==] Other[null] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[table] operator[SEP] identifier[getIsreplicated] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[table] operator[SEP] identifier[getPartitioncolumn] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[m_mvTableScan] operator[=] identifier[mvTableScan] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[mvDDLGroupbyColumnNames] operator[=] Keyword[new] identifier[HashSet] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Column] operator[>] identifier[mvColumnArray] operator[=] identifier[CatalogUtil] operator[SEP] identifier[getSortedCatalogItems] operator[SEP] identifier[table] operator[SEP] identifier[getColumns] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[String] identifier[mvTableAlias] operator[=] identifier[getMVTableAlias] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[numOfGroupByColumns] operator[SEP] identifier[MaterializedViewInfo] identifier[mvInfo] operator[=] identifier[srcTable] operator[SEP] identifier[getViews] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[mvTableName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mvInfo] operator[!=] Other[null] operator[SEP] { identifier[String] identifier[complexGroupbyJson] operator[=] identifier[mvInfo] operator[SEP] identifier[getGroupbyexpressionsjson] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[complexGroupbyJson] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[List] operator[<] identifier[AbstractExpression] operator[>] identifier[mvComplexGroupbyCols] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[mvComplexGroupbyCols] operator[=] identifier[AbstractExpression] operator[SEP] identifier[fromJSONArrayString] operator[SEP] identifier[complexGroupbyJson] , Other[null] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[JSONException] identifier[e] operator[SEP] { identifier[e] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } identifier[numOfGroupByColumns] operator[=] identifier[mvComplexGroupbyCols] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[numOfGroupByColumns] operator[=] identifier[mvInfo] operator[SEP] identifier[getGroupbycols] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[MaterializedViewHandlerInfo] identifier[mvHandlerInfo] operator[=] identifier[table] operator[SEP] identifier[getMvhandlerinfo] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[numOfGroupByColumns] operator[=] identifier[mvHandlerInfo] operator[SEP] identifier[getGroupbycolumncount] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[scanColumns] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[&&] identifier[numOfGroupByColumns] operator[==] Other[0] operator[SEP] { identifier[Column] identifier[mvCol] operator[=] identifier[mvColumnArray] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[TupleValueExpression] identifier[tve] operator[=] Keyword[new] identifier[TupleValueExpression] operator[SEP] identifier[mvTableName] , identifier[mvTableAlias] , identifier[mvCol] , Other[0] operator[SEP] operator[SEP] identifier[tve] operator[SEP] identifier[setOrigStmtId] operator[SEP] identifier[mvTableScan] operator[SEP] identifier[getStatementId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[colName] operator[=] identifier[mvCol] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[SchemaColumn] identifier[scol] operator[=] Keyword[new] identifier[SchemaColumn] operator[SEP] identifier[mvTableName] , identifier[mvTableAlias] , identifier[colName] , identifier[colName] , identifier[tve] operator[SEP] operator[SEP] identifier[scanColumns] operator[SEP] identifier[add] operator[SEP] identifier[scol] operator[SEP] operator[SEP] } identifier[Set] operator[<] identifier[SchemaColumn] operator[>] identifier[mvDDLGroupbyColumns] operator[=] Keyword[new] identifier[HashSet] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[NodeSchema] identifier[inlineProjSchema] operator[=] Keyword[new] identifier[NodeSchema] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[SchemaColumn] identifier[scol] operator[:] identifier[scanColumns] operator[SEP] { identifier[inlineProjSchema] operator[SEP] identifier[addColumn] operator[SEP] identifier[scol] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[numOfGroupByColumns] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[Column] identifier[mvCol] operator[=] identifier[mvColumnArray] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[String] identifier[colName] operator[=] identifier[mvCol] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[TupleValueExpression] identifier[tve] operator[=] Keyword[new] identifier[TupleValueExpression] operator[SEP] identifier[mvTableName] , identifier[mvTableAlias] , identifier[mvCol] , identifier[i] operator[SEP] operator[SEP] identifier[tve] operator[SEP] identifier[setOrigStmtId] operator[SEP] identifier[mvTableScan] operator[SEP] identifier[getStatementId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[mvDDLGroupbyColumnNames] operator[SEP] identifier[add] operator[SEP] identifier[colName] operator[SEP] operator[SEP] identifier[SchemaColumn] identifier[scol] operator[=] Keyword[new] identifier[SchemaColumn] operator[SEP] identifier[mvTableName] , identifier[mvTableAlias] , identifier[colName] , identifier[colName] , identifier[tve] operator[SEP] operator[SEP] identifier[mvDDLGroupbyColumns] operator[SEP] identifier[add] operator[SEP] identifier[scol] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[scanColumns] operator[SEP] identifier[contains] operator[SEP] identifier[scol] operator[SEP] operator[SEP] { identifier[scanColumns] operator[SEP] identifier[add] operator[SEP] identifier[scol] operator[SEP] operator[SEP] identifier[inlineProjSchema] operator[SEP] identifier[addColumn] operator[SEP] identifier[scol] operator[SEP] operator[SEP] } } identifier[Map] operator[<] identifier[String] , identifier[ExpressionType] operator[>] identifier[mvColumnReAggType] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[numOfGroupByColumns] operator[SEP] identifier[i] operator[<] identifier[mvColumnArray] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[Column] identifier[mvCol] operator[=] identifier[mvColumnArray] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[ExpressionType] identifier[reAggType] operator[=] identifier[ExpressionType] operator[SEP] identifier[get] operator[SEP] identifier[mvCol] operator[SEP] identifier[getAggregatetype] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[reAggType] operator[==] identifier[ExpressionType] operator[SEP] identifier[AGGREGATE_COUNT_STAR] operator[||] identifier[reAggType] operator[==] identifier[ExpressionType] operator[SEP] identifier[AGGREGATE_COUNT] operator[SEP] { identifier[reAggType] operator[=] identifier[ExpressionType] operator[SEP] identifier[AGGREGATE_SUM] operator[SEP] } identifier[mvColumnReAggType] operator[SEP] identifier[put] operator[SEP] identifier[mvCol] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[reAggType] operator[SEP] operator[SEP] } Keyword[assert] operator[SEP] identifier[inlineProjSchema] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] operator[SEP] identifier[m_scanInlinedProjectionNode] operator[=] Keyword[new] identifier[ProjectionPlanNode] operator[SEP] identifier[inlineProjSchema] operator[SEP] operator[SEP] identifier[m_reAggNode] operator[=] Keyword[new] identifier[HashAggregatePlanNode] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[outputColumnIndex] operator[=] Other[0] operator[SEP] identifier[NodeSchema] identifier[aggSchema] operator[=] Keyword[new] identifier[NodeSchema] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[SchemaColumn] identifier[scol] operator[:] identifier[inlineProjSchema] operator[SEP] { Keyword[if] operator[SEP] identifier[mvDDLGroupbyColumns] operator[SEP] identifier[contains] operator[SEP] identifier[scol] operator[SEP] operator[SEP] { identifier[m_reAggNode] operator[SEP] identifier[addGroupByExpression] operator[SEP] identifier[scol] operator[SEP] identifier[getExpression] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[ExpressionType] identifier[reAggType] operator[=] identifier[mvColumnReAggType] operator[SEP] identifier[get] operator[SEP] identifier[scol] operator[SEP] identifier[getColumnName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[assert] operator[SEP] identifier[reAggType] operator[!=] Other[null] operator[SEP] operator[SEP] identifier[AbstractExpression] identifier[agg_input_expr] operator[=] identifier[scol] operator[SEP] identifier[getExpression] operator[SEP] operator[SEP] operator[SEP] Keyword[assert] operator[SEP] identifier[agg_input_expr] Keyword[instanceof] identifier[TupleValueExpression] operator[SEP] operator[SEP] identifier[m_reAggNode] operator[SEP] identifier[addAggregate] operator[SEP] identifier[reAggType] , literal[boolean] , identifier[outputColumnIndex] , identifier[agg_input_expr] operator[SEP] operator[SEP] } identifier[aggSchema] operator[SEP] identifier[addColumn] operator[SEP] identifier[scol] operator[SEP] operator[SEP] identifier[outputColumnIndex] operator[++] operator[SEP] } Keyword[assert] operator[SEP] identifier[aggSchema] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] operator[SEP] identifier[m_reAggNode] operator[SEP] identifier[setOutputSchema] operator[SEP] identifier[aggSchema] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[TupleValueExpression] operator[>] identifier[needReAggTVEs] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[AbstractExpression] operator[>] identifier[aggPostExprs] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[numOfGroupByColumns] operator[SEP] identifier[i] operator[<] identifier[mvColumnArray] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[Column] identifier[mvCol] operator[=] identifier[mvColumnArray] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[TupleValueExpression] identifier[tve] operator[=] Keyword[new] identifier[TupleValueExpression] operator[SEP] identifier[mvTableName] , identifier[mvTableAlias] , identifier[mvCol] , operator[-] Other[1] operator[SEP] operator[SEP] identifier[tve] operator[SEP] identifier[setOrigStmtId] operator[SEP] identifier[mvTableScan] operator[SEP] identifier[getStatementId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[needReAggTVEs] operator[SEP] identifier[add] operator[SEP] identifier[tve] operator[SEP] operator[SEP] } identifier[collectReAggNodePostExpressions] operator[SEP] identifier[joinTree] , identifier[needReAggTVEs] , identifier[aggPostExprs] operator[SEP] operator[SEP] identifier[AbstractExpression] identifier[aggPostExpr] operator[=] identifier[ExpressionUtil] operator[SEP] identifier[combinePredicates] operator[SEP] identifier[aggPostExprs] operator[SEP] operator[SEP] identifier[m_reAggNode] operator[SEP] identifier[setPostPredicate] operator[SEP] identifier[aggPostExpr] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m_edgeCaseQueryNoFixNeeded] operator[&&] identifier[edgeCaseQueryNoFixNeeded] operator[SEP] identifier[mvDDLGroupbyColumnNames] , identifier[mvColumnReAggType] , identifier[displayColumns] , identifier[groupByColumns] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[m_needed] operator[=] literal[boolean] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
private IStatus performResourceMove(CommonDropAdapter dropAdapter, IResource[] sources) { MultiStatus problems = new MultiStatus(PlatformUI.PLUGIN_ID, 1, WorkbenchNavigatorMessages.DropAdapter_problemsMoving, null); mergeStatus(problems, validateTarget(dropAdapter.getCurrentTarget(), dropAdapter.getCurrentTransfer(), dropAdapter .getCurrentOperation())); IContainer target = null; if (dropAdapter.getCurrentTarget() instanceof IVdmContainer) { target = ((IVdmContainer) dropAdapter.getCurrentTarget()) .getContainer(); } else { target = getActualTarget((IResource) dropAdapter.getCurrentTarget()); } ReadOnlyStateChecker checker = new ReadOnlyStateChecker(getShell(), WorkbenchNavigatorMessages.MoveResourceAction_title, WorkbenchNavigatorMessages.MoveResourceAction_checkMoveMessage); sources = checker.checkReadOnlyResources(sources); MoveFilesAndFoldersOperation operation = new MoveFilesAndFoldersOperation( getShell()); operation.copyResources(sources, target); return problems; }
class class_name[name] begin[{] method[performResourceMove, return_type[type[IStatus]], modifier[private], parameter[dropAdapter, sources]] begin[{] local_variable[type[MultiStatus], problems] call[.mergeStatus, parameter[member[.problems], call[.validateTarget, parameter[call[dropAdapter.getCurrentTarget, parameter[]], call[dropAdapter.getCurrentTransfer, parameter[]], call[dropAdapter.getCurrentOperation, parameter[]]]]]] local_variable[type[IContainer], target] if[binary_operation[call[dropAdapter.getCurrentTarget, parameter[]], instanceof, type[IVdmContainer]]] begin[{] assign[member[.target], Cast(expression=MethodInvocation(arguments=[], member=getCurrentTarget, postfix_operators=[], prefix_operators=[], qualifier=dropAdapter, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=IVdmContainer, sub_type=None))] else begin[{] assign[member[.target], call[.getActualTarget, parameter[Cast(expression=MethodInvocation(arguments=[], member=getCurrentTarget, postfix_operators=[], prefix_operators=[], qualifier=dropAdapter, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=IResource, sub_type=None))]]] end[}] local_variable[type[ReadOnlyStateChecker], checker] assign[member[.sources], call[checker.checkReadOnlyResources, parameter[member[.sources]]]] local_variable[type[MoveFilesAndFoldersOperation], operation] call[operation.copyResources, parameter[member[.sources], member[.target]]] return[member[.problems]] end[}] END[}]
Keyword[private] identifier[IStatus] identifier[performResourceMove] operator[SEP] identifier[CommonDropAdapter] identifier[dropAdapter] , identifier[IResource] operator[SEP] operator[SEP] identifier[sources] operator[SEP] { identifier[MultiStatus] identifier[problems] operator[=] Keyword[new] identifier[MultiStatus] operator[SEP] identifier[PlatformUI] operator[SEP] identifier[PLUGIN_ID] , Other[1] , identifier[WorkbenchNavigatorMessages] operator[SEP] identifier[DropAdapter_problemsMoving] , Other[null] operator[SEP] operator[SEP] identifier[mergeStatus] operator[SEP] identifier[problems] , identifier[validateTarget] operator[SEP] identifier[dropAdapter] operator[SEP] identifier[getCurrentTarget] operator[SEP] operator[SEP] , identifier[dropAdapter] operator[SEP] identifier[getCurrentTransfer] operator[SEP] operator[SEP] , identifier[dropAdapter] operator[SEP] identifier[getCurrentOperation] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[IContainer] identifier[target] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[dropAdapter] operator[SEP] identifier[getCurrentTarget] operator[SEP] operator[SEP] Keyword[instanceof] identifier[IVdmContainer] operator[SEP] { identifier[target] operator[=] operator[SEP] operator[SEP] identifier[IVdmContainer] operator[SEP] identifier[dropAdapter] operator[SEP] identifier[getCurrentTarget] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getContainer] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[target] operator[=] identifier[getActualTarget] operator[SEP] operator[SEP] identifier[IResource] operator[SEP] identifier[dropAdapter] operator[SEP] identifier[getCurrentTarget] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[ReadOnlyStateChecker] identifier[checker] operator[=] Keyword[new] identifier[ReadOnlyStateChecker] operator[SEP] identifier[getShell] operator[SEP] operator[SEP] , identifier[WorkbenchNavigatorMessages] operator[SEP] identifier[MoveResourceAction_title] , identifier[WorkbenchNavigatorMessages] operator[SEP] identifier[MoveResourceAction_checkMoveMessage] operator[SEP] operator[SEP] identifier[sources] operator[=] identifier[checker] operator[SEP] identifier[checkReadOnlyResources] operator[SEP] identifier[sources] operator[SEP] operator[SEP] identifier[MoveFilesAndFoldersOperation] identifier[operation] operator[=] Keyword[new] identifier[MoveFilesAndFoldersOperation] operator[SEP] identifier[getShell] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[operation] operator[SEP] identifier[copyResources] operator[SEP] identifier[sources] , identifier[target] operator[SEP] operator[SEP] Keyword[return] identifier[problems] operator[SEP] }
public boolean startsWith(Name prefix) { byte[] thisBytes = this.getByteArray(); int thisOffset = this.getByteOffset(); int thisLength = this.getByteLength(); byte[] prefixBytes = prefix.getByteArray(); int prefixOffset = prefix.getByteOffset(); int prefixLength = prefix.getByteLength(); int i = 0; while (i < prefixLength && i < thisLength && thisBytes[thisOffset + i] == prefixBytes[prefixOffset + i]) i++; return i == prefixLength; }
class class_name[name] begin[{] method[startsWith, return_type[type[boolean]], modifier[public], parameter[prefix]] begin[{] local_variable[type[byte], thisBytes] local_variable[type[int], thisOffset] local_variable[type[int], thisLength] local_variable[type[byte], prefixBytes] local_variable[type[int], prefixOffset] local_variable[type[int], prefixLength] local_variable[type[int], i] while[binary_operation[binary_operation[binary_operation[member[.i], <, member[.prefixLength]], &&, binary_operation[member[.i], <, member[.thisLength]]], &&, binary_operation[member[.thisBytes], ==, member[.prefixBytes]]]] begin[{] member[.i] end[}] return[binary_operation[member[.i], ==, member[.prefixLength]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[startsWith] operator[SEP] identifier[Name] identifier[prefix] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[thisBytes] operator[=] Keyword[this] operator[SEP] identifier[getByteArray] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[thisOffset] operator[=] Keyword[this] operator[SEP] identifier[getByteOffset] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[thisLength] operator[=] Keyword[this] operator[SEP] identifier[getByteLength] operator[SEP] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[prefixBytes] operator[=] identifier[prefix] operator[SEP] identifier[getByteArray] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[prefixOffset] operator[=] identifier[prefix] operator[SEP] identifier[getByteOffset] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[prefixLength] operator[=] identifier[prefix] operator[SEP] identifier[getByteLength] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] identifier[i] operator[<] identifier[prefixLength] operator[&&] identifier[i] operator[<] identifier[thisLength] operator[&&] identifier[thisBytes] operator[SEP] identifier[thisOffset] operator[+] identifier[i] operator[SEP] operator[==] identifier[prefixBytes] operator[SEP] identifier[prefixOffset] operator[+] identifier[i] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] Keyword[return] identifier[i] operator[==] identifier[prefixLength] operator[SEP] }
public void reportSummary(@WillClose OutputStream out) throws IOException { XMLOutput xmlOutput = new OutputStreamXMLOutput(out); try { writeXML(xmlOutput); } finally { xmlOutput.finish(); } }
class class_name[name] begin[{] method[reportSummary, return_type[void], modifier[public], parameter[out]] begin[{] local_variable[type[XMLOutput], xmlOutput] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=xmlOutput, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeXML, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=finish, postfix_operators=[], prefix_operators=[], qualifier=xmlOutput, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[reportSummary] operator[SEP] annotation[@] identifier[WillClose] identifier[OutputStream] identifier[out] operator[SEP] Keyword[throws] identifier[IOException] { identifier[XMLOutput] identifier[xmlOutput] operator[=] Keyword[new] identifier[OutputStreamXMLOutput] operator[SEP] identifier[out] operator[SEP] operator[SEP] Keyword[try] { identifier[writeXML] operator[SEP] identifier[xmlOutput] operator[SEP] operator[SEP] } Keyword[finally] { identifier[xmlOutput] operator[SEP] identifier[finish] operator[SEP] operator[SEP] operator[SEP] } }
public static List<Class<?>> getTypeArguments(Class<?> base, Class<?> implementation) { checkArgNotNull(base, "base"); checkArgNotNull(implementation, "implementation"); Map<Type, Type> resolvedTypes = new HashMap<Type, Type>(); // first we need to resolve all supertypes up to the required base class or interface // and find the right Type for it Type type; Queue<Type> toCheck = new LinkedList<Type>(); toCheck.add(implementation); while (true) { // if we have checked everything and not found the base class we return an empty list if (toCheck.isEmpty()) return ImmutableList.of(); type = toCheck.remove(); Class<?> clazz; if (type instanceof Class) { // there is no useful information for us in raw types, so just keep going up the inheritance chain clazz = (Class) type; if (base.isInterface()) { // if we are actually looking for the type parameters to an interface we also need to // look at all the ones implemented by the given current one toCheck.addAll(Arrays.asList(clazz.getGenericInterfaces())); } } else if (type instanceof ParameterizedType) { ParameterizedType parameterizedType = (ParameterizedType) type; clazz = (Class) parameterizedType.getRawType(); // for instances of ParameterizedType we extract and remember all type arguments TypeVariable<?>[] typeParameters = clazz.getTypeParameters(); Type[] actualTypeArguments = parameterizedType.getActualTypeArguments(); for (int i = 0; i < actualTypeArguments.length; i++) { resolvedTypes.put(typeParameters[i], actualTypeArguments[i]); } } else { return ImmutableList.of(); } // we can stop if we have reached the sought for base type if (base.equals(getClass(type))) break; toCheck.add(clazz.getGenericSuperclass()); } // finally, for each actual type argument provided to baseClass, // determine (if possible) the raw class for that type argument. Type[] actualTypeArguments; if (type instanceof Class) { actualTypeArguments = ((Class) type).getTypeParameters(); } else { actualTypeArguments = ((ParameterizedType) type).getActualTypeArguments(); } List<Class<?>> typeArgumentsAsClasses = new ArrayList<Class<?>>(); // resolve types by chasing down type variables. for (Type baseType : actualTypeArguments) { while (resolvedTypes.containsKey(baseType)) { baseType = resolvedTypes.get(baseType); } typeArgumentsAsClasses.add(getClass(baseType)); } return typeArgumentsAsClasses; }
class class_name[name] begin[{] method[getTypeArguments, return_type[type[List]], modifier[public static], parameter[base, implementation]] begin[{] call[.checkArgNotNull, parameter[member[.base], literal["base"]]] call[.checkArgNotNull, parameter[member[.implementation], literal["implementation"]]] local_variable[type[Map], resolvedTypes] local_variable[type[Type], type] local_variable[type[Queue], toCheck] call[toCheck.add, parameter[member[.implementation]]] while[literal[true]] begin[{] if[call[toCheck.isEmpty, parameter[]]] begin[{] return[call[ImmutableList.of, parameter[]]] else begin[{] None end[}] assign[member[.type], call[toCheck.remove, parameter[]]] local_variable[type[Class], clazz] if[binary_operation[member[.type], instanceof, type[Class]]] begin[{] assign[member[.clazz], Cast(expression=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Class, sub_type=None))] if[call[base.isInterface, parameter[]]] begin[{] call[toCheck.addAll, parameter[call[Arrays.asList, parameter[call[clazz.getGenericInterfaces, parameter[]]]]]] else begin[{] None end[}] else begin[{] if[binary_operation[member[.type], instanceof, type[ParameterizedType]]] begin[{] local_variable[type[ParameterizedType], parameterizedType] assign[member[.clazz], Cast(expression=MethodInvocation(arguments=[], member=getRawType, postfix_operators=[], prefix_operators=[], qualifier=parameterizedType, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Class, sub_type=None))] local_variable[type[TypeVariable], typeParameters] local_variable[type[Type], actualTypeArguments] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=typeParameters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), MemberReference(member=actualTypeArguments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=put, postfix_operators=[], prefix_operators=[], qualifier=resolvedTypes, 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=actualTypeArguments, 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) else begin[{] return[call[ImmutableList.of, parameter[]]] end[}] end[}] if[call[base.equals, parameter[call[.getClass, parameter[member[.type]]]]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] call[toCheck.add, parameter[call[clazz.getGenericSuperclass, parameter[]]]] end[}] local_variable[type[Type], actualTypeArguments] if[binary_operation[member[.type], instanceof, type[Class]]] begin[{] assign[member[.actualTypeArguments], Cast(expression=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Class, sub_type=None))] else begin[{] assign[member[.actualTypeArguments], Cast(expression=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ParameterizedType, sub_type=None))] end[}] local_variable[type[List], typeArgumentsAsClasses] ForStatement(body=BlockStatement(label=None, statements=[WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=baseType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=baseType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=resolvedTypes, selectors=[], type_arguments=None)), label=None)]), condition=MethodInvocation(arguments=[MemberReference(member=baseType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=resolvedTypes, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=baseType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=typeArgumentsAsClasses, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=actualTypeArguments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=baseType)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Type, sub_type=None))), label=None) return[member[.typeArgumentsAsClasses]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[getTypeArguments] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[base] , identifier[Class] operator[<] operator[?] operator[>] identifier[implementation] operator[SEP] { identifier[checkArgNotNull] operator[SEP] identifier[base] , literal[String] operator[SEP] operator[SEP] identifier[checkArgNotNull] operator[SEP] identifier[implementation] , literal[String] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[Type] , identifier[Type] operator[>] identifier[resolvedTypes] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[Type] , identifier[Type] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Type] identifier[type] operator[SEP] identifier[Queue] operator[<] identifier[Type] operator[>] identifier[toCheck] operator[=] Keyword[new] identifier[LinkedList] operator[<] identifier[Type] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[toCheck] operator[SEP] identifier[add] operator[SEP] identifier[implementation] operator[SEP] operator[SEP] Keyword[while] operator[SEP] literal[boolean] operator[SEP] { Keyword[if] operator[SEP] identifier[toCheck] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[ImmutableList] operator[SEP] identifier[of] operator[SEP] operator[SEP] operator[SEP] identifier[type] operator[=] identifier[toCheck] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[SEP] Keyword[if] operator[SEP] identifier[type] Keyword[instanceof] identifier[Class] operator[SEP] { identifier[clazz] operator[=] operator[SEP] identifier[Class] operator[SEP] identifier[type] operator[SEP] Keyword[if] operator[SEP] identifier[base] operator[SEP] identifier[isInterface] operator[SEP] operator[SEP] operator[SEP] { identifier[toCheck] operator[SEP] identifier[addAll] operator[SEP] identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[clazz] operator[SEP] identifier[getGenericInterfaces] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[type] Keyword[instanceof] identifier[ParameterizedType] operator[SEP] { identifier[ParameterizedType] identifier[parameterizedType] operator[=] operator[SEP] identifier[ParameterizedType] operator[SEP] identifier[type] operator[SEP] identifier[clazz] operator[=] operator[SEP] identifier[Class] operator[SEP] identifier[parameterizedType] operator[SEP] identifier[getRawType] operator[SEP] operator[SEP] operator[SEP] identifier[TypeVariable] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[typeParameters] operator[=] identifier[clazz] operator[SEP] identifier[getTypeParameters] operator[SEP] operator[SEP] operator[SEP] identifier[Type] operator[SEP] operator[SEP] identifier[actualTypeArguments] operator[=] identifier[parameterizedType] operator[SEP] identifier[getActualTypeArguments] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[actualTypeArguments] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[resolvedTypes] operator[SEP] identifier[put] operator[SEP] identifier[typeParameters] operator[SEP] identifier[i] operator[SEP] , identifier[actualTypeArguments] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[return] identifier[ImmutableList] operator[SEP] identifier[of] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[base] operator[SEP] identifier[equals] operator[SEP] identifier[getClass] operator[SEP] identifier[type] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] identifier[toCheck] operator[SEP] identifier[add] operator[SEP] identifier[clazz] operator[SEP] identifier[getGenericSuperclass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[Type] operator[SEP] operator[SEP] identifier[actualTypeArguments] operator[SEP] Keyword[if] operator[SEP] identifier[type] Keyword[instanceof] identifier[Class] operator[SEP] { identifier[actualTypeArguments] operator[=] operator[SEP] operator[SEP] identifier[Class] operator[SEP] identifier[type] operator[SEP] operator[SEP] identifier[getTypeParameters] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[actualTypeArguments] operator[=] operator[SEP] operator[SEP] identifier[ParameterizedType] operator[SEP] identifier[type] operator[SEP] operator[SEP] identifier[getActualTypeArguments] operator[SEP] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[typeArgumentsAsClasses] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Type] identifier[baseType] operator[:] identifier[actualTypeArguments] operator[SEP] { Keyword[while] operator[SEP] identifier[resolvedTypes] operator[SEP] identifier[containsKey] operator[SEP] identifier[baseType] operator[SEP] operator[SEP] { identifier[baseType] operator[=] identifier[resolvedTypes] operator[SEP] identifier[get] operator[SEP] identifier[baseType] operator[SEP] operator[SEP] } identifier[typeArgumentsAsClasses] operator[SEP] identifier[add] operator[SEP] identifier[getClass] operator[SEP] identifier[baseType] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[typeArgumentsAsClasses] operator[SEP] }
public static byte[] hex2byte(String str) { byte[] bytes = str.getBytes(); if ((bytes.length % 2) != 0) { throw new IllegalArgumentException(); } byte[] b2 = new byte[bytes.length / 2]; for (int n = 0; n < bytes.length; n += 2) { String item = new String(bytes, n, 2); b2[n / 2] = (byte) Integer.parseInt(item, 16); } return b2; }
class class_name[name] begin[{] method[hex2byte, return_type[type[byte]], modifier[public static], parameter[str]] begin[{] local_variable[type[byte], bytes] if[binary_operation[binary_operation[member[bytes.length], %, literal[2]], !=, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[byte], b2] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=bytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), name=item)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=b2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=/))]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=item, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16)], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=byte))), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=bytes, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=n)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[Assignment(expressionl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2))]), label=None) return[member[.b2]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[hex2byte] operator[SEP] identifier[String] identifier[str] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] operator[=] identifier[str] operator[SEP] identifier[getBytes] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[bytes] operator[SEP] identifier[length] operator[%] Other[2] operator[SEP] operator[!=] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] operator[SEP] operator[SEP] } Keyword[byte] operator[SEP] operator[SEP] identifier[b2] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[bytes] operator[SEP] identifier[length] operator[/] Other[2] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[n] operator[=] Other[0] operator[SEP] identifier[n] operator[<] identifier[bytes] operator[SEP] identifier[length] operator[SEP] identifier[n] operator[+=] Other[2] operator[SEP] { identifier[String] identifier[item] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[bytes] , identifier[n] , Other[2] operator[SEP] operator[SEP] identifier[b2] operator[SEP] identifier[n] operator[/] Other[2] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[item] , Other[16] operator[SEP] operator[SEP] } Keyword[return] identifier[b2] operator[SEP] }
static RestTemplate createRestTemplate(CredHubProperties properties, ClientHttpRequestFactory clientHttpRequestFactory) { RestTemplate restTemplate = new RestTemplate(); configureRestTemplate(restTemplate, properties.getUrl(), clientHttpRequestFactory); return restTemplate; }
class class_name[name] begin[{] method[createRestTemplate, return_type[type[RestTemplate]], modifier[static], parameter[properties, clientHttpRequestFactory]] begin[{] local_variable[type[RestTemplate], restTemplate] call[.configureRestTemplate, parameter[member[.restTemplate], call[properties.getUrl, parameter[]], member[.clientHttpRequestFactory]]] return[member[.restTemplate]] end[}] END[}]
Keyword[static] identifier[RestTemplate] identifier[createRestTemplate] operator[SEP] identifier[CredHubProperties] identifier[properties] , identifier[ClientHttpRequestFactory] identifier[clientHttpRequestFactory] operator[SEP] { identifier[RestTemplate] identifier[restTemplate] operator[=] Keyword[new] identifier[RestTemplate] operator[SEP] operator[SEP] operator[SEP] identifier[configureRestTemplate] operator[SEP] identifier[restTemplate] , identifier[properties] operator[SEP] identifier[getUrl] operator[SEP] operator[SEP] , identifier[clientHttpRequestFactory] operator[SEP] operator[SEP] Keyword[return] identifier[restTemplate] operator[SEP] }
public static String getFileNameWithoutExtenxion(String fileName) { if (fileName==null){ return null; } else { int number=fileName.lastIndexOf('.'); if (number>=0){ return fileName.substring(0, number); } else { return fileName; } } }
class class_name[name] begin[{] method[getFileNameWithoutExtenxion, return_type[type[String]], modifier[public static], parameter[fileName]] begin[{] if[binary_operation[member[.fileName], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] local_variable[type[int], number] if[binary_operation[member[.number], >=, literal[0]]] begin[{] return[call[fileName.substring, parameter[literal[0], member[.number]]]] else begin[{] return[member[.fileName]] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getFileNameWithoutExtenxion] operator[SEP] identifier[String] identifier[fileName] operator[SEP] { Keyword[if] operator[SEP] identifier[fileName] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[else] { Keyword[int] identifier[number] operator[=] identifier[fileName] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[number] operator[>=] Other[0] operator[SEP] { Keyword[return] identifier[fileName] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[number] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[fileName] operator[SEP] } } }
public static void main(String args[]) { boolean usePopup = false; for (int i = 0; i < args.length; i++) { if (args[i].equals("-usePopup")) usePopup = true; } try { store = XMLStore.createFromFile("ThreddsDatasetChooser", null); p = store.getPreferences(); } catch (IOException e) { System.out.println("XMLStore Creation failed " + e); } // put it together in a JFrame final JFrame frame = new JFrame("Thredds Dataset Chooser"); frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { chooser.save(); Rectangle bounds = frame.getBounds(); p.putBeanObject(FRAME_SIZE, bounds); try { store.save(); } catch (IOException ioe) { ioe.printStackTrace(); } System.exit(0); } }); chooser = new ThreddsDatasetChooser(p, null, frame, true, usePopup, false); chooser.setDoResolve(true); // frame.getContentPane().add(chooser); Rectangle bounds = (Rectangle) p.getBean(FRAME_SIZE, new Rectangle(50, 50, 800, 450)); frame.setBounds(bounds); frame.pack(); frame.setBounds(bounds); frame.setVisible(true); }
class class_name[name] begin[{] method[main, return_type[void], modifier[public static], parameter[args]] begin[{] local_variable[type[boolean], usePopup] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="-usePopup")], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=usePopup, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), 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=args, 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) TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=store, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ThreddsDatasetChooser"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=createFromFile, postfix_operators=[], prefix_operators=[], qualifier=XMLStore, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getPreferences, postfix_operators=[], prefix_operators=[], qualifier=store, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="XMLStore Creation failed "), operandr=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) local_variable[type[JFrame], frame] call[frame.addWindowListener, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[], member=save, postfix_operators=[], prefix_operators=[], qualifier=chooser, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getBounds, postfix_operators=[], prefix_operators=[], qualifier=frame, selectors=[], type_arguments=None), name=bounds)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Rectangle, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FRAME_SIZE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=bounds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=putBeanObject, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None), label=None), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=save, postfix_operators=[], prefix_operators=[], qualifier=store, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=ioe, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ioe, types=['IOException']))], finally_block=None, label=None, resources=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=exit, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=windowClosing, parameters=[FormalParameter(annotations=[], modifiers=set(), name=e, type=ReferenceType(arguments=None, dimensions=[], name=WindowEvent, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WindowAdapter, sub_type=None))]] assign[member[.chooser], ClassCreator(arguments=[MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=frame, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), MemberReference(member=usePopup, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ThreddsDatasetChooser, sub_type=None))] call[chooser.setDoResolve, parameter[literal[true]]] call[frame.getContentPane, parameter[]] local_variable[type[Rectangle], bounds] call[frame.setBounds, parameter[member[.bounds]]] call[frame.pack, parameter[]] call[frame.setBounds, parameter[member[.bounds]]] call[frame.setVisible, parameter[literal[true]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] identifier[args] operator[SEP] operator[SEP] operator[SEP] { Keyword[boolean] identifier[usePopup] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[args] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[args] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[usePopup] operator[=] literal[boolean] operator[SEP] } Keyword[try] { identifier[store] operator[=] identifier[XMLStore] operator[SEP] identifier[createFromFile] operator[SEP] literal[String] , Other[null] operator[SEP] operator[SEP] identifier[p] operator[=] identifier[store] operator[SEP] identifier[getPreferences] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] operator[SEP] } Keyword[final] identifier[JFrame] identifier[frame] operator[=] Keyword[new] identifier[JFrame] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[frame] operator[SEP] identifier[addWindowListener] operator[SEP] Keyword[new] identifier[WindowAdapter] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[windowClosing] operator[SEP] identifier[WindowEvent] identifier[e] operator[SEP] { identifier[chooser] operator[SEP] identifier[save] operator[SEP] operator[SEP] operator[SEP] identifier[Rectangle] identifier[bounds] operator[=] identifier[frame] operator[SEP] identifier[getBounds] operator[SEP] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[putBeanObject] operator[SEP] identifier[FRAME_SIZE] , identifier[bounds] operator[SEP] operator[SEP] Keyword[try] { identifier[store] operator[SEP] identifier[save] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[ioe] operator[SEP] { identifier[ioe] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } identifier[System] operator[SEP] identifier[exit] operator[SEP] Other[0] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[chooser] operator[=] Keyword[new] identifier[ThreddsDatasetChooser] operator[SEP] identifier[p] , Other[null] , identifier[frame] , literal[boolean] , identifier[usePopup] , literal[boolean] operator[SEP] operator[SEP] identifier[chooser] operator[SEP] identifier[setDoResolve] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[frame] operator[SEP] identifier[getContentPane] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[chooser] operator[SEP] operator[SEP] identifier[Rectangle] identifier[bounds] operator[=] operator[SEP] identifier[Rectangle] operator[SEP] identifier[p] operator[SEP] identifier[getBean] operator[SEP] identifier[FRAME_SIZE] , Keyword[new] identifier[Rectangle] operator[SEP] Other[50] , Other[50] , Other[800] , Other[450] operator[SEP] operator[SEP] operator[SEP] identifier[frame] operator[SEP] identifier[setBounds] operator[SEP] identifier[bounds] operator[SEP] operator[SEP] identifier[frame] operator[SEP] identifier[pack] operator[SEP] operator[SEP] operator[SEP] identifier[frame] operator[SEP] identifier[setBounds] operator[SEP] identifier[bounds] operator[SEP] operator[SEP] identifier[frame] operator[SEP] identifier[setVisible] operator[SEP] literal[boolean] operator[SEP] operator[SEP] }
private static TableModel entity2ModelWithConfig(Class<?> entityClass) { TableModel model; model = entity2ModelIgnoreConfigMethod(entityClass); Method method = null; try { method = entityClass.getMethod("config", TableModel.class); } catch (Exception e) {// NOSONAR } if (method != null) try { method.invoke(null, model); } catch (Exception e) { throw new DialectException(e); } if (model == null) throw new DialectException("Can not create TableModel for entityClass " + entityClass); return model; }
class class_name[name] begin[{] method[entity2ModelWithConfig, return_type[type[TableModel]], modifier[private static], parameter[entityClass]] begin[{] local_variable[type[TableModel], model] assign[member[.model], call[.entity2ModelIgnoreConfigMethod, parameter[member[.entityClass]]]] local_variable[type[Method], method] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="config"), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TableModel, sub_type=None))], member=getMethod, postfix_operators=[], prefix_operators=[], qualifier=entityClass, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) if[binary_operation[member[.method], !=, literal[null]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=model, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), 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=DialectException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] if[binary_operation[member[.model], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Can not create TableModel for entityClass "), operandr=MemberReference(member=entityClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DialectException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.model]] end[}] END[}]
Keyword[private] Keyword[static] identifier[TableModel] identifier[entity2ModelWithConfig] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[entityClass] operator[SEP] { identifier[TableModel] identifier[model] operator[SEP] identifier[model] operator[=] identifier[entity2ModelIgnoreConfigMethod] operator[SEP] identifier[entityClass] operator[SEP] operator[SEP] identifier[Method] identifier[method] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[method] operator[=] identifier[entityClass] operator[SEP] identifier[getMethod] operator[SEP] literal[String] , identifier[TableModel] operator[SEP] Keyword[class] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { } Keyword[if] operator[SEP] identifier[method] operator[!=] Other[null] operator[SEP] Keyword[try] { identifier[method] operator[SEP] identifier[invoke] operator[SEP] Other[null] , identifier[model] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[DialectException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[model] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[DialectException] operator[SEP] literal[String] operator[+] identifier[entityClass] operator[SEP] operator[SEP] Keyword[return] identifier[model] operator[SEP] }
static public Element selectParentElement(Element element, String parentName) { Element parentElement = (Element) element.getParentNode(); if (parentElement == null) { return null; } if (parentElement.getTagName().equals(parentName)) { return parentElement; } return selectParentElement(parentElement, parentName); }
class class_name[name] begin[{] method[selectParentElement, return_type[type[Element]], modifier[public static], parameter[element, parentName]] begin[{] local_variable[type[Element], parentElement] if[binary_operation[member[.parentElement], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] if[call[parentElement.getTagName, parameter[]]] begin[{] return[member[.parentElement]] else begin[{] None end[}] return[call[.selectParentElement, parameter[member[.parentElement], member[.parentName]]]] end[}] END[}]
Keyword[static] Keyword[public] identifier[Element] identifier[selectParentElement] operator[SEP] identifier[Element] identifier[element] , identifier[String] identifier[parentName] operator[SEP] { identifier[Element] identifier[parentElement] operator[=] operator[SEP] identifier[Element] operator[SEP] identifier[element] operator[SEP] identifier[getParentNode] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[parentElement] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[parentElement] operator[SEP] identifier[getTagName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[parentName] operator[SEP] operator[SEP] { Keyword[return] identifier[parentElement] operator[SEP] } Keyword[return] identifier[selectParentElement] operator[SEP] identifier[parentElement] , identifier[parentName] operator[SEP] operator[SEP] }
@Override public String[] getAvailabilityZones(String region) { return configInstance .getStringProperty( namespace + region + "." + CONFIG_AVAILABILITY_ZONE_PREFIX, DEFAULT_ZONE).get().split(URL_SEPARATOR); }
class class_name[name] begin[{] method[getAvailabilityZones, return_type[type[String]], modifier[public], parameter[region]] begin[{] return[call[configInstance.getStringProperty, parameter[binary_operation[binary_operation[binary_operation[member[.namespace], +, member[.region]], +, literal["."]], +, member[.CONFIG_AVAILABILITY_ZONE_PREFIX]], member[.DEFAULT_ZONE]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[String] operator[SEP] operator[SEP] identifier[getAvailabilityZones] operator[SEP] identifier[String] identifier[region] operator[SEP] { Keyword[return] identifier[configInstance] operator[SEP] identifier[getStringProperty] operator[SEP] identifier[namespace] operator[+] identifier[region] operator[+] literal[String] operator[+] identifier[CONFIG_AVAILABILITY_ZONE_PREFIX] , identifier[DEFAULT_ZONE] operator[SEP] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[split] operator[SEP] identifier[URL_SEPARATOR] operator[SEP] operator[SEP] }
public double convertFromTo(AnalyticModel model, double optionMaturity, double optionStrike, double value, QuotingConvention fromQuotingConvention, QuotingConvention toQuotingConvention) { if(fromQuotingConvention.equals(toQuotingConvention)) { return value; } if(getDiscountCurve() == null) { throw new IllegalArgumentException("Missing discount curve. Conversion of QuotingConvention requires forward curve and discount curve to be set."); } if(getForwardCurve() == null) { throw new IllegalArgumentException("Missing forward curve. Conversion of QuotingConvention requires forward curve and discount curve to be set."); } double periodStart = optionMaturity; double periodEnd = periodStart + getForwardCurve().getPaymentOffset(periodStart); double forward = getForwardCurve().getForward(model, periodStart); double daycountFraction; if(getDaycountConvention() != null) { LocalDate startDate = referenceDate.plusDays((int)Math.round(periodStart*365)); LocalDate endDate = referenceDate.plusDays((int)Math.round(periodEnd*365)); daycountFraction = getDaycountConvention().getDaycountFraction(startDate, endDate); } else { daycountFraction = getForwardCurve().getPaymentOffset(periodStart); } double payoffUnit = getDiscountCurve().getDiscountFactor(optionMaturity+getForwardCurve().getPaymentOffset(optionMaturity)) * daycountFraction; if(toQuotingConvention.equals(QuotingConvention.PRICE) && fromQuotingConvention.equals(QuotingConvention.VOLATILITYLOGNORMAL)) { return AnalyticFormulas.blackScholesGeneralizedOptionValue(forward, value, optionMaturity, optionStrike, payoffUnit); } else if(toQuotingConvention.equals(QuotingConvention.PRICE) && fromQuotingConvention.equals(QuotingConvention.VOLATILITYNORMAL)) { return AnalyticFormulas.bachelierOptionValue(forward, value, optionMaturity, optionStrike, payoffUnit); } else if(toQuotingConvention.equals(QuotingConvention.VOLATILITYLOGNORMAL) && fromQuotingConvention.equals(QuotingConvention.PRICE)) { return AnalyticFormulas.blackScholesOptionImpliedVolatility(forward, optionMaturity, optionStrike, payoffUnit, value); } else if(toQuotingConvention.equals(QuotingConvention.VOLATILITYNORMAL) && fromQuotingConvention.equals(QuotingConvention.PRICE)) { return AnalyticFormulas.bachelierOptionImpliedVolatility(forward, optionMaturity, optionStrike, payoffUnit, value); } else { return convertFromTo(model, optionMaturity, optionStrike, convertFromTo(model, optionMaturity, optionStrike, value, fromQuotingConvention, QuotingConvention.PRICE), QuotingConvention.PRICE, toQuotingConvention); } }
class class_name[name] begin[{] method[convertFromTo, return_type[type[double]], modifier[public], parameter[model, optionMaturity, optionStrike, value, fromQuotingConvention, toQuotingConvention]] begin[{] if[call[fromQuotingConvention.equals, parameter[member[.toQuotingConvention]]]] begin[{] return[member[.value]] else begin[{] None end[}] if[binary_operation[call[.getDiscountCurve, parameter[]], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Missing discount curve. Conversion of QuotingConvention requires forward curve and discount curve to be set.")], 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[}] if[binary_operation[call[.getForwardCurve, parameter[]], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Missing forward curve. Conversion of QuotingConvention requires forward curve and discount curve to be set.")], 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[}] local_variable[type[double], periodStart] local_variable[type[double], periodEnd] local_variable[type[double], forward] local_variable[type[double], daycountFraction] if[binary_operation[call[.getDaycountConvention, parameter[]], !=, literal[null]]] begin[{] local_variable[type[LocalDate], startDate] local_variable[type[LocalDate], endDate] assign[member[.daycountFraction], call[.getDaycountConvention, parameter[]]] else begin[{] assign[member[.daycountFraction], call[.getForwardCurve, parameter[]]] end[}] local_variable[type[double], payoffUnit] if[binary_operation[call[toQuotingConvention.equals, parameter[member[QuotingConvention.PRICE]]], &&, call[fromQuotingConvention.equals, parameter[member[QuotingConvention.VOLATILITYLOGNORMAL]]]]] begin[{] return[call[AnalyticFormulas.blackScholesGeneralizedOptionValue, parameter[member[.forward], member[.value], member[.optionMaturity], member[.optionStrike], member[.payoffUnit]]]] else begin[{] if[binary_operation[call[toQuotingConvention.equals, parameter[member[QuotingConvention.PRICE]]], &&, call[fromQuotingConvention.equals, parameter[member[QuotingConvention.VOLATILITYNORMAL]]]]] begin[{] return[call[AnalyticFormulas.bachelierOptionValue, parameter[member[.forward], member[.value], member[.optionMaturity], member[.optionStrike], member[.payoffUnit]]]] else begin[{] if[binary_operation[call[toQuotingConvention.equals, parameter[member[QuotingConvention.VOLATILITYLOGNORMAL]]], &&, call[fromQuotingConvention.equals, parameter[member[QuotingConvention.PRICE]]]]] begin[{] return[call[AnalyticFormulas.blackScholesOptionImpliedVolatility, parameter[member[.forward], member[.optionMaturity], member[.optionStrike], member[.payoffUnit], member[.value]]]] else begin[{] if[binary_operation[call[toQuotingConvention.equals, parameter[member[QuotingConvention.VOLATILITYNORMAL]]], &&, call[fromQuotingConvention.equals, parameter[member[QuotingConvention.PRICE]]]]] begin[{] return[call[AnalyticFormulas.bachelierOptionImpliedVolatility, parameter[member[.forward], member[.optionMaturity], member[.optionStrike], member[.payoffUnit], member[.value]]]] else begin[{] return[call[.convertFromTo, parameter[member[.model], member[.optionMaturity], member[.optionStrike], call[.convertFromTo, parameter[member[.model], member[.optionMaturity], member[.optionStrike], member[.value], member[.fromQuotingConvention], member[QuotingConvention.PRICE]]], member[QuotingConvention.PRICE], member[.toQuotingConvention]]]] end[}] end[}] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[double] identifier[convertFromTo] operator[SEP] identifier[AnalyticModel] identifier[model] , Keyword[double] identifier[optionMaturity] , Keyword[double] identifier[optionStrike] , Keyword[double] identifier[value] , identifier[QuotingConvention] identifier[fromQuotingConvention] , identifier[QuotingConvention] identifier[toQuotingConvention] operator[SEP] { Keyword[if] operator[SEP] identifier[fromQuotingConvention] operator[SEP] identifier[equals] operator[SEP] identifier[toQuotingConvention] operator[SEP] operator[SEP] { Keyword[return] identifier[value] operator[SEP] } Keyword[if] operator[SEP] identifier[getDiscountCurve] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[getForwardCurve] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[double] identifier[periodStart] operator[=] identifier[optionMaturity] operator[SEP] Keyword[double] identifier[periodEnd] operator[=] identifier[periodStart] operator[+] identifier[getForwardCurve] operator[SEP] operator[SEP] operator[SEP] identifier[getPaymentOffset] operator[SEP] identifier[periodStart] operator[SEP] operator[SEP] Keyword[double] identifier[forward] operator[=] identifier[getForwardCurve] operator[SEP] operator[SEP] operator[SEP] identifier[getForward] operator[SEP] identifier[model] , identifier[periodStart] operator[SEP] operator[SEP] Keyword[double] identifier[daycountFraction] operator[SEP] Keyword[if] operator[SEP] identifier[getDaycountConvention] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[LocalDate] identifier[startDate] operator[=] identifier[referenceDate] operator[SEP] identifier[plusDays] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[Math] operator[SEP] identifier[round] operator[SEP] identifier[periodStart] operator[*] Other[365] operator[SEP] operator[SEP] operator[SEP] identifier[LocalDate] identifier[endDate] operator[=] identifier[referenceDate] operator[SEP] identifier[plusDays] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[Math] operator[SEP] identifier[round] operator[SEP] identifier[periodEnd] operator[*] Other[365] operator[SEP] operator[SEP] operator[SEP] identifier[daycountFraction] operator[=] identifier[getDaycountConvention] operator[SEP] operator[SEP] operator[SEP] identifier[getDaycountFraction] operator[SEP] identifier[startDate] , identifier[endDate] operator[SEP] operator[SEP] } Keyword[else] { identifier[daycountFraction] operator[=] identifier[getForwardCurve] operator[SEP] operator[SEP] operator[SEP] identifier[getPaymentOffset] operator[SEP] identifier[periodStart] operator[SEP] operator[SEP] } Keyword[double] identifier[payoffUnit] operator[=] identifier[getDiscountCurve] operator[SEP] operator[SEP] operator[SEP] identifier[getDiscountFactor] operator[SEP] identifier[optionMaturity] operator[+] identifier[getForwardCurve] operator[SEP] operator[SEP] operator[SEP] identifier[getPaymentOffset] operator[SEP] identifier[optionMaturity] operator[SEP] operator[SEP] operator[*] identifier[daycountFraction] operator[SEP] Keyword[if] operator[SEP] identifier[toQuotingConvention] operator[SEP] identifier[equals] operator[SEP] identifier[QuotingConvention] operator[SEP] identifier[PRICE] operator[SEP] operator[&&] identifier[fromQuotingConvention] operator[SEP] identifier[equals] operator[SEP] identifier[QuotingConvention] operator[SEP] identifier[VOLATILITYLOGNORMAL] operator[SEP] operator[SEP] { Keyword[return] identifier[AnalyticFormulas] operator[SEP] identifier[blackScholesGeneralizedOptionValue] operator[SEP] identifier[forward] , identifier[value] , identifier[optionMaturity] , identifier[optionStrike] , identifier[payoffUnit] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[toQuotingConvention] operator[SEP] identifier[equals] operator[SEP] identifier[QuotingConvention] operator[SEP] identifier[PRICE] operator[SEP] operator[&&] identifier[fromQuotingConvention] operator[SEP] identifier[equals] operator[SEP] identifier[QuotingConvention] operator[SEP] identifier[VOLATILITYNORMAL] operator[SEP] operator[SEP] { Keyword[return] identifier[AnalyticFormulas] operator[SEP] identifier[bachelierOptionValue] operator[SEP] identifier[forward] , identifier[value] , identifier[optionMaturity] , identifier[optionStrike] , identifier[payoffUnit] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[toQuotingConvention] operator[SEP] identifier[equals] operator[SEP] identifier[QuotingConvention] operator[SEP] identifier[VOLATILITYLOGNORMAL] operator[SEP] operator[&&] identifier[fromQuotingConvention] operator[SEP] identifier[equals] operator[SEP] identifier[QuotingConvention] operator[SEP] identifier[PRICE] operator[SEP] operator[SEP] { Keyword[return] identifier[AnalyticFormulas] operator[SEP] identifier[blackScholesOptionImpliedVolatility] operator[SEP] identifier[forward] , identifier[optionMaturity] , identifier[optionStrike] , identifier[payoffUnit] , identifier[value] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[toQuotingConvention] operator[SEP] identifier[equals] operator[SEP] identifier[QuotingConvention] operator[SEP] identifier[VOLATILITYNORMAL] operator[SEP] operator[&&] identifier[fromQuotingConvention] operator[SEP] identifier[equals] operator[SEP] identifier[QuotingConvention] operator[SEP] identifier[PRICE] operator[SEP] operator[SEP] { Keyword[return] identifier[AnalyticFormulas] operator[SEP] identifier[bachelierOptionImpliedVolatility] operator[SEP] identifier[forward] , identifier[optionMaturity] , identifier[optionStrike] , identifier[payoffUnit] , identifier[value] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[convertFromTo] operator[SEP] identifier[model] , identifier[optionMaturity] , identifier[optionStrike] , identifier[convertFromTo] operator[SEP] identifier[model] , identifier[optionMaturity] , identifier[optionStrike] , identifier[value] , identifier[fromQuotingConvention] , identifier[QuotingConvention] operator[SEP] identifier[PRICE] operator[SEP] , identifier[QuotingConvention] operator[SEP] identifier[PRICE] , identifier[toQuotingConvention] operator[SEP] operator[SEP] } }
public java.util.List<java.util.Map<String, AttributeValue>> getKeys() { return keys; }
class class_name[name] begin[{] method[getKeys, return_type[type[java]], modifier[public], parameter[]] begin[{] return[member[.keys]] end[}] END[}]
Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[AttributeValue] operator[>] operator[>] identifier[getKeys] operator[SEP] operator[SEP] { Keyword[return] identifier[keys] operator[SEP] }
public SDVariable step(String name, SDVariable in, double cutoff) { validateNumerical("step", in); SDVariable ret = f().step(in, cutoff); return updateVariableNameAndReference(ret, name); }
class class_name[name] begin[{] method[step, return_type[type[SDVariable]], modifier[public], parameter[name, in, cutoff]] begin[{] call[.validateNumerical, parameter[literal["step"], member[.in]]] local_variable[type[SDVariable], ret] return[call[.updateVariableNameAndReference, parameter[member[.ret], member[.name]]]] end[}] END[}]
Keyword[public] identifier[SDVariable] identifier[step] operator[SEP] identifier[String] identifier[name] , identifier[SDVariable] identifier[in] , Keyword[double] identifier[cutoff] operator[SEP] { identifier[validateNumerical] operator[SEP] literal[String] , identifier[in] operator[SEP] operator[SEP] identifier[SDVariable] identifier[ret] operator[=] identifier[f] operator[SEP] operator[SEP] operator[SEP] identifier[step] operator[SEP] identifier[in] , identifier[cutoff] operator[SEP] operator[SEP] Keyword[return] identifier[updateVariableNameAndReference] operator[SEP] identifier[ret] , identifier[name] operator[SEP] operator[SEP] }
private boolean convertStructure(Structure s, StructureMembers sm ) { boolean hasHeap = false; for (StructureMembers.Member m : sm.getMembers()) { Variable v2 = s.findVariable(m.getName()); assert v2 != null; H5header.Vinfo vm = (H5header.Vinfo) v2.getSPobject(); // apparently each member may have seperate byte order (!!!??) if (vm.typeInfo.endian >= 0) m.setDataObject(vm.typeInfo.endian == RandomAccessFile.LITTLE_ENDIAN ? ByteOrder.LITTLE_ENDIAN : ByteOrder.BIG_ENDIAN); // vm.dataPos : offset since start of Structure m.setDataParam((int) vm.dataPos); // track if there is a heap if (v2.getDataType() == DataType.STRING || v2.isVariableLength()) hasHeap = true; // recurse if (v2 instanceof Structure) { Structure nested = (Structure) v2; StructureMembers nestSm = nested.makeStructureMembers(); m.setStructureMembers(nestSm); hasHeap |= convertStructure(nested, nestSm); } } return hasHeap; }
class class_name[name] begin[{] method[convertStructure, return_type[type[boolean]], modifier[private], parameter[s, sm]] begin[{] local_variable[type[boolean], hasHeap] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None)], member=findVariable, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[], type_arguments=None), name=v2)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Variable, sub_type=None)), AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=v2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=getSPobject, postfix_operators=[], prefix_operators=[], qualifier=v2, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=H5header, sub_type=ReferenceType(arguments=None, dimensions=None, name=Vinfo, sub_type=None))), name=vm)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=H5header, sub_type=ReferenceType(arguments=None, dimensions=None, name=Vinfo, sub_type=None))), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=endian, postfix_operators=[], prefix_operators=[], qualifier=vm.typeInfo, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=endian, postfix_operators=[], prefix_operators=[], qualifier=vm.typeInfo, selectors=[]), operandr=MemberReference(member=LITTLE_ENDIAN, postfix_operators=[], prefix_operators=[], qualifier=RandomAccessFile, selectors=[]), operator===), if_false=MemberReference(member=BIG_ENDIAN, postfix_operators=[], prefix_operators=[], qualifier=ByteOrder, selectors=[]), if_true=MemberReference(member=LITTLE_ENDIAN, postfix_operators=[], prefix_operators=[], qualifier=ByteOrder, selectors=[]))], member=setDataObject, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=dataPos, postfix_operators=[], prefix_operators=[], qualifier=vm, selectors=[]), type=BasicType(dimensions=[], name=int))], member=setDataParam, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getDataType, postfix_operators=[], prefix_operators=[], qualifier=v2, selectors=[], type_arguments=None), operandr=MemberReference(member=STRING, postfix_operators=[], prefix_operators=[], qualifier=DataType, selectors=[]), operator===), operandr=MethodInvocation(arguments=[], member=isVariableLength, postfix_operators=[], prefix_operators=[], qualifier=v2, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=hasHeap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=v2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Structure, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=v2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Structure, sub_type=None)), name=nested)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Structure, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=makeStructureMembers, postfix_operators=[], prefix_operators=[], qualifier=nested, selectors=[], type_arguments=None), name=nestSm)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StructureMembers, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=nestSm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setStructureMembers, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=hasHeap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=|=, value=MethodInvocation(arguments=[MemberReference(member=nested, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=nestSm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convertStructure, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getMembers, postfix_operators=[], prefix_operators=[], qualifier=sm, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=m)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StructureMembers, sub_type=ReferenceType(arguments=None, dimensions=None, name=Member, sub_type=None)))), label=None) return[member[.hasHeap]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[convertStructure] operator[SEP] identifier[Structure] identifier[s] , identifier[StructureMembers] identifier[sm] operator[SEP] { Keyword[boolean] identifier[hasHeap] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[StructureMembers] operator[SEP] identifier[Member] identifier[m] operator[:] identifier[sm] operator[SEP] identifier[getMembers] operator[SEP] operator[SEP] operator[SEP] { identifier[Variable] identifier[v2] operator[=] identifier[s] operator[SEP] identifier[findVariable] operator[SEP] identifier[m] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[assert] identifier[v2] operator[!=] Other[null] operator[SEP] identifier[H5header] operator[SEP] identifier[Vinfo] identifier[vm] operator[=] operator[SEP] identifier[H5header] operator[SEP] identifier[Vinfo] operator[SEP] identifier[v2] operator[SEP] identifier[getSPobject] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[vm] operator[SEP] identifier[typeInfo] operator[SEP] identifier[endian] operator[>=] Other[0] operator[SEP] identifier[m] operator[SEP] identifier[setDataObject] operator[SEP] identifier[vm] operator[SEP] identifier[typeInfo] operator[SEP] identifier[endian] operator[==] identifier[RandomAccessFile] operator[SEP] identifier[LITTLE_ENDIAN] operator[?] identifier[ByteOrder] operator[SEP] identifier[LITTLE_ENDIAN] operator[:] identifier[ByteOrder] operator[SEP] identifier[BIG_ENDIAN] operator[SEP] operator[SEP] identifier[m] operator[SEP] identifier[setDataParam] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[vm] operator[SEP] identifier[dataPos] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[v2] operator[SEP] identifier[getDataType] operator[SEP] operator[SEP] operator[==] identifier[DataType] operator[SEP] identifier[STRING] operator[||] identifier[v2] operator[SEP] identifier[isVariableLength] operator[SEP] operator[SEP] operator[SEP] identifier[hasHeap] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[v2] Keyword[instanceof] identifier[Structure] operator[SEP] { identifier[Structure] identifier[nested] operator[=] operator[SEP] identifier[Structure] operator[SEP] identifier[v2] operator[SEP] identifier[StructureMembers] identifier[nestSm] operator[=] identifier[nested] operator[SEP] identifier[makeStructureMembers] operator[SEP] operator[SEP] operator[SEP] identifier[m] operator[SEP] identifier[setStructureMembers] operator[SEP] identifier[nestSm] operator[SEP] operator[SEP] identifier[hasHeap] operator[|=] identifier[convertStructure] operator[SEP] identifier[nested] , identifier[nestSm] operator[SEP] operator[SEP] } } Keyword[return] identifier[hasHeap] operator[SEP] }
public BindingBuilder<S, T, V> checking(Validator<? super T, ? extends V> targetValidator) { return new DefaultBindingBuilder<S, T, V>(getSource(), getSourceValidator(), getConverter(), targetValidator, getCallback()); }
class class_name[name] begin[{] method[checking, return_type[type[BindingBuilder]], modifier[public], parameter[targetValidator]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getSource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getSourceValidator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getConverter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=targetValidator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getCallback, 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=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=S, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None))], dimensions=None, name=DefaultBindingBuilder, sub_type=None))] end[}] END[}]
Keyword[public] identifier[BindingBuilder] operator[<] identifier[S] , identifier[T] , identifier[V] operator[>] identifier[checking] operator[SEP] identifier[Validator] operator[<] operator[?] Keyword[super] identifier[T] , operator[?] Keyword[extends] identifier[V] operator[>] identifier[targetValidator] operator[SEP] { Keyword[return] Keyword[new] identifier[DefaultBindingBuilder] operator[<] identifier[S] , identifier[T] , identifier[V] operator[>] operator[SEP] identifier[getSource] operator[SEP] operator[SEP] , identifier[getSourceValidator] operator[SEP] operator[SEP] , identifier[getConverter] operator[SEP] operator[SEP] , identifier[targetValidator] , identifier[getCallback] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public int getInMemoryDataSize() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "getInMemoryDataSize"); int dataSize; // If tuning has requested return the size of the message we reference, // then delegate to the message. Otherwise call our parent to get a // (small) default size. if (_sizeRefsByMsgSize) { try { dataSize = getReferredItem().getInMemoryDataSize(); } catch (SevereMessageStoreException e) { com.ibm.ws.ffdc.FFDCFilter.processException(e,"com.ibm.ws.sib.msgstore.ItemReference.getInMemoryDataSize","244",this); // After FFDCing anything nasty, fall back to the standard answer dataSize = super.getInMemoryDataSize(); } } else { dataSize = super.getInMemoryDataSize(); } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "getInMemoryDataSize", dataSize); return dataSize; }
class class_name[name] begin[{] method[getInMemoryDataSize, return_type[type[int]], modifier[public], parameter[]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[THIS[], member[.tc], literal["getInMemoryDataSize"]]] else begin[{] None end[}] local_variable[type[int], dataSize] if[member[._sizeRefsByMsgSize]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dataSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getReferredItem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getInMemoryDataSize, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], 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.msgstore.ItemReference.getInMemoryDataSize"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="244"), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=com.ibm.ws.ffdc.FFDCFilter, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=dataSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=SuperMethodInvocation(arguments=[], member=getInMemoryDataSize, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SevereMessageStoreException']))], finally_block=None, label=None, resources=None) else begin[{] assign[member[.dataSize], SuperMethodInvocation(arguments=[], member=getInMemoryDataSize, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[THIS[], member[.tc], literal["getInMemoryDataSize"], member[.dataSize]]] else begin[{] None end[}] return[member[.dataSize]] end[}] END[}]
Keyword[public] Keyword[int] identifier[getInMemoryDataSize] 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[entry] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] Keyword[int] identifier[dataSize] operator[SEP] Keyword[if] operator[SEP] identifier[_sizeRefsByMsgSize] operator[SEP] { Keyword[try] { identifier[dataSize] operator[=] identifier[getReferredItem] operator[SEP] operator[SEP] operator[SEP] identifier[getInMemoryDataSize] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SevereMessageStoreException] identifier[e] operator[SEP] { identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ws] operator[SEP] identifier[ffdc] operator[SEP] identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[e] , literal[String] , literal[String] , Keyword[this] operator[SEP] operator[SEP] identifier[dataSize] operator[=] Keyword[super] operator[SEP] identifier[getInMemoryDataSize] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[dataSize] operator[=] Keyword[super] operator[SEP] identifier[getInMemoryDataSize] 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] Keyword[this] , identifier[tc] , literal[String] , identifier[dataSize] operator[SEP] operator[SEP] Keyword[return] identifier[dataSize] operator[SEP] }
public final <VH extends RecyclerView.ViewHolder> BuilderType setAdapter( @Nullable final RecyclerView.Adapter<VH> adapter, @Nullable final RecyclerView.LayoutManager layoutManager, @Nullable final DialogInterface.OnClickListener listener) { getProduct().setAdapter(adapter, layoutManager, listener); return self(); }
class class_name[name] begin[{] method[setAdapter, return_type[type[BuilderType]], modifier[final public], parameter[adapter, layoutManager, listener]] begin[{] call[.getProduct, parameter[]] return[call[.self, parameter[]]] end[}] END[}]
Keyword[public] Keyword[final] operator[<] identifier[VH] Keyword[extends] identifier[RecyclerView] operator[SEP] identifier[ViewHolder] operator[>] identifier[BuilderType] identifier[setAdapter] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[RecyclerView] operator[SEP] identifier[Adapter] operator[<] identifier[VH] operator[>] identifier[adapter] , annotation[@] identifier[Nullable] Keyword[final] identifier[RecyclerView] operator[SEP] identifier[LayoutManager] identifier[layoutManager] , annotation[@] identifier[Nullable] Keyword[final] identifier[DialogInterface] operator[SEP] identifier[OnClickListener] identifier[listener] operator[SEP] { identifier[getProduct] operator[SEP] operator[SEP] operator[SEP] identifier[setAdapter] operator[SEP] identifier[adapter] , identifier[layoutManager] , identifier[listener] operator[SEP] operator[SEP] Keyword[return] identifier[self] operator[SEP] operator[SEP] operator[SEP] }
public void resizeEip(String eip, int newBandwidthInMbps) { this.resizeEip(new ResizeEipRequest().withEip(eip).withNewBandwidthInMbps(newBandwidthInMbps)); }
class class_name[name] begin[{] method[resizeEip, return_type[void], modifier[public], parameter[eip, newBandwidthInMbps]] begin[{] THIS[call[None.resizeEip, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=eip, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withEip, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=newBandwidthInMbps, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withNewBandwidthInMbps, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=ResizeEipRequest, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[resizeEip] operator[SEP] identifier[String] identifier[eip] , Keyword[int] identifier[newBandwidthInMbps] operator[SEP] { Keyword[this] operator[SEP] identifier[resizeEip] operator[SEP] Keyword[new] identifier[ResizeEipRequest] operator[SEP] operator[SEP] operator[SEP] identifier[withEip] operator[SEP] identifier[eip] operator[SEP] operator[SEP] identifier[withNewBandwidthInMbps] operator[SEP] identifier[newBandwidthInMbps] operator[SEP] operator[SEP] operator[SEP] }
public void addPort(TDefinitions description) { // Create the interfaces TPortType interfaceType = wsdlFactory.createTPortType(); description.getAnyTopLevelOptionalElement().add(interfaceType); String interfaceName = this.getControlProperty(MessageControl.INTERFACE_NAME); interfaceType.setName(interfaceName); this.addInterfaceOperationTypes(interfaceType); }
class class_name[name] begin[{] method[addPort, return_type[void], modifier[public], parameter[description]] begin[{] local_variable[type[TPortType], interfaceType] call[description.getAnyTopLevelOptionalElement, parameter[]] local_variable[type[String], interfaceName] call[interfaceType.setName, parameter[member[.interfaceName]]] THIS[call[None.addInterfaceOperationTypes, parameter[member[.interfaceType]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addPort] operator[SEP] identifier[TDefinitions] identifier[description] operator[SEP] { identifier[TPortType] identifier[interfaceType] operator[=] identifier[wsdlFactory] operator[SEP] identifier[createTPortType] operator[SEP] operator[SEP] operator[SEP] identifier[description] operator[SEP] identifier[getAnyTopLevelOptionalElement] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[interfaceType] operator[SEP] operator[SEP] identifier[String] identifier[interfaceName] operator[=] Keyword[this] operator[SEP] identifier[getControlProperty] operator[SEP] identifier[MessageControl] operator[SEP] identifier[INTERFACE_NAME] operator[SEP] operator[SEP] identifier[interfaceType] operator[SEP] identifier[setName] operator[SEP] identifier[interfaceName] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[addInterfaceOperationTypes] operator[SEP] identifier[interfaceType] operator[SEP] operator[SEP] }
public com.ibm.websphere.cache.CacheEntry getEntry(com.ibm.websphere.cache.EntryInfo ei) { return getEntry(ei, true); }
class class_name[name] begin[{] method[getEntry, return_type[type[com]], modifier[public], parameter[ei]] begin[{] return[call[.getEntry, parameter[member[.ei], literal[true]]]] end[}] END[}]
Keyword[public] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[websphere] operator[SEP] identifier[cache] operator[SEP] identifier[CacheEntry] identifier[getEntry] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[websphere] operator[SEP] identifier[cache] operator[SEP] identifier[EntryInfo] identifier[ei] operator[SEP] { Keyword[return] identifier[getEntry] operator[SEP] identifier[ei] , literal[boolean] operator[SEP] operator[SEP] }
public Production getProduction(int eventCode) { assert (eventCode >= 0 && eventCode < containers.size()); return containers.get(getNumberOfEvents() - 1 - eventCode); }
class class_name[name] begin[{] method[getProduction, return_type[type[Production]], modifier[public], parameter[eventCode]] begin[{] AssertStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=eventCode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=eventCode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=containers, selectors=[], type_arguments=None), operator=<), operator=&&), label=None, value=None) return[call[containers.get, parameter[binary_operation[binary_operation[call[.getNumberOfEvents, parameter[]], -, literal[1]], -, member[.eventCode]]]]] end[}] END[}]
Keyword[public] identifier[Production] identifier[getProduction] operator[SEP] Keyword[int] identifier[eventCode] operator[SEP] { Keyword[assert] operator[SEP] identifier[eventCode] operator[>=] Other[0] operator[&&] identifier[eventCode] operator[<] identifier[containers] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[containers] operator[SEP] identifier[get] operator[SEP] identifier[getNumberOfEvents] operator[SEP] operator[SEP] operator[-] Other[1] operator[-] identifier[eventCode] operator[SEP] operator[SEP] }
public static void trustAllSSLCertificates(HttpsURLConnection connection) { getTrustingSSLSocketFactory(); connection.setSSLSocketFactory(socketFactory); connection.setHostnameVerifier(new HostnameVerifier() { public boolean verify(String s, SSLSession sslSession) { return true; } }); }
class class_name[name] begin[{] method[trustAllSSLCertificates, return_type[void], modifier[public static], parameter[connection]] begin[{] call[.getTrustingSSLSocketFactory, parameter[]] call[connection.setSSLSocketFactory, parameter[member[.socketFactory]]] call[connection.setHostnameVerifier, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)], documentation=None, modifiers={'public'}, name=verify, parameters=[FormalParameter(annotations=[], modifiers=set(), name=s, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=sslSession, type=ReferenceType(arguments=None, dimensions=[], name=SSLSession, sub_type=None), varargs=False)], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HostnameVerifier, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[trustAllSSLCertificates] operator[SEP] identifier[HttpsURLConnection] identifier[connection] operator[SEP] { identifier[getTrustingSSLSocketFactory] operator[SEP] operator[SEP] operator[SEP] identifier[connection] operator[SEP] identifier[setSSLSocketFactory] operator[SEP] identifier[socketFactory] operator[SEP] operator[SEP] identifier[connection] operator[SEP] identifier[setHostnameVerifier] operator[SEP] Keyword[new] identifier[HostnameVerifier] operator[SEP] operator[SEP] { Keyword[public] Keyword[boolean] identifier[verify] operator[SEP] identifier[String] identifier[s] , identifier[SSLSession] identifier[sslSession] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } operator[SEP] operator[SEP] }
public String eatStringConstant() { if (!matchStringConstant()) throw new BadSyntaxException(); /* * The input string constant is a quoted string token likes 'str', and * its token type (ttype) is the quote character. So the string * constants are not converted to lower case. */ String s = tok.sval; nextToken(); return s; }
class class_name[name] begin[{] method[eatStringConstant, return_type[type[String]], modifier[public], parameter[]] begin[{] if[call[.matchStringConstant, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BadSyntaxException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[String], s] call[.nextToken, parameter[]] return[member[.s]] end[}] END[}]
Keyword[public] identifier[String] identifier[eatStringConstant] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[matchStringConstant] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[BadSyntaxException] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[s] operator[=] identifier[tok] operator[SEP] identifier[sval] operator[SEP] identifier[nextToken] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[s] operator[SEP] }
protected void setCommentLabel(Long id, String caption, String value) { Map<String, String> valueMap = answers.get(id); if (valueMap == null) { valueMap = new LinkedHashMap<>(); } valueMap.put(caption, value); answers.put(id, valueMap); }
class class_name[name] begin[{] method[setCommentLabel, return_type[void], modifier[protected], parameter[id, caption, value]] begin[{] local_variable[type[Map], valueMap] if[binary_operation[member[.valueMap], ==, literal[null]]] begin[{] assign[member[.valueMap], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=LinkedHashMap, sub_type=None))] else begin[{] None end[}] call[valueMap.put, parameter[member[.caption], member[.value]]] call[answers.put, parameter[member[.id], member[.valueMap]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[setCommentLabel] operator[SEP] identifier[Long] identifier[id] , identifier[String] identifier[caption] , identifier[String] identifier[value] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[valueMap] operator[=] identifier[answers] operator[SEP] identifier[get] operator[SEP] identifier[id] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[valueMap] operator[==] Other[null] operator[SEP] { identifier[valueMap] operator[=] Keyword[new] identifier[LinkedHashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] } identifier[valueMap] operator[SEP] identifier[put] operator[SEP] identifier[caption] , identifier[value] operator[SEP] operator[SEP] identifier[answers] operator[SEP] identifier[put] operator[SEP] identifier[id] , identifier[valueMap] operator[SEP] operator[SEP] }
public static UserChannelUpdater updater(final String pathServiceSid, final String pathUserSid, final String pathChannelSid, final UserChannel.NotificationLevel notificationLevel) { return new UserChannelUpdater(pathServiceSid, pathUserSid, pathChannelSid, notificationLevel); }
class class_name[name] begin[{] method[updater, return_type[type[UserChannelUpdater]], modifier[public static], parameter[pathServiceSid, pathUserSid, pathChannelSid, notificationLevel]] begin[{] return[ClassCreator(arguments=[MemberReference(member=pathServiceSid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pathUserSid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pathChannelSid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=notificationLevel, 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=UserChannelUpdater, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[UserChannelUpdater] identifier[updater] operator[SEP] Keyword[final] identifier[String] identifier[pathServiceSid] , Keyword[final] identifier[String] identifier[pathUserSid] , Keyword[final] identifier[String] identifier[pathChannelSid] , Keyword[final] identifier[UserChannel] operator[SEP] identifier[NotificationLevel] identifier[notificationLevel] operator[SEP] { Keyword[return] Keyword[new] identifier[UserChannelUpdater] operator[SEP] identifier[pathServiceSid] , identifier[pathUserSid] , identifier[pathChannelSid] , identifier[notificationLevel] operator[SEP] operator[SEP] }
void getSingletonNames(Set<String> singletons) { for (Map.Entry<String, ConfigurationList<SimpleElement>> entry : configurationMap.entrySet()) { ConfigurationList<SimpleElement> list = entry.getValue(); if (!list.isEmpty() && !list.hasId()) { singletons.add(entry.getKey()); } } }
class class_name[name] begin[{] method[getSingletonNames, return_type[void], modifier[default], parameter[singletons]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), name=list)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=SimpleElement, sub_type=None))], dimensions=[], name=ConfigurationList, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=list, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=hasId, postfix_operators=[], prefix_operators=['!'], qualifier=list, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=singletons, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=configurationMap, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=SimpleElement, sub_type=None))], dimensions=[], name=ConfigurationList, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None) end[}] END[}]
Keyword[void] identifier[getSingletonNames] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[singletons] operator[SEP] { Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[ConfigurationList] operator[<] identifier[SimpleElement] operator[>] operator[>] identifier[entry] operator[:] identifier[configurationMap] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[ConfigurationList] operator[<] identifier[SimpleElement] operator[>] identifier[list] operator[=] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[list] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[list] operator[SEP] identifier[hasId] operator[SEP] operator[SEP] operator[SEP] { identifier[singletons] operator[SEP] identifier[add] operator[SEP] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } }
public SDVariable neq(String name, SDVariable x, double y) { validateNumerical("not equals (neq)", x); SDVariable result = f().neq(x, y); return updateVariableNameAndReference(result, name); }
class class_name[name] begin[{] method[neq, return_type[type[SDVariable]], modifier[public], parameter[name, x, y]] begin[{] call[.validateNumerical, parameter[literal["not equals (neq)"], member[.x]]] local_variable[type[SDVariable], result] return[call[.updateVariableNameAndReference, parameter[member[.result], member[.name]]]] end[}] END[}]
Keyword[public] identifier[SDVariable] identifier[neq] operator[SEP] identifier[String] identifier[name] , identifier[SDVariable] identifier[x] , Keyword[double] identifier[y] operator[SEP] { identifier[validateNumerical] operator[SEP] literal[String] , identifier[x] operator[SEP] operator[SEP] identifier[SDVariable] identifier[result] operator[=] identifier[f] operator[SEP] operator[SEP] operator[SEP] identifier[neq] operator[SEP] identifier[x] , identifier[y] operator[SEP] operator[SEP] Keyword[return] identifier[updateVariableNameAndReference] operator[SEP] identifier[result] , identifier[name] operator[SEP] operator[SEP] }
@Override public DescribeEffectivePatchesForPatchBaselineResult describeEffectivePatchesForPatchBaseline(DescribeEffectivePatchesForPatchBaselineRequest request) { request = beforeClientExecution(request); return executeDescribeEffectivePatchesForPatchBaseline(request); }
class class_name[name] begin[{] method[describeEffectivePatchesForPatchBaseline, return_type[type[DescribeEffectivePatchesForPatchBaselineResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeDescribeEffectivePatchesForPatchBaseline, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[DescribeEffectivePatchesForPatchBaselineResult] identifier[describeEffectivePatchesForPatchBaseline] operator[SEP] identifier[DescribeEffectivePatchesForPatchBaselineRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeDescribeEffectivePatchesForPatchBaseline] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public static void launchActivity(Activity context, Class<? extends Activity> activity, boolean closeCurrentActivity, Map<String, String> params) { Intent intent = new Intent(context, activity); if (params != null) { Bundle bundle = new Bundle(); for (Entry<String, String> param : params.entrySet()) { bundle.putString(param.getKey(), param.getValue()); } intent.putExtras(bundle); } context.startActivity(intent); if (closeCurrentActivity) { context.finish(); } }
class class_name[name] begin[{] method[launchActivity, return_type[void], modifier[public static], parameter[context, activity, closeCurrentActivity, params]] begin[{] local_variable[type[Intent], intent] if[binary_operation[member[.params], !=, literal[null]]] begin[{] local_variable[type[Bundle], bundle] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=param, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=param, selectors=[], type_arguments=None)], member=putString, postfix_operators=[], prefix_operators=[], qualifier=bundle, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=params, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=param)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=Entry, sub_type=None))), label=None) call[intent.putExtras, parameter[member[.bundle]]] else begin[{] None end[}] call[context.startActivity, parameter[member[.intent]]] if[member[.closeCurrentActivity]] begin[{] call[context.finish, parameter[]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[launchActivity] operator[SEP] identifier[Activity] identifier[context] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Activity] operator[>] identifier[activity] , Keyword[boolean] identifier[closeCurrentActivity] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[params] operator[SEP] { identifier[Intent] identifier[intent] operator[=] Keyword[new] identifier[Intent] operator[SEP] identifier[context] , identifier[activity] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[params] operator[!=] Other[null] operator[SEP] { identifier[Bundle] identifier[bundle] operator[=] Keyword[new] identifier[Bundle] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[String] operator[>] identifier[param] operator[:] identifier[params] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[bundle] operator[SEP] identifier[putString] operator[SEP] identifier[param] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] , identifier[param] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[intent] operator[SEP] identifier[putExtras] operator[SEP] identifier[bundle] operator[SEP] operator[SEP] } identifier[context] operator[SEP] identifier[startActivity] operator[SEP] identifier[intent] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[closeCurrentActivity] operator[SEP] { identifier[context] operator[SEP] identifier[finish] operator[SEP] operator[SEP] operator[SEP] } }
private boolean isPrevProbablyRelativePronoun(AnalyzedTokenReadings[] tokens, int i) { return i >= 3 && tokens[i-1].getToken().equals("das") && tokens[i-2].getToken().equals(",") && tokens[i-3].matchesPosTagRegex("SUB:...:SIN:NEU"); }
class class_name[name] begin[{] method[isPrevProbablyRelativePronoun, return_type[type[boolean]], modifier[private], parameter[tokens, i]] begin[{] return[binary_operation[binary_operation[binary_operation[binary_operation[member[.i], >=, literal[3]], &&, member[.tokens]], &&, member[.tokens]], &&, member[.tokens]]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[isPrevProbablyRelativePronoun] operator[SEP] identifier[AnalyzedTokenReadings] operator[SEP] operator[SEP] identifier[tokens] , Keyword[int] identifier[i] operator[SEP] { Keyword[return] identifier[i] operator[>=] Other[3] operator[&&] identifier[tokens] operator[SEP] identifier[i] operator[-] Other[1] operator[SEP] operator[SEP] identifier[getToken] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[&&] identifier[tokens] operator[SEP] identifier[i] operator[-] Other[2] operator[SEP] operator[SEP] identifier[getToken] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[&&] identifier[tokens] operator[SEP] identifier[i] operator[-] Other[3] operator[SEP] operator[SEP] identifier[matchesPosTagRegex] operator[SEP] literal[String] operator[SEP] operator[SEP] }
public <V extends Comparable<? super V>> Optional<T> maxBy(Function<? super T, ? extends V> keyExtractor) { return Box .asOptional(reduce(null, (PairBox<T, V> acc, T t) -> { V val = keyExtractor.apply(t); if (acc == null) return new PairBox<>(t, val); if (val.compareTo(acc.b) > 0) { acc.b = val; acc.a = t; } return acc; }, (PairBox<T, V> acc1, PairBox<T, V> acc2) -> (acc1 == null || acc2 != null && acc1.b.compareTo(acc2.b) < 0) ? acc2 : acc1)); }
class class_name[name] begin[{] method[maxBy, return_type[type[Optional]], modifier[public], parameter[keyExtractor]] begin[{] return[call[Box.asOptional, parameter[call[.reduce, parameter[literal[null], LambdaExpression(body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=apply, postfix_operators=[], prefix_operators=[], qualifier=keyExtractor, selectors=[], type_arguments=None), name=val)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=acc, 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=ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=val, 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=PairBox, sub_type=None)), label=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=acc, selectors=[])], member=compareTo, postfix_operators=[], prefix_operators=[], qualifier=val, selectors=[], type_arguments=None), 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=b, postfix_operators=[], prefix_operators=[], qualifier=acc, selectors=[]), type==, value=MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=acc, selectors=[]), type==, value=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)])), ReturnStatement(expression=MemberReference(member=acc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], parameters=[FormalParameter(annotations=[], modifiers=set(), name=acc, 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=V, sub_type=None))], dimensions=[], name=PairBox, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=t, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None), varargs=False)]), LambdaExpression(body=TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=acc1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=acc2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=acc2, selectors=[])], member=compareTo, postfix_operators=[], prefix_operators=[], qualifier=acc1.b, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), operator=&&), operator=||), if_false=MemberReference(member=acc1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=acc2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), parameters=[FormalParameter(annotations=[], modifiers=set(), name=acc1, 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=V, sub_type=None))], dimensions=[], name=PairBox, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=acc2, 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=V, sub_type=None))], dimensions=[], name=PairBox, sub_type=None), varargs=False)])]]]]] end[}] END[}]
Keyword[public] operator[<] identifier[V] Keyword[extends] identifier[Comparable] operator[<] operator[?] Keyword[super] identifier[V] operator[>] operator[>] identifier[Optional] operator[<] identifier[T] operator[>] identifier[maxBy] operator[SEP] identifier[Function] operator[<] operator[?] Keyword[super] identifier[T] , operator[?] Keyword[extends] identifier[V] operator[>] identifier[keyExtractor] operator[SEP] { Keyword[return] identifier[Box] operator[SEP] identifier[asOptional] operator[SEP] identifier[reduce] operator[SEP] Other[null] , operator[SEP] identifier[PairBox] operator[<] identifier[T] , identifier[V] operator[>] identifier[acc] , identifier[T] identifier[t] operator[SEP] operator[->] { identifier[V] identifier[val] operator[=] identifier[keyExtractor] operator[SEP] identifier[apply] operator[SEP] identifier[t] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[acc] operator[==] Other[null] operator[SEP] Keyword[return] Keyword[new] identifier[PairBox] operator[<] operator[>] operator[SEP] identifier[t] , identifier[val] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[val] operator[SEP] identifier[compareTo] operator[SEP] identifier[acc] operator[SEP] identifier[b] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[acc] operator[SEP] identifier[b] operator[=] identifier[val] operator[SEP] identifier[acc] operator[SEP] identifier[a] operator[=] identifier[t] operator[SEP] } Keyword[return] identifier[acc] operator[SEP] } , operator[SEP] identifier[PairBox] operator[<] identifier[T] , identifier[V] operator[>] identifier[acc1] , identifier[PairBox] operator[<] identifier[T] , identifier[V] operator[>] identifier[acc2] operator[SEP] operator[->] operator[SEP] identifier[acc1] operator[==] Other[null] operator[||] identifier[acc2] operator[!=] Other[null] operator[&&] identifier[acc1] operator[SEP] identifier[b] operator[SEP] identifier[compareTo] operator[SEP] identifier[acc2] operator[SEP] identifier[b] operator[SEP] operator[<] Other[0] operator[SEP] operator[?] identifier[acc2] operator[:] identifier[acc1] operator[SEP] operator[SEP] operator[SEP] }
public void gotoFreshPosWritable1(int oldIndex, int newIndex, int xor) { stabilize(oldIndex); gotoFreshPosWritable0(oldIndex, newIndex, xor); }
class class_name[name] begin[{] method[gotoFreshPosWritable1, return_type[void], modifier[public], parameter[oldIndex, newIndex, xor]] begin[{] call[.stabilize, parameter[member[.oldIndex]]] call[.gotoFreshPosWritable0, parameter[member[.oldIndex], member[.newIndex], member[.xor]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[gotoFreshPosWritable1] operator[SEP] Keyword[int] identifier[oldIndex] , Keyword[int] identifier[newIndex] , Keyword[int] identifier[xor] operator[SEP] { identifier[stabilize] operator[SEP] identifier[oldIndex] operator[SEP] operator[SEP] identifier[gotoFreshPosWritable0] operator[SEP] identifier[oldIndex] , identifier[newIndex] , identifier[xor] operator[SEP] operator[SEP] }
public void marshall(TransformS3DataSource transformS3DataSource, ProtocolMarshaller protocolMarshaller) { if (transformS3DataSource == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(transformS3DataSource.getS3DataType(), S3DATATYPE_BINDING); protocolMarshaller.marshall(transformS3DataSource.getS3Uri(), S3URI_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[transformS3DataSource, protocolMarshaller]] begin[{] if[binary_operation[member[.transformS3DataSource], ==, 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=getS3DataType, postfix_operators=[], prefix_operators=[], qualifier=transformS3DataSource, selectors=[], type_arguments=None), MemberReference(member=S3DATATYPE_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=getS3Uri, postfix_operators=[], prefix_operators=[], qualifier=transformS3DataSource, selectors=[], type_arguments=None), MemberReference(member=S3URI_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[TransformS3DataSource] identifier[transformS3DataSource] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[transformS3DataSource] 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[transformS3DataSource] operator[SEP] identifier[getS3DataType] operator[SEP] operator[SEP] , identifier[S3DATATYPE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[transformS3DataSource] operator[SEP] identifier[getS3Uri] operator[SEP] operator[SEP] , identifier[S3URI_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] } }
public void toPdf(PdfWriter writer, OutputStream os) throws IOException { int n = writer.getNewObjectNumber(reader, number, generation); os.write(PdfEncodings.convertToBytes(new StringBuffer().append(n).append(" 0 R").toString(), null)); }
class class_name[name] begin[{] method[toPdf, return_type[void], modifier[public], parameter[writer, os]] begin[{] local_variable[type[int], n] call[os.write, parameter[call[PdfEncodings.convertToBytes, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" 0 R")], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=StringBuffer, sub_type=None)), literal[null]]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[toPdf] operator[SEP] identifier[PdfWriter] identifier[writer] , identifier[OutputStream] identifier[os] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[int] identifier[n] operator[=] identifier[writer] operator[SEP] identifier[getNewObjectNumber] operator[SEP] identifier[reader] , identifier[number] , identifier[generation] operator[SEP] operator[SEP] identifier[os] operator[SEP] identifier[write] operator[SEP] identifier[PdfEncodings] operator[SEP] identifier[convertToBytes] operator[SEP] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[n] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , Other[null] operator[SEP] operator[SEP] operator[SEP] }
@Override public XBELTerm convert(Term source) { if (source == null) return null; XBELTerm xt = new XBELTerm(); FunctionEnum functionEnum = source.getFunctionEnum(); Function func = Function.fromValue(functionEnum.getDisplayValue()); xt.setFunction(func); List<BELObject> functionArgs = source.getFunctionArguments(); List<JAXBElement> prmtrms = xt.getParameterOrTerm(); final ParameterConverter pConverter = new ParameterConverter(); for (final BELObject bo : functionArgs) { if (bo instanceof Parameter) { // Defer to ParameterConverter prmtrms.add(pConverter.convert((Parameter) bo)); } else if (bo instanceof Term) { prmtrms.add(convert((Term) bo)); } } return xt; }
class class_name[name] begin[{] method[convert, return_type[type[XBELTerm]], modifier[public], parameter[source]] begin[{] if[binary_operation[member[.source], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[XBELTerm], xt] local_variable[type[FunctionEnum], functionEnum] local_variable[type[Function], func] call[xt.setFunction, parameter[member[.func]]] local_variable[type[List], functionArgs] local_variable[type[List], prmtrms] local_variable[type[ParameterConverter], pConverter] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=bo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Parameter, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=bo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Term, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Cast(expression=MemberReference(member=bo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Term, sub_type=None))], member=convert, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=prmtrms, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Cast(expression=MemberReference(member=bo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Parameter, sub_type=None))], member=convert, postfix_operators=[], prefix_operators=[], qualifier=pConverter, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=prmtrms, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=functionArgs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=bo)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=BELObject, sub_type=None))), label=None) return[member[.xt]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[XBELTerm] identifier[convert] operator[SEP] identifier[Term] identifier[source] operator[SEP] { Keyword[if] operator[SEP] identifier[source] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[XBELTerm] identifier[xt] operator[=] Keyword[new] identifier[XBELTerm] operator[SEP] operator[SEP] operator[SEP] identifier[FunctionEnum] identifier[functionEnum] operator[=] identifier[source] operator[SEP] identifier[getFunctionEnum] operator[SEP] operator[SEP] operator[SEP] identifier[Function] identifier[func] operator[=] identifier[Function] operator[SEP] identifier[fromValue] operator[SEP] identifier[functionEnum] operator[SEP] identifier[getDisplayValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[xt] operator[SEP] identifier[setFunction] operator[SEP] identifier[func] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[BELObject] operator[>] identifier[functionArgs] operator[=] identifier[source] operator[SEP] identifier[getFunctionArguments] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[JAXBElement] operator[>] identifier[prmtrms] operator[=] identifier[xt] operator[SEP] identifier[getParameterOrTerm] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[ParameterConverter] identifier[pConverter] operator[=] Keyword[new] identifier[ParameterConverter] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[BELObject] identifier[bo] operator[:] identifier[functionArgs] operator[SEP] { Keyword[if] operator[SEP] identifier[bo] Keyword[instanceof] identifier[Parameter] operator[SEP] { identifier[prmtrms] operator[SEP] identifier[add] operator[SEP] identifier[pConverter] operator[SEP] identifier[convert] operator[SEP] operator[SEP] identifier[Parameter] operator[SEP] identifier[bo] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[bo] Keyword[instanceof] identifier[Term] operator[SEP] { identifier[prmtrms] operator[SEP] identifier[add] operator[SEP] identifier[convert] operator[SEP] operator[SEP] identifier[Term] operator[SEP] identifier[bo] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[xt] operator[SEP] }
private void recursivels(FileSystem fs, Path p, List<FileStatus> out) throws IOException { FileStatus fstatus = fs.getFileStatus(p); if (!fstatus.isDir()) { out.add(fstatus); return; } else { out.add(fstatus); FileStatus[] listStatus = fs.listStatus(p); for (FileStatus stat: listStatus) { recursivels(fs, stat.getPath(), out); } } }
class class_name[name] begin[{] method[recursivels, return_type[void], modifier[private], parameter[fs, p, out]] begin[{] local_variable[type[FileStatus], fstatus] if[call[fstatus.isDir, parameter[]]] begin[{] call[out.add, parameter[member[.fstatus]]] return[None] else begin[{] call[out.add, parameter[member[.fstatus]]] local_variable[type[FileStatus], listStatus] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=fs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getPath, postfix_operators=[], prefix_operators=[], qualifier=stat, selectors=[], type_arguments=None), MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recursivels, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=listStatus, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=stat)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FileStatus, sub_type=None))), label=None) end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[recursivels] operator[SEP] identifier[FileSystem] identifier[fs] , identifier[Path] identifier[p] , identifier[List] operator[<] identifier[FileStatus] operator[>] identifier[out] operator[SEP] Keyword[throws] identifier[IOException] { identifier[FileStatus] identifier[fstatus] operator[=] identifier[fs] operator[SEP] identifier[getFileStatus] operator[SEP] identifier[p] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[fstatus] operator[SEP] identifier[isDir] operator[SEP] operator[SEP] operator[SEP] { identifier[out] operator[SEP] identifier[add] operator[SEP] identifier[fstatus] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[else] { identifier[out] operator[SEP] identifier[add] operator[SEP] identifier[fstatus] operator[SEP] operator[SEP] identifier[FileStatus] operator[SEP] operator[SEP] identifier[listStatus] operator[=] identifier[fs] operator[SEP] identifier[listStatus] operator[SEP] identifier[p] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[FileStatus] identifier[stat] operator[:] identifier[listStatus] operator[SEP] { identifier[recursivels] operator[SEP] identifier[fs] , identifier[stat] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] , identifier[out] operator[SEP] operator[SEP] } } }