code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public void marshall(DescribeAuditTaskRequest describeAuditTaskRequest, ProtocolMarshaller protocolMarshaller) { if (describeAuditTaskRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(describeAuditTaskRequest.getTaskId(), TASKID_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[describeAuditTaskRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.describeAuditTaskRequest], ==, 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=getTaskId, postfix_operators=[], prefix_operators=[], qualifier=describeAuditTaskRequest, selectors=[], type_arguments=None), MemberReference(member=TASKID_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[DescribeAuditTaskRequest] identifier[describeAuditTaskRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[describeAuditTaskRequest] 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[describeAuditTaskRequest] operator[SEP] identifier[getTaskId] operator[SEP] operator[SEP] , identifier[TASKID_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 static double normF( ZMatrixRMaj a ) { double total = 0; double scale = CommonOps_ZDRM.elementMaxAbs(a); if( scale == 0.0 ) return 0.0; final int size = a.getDataLength(); for( int i = 0; i < size; i += 2 ) { double real = a.data[i]/scale; double imag = a.data[i+1]/scale; total += real*real + imag*imag; } return scale* Math.sqrt(total); }
class class_name[name] begin[{] method[normF, return_type[type[double]], modifier[public static], parameter[a]] begin[{] local_variable[type[double], total] local_variable[type[double], scale] if[binary_operation[member[.scale], ==, literal[0.0]]] begin[{] return[literal[0.0]] else begin[{] None end[}] local_variable[type[int], size] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=a, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=scale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=/), name=real)], modifiers=set(), type=BasicType(dimensions=[], name=double)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=a, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), operandr=MemberReference(member=scale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=/), name=imag)], modifiers=set(), type=BasicType(dimensions=[], name=double)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=total, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=real, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=real, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=BinaryOperation(operandl=MemberReference(member=imag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=imag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operator=+)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=size, 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=[Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2))]), label=None) return[binary_operation[member[.scale], *, call[Math.sqrt, parameter[member[.total]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[normF] operator[SEP] identifier[ZMatrixRMaj] identifier[a] operator[SEP] { Keyword[double] identifier[total] operator[=] Other[0] operator[SEP] Keyword[double] identifier[scale] operator[=] identifier[CommonOps_ZDRM] operator[SEP] identifier[elementMaxAbs] operator[SEP] identifier[a] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[scale] operator[==] literal[Float] operator[SEP] Keyword[return] literal[Float] operator[SEP] Keyword[final] Keyword[int] identifier[size] operator[=] identifier[a] operator[SEP] identifier[getDataLength] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[size] operator[SEP] identifier[i] operator[+=] Other[2] operator[SEP] { Keyword[double] identifier[real] operator[=] identifier[a] operator[SEP] identifier[data] operator[SEP] identifier[i] operator[SEP] operator[/] identifier[scale] operator[SEP] Keyword[double] identifier[imag] operator[=] identifier[a] operator[SEP] identifier[data] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[/] identifier[scale] operator[SEP] identifier[total] operator[+=] identifier[real] operator[*] identifier[real] operator[+] identifier[imag] operator[*] identifier[imag] operator[SEP] } Keyword[return] identifier[scale] operator[*] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] identifier[total] operator[SEP] operator[SEP] }
public void initializeNonPersistent(BaseDestinationHandler destinationHandler) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "initializeNonPersistent", destinationHandler); /** * Remember the destinationHandler that represents the destination * for which this is a localisation. */ this.destinationHandler = destinationHandler; this.mp = destinationHandler.getMessageProcessor(); // Is event notification enabled _isEventNotificationEnabled = mp.getMessagingEngine().isEventNotificationEnabled(); createControlAdapter(); //defect 260346 //registerControlAdapterAsMBean(); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "initializeNonPersistent"); }
class class_name[name] begin[{] method[initializeNonPersistent, return_type[void], modifier[public], parameter[destinationHandler]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["initializeNonPersistent"], member[.destinationHandler]]] else begin[{] None end[}] assign[THIS[member[None.destinationHandler]], member[.destinationHandler]] assign[THIS[member[None.mp]], call[destinationHandler.getMessageProcessor, parameter[]]] assign[member[._isEventNotificationEnabled], call[mp.getMessagingEngine, parameter[]]] call[.createControlAdapter, parameter[]] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["initializeNonPersistent"]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[initializeNonPersistent] operator[SEP] identifier[BaseDestinationHandler] identifier[destinationHandler] 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] identifier[tc] , literal[String] , identifier[destinationHandler] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[destinationHandler] operator[=] identifier[destinationHandler] operator[SEP] Keyword[this] operator[SEP] identifier[mp] operator[=] identifier[destinationHandler] operator[SEP] identifier[getMessageProcessor] operator[SEP] operator[SEP] operator[SEP] identifier[_isEventNotificationEnabled] operator[=] identifier[mp] operator[SEP] identifier[getMessagingEngine] operator[SEP] operator[SEP] operator[SEP] identifier[isEventNotificationEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[createControlAdapter] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") public static void main(String[] args) { // System.out.print("GrammaticalRelations under DEPENDENT:"); // System.out.println(DEPENDENT.toPrettyString()); MemoryTreebank tb = new MemoryTreebank(new TreeNormalizer()); Collection<GrammaticalStructure> gsBank = null; Properties props = StringUtils.argsToProperties(args); String encoding = props.getProperty("encoding", "utf-8"); try { System.setOut(new PrintStream(System.out, true, encoding)); } catch (IOException e) { throw new RuntimeException(e); } String treeFileName = props.getProperty("treeFile"); String sentFileName = props.getProperty("sentFile"); String conllXFileName = props.getProperty("conllxFile"); String altDepPrinterName = props.getProperty("altprinter"); String altDepReaderName = props.getProperty("altreader"); String altDepReaderFilename = props.getProperty("altreaderfile"); String filter = props.getProperty("filter"); boolean makeCopulaHead = props.getProperty("makeCopulaHead") != null; // TODO: if a parser is specified, load this from the parser // instead of ever loading it from this way String tLPP = props.getProperty("tLPP", "edu.stanford.nlp.parser.lexparser.EnglishTreebankParserParams"); TreebankLangParserParams params = ReflectionLoading.loadByReflection(tLPP); if (makeCopulaHead) { // TODO: generalize and allow for more options String[] options = { "-makeCopulaHead" }; params.setOptionFlag(options, 0); } if (sentFileName == null && (altDepReaderName == null || altDepReaderFilename == null) && treeFileName == null && conllXFileName == null && filter == null) { try { System.err.println("Usage: java GrammaticalStructure [options]* [-sentFile|-treeFile|-conllxFile file] [-testGraph]"); System.err.println(" options: -basic, -collapsed, -CCprocessed [the default], -collapsedTree, -parseTree, -test, -parserFile file, -conllx, -keepPunct, -altprinter -altreader -altreaderfile"); TreeReader tr = new PennTreeReader(new StringReader("((S (NP (NNP Sam)) (VP (VBD died) (NP-TMP (NN today)))))")); tb.add(tr.readTree()); } catch (Exception e) { System.err.println("Horrible error: " + e); e.printStackTrace(); } } else if (altDepReaderName != null && altDepReaderFilename != null) { DependencyReader altDepReader = loadAlternateDependencyReader(altDepReaderName); try { gsBank = altDepReader.readDependencies(altDepReaderFilename); } catch (IOException e) { System.err.println("Error reading " + altDepReaderFilename); return; } } else if (treeFileName != null) { tb.loadPath(treeFileName); } else if (filter != null) { tb.load(new BufferedReader(new InputStreamReader(System.in))); } else if (conllXFileName != null) { try { gsBank = params.readGrammaticalStructureFromFile(conllXFileName); } catch (RuntimeIOException e) { System.err.println("Error reading " + conllXFileName); return; } } else { String parserFile = props.getProperty("parserFile"); String parserOpts = props.getProperty("parserOpts"); boolean tokenized = props.getProperty("tokenized") != null; Function<Object, Tree> lp = loadParser(parserFile, parserOpts, makeCopulaHead); if (!loadTreebankByParsing(tb, sentFileName, encoding, tokenized, lp)) return; // Instead of getting this directly from the LP, use reflection // so that a package which uses GrammaticalStructure doesn't // necessarily have to use LexicalizedParser try { Method method = lp.getClass().getMethod("getTLPParams"); params = (TreebankLangParserParams) method.invoke(lp); } catch (Exception cnfe) { throw new RuntimeException(cnfe); } } // treats the output according to the options passed boolean basic = props.getProperty("basic") != null; boolean collapsed = props.getProperty("collapsed") != null; boolean CCprocessed = props.getProperty("CCprocessed") != null; boolean tree = props.getProperty("collapsedTree") != null; boolean nonCollapsed = props.getProperty("nonCollapsed") != null; boolean extraSep = props.getProperty("extraSep") != null; boolean parseTree = props.getProperty("parseTree") != null; boolean test = props.getProperty("test") != null; boolean keepPunct = props.getProperty("keepPunct") != null; boolean conllx = props.getProperty("conllx") != null; boolean checkConnected = props.getProperty("checkConnected") != null; boolean portray = props.getProperty("portray") != null; // make keepPunct default if conllx is turned on if(conllx) { keepPunct = true; } // If requested load alternative printer DependencyPrinter altDepPrinter = null; if (altDepPrinterName != null) { altDepPrinter = loadAlternateDependencyPrinter(altDepPrinterName); } // System.err.println("First tree in tb is"); // System.err.println(((MemoryTreebank) tb).get(0)); Method m = null; if (test) { // see if we can use SemanticGraph(Factory) to check for being a DAG // Do this by reflection to avoid this becoming a dependency when we distribute the parser try { Class sgf = Class.forName("edu.stanford.nlp.trees.semgraph.SemanticGraphFactory"); m = sgf.getDeclaredMethod("makeFromTree", GrammaticalStructure.class, boolean.class, boolean.class, boolean.class, boolean.class, boolean.class, boolean.class, Filter.class, String.class, int.class); } catch (Exception e) { System.err.println("Test cannot check for cycles in tree format (classes not available)"); } } if (gsBank == null) { gsBank = new TreeBankGrammaticalStructureWrapper(tb, keepPunct, params); } for (GrammaticalStructure gs : gsBank) { Tree t; if (gsBank instanceof TreeBankGrammaticalStructureWrapper) { // System.err.println("Using TreeBankGrammaticalStructureWrapper branch"); t = ((TreeBankGrammaticalStructureWrapper) gsBank).getOriginalTree(gs); // System.err.println("Tree is: "); // System.err.println(t); } else { // System.err.println("Using gs.root() branch"); t = gs.root(); // recover tree } if (test) {// print the grammatical structure, the basic, collapsed and // CCprocessed System.out.println("============= parse tree ======================="); t.pennPrint(); System.out.println(); System.out.println("------------- GrammaticalStructure -------------"); System.out.println(gs); System.out.println("------------- basic dependencies ---------------"); System.out.println(StringUtils.join(gs.typedDependencies(false), "\n")); System.out.println("------------- non-collapsed dependencies (basic + extra) ---------------"); System.out.println(StringUtils.join(gs.typedDependencies(true), "\n")); System.out.println("------------- collapsed dependencies -----------"); System.out.println(StringUtils.join(gs.typedDependenciesCollapsed(true), "\n")); System.out.println("------------- collapsed dependencies tree -----------"); System.out.println(StringUtils.join(gs.typedDependenciesCollapsedTree(), "\n")); System.out.println("------------- CCprocessed dependencies --------"); System.out.println(StringUtils.join(gs.typedDependenciesCCprocessed(true), "\n")); System.out.println("-----------------------------------------------"); // connectivity test boolean connected = GrammaticalStructure.isConnected(gs.typedDependenciesCollapsed(true)); System.out.println("collapsed dependencies form a connected graph: " + connected); if (!connected) { System.out.println("possible offending nodes: " + GrammaticalStructure.getRoots(gs.typedDependenciesCollapsed(true))); } // test for collapsed dependencies being a tree: // make sure at least it doesn't contain cycles (i.e., is a DAG) // Do this by reflection so parser doesn't need SemanticGraph and its // libraries if (m != null) { try { // the first arg is null because it's a static method.... Object semGraph = m.invoke(null, gs, false, true, false, false, false, false, null, null, 0); Class sg = Class.forName("edu.stanford.nlp.trees.semgraph.SemanticGraph"); Method mDag = sg.getDeclaredMethod("isDag"); boolean isDag = (Boolean) mDag.invoke(semGraph); System.out.println("tree dependencies form a DAG: " + isDag); } catch (Exception e) { e.printStackTrace(); } } }// end of "test" output else { if (parseTree) { System.out.println("============= parse tree ======================="); t.pennPrint(); System.out.println(); } if (basic) { if (collapsed || CCprocessed || tree || nonCollapsed) { System.out.println("------------- basic dependencies ---------------"); } if (altDepPrinter == null) { printDependencies(gs, gs.typedDependencies(false), t, conllx, false); } else { System.out.println(altDepPrinter.dependenciesToString(gs, gs.typedDependencies(false), t)); } } if (nonCollapsed) { if (basic || CCprocessed || collapsed || tree) { System.out.println("----------- non-collapsed dependencies (basic + extra) -----------"); } printDependencies(gs, gs.allTypedDependencies(), t, conllx, extraSep); } if (collapsed) { if (basic || CCprocessed || tree || nonCollapsed) { System.out.println("----------- collapsed dependencies -----------"); } printDependencies(gs, gs.typedDependenciesCollapsed(true), t, conllx, false); } if (CCprocessed) { if (basic || collapsed || tree || nonCollapsed) { System.out.println("---------- CCprocessed dependencies ----------"); } List<TypedDependency> deps = gs.typedDependenciesCCprocessed(true); if (checkConnected) { if (!GrammaticalStructure.isConnected(deps)) { System.err.println("Graph is not connected for:"); System.err.println(t); System.err.println("possible offending nodes: " + GrammaticalStructure.getRoots(deps)); } } printDependencies(gs, deps, t, conllx, false); } if (tree) { if (basic || CCprocessed || collapsed || nonCollapsed) { System.out.println("----------- collapsed dependencies tree -----------"); } printDependencies(gs, gs.typedDependenciesCollapsedTree(), t, conllx, false); } // default use: CCprocessed (to parallel what happens within the parser) if (!basic && !collapsed && !CCprocessed && !tree && !nonCollapsed) { // System.out.println("----------- CCprocessed dependencies -----------"); printDependencies(gs, gs.typedDependenciesCCprocessed(true), t, conllx, false); } } if (portray) { try { // put up a window showing it Class sgu = Class.forName("edu.stanford.nlp.trees.semgraph.SemanticGraphUtils"); Method mRender = sgu.getDeclaredMethod("render", GrammaticalStructure.class, String.class); // the first arg is null because it's a static method.... mRender.invoke(null, gs, "Collapsed, CC processed deps"); } catch (Exception e) { throw new RuntimeException("Couldn't use swing to portray semantic graph", e); } } } // end for }
class class_name[name] begin[{] method[main, return_type[void], modifier[public static], parameter[args]] begin[{] local_variable[type[MemoryTreebank], tb] local_variable[type[Collection], gsBank] local_variable[type[Properties], props] local_variable[type[String], encoding] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), MemberReference(member=encoding, 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=PrintStream, sub_type=None))], member=setOut, postfix_operators=[], prefix_operators=[], qualifier=System, 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=RuntimeException, sub_type=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[String], treeFileName] local_variable[type[String], sentFileName] local_variable[type[String], conllXFileName] local_variable[type[String], altDepPrinterName] local_variable[type[String], altDepReaderName] local_variable[type[String], altDepReaderFilename] local_variable[type[String], filter] local_variable[type[boolean], makeCopulaHead] local_variable[type[String], tLPP] local_variable[type[TreebankLangParserParams], params] if[member[.makeCopulaHead]] begin[{] local_variable[type[String], options] call[params.setOptionFlag, parameter[member[.options], literal[0]]] else begin[{] None end[}] if[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[member[.sentFileName], ==, literal[null]], &&, binary_operation[binary_operation[member[.altDepReaderName], ==, literal[null]], ||, binary_operation[member[.altDepReaderFilename], ==, literal[null]]]], &&, binary_operation[member[.treeFileName], ==, literal[null]]], &&, binary_operation[member[.conllXFileName], ==, literal[null]]], &&, binary_operation[member[.filter], ==, literal[null]]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Usage: java GrammaticalStructure [options]* [-sentFile|-treeFile|-conllxFile file] [-testGraph]")], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.err, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" options: -basic, -collapsed, -CCprocessed [the default], -collapsedTree, -parseTree, -test, -parserFile file, -conllx, -keepPunct, -altprinter -altreader -altreaderfile")], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.err, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="((S (NP (NNP Sam)) (VP (VBD died) (NP-TMP (NN today)))))")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringReader, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PennTreeReader, sub_type=None)), name=tr)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TreeReader, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=readTree, postfix_operators=[], prefix_operators=[], qualifier=tr, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=tb, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Horrible error: "), operandr=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.err, selectors=[], type_arguments=None), label=None), 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[{] if[binary_operation[binary_operation[member[.altDepReaderName], !=, literal[null]], &&, binary_operation[member[.altDepReaderFilename], !=, literal[null]]]] begin[{] local_variable[type[DependencyReader], altDepReader] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=gsBank, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=altDepReaderFilename, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readDependencies, postfix_operators=[], prefix_operators=[], qualifier=altDepReader, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error reading "), operandr=MemberReference(member=altDepReaderFilename, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.err, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) else begin[{] if[binary_operation[member[.treeFileName], !=, literal[null]]] begin[{] call[tb.loadPath, parameter[member[.treeFileName]]] else begin[{] if[binary_operation[member[.filter], !=, literal[null]]] begin[{] call[tb.load, parameter[ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InputStreamReader, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BufferedReader, sub_type=None))]] else begin[{] if[binary_operation[member[.conllXFileName], !=, literal[null]]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=gsBank, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=conllXFileName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readGrammaticalStructureFromFile, postfix_operators=[], prefix_operators=[], qualifier=params, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error reading "), operandr=MemberReference(member=conllXFileName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.err, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['RuntimeIOException']))], finally_block=None, label=None, resources=None) else begin[{] local_variable[type[String], parserFile] local_variable[type[String], parserOpts] local_variable[type[boolean], tokenized] local_variable[type[Function], lp] if[call[.loadTreebankByParsing, parameter[member[.tb], member[.sentFileName], member[.encoding], member[.tokenized], member[.lp]]]] begin[{] return[None] else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=lp, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="getTLPParams")], member=getMethod, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=method)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=params, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=lp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=TreebankLangParserParams, sub_type=None))), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=cnfe, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=cnfe, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] end[}] end[}] end[}] end[}] local_variable[type[boolean], basic] local_variable[type[boolean], collapsed] local_variable[type[boolean], CCprocessed] local_variable[type[boolean], tree] local_variable[type[boolean], nonCollapsed] local_variable[type[boolean], extraSep] local_variable[type[boolean], parseTree] local_variable[type[boolean], test] local_variable[type[boolean], keepPunct] local_variable[type[boolean], conllx] local_variable[type[boolean], checkConnected] local_variable[type[boolean], portray] if[member[.conllx]] begin[{] assign[member[.keepPunct], literal[true]] else begin[{] None end[}] local_variable[type[DependencyPrinter], altDepPrinter] if[binary_operation[member[.altDepPrinterName], !=, literal[null]]] begin[{] assign[member[.altDepPrinter], call[.loadAlternateDependencyPrinter, parameter[member[.altDepPrinterName]]]] else begin[{] None end[}] local_variable[type[Method], m] if[member[.test]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="edu.stanford.nlp.trees.semgraph.SemanticGraphFactory")], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[], type_arguments=None), name=sgf)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Class, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="makeFromTree"), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GrammaticalStructure, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=boolean)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=boolean)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=boolean)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=boolean)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=boolean)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=boolean)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Filter, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=int))], member=getDeclaredMethod, postfix_operators=[], prefix_operators=[], qualifier=sgf, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Test cannot check for cycles in tree format (classes not available)")], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.err, 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[}] if[binary_operation[member[.gsBank], ==, literal[null]]] begin[{] assign[member[.gsBank], ClassCreator(arguments=[MemberReference(member=tb, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=keepPunct, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=params, 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=TreeBankGrammaticalStructureWrapper, sub_type=None))] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=t)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Tree, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=gsBank, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=TreeBankGrammaticalStructureWrapper, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=root, postfix_operators=[], prefix_operators=[], qualifier=gs, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MemberReference(member=gsBank, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=TreeBankGrammaticalStructureWrapper, sub_type=None))), label=None)])), IfStatement(condition=MemberReference(member=test, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=parseTree, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="============= parse tree =======================")], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=pennPrint, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MemberReference(member=basic, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=collapsed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=CCprocessed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=||), operandr=MemberReference(member=tree, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=||), operandr=MemberReference(member=nonCollapsed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="------------- basic dependencies ---------------")], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=altDepPrinter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=gs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=typedDependencies, postfix_operators=[], prefix_operators=[], qualifier=gs, selectors=[], type_arguments=None), MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=dependenciesToString, postfix_operators=[], prefix_operators=[], qualifier=altDepPrinter, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=gs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=typedDependencies, postfix_operators=[], prefix_operators=[], qualifier=gs, selectors=[], type_arguments=None), MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=conllx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=printDependencies, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))])), IfStatement(condition=MemberReference(member=nonCollapsed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=basic, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=CCprocessed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=||), operandr=MemberReference(member=collapsed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=||), operandr=MemberReference(member=tree, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="----------- non-collapsed dependencies (basic + extra) -----------")], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=gs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=allTypedDependencies, postfix_operators=[], prefix_operators=[], qualifier=gs, selectors=[], type_arguments=None), MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=conllx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=extraSep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=printDependencies, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MemberReference(member=collapsed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=basic, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=CCprocessed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=||), operandr=MemberReference(member=tree, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=||), operandr=MemberReference(member=nonCollapsed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="----------- collapsed dependencies -----------")], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=gs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=typedDependenciesCollapsed, postfix_operators=[], prefix_operators=[], qualifier=gs, selectors=[], type_arguments=None), MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=conllx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=printDependencies, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MemberReference(member=CCprocessed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=basic, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=collapsed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=||), operandr=MemberReference(member=tree, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=||), operandr=MemberReference(member=nonCollapsed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="---------- CCprocessed dependencies ----------")], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=typedDependenciesCCprocessed, postfix_operators=[], prefix_operators=[], qualifier=gs, selectors=[], type_arguments=None), name=deps)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=TypedDependency, sub_type=None))], dimensions=[], name=List, sub_type=None)), IfStatement(condition=MemberReference(member=checkConnected, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=deps, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isConnected, postfix_operators=[], prefix_operators=['!'], qualifier=GrammaticalStructure, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Graph is not connected for:")], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.err, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.err, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="possible offending nodes: "), operandr=MethodInvocation(arguments=[MemberReference(member=deps, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getRoots, postfix_operators=[], prefix_operators=[], qualifier=GrammaticalStructure, selectors=[], type_arguments=None), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.err, selectors=[], type_arguments=None), label=None)]))])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=gs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=deps, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=conllx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=printDependencies, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MemberReference(member=tree, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=basic, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=CCprocessed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=||), operandr=MemberReference(member=collapsed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=||), operandr=MemberReference(member=nonCollapsed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="----------- collapsed dependencies tree -----------")], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=gs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=typedDependenciesCollapsedTree, postfix_operators=[], prefix_operators=[], qualifier=gs, selectors=[], type_arguments=None), MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=conllx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=printDependencies, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=basic, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operandr=MemberReference(member=collapsed, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operator=&&), operandr=MemberReference(member=CCprocessed, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operator=&&), operandr=MemberReference(member=tree, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operator=&&), operandr=MemberReference(member=nonCollapsed, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=gs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=typedDependenciesCCprocessed, postfix_operators=[], prefix_operators=[], qualifier=gs, selectors=[], type_arguments=None), MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=conllx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=printDependencies, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="============= parse tree =======================")], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=pennPrint, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="------------- GrammaticalStructure -------------")], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=gs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="------------- basic dependencies ---------------")], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=typedDependencies, postfix_operators=[], prefix_operators=[], qualifier=gs, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n")], member=join, postfix_operators=[], prefix_operators=[], qualifier=StringUtils, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="------------- non-collapsed dependencies (basic + extra) ---------------")], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=typedDependencies, postfix_operators=[], prefix_operators=[], qualifier=gs, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n")], member=join, postfix_operators=[], prefix_operators=[], qualifier=StringUtils, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="------------- collapsed dependencies -----------")], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=typedDependenciesCollapsed, postfix_operators=[], prefix_operators=[], qualifier=gs, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n")], member=join, postfix_operators=[], prefix_operators=[], qualifier=StringUtils, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="------------- collapsed dependencies tree -----------")], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=typedDependenciesCollapsedTree, postfix_operators=[], prefix_operators=[], qualifier=gs, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n")], member=join, postfix_operators=[], prefix_operators=[], qualifier=StringUtils, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="------------- CCprocessed dependencies --------")], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=typedDependenciesCCprocessed, postfix_operators=[], prefix_operators=[], qualifier=gs, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n")], member=join, postfix_operators=[], prefix_operators=[], qualifier=StringUtils, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="-----------------------------------------------")], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=typedDependenciesCollapsed, postfix_operators=[], prefix_operators=[], qualifier=gs, selectors=[], type_arguments=None)], member=isConnected, postfix_operators=[], prefix_operators=[], qualifier=GrammaticalStructure, selectors=[], type_arguments=None), name=connected)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="collapsed dependencies form a connected graph: "), operandr=MemberReference(member=connected, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=connected, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="possible offending nodes: "), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=typedDependenciesCollapsed, postfix_operators=[], prefix_operators=[], qualifier=gs, selectors=[], type_arguments=None)], member=getRoots, postfix_operators=[], prefix_operators=[], qualifier=GrammaticalStructure, selectors=[], type_arguments=None), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=m, 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=[TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=gs, 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=true), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), name=semGraph)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="edu.stanford.nlp.trees.semgraph.SemanticGraph")], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[], type_arguments=None), name=sg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Class, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="isDag")], member=getDeclaredMethod, postfix_operators=[], prefix_operators=[], qualifier=sg, selectors=[], type_arguments=None), name=mDag)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=semGraph, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=mDag, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Boolean, sub_type=None)), name=isDag)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="tree dependencies form a DAG: "), operandr=MemberReference(member=isDag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, 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=['Exception']))], finally_block=None, label=None, resources=None)]))])), IfStatement(condition=MemberReference(member=portray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="edu.stanford.nlp.trees.semgraph.SemanticGraphUtils")], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[], type_arguments=None), name=sgu)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Class, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="render"), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GrammaticalStructure, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))], member=getDeclaredMethod, postfix_operators=[], prefix_operators=[], qualifier=sgu, selectors=[], type_arguments=None), name=mRender)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=gs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Collapsed, CC processed deps")], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=mRender, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Couldn't use swing to portray semantic graph"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=gsBank, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=gs)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=GrammaticalStructure, sub_type=None))), label=None) end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] { identifier[MemoryTreebank] identifier[tb] operator[=] Keyword[new] identifier[MemoryTreebank] operator[SEP] Keyword[new] identifier[TreeNormalizer] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Collection] operator[<] identifier[GrammaticalStructure] operator[>] identifier[gsBank] operator[=] Other[null] operator[SEP] identifier[Properties] identifier[props] operator[=] identifier[StringUtils] operator[SEP] identifier[argsToProperties] operator[SEP] identifier[args] operator[SEP] operator[SEP] identifier[String] identifier[encoding] operator[=] identifier[props] operator[SEP] identifier[getProperty] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[try] { identifier[System] operator[SEP] identifier[setOut] operator[SEP] Keyword[new] identifier[PrintStream] operator[SEP] identifier[System] operator[SEP] identifier[out] , literal[boolean] , identifier[encoding] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } identifier[String] identifier[treeFileName] operator[=] identifier[props] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[sentFileName] operator[=] identifier[props] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[conllXFileName] operator[=] identifier[props] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[altDepPrinterName] operator[=] identifier[props] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[altDepReaderName] operator[=] identifier[props] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[altDepReaderFilename] operator[=] identifier[props] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[filter] operator[=] identifier[props] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[boolean] identifier[makeCopulaHead] operator[=] identifier[props] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[!=] Other[null] operator[SEP] identifier[String] identifier[tLPP] operator[=] identifier[props] operator[SEP] identifier[getProperty] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[TreebankLangParserParams] identifier[params] operator[=] identifier[ReflectionLoading] operator[SEP] identifier[loadByReflection] operator[SEP] identifier[tLPP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[makeCopulaHead] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[options] operator[=] { literal[String] } operator[SEP] identifier[params] operator[SEP] identifier[setOptionFlag] operator[SEP] identifier[options] , Other[0] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[sentFileName] operator[==] Other[null] operator[&&] operator[SEP] identifier[altDepReaderName] operator[==] Other[null] operator[||] identifier[altDepReaderFilename] operator[==] Other[null] operator[SEP] operator[&&] identifier[treeFileName] operator[==] Other[null] operator[&&] identifier[conllXFileName] operator[==] Other[null] operator[&&] identifier[filter] operator[==] Other[null] operator[SEP] { Keyword[try] { identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[TreeReader] identifier[tr] operator[=] Keyword[new] identifier[PennTreeReader] operator[SEP] Keyword[new] identifier[StringReader] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[tb] operator[SEP] identifier[add] operator[SEP] identifier[tr] operator[SEP] identifier[readTree] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[altDepReaderName] operator[!=] Other[null] operator[&&] identifier[altDepReaderFilename] operator[!=] Other[null] operator[SEP] { identifier[DependencyReader] identifier[altDepReader] operator[=] identifier[loadAlternateDependencyReader] operator[SEP] identifier[altDepReaderName] operator[SEP] operator[SEP] Keyword[try] { identifier[gsBank] operator[=] identifier[altDepReader] operator[SEP] identifier[readDependencies] operator[SEP] identifier[altDepReaderFilename] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[altDepReaderFilename] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[treeFileName] operator[!=] Other[null] operator[SEP] { identifier[tb] operator[SEP] identifier[loadPath] operator[SEP] identifier[treeFileName] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[filter] operator[!=] Other[null] operator[SEP] { identifier[tb] operator[SEP] identifier[load] operator[SEP] Keyword[new] identifier[BufferedReader] operator[SEP] Keyword[new] identifier[InputStreamReader] operator[SEP] identifier[System] operator[SEP] identifier[in] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[conllXFileName] operator[!=] Other[null] operator[SEP] { Keyword[try] { identifier[gsBank] operator[=] identifier[params] operator[SEP] identifier[readGrammaticalStructureFromFile] operator[SEP] identifier[conllXFileName] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[RuntimeIOException] identifier[e] operator[SEP] { identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[conllXFileName] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } } Keyword[else] { identifier[String] identifier[parserFile] operator[=] identifier[props] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[parserOpts] operator[=] identifier[props] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[boolean] identifier[tokenized] operator[=] identifier[props] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[!=] Other[null] operator[SEP] identifier[Function] operator[<] identifier[Object] , identifier[Tree] operator[>] identifier[lp] operator[=] identifier[loadParser] operator[SEP] identifier[parserFile] , identifier[parserOpts] , identifier[makeCopulaHead] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[loadTreebankByParsing] operator[SEP] identifier[tb] , identifier[sentFileName] , identifier[encoding] , identifier[tokenized] , identifier[lp] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[try] { identifier[Method] identifier[method] operator[=] identifier[lp] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getMethod] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[params] operator[=] operator[SEP] identifier[TreebankLangParserParams] operator[SEP] identifier[method] operator[SEP] identifier[invoke] operator[SEP] identifier[lp] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[cnfe] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[cnfe] operator[SEP] operator[SEP] } } Keyword[boolean] identifier[basic] operator[=] identifier[props] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[!=] Other[null] operator[SEP] Keyword[boolean] identifier[collapsed] operator[=] identifier[props] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[!=] Other[null] operator[SEP] Keyword[boolean] identifier[CCprocessed] operator[=] identifier[props] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[!=] Other[null] operator[SEP] Keyword[boolean] identifier[tree] operator[=] identifier[props] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[!=] Other[null] operator[SEP] Keyword[boolean] identifier[nonCollapsed] operator[=] identifier[props] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[!=] Other[null] operator[SEP] Keyword[boolean] identifier[extraSep] operator[=] identifier[props] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[!=] Other[null] operator[SEP] Keyword[boolean] identifier[parseTree] operator[=] identifier[props] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[!=] Other[null] operator[SEP] Keyword[boolean] identifier[test] operator[=] identifier[props] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[!=] Other[null] operator[SEP] Keyword[boolean] identifier[keepPunct] operator[=] identifier[props] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[!=] Other[null] operator[SEP] Keyword[boolean] identifier[conllx] operator[=] identifier[props] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[!=] Other[null] operator[SEP] Keyword[boolean] identifier[checkConnected] operator[=] identifier[props] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[!=] Other[null] operator[SEP] Keyword[boolean] identifier[portray] operator[=] identifier[props] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[!=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[conllx] operator[SEP] { identifier[keepPunct] operator[=] literal[boolean] operator[SEP] } identifier[DependencyPrinter] identifier[altDepPrinter] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[altDepPrinterName] operator[!=] Other[null] operator[SEP] { identifier[altDepPrinter] operator[=] identifier[loadAlternateDependencyPrinter] operator[SEP] identifier[altDepPrinterName] operator[SEP] operator[SEP] } identifier[Method] identifier[m] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[test] operator[SEP] { Keyword[try] { identifier[Class] identifier[sgf] operator[=] identifier[Class] operator[SEP] identifier[forName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[m] operator[=] identifier[sgf] operator[SEP] identifier[getDeclaredMethod] operator[SEP] literal[String] , identifier[GrammaticalStructure] operator[SEP] Keyword[class] , Keyword[boolean] operator[SEP] Keyword[class] , Keyword[boolean] operator[SEP] Keyword[class] , Keyword[boolean] operator[SEP] Keyword[class] , Keyword[boolean] operator[SEP] Keyword[class] , Keyword[boolean] operator[SEP] Keyword[class] , Keyword[boolean] operator[SEP] Keyword[class] , identifier[Filter] operator[SEP] Keyword[class] , identifier[String] operator[SEP] Keyword[class] , Keyword[int] operator[SEP] Keyword[class] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[gsBank] operator[==] Other[null] operator[SEP] { identifier[gsBank] operator[=] Keyword[new] identifier[TreeBankGrammaticalStructureWrapper] operator[SEP] identifier[tb] , identifier[keepPunct] , identifier[params] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[GrammaticalStructure] identifier[gs] operator[:] identifier[gsBank] operator[SEP] { identifier[Tree] identifier[t] operator[SEP] Keyword[if] operator[SEP] identifier[gsBank] Keyword[instanceof] identifier[TreeBankGrammaticalStructureWrapper] operator[SEP] { identifier[t] operator[=] operator[SEP] operator[SEP] identifier[TreeBankGrammaticalStructureWrapper] operator[SEP] identifier[gsBank] operator[SEP] operator[SEP] identifier[getOriginalTree] operator[SEP] identifier[gs] operator[SEP] operator[SEP] } Keyword[else] { identifier[t] operator[=] identifier[gs] operator[SEP] identifier[root] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[test] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[t] operator[SEP] identifier[pennPrint] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[gs] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[StringUtils] operator[SEP] identifier[join] operator[SEP] identifier[gs] operator[SEP] identifier[typedDependencies] operator[SEP] literal[boolean] operator[SEP] , literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[StringUtils] operator[SEP] identifier[join] operator[SEP] identifier[gs] operator[SEP] identifier[typedDependencies] operator[SEP] literal[boolean] operator[SEP] , literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[StringUtils] operator[SEP] identifier[join] operator[SEP] identifier[gs] operator[SEP] identifier[typedDependenciesCollapsed] operator[SEP] literal[boolean] operator[SEP] , literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[StringUtils] operator[SEP] identifier[join] operator[SEP] identifier[gs] operator[SEP] identifier[typedDependenciesCollapsedTree] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[StringUtils] operator[SEP] identifier[join] operator[SEP] identifier[gs] operator[SEP] identifier[typedDependenciesCCprocessed] operator[SEP] literal[boolean] operator[SEP] , literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[boolean] identifier[connected] operator[=] identifier[GrammaticalStructure] operator[SEP] identifier[isConnected] operator[SEP] identifier[gs] operator[SEP] identifier[typedDependenciesCollapsed] operator[SEP] literal[boolean] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[connected] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[connected] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[GrammaticalStructure] operator[SEP] identifier[getRoots] operator[SEP] identifier[gs] operator[SEP] identifier[typedDependenciesCollapsed] operator[SEP] literal[boolean] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[m] operator[!=] Other[null] operator[SEP] { Keyword[try] { identifier[Object] identifier[semGraph] operator[=] identifier[m] operator[SEP] identifier[invoke] operator[SEP] Other[null] , identifier[gs] , literal[boolean] , literal[boolean] , literal[boolean] , literal[boolean] , literal[boolean] , literal[boolean] , Other[null] , Other[null] , Other[0] operator[SEP] operator[SEP] identifier[Class] identifier[sg] operator[=] identifier[Class] operator[SEP] identifier[forName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Method] identifier[mDag] operator[=] identifier[sg] operator[SEP] identifier[getDeclaredMethod] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[boolean] identifier[isDag] operator[=] operator[SEP] identifier[Boolean] operator[SEP] identifier[mDag] operator[SEP] identifier[invoke] operator[SEP] identifier[semGraph] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[isDag] 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[else] { Keyword[if] operator[SEP] identifier[parseTree] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[t] operator[SEP] identifier[pennPrint] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[basic] operator[SEP] { Keyword[if] operator[SEP] identifier[collapsed] operator[||] identifier[CCprocessed] operator[||] identifier[tree] operator[||] identifier[nonCollapsed] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[altDepPrinter] operator[==] Other[null] operator[SEP] { identifier[printDependencies] operator[SEP] identifier[gs] , identifier[gs] operator[SEP] identifier[typedDependencies] operator[SEP] literal[boolean] operator[SEP] , identifier[t] , identifier[conllx] , literal[boolean] operator[SEP] operator[SEP] } Keyword[else] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[altDepPrinter] operator[SEP] identifier[dependenciesToString] operator[SEP] identifier[gs] , identifier[gs] operator[SEP] identifier[typedDependencies] operator[SEP] literal[boolean] operator[SEP] , identifier[t] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[nonCollapsed] operator[SEP] { Keyword[if] operator[SEP] identifier[basic] operator[||] identifier[CCprocessed] operator[||] identifier[collapsed] operator[||] identifier[tree] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[printDependencies] operator[SEP] identifier[gs] , identifier[gs] operator[SEP] identifier[allTypedDependencies] operator[SEP] operator[SEP] , identifier[t] , identifier[conllx] , identifier[extraSep] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[collapsed] operator[SEP] { Keyword[if] operator[SEP] identifier[basic] operator[||] identifier[CCprocessed] operator[||] identifier[tree] operator[||] identifier[nonCollapsed] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[printDependencies] operator[SEP] identifier[gs] , identifier[gs] operator[SEP] identifier[typedDependenciesCollapsed] operator[SEP] literal[boolean] operator[SEP] , identifier[t] , identifier[conllx] , literal[boolean] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[CCprocessed] operator[SEP] { Keyword[if] operator[SEP] identifier[basic] operator[||] identifier[collapsed] operator[||] identifier[tree] operator[||] identifier[nonCollapsed] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[TypedDependency] operator[>] identifier[deps] operator[=] identifier[gs] operator[SEP] identifier[typedDependenciesCCprocessed] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[checkConnected] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[GrammaticalStructure] operator[SEP] identifier[isConnected] operator[SEP] identifier[deps] operator[SEP] operator[SEP] { identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] identifier[t] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[GrammaticalStructure] operator[SEP] identifier[getRoots] operator[SEP] identifier[deps] operator[SEP] operator[SEP] operator[SEP] } } identifier[printDependencies] operator[SEP] identifier[gs] , identifier[deps] , identifier[t] , identifier[conllx] , literal[boolean] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[tree] operator[SEP] { Keyword[if] operator[SEP] identifier[basic] operator[||] identifier[CCprocessed] operator[||] identifier[collapsed] operator[||] identifier[nonCollapsed] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[printDependencies] operator[SEP] identifier[gs] , identifier[gs] operator[SEP] identifier[typedDependenciesCollapsedTree] operator[SEP] operator[SEP] , identifier[t] , identifier[conllx] , literal[boolean] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[basic] operator[&&] operator[!] identifier[collapsed] operator[&&] operator[!] identifier[CCprocessed] operator[&&] operator[!] identifier[tree] operator[&&] operator[!] identifier[nonCollapsed] operator[SEP] { identifier[printDependencies] operator[SEP] identifier[gs] , identifier[gs] operator[SEP] identifier[typedDependenciesCCprocessed] operator[SEP] literal[boolean] operator[SEP] , identifier[t] , identifier[conllx] , literal[boolean] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[portray] operator[SEP] { Keyword[try] { identifier[Class] identifier[sgu] operator[=] identifier[Class] operator[SEP] identifier[forName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Method] identifier[mRender] operator[=] identifier[sgu] operator[SEP] identifier[getDeclaredMethod] operator[SEP] literal[String] , identifier[GrammaticalStructure] operator[SEP] Keyword[class] , identifier[String] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[mRender] operator[SEP] identifier[invoke] operator[SEP] Other[null] , identifier[gs] , literal[String] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } } } }
public Text evaluate(BytesWritable input) { String nameOperation= NamecoinUtil.getNameOperation(input.copyBytes()); return new Text(nameOperation); }
class class_name[name] begin[{] method[evaluate, return_type[type[Text]], modifier[public], parameter[input]] begin[{] local_variable[type[String], nameOperation] return[ClassCreator(arguments=[MemberReference(member=nameOperation, 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=Text, sub_type=None))] end[}] END[}]
Keyword[public] identifier[Text] identifier[evaluate] operator[SEP] identifier[BytesWritable] identifier[input] operator[SEP] { identifier[String] identifier[nameOperation] operator[=] identifier[NamecoinUtil] operator[SEP] identifier[getNameOperation] operator[SEP] identifier[input] operator[SEP] identifier[copyBytes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[Text] operator[SEP] identifier[nameOperation] operator[SEP] operator[SEP] }
@Override public RandomVariable getValue(double evaluationTime, LIBORModelMonteCarloSimulationModel model) throws CalculationException { double productToModelTimeOffset = 0; try { if(this.getReferenceDate() != null && model.getReferenceDate() != null) { productToModelTimeOffset = FloatingpointDate.getFloatingPointDateFromDate(model.getReferenceDate(), this.getReferenceDate()); } } catch(UnsupportedOperationException e) { // @TODO: Models that do not provide a reference date will become disfunctional in future releases. }; if(evaluationTime >= productToModelTimeOffset + getPaymentDate()) { return new RandomVariableFromDoubleArray(0.0); } // Get random variables RandomVariable notionalAtPeriodStart = getNotional().getNotionalAtPeriodStart(this, model); RandomVariable numeraireAtEval = model.getNumeraire(evaluationTime); RandomVariable numeraire = model.getNumeraire(productToModelTimeOffset + getPaymentDate()); // @TODO: Add support for weighted Monte-Carlo. // RandomVariable monteCarloProbabilities = model.getMonteCarloWeights(getPaymentDate()); RandomVariable values; // Calculate numeraire relative value of coupon flows if(couponFlow) { values = getCoupon(productToModelTimeOffset + getFixingDate(), model); values = values.mult(notionalAtPeriodStart); values = values.div(numeraire); if(isExcludeAccruedInterest && evaluationTime >= productToModelTimeOffset + getPeriodStart() && evaluationTime < productToModelTimeOffset + getPeriodEnd()) { double nonAccruedInterestRatio = (productToModelTimeOffset + getPeriodEnd() - evaluationTime) / (getPeriodEnd() - getPeriodStart()); values = values.mult(nonAccruedInterestRatio); } } else { values = new RandomVariableFromDoubleArray(0.0,0.0); } // Apply notional exchange if(notionalFlow) { RandomVariable nationalAtPeriodEnd = getNotional().getNotionalAtPeriodEnd(this, model); if(getPeriodStart() > evaluationTime) { RandomVariable numeraireAtPeriodStart = model.getNumeraire(getPeriodStart()); values = values.subRatio(notionalAtPeriodStart, numeraireAtPeriodStart); } if(getPeriodEnd() > evaluationTime) { RandomVariable numeraireAtPeriodEnd = model.getNumeraire(getPeriodEnd()); values = values.addRatio(nationalAtPeriodEnd, numeraireAtPeriodEnd); } } if(payer) { values = values.mult(-1.0); } values = values.mult(numeraireAtEval); // Return values return values; }
class class_name[name] begin[{] method[getValue, return_type[type[RandomVariable]], modifier[public], parameter[evaluationTime, model]] begin[{] local_variable[type[double], productToModelTimeOffset] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getReferenceDate, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getReferenceDate, postfix_operators=[], prefix_operators=[], qualifier=model, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=productToModelTimeOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getReferenceDate, postfix_operators=[], prefix_operators=[], qualifier=model, selectors=[], type_arguments=None), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getReferenceDate, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], member=getFloatingPointDateFromDate, postfix_operators=[], prefix_operators=[], qualifier=FloatingpointDate, selectors=[], type_arguments=None)), label=None)]))], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['UnsupportedOperationException']))], finally_block=None, label=None, resources=None) Statement(label=None) if[binary_operation[member[.evaluationTime], >=, binary_operation[member[.productToModelTimeOffset], +, call[.getPaymentDate, parameter[]]]]] begin[{] return[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.0)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RandomVariableFromDoubleArray, sub_type=None))] else begin[{] None end[}] local_variable[type[RandomVariable], notionalAtPeriodStart] local_variable[type[RandomVariable], numeraireAtEval] local_variable[type[RandomVariable], numeraire] local_variable[type[RandomVariable], values] if[member[.couponFlow]] begin[{] assign[member[.values], call[.getCoupon, parameter[binary_operation[member[.productToModelTimeOffset], +, call[.getFixingDate, parameter[]]], member[.model]]]] assign[member[.values], call[values.mult, parameter[member[.notionalAtPeriodStart]]]] assign[member[.values], call[values.div, parameter[member[.numeraire]]]] if[binary_operation[binary_operation[member[.isExcludeAccruedInterest], &&, binary_operation[member[.evaluationTime], >=, binary_operation[member[.productToModelTimeOffset], +, call[.getPeriodStart, parameter[]]]]], &&, binary_operation[member[.evaluationTime], <, binary_operation[member[.productToModelTimeOffset], +, call[.getPeriodEnd, parameter[]]]]]] begin[{] local_variable[type[double], nonAccruedInterestRatio] assign[member[.values], call[values.mult, parameter[member[.nonAccruedInterestRatio]]]] else begin[{] None end[}] else begin[{] assign[member[.values], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.0)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RandomVariableFromDoubleArray, sub_type=None))] end[}] if[member[.notionalFlow]] begin[{] local_variable[type[RandomVariable], nationalAtPeriodEnd] if[binary_operation[call[.getPeriodStart, parameter[]], >, member[.evaluationTime]]] begin[{] local_variable[type[RandomVariable], numeraireAtPeriodStart] assign[member[.values], call[values.subRatio, parameter[member[.notionalAtPeriodStart], member[.numeraireAtPeriodStart]]]] else begin[{] None end[}] if[binary_operation[call[.getPeriodEnd, parameter[]], >, member[.evaluationTime]]] begin[{] local_variable[type[RandomVariable], numeraireAtPeriodEnd] assign[member[.values], call[values.addRatio, parameter[member[.nationalAtPeriodEnd], member[.numeraireAtPeriodEnd]]]] else begin[{] None end[}] else begin[{] None end[}] if[member[.payer]] begin[{] assign[member[.values], call[values.mult, parameter[literal[1.0]]]] else begin[{] None end[}] assign[member[.values], call[values.mult, parameter[member[.numeraireAtEval]]]] return[member[.values]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[RandomVariable] identifier[getValue] operator[SEP] Keyword[double] identifier[evaluationTime] , identifier[LIBORModelMonteCarloSimulationModel] identifier[model] operator[SEP] Keyword[throws] identifier[CalculationException] { Keyword[double] identifier[productToModelTimeOffset] operator[=] Other[0] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[getReferenceDate] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[model] operator[SEP] identifier[getReferenceDate] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[productToModelTimeOffset] operator[=] identifier[FloatingpointDate] operator[SEP] identifier[getFloatingPointDateFromDate] operator[SEP] identifier[model] operator[SEP] identifier[getReferenceDate] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[getReferenceDate] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[UnsupportedOperationException] identifier[e] operator[SEP] { } operator[SEP] Keyword[if] operator[SEP] identifier[evaluationTime] operator[>=] identifier[productToModelTimeOffset] operator[+] identifier[getPaymentDate] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[RandomVariableFromDoubleArray] operator[SEP] literal[Float] operator[SEP] operator[SEP] } identifier[RandomVariable] identifier[notionalAtPeriodStart] operator[=] identifier[getNotional] operator[SEP] operator[SEP] operator[SEP] identifier[getNotionalAtPeriodStart] operator[SEP] Keyword[this] , identifier[model] operator[SEP] operator[SEP] identifier[RandomVariable] identifier[numeraireAtEval] operator[=] identifier[model] operator[SEP] identifier[getNumeraire] operator[SEP] identifier[evaluationTime] operator[SEP] operator[SEP] identifier[RandomVariable] identifier[numeraire] operator[=] identifier[model] operator[SEP] identifier[getNumeraire] operator[SEP] identifier[productToModelTimeOffset] operator[+] identifier[getPaymentDate] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[RandomVariable] identifier[values] operator[SEP] Keyword[if] operator[SEP] identifier[couponFlow] operator[SEP] { identifier[values] operator[=] identifier[getCoupon] operator[SEP] identifier[productToModelTimeOffset] operator[+] identifier[getFixingDate] operator[SEP] operator[SEP] , identifier[model] operator[SEP] operator[SEP] identifier[values] operator[=] identifier[values] operator[SEP] identifier[mult] operator[SEP] identifier[notionalAtPeriodStart] operator[SEP] operator[SEP] identifier[values] operator[=] identifier[values] operator[SEP] identifier[div] operator[SEP] identifier[numeraire] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isExcludeAccruedInterest] operator[&&] identifier[evaluationTime] operator[>=] identifier[productToModelTimeOffset] operator[+] identifier[getPeriodStart] operator[SEP] operator[SEP] operator[&&] identifier[evaluationTime] operator[<] identifier[productToModelTimeOffset] operator[+] identifier[getPeriodEnd] operator[SEP] operator[SEP] operator[SEP] { Keyword[double] identifier[nonAccruedInterestRatio] operator[=] operator[SEP] identifier[productToModelTimeOffset] operator[+] identifier[getPeriodEnd] operator[SEP] operator[SEP] operator[-] identifier[evaluationTime] operator[SEP] operator[/] operator[SEP] identifier[getPeriodEnd] operator[SEP] operator[SEP] operator[-] identifier[getPeriodStart] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[values] operator[=] identifier[values] operator[SEP] identifier[mult] operator[SEP] identifier[nonAccruedInterestRatio] operator[SEP] operator[SEP] } } Keyword[else] { identifier[values] operator[=] Keyword[new] identifier[RandomVariableFromDoubleArray] operator[SEP] literal[Float] , literal[Float] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[notionalFlow] operator[SEP] { identifier[RandomVariable] identifier[nationalAtPeriodEnd] operator[=] identifier[getNotional] operator[SEP] operator[SEP] operator[SEP] identifier[getNotionalAtPeriodEnd] operator[SEP] Keyword[this] , identifier[model] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[getPeriodStart] operator[SEP] operator[SEP] operator[>] identifier[evaluationTime] operator[SEP] { identifier[RandomVariable] identifier[numeraireAtPeriodStart] operator[=] identifier[model] operator[SEP] identifier[getNumeraire] operator[SEP] identifier[getPeriodStart] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[values] operator[=] identifier[values] operator[SEP] identifier[subRatio] operator[SEP] identifier[notionalAtPeriodStart] , identifier[numeraireAtPeriodStart] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[getPeriodEnd] operator[SEP] operator[SEP] operator[>] identifier[evaluationTime] operator[SEP] { identifier[RandomVariable] identifier[numeraireAtPeriodEnd] operator[=] identifier[model] operator[SEP] identifier[getNumeraire] operator[SEP] identifier[getPeriodEnd] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[values] operator[=] identifier[values] operator[SEP] identifier[addRatio] operator[SEP] identifier[nationalAtPeriodEnd] , identifier[numeraireAtPeriodEnd] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[payer] operator[SEP] { identifier[values] operator[=] identifier[values] operator[SEP] identifier[mult] operator[SEP] operator[-] literal[Float] operator[SEP] operator[SEP] } identifier[values] operator[=] identifier[values] operator[SEP] identifier[mult] operator[SEP] identifier[numeraireAtEval] operator[SEP] operator[SEP] Keyword[return] identifier[values] operator[SEP] }
public static Rel getRelFor(String rel, LinkDiscoverers discoverers) { Assert.hasText(rel, "Relation name must not be null!"); Assert.notNull(discoverers, "LinkDiscoverers must not be null!"); if (rel.startsWith("$")) { return new JsonPathRel(rel); } return new LinkDiscovererRel(rel, discoverers); }
class class_name[name] begin[{] method[getRelFor, return_type[type[Rel]], modifier[public static], parameter[rel, discoverers]] begin[{] call[Assert.hasText, parameter[member[.rel], literal["Relation name must not be null!"]]] call[Assert.notNull, parameter[member[.discoverers], literal["LinkDiscoverers must not be null!"]]] if[call[rel.startsWith, parameter[literal["$"]]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=rel, 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=JsonPathRel, sub_type=None))] else begin[{] None end[}] return[ClassCreator(arguments=[MemberReference(member=rel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=discoverers, 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=LinkDiscovererRel, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Rel] identifier[getRelFor] operator[SEP] identifier[String] identifier[rel] , identifier[LinkDiscoverers] identifier[discoverers] operator[SEP] { identifier[Assert] operator[SEP] identifier[hasText] operator[SEP] identifier[rel] , literal[String] operator[SEP] operator[SEP] identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] identifier[discoverers] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[rel] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[JsonPathRel] operator[SEP] identifier[rel] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[LinkDiscovererRel] operator[SEP] identifier[rel] , identifier[discoverers] operator[SEP] operator[SEP] }
public static Set<ExecutableElement> constructorsIn(Set<? extends Element> elements) { return setFilter(elements, CONSTRUCTOR_KIND, ExecutableElement.class); }
class class_name[name] begin[{] method[constructorsIn, return_type[type[Set]], modifier[public static], parameter[elements]] begin[{] return[call[.setFilter, parameter[member[.elements], member[.CONSTRUCTOR_KIND], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ExecutableElement, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Set] operator[<] identifier[ExecutableElement] operator[>] identifier[constructorsIn] operator[SEP] identifier[Set] operator[<] operator[?] Keyword[extends] identifier[Element] operator[>] identifier[elements] operator[SEP] { Keyword[return] identifier[setFilter] operator[SEP] identifier[elements] , identifier[CONSTRUCTOR_KIND] , identifier[ExecutableElement] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public void saveProperty(T property, Object value) throws IOException { saveProperty(property, value.toString()); }
class class_name[name] begin[{] method[saveProperty, return_type[void], modifier[public], parameter[property, value]] begin[{] call[.saveProperty, parameter[member[.property], call[value.toString, parameter[]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[saveProperty] operator[SEP] identifier[T] identifier[property] , identifier[Object] identifier[value] operator[SEP] Keyword[throws] identifier[IOException] { identifier[saveProperty] operator[SEP] identifier[property] , identifier[value] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
protected final int getLineNumber(final String lineNumber) { if (StringUtils.isNotBlank(lineNumber)) { try { return Integer.parseInt(lineNumber); } catch (NumberFormatException exception) { // ignore and return 0 } } return 0; }
class class_name[name] begin[{] method[getLineNumber, return_type[type[int]], modifier[final protected], parameter[lineNumber]] begin[{] if[call[StringUtils.isNotBlank, parameter[member[.lineNumber]]]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=lineNumber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=exception, types=['NumberFormatException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] return[literal[0]] end[}] END[}]
Keyword[protected] Keyword[final] Keyword[int] identifier[getLineNumber] operator[SEP] Keyword[final] identifier[String] identifier[lineNumber] operator[SEP] { Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isNotBlank] operator[SEP] identifier[lineNumber] operator[SEP] operator[SEP] { Keyword[try] { Keyword[return] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[lineNumber] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NumberFormatException] identifier[exception] operator[SEP] { } } Keyword[return] Other[0] operator[SEP] }
@GwtIncompatible("NavigableMap") public static <K, V> NavigableMap<K, V> filterKeys( NavigableMap<K, V> unfiltered, final Predicate<? super K> keyPredicate) { // TODO(user): Return a subclass of Maps.FilteredKeyMap for slightly better // performance. return filterEntries(unfiltered, Maps.<K>keyPredicateOnEntries(keyPredicate)); }
class class_name[name] begin[{] method[filterKeys, return_type[type[NavigableMap]], modifier[public static], parameter[unfiltered, keyPredicate]] begin[{] return[call[.filterEntries, parameter[member[.unfiltered], call[.Maps, parameter[member[.keyPredicate]]]]]] end[}] END[}]
annotation[@] identifier[GwtIncompatible] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[NavigableMap] operator[<] identifier[K] , identifier[V] operator[>] identifier[filterKeys] operator[SEP] identifier[NavigableMap] operator[<] identifier[K] , identifier[V] operator[>] identifier[unfiltered] , Keyword[final] identifier[Predicate] operator[<] operator[?] Keyword[super] identifier[K] operator[>] identifier[keyPredicate] operator[SEP] { Keyword[return] identifier[filterEntries] operator[SEP] identifier[unfiltered] , identifier[Maps] operator[SEP] operator[<] identifier[K] operator[>] identifier[keyPredicateOnEntries] operator[SEP] identifier[keyPredicate] operator[SEP] operator[SEP] operator[SEP] }
public long getMaxTime() { lock.lock(); try { if (printMinMax) { return previousIntervalMinMax.maxTime; } return minMax.maxTime; } finally { lock.unlock(); } }
class class_name[name] begin[{] method[getMaxTime, return_type[type[long]], modifier[public], parameter[]] begin[{] call[lock.lock, parameter[]] TryStatement(block=[IfStatement(condition=MemberReference(member=printMinMax, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=maxTime, postfix_operators=[], prefix_operators=[], qualifier=previousIntervalMinMax, selectors=[]), label=None)])), ReturnStatement(expression=MemberReference(member=maxTime, postfix_operators=[], prefix_operators=[], qualifier=minMax, selectors=[]), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=unlock, postfix_operators=[], prefix_operators=[], qualifier=lock, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[long] identifier[getMaxTime] operator[SEP] operator[SEP] { identifier[lock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[printMinMax] operator[SEP] { Keyword[return] identifier[previousIntervalMinMax] operator[SEP] identifier[maxTime] operator[SEP] } Keyword[return] identifier[minMax] operator[SEP] identifier[maxTime] operator[SEP] } Keyword[finally] { identifier[lock] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP] } }
public static Pace pace(final Number value, final long interval) { double dval = Math.round(value.doubleValue()); if (dval == 0 || interval == 0) return Pace.EMPTY; Pace args = null; double rate = Math.abs(dval / interval); TimeMillis[] intvls = TimeMillis.values(); for (TimeMillis p : intvls) { double relativePace = rate * p.millis(); if (relativePace >= 1) { args = new Pace(Math.round(relativePace), Accuracy.APROX, p); break; } } if (args == null) { args = new Pace(1, Accuracy.LESS_THAN, intvls[intvls.length - 1]); } return args; }
class class_name[name] begin[{] method[pace, return_type[type[Pace]], modifier[public static], parameter[value, interval]] begin[{] local_variable[type[double], dval] if[binary_operation[binary_operation[member[.dval], ==, literal[0]], ||, binary_operation[member[.interval], ==, literal[0]]]] begin[{] return[member[Pace.EMPTY]] else begin[{] None end[}] local_variable[type[Pace], args] local_variable[type[double], rate] local_variable[type[TimeMillis], intvls] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=rate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=millis, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None), operator=*), name=relativePace)], modifiers=set(), type=BasicType(dimensions=[], name=double)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=relativePace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=relativePace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=round, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), MemberReference(member=APROX, postfix_operators=[], prefix_operators=[], qualifier=Accuracy, selectors=[]), MemberReference(member=p, 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=Pace, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=intvls, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=p)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TimeMillis, sub_type=None))), label=None) if[binary_operation[member[.args], ==, literal[null]]] begin[{] assign[member[.args], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), MemberReference(member=LESS_THAN, postfix_operators=[], prefix_operators=[], qualifier=Accuracy, selectors=[]), MemberReference(member=intvls, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=intvls, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Pace, sub_type=None))] else begin[{] None end[}] return[member[.args]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Pace] identifier[pace] operator[SEP] Keyword[final] identifier[Number] identifier[value] , Keyword[final] Keyword[long] identifier[interval] operator[SEP] { Keyword[double] identifier[dval] operator[=] identifier[Math] operator[SEP] identifier[round] operator[SEP] identifier[value] operator[SEP] identifier[doubleValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dval] operator[==] Other[0] operator[||] identifier[interval] operator[==] Other[0] operator[SEP] Keyword[return] identifier[Pace] operator[SEP] identifier[EMPTY] operator[SEP] identifier[Pace] identifier[args] operator[=] Other[null] operator[SEP] Keyword[double] identifier[rate] operator[=] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[dval] operator[/] identifier[interval] operator[SEP] operator[SEP] identifier[TimeMillis] operator[SEP] operator[SEP] identifier[intvls] operator[=] identifier[TimeMillis] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[TimeMillis] identifier[p] operator[:] identifier[intvls] operator[SEP] { Keyword[double] identifier[relativePace] operator[=] identifier[rate] operator[*] identifier[p] operator[SEP] identifier[millis] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[relativePace] operator[>=] Other[1] operator[SEP] { identifier[args] operator[=] Keyword[new] identifier[Pace] operator[SEP] identifier[Math] operator[SEP] identifier[round] operator[SEP] identifier[relativePace] operator[SEP] , identifier[Accuracy] operator[SEP] identifier[APROX] , identifier[p] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } } Keyword[if] operator[SEP] identifier[args] operator[==] Other[null] operator[SEP] { identifier[args] operator[=] Keyword[new] identifier[Pace] operator[SEP] Other[1] , identifier[Accuracy] operator[SEP] identifier[LESS_THAN] , identifier[intvls] operator[SEP] identifier[intvls] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[args] operator[SEP] }
@Override public void addOrUpdateItem(T item) { synchronized (LOCK) { // Update memory cache cache.onObjectUpdated(item.getEngineId(), item); List<T> items = new ArrayList<T>(); items.add(item); asyncStorageInt.addOrUpdateItems(items); for (ListEngineDisplayListener<T> l : listeners) { l.addOrUpdate(item); } } }
class class_name[name] begin[{] method[addOrUpdateItem, return_type[void], modifier[public], parameter[item]] begin[{] SYNCHRONIZED[member[.LOCK]] BEGIN[{] call[cache.onObjectUpdated, parameter[call[item.getEngineId, parameter[]], member[.item]]] local_variable[type[List], items] call[items.add, parameter[member[.item]]] call[asyncStorageInt.addOrUpdateItems, parameter[member[.items]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=item, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addOrUpdate, postfix_operators=[], prefix_operators=[], qualifier=l, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=listeners, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=l)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=ListEngineDisplayListener, sub_type=None))), label=None) END[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[addOrUpdateItem] operator[SEP] identifier[T] identifier[item] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[LOCK] operator[SEP] { identifier[cache] operator[SEP] identifier[onObjectUpdated] operator[SEP] identifier[item] operator[SEP] identifier[getEngineId] operator[SEP] operator[SEP] , identifier[item] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[T] operator[>] identifier[items] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[T] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[items] operator[SEP] identifier[add] operator[SEP] identifier[item] operator[SEP] operator[SEP] identifier[asyncStorageInt] operator[SEP] identifier[addOrUpdateItems] operator[SEP] identifier[items] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ListEngineDisplayListener] operator[<] identifier[T] operator[>] identifier[l] operator[:] identifier[listeners] operator[SEP] { identifier[l] operator[SEP] identifier[addOrUpdate] operator[SEP] identifier[item] operator[SEP] operator[SEP] } } }
public IconProviderBuilder forShape(String shapeName, String iconName) { setType(Type.MODEL); shapeIcons.put(shapeName, icon(iconName)); return this; }
class class_name[name] begin[{] method[forShape, return_type[type[IconProviderBuilder]], modifier[public], parameter[shapeName, iconName]] begin[{] call[.setType, parameter[member[Type.MODEL]]] call[shapeIcons.put, parameter[member[.shapeName], call[.icon, parameter[member[.iconName]]]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[IconProviderBuilder] identifier[forShape] operator[SEP] identifier[String] identifier[shapeName] , identifier[String] identifier[iconName] operator[SEP] { identifier[setType] operator[SEP] identifier[Type] operator[SEP] identifier[MODEL] operator[SEP] operator[SEP] identifier[shapeIcons] operator[SEP] identifier[put] operator[SEP] identifier[shapeName] , identifier[icon] operator[SEP] identifier[iconName] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public static boolean getAt(BitSet self, int index) { int i = normaliseIndex(index, self.length()); return self.get(i); }
class class_name[name] begin[{] method[getAt, return_type[type[boolean]], modifier[public static], parameter[self, index]] begin[{] local_variable[type[int], i] return[call[self.get, parameter[member[.i]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[getAt] operator[SEP] identifier[BitSet] identifier[self] , Keyword[int] identifier[index] operator[SEP] { Keyword[int] identifier[i] operator[=] identifier[normaliseIndex] operator[SEP] identifier[index] , identifier[self] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[self] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] }
public void updateRepeatNumber(int id, Integer repeatNumber) { PreparedStatement statement = null; try (Connection sqlConnection = sqlService.getConnection()) { String queryString = "UPDATE " + Constants.DB_TABLE_ENABLED_OVERRIDE + " SET " + Constants.ENABLED_OVERRIDES_REPEAT_NUMBER + "= ? " + " WHERE " + Constants.GENERIC_ID + " = ?"; statement = sqlConnection.prepareStatement(queryString); statement.setInt(1, repeatNumber); statement.setInt(2, id); statement.executeUpdate(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (statement != null) { statement.close(); } } catch (Exception e) { } } }
class class_name[name] begin[{] method[updateRepeatNumber, return_type[void], modifier[public], parameter[id, repeatNumber]] begin[{] local_variable[type[PreparedStatement], statement] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="UPDATE "), operandr=MemberReference(member=DB_TABLE_ENABLED_OVERRIDE, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" SET "), operator=+), operandr=MemberReference(member=ENABLED_OVERRIDES_REPEAT_NUMBER, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="= ? "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" WHERE "), operator=+), operandr=MemberReference(member=GENERIC_ID, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" = ?"), operator=+), name=queryString)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=statement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=queryString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=prepareStatement, postfix_operators=[], prefix_operators=[], qualifier=sqlConnection, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), MemberReference(member=repeatNumber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setInt, postfix_operators=[], prefix_operators=[], qualifier=statement, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setInt, postfix_operators=[], prefix_operators=[], qualifier=statement, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=executeUpdate, postfix_operators=[], prefix_operators=[], qualifier=statement, 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=['Exception']))], finally_block=[TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=statement, 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=statement, 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)], label=None, resources=[TryResource(annotations=[], modifiers=set(), name=sqlConnection, type=ReferenceType(arguments=None, dimensions=[], name=Connection, sub_type=None), value=MethodInvocation(arguments=[], member=getConnection, postfix_operators=[], prefix_operators=[], qualifier=sqlService, selectors=[], type_arguments=None))]) end[}] END[}]
Keyword[public] Keyword[void] identifier[updateRepeatNumber] operator[SEP] Keyword[int] identifier[id] , identifier[Integer] identifier[repeatNumber] operator[SEP] { identifier[PreparedStatement] identifier[statement] operator[=] Other[null] operator[SEP] Keyword[try] operator[SEP] identifier[Connection] identifier[sqlConnection] operator[=] identifier[sqlService] operator[SEP] identifier[getConnection] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[queryString] operator[=] literal[String] operator[+] identifier[Constants] operator[SEP] identifier[DB_TABLE_ENABLED_OVERRIDE] operator[+] literal[String] operator[+] identifier[Constants] operator[SEP] identifier[ENABLED_OVERRIDES_REPEAT_NUMBER] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[Constants] operator[SEP] identifier[GENERIC_ID] operator[+] literal[String] operator[SEP] identifier[statement] operator[=] identifier[sqlConnection] operator[SEP] identifier[prepareStatement] operator[SEP] identifier[queryString] operator[SEP] operator[SEP] identifier[statement] operator[SEP] identifier[setInt] operator[SEP] Other[1] , identifier[repeatNumber] operator[SEP] operator[SEP] identifier[statement] operator[SEP] identifier[setInt] operator[SEP] Other[2] , identifier[id] operator[SEP] operator[SEP] identifier[statement] operator[SEP] identifier[executeUpdate] operator[SEP] 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[finally] { Keyword[try] { Keyword[if] operator[SEP] identifier[statement] operator[!=] Other[null] operator[SEP] { identifier[statement] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { } } }
private static BigInteger divideAndRoundByTenPow(BigInteger intVal, int tenPow, int roundingMode) { if (tenPow < LONG_TEN_POWERS_TABLE.length) intVal = divideAndRound(intVal, LONG_TEN_POWERS_TABLE[tenPow], roundingMode); else intVal = divideAndRound(intVal, bigTenToThe(tenPow), roundingMode); return intVal; }
class class_name[name] begin[{] method[divideAndRoundByTenPow, return_type[type[BigInteger]], modifier[private static], parameter[intVal, tenPow, roundingMode]] begin[{] if[binary_operation[member[.tenPow], <, member[LONG_TEN_POWERS_TABLE.length]]] begin[{] assign[member[.intVal], call[.divideAndRound, parameter[member[.intVal], member[.LONG_TEN_POWERS_TABLE], member[.roundingMode]]]] else begin[{] assign[member[.intVal], call[.divideAndRound, parameter[member[.intVal], call[.bigTenToThe, parameter[member[.tenPow]]], member[.roundingMode]]]] end[}] return[member[.intVal]] end[}] END[}]
Keyword[private] Keyword[static] identifier[BigInteger] identifier[divideAndRoundByTenPow] operator[SEP] identifier[BigInteger] identifier[intVal] , Keyword[int] identifier[tenPow] , Keyword[int] identifier[roundingMode] operator[SEP] { Keyword[if] operator[SEP] identifier[tenPow] operator[<] identifier[LONG_TEN_POWERS_TABLE] operator[SEP] identifier[length] operator[SEP] identifier[intVal] operator[=] identifier[divideAndRound] operator[SEP] identifier[intVal] , identifier[LONG_TEN_POWERS_TABLE] operator[SEP] identifier[tenPow] operator[SEP] , identifier[roundingMode] operator[SEP] operator[SEP] Keyword[else] identifier[intVal] operator[=] identifier[divideAndRound] operator[SEP] identifier[intVal] , identifier[bigTenToThe] operator[SEP] identifier[tenPow] operator[SEP] , identifier[roundingMode] operator[SEP] operator[SEP] Keyword[return] identifier[intVal] operator[SEP] }
public static ModelNode getAccessControl(ModelControllerClient client, OperationRequestAddress address, boolean operations) { return getAccessControl(client, null, address, operations); }
class class_name[name] begin[{] method[getAccessControl, return_type[type[ModelNode]], modifier[public static], parameter[client, address, operations]] begin[{] return[call[.getAccessControl, parameter[member[.client], literal[null], member[.address], member[.operations]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ModelNode] identifier[getAccessControl] operator[SEP] identifier[ModelControllerClient] identifier[client] , identifier[OperationRequestAddress] identifier[address] , Keyword[boolean] identifier[operations] operator[SEP] { Keyword[return] identifier[getAccessControl] operator[SEP] identifier[client] , Other[null] , identifier[address] , identifier[operations] operator[SEP] operator[SEP] }
protected TypeJsonSerializer lookupSerializer(final Class type) { TypeJsonSerializer tjs = map.get(type); if (tjs == null) { if (defaultSerializerMap != null) { tjs = defaultSerializerMap.map.get(type); } } return tjs; }
class class_name[name] begin[{] method[lookupSerializer, return_type[type[TypeJsonSerializer]], modifier[protected], parameter[type]] begin[{] local_variable[type[TypeJsonSerializer], tjs] if[binary_operation[member[.tjs], ==, literal[null]]] begin[{] if[binary_operation[member[.defaultSerializerMap], !=, literal[null]]] begin[{] assign[member[.tjs], call[defaultSerializerMap.map.get, parameter[member[.type]]]] else begin[{] None end[}] else begin[{] None end[}] return[member[.tjs]] end[}] END[}]
Keyword[protected] identifier[TypeJsonSerializer] identifier[lookupSerializer] operator[SEP] Keyword[final] identifier[Class] identifier[type] operator[SEP] { identifier[TypeJsonSerializer] identifier[tjs] operator[=] identifier[map] operator[SEP] identifier[get] operator[SEP] identifier[type] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tjs] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[defaultSerializerMap] operator[!=] Other[null] operator[SEP] { identifier[tjs] operator[=] identifier[defaultSerializerMap] operator[SEP] identifier[map] operator[SEP] identifier[get] operator[SEP] identifier[type] operator[SEP] operator[SEP] } } Keyword[return] identifier[tjs] operator[SEP] }
@Override public String ltrim(final byte[] key, final long start, final long stop) { checkIsInMultiOrPipeline(); client.ltrim(key, start, stop); return client.getStatusCodeReply(); }
class class_name[name] begin[{] method[ltrim, return_type[type[String]], modifier[public], parameter[key, start, stop]] begin[{] call[.checkIsInMultiOrPipeline, parameter[]] call[client.ltrim, parameter[member[.key], member[.start], member[.stop]]] return[call[client.getStatusCodeReply, parameter[]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[ltrim] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[key] , Keyword[final] Keyword[long] identifier[start] , Keyword[final] Keyword[long] identifier[stop] operator[SEP] { identifier[checkIsInMultiOrPipeline] operator[SEP] operator[SEP] operator[SEP] identifier[client] operator[SEP] identifier[ltrim] operator[SEP] identifier[key] , identifier[start] , identifier[stop] operator[SEP] operator[SEP] Keyword[return] identifier[client] operator[SEP] identifier[getStatusCodeReply] operator[SEP] operator[SEP] operator[SEP] }
public StringBuilder toStream(final StringBuilder iOutput, Object iValue) { if (iValue != null) { if (iValue instanceof ODocumentSerializable) iValue = ((ODocumentSerializable) iValue).toDocument(); if (!(iValue instanceof OSerializableStream)) throw new OSerializationException( "Cannot serialize the object since it's not implements the OSerializableStream interface"); OSerializableStream stream = (OSerializableStream) iValue; iOutput.append(iValue.getClass().getName()); iOutput.append(SEPARATOR); try { iOutput.append(new String(stream.toStream(), "UTF-8")); } catch (UnsupportedEncodingException e) { throw OException.wrapException(new OSerializationException("Error serializing embedded object"), e); } } return iOutput; }
class class_name[name] begin[{] method[toStream, return_type[type[StringBuilder]], modifier[public], parameter[iOutput, iValue]] begin[{] if[binary_operation[member[.iValue], !=, literal[null]]] begin[{] if[binary_operation[member[.iValue], instanceof, type[ODocumentSerializable]]] begin[{] assign[member[.iValue], Cast(expression=MemberReference(member=iValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ODocumentSerializable, sub_type=None))] else begin[{] None end[}] if[binary_operation[member[.iValue], instanceof, type[OSerializableStream]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot serialize the object since it's not implements the OSerializableStream interface")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OSerializationException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[OSerializableStream], stream] call[iOutput.append, parameter[call[iValue.getClass, parameter[]]]] call[iOutput.append, parameter[member[.SEPARATOR]]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=toStream, postfix_operators=[], prefix_operators=[], qualifier=stream, selectors=[], type_arguments=None), 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=String, sub_type=None))], member=append, postfix_operators=[], prefix_operators=[], qualifier=iOutput, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error serializing embedded object")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OSerializationException, sub_type=None)), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=wrapException, postfix_operators=[], prefix_operators=[], qualifier=OException, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['UnsupportedEncodingException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] return[member[.iOutput]] end[}] END[}]
Keyword[public] identifier[StringBuilder] identifier[toStream] operator[SEP] Keyword[final] identifier[StringBuilder] identifier[iOutput] , identifier[Object] identifier[iValue] operator[SEP] { Keyword[if] operator[SEP] identifier[iValue] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[iValue] Keyword[instanceof] identifier[ODocumentSerializable] operator[SEP] identifier[iValue] operator[=] operator[SEP] operator[SEP] identifier[ODocumentSerializable] operator[SEP] identifier[iValue] operator[SEP] operator[SEP] identifier[toDocument] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[iValue] Keyword[instanceof] identifier[OSerializableStream] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[OSerializationException] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[OSerializableStream] identifier[stream] operator[=] operator[SEP] identifier[OSerializableStream] operator[SEP] identifier[iValue] operator[SEP] identifier[iOutput] operator[SEP] identifier[append] operator[SEP] identifier[iValue] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[iOutput] operator[SEP] identifier[append] operator[SEP] identifier[SEPARATOR] operator[SEP] operator[SEP] Keyword[try] { identifier[iOutput] operator[SEP] identifier[append] operator[SEP] Keyword[new] identifier[String] operator[SEP] identifier[stream] operator[SEP] identifier[toStream] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[UnsupportedEncodingException] identifier[e] operator[SEP] { Keyword[throw] identifier[OException] operator[SEP] identifier[wrapException] operator[SEP] Keyword[new] identifier[OSerializationException] operator[SEP] literal[String] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } } Keyword[return] identifier[iOutput] operator[SEP] }
public ModelNode execute(ModelNode request) throws Exception { ModelControllerClient mcc = getModelControllerClient(); return mcc.execute(request, OperationMessageHandler.logging); }
class class_name[name] begin[{] method[execute, return_type[type[ModelNode]], modifier[public], parameter[request]] begin[{] local_variable[type[ModelControllerClient], mcc] return[call[mcc.execute, parameter[member[.request], member[OperationMessageHandler.logging]]]] end[}] END[}]
Keyword[public] identifier[ModelNode] identifier[execute] operator[SEP] identifier[ModelNode] identifier[request] operator[SEP] Keyword[throws] identifier[Exception] { identifier[ModelControllerClient] identifier[mcc] operator[=] identifier[getModelControllerClient] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[mcc] operator[SEP] identifier[execute] operator[SEP] identifier[request] , identifier[OperationMessageHandler] operator[SEP] identifier[logging] operator[SEP] operator[SEP] }
private MessageDto request(MessageDto messageDto, long timeout, String whenNonManagerMessage) throws RpcException { for (int i = 0; i < rpcClient.loadAllRemoteKey().size() + 1; i++) { try { String remoteKey = rpcClient.loadRemoteKey(); MessageDto result = rpcClient.request(remoteKey, messageDto, timeout); log.debug("request action: {}. TM[{}]", messageDto.getAction(), remoteKey); return result; } catch (RpcException e) { if (e.getCode() == RpcException.NON_TX_MANAGER) { throw new RpcException(e.getCode(), whenNonManagerMessage + ". non tx-manager is alive."); } } } throw new RpcException(RpcException.NON_TX_MANAGER, whenNonManagerMessage + ". non tx-manager is alive."); }
class class_name[name] begin[{] method[request, return_type[type[MessageDto]], modifier[private], parameter[messageDto, timeout, whenNonManagerMessage]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=loadRemoteKey, postfix_operators=[], prefix_operators=[], qualifier=rpcClient, selectors=[], type_arguments=None), name=remoteKey)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=remoteKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=messageDto, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=timeout, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=request, postfix_operators=[], prefix_operators=[], qualifier=rpcClient, selectors=[], type_arguments=None), name=result)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MessageDto, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="request action: {}. TM[{}]"), MethodInvocation(arguments=[], member=getAction, postfix_operators=[], prefix_operators=[], qualifier=messageDto, selectors=[], type_arguments=None), MemberReference(member=remoteKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getCode, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operandr=MemberReference(member=NON_TX_MANAGER, postfix_operators=[], prefix_operators=[], qualifier=RpcException, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getCode, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), BinaryOperation(operandl=MemberReference(member=whenNonManagerMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=". non tx-manager is alive."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RpcException, sub_type=None)), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['RpcException']))], finally_block=None, label=None, resources=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=loadAllRemoteKey, postfix_operators=[], prefix_operators=[], qualifier=rpcClient, selectors=[MethodInvocation(arguments=[], member=size, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), 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) ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=NON_TX_MANAGER, postfix_operators=[], prefix_operators=[], qualifier=RpcException, selectors=[]), BinaryOperation(operandl=MemberReference(member=whenNonManagerMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=". non tx-manager is alive."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RpcException, sub_type=None)), label=None) end[}] END[}]
Keyword[private] identifier[MessageDto] identifier[request] operator[SEP] identifier[MessageDto] identifier[messageDto] , Keyword[long] identifier[timeout] , identifier[String] identifier[whenNonManagerMessage] operator[SEP] Keyword[throws] identifier[RpcException] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[rpcClient] operator[SEP] identifier[loadAllRemoteKey] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[+] Other[1] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[try] { identifier[String] identifier[remoteKey] operator[=] identifier[rpcClient] operator[SEP] identifier[loadRemoteKey] operator[SEP] operator[SEP] operator[SEP] identifier[MessageDto] identifier[result] operator[=] identifier[rpcClient] operator[SEP] identifier[request] operator[SEP] identifier[remoteKey] , identifier[messageDto] , identifier[timeout] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[messageDto] operator[SEP] identifier[getAction] operator[SEP] operator[SEP] , identifier[remoteKey] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] } Keyword[catch] operator[SEP] identifier[RpcException] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[e] operator[SEP] identifier[getCode] operator[SEP] operator[SEP] operator[==] identifier[RpcException] operator[SEP] identifier[NON_TX_MANAGER] operator[SEP] { Keyword[throw] Keyword[new] identifier[RpcException] operator[SEP] identifier[e] operator[SEP] identifier[getCode] operator[SEP] operator[SEP] , identifier[whenNonManagerMessage] operator[+] literal[String] operator[SEP] operator[SEP] } } } Keyword[throw] Keyword[new] identifier[RpcException] operator[SEP] identifier[RpcException] operator[SEP] identifier[NON_TX_MANAGER] , identifier[whenNonManagerMessage] operator[+] literal[String] operator[SEP] operator[SEP] }
public WebReply getHTTPSRedirectWebReply(HttpServletRequest req) { Integer httpsPort = (Integer) SRTServletRequestUtils.getPrivateAttribute(req, "SecurityRedirectPort"); if (httpsPort == null) { Tr.error(tc, "SSL_PORT_IS_NULL"); // return a 403 if we don't know what the port is return new DenyReply("Resource must be accessed with a secure connection try again using an HTTPS connection."); } URL originalURL = null; String urlString = null; try { urlString = req.getRequestURL().toString(); originalURL = new URL(urlString); } catch (MalformedURLException e) { Tr.error(tc, "SSL_REQ_URL_MALFORMED_EXCEPTION", urlString); // return a 403 if we can't construct the redirect URL return new DenyReply("Resource must be accessed with a secure connection try again using an HTTPS connection."); } String queryString = req.getQueryString(); try { URL redirectURL = new URL("https", originalURL.getHost(), httpsPort, originalURL.getPath() + (queryString == null ? "" : "?" + queryString)); //don't add cookies during the redirect as this results in duplicated and incomplete //cookies on the client side return new RedirectReply(redirectURL.toString(), null); } catch (MalformedURLException e) { Tr.error(tc, "SSL_REQ_URL_MALFORMED_EXCEPTION", "https" + originalURL.getHost() + httpsPort + originalURL.getPath() + (queryString == null ? "" : "?" + queryString)); // return a 403 if we can't construct the redirect URL return new DenyReply("Resource must be accessed with a secure connection try again using an HTTPS connection."); } }
class class_name[name] begin[{] method[getHTTPSRedirectWebReply, return_type[type[WebReply]], modifier[public], parameter[req]] begin[{] local_variable[type[Integer], httpsPort] if[binary_operation[member[.httpsPort], ==, literal[null]]] begin[{] call[Tr.error, parameter[member[.tc], literal["SSL_PORT_IS_NULL"]]] return[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Resource must be accessed with a secure connection try again using an HTTPS connection.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DenyReply, sub_type=None))] else begin[{] None end[}] local_variable[type[URL], originalURL] local_variable[type[String], urlString] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=urlString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getRequestURL, postfix_operators=[], prefix_operators=[], qualifier=req, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=originalURL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=urlString, 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=URL, sub_type=None))), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="SSL_REQ_URL_MALFORMED_EXCEPTION"), MemberReference(member=urlString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Resource must be accessed with a secure connection try again using an HTTPS connection.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DenyReply, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['MalformedURLException']))], finally_block=None, label=None, resources=None) local_variable[type[String], queryString] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="https"), MethodInvocation(arguments=[], member=getHost, postfix_operators=[], prefix_operators=[], qualifier=originalURL, selectors=[], type_arguments=None), MemberReference(member=httpsPort, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MethodInvocation(arguments=[], member=getPath, postfix_operators=[], prefix_operators=[], qualifier=originalURL, selectors=[], type_arguments=None), operandr=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=queryString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="?"), operandr=MemberReference(member=queryString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=URL, sub_type=None)), name=redirectURL)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=URL, sub_type=None)), ReturnStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=redirectURL, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RedirectReply, sub_type=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="SSL_REQ_URL_MALFORMED_EXCEPTION"), BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="https"), operandr=MethodInvocation(arguments=[], member=getHost, postfix_operators=[], prefix_operators=[], qualifier=originalURL, selectors=[], type_arguments=None), operator=+), operandr=MemberReference(member=httpsPort, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MethodInvocation(arguments=[], member=getPath, postfix_operators=[], prefix_operators=[], qualifier=originalURL, selectors=[], type_arguments=None), operator=+), operandr=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=queryString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="?"), operandr=MemberReference(member=queryString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")), operator=+)], member=error, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Resource must be accessed with a secure connection try again using an HTTPS connection.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DenyReply, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['MalformedURLException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] identifier[WebReply] identifier[getHTTPSRedirectWebReply] operator[SEP] identifier[HttpServletRequest] identifier[req] operator[SEP] { identifier[Integer] identifier[httpsPort] operator[=] operator[SEP] identifier[Integer] operator[SEP] identifier[SRTServletRequestUtils] operator[SEP] identifier[getPrivateAttribute] operator[SEP] identifier[req] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[httpsPort] operator[==] Other[null] operator[SEP] { identifier[Tr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[DenyReply] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[URL] identifier[originalURL] operator[=] Other[null] operator[SEP] identifier[String] identifier[urlString] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[urlString] operator[=] identifier[req] operator[SEP] identifier[getRequestURL] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[originalURL] operator[=] Keyword[new] identifier[URL] operator[SEP] identifier[urlString] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[MalformedURLException] identifier[e] operator[SEP] { identifier[Tr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] , identifier[urlString] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[DenyReply] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[String] identifier[queryString] operator[=] identifier[req] operator[SEP] identifier[getQueryString] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[URL] identifier[redirectURL] operator[=] Keyword[new] identifier[URL] operator[SEP] literal[String] , identifier[originalURL] operator[SEP] identifier[getHost] operator[SEP] operator[SEP] , identifier[httpsPort] , identifier[originalURL] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[+] operator[SEP] identifier[queryString] operator[==] Other[null] operator[?] literal[String] operator[:] literal[String] operator[+] identifier[queryString] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[RedirectReply] operator[SEP] identifier[redirectURL] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , Other[null] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[MalformedURLException] identifier[e] operator[SEP] { identifier[Tr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] , literal[String] operator[+] identifier[originalURL] operator[SEP] identifier[getHost] operator[SEP] operator[SEP] operator[+] identifier[httpsPort] operator[+] identifier[originalURL] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[+] operator[SEP] identifier[queryString] operator[==] Other[null] operator[?] literal[String] operator[:] literal[String] operator[+] identifier[queryString] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[DenyReply] operator[SEP] literal[String] operator[SEP] operator[SEP] } }
public static <T extends ModifierReviewable.OfByteCodeElement> ElementMatcher.Junction<T> isPackagePrivate() { return not(isPublic().or(isProtected()).or(isPrivate())); }
class class_name[name] begin[{] method[isPackagePrivate, return_type[type[ElementMatcher]], modifier[public static], parameter[]] begin[{] return[call[.not, parameter[call[.isPublic, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[ModifierReviewable] operator[SEP] identifier[OfByteCodeElement] operator[>] identifier[ElementMatcher] operator[SEP] identifier[Junction] operator[<] identifier[T] operator[>] identifier[isPackagePrivate] operator[SEP] operator[SEP] { Keyword[return] identifier[not] operator[SEP] identifier[isPublic] operator[SEP] operator[SEP] operator[SEP] identifier[or] operator[SEP] identifier[isProtected] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[or] operator[SEP] identifier[isPrivate] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void setVUniformIncrement(Integer newVUniformIncrement) { Integer oldVUniformIncrement = vUniformIncrement; vUniformIncrement = newVUniformIncrement; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.METRIC_ADJUSTMENT__VUNIFORM_INCREMENT, oldVUniformIncrement, vUniformIncrement)); }
class class_name[name] begin[{] method[setVUniformIncrement, return_type[void], modifier[public], parameter[newVUniformIncrement]] begin[{] local_variable[type[Integer], oldVUniformIncrement] assign[member[.vUniformIncrement], member[.newVUniformIncrement]] if[call[.eNotificationRequired, parameter[]]] begin[{] call[.eNotify, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=SET, postfix_operators=[], prefix_operators=[], qualifier=Notification, selectors=[]), MemberReference(member=METRIC_ADJUSTMENT__VUNIFORM_INCREMENT, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[]), MemberReference(member=oldVUniformIncrement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=vUniformIncrement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ENotificationImpl, sub_type=None))]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setVUniformIncrement] operator[SEP] identifier[Integer] identifier[newVUniformIncrement] operator[SEP] { identifier[Integer] identifier[oldVUniformIncrement] operator[=] identifier[vUniformIncrement] operator[SEP] identifier[vUniformIncrement] operator[=] identifier[newVUniformIncrement] operator[SEP] Keyword[if] operator[SEP] identifier[eNotificationRequired] operator[SEP] operator[SEP] operator[SEP] identifier[eNotify] operator[SEP] Keyword[new] identifier[ENotificationImpl] operator[SEP] Keyword[this] , identifier[Notification] operator[SEP] identifier[SET] , identifier[AfplibPackage] operator[SEP] identifier[METRIC_ADJUSTMENT__VUNIFORM_INCREMENT] , identifier[oldVUniformIncrement] , identifier[vUniformIncrement] operator[SEP] operator[SEP] operator[SEP] }
public void register(Class<? extends Controller>... controllerClasses) { for (Class<? extends Controller> controllerClass : controllerClasses) { register(controllerClass); } }
class class_name[name] begin[{] method[register, return_type[void], modifier[public], parameter[controllerClasses]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=controllerClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=register, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=controllerClasses, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=controllerClass)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=extends, type=ReferenceType(arguments=None, dimensions=[], name=Controller, sub_type=None))], dimensions=[], name=Class, sub_type=None))), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[register] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Controller] operator[>] operator[...] identifier[controllerClasses] operator[SEP] { Keyword[for] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Controller] operator[>] identifier[controllerClass] operator[:] identifier[controllerClasses] operator[SEP] { identifier[register] operator[SEP] identifier[controllerClass] operator[SEP] operator[SEP] } }
private void configureClearText(final SocketChannel ch) { final ChannelPipeline p = ch.pipeline(); final HttpServerCodec sourceCodec = new HttpServerCodec(); final HttpServerUpgradeHandler upgradeHandler = new HttpServerUpgradeHandler(sourceCodec, new UpgradeCodecFactory() { @Override public HttpServerUpgradeHandler.UpgradeCodec newUpgradeCodec(CharSequence protocol) { if (AsciiString.contentEquals(Http2CodecUtil.HTTP_UPGRADE_PROTOCOL_NAME, protocol)) { return new Http2ServerUpgradeCodec(new Http2ChannelHandlerBuilder(serverHandler).build()); } else { return null; } } }); final Http2ServerUpgradeHandler cleartextHttp2ServerUpgradeHandler = new Http2ServerUpgradeHandler(bizGroup, sourceCodec, upgradeHandler, new Http2ChannelHandlerBuilder(serverHandler).build()); // 先通过 HTTP Upgrade 协商版本 p.addLast("Http2ServerUpgradeHandler", cleartextHttp2ServerUpgradeHandler); // 如果没有升级,那就是HTTP/1.1的请求,降级 p.addLast("HttpDirectTalkingHandler", new SimpleChannelInboundHandler<HttpMessage>() { @Override protected void channelRead0(ChannelHandlerContext ctx, HttpMessage msg) throws Exception { // If this handler is hit then no upgrade has been attempted and the client is just talking HTTP. if (LOGGER.isWarnEnabled()) { LOGGER.warn("Directly talking: {} (no upgrade was attempted) from {}", msg.protocolVersion(), NetUtil.toSocketAddressString(ch.remoteAddress())); } ChannelPipeline pipeline = ctx.pipeline(); ChannelHandlerContext thisCtx = pipeline.context(this); // 不需要了 pipeline.addAfter(bizGroup, thisCtx.name(), "Http1ChannelHandler", new Http1ServerChannelHandler(serverHandler)); pipeline.replace(this, "HttpObjectAggregator", new HttpObjectAggregator(maxHttpContentLength)); // HttpServerUpgradeHandler -> HttpServerCodec -> HttpObjectAggregator -> Http1ChannelHandler, ctx.fireChannelRead(ReferenceCountUtil.retain(msg)); } }); }
class class_name[name] begin[{] method[configureClearText, return_type[void], modifier[private], parameter[ch]] begin[{] local_variable[type[ChannelPipeline], p] local_variable[type[HttpServerCodec], sourceCodec] local_variable[type[HttpServerUpgradeHandler], upgradeHandler] local_variable[type[Http2ServerUpgradeHandler], cleartextHttp2ServerUpgradeHandler] call[p.addLast, parameter[literal["Http2ServerUpgradeHandler"], member[.cleartextHttp2ServerUpgradeHandler]]] call[p.addLast, parameter[literal["HttpDirectTalkingHandler"], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[IfStatement(condition=MethodInvocation(arguments=[], member=isWarnEnabled, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Directly talking: {} (no upgrade was attempted) from {}"), MethodInvocation(arguments=[], member=protocolVersion, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=remoteAddress, postfix_operators=[], prefix_operators=[], qualifier=ch, selectors=[], type_arguments=None)], member=toSocketAddressString, postfix_operators=[], prefix_operators=[], qualifier=NetUtil, selectors=[], type_arguments=None)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=pipeline, postfix_operators=[], prefix_operators=[], qualifier=ctx, selectors=[], type_arguments=None), name=pipeline)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ChannelPipeline, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=context, postfix_operators=[], prefix_operators=[], qualifier=pipeline, selectors=[], type_arguments=None), name=thisCtx)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ChannelHandlerContext, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=bizGroup, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=name, postfix_operators=[], prefix_operators=[], qualifier=thisCtx, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Http1ChannelHandler"), ClassCreator(arguments=[MemberReference(member=serverHandler, 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=Http1ServerChannelHandler, sub_type=None))], member=addAfter, postfix_operators=[], prefix_operators=[], qualifier=pipeline, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="HttpObjectAggregator"), ClassCreator(arguments=[MemberReference(member=maxHttpContentLength, 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=HttpObjectAggregator, sub_type=None))], member=replace, postfix_operators=[], prefix_operators=[], qualifier=pipeline, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=retain, postfix_operators=[], prefix_operators=[], qualifier=ReferenceCountUtil, selectors=[], type_arguments=None)], member=fireChannelRead, postfix_operators=[], prefix_operators=[], qualifier=ctx, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'protected'}, name=channelRead0, parameters=[FormalParameter(annotations=[], modifiers=set(), name=ctx, type=ReferenceType(arguments=None, dimensions=[], name=ChannelHandlerContext, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=msg, type=ReferenceType(arguments=None, dimensions=[], name=HttpMessage, sub_type=None), varargs=False)], return_type=None, throws=['Exception'], type_parameters=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=HttpMessage, sub_type=None))], dimensions=None, name=SimpleChannelInboundHandler, sub_type=None))]] end[}] END[}]
Keyword[private] Keyword[void] identifier[configureClearText] operator[SEP] Keyword[final] identifier[SocketChannel] identifier[ch] operator[SEP] { Keyword[final] identifier[ChannelPipeline] identifier[p] operator[=] identifier[ch] operator[SEP] identifier[pipeline] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[HttpServerCodec] identifier[sourceCodec] operator[=] Keyword[new] identifier[HttpServerCodec] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[HttpServerUpgradeHandler] identifier[upgradeHandler] operator[=] Keyword[new] identifier[HttpServerUpgradeHandler] operator[SEP] identifier[sourceCodec] , Keyword[new] identifier[UpgradeCodecFactory] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[HttpServerUpgradeHandler] operator[SEP] identifier[UpgradeCodec] identifier[newUpgradeCodec] operator[SEP] identifier[CharSequence] identifier[protocol] operator[SEP] { Keyword[if] operator[SEP] identifier[AsciiString] operator[SEP] identifier[contentEquals] operator[SEP] identifier[Http2CodecUtil] operator[SEP] identifier[HTTP_UPGRADE_PROTOCOL_NAME] , identifier[protocol] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[Http2ServerUpgradeCodec] operator[SEP] Keyword[new] identifier[Http2ChannelHandlerBuilder] operator[SEP] identifier[serverHandler] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Other[null] operator[SEP] } } } operator[SEP] operator[SEP] Keyword[final] identifier[Http2ServerUpgradeHandler] identifier[cleartextHttp2ServerUpgradeHandler] operator[=] Keyword[new] identifier[Http2ServerUpgradeHandler] operator[SEP] identifier[bizGroup] , identifier[sourceCodec] , identifier[upgradeHandler] , Keyword[new] identifier[Http2ChannelHandlerBuilder] operator[SEP] identifier[serverHandler] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[addLast] operator[SEP] literal[String] , identifier[cleartextHttp2ServerUpgradeHandler] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[addLast] operator[SEP] literal[String] , Keyword[new] identifier[SimpleChannelInboundHandler] operator[<] identifier[HttpMessage] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[channelRead0] operator[SEP] identifier[ChannelHandlerContext] identifier[ctx] , identifier[HttpMessage] identifier[msg] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[if] operator[SEP] identifier[LOGGER] operator[SEP] identifier[isWarnEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[msg] operator[SEP] identifier[protocolVersion] operator[SEP] operator[SEP] , identifier[NetUtil] operator[SEP] identifier[toSocketAddressString] operator[SEP] identifier[ch] operator[SEP] identifier[remoteAddress] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[ChannelPipeline] identifier[pipeline] operator[=] identifier[ctx] operator[SEP] identifier[pipeline] operator[SEP] operator[SEP] operator[SEP] identifier[ChannelHandlerContext] identifier[thisCtx] operator[=] identifier[pipeline] operator[SEP] identifier[context] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[pipeline] operator[SEP] identifier[addAfter] operator[SEP] identifier[bizGroup] , identifier[thisCtx] operator[SEP] identifier[name] operator[SEP] operator[SEP] , literal[String] , Keyword[new] identifier[Http1ServerChannelHandler] operator[SEP] identifier[serverHandler] operator[SEP] operator[SEP] operator[SEP] identifier[pipeline] operator[SEP] identifier[replace] operator[SEP] Keyword[this] , literal[String] , Keyword[new] identifier[HttpObjectAggregator] operator[SEP] identifier[maxHttpContentLength] operator[SEP] operator[SEP] operator[SEP] identifier[ctx] operator[SEP] identifier[fireChannelRead] operator[SEP] identifier[ReferenceCountUtil] operator[SEP] identifier[retain] operator[SEP] identifier[msg] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
static RequestCreator<JmxReadRequest> newCreator() { return new RequestCreator<JmxReadRequest>() { /** {@inheritDoc} */ public JmxReadRequest create(Stack<String> pStack, ProcessingParameters pParams) throws MalformedObjectNameException { return new JmxReadRequest( pStack.pop(), // object name popOrNull(pStack), // attribute(s) (can be null) prepareExtraArgs(pStack), // path pParams); } /** {@inheritDoc} */ public JmxReadRequest create(Map<String, ?> requestMap, ProcessingParameters pParams) throws MalformedObjectNameException { return new JmxReadRequest(requestMap,pParams); } }; }
class class_name[name] begin[{] method[newCreator, return_type[type[RequestCreator]], modifier[static], parameter[]] begin[{] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[ReturnStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=pop, postfix_operators=[], prefix_operators=[], qualifier=pStack, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=pStack, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=popOrNull, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=pStack, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=prepareExtraArgs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=pParams, 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=JmxReadRequest, sub_type=None)), label=None)], documentation=/** {@inheritDoc} */, modifiers={'public'}, name=create, parameters=[FormalParameter(annotations=[], modifiers=set(), name=pStack, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=Stack, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=pParams, type=ReferenceType(arguments=None, dimensions=[], name=ProcessingParameters, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=JmxReadRequest, sub_type=None), throws=['MalformedObjectNameException'], type_parameters=None), MethodDeclaration(annotations=[], body=[ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=requestMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pParams, 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=JmxReadRequest, sub_type=None)), label=None)], documentation=/** {@inheritDoc} */, modifiers={'public'}, name=create, parameters=[FormalParameter(annotations=[], modifiers=set(), name=requestMap, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Map, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=pParams, type=ReferenceType(arguments=None, dimensions=[], name=ProcessingParameters, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=JmxReadRequest, sub_type=None), throws=['MalformedObjectNameException'], type_parameters=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=JmxReadRequest, sub_type=None))], dimensions=None, name=RequestCreator, sub_type=None))] end[}] END[}]
Keyword[static] identifier[RequestCreator] operator[<] identifier[JmxReadRequest] operator[>] identifier[newCreator] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[RequestCreator] operator[<] identifier[JmxReadRequest] operator[>] operator[SEP] operator[SEP] { Keyword[public] identifier[JmxReadRequest] identifier[create] operator[SEP] identifier[Stack] operator[<] identifier[String] operator[>] identifier[pStack] , identifier[ProcessingParameters] identifier[pParams] operator[SEP] Keyword[throws] identifier[MalformedObjectNameException] { Keyword[return] Keyword[new] identifier[JmxReadRequest] operator[SEP] identifier[pStack] operator[SEP] identifier[pop] operator[SEP] operator[SEP] , identifier[popOrNull] operator[SEP] identifier[pStack] operator[SEP] , identifier[prepareExtraArgs] operator[SEP] identifier[pStack] operator[SEP] , identifier[pParams] operator[SEP] operator[SEP] } Keyword[public] identifier[JmxReadRequest] identifier[create] operator[SEP] identifier[Map] operator[<] identifier[String] , operator[?] operator[>] identifier[requestMap] , identifier[ProcessingParameters] identifier[pParams] operator[SEP] Keyword[throws] identifier[MalformedObjectNameException] { Keyword[return] Keyword[new] identifier[JmxReadRequest] operator[SEP] identifier[requestMap] , identifier[pParams] operator[SEP] operator[SEP] } } operator[SEP] }
public Rule HtmlBlock() { return NodeSequence( FirstOf(HtmlBlockInTags(), HtmlComment(), HtmlBlockSelfClosing()), push(new HtmlBlockNode(ext(SUPPRESS_HTML_BLOCKS) ? "" : match())), BlankLine() ); }
class class_name[name] begin[{] method[HtmlBlock, return_type[type[Rule]], modifier[public], parameter[]] begin[{] return[call[.NodeSequence, parameter[call[.FirstOf, parameter[call[.HtmlBlockInTags, parameter[]], call[.HtmlComment, parameter[]], call[.HtmlBlockSelfClosing, parameter[]]]], call[.push, parameter[ClassCreator(arguments=[TernaryExpression(condition=MethodInvocation(arguments=[MemberReference(member=SUPPRESS_HTML_BLOCKS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=ext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), if_false=MethodInvocation(arguments=[], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HtmlBlockNode, sub_type=None))]], call[.BlankLine, parameter[]]]]] end[}] END[}]
Keyword[public] identifier[Rule] identifier[HtmlBlock] operator[SEP] operator[SEP] { Keyword[return] identifier[NodeSequence] operator[SEP] identifier[FirstOf] operator[SEP] identifier[HtmlBlockInTags] operator[SEP] operator[SEP] , identifier[HtmlComment] operator[SEP] operator[SEP] , identifier[HtmlBlockSelfClosing] operator[SEP] operator[SEP] operator[SEP] , identifier[push] operator[SEP] Keyword[new] identifier[HtmlBlockNode] operator[SEP] identifier[ext] operator[SEP] identifier[SUPPRESS_HTML_BLOCKS] operator[SEP] operator[?] literal[String] operator[:] identifier[match] operator[SEP] operator[SEP] operator[SEP] operator[SEP] , identifier[BlankLine] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static final Bytes of(ByteBuffer bb) { Objects.requireNonNull(bb); if (bb.remaining() == 0) { return EMPTY; } byte[] data; if (bb.hasArray()) { data = Arrays.copyOfRange(bb.array(), bb.position() + bb.arrayOffset(), bb.limit() + bb.arrayOffset()); } else { data = new byte[bb.remaining()]; // duplicate so that it does not change position bb.duplicate().get(data); } return new Bytes(data); }
class class_name[name] begin[{] method[of, return_type[type[Bytes]], modifier[final public static], parameter[bb]] begin[{] call[Objects.requireNonNull, parameter[member[.bb]]] if[binary_operation[call[bb.remaining, parameter[]], ==, literal[0]]] begin[{] return[member[.EMPTY]] else begin[{] None end[}] local_variable[type[byte], data] if[call[bb.hasArray, parameter[]]] begin[{] assign[member[.data], call[Arrays.copyOfRange, parameter[call[bb.array, parameter[]], binary_operation[call[bb.position, parameter[]], +, call[bb.arrayOffset, parameter[]]], binary_operation[call[bb.limit, parameter[]], +, call[bb.arrayOffset, parameter[]]]]]] else begin[{] assign[member[.data], ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=remaining, postfix_operators=[], prefix_operators=[], qualifier=bb, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte))] call[bb.duplicate, parameter[]] end[}] return[ClassCreator(arguments=[MemberReference(member=data, 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=Bytes, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] Keyword[final] identifier[Bytes] identifier[of] operator[SEP] identifier[ByteBuffer] identifier[bb] operator[SEP] { identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[bb] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[bb] operator[SEP] identifier[remaining] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[return] identifier[EMPTY] operator[SEP] } Keyword[byte] operator[SEP] operator[SEP] identifier[data] operator[SEP] Keyword[if] operator[SEP] identifier[bb] operator[SEP] identifier[hasArray] operator[SEP] operator[SEP] operator[SEP] { identifier[data] operator[=] identifier[Arrays] operator[SEP] identifier[copyOfRange] operator[SEP] identifier[bb] operator[SEP] identifier[array] operator[SEP] operator[SEP] , identifier[bb] operator[SEP] identifier[position] operator[SEP] operator[SEP] operator[+] identifier[bb] operator[SEP] identifier[arrayOffset] operator[SEP] operator[SEP] , identifier[bb] operator[SEP] identifier[limit] operator[SEP] operator[SEP] operator[+] identifier[bb] operator[SEP] identifier[arrayOffset] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[data] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[bb] operator[SEP] identifier[remaining] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[bb] operator[SEP] identifier[duplicate] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[data] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[Bytes] operator[SEP] identifier[data] operator[SEP] operator[SEP] }
@Override public <T> T adapt(Class<T> clazz) { if (MessageContext.class.isAssignableFrom(clazz)) { return clazz.cast(this); } return null; }
class class_name[name] begin[{] method[adapt, return_type[type[T]], modifier[public], parameter[clazz]] begin[{] if[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=MessageContext, sub_type=None))] begin[{] return[call[clazz.cast, parameter[THIS[]]]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[adapt] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[clazz] operator[SEP] { Keyword[if] operator[SEP] identifier[MessageContext] operator[SEP] Keyword[class] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[clazz] operator[SEP] operator[SEP] { Keyword[return] identifier[clazz] operator[SEP] identifier[cast] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
private void encodeCodecData(final RevisionCodecData codecData) throws EncodingException { this.codecData = codecData; // C data.writeBit(0); data.writeBit(0); data.writeBit(0); // BLOCK SIZES - S E B L this.data.writeValue(5, codecData.getBlocksizeS()); this.data.writeValue(5, codecData.getBlocksizeE()); this.data.writeValue(5, codecData.getBlocksizeB()); this.data.writeValue(5, codecData.getBlocksizeL()); // 1 Bit data.writeFillBits(); }
class class_name[name] begin[{] method[encodeCodecData, return_type[void], modifier[private], parameter[codecData]] begin[{] assign[THIS[member[None.codecData]], member[.codecData]] call[data.writeBit, parameter[literal[0]]] call[data.writeBit, parameter[literal[0]]] call[data.writeBit, parameter[literal[0]]] THIS[member[None.data]call[None.writeValue, parameter[literal[5], call[codecData.getBlocksizeS, parameter[]]]]] THIS[member[None.data]call[None.writeValue, parameter[literal[5], call[codecData.getBlocksizeE, parameter[]]]]] THIS[member[None.data]call[None.writeValue, parameter[literal[5], call[codecData.getBlocksizeB, parameter[]]]]] THIS[member[None.data]call[None.writeValue, parameter[literal[5], call[codecData.getBlocksizeL, parameter[]]]]] call[data.writeFillBits, parameter[]] end[}] END[}]
Keyword[private] Keyword[void] identifier[encodeCodecData] operator[SEP] Keyword[final] identifier[RevisionCodecData] identifier[codecData] operator[SEP] Keyword[throws] identifier[EncodingException] { Keyword[this] operator[SEP] identifier[codecData] operator[=] identifier[codecData] operator[SEP] identifier[data] operator[SEP] identifier[writeBit] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[data] operator[SEP] identifier[writeBit] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[data] operator[SEP] identifier[writeBit] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[data] operator[SEP] identifier[writeValue] operator[SEP] Other[5] , identifier[codecData] operator[SEP] identifier[getBlocksizeS] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[data] operator[SEP] identifier[writeValue] operator[SEP] Other[5] , identifier[codecData] operator[SEP] identifier[getBlocksizeE] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[data] operator[SEP] identifier[writeValue] operator[SEP] Other[5] , identifier[codecData] operator[SEP] identifier[getBlocksizeB] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[data] operator[SEP] identifier[writeValue] operator[SEP] Other[5] , identifier[codecData] operator[SEP] identifier[getBlocksizeL] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[data] operator[SEP] identifier[writeFillBits] operator[SEP] operator[SEP] operator[SEP] }
public static <T> String path(TreeDef.Parented<T> treeDef, T node, Function<? super T, String> toString) { return path(treeDef, node, toString, "/"); }
class class_name[name] begin[{] method[path, return_type[type[String]], modifier[public static], parameter[treeDef, node, toString]] begin[{] return[call[.path, parameter[member[.treeDef], member[.node], member[.toString], literal["/"]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[String] identifier[path] operator[SEP] identifier[TreeDef] operator[SEP] identifier[Parented] operator[<] identifier[T] operator[>] identifier[treeDef] , identifier[T] identifier[node] , identifier[Function] operator[<] operator[?] Keyword[super] identifier[T] , identifier[String] operator[>] identifier[toString] operator[SEP] { Keyword[return] identifier[path] operator[SEP] identifier[treeDef] , identifier[node] , identifier[toString] , literal[String] operator[SEP] operator[SEP] }
public static List<Object[]> listKeyChains(final Object source) { List<Object[]> keyChainList = new LinkedList<>(); if(source instanceof Map) { Map sourceMap = (Map) source; for (Object key: sourceMap.keySet()) { keyChainList.addAll(listKeyChains(key, sourceMap.get(key))); } } else if(source instanceof List) { List sourceList = (List) source; for(int i=0; i<sourceList.size(); i++) { keyChainList.addAll(listKeyChains(i, sourceList.get(i))); } } else { return Collections.emptyList(); } return keyChainList; }
class class_name[name] begin[{] method[listKeyChains, return_type[type[List]], modifier[public static], parameter[source]] begin[{] local_variable[type[List], keyChainList] if[binary_operation[member[.source], instanceof, type[Map]]] begin[{] local_variable[type[Map], sourceMap] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=sourceMap, selectors=[], type_arguments=None)], member=listKeyChains, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=keyChainList, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=sourceMap, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))), label=None) else begin[{] if[binary_operation[member[.source], instanceof, type[List]]] begin[{] local_variable[type[List], sourceList] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=sourceList, selectors=[], type_arguments=None)], member=listKeyChains, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=keyChainList, 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=sourceList, 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) else begin[{] return[call[Collections.emptyList, parameter[]]] end[}] end[}] return[member[.keyChainList]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[Object] operator[SEP] operator[SEP] operator[>] identifier[listKeyChains] operator[SEP] Keyword[final] identifier[Object] identifier[source] operator[SEP] { identifier[List] operator[<] identifier[Object] operator[SEP] operator[SEP] operator[>] identifier[keyChainList] operator[=] Keyword[new] identifier[LinkedList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[source] Keyword[instanceof] identifier[Map] operator[SEP] { identifier[Map] identifier[sourceMap] operator[=] operator[SEP] identifier[Map] operator[SEP] identifier[source] operator[SEP] Keyword[for] operator[SEP] identifier[Object] identifier[key] operator[:] identifier[sourceMap] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { identifier[keyChainList] operator[SEP] identifier[addAll] operator[SEP] identifier[listKeyChains] operator[SEP] identifier[key] , identifier[sourceMap] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[source] Keyword[instanceof] identifier[List] operator[SEP] { identifier[List] identifier[sourceList] operator[=] operator[SEP] identifier[List] operator[SEP] identifier[source] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[sourceList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[keyChainList] operator[SEP] identifier[addAll] operator[SEP] identifier[listKeyChains] operator[SEP] identifier[i] , identifier[sourceList] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[return] identifier[Collections] operator[SEP] identifier[emptyList] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[keyChainList] operator[SEP] }
public Observable<PublicIPAddressInner> beginUpdateTagsAsync(String resourceGroupName, String publicIpAddressName) { return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName).map(new Func1<ServiceResponse<PublicIPAddressInner>, PublicIPAddressInner>() { @Override public PublicIPAddressInner call(ServiceResponse<PublicIPAddressInner> response) { return response.body(); } }); }
class class_name[name] begin[{] method[beginUpdateTagsAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, publicIpAddressName]] begin[{] return[call[.beginUpdateTagsWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.publicIpAddressName]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[PublicIPAddressInner] operator[>] identifier[beginUpdateTagsAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[publicIpAddressName] operator[SEP] { Keyword[return] identifier[beginUpdateTagsWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[publicIpAddressName] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[PublicIPAddressInner] operator[>] , identifier[PublicIPAddressInner] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[PublicIPAddressInner] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[PublicIPAddressInner] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public void addNameUrl(final String name, final String url) throws IOException { // need to first see if there is already an entry for this name. // if not, add url as the value. // if so, check the current url locations for name // if url exists, do nothing // if url does not exist, add, and set that as the value. String newValue = null; String oldValue = get(name); if(oldValue != null && oldValue.length() > 0) { String curUrls[] = oldValue.split(urlDelimiterRE); boolean found = false; for(int i=0; i < curUrls.length; i++) { if(url.equals(curUrls[i])) { found = true; break; } } if(found == false) { newValue = oldValue + " " + url; } } else { // null or empty value newValue = url; if(oldValue == null) log.addName(name); } // did we find a value? if(newValue != null) { put(name,newValue); } }
class class_name[name] begin[{] method[addNameUrl, return_type[void], modifier[public], parameter[name, url]] begin[{] local_variable[type[String], newValue] local_variable[type[String], oldValue] if[binary_operation[binary_operation[member[.oldValue], !=, literal[null]], &&, binary_operation[call[oldValue.length, parameter[]], >, literal[0]]]] begin[{] local_variable[type[String], curUrls] local_variable[type[boolean], found] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=curUrls, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=url, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=found, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), BreakStatement(goto=None, label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=curUrls, 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) if[binary_operation[member[.found], ==, literal[false]]] begin[{] assign[member[.newValue], binary_operation[binary_operation[member[.oldValue], +, literal[" "]], +, member[.url]]] else begin[{] None end[}] else begin[{] assign[member[.newValue], member[.url]] if[binary_operation[member[.oldValue], ==, literal[null]]] begin[{] call[log.addName, parameter[member[.name]]] else begin[{] None end[}] end[}] if[binary_operation[member[.newValue], !=, literal[null]]] begin[{] call[.put, parameter[member[.name], member[.newValue]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[addNameUrl] operator[SEP] Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[String] identifier[url] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[newValue] operator[=] Other[null] operator[SEP] identifier[String] identifier[oldValue] operator[=] identifier[get] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[oldValue] operator[!=] Other[null] operator[&&] identifier[oldValue] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[String] identifier[curUrls] operator[SEP] operator[SEP] operator[=] identifier[oldValue] operator[SEP] identifier[split] operator[SEP] identifier[urlDelimiterRE] operator[SEP] operator[SEP] Keyword[boolean] identifier[found] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[curUrls] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[url] operator[SEP] identifier[equals] operator[SEP] identifier[curUrls] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] { identifier[found] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] } } Keyword[if] operator[SEP] identifier[found] operator[==] literal[boolean] operator[SEP] { identifier[newValue] operator[=] identifier[oldValue] operator[+] literal[String] operator[+] identifier[url] operator[SEP] } } Keyword[else] { identifier[newValue] operator[=] identifier[url] operator[SEP] Keyword[if] operator[SEP] identifier[oldValue] operator[==] Other[null] operator[SEP] identifier[log] operator[SEP] identifier[addName] operator[SEP] identifier[name] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[newValue] operator[!=] Other[null] operator[SEP] { identifier[put] operator[SEP] identifier[name] , identifier[newValue] operator[SEP] operator[SEP] } }
public static <T> List<T> query(Class<T> targetClass, final Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { return query(targetClass, uri, projection, selection, selectionArgs, sortOrder, null); }
class class_name[name] begin[{] method[query, return_type[type[List]], modifier[public static], parameter[targetClass, uri, projection, selection, selectionArgs, sortOrder]] begin[{] return[call[.query, parameter[member[.targetClass], member[.uri], member[.projection], member[.selection], member[.selectionArgs], member[.sortOrder], literal[null]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[query] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[targetClass] , Keyword[final] identifier[Uri] identifier[uri] , identifier[String] operator[SEP] operator[SEP] identifier[projection] , identifier[String] identifier[selection] , identifier[String] operator[SEP] operator[SEP] identifier[selectionArgs] , identifier[String] identifier[sortOrder] operator[SEP] { Keyword[return] identifier[query] operator[SEP] identifier[targetClass] , identifier[uri] , identifier[projection] , identifier[selection] , identifier[selectionArgs] , identifier[sortOrder] , Other[null] operator[SEP] operator[SEP] }
public String toStringArff() { StringBuilder text = new StringBuilder(); text.append(ARFF_RELATION).append(" ") .append(Utils.quote(getRelationName())).append("\n\n"); for (int i = 0; i < numAttributes(); i++) { text.append(attribute(i).toString()).append("\n"); } text.append("\n").append(ARFF_DATA).append("\n"); text.append(toString()); return text.toString(); }
class class_name[name] begin[{] method[toStringArff, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[StringBuilder], text] call[text.append, parameter[member[.ARFF_RELATION]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=attribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=text, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n")], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=numAttributes, postfix_operators=[], prefix_operators=[], qualifier=, 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) call[text.append, parameter[literal["\n"]]] call[text.append, parameter[call[.toString, parameter[]]]] return[call[text.toString, parameter[]]] end[}] END[}]
Keyword[public] identifier[String] identifier[toStringArff] operator[SEP] operator[SEP] { identifier[StringBuilder] identifier[text] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[text] operator[SEP] identifier[append] operator[SEP] identifier[ARFF_RELATION] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[Utils] operator[SEP] identifier[quote] operator[SEP] identifier[getRelationName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[numAttributes] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[text] operator[SEP] identifier[append] operator[SEP] identifier[attribute] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[text] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[ARFF_DATA] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[text] operator[SEP] identifier[append] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[text] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; _generationLabel = new javax.swing.JLabel(); _generationTextField = new javax.swing.JTextField(); _bestFitnessLabel = new javax.swing.JLabel(); _bestFitnessTextField = new javax.swing.JTextField(); _populationAgeLabel = new javax.swing.JLabel(); _populationAgeTextField = new javax.swing.JTextField(); _evaluationTimeLabel = new javax.swing.JLabel(); _evaluationTimeTextField = new javax.swing.JTextField(); setLayout(new java.awt.GridBagLayout()); _generationLabel.setLabelFor(_generationTextField); _generationLabel.setText("Generation:"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START; gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3); add(_generationLabel, gridBagConstraints); _generationTextField.setEditable(false); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(1, 1, 1, 1); add(_generationTextField, gridBagConstraints); _bestFitnessLabel.setLabelFor(_bestFitnessTextField); _bestFitnessLabel.setText("Best fitness:"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 0; gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START; gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3); add(_bestFitnessLabel, gridBagConstraints); _bestFitnessTextField.setEditable(false); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(1, 1, 1, 1); add(_bestFitnessTextField, gridBagConstraints); _populationAgeLabel.setLabelFor(_populationAgeTextField); _populationAgeLabel.setText("Population age:"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START; gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3); add(_populationAgeLabel, gridBagConstraints); _populationAgeTextField.setEditable(false); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(1, 1, 1, 1); add(_populationAgeTextField, gridBagConstraints); _evaluationTimeLabel.setLabelFor(_evaluationTimeTextField); _evaluationTimeLabel.setText("Evaluation time:"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3); add(_evaluationTimeLabel, gridBagConstraints); _evaluationTimeTextField.setEditable(false); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(1, 1, 1, 1); add(_evaluationTimeTextField, gridBagConstraints); }
class class_name[name] begin[{] method[initComponents, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[java], gridBagConstraints] assign[member[._generationLabel], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None))))] assign[member[._generationTextField], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JTextField, sub_type=None))))] assign[member[._bestFitnessLabel], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None))))] assign[member[._bestFitnessTextField], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JTextField, sub_type=None))))] assign[member[._populationAgeLabel], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None))))] assign[member[._populationAgeTextField], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JTextField, sub_type=None))))] assign[member[._evaluationTimeLabel], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None))))] assign[member[._evaluationTimeTextField], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=JTextField, sub_type=None))))] call[.setLayout, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=GridBagLayout, sub_type=None))))]] call[_generationLabel.setLabelFor, parameter[member[._generationTextField]]] call[_generationLabel.setText, parameter[literal["Generation:"]]] assign[member[.gridBagConstraints], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=GridBagConstraints, sub_type=None))))] assign[member[gridBagConstraints.anchor], member[java.awt.GridBagConstraints.LINE_START]] assign[member[gridBagConstraints.insets], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=Insets, sub_type=None))))] call[.add, parameter[member[._generationLabel], member[.gridBagConstraints]]] call[_generationTextField.setEditable, parameter[literal[false]]] assign[member[.gridBagConstraints], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=GridBagConstraints, sub_type=None))))] assign[member[gridBagConstraints.fill], member[java.awt.GridBagConstraints.HORIZONTAL]] assign[member[gridBagConstraints.weightx], literal[1.0]] assign[member[gridBagConstraints.insets], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), 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=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=Insets, sub_type=None))))] call[.add, parameter[member[._generationTextField], member[.gridBagConstraints]]] call[_bestFitnessLabel.setLabelFor, parameter[member[._bestFitnessTextField]]] call[_bestFitnessLabel.setText, parameter[literal["Best fitness:"]]] assign[member[.gridBagConstraints], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=GridBagConstraints, sub_type=None))))] assign[member[gridBagConstraints.gridx], literal[2]] assign[member[gridBagConstraints.gridy], literal[0]] assign[member[gridBagConstraints.anchor], member[java.awt.GridBagConstraints.LINE_START]] assign[member[gridBagConstraints.insets], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=Insets, sub_type=None))))] call[.add, parameter[member[._bestFitnessLabel], member[.gridBagConstraints]]] call[_bestFitnessTextField.setEditable, parameter[literal[false]]] assign[member[.gridBagConstraints], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=GridBagConstraints, sub_type=None))))] assign[member[gridBagConstraints.gridx], literal[3]] assign[member[gridBagConstraints.gridy], literal[0]] assign[member[gridBagConstraints.fill], member[java.awt.GridBagConstraints.HORIZONTAL]] assign[member[gridBagConstraints.weightx], literal[1.0]] assign[member[gridBagConstraints.insets], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), 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=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=Insets, sub_type=None))))] call[.add, parameter[member[._bestFitnessTextField], member[.gridBagConstraints]]] call[_populationAgeLabel.setLabelFor, parameter[member[._populationAgeTextField]]] call[_populationAgeLabel.setText, parameter[literal["Population age:"]]] assign[member[.gridBagConstraints], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=GridBagConstraints, sub_type=None))))] assign[member[gridBagConstraints.gridx], literal[2]] assign[member[gridBagConstraints.gridy], literal[1]] assign[member[gridBagConstraints.anchor], member[java.awt.GridBagConstraints.LINE_START]] assign[member[gridBagConstraints.insets], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=Insets, sub_type=None))))] call[.add, parameter[member[._populationAgeLabel], member[.gridBagConstraints]]] call[_populationAgeTextField.setEditable, parameter[literal[false]]] assign[member[.gridBagConstraints], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=GridBagConstraints, sub_type=None))))] assign[member[gridBagConstraints.gridx], literal[3]] assign[member[gridBagConstraints.gridy], literal[1]] assign[member[gridBagConstraints.fill], member[java.awt.GridBagConstraints.HORIZONTAL]] assign[member[gridBagConstraints.weightx], literal[1.0]] assign[member[gridBagConstraints.insets], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), 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=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=Insets, sub_type=None))))] call[.add, parameter[member[._populationAgeTextField], member[.gridBagConstraints]]] call[_evaluationTimeLabel.setLabelFor, parameter[member[._evaluationTimeTextField]]] call[_evaluationTimeLabel.setText, parameter[literal["Evaluation time:"]]] assign[member[.gridBagConstraints], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=GridBagConstraints, sub_type=None))))] assign[member[gridBagConstraints.gridx], literal[0]] assign[member[gridBagConstraints.gridy], literal[1]] assign[member[gridBagConstraints.insets], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=Insets, sub_type=None))))] call[.add, parameter[member[._evaluationTimeLabel], member[.gridBagConstraints]]] call[_evaluationTimeTextField.setEditable, parameter[literal[false]]] assign[member[.gridBagConstraints], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=GridBagConstraints, sub_type=None))))] assign[member[gridBagConstraints.gridx], literal[1]] assign[member[gridBagConstraints.gridy], literal[1]] assign[member[gridBagConstraints.fill], member[java.awt.GridBagConstraints.HORIZONTAL]] assign[member[gridBagConstraints.weightx], literal[1.0]] assign[member[gridBagConstraints.insets], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), 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=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=Insets, sub_type=None))))] call[.add, parameter[member[._evaluationTimeTextField], member[.gridBagConstraints]]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[void] identifier[initComponents] operator[SEP] operator[SEP] { identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[GridBagConstraints] identifier[gridBagConstraints] operator[SEP] identifier[_generationLabel] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JLabel] operator[SEP] operator[SEP] operator[SEP] identifier[_generationTextField] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JTextField] operator[SEP] operator[SEP] operator[SEP] identifier[_bestFitnessLabel] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JLabel] operator[SEP] operator[SEP] operator[SEP] identifier[_bestFitnessTextField] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JTextField] operator[SEP] operator[SEP] operator[SEP] identifier[_populationAgeLabel] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JLabel] operator[SEP] operator[SEP] operator[SEP] identifier[_populationAgeTextField] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JTextField] operator[SEP] operator[SEP] operator[SEP] identifier[_evaluationTimeLabel] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JLabel] operator[SEP] operator[SEP] operator[SEP] identifier[_evaluationTimeTextField] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JTextField] operator[SEP] operator[SEP] operator[SEP] identifier[setLayout] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[GridBagLayout] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[_generationLabel] operator[SEP] identifier[setLabelFor] operator[SEP] identifier[_generationTextField] operator[SEP] operator[SEP] identifier[_generationLabel] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[gridBagConstraints] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[GridBagConstraints] operator[SEP] operator[SEP] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[anchor] operator[=] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[GridBagConstraints] operator[SEP] identifier[LINE_START] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[insets] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[Insets] operator[SEP] Other[0] , Other[3] , Other[0] , Other[3] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[_generationLabel] , identifier[gridBagConstraints] operator[SEP] operator[SEP] identifier[_generationTextField] operator[SEP] identifier[setEditable] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[gridBagConstraints] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[GridBagConstraints] operator[SEP] operator[SEP] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[fill] operator[=] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[GridBagConstraints] operator[SEP] identifier[HORIZONTAL] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[weightx] operator[=] literal[Float] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[insets] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[Insets] operator[SEP] Other[1] , Other[1] , Other[1] , Other[1] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[_generationTextField] , identifier[gridBagConstraints] operator[SEP] operator[SEP] identifier[_bestFitnessLabel] operator[SEP] identifier[setLabelFor] operator[SEP] identifier[_bestFitnessTextField] operator[SEP] operator[SEP] identifier[_bestFitnessLabel] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[gridBagConstraints] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[GridBagConstraints] operator[SEP] operator[SEP] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[gridx] operator[=] Other[2] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[gridy] operator[=] Other[0] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[anchor] operator[=] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[GridBagConstraints] operator[SEP] identifier[LINE_START] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[insets] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[Insets] operator[SEP] Other[0] , Other[3] , Other[0] , Other[3] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[_bestFitnessLabel] , identifier[gridBagConstraints] operator[SEP] operator[SEP] identifier[_bestFitnessTextField] operator[SEP] identifier[setEditable] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[gridBagConstraints] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[GridBagConstraints] operator[SEP] operator[SEP] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[gridx] operator[=] Other[3] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[gridy] operator[=] Other[0] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[fill] operator[=] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[GridBagConstraints] operator[SEP] identifier[HORIZONTAL] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[weightx] operator[=] literal[Float] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[insets] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[Insets] operator[SEP] Other[1] , Other[1] , Other[1] , Other[1] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[_bestFitnessTextField] , identifier[gridBagConstraints] operator[SEP] operator[SEP] identifier[_populationAgeLabel] operator[SEP] identifier[setLabelFor] operator[SEP] identifier[_populationAgeTextField] operator[SEP] operator[SEP] identifier[_populationAgeLabel] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[gridBagConstraints] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[GridBagConstraints] operator[SEP] operator[SEP] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[gridx] operator[=] Other[2] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[gridy] operator[=] Other[1] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[anchor] operator[=] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[GridBagConstraints] operator[SEP] identifier[LINE_START] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[insets] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[Insets] operator[SEP] Other[0] , Other[3] , Other[0] , Other[3] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[_populationAgeLabel] , identifier[gridBagConstraints] operator[SEP] operator[SEP] identifier[_populationAgeTextField] operator[SEP] identifier[setEditable] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[gridBagConstraints] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[GridBagConstraints] operator[SEP] operator[SEP] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[gridx] operator[=] Other[3] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[gridy] operator[=] Other[1] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[fill] operator[=] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[GridBagConstraints] operator[SEP] identifier[HORIZONTAL] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[weightx] operator[=] literal[Float] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[insets] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[Insets] operator[SEP] Other[1] , Other[1] , Other[1] , Other[1] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[_populationAgeTextField] , identifier[gridBagConstraints] operator[SEP] operator[SEP] identifier[_evaluationTimeLabel] operator[SEP] identifier[setLabelFor] operator[SEP] identifier[_evaluationTimeTextField] operator[SEP] operator[SEP] identifier[_evaluationTimeLabel] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[gridBagConstraints] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[GridBagConstraints] operator[SEP] operator[SEP] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[gridx] operator[=] Other[0] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[gridy] operator[=] Other[1] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[insets] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[Insets] operator[SEP] Other[0] , Other[3] , Other[0] , Other[3] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[_evaluationTimeLabel] , identifier[gridBagConstraints] operator[SEP] operator[SEP] identifier[_evaluationTimeTextField] operator[SEP] identifier[setEditable] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[gridBagConstraints] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[GridBagConstraints] operator[SEP] operator[SEP] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[gridx] operator[=] Other[1] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[gridy] operator[=] Other[1] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[fill] operator[=] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[GridBagConstraints] operator[SEP] identifier[HORIZONTAL] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[weightx] operator[=] literal[Float] operator[SEP] identifier[gridBagConstraints] operator[SEP] identifier[insets] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[Insets] operator[SEP] Other[1] , Other[1] , Other[1] , Other[1] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[_evaluationTimeTextField] , identifier[gridBagConstraints] operator[SEP] operator[SEP] }
@Pure public BusItineraryHalt getNearestBusHalt(double x, double y) { double distance = Double.POSITIVE_INFINITY; BusItineraryHalt besthalt = null; double dist; for (final BusItineraryHalt halt : this.validHalts) { dist = halt.distance(x, y); if (dist < distance) { distance = dist; besthalt = halt; } } return besthalt; }
class class_name[name] begin[{] method[getNearestBusHalt, return_type[type[BusItineraryHalt]], modifier[public], parameter[x, y]] begin[{] local_variable[type[double], distance] local_variable[type[BusItineraryHalt], besthalt] local_variable[type[double], dist] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=distance, postfix_operators=[], prefix_operators=[], qualifier=halt, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=distance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=distance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=besthalt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=halt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))]), control=EnhancedForControl(iterable=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=validHalts, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=halt)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=BusItineraryHalt, sub_type=None))), label=None) return[member[.besthalt]] end[}] END[}]
annotation[@] identifier[Pure] Keyword[public] identifier[BusItineraryHalt] identifier[getNearestBusHalt] operator[SEP] Keyword[double] identifier[x] , Keyword[double] identifier[y] operator[SEP] { Keyword[double] identifier[distance] operator[=] identifier[Double] operator[SEP] identifier[POSITIVE_INFINITY] operator[SEP] identifier[BusItineraryHalt] identifier[besthalt] operator[=] Other[null] operator[SEP] Keyword[double] identifier[dist] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[BusItineraryHalt] identifier[halt] operator[:] Keyword[this] operator[SEP] identifier[validHalts] operator[SEP] { identifier[dist] operator[=] identifier[halt] operator[SEP] identifier[distance] operator[SEP] identifier[x] , identifier[y] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dist] operator[<] identifier[distance] operator[SEP] { identifier[distance] operator[=] identifier[dist] operator[SEP] identifier[besthalt] operator[=] identifier[halt] operator[SEP] } } Keyword[return] identifier[besthalt] operator[SEP] }
@Override public Object apply(Object value, Object... params) { Object[] array = super.asArray(value); return array.length == 0 ? null : super.asString(array[array.length - 1]); }
class class_name[name] begin[{] method[apply, return_type[type[Object]], modifier[public], parameter[value, params]] begin[{] local_variable[type[Object], array] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=array, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), if_false=SuperMethodInvocation(arguments=[MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=array, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))])], member=asString, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[apply] operator[SEP] identifier[Object] identifier[value] , identifier[Object] operator[...] identifier[params] operator[SEP] { identifier[Object] operator[SEP] operator[SEP] identifier[array] operator[=] Keyword[super] operator[SEP] identifier[asArray] operator[SEP] identifier[value] operator[SEP] operator[SEP] Keyword[return] identifier[array] operator[SEP] identifier[length] operator[==] Other[0] operator[?] Other[null] operator[:] Keyword[super] operator[SEP] identifier[asString] operator[SEP] identifier[array] operator[SEP] identifier[array] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] }
public String localize(PrefixKind pk, String key, Object... args) { if (useRawMessages) return pk.key(key); else return messages.getLocalizedString(pk.key(key), args); }
class class_name[name] begin[{] method[localize, return_type[type[String]], modifier[public], parameter[pk, key, args]] begin[{] if[member[.useRawMessages]] begin[{] return[call[pk.key, parameter[member[.key]]]] else begin[{] return[call[messages.getLocalizedString, parameter[call[pk.key, parameter[member[.key]]], member[.args]]]] end[}] end[}] END[}]
Keyword[public] identifier[String] identifier[localize] operator[SEP] identifier[PrefixKind] identifier[pk] , identifier[String] identifier[key] , identifier[Object] operator[...] identifier[args] operator[SEP] { Keyword[if] operator[SEP] identifier[useRawMessages] operator[SEP] Keyword[return] identifier[pk] operator[SEP] identifier[key] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[else] Keyword[return] identifier[messages] operator[SEP] identifier[getLocalizedString] operator[SEP] identifier[pk] operator[SEP] identifier[key] operator[SEP] identifier[key] operator[SEP] , identifier[args] operator[SEP] operator[SEP] }
public static Polygon makePolygon(Geometry shell, Geometry... holes) throws IllegalArgumentException { if(shell == null) { return null; } LinearRing outerLine = checkLineString(shell); LinearRing[] interiorlinestrings = new LinearRing[holes.length]; for (int i = 0; i < holes.length; i++) { interiorlinestrings[i] = checkLineString(holes[i]); } return shell.getFactory().createPolygon(outerLine, interiorlinestrings); }
class class_name[name] begin[{] method[makePolygon, return_type[type[Polygon]], modifier[public static], parameter[shell, holes]] begin[{] if[binary_operation[member[.shell], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[LinearRing], outerLine] local_variable[type[LinearRing], interiorlinestrings] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=interiorlinestrings, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[MemberReference(member=holes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=checkLineString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=holes, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[call[shell.getFactory, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Polygon] identifier[makePolygon] operator[SEP] identifier[Geometry] identifier[shell] , identifier[Geometry] operator[...] identifier[holes] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] { Keyword[if] operator[SEP] identifier[shell] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[LinearRing] identifier[outerLine] operator[=] identifier[checkLineString] operator[SEP] identifier[shell] operator[SEP] operator[SEP] identifier[LinearRing] operator[SEP] operator[SEP] identifier[interiorlinestrings] operator[=] Keyword[new] identifier[LinearRing] operator[SEP] identifier[holes] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[holes] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[interiorlinestrings] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[checkLineString] operator[SEP] identifier[holes] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[shell] operator[SEP] identifier[getFactory] operator[SEP] operator[SEP] operator[SEP] identifier[createPolygon] operator[SEP] identifier[outerLine] , identifier[interiorlinestrings] operator[SEP] operator[SEP] }
public ClassFile addInnerClass(String innerClassName, Class superClass) { return addInnerClass(innerClassName, superClass.getName()); }
class class_name[name] begin[{] method[addInnerClass, return_type[type[ClassFile]], modifier[public], parameter[innerClassName, superClass]] begin[{] return[call[.addInnerClass, parameter[member[.innerClassName], call[superClass.getName, parameter[]]]]] end[}] END[}]
Keyword[public] identifier[ClassFile] identifier[addInnerClass] operator[SEP] identifier[String] identifier[innerClassName] , identifier[Class] identifier[superClass] operator[SEP] { Keyword[return] identifier[addInnerClass] operator[SEP] identifier[innerClassName] , identifier[superClass] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override public void render() { try { final HttpServletRequest request = Request.getServletRequest(); request.getRequestDispatcher(uri).forward(request, Response.getServletResponse()); } catch (Exception e) { throw new RenderException("Forward to " + uri + " error!", e); } }
class class_name[name] begin[{] method[render, return_type[void], modifier[public], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getServletRequest, postfix_operators=[], prefix_operators=[], qualifier=Request, selectors=[], type_arguments=None), name=request)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=HttpServletRequest, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=uri, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getRequestDispatcher, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[MethodInvocation(arguments=[MemberReference(member=request, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getServletResponse, postfix_operators=[], prefix_operators=[], qualifier=Response, selectors=[], type_arguments=None)], member=forward, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Forward to "), operandr=MemberReference(member=uri, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" error!"), 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=RenderException, 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[render] operator[SEP] operator[SEP] { Keyword[try] { Keyword[final] identifier[HttpServletRequest] identifier[request] operator[=] identifier[Request] operator[SEP] identifier[getServletRequest] operator[SEP] operator[SEP] operator[SEP] identifier[request] operator[SEP] identifier[getRequestDispatcher] operator[SEP] identifier[uri] operator[SEP] operator[SEP] identifier[forward] operator[SEP] identifier[request] , identifier[Response] operator[SEP] identifier[getServletResponse] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RenderException] operator[SEP] literal[String] operator[+] identifier[uri] operator[+] literal[String] , identifier[e] operator[SEP] operator[SEP] } }
@Override public Void call() throws TTException { updateOnly(); if (mCommit == EShredderCommit.COMMIT) { mWtx.commit(); } return null; }
class class_name[name] begin[{] method[call, return_type[type[Void]], modifier[public], parameter[]] begin[{] call[.updateOnly, parameter[]] if[binary_operation[member[.mCommit], ==, member[EShredderCommit.COMMIT]]] begin[{] call[mWtx.commit, parameter[]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Void] identifier[call] operator[SEP] operator[SEP] Keyword[throws] identifier[TTException] { identifier[updateOnly] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mCommit] operator[==] identifier[EShredderCommit] operator[SEP] identifier[COMMIT] operator[SEP] { identifier[mWtx] operator[SEP] identifier[commit] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
private boolean isPluralAttribute(Field attribute) { return attribute.getType().equals(Collection.class) || attribute.getType().equals(Set.class) || attribute.getType().equals(List.class) || attribute.getType().equals(Map.class); }
class class_name[name] begin[{] method[isPluralAttribute, return_type[type[boolean]], modifier[private], parameter[attribute]] begin[{] return[binary_operation[binary_operation[binary_operation[call[attribute.getType, parameter[]], ||, call[attribute.getType, parameter[]]], ||, call[attribute.getType, parameter[]]], ||, call[attribute.getType, parameter[]]]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[isPluralAttribute] operator[SEP] identifier[Field] identifier[attribute] operator[SEP] { Keyword[return] identifier[attribute] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[Collection] operator[SEP] Keyword[class] operator[SEP] operator[||] identifier[attribute] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[Set] operator[SEP] Keyword[class] operator[SEP] operator[||] identifier[attribute] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[List] operator[SEP] Keyword[class] operator[SEP] operator[||] identifier[attribute] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[Map] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public void racRent() { pos = pos - 1; String userName = CarSearch.getLastSearchParams()[0]; String pickupDate = CarSearch.getLastSearchParams()[1]; String returnDate = CarSearch.getLastSearchParams()[2]; this.searcher.search(userName, pickupDate, returnDate); if (searcher!=null && searcher.getCars()!= null && pos < searcher.getCars().size() && searcher.getCars().get(pos) != null) { RESStatusType resStatus = reserver.reserveCar(searcher.getCustomer() , searcher.getCars().get(pos) , pickupDate , returnDate); ConfirmationType confirm = reserver.getConfirmation(resStatus , searcher.getCustomer() , searcher.getCars().get(pos) , pickupDate , returnDate); RESCarType car = confirm.getCar(); CustomerDetailsType customer = confirm.getCustomer(); System.out.println(MessageFormat.format(CONFIRMATION , confirm.getDescription() , confirm.getReservationId() , customer.getName() , customer.getEmail() , customer.getCity() , customer.getStatus() , car.getBrand() , car.getDesignModel() , confirm.getFromDate() , confirm.getToDate() , padl(car.getRateDay(), 10) , padl(car.getRateWeekend(), 10) , padl(confirm.getCreditPoints().toString(), 7))); } else { System.out.println("Invalid selection: " + (pos+1)); //$NON-NLS-1$ } }
class class_name[name] begin[{] method[racRent, return_type[void], modifier[public], parameter[]] begin[{] assign[member[.pos], binary_operation[member[.pos], -, literal[1]]] local_variable[type[String], userName] local_variable[type[String], pickupDate] local_variable[type[String], returnDate] THIS[member[None.searcher]call[None.search, parameter[member[.userName], member[.pickupDate], member[.returnDate]]]] if[binary_operation[binary_operation[binary_operation[binary_operation[member[.searcher], !=, literal[null]], &&, binary_operation[call[searcher.getCars, parameter[]], !=, literal[null]]], &&, binary_operation[member[.pos], <, call[searcher.getCars, parameter[]]]], &&, binary_operation[call[searcher.getCars, parameter[]], !=, literal[null]]]] begin[{] local_variable[type[RESStatusType], resStatus] local_variable[type[ConfirmationType], confirm] local_variable[type[RESCarType], car] local_variable[type[CustomerDetailsType], customer] call[System.out.println, parameter[call[MessageFormat.format, parameter[member[.CONFIRMATION], call[confirm.getDescription, parameter[]], call[confirm.getReservationId, parameter[]], call[customer.getName, parameter[]], call[customer.getEmail, parameter[]], call[customer.getCity, parameter[]], call[customer.getStatus, parameter[]], call[car.getBrand, parameter[]], call[car.getDesignModel, parameter[]], call[confirm.getFromDate, parameter[]], call[confirm.getToDate, parameter[]], call[.padl, parameter[call[car.getRateDay, parameter[]], literal[10]]], call[.padl, parameter[call[car.getRateWeekend, parameter[]], literal[10]]], call[.padl, parameter[call[confirm.getCreditPoints, parameter[]], literal[7]]]]]]] else begin[{] call[System.out.println, parameter[binary_operation[literal["Invalid selection: "], +, binary_operation[member[.pos], +, literal[1]]]]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[racRent] operator[SEP] operator[SEP] { identifier[pos] operator[=] identifier[pos] operator[-] Other[1] operator[SEP] identifier[String] identifier[userName] operator[=] identifier[CarSearch] operator[SEP] identifier[getLastSearchParams] operator[SEP] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[String] identifier[pickupDate] operator[=] identifier[CarSearch] operator[SEP] identifier[getLastSearchParams] operator[SEP] operator[SEP] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[String] identifier[returnDate] operator[=] identifier[CarSearch] operator[SEP] identifier[getLastSearchParams] operator[SEP] operator[SEP] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[searcher] operator[SEP] identifier[search] operator[SEP] identifier[userName] , identifier[pickupDate] , identifier[returnDate] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[searcher] operator[!=] Other[null] operator[&&] identifier[searcher] operator[SEP] identifier[getCars] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[pos] operator[<] identifier[searcher] operator[SEP] identifier[getCars] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[&&] identifier[searcher] operator[SEP] identifier[getCars] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[pos] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[RESStatusType] identifier[resStatus] operator[=] identifier[reserver] operator[SEP] identifier[reserveCar] operator[SEP] identifier[searcher] operator[SEP] identifier[getCustomer] operator[SEP] operator[SEP] , identifier[searcher] operator[SEP] identifier[getCars] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[pos] operator[SEP] , identifier[pickupDate] , identifier[returnDate] operator[SEP] operator[SEP] identifier[ConfirmationType] identifier[confirm] operator[=] identifier[reserver] operator[SEP] identifier[getConfirmation] operator[SEP] identifier[resStatus] , identifier[searcher] operator[SEP] identifier[getCustomer] operator[SEP] operator[SEP] , identifier[searcher] operator[SEP] identifier[getCars] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[pos] operator[SEP] , identifier[pickupDate] , identifier[returnDate] operator[SEP] operator[SEP] identifier[RESCarType] identifier[car] operator[=] identifier[confirm] operator[SEP] identifier[getCar] operator[SEP] operator[SEP] operator[SEP] identifier[CustomerDetailsType] identifier[customer] operator[=] identifier[confirm] operator[SEP] identifier[getCustomer] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[MessageFormat] operator[SEP] identifier[format] operator[SEP] identifier[CONFIRMATION] , identifier[confirm] operator[SEP] identifier[getDescription] operator[SEP] operator[SEP] , identifier[confirm] operator[SEP] identifier[getReservationId] operator[SEP] operator[SEP] , identifier[customer] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[customer] operator[SEP] identifier[getEmail] operator[SEP] operator[SEP] , identifier[customer] operator[SEP] identifier[getCity] operator[SEP] operator[SEP] , identifier[customer] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] , identifier[car] operator[SEP] identifier[getBrand] operator[SEP] operator[SEP] , identifier[car] operator[SEP] identifier[getDesignModel] operator[SEP] operator[SEP] , identifier[confirm] operator[SEP] identifier[getFromDate] operator[SEP] operator[SEP] , identifier[confirm] operator[SEP] identifier[getToDate] operator[SEP] operator[SEP] , identifier[padl] operator[SEP] identifier[car] operator[SEP] identifier[getRateDay] operator[SEP] operator[SEP] , Other[10] operator[SEP] , identifier[padl] operator[SEP] identifier[car] operator[SEP] identifier[getRateWeekend] operator[SEP] operator[SEP] , Other[10] operator[SEP] , identifier[padl] operator[SEP] identifier[confirm] operator[SEP] identifier[getCreditPoints] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , Other[7] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] operator[SEP] identifier[pos] operator[+] Other[1] operator[SEP] operator[SEP] operator[SEP] } }
public void clickOnWebElement(WebElement webElement){ if(config.commandLogging){ Log.d(config.commandLoggingTag, "clickOnWebElement("+webElement+")"); } if(webElement == null) Assert.fail("WebElement is null and can therefore not be clicked!"); clicker.clickOnScreen(webElement.getLocationX(), webElement.getLocationY(), null); }
class class_name[name] begin[{] method[clickOnWebElement, return_type[void], modifier[public], parameter[webElement]] begin[{] if[member[config.commandLogging]] begin[{] call[Log.d, parameter[member[config.commandLoggingTag], binary_operation[binary_operation[literal["clickOnWebElement("], +, member[.webElement]], +, literal[")"]]]] else begin[{] None end[}] if[binary_operation[member[.webElement], ==, literal[null]]] begin[{] call[Assert.fail, parameter[literal["WebElement is null and can therefore not be clicked!"]]] else begin[{] None end[}] call[clicker.clickOnScreen, parameter[call[webElement.getLocationX, parameter[]], call[webElement.getLocationY, parameter[]], literal[null]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[clickOnWebElement] operator[SEP] identifier[WebElement] identifier[webElement] operator[SEP] { Keyword[if] operator[SEP] identifier[config] operator[SEP] identifier[commandLogging] operator[SEP] { identifier[Log] operator[SEP] identifier[d] operator[SEP] identifier[config] operator[SEP] identifier[commandLoggingTag] , literal[String] operator[+] identifier[webElement] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[webElement] operator[==] Other[null] operator[SEP] identifier[Assert] operator[SEP] identifier[fail] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[clicker] operator[SEP] identifier[clickOnScreen] operator[SEP] identifier[webElement] operator[SEP] identifier[getLocationX] operator[SEP] operator[SEP] , identifier[webElement] operator[SEP] identifier[getLocationY] operator[SEP] operator[SEP] , Other[null] operator[SEP] operator[SEP] }
public int readRawLittleEndian32() throws IOException { final byte[] buffer = this.buffer; int offset = this.offset; final byte b1 = buffer[offset++]; final byte b2 = buffer[offset++]; final byte b3 = buffer[offset++]; final byte b4 = buffer[offset++]; this.offset = offset; return (((int) b1 & 0xff)) | (((int) b2 & 0xff) << 8) | (((int) b3 & 0xff) << 16) | (((int) b4 & 0xff) << 24); }
class class_name[name] begin[{] method[readRawLittleEndian32, return_type[type[int]], modifier[public], parameter[]] begin[{] local_variable[type[byte], buffer] local_variable[type[int], offset] local_variable[type[byte], b1] local_variable[type[byte], b2] local_variable[type[byte], b3] local_variable[type[byte], b4] assign[THIS[member[None.offset]], member[.offset]] return[binary_operation[binary_operation[binary_operation[binary_operation[Cast(expression=MemberReference(member=b1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int)), &, literal[0xff]], |, binary_operation[binary_operation[Cast(expression=MemberReference(member=b2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int)), &, literal[0xff]], <<, literal[8]]], |, binary_operation[binary_operation[Cast(expression=MemberReference(member=b3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int)), &, literal[0xff]], <<, literal[16]]], |, binary_operation[binary_operation[Cast(expression=MemberReference(member=b4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int)), &, literal[0xff]], <<, literal[24]]]] end[}] END[}]
Keyword[public] Keyword[int] identifier[readRawLittleEndian32] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[buffer] operator[=] Keyword[this] operator[SEP] identifier[buffer] operator[SEP] Keyword[int] identifier[offset] operator[=] Keyword[this] operator[SEP] identifier[offset] operator[SEP] Keyword[final] Keyword[byte] identifier[b1] operator[=] identifier[buffer] operator[SEP] identifier[offset] operator[++] operator[SEP] operator[SEP] Keyword[final] Keyword[byte] identifier[b2] operator[=] identifier[buffer] operator[SEP] identifier[offset] operator[++] operator[SEP] operator[SEP] Keyword[final] Keyword[byte] identifier[b3] operator[=] identifier[buffer] operator[SEP] identifier[offset] operator[++] operator[SEP] operator[SEP] Keyword[final] Keyword[byte] identifier[b4] operator[=] identifier[buffer] operator[SEP] identifier[offset] operator[++] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[offset] operator[=] identifier[offset] operator[SEP] Keyword[return] operator[SEP] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[b1] operator[&] literal[Integer] operator[SEP] operator[SEP] operator[|] operator[SEP] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[b2] operator[&] literal[Integer] operator[SEP] operator[<<] Other[8] operator[SEP] operator[|] operator[SEP] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[b3] operator[&] literal[Integer] operator[SEP] operator[<<] Other[16] operator[SEP] operator[|] operator[SEP] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[b4] operator[&] literal[Integer] operator[SEP] operator[<<] Other[24] operator[SEP] operator[SEP] }
public static void setScheduleHandler(@Nullable Function<? super Runnable, ? extends Runnable> handler) { if (lockdown) { throw new IllegalStateException("Plugins can't be changed anymore"); } onScheduleHandler = handler; }
class class_name[name] begin[{] method[setScheduleHandler, return_type[void], modifier[public static], parameter[handler]] begin[{] if[member[.lockdown]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Plugins can't be changed anymore")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] assign[member[.onScheduleHandler], member[.handler]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[setScheduleHandler] operator[SEP] annotation[@] identifier[Nullable] identifier[Function] operator[<] operator[?] Keyword[super] identifier[Runnable] , operator[?] Keyword[extends] identifier[Runnable] operator[>] identifier[handler] operator[SEP] { Keyword[if] operator[SEP] identifier[lockdown] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[onScheduleHandler] operator[=] identifier[handler] operator[SEP] }
private static void transformBluestein(double[] real, double[] imag) { int n = real.length; int m = Integer.highestOneBit(n * 2 + 1) << 1; // Trignometric tables double[] cosTable = new double[n]; double[] sinTable = new double[n]; for (int i = 0; i < n; i++) { int j = (int) ((long) i * i % (n * 2)); // This is more accurate than j = i * i cosTable[i] = Math.cos(Math.PI * j / n); sinTable[i] = Math.sin(Math.PI * j / n); } // Temporary vectors and preprocessing double[] areal = new double[m]; double[] aimag = new double[m]; for (int i = 0; i < n; i++) { areal[i] = real[i] * cosTable[i] + imag[i] * sinTable[i]; aimag[i] = -real[i] * sinTable[i] + imag[i] * cosTable[i]; } double[] breal = new double[m]; double[] bimag = new double[m]; breal[0] = cosTable[0]; bimag[0] = sinTable[0]; for (int i = 1; i < n; i++) { breal[i] = breal[m - i] = cosTable[i]; bimag[i] = bimag[m - i] = sinTable[i]; } // Convolution double[] creal = new double[m]; double[] cimag = new double[m]; convolve(areal, aimag, breal, bimag, creal, cimag); // Postprocessing for (int i = 0; i < n; i++) { real[i] = creal[i] * cosTable[i] + cimag[i] * sinTable[i]; imag[i] = -creal[i] * sinTable[i] + cimag[i] * cosTable[i]; } }
class class_name[name] begin[{] method[transformBluestein, return_type[void], modifier[private static], parameter[real, imag]] begin[{] local_variable[type[int], n] local_variable[type[int], m] local_variable[type[double], cosTable] local_variable[type[double], sinTable] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=Cast(expression=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=long)), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=BinaryOperation(operandl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=*), operator=%), type=BasicType(dimensions=[], name=int)), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=cosTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=PI, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[]), operandr=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=/)], member=cos, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=sinTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=PI, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[]), operandr=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=/)], member=sin, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=n, 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[double], areal] local_variable[type[double], aimag] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=areal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=real, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=cosTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=*), operandr=BinaryOperation(operandl=MemberReference(member=imag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=sinTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=*), operator=+)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=aimag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=real, postfix_operators=[], prefix_operators=['-'], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=sinTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=*), operandr=BinaryOperation(operandl=MemberReference(member=imag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=cosTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=*), operator=+)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=n, 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[double], breal] local_variable[type[double], bimag] assign[member[.breal], member[.cosTable]] assign[member[.bimag], member[.sinTable]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=breal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Assignment(expressionl=MemberReference(member=breal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-))]), type==, value=MemberReference(member=cosTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=bimag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Assignment(expressionl=MemberReference(member=bimag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-))]), type==, value=MemberReference(member=sinTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, 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=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) local_variable[type[double], creal] local_variable[type[double], cimag] call[.convolve, parameter[member[.areal], member[.aimag], member[.breal], member[.bimag], member[.creal], member[.cimag]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=real, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=creal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=cosTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=*), operandr=BinaryOperation(operandl=MemberReference(member=cimag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=sinTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=*), operator=+)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=imag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=creal, postfix_operators=[], prefix_operators=['-'], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=sinTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=*), operandr=BinaryOperation(operandl=MemberReference(member=cimag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=cosTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=*), operator=+)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=n, 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) end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[transformBluestein] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[real] , Keyword[double] operator[SEP] operator[SEP] identifier[imag] operator[SEP] { Keyword[int] identifier[n] operator[=] identifier[real] operator[SEP] identifier[length] operator[SEP] Keyword[int] identifier[m] operator[=] identifier[Integer] operator[SEP] identifier[highestOneBit] operator[SEP] identifier[n] operator[*] Other[2] operator[+] Other[1] operator[SEP] operator[<<] Other[1] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[cosTable] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[n] operator[SEP] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[sinTable] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[n] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[n] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[int] identifier[j] operator[=] operator[SEP] Keyword[int] operator[SEP] operator[SEP] operator[SEP] Keyword[long] operator[SEP] identifier[i] operator[*] identifier[i] operator[%] operator[SEP] identifier[n] operator[*] Other[2] operator[SEP] operator[SEP] operator[SEP] identifier[cosTable] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[Math] operator[SEP] identifier[cos] operator[SEP] identifier[Math] operator[SEP] identifier[PI] operator[*] identifier[j] operator[/] identifier[n] operator[SEP] operator[SEP] identifier[sinTable] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[Math] operator[SEP] identifier[sin] operator[SEP] identifier[Math] operator[SEP] identifier[PI] operator[*] identifier[j] operator[/] identifier[n] operator[SEP] operator[SEP] } Keyword[double] operator[SEP] operator[SEP] identifier[areal] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[m] operator[SEP] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[aimag] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[m] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[n] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[areal] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[real] operator[SEP] identifier[i] operator[SEP] operator[*] identifier[cosTable] operator[SEP] identifier[i] operator[SEP] operator[+] identifier[imag] operator[SEP] identifier[i] operator[SEP] operator[*] identifier[sinTable] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[aimag] operator[SEP] identifier[i] operator[SEP] operator[=] operator[-] identifier[real] operator[SEP] identifier[i] operator[SEP] operator[*] identifier[sinTable] operator[SEP] identifier[i] operator[SEP] operator[+] identifier[imag] operator[SEP] identifier[i] operator[SEP] operator[*] identifier[cosTable] operator[SEP] identifier[i] operator[SEP] operator[SEP] } Keyword[double] operator[SEP] operator[SEP] identifier[breal] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[m] operator[SEP] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[bimag] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[m] operator[SEP] operator[SEP] identifier[breal] operator[SEP] Other[0] operator[SEP] operator[=] identifier[cosTable] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[bimag] operator[SEP] Other[0] operator[SEP] operator[=] identifier[sinTable] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[1] operator[SEP] identifier[i] operator[<] identifier[n] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[breal] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[breal] operator[SEP] identifier[m] operator[-] identifier[i] operator[SEP] operator[=] identifier[cosTable] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[bimag] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[bimag] operator[SEP] identifier[m] operator[-] identifier[i] operator[SEP] operator[=] identifier[sinTable] operator[SEP] identifier[i] operator[SEP] operator[SEP] } Keyword[double] operator[SEP] operator[SEP] identifier[creal] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[m] operator[SEP] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[cimag] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[m] operator[SEP] operator[SEP] identifier[convolve] operator[SEP] identifier[areal] , identifier[aimag] , identifier[breal] , identifier[bimag] , identifier[creal] , identifier[cimag] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[n] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[real] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[creal] operator[SEP] identifier[i] operator[SEP] operator[*] identifier[cosTable] operator[SEP] identifier[i] operator[SEP] operator[+] identifier[cimag] operator[SEP] identifier[i] operator[SEP] operator[*] identifier[sinTable] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[imag] operator[SEP] identifier[i] operator[SEP] operator[=] operator[-] identifier[creal] operator[SEP] identifier[i] operator[SEP] operator[*] identifier[sinTable] operator[SEP] identifier[i] operator[SEP] operator[+] identifier[cimag] operator[SEP] identifier[i] operator[SEP] operator[*] identifier[cosTable] operator[SEP] identifier[i] operator[SEP] operator[SEP] } }
public void run() { synchronized (ivCancelLock) { //d601399 if (ivIsCanceled) { //d583637 //if this instance has been canceled, we do no more processing. // this also guarantees that a future alarm is not created. return; } long newSweepInterval = ivNewSweepInterval; // NOTE: clamp happens before initializeSweepInterval call to avoid spurious // re-init for too-low minimum if (ivSweepInterval != newSweepInterval) { initializeSweepInterval(newSweepInterval); } int newPreferredCacheSize = ivNewPreferredMaxSize; if (ivPreferredMaxSize != newPreferredCacheSize) { initializeCacheData(newPreferredCacheSize); } try { // For dynamic tuning purposes, make the eviction strategy less // aggressive (i.e. allow objects to age in the cache longer) // if the last several sweeps have resulted in the cache being // reduced below the soft limit. d118138 if (ivNumBelowSoftLimit > ivMaxDiscardThreshold) { // First, increase the discard threshold, and if the cache // size remains low, then increase the sweep interval. d231690 if (ivDiscardThreshold < ivMaxDiscardThreshold) { ++ivDiscardThreshold; } else if (ivSweepInterval < ivMaxSweepInterval) { ivSweepInterval = ivSweepInterval + SWEEP_INTERVAL_ADJUST; } ivNumBelowSoftLimit = 0; } // For LRU purposes, keep a count of the number of times this // alarm is fired. The cache inserts this data in each // element when it is last accessed, so it can be determined // how old it is in the cache. if (ivCache.numSweeps == Long.MAX_VALUE) ivCache.numSweeps = 1; else ivCache.numSweeps++; // If the soft limit has been reached, then sweep through // the cache elements looking for some to evict. Otherwise, // just increment the sweep count (above) for LRU purposes. if (preferredSizeReached()) { sweep(); // For dynamic tuning purposes, make the eviction strategy more // aggressive (i.e. allow objects to be evicted from the cache // earlier) if the above sweep did not succeed in reducing // the cache below the internal 'upper' limit. d118138 if (preferredSizeReached()) { ivNumBelowSoftLimit = 0; if (ivCache.numObjects > ivUpperLimit) { // First, try sweeping more frequently, and then if // that doesn't work, reduce the discard threshold. d231690 if (ivSweepInterval > MINIMUM_ADJUSTED_INTERVAL) { ivSweepInterval = ivSweepInterval - SWEEP_INTERVAL_ADJUST; } else if (ivDiscardThreshold > ivMinDiscardThreshold) { --ivDiscardThreshold; sweep(); } } } else { ++ivNumBelowSoftLimit; } } else { if (TraceComponent.isAnyTracingEnabled() && isTraceEnabled(true)) Tr.debug(tc.isDebugEnabled() ? tc : tcOOM, ivCache.getName() + ": Sweep (" + ivCache.numSweeps + "," + ivDiscardThreshold + "," + ivSweepInterval + ")" + " - Cache limit not reached : " + ivCache.getSize() + "/" + ivPreferredMaxSize); ++ivNumBelowSoftLimit; } } catch (Throwable e) //PM11713 { FFDCFilter.processException(e, CLASS_NAME + ".alarm", "424", this); Tr.warning(tc, "LRU_THREAD_CAUGHT_EXCEPTION_CNTR0053W", new Object[] { this, e }); //p111002.4 } finally { // Unless the preferred size has been reached, use the deferrable // scheduler. They will be the same for traditional WAS, but in Liberty we // use the deferrable until we need the non-deferrable one to keep // up with cache usage. ScheduledExecutorService executor = preferredSizeReached() ? ivScheduledExecutorService : ivDeferrableScheduledExecutorService; ivScheduledFuture = executor.schedule(this, ivSweepInterval, TimeUnit.MILLISECONDS); // F73234 } } }
class class_name[name] begin[{] method[run, return_type[void], modifier[public], parameter[]] begin[{] SYNCHRONIZED[member[.ivCancelLock]] BEGIN[{] if[member[.ivIsCanceled]] begin[{] return[None] else begin[{] None end[}] local_variable[type[long], newSweepInterval] if[binary_operation[member[.ivSweepInterval], !=, member[.newSweepInterval]]] begin[{] call[.initializeSweepInterval, parameter[member[.newSweepInterval]]] else begin[{] None end[}] local_variable[type[int], newPreferredCacheSize] if[binary_operation[member[.ivPreferredMaxSize], !=, member[.newPreferredCacheSize]]] begin[{] call[.initializeCacheData, parameter[member[.newPreferredCacheSize]]] else begin[{] None end[}] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ivNumBelowSoftLimit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=ivMaxDiscardThreshold, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ivDiscardThreshold, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=ivMaxDiscardThreshold, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ivSweepInterval, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=ivMaxSweepInterval, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=ivSweepInterval, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=ivSweepInterval, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=SWEEP_INTERVAL_ADJUST, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=ivDiscardThreshold, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=ivNumBelowSoftLimit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=numSweeps, postfix_operators=[], prefix_operators=[], qualifier=ivCache, selectors=[]), operandr=MemberReference(member=MAX_VALUE, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[]), operator===), else_statement=StatementExpression(expression=MemberReference(member=numSweeps, postfix_operators=['++'], prefix_operators=[], qualifier=ivCache, selectors=[]), label=None), label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=numSweeps, postfix_operators=[], prefix_operators=[], qualifier=ivCache, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)), IfStatement(condition=MethodInvocation(arguments=[], member=preferredSizeReached, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=isTraceEnabled, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[TernaryExpression(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), if_false=MemberReference(member=tcOOM, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=ivCache, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=": Sweep ("), operator=+), operandr=MemberReference(member=numSweeps, postfix_operators=[], prefix_operators=[], qualifier=ivCache, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=","), operator=+), operandr=MemberReference(member=ivDiscardThreshold, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=","), operator=+), operandr=MemberReference(member=ivSweepInterval, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=")"), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" - Cache limit not reached : "), operator=+), operandr=MethodInvocation(arguments=[], member=getSize, postfix_operators=[], prefix_operators=[], qualifier=ivCache, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/"), operator=+), operandr=MemberReference(member=ivPreferredMaxSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=MemberReference(member=ivNumBelowSoftLimit, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=sweep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=preferredSizeReached, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=ivNumBelowSoftLimit, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=ivNumBelowSoftLimit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=numObjects, postfix_operators=[], prefix_operators=[], qualifier=ivCache, selectors=[]), operandr=MemberReference(member=ivUpperLimit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ivSweepInterval, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=MINIMUM_ADJUSTED_INTERVAL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ivDiscardThreshold, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=ivMinDiscardThreshold, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=ivDiscardThreshold, postfix_operators=[], prefix_operators=['--'], qualifier=, selectors=[]), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=sweep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=ivSweepInterval, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=ivSweepInterval, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=SWEEP_INTERVAL_ADJUST, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-)), label=None)]))]))]))]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=CLASS_NAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".alarm"), operator=+), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="424"), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="LRU_THREAD_CAUGHT_EXCEPTION_CNTR0053W"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=warning, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Throwable']))], finally_block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=MethodInvocation(arguments=[], member=preferredSizeReached, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), if_false=MemberReference(member=ivDeferrableScheduledExecutorService, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=ivScheduledExecutorService, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), name=executor)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ScheduledExecutorService, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=ivScheduledFuture, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=ivSweepInterval, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=MILLISECONDS, postfix_operators=[], prefix_operators=[], qualifier=TimeUnit, selectors=[])], member=schedule, postfix_operators=[], prefix_operators=[], qualifier=executor, selectors=[], type_arguments=None)), label=None)], label=None, resources=None) END[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[ivCancelLock] operator[SEP] { Keyword[if] operator[SEP] identifier[ivIsCanceled] operator[SEP] { Keyword[return] operator[SEP] } Keyword[long] identifier[newSweepInterval] operator[=] identifier[ivNewSweepInterval] operator[SEP] Keyword[if] operator[SEP] identifier[ivSweepInterval] operator[!=] identifier[newSweepInterval] operator[SEP] { identifier[initializeSweepInterval] operator[SEP] identifier[newSweepInterval] operator[SEP] operator[SEP] } Keyword[int] identifier[newPreferredCacheSize] operator[=] identifier[ivNewPreferredMaxSize] operator[SEP] Keyword[if] operator[SEP] identifier[ivPreferredMaxSize] operator[!=] identifier[newPreferredCacheSize] operator[SEP] { identifier[initializeCacheData] operator[SEP] identifier[newPreferredCacheSize] operator[SEP] operator[SEP] } Keyword[try] { Keyword[if] operator[SEP] identifier[ivNumBelowSoftLimit] operator[>] identifier[ivMaxDiscardThreshold] operator[SEP] { Keyword[if] operator[SEP] identifier[ivDiscardThreshold] operator[<] identifier[ivMaxDiscardThreshold] operator[SEP] { operator[++] identifier[ivDiscardThreshold] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[ivSweepInterval] operator[<] identifier[ivMaxSweepInterval] operator[SEP] { identifier[ivSweepInterval] operator[=] identifier[ivSweepInterval] operator[+] identifier[SWEEP_INTERVAL_ADJUST] operator[SEP] } identifier[ivNumBelowSoftLimit] operator[=] Other[0] operator[SEP] } Keyword[if] operator[SEP] identifier[ivCache] operator[SEP] identifier[numSweeps] operator[==] identifier[Long] operator[SEP] identifier[MAX_VALUE] operator[SEP] identifier[ivCache] operator[SEP] identifier[numSweeps] operator[=] Other[1] operator[SEP] Keyword[else] identifier[ivCache] operator[SEP] identifier[numSweeps] operator[++] operator[SEP] Keyword[if] operator[SEP] identifier[preferredSizeReached] operator[SEP] operator[SEP] operator[SEP] { identifier[sweep] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[preferredSizeReached] operator[SEP] operator[SEP] operator[SEP] { identifier[ivNumBelowSoftLimit] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[ivCache] operator[SEP] identifier[numObjects] operator[>] identifier[ivUpperLimit] operator[SEP] { Keyword[if] operator[SEP] identifier[ivSweepInterval] operator[>] identifier[MINIMUM_ADJUSTED_INTERVAL] operator[SEP] { identifier[ivSweepInterval] operator[=] identifier[ivSweepInterval] operator[-] identifier[SWEEP_INTERVAL_ADJUST] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[ivDiscardThreshold] operator[>] identifier[ivMinDiscardThreshold] operator[SEP] { operator[--] identifier[ivDiscardThreshold] operator[SEP] identifier[sweep] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[else] { operator[++] identifier[ivNumBelowSoftLimit] operator[SEP] } } Keyword[else] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[isTraceEnabled] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[?] identifier[tc] operator[:] identifier[tcOOM] , identifier[ivCache] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[ivCache] operator[SEP] identifier[numSweeps] operator[+] literal[String] operator[+] identifier[ivDiscardThreshold] operator[+] literal[String] operator[+] identifier[ivSweepInterval] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[ivCache] operator[SEP] identifier[getSize] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[ivPreferredMaxSize] operator[SEP] operator[SEP] operator[++] identifier[ivNumBelowSoftLimit] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Throwable] identifier[e] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[e] , identifier[CLASS_NAME] operator[+] literal[String] , literal[String] , Keyword[this] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[warning] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { Keyword[this] , identifier[e] } operator[SEP] operator[SEP] } Keyword[finally] { identifier[ScheduledExecutorService] identifier[executor] operator[=] identifier[preferredSizeReached] operator[SEP] operator[SEP] operator[?] identifier[ivScheduledExecutorService] operator[:] identifier[ivDeferrableScheduledExecutorService] operator[SEP] identifier[ivScheduledFuture] operator[=] identifier[executor] operator[SEP] identifier[schedule] operator[SEP] Keyword[this] , identifier[ivSweepInterval] , identifier[TimeUnit] operator[SEP] identifier[MILLISECONDS] operator[SEP] operator[SEP] } } }
public final void mEQ() throws RecognitionException { try { int _type = EQ; int _channel = DEFAULT_TOKEN_CHANNEL; // hql.g:734:3: ( '=' ) // hql.g:734:5: '=' { match('='); if (state.failed) return; } state.type = _type; state.channel = _channel; } finally { // do for sure before leaving } }
class class_name[name] begin[{] method[mEQ, return_type[void], modifier[final public], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=EQ, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=_type)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=DEFAULT_TOKEN_CHANNEL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=_channel)], modifiers=set(), type=BasicType(dimensions=[], name=int)), BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='=')], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), StatementExpression(expression=Assignment(expressionl=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=MemberReference(member=_type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=MemberReference(member=_channel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)], catches=None, finally_block=[], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[mEQ] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { Keyword[try] { Keyword[int] identifier[_type] operator[=] identifier[EQ] operator[SEP] Keyword[int] identifier[_channel] operator[=] identifier[DEFAULT_TOKEN_CHANNEL] operator[SEP] { identifier[match] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } identifier[state] operator[SEP] identifier[type] operator[=] identifier[_type] operator[SEP] identifier[state] operator[SEP] identifier[channel] operator[=] identifier[_channel] operator[SEP] } Keyword[finally] { } }
@SuppressWarnings("IndexOfReplaceableByContains") public static List<File> resolvePath(File incPath, File cwd) { if(cwd == null) cwd = new File(Config.getHomeDir()); //if incPath start with eg: ./, remove it if(incPath.toString().startsWith(CURRENT_WITH_SEPARATOR)) { incPath = new File(incPath.toString().substring(CURRENT_WITH_SEPARATOR.length())); } if(incPath.toString().startsWith(TILDE_WITH_SEPARATOR)) { if(Config.getHomeDir().endsWith(Config.getPathSeparator())) incPath = new File(Config.getHomeDir()+incPath.toString().substring(2)); else incPath = new File(Config.getHomeDir()+incPath.toString().substring(1)); } if(incPath.toString().indexOf(TILDE) == 0) { if(incPath.toString().length() > 1) { // directories which name starts with tilde incPath = new File(cwd.toString() + Config.getPathSeparator() + incPath.toString()); } else { incPath = new File(Config.getHomeDir()); } } // foo1/./foo2 is changed to foo1/foo2 if(incPath.toString().indexOf(SEPARATOR_CURRENT_SEPARATOR) > -1) { int index = incPath.toString().indexOf(SEPARATOR_CURRENT_SEPARATOR); if(index == 0) { incPath = new File(incPath.toString().substring(SEPARATOR_CURRENT_SEPARATOR.length()-1)); } else { incPath = new File(incPath.toString().substring(0, index) + incPath.toString().substring(index+2, incPath.toString().length())); } } //parentPath do not start with / or by a windows driver letter and cwd is not / either if( incPath.toString().indexOf(ROOT) != 0 && incPath.toString().indexOf(DRIVER_SEPARATOR) == -1 && !cwd.toString().equals(ROOT)) { if(cwd.toString().endsWith(Config.getPathSeparator())) incPath = new File(cwd.toString() + incPath.toString()); else incPath = new File(cwd.toString() + Config.getPathSeparator() + incPath.toString()); } if(incPath.toString().indexOf(PARENT_WITH_SEPARATOR) > -1) { String tmp = incPath.toString(); while(tmp.indexOf(PARENT_WITH_SEPARATOR) > -1) { int index = tmp.indexOf(PARENT_WITH_SEPARATOR); if(index == 0) { tmp = tmp.substring(PARENT_WITH_SEPARATOR.length()); } else { File tmpFile = new File(tmp.substring(0, index)); tmpFile = tmpFile.getParentFile(); if(tmpFile == null) tmpFile = new File(Config.getPathSeparator()); tmpFile = new File(tmpFile.toString() + tmp.substring(index+ PARENT_WITH_SEPARATOR.length()-1)); //tmp = tmp.substring(0, index) + tmp.substring(index+PARENT_WITH_SEPARATOR.length()); tmp = tmpFile.toString(); } } incPath = new File(tmp); } if(incPath.toString().endsWith(PARENT)) { incPath = new File(incPath.toString().substring(0, incPath.toString().length()-PARENT.length())); incPath = incPath.getParentFile(); if(incPath == null) incPath = new File(Config.getPathSeparator()); } if( incPath.toString().indexOf(STAR) > -1 || incPath.toString().indexOf(WILDCARD) > -1) { PathCriteria pathCriteria = parsePath(incPath); if(incPath.toString().indexOf(SEPARATOR) > -1) { List<File> foundFiles = null; if(pathCriteria.getCriteria().equals(String.valueOf(STAR))) { foundFiles = new ArrayList<>(); foundFiles.add(new File(pathCriteria.getParentPath())); } else foundFiles = findFiles(new File(pathCriteria.parentPath), pathCriteria.getCriteria(), false); if(pathCriteria.childPath.length() == 0) return foundFiles; else { List<File> outFiles = new ArrayList<>(); for(File f : foundFiles) if(new File(f+Config.getPathSeparator()+pathCriteria.childPath).exists()) outFiles.add(new File(f+Config.getPathSeparator()+pathCriteria.childPath)); return outFiles; } } //just wildcard without separators else { if(incPath.toString().length() == 1) { List<File> foundFiles = findFiles(new File(pathCriteria.parentPath), pathCriteria.getCriteria(), false); if(pathCriteria.childPath.length() == 0) return foundFiles; } return new ArrayList<File>(); } } else { //no wildcards ArrayList<File> fileList = new ArrayList<>(1); fileList.add(incPath); return fileList; } }
class class_name[name] begin[{] method[resolvePath, return_type[type[List]], modifier[public static], parameter[incPath, cwd]] begin[{] if[binary_operation[member[.cwd], ==, literal[null]]] begin[{] assign[member[.cwd], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getHomeDir, postfix_operators=[], prefix_operators=[], qualifier=Config, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))] else begin[{] None end[}] if[call[incPath.toString, parameter[]]] begin[{] assign[member[.incPath], ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=incPath, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=CURRENT_WITH_SEPARATOR, selectors=[], type_arguments=None)], member=substring, 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=File, sub_type=None))] else begin[{] None end[}] if[call[incPath.toString, parameter[]]] begin[{] if[call[Config.getHomeDir, parameter[]]] begin[{] assign[member[.incPath], ClassCreator(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=getHomeDir, postfix_operators=[], prefix_operators=[], qualifier=Config, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=incPath, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=substring, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))] else begin[{] assign[member[.incPath], ClassCreator(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=getHomeDir, postfix_operators=[], prefix_operators=[], qualifier=Config, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=incPath, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=substring, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))] end[}] else begin[{] None end[}] if[binary_operation[call[incPath.toString, parameter[]], ==, literal[0]]] begin[{] if[binary_operation[call[incPath.toString, parameter[]], >, literal[1]]] begin[{] assign[member[.incPath], ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=cwd, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getPathSeparator, postfix_operators=[], prefix_operators=[], qualifier=Config, selectors=[], type_arguments=None), operator=+), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=incPath, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))] else begin[{] assign[member[.incPath], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getHomeDir, postfix_operators=[], prefix_operators=[], qualifier=Config, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))] end[}] else begin[{] None end[}] if[binary_operation[call[incPath.toString, parameter[]], >, literal[1]]] begin[{] local_variable[type[int], index] if[binary_operation[member[.index], ==, literal[0]]] begin[{] assign[member[.incPath], ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=incPath, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=SEPARATOR_CURRENT_SEPARATOR, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=substring, 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=File, sub_type=None))] else begin[{] assign[member[.incPath], ClassCreator(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=incPath, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=incPath, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=+), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=incPath, selectors=[MethodInvocation(arguments=[], member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=substring, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))] end[}] else begin[{] None end[}] if[binary_operation[binary_operation[binary_operation[call[incPath.toString, parameter[]], !=, literal[0]], &&, binary_operation[call[incPath.toString, parameter[]], ==, literal[1]]], &&, call[cwd.toString, parameter[]]]] begin[{] if[call[cwd.toString, parameter[]]] begin[{] assign[member[.incPath], ClassCreator(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=cwd, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=incPath, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))] else begin[{] assign[member[.incPath], ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=cwd, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getPathSeparator, postfix_operators=[], prefix_operators=[], qualifier=Config, selectors=[], type_arguments=None), operator=+), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=incPath, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))] end[}] else begin[{] None end[}] if[binary_operation[call[incPath.toString, parameter[]], >, literal[1]]] begin[{] local_variable[type[String], tmp] while[binary_operation[call[tmp.indexOf, parameter[member[.PARENT_WITH_SEPARATOR]]], >, literal[1]]] begin[{] local_variable[type[int], index] if[binary_operation[member[.index], ==, literal[0]]] begin[{] assign[member[.tmp], call[tmp.substring, parameter[call[PARENT_WITH_SEPARATOR.length, parameter[]]]]] else begin[{] local_variable[type[File], tmpFile] assign[member[.tmpFile], call[tmpFile.getParentFile, parameter[]]] if[binary_operation[member[.tmpFile], ==, literal[null]]] begin[{] assign[member[.tmpFile], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getPathSeparator, postfix_operators=[], prefix_operators=[], qualifier=Config, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))] else begin[{] None end[}] assign[member[.tmpFile], ClassCreator(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=tmpFile, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=PARENT_WITH_SEPARATOR, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=tmp, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))] assign[member[.tmp], call[tmpFile.toString, parameter[]]] end[}] end[}] assign[member[.incPath], ClassCreator(arguments=[MemberReference(member=tmp, 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=File, sub_type=None))] else begin[{] None end[}] if[call[incPath.toString, parameter[]]] begin[{] assign[member[.incPath], ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=incPath, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), BinaryOperation(operandl=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=incPath, selectors=[MethodInvocation(arguments=[], member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=PARENT, selectors=[], type_arguments=None), operator=-)], member=substring, 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=File, sub_type=None))] assign[member[.incPath], call[incPath.getParentFile, parameter[]]] if[binary_operation[member[.incPath], ==, literal[null]]] begin[{] assign[member[.incPath], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getPathSeparator, postfix_operators=[], prefix_operators=[], qualifier=Config, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))] else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[binary_operation[call[incPath.toString, parameter[]], >, literal[1]], ||, binary_operation[call[incPath.toString, parameter[]], >, literal[1]]]] begin[{] local_variable[type[PathCriteria], pathCriteria] if[binary_operation[call[incPath.toString, parameter[]], >, literal[1]]] begin[{] local_variable[type[List], foundFiles] if[call[pathCriteria.getCriteria, parameter[]]] begin[{] assign[member[.foundFiles], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None))] call[foundFiles.add, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getParentPath, postfix_operators=[], prefix_operators=[], qualifier=pathCriteria, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))]] else begin[{] assign[member[.foundFiles], call[.findFiles, parameter[ClassCreator(arguments=[MemberReference(member=parentPath, postfix_operators=[], prefix_operators=[], qualifier=pathCriteria, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None)), call[pathCriteria.getCriteria, parameter[]], literal[false]]]] end[}] if[binary_operation[call[pathCriteria.childPath.length, parameter[]], ==, literal[0]]] begin[{] return[member[.foundFiles]] else begin[{] local_variable[type[List], outFiles] ForStatement(body=IfStatement(condition=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getPathSeparator, postfix_operators=[], prefix_operators=[], qualifier=Config, selectors=[], type_arguments=None), operator=+), operandr=MemberReference(member=childPath, postfix_operators=[], prefix_operators=[], qualifier=pathCriteria, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=exists, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None)), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getPathSeparator, postfix_operators=[], prefix_operators=[], qualifier=Config, selectors=[], type_arguments=None), operator=+), operandr=MemberReference(member=childPath, postfix_operators=[], prefix_operators=[], qualifier=pathCriteria, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=outFiles, selectors=[], type_arguments=None), label=None)), control=EnhancedForControl(iterable=MemberReference(member=foundFiles, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=f)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))), label=None) return[member[.outFiles]] end[}] else begin[{] if[binary_operation[call[incPath.toString, parameter[]], ==, literal[1]]] begin[{] local_variable[type[List], foundFiles] if[binary_operation[call[pathCriteria.childPath.length, parameter[]], ==, literal[0]]] begin[{] return[member[.foundFiles]] else begin[{] None end[}] else begin[{] None end[}] return[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=File, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))] end[}] else begin[{] local_variable[type[ArrayList], fileList] call[fileList.add, parameter[member[.incPath]]] return[member[.fileList]] end[}] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] identifier[List] operator[<] identifier[File] operator[>] identifier[resolvePath] operator[SEP] identifier[File] identifier[incPath] , identifier[File] identifier[cwd] operator[SEP] { Keyword[if] operator[SEP] identifier[cwd] operator[==] Other[null] operator[SEP] identifier[cwd] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[Config] operator[SEP] identifier[getHomeDir] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[incPath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] identifier[CURRENT_WITH_SEPARATOR] operator[SEP] operator[SEP] { identifier[incPath] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[incPath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[substring] operator[SEP] identifier[CURRENT_WITH_SEPARATOR] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[incPath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] identifier[TILDE_WITH_SEPARATOR] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[Config] operator[SEP] identifier[getHomeDir] operator[SEP] operator[SEP] operator[SEP] identifier[endsWith] operator[SEP] identifier[Config] operator[SEP] identifier[getPathSeparator] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[incPath] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[Config] operator[SEP] identifier[getHomeDir] operator[SEP] operator[SEP] operator[+] identifier[incPath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[substring] operator[SEP] Other[2] operator[SEP] operator[SEP] operator[SEP] Keyword[else] identifier[incPath] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[Config] operator[SEP] identifier[getHomeDir] operator[SEP] operator[SEP] operator[+] identifier[incPath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[substring] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[incPath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[indexOf] operator[SEP] identifier[TILDE] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[incPath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[1] operator[SEP] { identifier[incPath] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[cwd] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[+] identifier[Config] operator[SEP] identifier[getPathSeparator] operator[SEP] operator[SEP] operator[+] identifier[incPath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[incPath] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[Config] operator[SEP] identifier[getHomeDir] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[incPath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[indexOf] operator[SEP] identifier[SEPARATOR_CURRENT_SEPARATOR] operator[SEP] operator[>] operator[-] Other[1] operator[SEP] { Keyword[int] identifier[index] operator[=] identifier[incPath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[indexOf] operator[SEP] identifier[SEPARATOR_CURRENT_SEPARATOR] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[index] operator[==] Other[0] operator[SEP] { identifier[incPath] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[incPath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[substring] operator[SEP] identifier[SEPARATOR_CURRENT_SEPARATOR] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[incPath] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[incPath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[index] operator[SEP] operator[+] identifier[incPath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[substring] operator[SEP] identifier[index] operator[+] Other[2] , identifier[incPath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[incPath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[indexOf] operator[SEP] identifier[ROOT] operator[SEP] operator[!=] Other[0] operator[&&] identifier[incPath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[indexOf] operator[SEP] identifier[DRIVER_SEPARATOR] operator[SEP] operator[==] operator[-] Other[1] operator[&&] operator[!] identifier[cwd] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[ROOT] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[cwd] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[endsWith] operator[SEP] identifier[Config] operator[SEP] identifier[getPathSeparator] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[incPath] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[cwd] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[+] identifier[incPath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[else] identifier[incPath] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[cwd] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[+] identifier[Config] operator[SEP] identifier[getPathSeparator] operator[SEP] operator[SEP] operator[+] identifier[incPath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[incPath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[indexOf] operator[SEP] identifier[PARENT_WITH_SEPARATOR] operator[SEP] operator[>] operator[-] Other[1] operator[SEP] { identifier[String] identifier[tmp] operator[=] identifier[incPath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[tmp] operator[SEP] identifier[indexOf] operator[SEP] identifier[PARENT_WITH_SEPARATOR] operator[SEP] operator[>] operator[-] Other[1] operator[SEP] { Keyword[int] identifier[index] operator[=] identifier[tmp] operator[SEP] identifier[indexOf] operator[SEP] identifier[PARENT_WITH_SEPARATOR] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[index] operator[==] Other[0] operator[SEP] { identifier[tmp] operator[=] identifier[tmp] operator[SEP] identifier[substring] operator[SEP] identifier[PARENT_WITH_SEPARATOR] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[File] identifier[tmpFile] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[tmp] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[index] operator[SEP] operator[SEP] operator[SEP] identifier[tmpFile] operator[=] identifier[tmpFile] operator[SEP] identifier[getParentFile] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tmpFile] operator[==] Other[null] operator[SEP] identifier[tmpFile] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[Config] operator[SEP] identifier[getPathSeparator] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[tmpFile] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[tmpFile] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[+] identifier[tmp] operator[SEP] identifier[substring] operator[SEP] identifier[index] operator[+] identifier[PARENT_WITH_SEPARATOR] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[tmp] operator[=] identifier[tmpFile] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } } identifier[incPath] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[tmp] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[incPath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[endsWith] operator[SEP] identifier[PARENT] operator[SEP] operator[SEP] { identifier[incPath] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[incPath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[incPath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] identifier[PARENT] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[incPath] operator[=] identifier[incPath] operator[SEP] identifier[getParentFile] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[incPath] operator[==] Other[null] operator[SEP] identifier[incPath] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[Config] operator[SEP] identifier[getPathSeparator] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[incPath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[indexOf] operator[SEP] identifier[STAR] operator[SEP] operator[>] operator[-] Other[1] operator[||] identifier[incPath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[indexOf] operator[SEP] identifier[WILDCARD] operator[SEP] operator[>] operator[-] Other[1] operator[SEP] { identifier[PathCriteria] identifier[pathCriteria] operator[=] identifier[parsePath] operator[SEP] identifier[incPath] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[incPath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[indexOf] operator[SEP] identifier[SEPARATOR] operator[SEP] operator[>] operator[-] Other[1] operator[SEP] { identifier[List] operator[<] identifier[File] operator[>] identifier[foundFiles] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[pathCriteria] operator[SEP] identifier[getCriteria] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[STAR] operator[SEP] operator[SEP] operator[SEP] { identifier[foundFiles] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[foundFiles] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[File] operator[SEP] identifier[pathCriteria] operator[SEP] identifier[getParentPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] identifier[foundFiles] operator[=] identifier[findFiles] operator[SEP] Keyword[new] identifier[File] operator[SEP] identifier[pathCriteria] operator[SEP] identifier[parentPath] operator[SEP] , identifier[pathCriteria] operator[SEP] identifier[getCriteria] operator[SEP] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pathCriteria] operator[SEP] identifier[childPath] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] Keyword[return] identifier[foundFiles] operator[SEP] Keyword[else] { identifier[List] operator[<] identifier[File] operator[>] identifier[outFiles] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[File] identifier[f] operator[:] identifier[foundFiles] operator[SEP] Keyword[if] operator[SEP] Keyword[new] identifier[File] operator[SEP] identifier[f] operator[+] identifier[Config] operator[SEP] identifier[getPathSeparator] operator[SEP] operator[SEP] operator[+] identifier[pathCriteria] operator[SEP] identifier[childPath] operator[SEP] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] identifier[outFiles] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[File] operator[SEP] identifier[f] operator[+] identifier[Config] operator[SEP] identifier[getPathSeparator] operator[SEP] operator[SEP] operator[+] identifier[pathCriteria] operator[SEP] identifier[childPath] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[outFiles] operator[SEP] } } Keyword[else] { Keyword[if] operator[SEP] identifier[incPath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[1] operator[SEP] { identifier[List] operator[<] identifier[File] operator[>] identifier[foundFiles] operator[=] identifier[findFiles] operator[SEP] Keyword[new] identifier[File] operator[SEP] identifier[pathCriteria] operator[SEP] identifier[parentPath] operator[SEP] , identifier[pathCriteria] operator[SEP] identifier[getCriteria] operator[SEP] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pathCriteria] operator[SEP] identifier[childPath] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] Keyword[return] identifier[foundFiles] operator[SEP] } Keyword[return] Keyword[new] identifier[ArrayList] operator[<] identifier[File] operator[>] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[ArrayList] operator[<] identifier[File] operator[>] identifier[fileList] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[fileList] operator[SEP] identifier[add] operator[SEP] identifier[incPath] operator[SEP] operator[SEP] Keyword[return] identifier[fileList] operator[SEP] } }
public long getLong(String columnName, long defaultValue) { int index = getColumnIndex(columnName); if (isValidIndex(index)) { return getLong(index); } else { return defaultValue; } }
class class_name[name] begin[{] method[getLong, return_type[type[long]], modifier[public], parameter[columnName, defaultValue]] begin[{] local_variable[type[int], index] if[call[.isValidIndex, parameter[member[.index]]]] begin[{] return[call[.getLong, parameter[member[.index]]]] else begin[{] return[member[.defaultValue]] end[}] end[}] END[}]
Keyword[public] Keyword[long] identifier[getLong] operator[SEP] identifier[String] identifier[columnName] , Keyword[long] identifier[defaultValue] operator[SEP] { Keyword[int] identifier[index] operator[=] identifier[getColumnIndex] operator[SEP] identifier[columnName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isValidIndex] operator[SEP] identifier[index] operator[SEP] operator[SEP] { Keyword[return] identifier[getLong] operator[SEP] identifier[index] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[defaultValue] operator[SEP] } }
protected MoneyKit newMoneyWithSameCurrency(long cent) { MoneyKit money = new MoneyKit(0, currency); money.cent = cent; return money; }
class class_name[name] begin[{] method[newMoneyWithSameCurrency, return_type[type[MoneyKit]], modifier[protected], parameter[cent]] begin[{] local_variable[type[MoneyKit], money] assign[member[money.cent], member[.cent]] return[member[.money]] end[}] END[}]
Keyword[protected] identifier[MoneyKit] identifier[newMoneyWithSameCurrency] operator[SEP] Keyword[long] identifier[cent] operator[SEP] { identifier[MoneyKit] identifier[money] operator[=] Keyword[new] identifier[MoneyKit] operator[SEP] Other[0] , identifier[currency] operator[SEP] operator[SEP] identifier[money] operator[SEP] identifier[cent] operator[=] identifier[cent] operator[SEP] Keyword[return] identifier[money] operator[SEP] }
public static <T extends Serializable> T cloneViaSerialization(final T obj) throws IOException, ClassNotFoundException { FastByteArrayOutputStream bos = new FastByteArrayOutputStream(); ObjectOutputStream out = null; ObjectInputStream in = null; Object objCopy = null; try { out = new ObjectOutputStream(bos); out.writeObject(obj); out.flush(); byte[] bytes = bos.toByteArray(); in = new ObjectInputStream(new ByteArrayInputStream(bytes)); objCopy = in.readObject(); } finally { StreamUtil.close(out); StreamUtil.close(in); } return (T) objCopy; }
class class_name[name] begin[{] method[cloneViaSerialization, return_type[type[T]], modifier[public static], parameter[obj]] begin[{] local_variable[type[FastByteArrayOutputStream], bos] local_variable[type[ObjectOutputStream], out] local_variable[type[ObjectInputStream], in] local_variable[type[Object], objCopy] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=bos, 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=ObjectOutputStream, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeObject, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=flush, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=toByteArray, postfix_operators=[], prefix_operators=[], qualifier=bos, selectors=[], type_arguments=None), name=bytes)], modifiers=set(), type=BasicType(dimensions=[None], name=byte)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=bytes, 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=ByteArrayInputStream, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ObjectInputStream, sub_type=None))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=objCopy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=readObject, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[], type_arguments=None)), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=close, postfix_operators=[], prefix_operators=[], qualifier=StreamUtil, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=close, postfix_operators=[], prefix_operators=[], qualifier=StreamUtil, selectors=[], type_arguments=None), label=None)], label=None, resources=None) return[Cast(expression=MemberReference(member=objCopy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Serializable] operator[>] identifier[T] identifier[cloneViaSerialization] operator[SEP] Keyword[final] identifier[T] identifier[obj] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ClassNotFoundException] { identifier[FastByteArrayOutputStream] identifier[bos] operator[=] Keyword[new] identifier[FastByteArrayOutputStream] operator[SEP] operator[SEP] operator[SEP] identifier[ObjectOutputStream] identifier[out] operator[=] Other[null] operator[SEP] identifier[ObjectInputStream] identifier[in] operator[=] Other[null] operator[SEP] identifier[Object] identifier[objCopy] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[out] operator[=] Keyword[new] identifier[ObjectOutputStream] operator[SEP] identifier[bos] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[writeObject] operator[SEP] identifier[obj] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] operator[=] identifier[bos] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] operator[SEP] identifier[in] operator[=] Keyword[new] identifier[ObjectInputStream] operator[SEP] Keyword[new] identifier[ByteArrayInputStream] operator[SEP] identifier[bytes] operator[SEP] operator[SEP] operator[SEP] identifier[objCopy] operator[=] identifier[in] operator[SEP] identifier[readObject] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { identifier[StreamUtil] operator[SEP] identifier[close] operator[SEP] identifier[out] operator[SEP] operator[SEP] identifier[StreamUtil] operator[SEP] identifier[close] operator[SEP] identifier[in] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] identifier[T] operator[SEP] identifier[objCopy] operator[SEP] }
public static Choice<AlbumMultipleWrapper, AlbumSingleWrapper> album(android.support.v4.app.Fragment fragment) { return new AlbumChoice(fragment.getContext()); }
class class_name[name] begin[{] method[album, return_type[type[Choice]], modifier[public static], parameter[fragment]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getContext, postfix_operators=[], prefix_operators=[], qualifier=fragment, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AlbumChoice, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Choice] operator[<] identifier[AlbumMultipleWrapper] , identifier[AlbumSingleWrapper] operator[>] identifier[album] operator[SEP] identifier[android] operator[SEP] identifier[support] operator[SEP] identifier[v4] operator[SEP] identifier[app] operator[SEP] identifier[Fragment] identifier[fragment] operator[SEP] { Keyword[return] Keyword[new] identifier[AlbumChoice] operator[SEP] identifier[fragment] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void printSuggestions(Suggestions suggestions) { final PrintContext context = new PrintContext(); context.append("Suggestions:").println(); context.incIndent(); printSuggestions0(context, suggestions.getDirectorySuggestions(), "Directories"); printSuggestions0(context, suggestions.getCommandSuggestions(), "Commands"); printSuggestions0(context, suggestions.getParamNameSuggestions(), "Parameter names"); printSuggestions0(context, suggestions.getParamValueSuggestions(), "Parameter values"); context.decIndent(); }
class class_name[name] begin[{] method[printSuggestions, return_type[void], modifier[public], parameter[suggestions]] begin[{] local_variable[type[PrintContext], context] call[context.append, parameter[literal["Suggestions:"]]] call[context.incIndent, parameter[]] call[.printSuggestions0, parameter[member[.context], call[suggestions.getDirectorySuggestions, parameter[]], literal["Directories"]]] call[.printSuggestions0, parameter[member[.context], call[suggestions.getCommandSuggestions, parameter[]], literal["Commands"]]] call[.printSuggestions0, parameter[member[.context], call[suggestions.getParamNameSuggestions, parameter[]], literal["Parameter names"]]] call[.printSuggestions0, parameter[member[.context], call[suggestions.getParamValueSuggestions, parameter[]], literal["Parameter values"]]] call[context.decIndent, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[printSuggestions] operator[SEP] identifier[Suggestions] identifier[suggestions] operator[SEP] { Keyword[final] identifier[PrintContext] identifier[context] operator[=] Keyword[new] identifier[PrintContext] operator[SEP] operator[SEP] operator[SEP] identifier[context] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[println] operator[SEP] operator[SEP] operator[SEP] identifier[context] operator[SEP] identifier[incIndent] operator[SEP] operator[SEP] operator[SEP] identifier[printSuggestions0] operator[SEP] identifier[context] , identifier[suggestions] operator[SEP] identifier[getDirectorySuggestions] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[printSuggestions0] operator[SEP] identifier[context] , identifier[suggestions] operator[SEP] identifier[getCommandSuggestions] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[printSuggestions0] operator[SEP] identifier[context] , identifier[suggestions] operator[SEP] identifier[getParamNameSuggestions] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[printSuggestions0] operator[SEP] identifier[context] , identifier[suggestions] operator[SEP] identifier[getParamValueSuggestions] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[context] operator[SEP] identifier[decIndent] operator[SEP] operator[SEP] operator[SEP] }
public int getSeconds() { // TODO ahai 如果当月时间未到呢? Calendar cld = Calendar.getInstance(); cld.add(Calendar.MONTH, 1); cld.set(Calendar.DAY_OF_MONTH, day); cld.set(Calendar.HOUR_OF_DAY, this.hour); cld.set(Calendar.MINUTE, this.minute); cld.set(Calendar.SECOND, this.second); long time = cld.getTimeInMillis(); long diff = time - System.currentTimeMillis(); if (diff <= 0) {// 一定要小于等于0 // 本周的时间已过,下周再执行 diff += 7 * 24 * 60 * 60 * 1000L; } int seconds = (int) (diff / 1000); return seconds; }
class class_name[name] begin[{] method[getSeconds, return_type[type[int]], modifier[public], parameter[]] begin[{] local_variable[type[Calendar], cld] call[cld.add, parameter[member[Calendar.MONTH], literal[1]]] call[cld.set, parameter[member[Calendar.DAY_OF_MONTH], member[.day]]] call[cld.set, parameter[member[Calendar.HOUR_OF_DAY], THIS[member[None.hour]]]] call[cld.set, parameter[member[Calendar.MINUTE], THIS[member[None.minute]]]] call[cld.set, parameter[member[Calendar.SECOND], THIS[member[None.second]]]] local_variable[type[long], time] local_variable[type[long], diff] if[binary_operation[member[.diff], <=, literal[0]]] begin[{] assign[member[.diff], binary_operation[binary_operation[binary_operation[binary_operation[literal[7], *, literal[24]], *, literal[60]], *, literal[60]], *, literal[1000L]]] else begin[{] None end[}] local_variable[type[int], seconds] return[member[.seconds]] end[}] END[}]
Keyword[public] Keyword[int] identifier[getSeconds] operator[SEP] operator[SEP] { identifier[Calendar] identifier[cld] operator[=] identifier[Calendar] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[cld] operator[SEP] identifier[add] operator[SEP] identifier[Calendar] operator[SEP] identifier[MONTH] , Other[1] operator[SEP] operator[SEP] identifier[cld] operator[SEP] identifier[set] operator[SEP] identifier[Calendar] operator[SEP] identifier[DAY_OF_MONTH] , identifier[day] operator[SEP] operator[SEP] identifier[cld] operator[SEP] identifier[set] operator[SEP] identifier[Calendar] operator[SEP] identifier[HOUR_OF_DAY] , Keyword[this] operator[SEP] identifier[hour] operator[SEP] operator[SEP] identifier[cld] operator[SEP] identifier[set] operator[SEP] identifier[Calendar] operator[SEP] identifier[MINUTE] , Keyword[this] operator[SEP] identifier[minute] operator[SEP] operator[SEP] identifier[cld] operator[SEP] identifier[set] operator[SEP] identifier[Calendar] operator[SEP] identifier[SECOND] , Keyword[this] operator[SEP] identifier[second] operator[SEP] operator[SEP] Keyword[long] identifier[time] operator[=] identifier[cld] operator[SEP] identifier[getTimeInMillis] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[diff] operator[=] identifier[time] operator[-] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[diff] operator[<=] Other[0] operator[SEP] { identifier[diff] operator[+=] Other[7] operator[*] Other[24] operator[*] Other[60] operator[*] Other[60] operator[*] Other[1000L] operator[SEP] } Keyword[int] identifier[seconds] operator[=] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[diff] operator[/] Other[1000] operator[SEP] operator[SEP] Keyword[return] identifier[seconds] operator[SEP] }
@Override public Properties getConfiguration(Environment environment) { Properties properties = new Properties(); Path rootPath; if (environment.getName().trim().isEmpty()) { rootPath = Paths.get(System.getProperty("user.home")); } else { rootPath = Paths.get(environment.getName()); } if (!rootPath.toFile().exists()) { throw new MissingEnvironmentException("Directory doesn't exist: " + rootPath); } List<Path> paths = new ArrayList<>(); for (Path path : configFilesProvider.getConfigFiles()) { paths.add(rootPath.resolve(path)); } for (Path path : paths) { try (InputStream input = new FileInputStream(path.toFile())) { PropertiesProvider provider = propertiesProviderSelector.getProvider(path.getFileName().toString()); properties.putAll(provider.getProperties(input)); } catch (IOException e) { throw new IllegalStateException("Unable to load properties from file: " + path, e); } } return properties; }
class class_name[name] begin[{] method[getConfiguration, return_type[type[Properties]], modifier[public], parameter[environment]] begin[{] local_variable[type[Properties], properties] local_variable[type[Path], rootPath] if[call[environment.getName, parameter[]]] begin[{] assign[member[.rootPath], call[Paths.get, parameter[call[System.getProperty, parameter[literal["user.home"]]]]]] else begin[{] assign[member[.rootPath], call[Paths.get, parameter[call[environment.getName, parameter[]]]]] end[}] if[call[rootPath.toFile, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Directory doesn't exist: "), operandr=MemberReference(member=rootPath, 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=MissingEnvironmentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[List], paths] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=resolve, postfix_operators=[], prefix_operators=[], qualifier=rootPath, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=paths, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getConfigFiles, postfix_operators=[], prefix_operators=[], qualifier=configFilesProvider, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=path)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Path, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getFileName, postfix_operators=[], prefix_operators=[], qualifier=path, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=getProvider, postfix_operators=[], prefix_operators=[], qualifier=propertiesProviderSelector, selectors=[], type_arguments=None), name=provider)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PropertiesProvider, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getProperties, postfix_operators=[], prefix_operators=[], qualifier=provider, selectors=[], type_arguments=None)], member=putAll, postfix_operators=[], prefix_operators=[], qualifier=properties, 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 load properties from file: "), operandr=MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=input, type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None), value=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toFile, postfix_operators=[], prefix_operators=[], qualifier=path, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileInputStream, sub_type=None)))])]), control=EnhancedForControl(iterable=MemberReference(member=paths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=path)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Path, sub_type=None))), label=None) return[member[.properties]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Properties] identifier[getConfiguration] operator[SEP] identifier[Environment] identifier[environment] operator[SEP] { identifier[Properties] identifier[properties] operator[=] Keyword[new] identifier[Properties] operator[SEP] operator[SEP] operator[SEP] identifier[Path] identifier[rootPath] operator[SEP] Keyword[if] operator[SEP] identifier[environment] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[rootPath] operator[=] identifier[Paths] operator[SEP] identifier[get] operator[SEP] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[rootPath] operator[=] identifier[Paths] operator[SEP] identifier[get] operator[SEP] identifier[environment] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[rootPath] operator[SEP] identifier[toFile] operator[SEP] operator[SEP] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[MissingEnvironmentException] operator[SEP] literal[String] operator[+] identifier[rootPath] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[Path] operator[>] identifier[paths] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Path] identifier[path] operator[:] identifier[configFilesProvider] operator[SEP] identifier[getConfigFiles] operator[SEP] operator[SEP] operator[SEP] { identifier[paths] operator[SEP] identifier[add] operator[SEP] identifier[rootPath] operator[SEP] identifier[resolve] operator[SEP] identifier[path] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[Path] identifier[path] operator[:] identifier[paths] operator[SEP] { Keyword[try] operator[SEP] identifier[InputStream] identifier[input] operator[=] Keyword[new] identifier[FileInputStream] operator[SEP] identifier[path] operator[SEP] identifier[toFile] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[PropertiesProvider] identifier[provider] operator[=] identifier[propertiesProviderSelector] operator[SEP] identifier[getProvider] operator[SEP] identifier[path] operator[SEP] identifier[getFileName] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[properties] operator[SEP] identifier[putAll] operator[SEP] identifier[provider] operator[SEP] identifier[getProperties] operator[SEP] identifier[input] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[path] , identifier[e] operator[SEP] operator[SEP] } } Keyword[return] identifier[properties] operator[SEP] }
public static void init(int logLevel, Printer... printers) { init(new LogConfiguration.Builder().logLevel(logLevel).build(), printers); }
class class_name[name] begin[{] method[init, return_type[void], modifier[public static], parameter[logLevel, printers]] begin[{] call[.init, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=logLevel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=logLevel, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=LogConfiguration, sub_type=ReferenceType(arguments=None, dimensions=None, name=Builder, sub_type=None))), member[.printers]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[init] operator[SEP] Keyword[int] identifier[logLevel] , identifier[Printer] operator[...] identifier[printers] operator[SEP] { identifier[init] operator[SEP] Keyword[new] identifier[LogConfiguration] operator[SEP] identifier[Builder] operator[SEP] operator[SEP] operator[SEP] identifier[logLevel] operator[SEP] identifier[logLevel] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] , identifier[printers] operator[SEP] operator[SEP] }
public boolean hasOption(String opt) { opt = Util.stripLeadingHyphens(opt); return shortOpts.containsKey(opt) || longOpts.containsKey(opt); }
class class_name[name] begin[{] method[hasOption, return_type[type[boolean]], modifier[public], parameter[opt]] begin[{] assign[member[.opt], call[Util.stripLeadingHyphens, parameter[member[.opt]]]] return[binary_operation[call[shortOpts.containsKey, parameter[member[.opt]]], ||, call[longOpts.containsKey, parameter[member[.opt]]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[hasOption] operator[SEP] identifier[String] identifier[opt] operator[SEP] { identifier[opt] operator[=] identifier[Util] operator[SEP] identifier[stripLeadingHyphens] operator[SEP] identifier[opt] operator[SEP] operator[SEP] Keyword[return] identifier[shortOpts] operator[SEP] identifier[containsKey] operator[SEP] identifier[opt] operator[SEP] operator[||] identifier[longOpts] operator[SEP] identifier[containsKey] operator[SEP] identifier[opt] operator[SEP] operator[SEP] }
public void cleanUp(RESTRequest request) { //We need to loop through the clients but we don't want to synchronize //the entire map, which would block new clients from entering and block existing //clients from continuing their work. So we iterate and possibly remove by just //using the built-in concurrency of ConcurrentHashMap. final Iterator<Entry<Integer, ClientNotificationArea>> clients = inboxes.entrySet().iterator(); while (clients.hasNext()) { Entry<Integer, ClientNotificationArea> client = clients.next(); //Check for time outs ClientNotificationArea inbox = client.getValue(); if (inbox.timedOut()) { //cleanup inbox.cleanUp(request); //Emit the warning Tr.warning(tc, "jmx.connector.server.rest.notification.timeout.warning", client.getKey()); //remove the client inbox from the map (using the Iterator.remove() method) clients.remove(); } } }
class class_name[name] begin[{] method[cleanUp, return_type[void], modifier[public], parameter[request]] begin[{] local_variable[type[Iterator], clients] while[call[clients.hasNext, parameter[]]] begin[{] local_variable[type[Entry], client] local_variable[type[ClientNotificationArea], inbox] if[call[inbox.timedOut, parameter[]]] begin[{] call[inbox.cleanUp, parameter[member[.request]]] call[Tr.warning, parameter[member[.tc], literal["jmx.connector.server.rest.notification.timeout.warning"], call[client.getKey, parameter[]]]] call[clients.remove, parameter[]] else begin[{] None end[}] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[cleanUp] operator[SEP] identifier[RESTRequest] identifier[request] operator[SEP] { Keyword[final] identifier[Iterator] operator[<] identifier[Entry] operator[<] identifier[Integer] , identifier[ClientNotificationArea] operator[>] operator[>] identifier[clients] operator[=] identifier[inboxes] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[clients] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[Entry] operator[<] identifier[Integer] , identifier[ClientNotificationArea] operator[>] identifier[client] operator[=] identifier[clients] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[ClientNotificationArea] identifier[inbox] operator[=] identifier[client] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[inbox] operator[SEP] identifier[timedOut] operator[SEP] operator[SEP] operator[SEP] { identifier[inbox] operator[SEP] identifier[cleanUp] operator[SEP] identifier[request] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[warning] operator[SEP] identifier[tc] , literal[String] , identifier[client] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[clients] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] } } }
public static TtlAction fromProtobuf(PTtlAction pTtlAction) { if (pTtlAction == null) { return TtlAction.DELETE; } switch (pTtlAction) { case DELETE: return TtlAction.DELETE; case FREE: return TtlAction.FREE; default: throw new IllegalStateException("Unknown protobuf ttl action: " + pTtlAction); } }
class class_name[name] begin[{] method[fromProtobuf, return_type[type[TtlAction]], modifier[public static], parameter[pTtlAction]] begin[{] if[binary_operation[member[.pTtlAction], ==, literal[null]]] begin[{] return[member[TtlAction.DELETE]] else begin[{] None end[}] SwitchStatement(cases=[SwitchStatementCase(case=['DELETE'], statements=[ReturnStatement(expression=MemberReference(member=DELETE, postfix_operators=[], prefix_operators=[], qualifier=TtlAction, selectors=[]), label=None)]), SwitchStatementCase(case=['FREE'], statements=[ReturnStatement(expression=MemberReference(member=FREE, postfix_operators=[], prefix_operators=[], qualifier=TtlAction, selectors=[]), label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unknown protobuf ttl action: "), operandr=MemberReference(member=pTtlAction, 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=IllegalStateException, sub_type=None)), label=None)])], expression=MemberReference(member=pTtlAction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[TtlAction] identifier[fromProtobuf] operator[SEP] identifier[PTtlAction] identifier[pTtlAction] operator[SEP] { Keyword[if] operator[SEP] identifier[pTtlAction] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[TtlAction] operator[SEP] identifier[DELETE] operator[SEP] } Keyword[switch] operator[SEP] identifier[pTtlAction] operator[SEP] { Keyword[case] identifier[DELETE] operator[:] Keyword[return] identifier[TtlAction] operator[SEP] identifier[DELETE] operator[SEP] Keyword[case] identifier[FREE] operator[:] Keyword[return] identifier[TtlAction] operator[SEP] identifier[FREE] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[pTtlAction] operator[SEP] operator[SEP] } }
public static void registerHelper(ConfigurationExtensionBuilder builder, String name, Helper helper) { Checker.checkArgumentsNotNull(builder, name, helper); try { builder.registerHelper(name, helper); } catch (IllegalArgumentException ignored) { } }
class class_name[name] begin[{] method[registerHelper, return_type[void], modifier[public static], parameter[builder, name, helper]] begin[{] call[Checker.checkArgumentsNotNull, parameter[member[.builder], member[.name], member[.helper]]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=helper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=registerHelper, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ignored, types=['IllegalArgumentException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[registerHelper] operator[SEP] identifier[ConfigurationExtensionBuilder] identifier[builder] , identifier[String] identifier[name] , identifier[Helper] identifier[helper] operator[SEP] { identifier[Checker] operator[SEP] identifier[checkArgumentsNotNull] operator[SEP] identifier[builder] , identifier[name] , identifier[helper] operator[SEP] operator[SEP] Keyword[try] { identifier[builder] operator[SEP] identifier[registerHelper] operator[SEP] identifier[name] , identifier[helper] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalArgumentException] identifier[ignored] operator[SEP] { } }
public static int fromHSL(float h, float s, float l) { int alpha = MAX_INT; return fromHSL(h, s, l, alpha); }
class class_name[name] begin[{] method[fromHSL, return_type[type[int]], modifier[public static], parameter[h, s, l]] begin[{] local_variable[type[int], alpha] return[call[.fromHSL, parameter[member[.h], member[.s], member[.l], member[.alpha]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[fromHSL] operator[SEP] Keyword[float] identifier[h] , Keyword[float] identifier[s] , Keyword[float] identifier[l] operator[SEP] { Keyword[int] identifier[alpha] operator[=] identifier[MAX_INT] operator[SEP] Keyword[return] identifier[fromHSL] operator[SEP] identifier[h] , identifier[s] , identifier[l] , identifier[alpha] operator[SEP] operator[SEP] }
@ObjectiveCName("sendStickerWithPeer:withSticker:") public void sendSticker(Peer peer, Sticker sticker) { modules.getMessagesModule().sendSticker(peer, sticker); }
class class_name[name] begin[{] method[sendSticker, return_type[void], modifier[public], parameter[peer, sticker]] begin[{] call[modules.getMessagesModule, parameter[]] end[}] END[}]
annotation[@] identifier[ObjectiveCName] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[sendSticker] operator[SEP] identifier[Peer] identifier[peer] , identifier[Sticker] identifier[sticker] operator[SEP] { identifier[modules] operator[SEP] identifier[getMessagesModule] operator[SEP] operator[SEP] operator[SEP] identifier[sendSticker] operator[SEP] identifier[peer] , identifier[sticker] operator[SEP] operator[SEP] }
@Nonnull @OverrideOnDemand protected <T> T executeRequest (@Nonnull final HttpRequestBase aRequest, @Nonnull final ResponseHandler <T> aHandler) throws IOException { // Contextual attributes set the local context level will take // precedence over those set at the client level. final HttpContext aContext = HttpClientHelper.createHttpContext (m_aProxy, m_aProxyCredentials); return m_aHttpClientMgr.execute (aRequest, aContext, aHandler); }
class class_name[name] begin[{] method[executeRequest, return_type[type[T]], modifier[protected], parameter[aRequest, aHandler]] begin[{] local_variable[type[HttpContext], aContext] return[call[m_aHttpClientMgr.execute, parameter[member[.aRequest], member[.aContext], member[.aHandler]]]] end[}] END[}]
annotation[@] identifier[Nonnull] annotation[@] identifier[OverrideOnDemand] Keyword[protected] operator[<] identifier[T] operator[>] identifier[T] identifier[executeRequest] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[HttpRequestBase] identifier[aRequest] , annotation[@] identifier[Nonnull] Keyword[final] identifier[ResponseHandler] operator[<] identifier[T] operator[>] identifier[aHandler] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[final] identifier[HttpContext] identifier[aContext] operator[=] identifier[HttpClientHelper] operator[SEP] identifier[createHttpContext] operator[SEP] identifier[m_aProxy] , identifier[m_aProxyCredentials] operator[SEP] operator[SEP] Keyword[return] identifier[m_aHttpClientMgr] operator[SEP] identifier[execute] operator[SEP] identifier[aRequest] , identifier[aContext] , identifier[aHandler] operator[SEP] operator[SEP] }
private List<Boolean> asBooleanList(Object value) { boolean[] values = (boolean[]) value; List<Boolean> list = new ArrayList<Boolean>(values.length); for (boolean booleanValue : values) { list.add(booleanValue); } return list; }
class class_name[name] begin[{] method[asBooleanList, return_type[type[List]], modifier[private], parameter[value]] begin[{] local_variable[type[boolean], values] local_variable[type[List], list] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=booleanValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=booleanValue)], modifiers=set(), type=BasicType(dimensions=[], name=boolean))), label=None) return[member[.list]] end[}] END[}]
Keyword[private] identifier[List] operator[<] identifier[Boolean] operator[>] identifier[asBooleanList] operator[SEP] identifier[Object] identifier[value] operator[SEP] { Keyword[boolean] operator[SEP] operator[SEP] identifier[values] operator[=] operator[SEP] Keyword[boolean] operator[SEP] operator[SEP] operator[SEP] identifier[value] operator[SEP] identifier[List] operator[<] identifier[Boolean] operator[>] identifier[list] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Boolean] operator[>] operator[SEP] identifier[values] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[boolean] identifier[booleanValue] operator[:] identifier[values] operator[SEP] { identifier[list] operator[SEP] identifier[add] operator[SEP] identifier[booleanValue] operator[SEP] operator[SEP] } Keyword[return] identifier[list] operator[SEP] }
@SuppressWarnings("unchecked") public RequirementSummary getSummary(Requirement requirement, String identifier) throws GreenPepperServerException { Vector params = CollectionUtil.toVector(requirement.marshallize()); Vector<Object> compilParams = (Vector<Object>)execute(XmlRpcMethodName.getRequirementSummary, params, identifier); log.debug("Getting Requirement " + requirement.getName() + " summary"); return XmlRpcDataMarshaller.toRequirementSummary(compilParams); }
class class_name[name] begin[{] method[getSummary, return_type[type[RequirementSummary]], modifier[public], parameter[requirement, identifier]] begin[{] local_variable[type[Vector], params] local_variable[type[Vector], compilParams] call[log.debug, parameter[binary_operation[binary_operation[literal["Getting Requirement "], +, call[requirement.getName, parameter[]]], +, literal[" summary"]]]] return[call[XmlRpcDataMarshaller.toRequirementSummary, parameter[member[.compilParams]]]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[RequirementSummary] identifier[getSummary] operator[SEP] identifier[Requirement] identifier[requirement] , identifier[String] identifier[identifier] operator[SEP] Keyword[throws] identifier[GreenPepperServerException] { identifier[Vector] identifier[params] operator[=] identifier[CollectionUtil] operator[SEP] identifier[toVector] operator[SEP] identifier[requirement] operator[SEP] identifier[marshallize] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Vector] operator[<] identifier[Object] operator[>] identifier[compilParams] operator[=] operator[SEP] identifier[Vector] operator[<] identifier[Object] operator[>] operator[SEP] identifier[execute] operator[SEP] identifier[XmlRpcMethodName] operator[SEP] identifier[getRequirementSummary] , identifier[params] , identifier[identifier] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[requirement] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[XmlRpcDataMarshaller] operator[SEP] identifier[toRequirementSummary] operator[SEP] identifier[compilParams] operator[SEP] operator[SEP] }
public final AnalyzeEntitySentimentResponse analyzeEntitySentiment( Document document, EncodingType encodingType) { AnalyzeEntitySentimentRequest request = AnalyzeEntitySentimentRequest.newBuilder() .setDocument(document) .setEncodingType(encodingType) .build(); return analyzeEntitySentiment(request); }
class class_name[name] begin[{] method[analyzeEntitySentiment, return_type[type[AnalyzeEntitySentimentResponse]], modifier[final public], parameter[document, encodingType]] begin[{] local_variable[type[AnalyzeEntitySentimentRequest], request] return[call[.analyzeEntitySentiment, parameter[member[.request]]]] end[}] END[}]
Keyword[public] Keyword[final] identifier[AnalyzeEntitySentimentResponse] identifier[analyzeEntitySentiment] operator[SEP] identifier[Document] identifier[document] , identifier[EncodingType] identifier[encodingType] operator[SEP] { identifier[AnalyzeEntitySentimentRequest] identifier[request] operator[=] identifier[AnalyzeEntitySentimentRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setDocument] operator[SEP] identifier[document] operator[SEP] operator[SEP] identifier[setEncodingType] operator[SEP] identifier[encodingType] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[analyzeEntitySentiment] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public void addMoveBallCommand(double x, double y) { StringBuilder buf = new StringBuilder(); buf.append("(move "); buf.append("ball"); // TODO Manual says the format...will implement this later. buf.append(' '); buf.append(x); buf.append(' '); buf.append(y); buf.append(')'); fifo.add(fifo.size(), buf.toString()); }
class class_name[name] begin[{] method[addMoveBallCommand, return_type[void], modifier[public], parameter[x, y]] begin[{] local_variable[type[StringBuilder], buf] call[buf.append, parameter[literal["(move "]]] call[buf.append, parameter[literal["ball"]]] call[buf.append, parameter[literal[' ']]] call[buf.append, parameter[member[.x]]] call[buf.append, parameter[literal[' ']]] call[buf.append, parameter[member[.y]]] call[buf.append, parameter[literal[')']]] call[fifo.add, parameter[call[fifo.size, parameter[]], call[buf.toString, parameter[]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addMoveBallCommand] operator[SEP] Keyword[double] identifier[x] , Keyword[double] identifier[y] operator[SEP] { identifier[StringBuilder] identifier[buf] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[append] operator[SEP] identifier[x] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[append] operator[SEP] identifier[y] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[fifo] operator[SEP] identifier[add] operator[SEP] identifier[fifo] operator[SEP] identifier[size] operator[SEP] operator[SEP] , identifier[buf] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private static Constructor<?> getConnectionConstructor() throws ClassNotFoundException, NoSuchMethodException, SecurityException { Class<?> clazz = Class.forName("com.belladati.sdk.impl.BellaDatiConnectionImpl"); Constructor<?> constructor = clazz.getDeclaredConstructor(String.class, Boolean.TYPE); constructor.setAccessible(true); return constructor; }
class class_name[name] begin[{] method[getConnectionConstructor, return_type[type[Constructor]], modifier[private static], parameter[]] begin[{] local_variable[type[Class], clazz] local_variable[type[Constructor], constructor] call[constructor.setAccessible, parameter[literal[true]]] return[member[.constructor]] end[}] END[}]
Keyword[private] Keyword[static] identifier[Constructor] operator[<] operator[?] operator[>] identifier[getConnectionConstructor] operator[SEP] operator[SEP] Keyword[throws] identifier[ClassNotFoundException] , identifier[NoSuchMethodException] , identifier[SecurityException] { identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[=] identifier[Class] operator[SEP] identifier[forName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Constructor] operator[<] operator[?] operator[>] identifier[constructor] operator[=] identifier[clazz] operator[SEP] identifier[getDeclaredConstructor] operator[SEP] identifier[String] operator[SEP] Keyword[class] , identifier[Boolean] operator[SEP] identifier[TYPE] operator[SEP] operator[SEP] identifier[constructor] operator[SEP] identifier[setAccessible] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[return] identifier[constructor] operator[SEP] }
public static String[] discoverInterfaces(byte[] classbytes) { ClassReader cr = new ClassReader(classbytes); InterfaceCollectingClassVisitor f = new InterfaceCollectingClassVisitor(); cr.accept(f, 0); return f.interfaces; }
class class_name[name] begin[{] method[discoverInterfaces, return_type[type[String]], modifier[public static], parameter[classbytes]] begin[{] local_variable[type[ClassReader], cr] local_variable[type[InterfaceCollectingClassVisitor], f] call[cr.accept, parameter[member[.f], literal[0]]] return[member[f.interfaces]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] operator[SEP] operator[SEP] identifier[discoverInterfaces] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[classbytes] operator[SEP] { identifier[ClassReader] identifier[cr] operator[=] Keyword[new] identifier[ClassReader] operator[SEP] identifier[classbytes] operator[SEP] operator[SEP] identifier[InterfaceCollectingClassVisitor] identifier[f] operator[=] Keyword[new] identifier[InterfaceCollectingClassVisitor] operator[SEP] operator[SEP] operator[SEP] identifier[cr] operator[SEP] identifier[accept] operator[SEP] identifier[f] , Other[0] operator[SEP] operator[SEP] Keyword[return] identifier[f] operator[SEP] identifier[interfaces] operator[SEP] }
public static AlgorithmId get(String algname) throws NoSuchAlgorithmException { ObjectIdentifier oid; try { oid = algOID(algname); } catch (IOException ioe) { throw new NoSuchAlgorithmException ("Invalid ObjectIdentifier " + algname); } if (oid == null) { throw new NoSuchAlgorithmException ("unrecognized algorithm name: " + algname); } return new AlgorithmId(oid); }
class class_name[name] begin[{] method[get, return_type[type[AlgorithmId]], modifier[public static], parameter[algname]] begin[{] local_variable[type[ObjectIdentifier], oid] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=oid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=algname, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=algOID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid ObjectIdentifier "), operandr=MemberReference(member=algname, 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=NoSuchAlgorithmException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ioe, types=['IOException']))], finally_block=None, label=None, resources=None) if[binary_operation[member[.oid], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="unrecognized algorithm name: "), operandr=MemberReference(member=algname, 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=NoSuchAlgorithmException, sub_type=None)), label=None) else begin[{] None end[}] return[ClassCreator(arguments=[MemberReference(member=oid, 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=AlgorithmId, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[AlgorithmId] identifier[get] operator[SEP] identifier[String] identifier[algname] operator[SEP] Keyword[throws] identifier[NoSuchAlgorithmException] { identifier[ObjectIdentifier] identifier[oid] operator[SEP] Keyword[try] { identifier[oid] operator[=] identifier[algOID] operator[SEP] identifier[algname] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[ioe] operator[SEP] { Keyword[throw] Keyword[new] identifier[NoSuchAlgorithmException] operator[SEP] literal[String] operator[+] identifier[algname] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[oid] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NoSuchAlgorithmException] operator[SEP] literal[String] operator[+] identifier[algname] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[AlgorithmId] operator[SEP] identifier[oid] operator[SEP] operator[SEP] }
public Iterable<Di18n> queryByUpdatedDate(java.util.Date updatedDate) { return queryByField(null, Di18nMapper.Field.UPDATEDDATE.getFieldName(), updatedDate); }
class class_name[name] begin[{] method[queryByUpdatedDate, return_type[type[Iterable]], modifier[public], parameter[updatedDate]] begin[{] return[call[.queryByField, parameter[literal[null], call[Di18nMapper.Field.UPDATEDDATE.getFieldName, parameter[]], member[.updatedDate]]]] end[}] END[}]
Keyword[public] identifier[Iterable] operator[<] identifier[Di18n] operator[>] identifier[queryByUpdatedDate] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Date] identifier[updatedDate] operator[SEP] { Keyword[return] identifier[queryByField] operator[SEP] Other[null] , identifier[Di18nMapper] operator[SEP] identifier[Field] operator[SEP] identifier[UPDATEDDATE] operator[SEP] identifier[getFieldName] operator[SEP] operator[SEP] , identifier[updatedDate] operator[SEP] operator[SEP] }
public Map<String,Object> getProperties() { Map<String,Object> properties = super.getProperties(); if (m_mapMessageHeader != null) properties.putAll(m_mapMessageHeader); if (m_mapMessageInfo != null) properties.putAll(m_mapMessageInfo); if (m_mapMessageTransport != null) properties.putAll(m_mapMessageTransport); return properties; }
class class_name[name] begin[{] method[getProperties, return_type[type[Map]], modifier[public], parameter[]] begin[{] local_variable[type[Map], properties] if[binary_operation[member[.m_mapMessageHeader], !=, literal[null]]] begin[{] call[properties.putAll, parameter[member[.m_mapMessageHeader]]] else begin[{] None end[}] if[binary_operation[member[.m_mapMessageInfo], !=, literal[null]]] begin[{] call[properties.putAll, parameter[member[.m_mapMessageInfo]]] else begin[{] None end[}] if[binary_operation[member[.m_mapMessageTransport], !=, literal[null]]] begin[{] call[properties.putAll, parameter[member[.m_mapMessageTransport]]] else begin[{] None end[}] return[member[.properties]] end[}] END[}]
Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[getProperties] operator[SEP] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[properties] operator[=] Keyword[super] operator[SEP] identifier[getProperties] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m_mapMessageHeader] operator[!=] Other[null] operator[SEP] identifier[properties] operator[SEP] identifier[putAll] operator[SEP] identifier[m_mapMessageHeader] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m_mapMessageInfo] operator[!=] Other[null] operator[SEP] identifier[properties] operator[SEP] identifier[putAll] operator[SEP] identifier[m_mapMessageInfo] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m_mapMessageTransport] operator[!=] Other[null] operator[SEP] identifier[properties] operator[SEP] identifier[putAll] operator[SEP] identifier[m_mapMessageTransport] operator[SEP] operator[SEP] Keyword[return] identifier[properties] operator[SEP] }
public static MuxerFormat guessFormat(String shortName, String filename, String mimeType) { long cPtr = VideoJNI.MuxerFormat_guessFormat(shortName, filename, mimeType); return (cPtr == 0) ? null : new MuxerFormat(cPtr, false); }
class class_name[name] begin[{] method[guessFormat, return_type[type[MuxerFormat]], modifier[public static], parameter[shortName, filename, mimeType]] begin[{] local_variable[type[long], cPtr] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=cPtr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), if_false=ClassCreator(arguments=[MemberReference(member=cPtr, 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=MuxerFormat, sub_type=None)), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))] end[}] END[}]
Keyword[public] Keyword[static] identifier[MuxerFormat] identifier[guessFormat] operator[SEP] identifier[String] identifier[shortName] , identifier[String] identifier[filename] , identifier[String] identifier[mimeType] operator[SEP] { Keyword[long] identifier[cPtr] operator[=] identifier[VideoJNI] operator[SEP] identifier[MuxerFormat_guessFormat] operator[SEP] identifier[shortName] , identifier[filename] , identifier[mimeType] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[cPtr] operator[==] Other[0] operator[SEP] operator[?] Other[null] operator[:] Keyword[new] identifier[MuxerFormat] operator[SEP] identifier[cPtr] , literal[boolean] operator[SEP] operator[SEP] }
@Override protected void service( HttpServletRequest req, HttpServletResponse resp ) throws ServletException, IOException { String methodName = req.getMethod(); ITransaction transaction = null; boolean needRollback = false; if (LOG.isTraceEnabled()) { debugRequest(methodName, req); } try { Principal userPrincipal = req.getUserPrincipal(); transaction = store.begin(userPrincipal); needRollback = true; store.checkAuthentication(transaction); resp.setStatus(WebdavStatus.SC_OK); try { IMethodExecutor methodExecutor = methodMap.get(methodName); if (methodExecutor == null) { methodExecutor = methodMap.get("*NO*IMPL*"); } methodExecutor.execute(transaction, req, resp); store.commit(transaction); /** * Clear not consumed data Clear input stream if available otherwise later access include current input. These * cases occure if the client sends a request with body to an not existing resource. */ if (RequestUtil.streamNotConsumed(req)) { if (LOG.isTraceEnabled()) { LOG.trace("Clear not consumed data!"); } try { while (req.getInputStream().available() > 0) { req.getInputStream().read(); } } catch (IOException e) { //ignore } } needRollback = false; } catch (IOException e) { LOG.error(e, new TextI18n("IOException")); resp.sendError(WebdavStatus.SC_INTERNAL_SERVER_ERROR); store.rollback(transaction); throw new ServletException(e); } } catch (UnauthenticatedException e) { resp.sendError(WebdavStatus.SC_FORBIDDEN); } catch (AccessDeniedException e) { resp.sendError(WebdavStatus.SC_FORBIDDEN); } catch (LockFailedException e) { resp.sendError(WebdavStatus.SC_INTERNAL_SERVER_ERROR); } catch (ObjectAlreadyExistsException e) { resp.sendError(WebdavStatus.SC_PRECONDITION_FAILED); } catch (ObjectNotFoundException e) { resp.sendError(WebdavStatus.SC_NOT_FOUND); } catch (WebdavException e) { throw new ServletException(e); } catch (Throwable t) { t = translate(t); if (t instanceof UnauthenticatedException) { resp.sendError(WebdavStatus.SC_FORBIDDEN); } else if (t instanceof AccessDeniedException) { resp.sendError(WebdavStatus.SC_FORBIDDEN); } else if (t instanceof LockFailedException) { resp.sendError(WebdavStatus.SC_INTERNAL_SERVER_ERROR); } else if (t instanceof ObjectAlreadyExistsException) { resp.sendError(WebdavStatus.SC_PRECONDITION_FAILED); } else if (t instanceof ObjectNotFoundException) { resp.sendError(WebdavStatus.SC_NOT_FOUND); } else if (t instanceof WebdavException) { throw new ServletException(t); } else { throw new ServletException(t); } } finally { if (needRollback) { store.rollback(transaction); } } }
class class_name[name] begin[{] method[service, return_type[void], modifier[protected], parameter[req, resp]] begin[{] local_variable[type[String], methodName] local_variable[type[ITransaction], transaction] local_variable[type[boolean], needRollback] if[call[LOG.isTraceEnabled, parameter[]]] begin[{] call[.debugRequest, parameter[member[.methodName], member[.req]]] else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getUserPrincipal, postfix_operators=[], prefix_operators=[], qualifier=req, selectors=[], type_arguments=None), name=userPrincipal)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Principal, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=transaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=userPrincipal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=begin, postfix_operators=[], prefix_operators=[], qualifier=store, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=needRollback, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=transaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkAuthentication, postfix_operators=[], prefix_operators=[], qualifier=store, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SC_OK, postfix_operators=[], prefix_operators=[], qualifier=WebdavStatus, selectors=[])], member=setStatus, postfix_operators=[], prefix_operators=[], qualifier=resp, selectors=[], type_arguments=None), label=None), TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=methodName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=methodMap, selectors=[], type_arguments=None), name=methodExecutor)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=IMethodExecutor, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=methodExecutor, 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=methodExecutor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="*NO*IMPL*")], member=get, postfix_operators=[], prefix_operators=[], qualifier=methodMap, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=transaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=req, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=resp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=execute, postfix_operators=[], prefix_operators=[], qualifier=methodExecutor, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=transaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=commit, postfix_operators=[], prefix_operators=[], qualifier=store, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=req, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=streamNotConsumed, postfix_operators=[], prefix_operators=[], qualifier=RequestUtil, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isTraceEnabled, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Clear not consumed data!")], member=trace, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)])), TryStatement(block=[WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getInputStream, postfix_operators=[], prefix_operators=[], qualifier=req, selectors=[MethodInvocation(arguments=[], member=read, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getInputStream, postfix_operators=[], prefix_operators=[], qualifier=req, selectors=[MethodInvocation(arguments=[], member=available, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=needRollback, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="IOException")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TextI18n, sub_type=None))], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SC_INTERNAL_SERVER_ERROR, postfix_operators=[], prefix_operators=[], qualifier=WebdavStatus, selectors=[])], member=sendError, postfix_operators=[], prefix_operators=[], qualifier=resp, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=transaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rollback, postfix_operators=[], prefix_operators=[], qualifier=store, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServletException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SC_FORBIDDEN, postfix_operators=[], prefix_operators=[], qualifier=WebdavStatus, selectors=[])], member=sendError, postfix_operators=[], prefix_operators=[], qualifier=resp, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['UnauthenticatedException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SC_FORBIDDEN, postfix_operators=[], prefix_operators=[], qualifier=WebdavStatus, selectors=[])], member=sendError, postfix_operators=[], prefix_operators=[], qualifier=resp, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['AccessDeniedException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SC_INTERNAL_SERVER_ERROR, postfix_operators=[], prefix_operators=[], qualifier=WebdavStatus, selectors=[])], member=sendError, postfix_operators=[], prefix_operators=[], qualifier=resp, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['LockFailedException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SC_PRECONDITION_FAILED, postfix_operators=[], prefix_operators=[], qualifier=WebdavStatus, selectors=[])], member=sendError, postfix_operators=[], prefix_operators=[], qualifier=resp, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ObjectAlreadyExistsException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SC_NOT_FOUND, postfix_operators=[], prefix_operators=[], qualifier=WebdavStatus, selectors=[])], member=sendError, postfix_operators=[], prefix_operators=[], qualifier=resp, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ObjectNotFoundException'])), 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=ServletException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['WebdavException'])), CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=translate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=UnauthenticatedException, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=AccessDeniedException, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=LockFailedException, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=ObjectAlreadyExistsException, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=ObjectNotFoundException, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=WebdavException, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=t, 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=ServletException, sub_type=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=t, 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=ServletException, sub_type=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SC_NOT_FOUND, postfix_operators=[], prefix_operators=[], qualifier=WebdavStatus, selectors=[])], member=sendError, postfix_operators=[], prefix_operators=[], qualifier=resp, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SC_PRECONDITION_FAILED, postfix_operators=[], prefix_operators=[], qualifier=WebdavStatus, selectors=[])], member=sendError, postfix_operators=[], prefix_operators=[], qualifier=resp, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SC_INTERNAL_SERVER_ERROR, postfix_operators=[], prefix_operators=[], qualifier=WebdavStatus, selectors=[])], member=sendError, postfix_operators=[], prefix_operators=[], qualifier=resp, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SC_FORBIDDEN, postfix_operators=[], prefix_operators=[], qualifier=WebdavStatus, selectors=[])], member=sendError, postfix_operators=[], prefix_operators=[], qualifier=resp, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SC_FORBIDDEN, postfix_operators=[], prefix_operators=[], qualifier=WebdavStatus, selectors=[])], member=sendError, postfix_operators=[], prefix_operators=[], qualifier=resp, selectors=[], type_arguments=None), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=[IfStatement(condition=MemberReference(member=needRollback, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=transaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rollback, postfix_operators=[], prefix_operators=[], qualifier=store, selectors=[], type_arguments=None), label=None)]))], label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[service] operator[SEP] identifier[HttpServletRequest] identifier[req] , identifier[HttpServletResponse] identifier[resp] operator[SEP] Keyword[throws] identifier[ServletException] , identifier[IOException] { identifier[String] identifier[methodName] operator[=] identifier[req] operator[SEP] identifier[getMethod] operator[SEP] operator[SEP] operator[SEP] identifier[ITransaction] identifier[transaction] operator[=] Other[null] operator[SEP] Keyword[boolean] identifier[needRollback] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[LOG] operator[SEP] identifier[isTraceEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[debugRequest] operator[SEP] identifier[methodName] , identifier[req] operator[SEP] operator[SEP] } Keyword[try] { identifier[Principal] identifier[userPrincipal] operator[=] identifier[req] operator[SEP] identifier[getUserPrincipal] operator[SEP] operator[SEP] operator[SEP] identifier[transaction] operator[=] identifier[store] operator[SEP] identifier[begin] operator[SEP] identifier[userPrincipal] operator[SEP] operator[SEP] identifier[needRollback] operator[=] literal[boolean] operator[SEP] identifier[store] operator[SEP] identifier[checkAuthentication] operator[SEP] identifier[transaction] operator[SEP] operator[SEP] identifier[resp] operator[SEP] identifier[setStatus] operator[SEP] identifier[WebdavStatus] operator[SEP] identifier[SC_OK] operator[SEP] operator[SEP] Keyword[try] { identifier[IMethodExecutor] identifier[methodExecutor] operator[=] identifier[methodMap] operator[SEP] identifier[get] operator[SEP] identifier[methodName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[methodExecutor] operator[==] Other[null] operator[SEP] { identifier[methodExecutor] operator[=] identifier[methodMap] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[methodExecutor] operator[SEP] identifier[execute] operator[SEP] identifier[transaction] , identifier[req] , identifier[resp] operator[SEP] operator[SEP] identifier[store] operator[SEP] identifier[commit] operator[SEP] identifier[transaction] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[RequestUtil] operator[SEP] identifier[streamNotConsumed] operator[SEP] identifier[req] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[LOG] operator[SEP] identifier[isTraceEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[trace] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { Keyword[while] operator[SEP] identifier[req] operator[SEP] identifier[getInputStream] operator[SEP] operator[SEP] operator[SEP] identifier[available] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[req] operator[SEP] identifier[getInputStream] operator[SEP] operator[SEP] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { } } identifier[needRollback] operator[=] literal[boolean] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] identifier[e] , Keyword[new] identifier[TextI18n] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[resp] operator[SEP] identifier[sendError] operator[SEP] identifier[WebdavStatus] operator[SEP] identifier[SC_INTERNAL_SERVER_ERROR] operator[SEP] operator[SEP] identifier[store] operator[SEP] identifier[rollback] operator[SEP] identifier[transaction] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[ServletException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[UnauthenticatedException] identifier[e] operator[SEP] { identifier[resp] operator[SEP] identifier[sendError] operator[SEP] identifier[WebdavStatus] operator[SEP] identifier[SC_FORBIDDEN] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[AccessDeniedException] identifier[e] operator[SEP] { identifier[resp] operator[SEP] identifier[sendError] operator[SEP] identifier[WebdavStatus] operator[SEP] identifier[SC_FORBIDDEN] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[LockFailedException] identifier[e] operator[SEP] { identifier[resp] operator[SEP] identifier[sendError] operator[SEP] identifier[WebdavStatus] operator[SEP] identifier[SC_INTERNAL_SERVER_ERROR] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ObjectAlreadyExistsException] identifier[e] operator[SEP] { identifier[resp] operator[SEP] identifier[sendError] operator[SEP] identifier[WebdavStatus] operator[SEP] identifier[SC_PRECONDITION_FAILED] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ObjectNotFoundException] identifier[e] operator[SEP] { identifier[resp] operator[SEP] identifier[sendError] operator[SEP] identifier[WebdavStatus] operator[SEP] identifier[SC_NOT_FOUND] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[WebdavException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ServletException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { identifier[t] operator[=] identifier[translate] operator[SEP] identifier[t] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[t] Keyword[instanceof] identifier[UnauthenticatedException] operator[SEP] { identifier[resp] operator[SEP] identifier[sendError] operator[SEP] identifier[WebdavStatus] operator[SEP] identifier[SC_FORBIDDEN] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[t] Keyword[instanceof] identifier[AccessDeniedException] operator[SEP] { identifier[resp] operator[SEP] identifier[sendError] operator[SEP] identifier[WebdavStatus] operator[SEP] identifier[SC_FORBIDDEN] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[t] Keyword[instanceof] identifier[LockFailedException] operator[SEP] { identifier[resp] operator[SEP] identifier[sendError] operator[SEP] identifier[WebdavStatus] operator[SEP] identifier[SC_INTERNAL_SERVER_ERROR] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[t] Keyword[instanceof] identifier[ObjectAlreadyExistsException] operator[SEP] { identifier[resp] operator[SEP] identifier[sendError] operator[SEP] identifier[WebdavStatus] operator[SEP] identifier[SC_PRECONDITION_FAILED] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[t] Keyword[instanceof] identifier[ObjectNotFoundException] operator[SEP] { identifier[resp] operator[SEP] identifier[sendError] operator[SEP] identifier[WebdavStatus] operator[SEP] identifier[SC_NOT_FOUND] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[t] Keyword[instanceof] identifier[WebdavException] operator[SEP] { Keyword[throw] Keyword[new] identifier[ServletException] operator[SEP] identifier[t] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[ServletException] operator[SEP] identifier[t] operator[SEP] operator[SEP] } } Keyword[finally] { Keyword[if] operator[SEP] identifier[needRollback] operator[SEP] { identifier[store] operator[SEP] identifier[rollback] operator[SEP] identifier[transaction] operator[SEP] operator[SEP] } } }
protected Calendar getStartOfDayJavaCalendar (final long timeInMillis) { final Calendar startOfDay = createJavaCalendar (timeInMillis); startOfDay.set (Calendar.HOUR_OF_DAY, 0); startOfDay.set (Calendar.MINUTE, 0); startOfDay.set (Calendar.SECOND, 0); startOfDay.set (Calendar.MILLISECOND, 0); return startOfDay; }
class class_name[name] begin[{] method[getStartOfDayJavaCalendar, return_type[type[Calendar]], modifier[protected], parameter[timeInMillis]] begin[{] local_variable[type[Calendar], startOfDay] call[startOfDay.set, parameter[member[Calendar.HOUR_OF_DAY], literal[0]]] call[startOfDay.set, parameter[member[Calendar.MINUTE], literal[0]]] call[startOfDay.set, parameter[member[Calendar.SECOND], literal[0]]] call[startOfDay.set, parameter[member[Calendar.MILLISECOND], literal[0]]] return[member[.startOfDay]] end[}] END[}]
Keyword[protected] identifier[Calendar] identifier[getStartOfDayJavaCalendar] operator[SEP] Keyword[final] Keyword[long] identifier[timeInMillis] operator[SEP] { Keyword[final] identifier[Calendar] identifier[startOfDay] operator[=] identifier[createJavaCalendar] operator[SEP] identifier[timeInMillis] operator[SEP] operator[SEP] identifier[startOfDay] operator[SEP] identifier[set] operator[SEP] identifier[Calendar] operator[SEP] identifier[HOUR_OF_DAY] , Other[0] operator[SEP] operator[SEP] identifier[startOfDay] operator[SEP] identifier[set] operator[SEP] identifier[Calendar] operator[SEP] identifier[MINUTE] , Other[0] operator[SEP] operator[SEP] identifier[startOfDay] operator[SEP] identifier[set] operator[SEP] identifier[Calendar] operator[SEP] identifier[SECOND] , Other[0] operator[SEP] operator[SEP] identifier[startOfDay] operator[SEP] identifier[set] operator[SEP] identifier[Calendar] operator[SEP] identifier[MILLISECOND] , Other[0] operator[SEP] operator[SEP] Keyword[return] identifier[startOfDay] operator[SEP] }
public List<Permission> getPermissions(Principal p) { List<Permission> perms = new ArrayList<Permission>(); lur.fishAll(p, perms); return perms; }
class class_name[name] begin[{] method[getPermissions, return_type[type[List]], modifier[public], parameter[p]] begin[{] local_variable[type[List], perms] call[lur.fishAll, parameter[member[.p], member[.perms]]] return[member[.perms]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[Permission] operator[>] identifier[getPermissions] operator[SEP] identifier[Principal] identifier[p] operator[SEP] { identifier[List] operator[<] identifier[Permission] operator[>] identifier[perms] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Permission] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[lur] operator[SEP] identifier[fishAll] operator[SEP] identifier[p] , identifier[perms] operator[SEP] operator[SEP] Keyword[return] identifier[perms] operator[SEP] }
void postAdapterUpdate(UpdateOp op) { mPendingUpdates.add(op); if (mPendingUpdates.size() == 1) { if (mPostUpdatesOnAnimation && mHasFixedSize && mIsAttached) { ViewCompat.postOnAnimation(this, mUpdateChildViewsRunnable); } else { mAdapterUpdateDuringMeasure = true; requestLayout(); } } }
class class_name[name] begin[{] method[postAdapterUpdate, return_type[void], modifier[default], parameter[op]] begin[{] call[mPendingUpdates.add, parameter[member[.op]]] if[binary_operation[call[mPendingUpdates.size, parameter[]], ==, literal[1]]] begin[{] if[binary_operation[binary_operation[member[.mPostUpdatesOnAnimation], &&, member[.mHasFixedSize]], &&, member[.mIsAttached]]] begin[{] call[ViewCompat.postOnAnimation, parameter[THIS[], member[.mUpdateChildViewsRunnable]]] else begin[{] assign[member[.mAdapterUpdateDuringMeasure], literal[true]] call[.requestLayout, parameter[]] end[}] else begin[{] None end[}] end[}] END[}]
Keyword[void] identifier[postAdapterUpdate] operator[SEP] identifier[UpdateOp] identifier[op] operator[SEP] { identifier[mPendingUpdates] operator[SEP] identifier[add] operator[SEP] identifier[op] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mPendingUpdates] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[1] operator[SEP] { Keyword[if] operator[SEP] identifier[mPostUpdatesOnAnimation] operator[&&] identifier[mHasFixedSize] operator[&&] identifier[mIsAttached] operator[SEP] { identifier[ViewCompat] operator[SEP] identifier[postOnAnimation] operator[SEP] Keyword[this] , identifier[mUpdateChildViewsRunnable] operator[SEP] operator[SEP] } Keyword[else] { identifier[mAdapterUpdateDuringMeasure] operator[=] literal[boolean] operator[SEP] identifier[requestLayout] operator[SEP] operator[SEP] operator[SEP] } } }
@SuppressWarnings("unchecked") public static <K extends Comparable<K>, V> DistributedNavigableMapType<K, V> instance() { return INSTANCE; }
class class_name[name] begin[{] method[instance, return_type[type[DistributedNavigableMapType]], modifier[public static], parameter[]] begin[{] return[member[.INSTANCE]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[K] Keyword[extends] identifier[Comparable] operator[<] identifier[K] operator[>] , identifier[V] operator[>] identifier[DistributedNavigableMapType] operator[<] identifier[K] , identifier[V] operator[>] identifier[instance] operator[SEP] operator[SEP] { Keyword[return] identifier[INSTANCE] operator[SEP] }
public static File print(final UIGrid _uiGrid) { File ret = null; final String clazzName = Configuration.getAttribute(ConfigAttribute.GRIDPRINTESJP); try { UIGrid.LOG.debug("Print method executed for {}", _uiGrid); final Class<?> clazz = Class.forName(clazzName, false, EFapsClassLoader.getInstance()); final EventExecution event = (EventExecution) clazz.newInstance(); final Parameter param = new Parameter(); param.put(ParameterValues.PARAMETERS, Context.getThreadContext().getParameters()); param.put(ParameterValues.CLASS, _uiGrid); final Return retu = event.execute(param); if (retu != null) { ret = (File) retu.get(ReturnValues.VALUES); } } catch (final ClassNotFoundException | InstantiationException | IllegalAccessException e) { UIGrid.LOG.error("Catched", e); } catch (final EFapsException e) { UIGrid.LOG.error("Catched", e); } return ret; }
class class_name[name] begin[{] method[print, return_type[type[File]], modifier[public static], parameter[_uiGrid]] begin[{] local_variable[type[File], ret] local_variable[type[String], clazzName] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Print method executed for {}"), MemberReference(member=_uiGrid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=UIGrid.LOG, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=clazzName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), MethodInvocation(arguments=[], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=EFapsClassLoader, selectors=[], type_arguments=None)], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[], type_arguments=None), name=clazz)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=clazz, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=EventExecution, sub_type=None)), name=event)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=EventExecution, 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=Parameter, sub_type=None)), name=param)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Parameter, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=PARAMETERS, postfix_operators=[], prefix_operators=[], qualifier=ParameterValues, selectors=[]), MethodInvocation(arguments=[], member=getThreadContext, postfix_operators=[], prefix_operators=[], qualifier=Context, selectors=[MethodInvocation(arguments=[], member=getParameters, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=param, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=CLASS, postfix_operators=[], prefix_operators=[], qualifier=ParameterValues, selectors=[]), MemberReference(member=_uiGrid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=param, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=param, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=execute, postfix_operators=[], prefix_operators=[], qualifier=event, selectors=[], type_arguments=None), name=retu)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Return, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=retu, 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=ret, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=VALUES, postfix_operators=[], prefix_operators=[], qualifier=ReturnValues, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=retu, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Catched"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=UIGrid.LOG, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ClassNotFoundException', 'InstantiationException', 'IllegalAccessException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Catched"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=UIGrid.LOG, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['EFapsException']))], finally_block=None, label=None, resources=None) return[member[.ret]] end[}] END[}]
Keyword[public] Keyword[static] identifier[File] identifier[print] operator[SEP] Keyword[final] identifier[UIGrid] identifier[_uiGrid] operator[SEP] { identifier[File] identifier[ret] operator[=] Other[null] operator[SEP] Keyword[final] identifier[String] identifier[clazzName] operator[=] identifier[Configuration] operator[SEP] identifier[getAttribute] operator[SEP] identifier[ConfigAttribute] operator[SEP] identifier[GRIDPRINTESJP] operator[SEP] operator[SEP] Keyword[try] { identifier[UIGrid] operator[SEP] identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[_uiGrid] operator[SEP] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[=] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[clazzName] , literal[boolean] , identifier[EFapsClassLoader] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[EventExecution] identifier[event] operator[=] operator[SEP] identifier[EventExecution] operator[SEP] identifier[clazz] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Parameter] identifier[param] operator[=] Keyword[new] identifier[Parameter] operator[SEP] operator[SEP] operator[SEP] identifier[param] operator[SEP] identifier[put] operator[SEP] identifier[ParameterValues] operator[SEP] identifier[PARAMETERS] , identifier[Context] operator[SEP] identifier[getThreadContext] operator[SEP] operator[SEP] operator[SEP] identifier[getParameters] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[param] operator[SEP] identifier[put] operator[SEP] identifier[ParameterValues] operator[SEP] identifier[CLASS] , identifier[_uiGrid] operator[SEP] operator[SEP] Keyword[final] identifier[Return] identifier[retu] operator[=] identifier[event] operator[SEP] identifier[execute] operator[SEP] identifier[param] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[retu] operator[!=] Other[null] operator[SEP] { identifier[ret] operator[=] operator[SEP] identifier[File] operator[SEP] identifier[retu] operator[SEP] identifier[get] operator[SEP] identifier[ReturnValues] operator[SEP] identifier[VALUES] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] Keyword[final] identifier[ClassNotFoundException] operator[|] identifier[InstantiationException] operator[|] identifier[IllegalAccessException] identifier[e] operator[SEP] { identifier[UIGrid] operator[SEP] identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[EFapsException] identifier[e] operator[SEP] { identifier[UIGrid] operator[SEP] identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[return] identifier[ret] operator[SEP] }
public final Mono<T> timeout(Duration timeout, Mono<? extends T> fallback) { return timeout(timeout, fallback, Schedulers.parallel()); }
class class_name[name] begin[{] method[timeout, return_type[type[Mono]], modifier[final public], parameter[timeout, fallback]] begin[{] return[call[.timeout, parameter[member[.timeout], member[.fallback], call[Schedulers.parallel, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[final] identifier[Mono] operator[<] identifier[T] operator[>] identifier[timeout] operator[SEP] identifier[Duration] identifier[timeout] , identifier[Mono] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] identifier[fallback] operator[SEP] { Keyword[return] identifier[timeout] operator[SEP] identifier[timeout] , identifier[fallback] , identifier[Schedulers] operator[SEP] identifier[parallel] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private void terminateSubscriptions(IoSession session, HeapState state, String heapUri, Subscription.CloseReason reason) { Lock heapUpdateLock = null; try { if (state != null) { heapUpdateLock = state.getUpdateLock(); heapUpdateLock.lock(); } subTermLock.lock(); if (state != null) { if (!state.isTerminated()) { state.terminateSubscriptions(session, reason); if (state.getSessions().isEmpty()) { terminateSubscriptions(heapUri, reason); } } } Multiset<String> heapsForSession = heapsByClient.get(session); if (heapsForSession != null) { nioLogger.log(NioLogger.LoggingLevel.TRANSPORT, session, "Terminating subscription on %s heaps", heapsForSession.keySet().size()); heapsForSession.removeAll(heapUri); if (heapsForSession.isEmpty()) { terminateSubscriptions(session, reason); } } } finally { subTermLock.unlock(); if (heapUpdateLock != null) { heapUpdateLock.unlock(); } } }
class class_name[name] begin[{] method[terminateSubscriptions, return_type[void], modifier[private], parameter[session, state, heapUri, reason]] begin[{] local_variable[type[Lock], heapUpdateLock] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=state, 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=heapUpdateLock, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getUpdateLock, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=lock, postfix_operators=[], prefix_operators=[], qualifier=heapUpdateLock, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[], member=lock, postfix_operators=[], prefix_operators=[], qualifier=subTermLock, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=state, 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=[IfStatement(condition=MethodInvocation(arguments=[], member=isTerminated, postfix_operators=[], prefix_operators=['!'], qualifier=state, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=reason, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=terminateSubscriptions, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=getSessions, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[MethodInvocation(arguments=[], member=isEmpty, 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=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=heapUri, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=reason, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=terminateSubscriptions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]))])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=heapsByClient, selectors=[], type_arguments=None), name=heapsForSession)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=Multiset, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=heapsForSession, 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=[MemberReference(member=TRANSPORT, postfix_operators=[], prefix_operators=[], qualifier=NioLogger.LoggingLevel, selectors=[]), MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Terminating subscription on %s heaps"), MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=heapsForSession, selectors=[MethodInvocation(arguments=[], member=size, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=log, postfix_operators=[], prefix_operators=[], qualifier=nioLogger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=heapUri, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeAll, postfix_operators=[], prefix_operators=[], qualifier=heapsForSession, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=heapsForSession, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=reason, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=terminateSubscriptions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]))], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=unlock, postfix_operators=[], prefix_operators=[], qualifier=subTermLock, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=heapUpdateLock, 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=unlock, postfix_operators=[], prefix_operators=[], qualifier=heapUpdateLock, selectors=[], type_arguments=None), label=None)]))], label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[terminateSubscriptions] operator[SEP] identifier[IoSession] identifier[session] , identifier[HeapState] identifier[state] , identifier[String] identifier[heapUri] , identifier[Subscription] operator[SEP] identifier[CloseReason] identifier[reason] operator[SEP] { identifier[Lock] identifier[heapUpdateLock] operator[=] Other[null] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[state] operator[!=] Other[null] operator[SEP] { identifier[heapUpdateLock] operator[=] identifier[state] operator[SEP] identifier[getUpdateLock] operator[SEP] operator[SEP] operator[SEP] identifier[heapUpdateLock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] } identifier[subTermLock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[state] operator[SEP] identifier[isTerminated] operator[SEP] operator[SEP] operator[SEP] { identifier[state] operator[SEP] identifier[terminateSubscriptions] operator[SEP] identifier[session] , identifier[reason] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[getSessions] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[terminateSubscriptions] operator[SEP] identifier[heapUri] , identifier[reason] operator[SEP] operator[SEP] } } } identifier[Multiset] operator[<] identifier[String] operator[>] identifier[heapsForSession] operator[=] identifier[heapsByClient] operator[SEP] identifier[get] operator[SEP] identifier[session] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[heapsForSession] operator[!=] Other[null] operator[SEP] { identifier[nioLogger] operator[SEP] identifier[log] operator[SEP] identifier[NioLogger] operator[SEP] identifier[LoggingLevel] operator[SEP] identifier[TRANSPORT] , identifier[session] , literal[String] , identifier[heapsForSession] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[heapsForSession] operator[SEP] identifier[removeAll] operator[SEP] identifier[heapUri] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[heapsForSession] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[terminateSubscriptions] operator[SEP] identifier[session] , identifier[reason] operator[SEP] operator[SEP] } } } Keyword[finally] { identifier[subTermLock] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[heapUpdateLock] operator[!=] Other[null] operator[SEP] { identifier[heapUpdateLock] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP] } } }
@Override public void warn(String msg) { logger.log(FQCN, Level.WARN, msg, null); }
class class_name[name] begin[{] method[warn, return_type[void], modifier[public], parameter[msg]] begin[{] call[logger.log, parameter[member[.FQCN], member[Level.WARN], member[.msg], literal[null]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[warn] operator[SEP] identifier[String] identifier[msg] operator[SEP] { identifier[logger] operator[SEP] identifier[log] operator[SEP] identifier[FQCN] , identifier[Level] operator[SEP] identifier[WARN] , identifier[msg] , Other[null] operator[SEP] operator[SEP] }
public JSONObject toJSON(Constraint o) throws JSONConverterException { ConstraintConverter c = java2json.get(o.getClass()); if (c == null) { throw new JSONConverterException("No converter available for a constraint with the '" + o.getClass() + "' className"); } return c.toJSON(o); }
class class_name[name] begin[{] method[toJSON, return_type[type[JSONObject]], modifier[public], parameter[o]] begin[{] local_variable[type[ConstraintConverter], c] if[binary_operation[member[.c], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No converter available for a constraint with the '"), operandr=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' className"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JSONConverterException, sub_type=None)), label=None) else begin[{] None end[}] return[call[c.toJSON, parameter[member[.o]]]] end[}] END[}]
Keyword[public] identifier[JSONObject] identifier[toJSON] operator[SEP] identifier[Constraint] identifier[o] operator[SEP] Keyword[throws] identifier[JSONConverterException] { identifier[ConstraintConverter] identifier[c] operator[=] identifier[java2json] operator[SEP] identifier[get] operator[SEP] identifier[o] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[JSONConverterException] operator[SEP] literal[String] operator[+] identifier[o] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[c] operator[SEP] identifier[toJSON] operator[SEP] identifier[o] operator[SEP] operator[SEP] }
public static Type resolveType(Type targetType, Type rootType) { Type resolvedType; if (targetType instanceof ParameterizedType && rootType instanceof ParameterizedType) { ParameterizedType parameterizedType = (ParameterizedType) targetType; resolvedType = resolveType((Class<?>) parameterizedType.getRawType(), parameterizedType.getActualTypeArguments(), getTypeClass(rootType)); } else { resolvedType = resolveType(getTypeClass(rootType), null, getTypeClass(targetType)); } return resolvedType; }
class class_name[name] begin[{] method[resolveType, return_type[type[Type]], modifier[public static], parameter[targetType, rootType]] begin[{] local_variable[type[Type], resolvedType] if[binary_operation[binary_operation[member[.targetType], instanceof, type[ParameterizedType]], &&, binary_operation[member[.rootType], instanceof, type[ParameterizedType]]]] begin[{] local_variable[type[ParameterizedType], parameterizedType] assign[member[.resolvedType], call[.resolveType, parameter[Cast(expression=MethodInvocation(arguments=[], member=getRawType, postfix_operators=[], prefix_operators=[], qualifier=parameterizedType, selectors=[], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None)), call[parameterizedType.getActualTypeArguments, parameter[]], call[.getTypeClass, parameter[member[.rootType]]]]]] else begin[{] assign[member[.resolvedType], call[.resolveType, parameter[call[.getTypeClass, parameter[member[.rootType]]], literal[null], call[.getTypeClass, parameter[member[.targetType]]]]]] end[}] return[member[.resolvedType]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Type] identifier[resolveType] operator[SEP] identifier[Type] identifier[targetType] , identifier[Type] identifier[rootType] operator[SEP] { identifier[Type] identifier[resolvedType] operator[SEP] Keyword[if] operator[SEP] identifier[targetType] Keyword[instanceof] identifier[ParameterizedType] operator[&&] identifier[rootType] Keyword[instanceof] identifier[ParameterizedType] operator[SEP] { identifier[ParameterizedType] identifier[parameterizedType] operator[=] operator[SEP] identifier[ParameterizedType] operator[SEP] identifier[targetType] operator[SEP] identifier[resolvedType] operator[=] identifier[resolveType] operator[SEP] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] operator[SEP] identifier[parameterizedType] operator[SEP] identifier[getRawType] operator[SEP] operator[SEP] , identifier[parameterizedType] operator[SEP] identifier[getActualTypeArguments] operator[SEP] operator[SEP] , identifier[getTypeClass] operator[SEP] identifier[rootType] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[resolvedType] operator[=] identifier[resolveType] operator[SEP] identifier[getTypeClass] operator[SEP] identifier[rootType] operator[SEP] , Other[null] , identifier[getTypeClass] operator[SEP] identifier[targetType] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[resolvedType] operator[SEP] }
public String getTrendingQuery(String sprintStartDate, String sprintEndDate, String sprintDeltaDate, String queryName) { ST st = (new STGroupDir(featureSettings.getQueryFolder(), '$', '$')).getInstanceOf(queryName); st.add("sprintStartDate", sprintStartDate); st.add("sprintEndDate", sprintEndDate); st.add("sprintDeltaDate", sprintDeltaDate); return st.render(); }
class class_name[name] begin[{] method[getTrendingQuery, return_type[type[String]], modifier[public], parameter[sprintStartDate, sprintEndDate, sprintDeltaDate, queryName]] begin[{] local_variable[type[ST], st] call[st.add, parameter[literal["sprintStartDate"], member[.sprintStartDate]]] call[st.add, parameter[literal["sprintEndDate"], member[.sprintEndDate]]] call[st.add, parameter[literal["sprintDeltaDate"], member[.sprintDeltaDate]]] return[call[st.render, parameter[]]] end[}] END[}]
Keyword[public] identifier[String] identifier[getTrendingQuery] operator[SEP] identifier[String] identifier[sprintStartDate] , identifier[String] identifier[sprintEndDate] , identifier[String] identifier[sprintDeltaDate] , identifier[String] identifier[queryName] operator[SEP] { identifier[ST] identifier[st] operator[=] operator[SEP] Keyword[new] identifier[STGroupDir] operator[SEP] identifier[featureSettings] operator[SEP] identifier[getQueryFolder] operator[SEP] operator[SEP] , literal[String] , literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[getInstanceOf] operator[SEP] identifier[queryName] operator[SEP] operator[SEP] identifier[st] operator[SEP] identifier[add] operator[SEP] literal[String] , identifier[sprintStartDate] operator[SEP] operator[SEP] identifier[st] operator[SEP] identifier[add] operator[SEP] literal[String] , identifier[sprintEndDate] operator[SEP] operator[SEP] identifier[st] operator[SEP] identifier[add] operator[SEP] literal[String] , identifier[sprintDeltaDate] operator[SEP] operator[SEP] Keyword[return] identifier[st] operator[SEP] identifier[render] operator[SEP] operator[SEP] operator[SEP] }
public static void showPanel(final View panelLayout) { final Activity activity = (Activity) panelLayout.getContext(); panelLayout.setVisibility(View.VISIBLE); if (activity.getCurrentFocus() != null) { KeyboardUtil.hideKeyboard(activity.getCurrentFocus()); } }
class class_name[name] begin[{] method[showPanel, return_type[void], modifier[public static], parameter[panelLayout]] begin[{] local_variable[type[Activity], activity] call[panelLayout.setVisibility, parameter[member[View.VISIBLE]]] if[binary_operation[call[activity.getCurrentFocus, parameter[]], !=, literal[null]]] begin[{] call[KeyboardUtil.hideKeyboard, parameter[call[activity.getCurrentFocus, parameter[]]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[showPanel] operator[SEP] Keyword[final] identifier[View] identifier[panelLayout] operator[SEP] { Keyword[final] identifier[Activity] identifier[activity] operator[=] operator[SEP] identifier[Activity] operator[SEP] identifier[panelLayout] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] identifier[panelLayout] operator[SEP] identifier[setVisibility] operator[SEP] identifier[View] operator[SEP] identifier[VISIBLE] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[activity] operator[SEP] identifier[getCurrentFocus] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[KeyboardUtil] operator[SEP] identifier[hideKeyboard] operator[SEP] identifier[activity] operator[SEP] identifier[getCurrentFocus] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public String beginReplaceContent(String resourceGroupName, String automationAccountName, String runbookName, String runbookContent) { return beginReplaceContentWithServiceResponseAsync(resourceGroupName, automationAccountName, runbookName, runbookContent).toBlocking().single().body(); }
class class_name[name] begin[{] method[beginReplaceContent, return_type[type[String]], modifier[public], parameter[resourceGroupName, automationAccountName, runbookName, runbookContent]] begin[{] return[call[.beginReplaceContentWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.automationAccountName], member[.runbookName], member[.runbookContent]]]] end[}] END[}]
Keyword[public] identifier[String] identifier[beginReplaceContent] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[automationAccountName] , identifier[String] identifier[runbookName] , identifier[String] identifier[runbookContent] operator[SEP] { Keyword[return] identifier[beginReplaceContentWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[automationAccountName] , identifier[runbookName] , identifier[runbookContent] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[single] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] }
private void setRWPermissions(File f) { if (!f.setReadable(true, false) || !f.setWritable(true, false)) { LOG.info("Could not set permissions for file : " + f + " probably because user : " + System.getProperty("user.name") + " is not the owner"); } }
class class_name[name] begin[{] method[setRWPermissions, return_type[void], modifier[private], parameter[f]] begin[{] if[binary_operation[call[f.setReadable, parameter[literal[true], literal[false]]], ||, call[f.setWritable, parameter[literal[true], literal[false]]]]] begin[{] call[LOG.info, parameter[binary_operation[binary_operation[binary_operation[binary_operation[literal["Could not set permissions for file : "], +, member[.f]], +, literal[" probably because user : "]], +, call[System.getProperty, parameter[literal["user.name"]]]], +, literal[" is not the owner"]]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[setRWPermissions] operator[SEP] identifier[File] identifier[f] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[f] operator[SEP] identifier[setReadable] operator[SEP] literal[boolean] , literal[boolean] operator[SEP] operator[||] operator[!] identifier[f] operator[SEP] identifier[setWritable] operator[SEP] literal[boolean] , literal[boolean] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[f] operator[+] literal[String] operator[+] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } }
public WebSocket connectAsynchronously() { Thread thread = new ConnectThread(this); // Get the reference (just in case) ListenerManager lm = mListenerManager; if (lm != null) { lm.callOnThreadCreated(ThreadType.CONNECT_THREAD, thread); } thread.start(); return this; }
class class_name[name] begin[{] method[connectAsynchronously, return_type[type[WebSocket]], modifier[public], parameter[]] begin[{] local_variable[type[Thread], thread] local_variable[type[ListenerManager], lm] if[binary_operation[member[.lm], !=, literal[null]]] begin[{] call[lm.callOnThreadCreated, parameter[member[ThreadType.CONNECT_THREAD], member[.thread]]] else begin[{] None end[}] call[thread.start, parameter[]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[WebSocket] identifier[connectAsynchronously] operator[SEP] operator[SEP] { identifier[Thread] identifier[thread] operator[=] Keyword[new] identifier[ConnectThread] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[ListenerManager] identifier[lm] operator[=] identifier[mListenerManager] operator[SEP] Keyword[if] operator[SEP] identifier[lm] operator[!=] Other[null] operator[SEP] { identifier[lm] operator[SEP] identifier[callOnThreadCreated] operator[SEP] identifier[ThreadType] operator[SEP] identifier[CONNECT_THREAD] , identifier[thread] operator[SEP] operator[SEP] } identifier[thread] operator[SEP] identifier[start] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public static <T> CloseableIterable<T> limit(final CloseableIterable<T> iterable, final int limitSize) { return wrap(Iterables.limit(iterable, limitSize), iterable); }
class class_name[name] begin[{] method[limit, return_type[type[CloseableIterable]], modifier[public static], parameter[iterable, limitSize]] begin[{] return[call[.wrap, parameter[call[Iterables.limit, parameter[member[.iterable], member[.limitSize]]], member[.iterable]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[CloseableIterable] operator[<] identifier[T] operator[>] identifier[limit] operator[SEP] Keyword[final] identifier[CloseableIterable] operator[<] identifier[T] operator[>] identifier[iterable] , Keyword[final] Keyword[int] identifier[limitSize] operator[SEP] { Keyword[return] identifier[wrap] operator[SEP] identifier[Iterables] operator[SEP] identifier[limit] operator[SEP] identifier[iterable] , identifier[limitSize] operator[SEP] , identifier[iterable] operator[SEP] operator[SEP] }
public static base_response sign(nitro_service client, dnszone resource) throws Exception { dnszone signresource = new dnszone(); signresource.zonename = resource.zonename; signresource.keyname = resource.keyname; return signresource.perform_operation(client,"sign"); }
class class_name[name] begin[{] method[sign, return_type[type[base_response]], modifier[public static], parameter[client, resource]] begin[{] local_variable[type[dnszone], signresource] assign[member[signresource.zonename], member[resource.zonename]] assign[member[signresource.keyname], member[resource.keyname]] return[call[signresource.perform_operation, parameter[member[.client], literal["sign"]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[base_response] identifier[sign] operator[SEP] identifier[nitro_service] identifier[client] , identifier[dnszone] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] { identifier[dnszone] identifier[signresource] operator[=] Keyword[new] identifier[dnszone] operator[SEP] operator[SEP] operator[SEP] identifier[signresource] operator[SEP] identifier[zonename] operator[=] identifier[resource] operator[SEP] identifier[zonename] operator[SEP] identifier[signresource] operator[SEP] identifier[keyname] operator[=] identifier[resource] operator[SEP] identifier[keyname] operator[SEP] Keyword[return] identifier[signresource] operator[SEP] identifier[perform_operation] operator[SEP] identifier[client] , literal[String] operator[SEP] operator[SEP] }