code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public void performOptimizedRead(byte[] handle, long length, int blocksize, java.io.OutputStream out, int outstandingRequests, FileTransferProgress progress) throws SftpStatusException, SshException, TransferCancelledException { performOptimizedRead(handle, length, blocksize, out, outstandingRequests, progress, 0); }
class class_name[name] begin[{] method[performOptimizedRead, return_type[void], modifier[public], parameter[handle, length, blocksize, out, outstandingRequests, progress]] begin[{] call[.performOptimizedRead, parameter[member[.handle], member[.length], member[.blocksize], member[.out], member[.outstandingRequests], member[.progress], literal[0]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[performOptimizedRead] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[handle] , Keyword[long] identifier[length] , Keyword[int] identifier[blocksize] , identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[OutputStream] identifier[out] , Keyword[int] identifier[outstandingRequests] , identifier[FileTransferProgress] identifier[progress] operator[SEP] Keyword[throws] identifier[SftpStatusException] , identifier[SshException] , identifier[TransferCancelledException] { identifier[performOptimizedRead] operator[SEP] identifier[handle] , identifier[length] , identifier[blocksize] , identifier[out] , identifier[outstandingRequests] , identifier[progress] , Other[0] operator[SEP] operator[SEP] }
AtomSymbol generatePseudoSymbol(String label, HydrogenPosition position) { final Font italicFont = font.deriveFont(Font.BOLD) .deriveFont(Font.ITALIC); List<TextOutline> outlines = new ArrayList<>(3); int beg = 0; int pos = 0; int len = label.length(); // upper case followed by lower case while (pos < len && isUpperCase(label.charAt(pos))) pos++; if (label.charAt(0) != 'R') // Ar is not A^r but 'Ra' is R^a etc while (pos < len && isLowerCase(label.charAt(pos))) pos++; if (pos > beg) { outlines.add(new TextOutline(label.substring(beg, pos), italicFont)); beg = pos; // 2a etc. while (pos < len && isDigit(label.charAt(pos))) pos++; while (pos < len && isLowerCase(label.charAt(pos))) pos++; if (pos > beg) { TextOutline outline = new TextOutline(label.substring(beg, pos), italicFont); outline = outline.resize(scriptSize, scriptSize); outline = positionSuperscript(outlines.get(0), outline); outlines.add(outline); } int numPrimes = 0; PRIMES: while (pos < len) { switch (label.charAt(pos)) { case '\'': numPrimes++; break; case '`': numPrimes++; break; case '‘': numPrimes++; break; case '’': numPrimes++; break; case '‛': numPrimes++; break; case '“': numPrimes+=2; break; case '”': numPrimes+=2; break; case '′': numPrimes++; break; case '″': numPrimes+=2; break; case '‴': numPrimes+=3; break; case '⁗': numPrimes+=4; break; case '‵': numPrimes++; break; case '‶': numPrimes+=2; break; case '‷': numPrimes+=3; break; case '´': numPrimes++; break; case 'ˊ': numPrimes++; break; case '́': numPrimes++; break; case '˝': numPrimes+=2; break; case '̋': numPrimes+=2; break; default: break PRIMES; } pos++; } if (pos < len) { return new AtomSymbol(new TextOutline(label, italicFont), Collections.<TextOutline>emptyList()); } else { TextOutline outline = null; TextOutline ref = outlines.get(outlines.size()-1); switch (numPrimes) { case 0: break; case 1: outline = new TextOutline("′", font); break; case 2: outline = new TextOutline("″", font); break; case 3: outline = new TextOutline("‴", font); break; default: String lab = ""; while (numPrimes-->0) lab += "′"; outline = new TextOutline(lab, font); break; } if (outline != null) { if (outlines.size() > 1) outline = outline.resize(scriptSize, scriptSize); outline = positionSuperscript(ref, outline); outlines.add(outline); } } // line up text for (int i = 1; i < outlines.size(); i++) { TextOutline ref = outlines.get(i - 1); TextOutline curr = outlines.get(i); outlines.set(i, positionAfter(ref, curr)); } return new AtomSymbol(outlines.get(0), outlines.subList(1, outlines.size())); } else { return new AtomSymbol(new TextOutline(label, italicFont), Collections.<TextOutline>emptyList()); } }
class class_name[name] begin[{] method[generatePseudoSymbol, return_type[type[AtomSymbol]], modifier[default], parameter[label, position]] begin[{] local_variable[type[Font], italicFont] local_variable[type[List], outlines] local_variable[type[int], beg] local_variable[type[int], pos] local_variable[type[int], len] while[binary_operation[binary_operation[member[.pos], <, member[.len]], &&, call[.isUpperCase, parameter[call[label.charAt, parameter[member[.pos]]]]]]] begin[{] member[.pos] end[}] if[binary_operation[call[label.charAt, parameter[literal[0]]], !=, literal['R']]] begin[{] while[binary_operation[binary_operation[member[.pos], <, member[.len]], &&, call[.isLowerCase, parameter[call[label.charAt, parameter[member[.pos]]]]]]] begin[{] member[.pos] end[}] else begin[{] None end[}] if[binary_operation[member[.pos], >, member[.beg]]] begin[{] call[outlines.add, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=beg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=label, selectors=[], type_arguments=None), MemberReference(member=italicFont, 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=TextOutline, sub_type=None))]] assign[member[.beg], member[.pos]] while[binary_operation[binary_operation[member[.pos], <, member[.len]], &&, call[.isDigit, parameter[call[label.charAt, parameter[member[.pos]]]]]]] begin[{] member[.pos] end[}] while[binary_operation[binary_operation[member[.pos], <, member[.len]], &&, call[.isLowerCase, parameter[call[label.charAt, parameter[member[.pos]]]]]]] begin[{] member[.pos] end[}] if[binary_operation[member[.pos], >, member[.beg]]] begin[{] local_variable[type[TextOutline], outline] assign[member[.outline], call[outline.resize, parameter[member[.scriptSize], member[.scriptSize]]]] assign[member[.outline], call[.positionSuperscript, parameter[call[outlines.get, parameter[literal[0]]], member[.outline]]]] call[outlines.add, parameter[member[.outline]]] else begin[{] None end[}] local_variable[type[int], numPrimes] while[binary_operation[member[.pos], <, member[.len]]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\'')], statements=[StatementExpression(expression=MemberReference(member=numPrimes, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='`')], statements=[StatementExpression(expression=MemberReference(member=numPrimes, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='‘')], statements=[StatementExpression(expression=MemberReference(member=numPrimes, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='’')], statements=[StatementExpression(expression=MemberReference(member=numPrimes, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='‛')], statements=[StatementExpression(expression=MemberReference(member=numPrimes, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='“')], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=numPrimes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='”')], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=numPrimes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='′')], statements=[StatementExpression(expression=MemberReference(member=numPrimes, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='″')], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=numPrimes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='‴')], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=numPrimes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='⁗')], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=numPrimes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='‵')], statements=[StatementExpression(expression=MemberReference(member=numPrimes, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='‶')], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=numPrimes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='‷')], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=numPrimes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='´')], statements=[StatementExpression(expression=MemberReference(member=numPrimes, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='ˊ')], statements=[StatementExpression(expression=MemberReference(member=numPrimes, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='́')], statements=[StatementExpression(expression=MemberReference(member=numPrimes, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='˝')], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=numPrimes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='̋')], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=numPrimes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=PRIMES, label=None)])], expression=MethodInvocation(arguments=[MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=label, selectors=[], type_arguments=None), label=None) member[.pos] end[}] if[binary_operation[member[.pos], <, member[.len]]] begin[{] return[ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=label, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=italicFont, 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=TextOutline, sub_type=None)), MethodInvocation(arguments=[], member=Collections, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=TextOutline, sub_type=None))])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AtomSymbol, sub_type=None))] else begin[{] local_variable[type[TextOutline], outline] local_variable[type[TextOutline], ref] SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], statements=[BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=outline, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="′"), MemberReference(member=font, 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=TextOutline, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=outline, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="″"), MemberReference(member=font, 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=TextOutline, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=outline, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="‴"), MemberReference(member=font, 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=TextOutline, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), name=lab)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), WhileStatement(body=StatementExpression(expression=Assignment(expressionl=MemberReference(member=lab, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="′")), label=None), condition=BinaryOperation(operandl=MemberReference(member=numPrimes, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=outline, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=lab, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=font, 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=TextOutline, sub_type=None))), label=None), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=numPrimes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) if[binary_operation[member[.outline], !=, literal[null]]] begin[{] if[binary_operation[call[outlines.size, parameter[]], >, literal[1]]] begin[{] assign[member[.outline], call[outline.resize, parameter[member[.scriptSize], member[.scriptSize]]]] else begin[{] None end[}] assign[member[.outline], call[.positionSuperscript, parameter[member[.ref], member[.outline]]]] call[outlines.add, parameter[member[.outline]]] else begin[{] None end[}] end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=get, postfix_operators=[], prefix_operators=[], qualifier=outlines, selectors=[], type_arguments=None), name=ref)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TextOutline, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=outlines, selectors=[], type_arguments=None), name=curr)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TextOutline, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=ref, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=curr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=positionAfter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=set, postfix_operators=[], prefix_operators=[], qualifier=outlines, 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=outlines, selectors=[], type_arguments=None), 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) return[ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=outlines, selectors=[], type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=outlines, selectors=[], type_arguments=None)], member=subList, postfix_operators=[], prefix_operators=[], qualifier=outlines, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AtomSymbol, sub_type=None))] else begin[{] return[ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=label, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=italicFont, 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=TextOutline, sub_type=None)), MethodInvocation(arguments=[], member=Collections, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=TextOutline, sub_type=None))])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AtomSymbol, sub_type=None))] end[}] end[}] END[}]
identifier[AtomSymbol] identifier[generatePseudoSymbol] operator[SEP] identifier[String] identifier[label] , identifier[HydrogenPosition] identifier[position] operator[SEP] { Keyword[final] identifier[Font] identifier[italicFont] operator[=] identifier[font] operator[SEP] identifier[deriveFont] operator[SEP] identifier[Font] operator[SEP] identifier[BOLD] operator[SEP] operator[SEP] identifier[deriveFont] operator[SEP] identifier[Font] operator[SEP] identifier[ITALIC] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[TextOutline] operator[>] identifier[outlines] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[int] identifier[beg] operator[=] Other[0] operator[SEP] Keyword[int] identifier[pos] operator[=] Other[0] operator[SEP] Keyword[int] identifier[len] operator[=] identifier[label] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[pos] operator[<] identifier[len] operator[&&] identifier[isUpperCase] operator[SEP] identifier[label] operator[SEP] identifier[charAt] operator[SEP] identifier[pos] operator[SEP] operator[SEP] operator[SEP] identifier[pos] operator[++] operator[SEP] Keyword[if] operator[SEP] identifier[label] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[!=] literal[String] operator[SEP] Keyword[while] operator[SEP] identifier[pos] operator[<] identifier[len] operator[&&] identifier[isLowerCase] operator[SEP] identifier[label] operator[SEP] identifier[charAt] operator[SEP] identifier[pos] operator[SEP] operator[SEP] operator[SEP] identifier[pos] operator[++] operator[SEP] Keyword[if] operator[SEP] identifier[pos] operator[>] identifier[beg] operator[SEP] { identifier[outlines] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[TextOutline] operator[SEP] identifier[label] operator[SEP] identifier[substring] operator[SEP] identifier[beg] , identifier[pos] operator[SEP] , identifier[italicFont] operator[SEP] operator[SEP] operator[SEP] identifier[beg] operator[=] identifier[pos] operator[SEP] Keyword[while] operator[SEP] identifier[pos] operator[<] identifier[len] operator[&&] identifier[isDigit] operator[SEP] identifier[label] operator[SEP] identifier[charAt] operator[SEP] identifier[pos] operator[SEP] operator[SEP] operator[SEP] identifier[pos] operator[++] operator[SEP] Keyword[while] operator[SEP] identifier[pos] operator[<] identifier[len] operator[&&] identifier[isLowerCase] operator[SEP] identifier[label] operator[SEP] identifier[charAt] operator[SEP] identifier[pos] operator[SEP] operator[SEP] operator[SEP] identifier[pos] operator[++] operator[SEP] Keyword[if] operator[SEP] identifier[pos] operator[>] identifier[beg] operator[SEP] { identifier[TextOutline] identifier[outline] operator[=] Keyword[new] identifier[TextOutline] operator[SEP] identifier[label] operator[SEP] identifier[substring] operator[SEP] identifier[beg] , identifier[pos] operator[SEP] , identifier[italicFont] operator[SEP] operator[SEP] identifier[outline] operator[=] identifier[outline] operator[SEP] identifier[resize] operator[SEP] identifier[scriptSize] , identifier[scriptSize] operator[SEP] operator[SEP] identifier[outline] operator[=] identifier[positionSuperscript] operator[SEP] identifier[outlines] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] , identifier[outline] operator[SEP] operator[SEP] identifier[outlines] operator[SEP] identifier[add] operator[SEP] identifier[outline] operator[SEP] operator[SEP] } Keyword[int] identifier[numPrimes] operator[=] Other[0] operator[SEP] identifier[PRIMES] operator[:] Keyword[while] operator[SEP] identifier[pos] operator[<] identifier[len] operator[SEP] { Keyword[switch] operator[SEP] identifier[label] operator[SEP] identifier[charAt] operator[SEP] identifier[pos] operator[SEP] operator[SEP] { Keyword[case] literal[String] operator[:] identifier[numPrimes] operator[++] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[numPrimes] operator[++] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[numPrimes] operator[++] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[numPrimes] operator[++] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[numPrimes] operator[++] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[numPrimes] operator[+=] Other[2] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[numPrimes] operator[+=] Other[2] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[numPrimes] operator[++] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[numPrimes] operator[+=] Other[2] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[numPrimes] operator[+=] Other[3] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[numPrimes] operator[+=] Other[4] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[numPrimes] operator[++] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[numPrimes] operator[+=] Other[2] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[numPrimes] operator[+=] Other[3] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[numPrimes] operator[++] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[numPrimes] operator[++] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[numPrimes] operator[++] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[numPrimes] operator[+=] Other[2] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[numPrimes] operator[+=] Other[2] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[break] identifier[PRIMES] operator[SEP] } identifier[pos] operator[++] operator[SEP] } Keyword[if] operator[SEP] identifier[pos] operator[<] identifier[len] operator[SEP] { Keyword[return] Keyword[new] identifier[AtomSymbol] operator[SEP] Keyword[new] identifier[TextOutline] operator[SEP] identifier[label] , identifier[italicFont] operator[SEP] , identifier[Collections] operator[SEP] operator[<] identifier[TextOutline] operator[>] identifier[emptyList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[TextOutline] identifier[outline] operator[=] Other[null] operator[SEP] identifier[TextOutline] identifier[ref] operator[=] identifier[outlines] operator[SEP] identifier[get] operator[SEP] identifier[outlines] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[numPrimes] operator[SEP] { Keyword[case] Other[0] operator[:] Keyword[break] operator[SEP] Keyword[case] Other[1] operator[:] identifier[outline] operator[=] Keyword[new] identifier[TextOutline] operator[SEP] literal[String] , identifier[font] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] Other[2] operator[:] identifier[outline] operator[=] Keyword[new] identifier[TextOutline] operator[SEP] literal[String] , identifier[font] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] Other[3] operator[:] identifier[outline] operator[=] Keyword[new] identifier[TextOutline] operator[SEP] literal[String] , identifier[font] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] identifier[String] identifier[lab] operator[=] literal[String] operator[SEP] Keyword[while] operator[SEP] identifier[numPrimes] operator[--] operator[>] Other[0] operator[SEP] identifier[lab] operator[+=] literal[String] operator[SEP] identifier[outline] operator[=] Keyword[new] identifier[TextOutline] operator[SEP] identifier[lab] , identifier[font] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } Keyword[if] operator[SEP] identifier[outline] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[outlines] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[1] operator[SEP] identifier[outline] operator[=] identifier[outline] operator[SEP] identifier[resize] operator[SEP] identifier[scriptSize] , identifier[scriptSize] operator[SEP] operator[SEP] identifier[outline] operator[=] identifier[positionSuperscript] operator[SEP] identifier[ref] , identifier[outline] operator[SEP] operator[SEP] identifier[outlines] operator[SEP] identifier[add] operator[SEP] identifier[outline] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[1] operator[SEP] identifier[i] operator[<] identifier[outlines] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[TextOutline] identifier[ref] operator[=] identifier[outlines] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[-] Other[1] operator[SEP] operator[SEP] identifier[TextOutline] identifier[curr] operator[=] identifier[outlines] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[outlines] operator[SEP] identifier[set] operator[SEP] identifier[i] , identifier[positionAfter] operator[SEP] identifier[ref] , identifier[curr] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[AtomSymbol] operator[SEP] identifier[outlines] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] , identifier[outlines] operator[SEP] identifier[subList] operator[SEP] Other[1] , identifier[outlines] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Keyword[new] identifier[AtomSymbol] operator[SEP] Keyword[new] identifier[TextOutline] operator[SEP] identifier[label] , identifier[italicFont] operator[SEP] , identifier[Collections] operator[SEP] operator[<] identifier[TextOutline] operator[>] identifier[emptyList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
@Sensitive public static String getHeader(HttpServletRequest req, String key) { HttpServletRequest sr = getWrappedServletRequestObject(req); return sr.getHeader(key); }
class class_name[name] begin[{] method[getHeader, return_type[type[String]], modifier[public static], parameter[req, key]] begin[{] local_variable[type[HttpServletRequest], sr] return[call[sr.getHeader, parameter[member[.key]]]] end[}] END[}]
annotation[@] identifier[Sensitive] Keyword[public] Keyword[static] identifier[String] identifier[getHeader] operator[SEP] identifier[HttpServletRequest] identifier[req] , identifier[String] identifier[key] operator[SEP] { identifier[HttpServletRequest] identifier[sr] operator[=] identifier[getWrappedServletRequestObject] operator[SEP] identifier[req] operator[SEP] operator[SEP] Keyword[return] identifier[sr] operator[SEP] identifier[getHeader] operator[SEP] identifier[key] operator[SEP] operator[SEP] }
@Override public UploadLayerPartResult uploadLayerPart(UploadLayerPartRequest request) { request = beforeClientExecution(request); return executeUploadLayerPart(request); }
class class_name[name] begin[{] method[uploadLayerPart, return_type[type[UploadLayerPartResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeUploadLayerPart, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[UploadLayerPartResult] identifier[uploadLayerPart] operator[SEP] identifier[UploadLayerPartRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeUploadLayerPart] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public static double computeTauGammaAndDivide(final int start, final int stop, final double[] x, final double max, Complex_F64 tau) { int index = start*2; double nx = 0; for (int i = start; i < stop; i++) { double realX = x[index++] /= max; double imagX = x[index++] /= max; nx += realX * realX + imagX * imagX; } nx = Math.sqrt(nx); double real_x0 = x[2*start]; double imag_x0 = x[2*start+1]; double mag_x0 = Math.sqrt(real_x0*real_x0 + imag_x0*imag_x0); // TODO Could stability be improved by computing theta so that this // special case doesn't need to be handled? if( mag_x0 == 0 ) { tau.real = nx; tau.imaginary = 0; } else { tau.real = real_x0 / mag_x0 * nx; tau.imaginary = imag_x0 / mag_x0 * nx; } double top,bottom; // if there is a chance they can cancel swap the sign // TODO not sure if this is right... double m0 = mag(real_x0+tau.real , imag_x0+tau.imaginary); double m1 = mag(real_x0-tau.real , imag_x0-tau.imaginary); // if ( real_x0*tau.real<0) { // This is the previous rule until the m0 m1 code came into play if ( m1 > m0 ) { tau.real = -tau.real; tau.imaginary = -tau.imaginary; top = nx * nx - nx *mag_x0; bottom = mag_x0*mag_x0 - 2.0* nx *mag_x0 + nx * nx; } else { top = nx * nx + nx *mag_x0; bottom = mag_x0*mag_x0 + 2.0* nx *mag_x0 + nx * nx; } return bottom/top; // gamma }
class class_name[name] begin[{] method[computeTauGammaAndDivide, return_type[type[double]], modifier[public static], parameter[start, stop, x, max, tau]] begin[{] local_variable[type[int], index] local_variable[type[double], nx] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Assignment(expressionl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=index, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]))]), type=/=, value=MemberReference(member=max, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), name=realX)], modifiers=set(), type=BasicType(dimensions=[], name=double)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Assignment(expressionl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=index, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]))]), type=/=, value=MemberReference(member=max, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), name=imagX)], modifiers=set(), type=BasicType(dimensions=[], name=double)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=nx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=realX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=realX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=BinaryOperation(operandl=MemberReference(member=imagX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=imagX, 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=stop, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) assign[member[.nx], call[Math.sqrt, parameter[member[.nx]]]] local_variable[type[double], real_x0] local_variable[type[double], imag_x0] local_variable[type[double], mag_x0] if[binary_operation[member[.mag_x0], ==, literal[0]]] begin[{] assign[member[tau.real], member[.nx]] assign[member[tau.imaginary], literal[0]] else begin[{] assign[member[tau.real], binary_operation[binary_operation[member[.real_x0], /, member[.mag_x0]], *, member[.nx]]] assign[member[tau.imaginary], binary_operation[binary_operation[member[.imag_x0], /, member[.mag_x0]], *, member[.nx]]] end[}] local_variable[type[double], top] local_variable[type[double], m0] local_variable[type[double], m1] if[binary_operation[member[.m1], >, member[.m0]]] begin[{] assign[member[tau.real], member[tau.real]] assign[member[tau.imaginary], member[tau.imaginary]] assign[member[.top], binary_operation[binary_operation[member[.nx], *, member[.nx]], -, binary_operation[member[.nx], *, member[.mag_x0]]]] assign[member[.bottom], binary_operation[binary_operation[binary_operation[member[.mag_x0], *, member[.mag_x0]], -, binary_operation[binary_operation[literal[2.0], *, member[.nx]], *, member[.mag_x0]]], +, binary_operation[member[.nx], *, member[.nx]]]] else begin[{] assign[member[.top], binary_operation[binary_operation[member[.nx], *, member[.nx]], +, binary_operation[member[.nx], *, member[.mag_x0]]]] assign[member[.bottom], binary_operation[binary_operation[binary_operation[member[.mag_x0], *, member[.mag_x0]], +, binary_operation[binary_operation[literal[2.0], *, member[.nx]], *, member[.mag_x0]]], +, binary_operation[member[.nx], *, member[.nx]]]] end[}] return[binary_operation[member[.bottom], /, member[.top]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[computeTauGammaAndDivide] operator[SEP] Keyword[final] Keyword[int] identifier[start] , Keyword[final] Keyword[int] identifier[stop] , Keyword[final] Keyword[double] operator[SEP] operator[SEP] identifier[x] , Keyword[final] Keyword[double] identifier[max] , identifier[Complex_F64] identifier[tau] operator[SEP] { Keyword[int] identifier[index] operator[=] identifier[start] operator[*] Other[2] operator[SEP] Keyword[double] identifier[nx] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[start] operator[SEP] identifier[i] operator[<] identifier[stop] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[double] identifier[realX] operator[=] identifier[x] operator[SEP] identifier[index] operator[++] operator[SEP] operator[/=] identifier[max] operator[SEP] Keyword[double] identifier[imagX] operator[=] identifier[x] operator[SEP] identifier[index] operator[++] operator[SEP] operator[/=] identifier[max] operator[SEP] identifier[nx] operator[+=] identifier[realX] operator[*] identifier[realX] operator[+] identifier[imagX] operator[*] identifier[imagX] operator[SEP] } identifier[nx] operator[=] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] identifier[nx] operator[SEP] operator[SEP] Keyword[double] identifier[real_x0] operator[=] identifier[x] operator[SEP] Other[2] operator[*] identifier[start] operator[SEP] operator[SEP] Keyword[double] identifier[imag_x0] operator[=] identifier[x] operator[SEP] Other[2] operator[*] identifier[start] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[double] identifier[mag_x0] operator[=] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] identifier[real_x0] operator[*] identifier[real_x0] operator[+] identifier[imag_x0] operator[*] identifier[imag_x0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mag_x0] operator[==] Other[0] operator[SEP] { identifier[tau] operator[SEP] identifier[real] operator[=] identifier[nx] operator[SEP] identifier[tau] operator[SEP] identifier[imaginary] operator[=] Other[0] operator[SEP] } Keyword[else] { identifier[tau] operator[SEP] identifier[real] operator[=] identifier[real_x0] operator[/] identifier[mag_x0] operator[*] identifier[nx] operator[SEP] identifier[tau] operator[SEP] identifier[imaginary] operator[=] identifier[imag_x0] operator[/] identifier[mag_x0] operator[*] identifier[nx] operator[SEP] } Keyword[double] identifier[top] , identifier[bottom] operator[SEP] Keyword[double] identifier[m0] operator[=] identifier[mag] operator[SEP] identifier[real_x0] operator[+] identifier[tau] operator[SEP] identifier[real] , identifier[imag_x0] operator[+] identifier[tau] operator[SEP] identifier[imaginary] operator[SEP] operator[SEP] Keyword[double] identifier[m1] operator[=] identifier[mag] operator[SEP] identifier[real_x0] operator[-] identifier[tau] operator[SEP] identifier[real] , identifier[imag_x0] operator[-] identifier[tau] operator[SEP] identifier[imaginary] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m1] operator[>] identifier[m0] operator[SEP] { identifier[tau] operator[SEP] identifier[real] operator[=] operator[-] identifier[tau] operator[SEP] identifier[real] operator[SEP] identifier[tau] operator[SEP] identifier[imaginary] operator[=] operator[-] identifier[tau] operator[SEP] identifier[imaginary] operator[SEP] identifier[top] operator[=] identifier[nx] operator[*] identifier[nx] operator[-] identifier[nx] operator[*] identifier[mag_x0] operator[SEP] identifier[bottom] operator[=] identifier[mag_x0] operator[*] identifier[mag_x0] operator[-] literal[Float] operator[*] identifier[nx] operator[*] identifier[mag_x0] operator[+] identifier[nx] operator[*] identifier[nx] operator[SEP] } Keyword[else] { identifier[top] operator[=] identifier[nx] operator[*] identifier[nx] operator[+] identifier[nx] operator[*] identifier[mag_x0] operator[SEP] identifier[bottom] operator[=] identifier[mag_x0] operator[*] identifier[mag_x0] operator[+] literal[Float] operator[*] identifier[nx] operator[*] identifier[mag_x0] operator[+] identifier[nx] operator[*] identifier[nx] operator[SEP] } Keyword[return] identifier[bottom] operator[/] identifier[top] operator[SEP] }
public void cleanup(boolean reuse, boolean wasInsert) { if(currentImage != null) { performImageCleanup(currentImage, reuse); } if(beforeImage != null) { // we always free all resources of the old image performImageCleanup(beforeImage, false); } if(reuse) { refreshObjectImage(wasInsert); } else { myObj = null; } }
class class_name[name] begin[{] method[cleanup, return_type[void], modifier[public], parameter[reuse, wasInsert]] begin[{] if[binary_operation[member[.currentImage], !=, literal[null]]] begin[{] call[.performImageCleanup, parameter[member[.currentImage], member[.reuse]]] else begin[{] None end[}] if[binary_operation[member[.beforeImage], !=, literal[null]]] begin[{] call[.performImageCleanup, parameter[member[.beforeImage], literal[false]]] else begin[{] None end[}] if[member[.reuse]] begin[{] call[.refreshObjectImage, parameter[member[.wasInsert]]] else begin[{] assign[member[.myObj], literal[null]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[cleanup] operator[SEP] Keyword[boolean] identifier[reuse] , Keyword[boolean] identifier[wasInsert] operator[SEP] { Keyword[if] operator[SEP] identifier[currentImage] operator[!=] Other[null] operator[SEP] { identifier[performImageCleanup] operator[SEP] identifier[currentImage] , identifier[reuse] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[beforeImage] operator[!=] Other[null] operator[SEP] { identifier[performImageCleanup] operator[SEP] identifier[beforeImage] , literal[boolean] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[reuse] operator[SEP] { identifier[refreshObjectImage] operator[SEP] identifier[wasInsert] operator[SEP] operator[SEP] } Keyword[else] { identifier[myObj] operator[=] Other[null] operator[SEP] } }
public static JSONCompareResult compareJSON(JSONObject expected, JSONObject actual, JSONCompareMode mode) throws JSONException { return compareJSON(expected, actual, getComparatorForMode(mode)); }
class class_name[name] begin[{] method[compareJSON, return_type[type[JSONCompareResult]], modifier[public static], parameter[expected, actual, mode]] begin[{] return[call[.compareJSON, parameter[member[.expected], member[.actual], call[.getComparatorForMode, parameter[member[.mode]]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[JSONCompareResult] identifier[compareJSON] operator[SEP] identifier[JSONObject] identifier[expected] , identifier[JSONObject] identifier[actual] , identifier[JSONCompareMode] identifier[mode] operator[SEP] Keyword[throws] identifier[JSONException] { Keyword[return] identifier[compareJSON] operator[SEP] identifier[expected] , identifier[actual] , identifier[getComparatorForMode] operator[SEP] identifier[mode] operator[SEP] operator[SEP] operator[SEP] }
private void versionBasedSaveNamespace(boolean force, boolean uncompressed) throws AccessControlException, IOException { if (namenodeVersion >= ClientProtocol.SAVENAMESPACE_FORCE) { namenode.saveNamespace(force, uncompressed); } else { namenode.saveNamespace(); } }
class class_name[name] begin[{] method[versionBasedSaveNamespace, return_type[void], modifier[private], parameter[force, uncompressed]] begin[{] if[binary_operation[member[.namenodeVersion], >=, member[ClientProtocol.SAVENAMESPACE_FORCE]]] begin[{] call[namenode.saveNamespace, parameter[member[.force], member[.uncompressed]]] else begin[{] call[namenode.saveNamespace, parameter[]] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[versionBasedSaveNamespace] operator[SEP] Keyword[boolean] identifier[force] , Keyword[boolean] identifier[uncompressed] operator[SEP] Keyword[throws] identifier[AccessControlException] , identifier[IOException] { Keyword[if] operator[SEP] identifier[namenodeVersion] operator[>=] identifier[ClientProtocol] operator[SEP] identifier[SAVENAMESPACE_FORCE] operator[SEP] { identifier[namenode] operator[SEP] identifier[saveNamespace] operator[SEP] identifier[force] , identifier[uncompressed] operator[SEP] operator[SEP] } Keyword[else] { identifier[namenode] operator[SEP] identifier[saveNamespace] operator[SEP] operator[SEP] operator[SEP] } }
public String getDescription() { if (description != null) { return description; } if (UNKNOWN_ERROR.equals(getCode())) { return String.format("Received error with code %s", getCode()); } return "Failed with unknown error"; }
class class_name[name] begin[{] method[getDescription, return_type[type[String]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.description], !=, literal[null]]] begin[{] return[member[.description]] else begin[{] None end[}] if[call[UNKNOWN_ERROR.equals, parameter[call[.getCode, parameter[]]]]] begin[{] return[call[String.format, parameter[literal["Received error with code %s"], call[.getCode, parameter[]]]]] else begin[{] None end[}] return[literal["Failed with unknown error"]] end[}] END[}]
Keyword[public] identifier[String] identifier[getDescription] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[description] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[description] operator[SEP] } Keyword[if] operator[SEP] identifier[UNKNOWN_ERROR] operator[SEP] identifier[equals] operator[SEP] identifier[getCode] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[getCode] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] literal[String] operator[SEP] }
protected void moveNode( String workspaceName, NodeKey key, Name primaryType, Set<Name> mixinTypes, NodeKey oldParent, NodeKey newParent, Path newPath, Path oldPath ) { }
class class_name[name] begin[{] method[moveNode, return_type[void], modifier[protected], parameter[workspaceName, key, primaryType, mixinTypes, oldParent, newParent, newPath, oldPath]] begin[{] end[}] END[}]
Keyword[protected] Keyword[void] identifier[moveNode] operator[SEP] identifier[String] identifier[workspaceName] , identifier[NodeKey] identifier[key] , identifier[Name] identifier[primaryType] , identifier[Set] operator[<] identifier[Name] operator[>] identifier[mixinTypes] , identifier[NodeKey] identifier[oldParent] , identifier[NodeKey] identifier[newParent] , identifier[Path] identifier[newPath] , identifier[Path] identifier[oldPath] operator[SEP] { }
public OperationFuture<List<DataCenter>> claim(DataCenter... dataCenters) { return claim(Arrays.asList(dataCenters)); }
class class_name[name] begin[{] method[claim, return_type[type[OperationFuture]], modifier[public], parameter[dataCenters]] begin[{] return[call[.claim, parameter[call[Arrays.asList, parameter[member[.dataCenters]]]]]] end[}] END[}]
Keyword[public] identifier[OperationFuture] operator[<] identifier[List] operator[<] identifier[DataCenter] operator[>] operator[>] identifier[claim] operator[SEP] identifier[DataCenter] operator[...] identifier[dataCenters] operator[SEP] { Keyword[return] identifier[claim] operator[SEP] identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[dataCenters] operator[SEP] operator[SEP] operator[SEP] }
private boolean needsNewSession() { if (sessionCredentials == null) return true; long timeRemaining = sessionCredentialsExpiration.getTime() - System.currentTimeMillis(); return timeRemaining < (this.refreshThreshold * 1000); }
class class_name[name] begin[{] method[needsNewSession, return_type[type[boolean]], modifier[private], parameter[]] begin[{] if[binary_operation[member[.sessionCredentials], ==, literal[null]]] begin[{] return[literal[true]] else begin[{] None end[}] local_variable[type[long], timeRemaining] return[binary_operation[member[.timeRemaining], <, binary_operation[THIS[member[None.refreshThreshold]], *, literal[1000]]]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[needsNewSession] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[sessionCredentials] operator[==] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[long] identifier[timeRemaining] operator[=] identifier[sessionCredentialsExpiration] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[-] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[timeRemaining] operator[<] operator[SEP] Keyword[this] operator[SEP] identifier[refreshThreshold] operator[*] Other[1000] operator[SEP] operator[SEP] }
public boolean hasNext() { synchronized (lock) { try { return parser.peek() != JsonToken.END_DOCUMENT; } catch (MalformedJsonException e) { throw new JsonSyntaxException(e); } catch (IOException e) { throw new JsonIOException(e); } } }
class class_name[name] begin[{] method[hasNext, return_type[type[boolean]], modifier[public], parameter[]] begin[{] SYNCHRONIZED[member[.lock]] BEGIN[{] TryStatement(block=[ReturnStatement(expression=BinaryOperation(operandl=MethodInvocation(arguments=[], member=peek, postfix_operators=[], prefix_operators=[], qualifier=parser, selectors=[], type_arguments=None), operandr=MemberReference(member=END_DOCUMENT, postfix_operators=[], prefix_operators=[], qualifier=JsonToken, selectors=[]), operator=!=), 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=JsonSyntaxException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['MalformedJsonException'])), 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=JsonIOException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) END[}] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[hasNext] operator[SEP] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[lock] operator[SEP] { Keyword[try] { Keyword[return] identifier[parser] operator[SEP] identifier[peek] operator[SEP] operator[SEP] operator[!=] identifier[JsonToken] operator[SEP] identifier[END_DOCUMENT] operator[SEP] } Keyword[catch] operator[SEP] identifier[MalformedJsonException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[JsonSyntaxException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[JsonIOException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } }
public static String findCurrentWordFromCursor(String text, int cursor) { if (text.length() <= cursor + 1) { // return last word if (text.contains(SPACE)) { if (doWordContainEscapedSpace(text)) { if (doWordContainOnlyEscapedSpace(text)) return switchEscapedSpacesToSpacesInWord(text); else { return switchEscapedSpacesToSpacesInWord(findEscapedSpaceWordCloseToEnd(text)); } } else { if (text.lastIndexOf(SPACE) >= cursor) // cant use lastIndexOf return text.substring(text.substring(0, cursor).lastIndexOf(SPACE)).trim(); else return text.substring(text.lastIndexOf(SPACE)).trim(); } } else return text.trim(); } else { String rest; if (text.length() > cursor + 1) rest = text.substring(0, cursor + 1); else rest = text; if (doWordContainOnlyEscapedSpace(rest)) { if (cursor > 1 && text.charAt(cursor) == SPACE_CHAR && text.charAt(cursor - 1) == SPACE_CHAR) return ""; else return switchEscapedSpacesToSpacesInWord(rest); } else { if (cursor > 1 && text.charAt(cursor) == SPACE_CHAR && text.charAt(cursor - 1) == SPACE_CHAR) return ""; // only if it contains a ' ' and its not at the end of the string if (rest.trim().contains(SPACE)) return rest.substring(rest.trim().lastIndexOf(" ")).trim(); else return rest.trim(); } } }
class class_name[name] begin[{] method[findCurrentWordFromCursor, return_type[type[String]], modifier[public static], parameter[text, cursor]] begin[{] if[binary_operation[call[text.length, parameter[]], <=, binary_operation[member[.cursor], +, literal[1]]]] begin[{] if[call[text.contains, parameter[member[.SPACE]]]] begin[{] if[call[.doWordContainEscapedSpace, parameter[member[.text]]]] begin[{] if[call[.doWordContainOnlyEscapedSpace, parameter[member[.text]]]] begin[{] return[call[.switchEscapedSpacesToSpacesInWord, parameter[member[.text]]]] else begin[{] return[call[.switchEscapedSpacesToSpacesInWord, parameter[call[.findEscapedSpaceWordCloseToEnd, parameter[member[.text]]]]]] end[}] else begin[{] if[binary_operation[call[text.lastIndexOf, parameter[member[.SPACE]]], >=, member[.cursor]]] begin[{] return[call[text.substring, parameter[call[text.substring, parameter[literal[0], member[.cursor]]]]]] else begin[{] return[call[text.substring, parameter[call[text.lastIndexOf, parameter[member[.SPACE]]]]]] end[}] end[}] else begin[{] return[call[text.trim, parameter[]]] end[}] else begin[{] local_variable[type[String], rest] if[binary_operation[call[text.length, parameter[]], >, binary_operation[member[.cursor], +, literal[1]]]] begin[{] assign[member[.rest], call[text.substring, parameter[literal[0], binary_operation[member[.cursor], +, literal[1]]]]] else begin[{] assign[member[.rest], member[.text]] end[}] if[call[.doWordContainOnlyEscapedSpace, parameter[member[.rest]]]] begin[{] if[binary_operation[binary_operation[binary_operation[member[.cursor], >, literal[1]], &&, binary_operation[call[text.charAt, parameter[member[.cursor]]], ==, member[.SPACE_CHAR]]], &&, binary_operation[call[text.charAt, parameter[binary_operation[member[.cursor], -, literal[1]]]], ==, member[.SPACE_CHAR]]]] begin[{] return[literal[""]] else begin[{] return[call[.switchEscapedSpacesToSpacesInWord, parameter[member[.rest]]]] end[}] else begin[{] if[binary_operation[binary_operation[binary_operation[member[.cursor], >, literal[1]], &&, binary_operation[call[text.charAt, parameter[member[.cursor]]], ==, member[.SPACE_CHAR]]], &&, binary_operation[call[text.charAt, parameter[binary_operation[member[.cursor], -, literal[1]]]], ==, member[.SPACE_CHAR]]]] begin[{] return[literal[""]] else begin[{] None end[}] if[call[rest.trim, parameter[]]] begin[{] return[call[rest.substring, parameter[call[rest.trim, parameter[]]]]] else begin[{] return[call[rest.trim, parameter[]]] end[}] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[findCurrentWordFromCursor] operator[SEP] identifier[String] identifier[text] , Keyword[int] identifier[cursor] operator[SEP] { Keyword[if] operator[SEP] identifier[text] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[<=] identifier[cursor] operator[+] Other[1] operator[SEP] { Keyword[if] operator[SEP] identifier[text] operator[SEP] identifier[contains] operator[SEP] identifier[SPACE] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[doWordContainEscapedSpace] operator[SEP] identifier[text] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[doWordContainOnlyEscapedSpace] operator[SEP] identifier[text] operator[SEP] operator[SEP] Keyword[return] identifier[switchEscapedSpacesToSpacesInWord] operator[SEP] identifier[text] operator[SEP] operator[SEP] Keyword[else] { Keyword[return] identifier[switchEscapedSpacesToSpacesInWord] operator[SEP] identifier[findEscapedSpaceWordCloseToEnd] operator[SEP] identifier[text] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[if] operator[SEP] identifier[text] operator[SEP] identifier[lastIndexOf] operator[SEP] identifier[SPACE] operator[SEP] operator[>=] identifier[cursor] operator[SEP] Keyword[return] identifier[text] operator[SEP] identifier[substring] operator[SEP] identifier[text] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[cursor] operator[SEP] operator[SEP] identifier[lastIndexOf] operator[SEP] identifier[SPACE] operator[SEP] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] Keyword[else] Keyword[return] identifier[text] operator[SEP] identifier[substring] operator[SEP] identifier[text] operator[SEP] identifier[lastIndexOf] operator[SEP] identifier[SPACE] operator[SEP] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] Keyword[return] identifier[text] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[String] identifier[rest] operator[SEP] Keyword[if] operator[SEP] identifier[text] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] identifier[cursor] operator[+] Other[1] operator[SEP] identifier[rest] operator[=] identifier[text] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[cursor] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[else] identifier[rest] operator[=] identifier[text] operator[SEP] Keyword[if] operator[SEP] identifier[doWordContainOnlyEscapedSpace] operator[SEP] identifier[rest] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[cursor] operator[>] Other[1] operator[&&] identifier[text] operator[SEP] identifier[charAt] operator[SEP] identifier[cursor] operator[SEP] operator[==] identifier[SPACE_CHAR] operator[&&] identifier[text] operator[SEP] identifier[charAt] operator[SEP] identifier[cursor] operator[-] Other[1] operator[SEP] operator[==] identifier[SPACE_CHAR] operator[SEP] Keyword[return] literal[String] operator[SEP] Keyword[else] Keyword[return] identifier[switchEscapedSpacesToSpacesInWord] operator[SEP] identifier[rest] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[cursor] operator[>] Other[1] operator[&&] identifier[text] operator[SEP] identifier[charAt] operator[SEP] identifier[cursor] operator[SEP] operator[==] identifier[SPACE_CHAR] operator[&&] identifier[text] operator[SEP] identifier[charAt] operator[SEP] identifier[cursor] operator[-] Other[1] operator[SEP] operator[==] identifier[SPACE_CHAR] operator[SEP] Keyword[return] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[rest] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[contains] operator[SEP] identifier[SPACE] operator[SEP] operator[SEP] Keyword[return] identifier[rest] operator[SEP] identifier[substring] operator[SEP] identifier[rest] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] Keyword[else] Keyword[return] identifier[rest] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] } } }
@SuppressWarnings("unchecked") protected void processInitialCollectorManagerServices() throws InvalidSyntaxException { ServiceReference<CollectorManager>[] servRefs = (ServiceReference<CollectorManager>[]) bundleContext.getServiceReferences(CollectorManager.class.getName(), null); if (servRefs != null) { for (ServiceReference<CollectorManager> servRef : servRefs) { setCollectorManagerPipeline(servRef); } } }
class class_name[name] begin[{] method[processInitialCollectorManagerServices, return_type[void], modifier[protected], parameter[]] begin[{] local_variable[type[ServiceReference], servRefs] if[binary_operation[member[.servRefs], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=servRef, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setCollectorManagerPipeline, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=servRefs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=servRef)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=CollectorManager, sub_type=None))], dimensions=[], name=ServiceReference, sub_type=None))), label=None) else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] Keyword[void] identifier[processInitialCollectorManagerServices] operator[SEP] operator[SEP] Keyword[throws] identifier[InvalidSyntaxException] { identifier[ServiceReference] operator[<] identifier[CollectorManager] operator[>] operator[SEP] operator[SEP] identifier[servRefs] operator[=] operator[SEP] identifier[ServiceReference] operator[<] identifier[CollectorManager] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[bundleContext] operator[SEP] identifier[getServiceReferences] operator[SEP] identifier[CollectorManager] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[servRefs] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[ServiceReference] operator[<] identifier[CollectorManager] operator[>] identifier[servRef] operator[:] identifier[servRefs] operator[SEP] { identifier[setCollectorManagerPipeline] operator[SEP] identifier[servRef] operator[SEP] operator[SEP] } } }
public void setBackgroundIconColorAnimated(final Color color, final int cycleCount) { if (backgroundIcon == null) { LOGGER.warn("Background modification skipped because background icon not set!"); return; } stopBackgroundIconColorFadeAnimation(); backgroundFadeIcon.setFill(color); backgroundIconColorFadeAnimation = Animations.createFadeTransition(backgroundFadeIcon, JFXConstants.TRANSPARENCY_FULLY, JFXConstants.TRANSPARENCY_NONE, cycleCount, JFXConstants.ANIMATION_DURATION_FADE_DEFAULT); backgroundIconColorFadeAnimation.setOnFinished(event -> { backgroundFadeIcon.setFill(color); backgroundFadeIcon.setOpacity(JFXConstants.TRANSPARENCY_FULLY); }); backgroundIconColorFadeAnimation.play(); }
class class_name[name] begin[{] method[setBackgroundIconColorAnimated, return_type[void], modifier[public], parameter[color, cycleCount]] begin[{] if[binary_operation[member[.backgroundIcon], ==, literal[null]]] begin[{] call[LOGGER.warn, parameter[literal["Background modification skipped because background icon not set!"]]] return[None] else begin[{] None end[}] call[.stopBackgroundIconColorFadeAnimation, parameter[]] call[backgroundFadeIcon.setFill, parameter[member[.color]]] assign[member[.backgroundIconColorFadeAnimation], call[Animations.createFadeTransition, parameter[member[.backgroundFadeIcon], member[JFXConstants.TRANSPARENCY_FULLY], member[JFXConstants.TRANSPARENCY_NONE], member[.cycleCount], member[JFXConstants.ANIMATION_DURATION_FADE_DEFAULT]]]] call[backgroundIconColorFadeAnimation.setOnFinished, parameter[LambdaExpression(body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=color, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setFill, postfix_operators=[], prefix_operators=[], qualifier=backgroundFadeIcon, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TRANSPARENCY_FULLY, postfix_operators=[], prefix_operators=[], qualifier=JFXConstants, selectors=[])], member=setOpacity, postfix_operators=[], prefix_operators=[], qualifier=backgroundFadeIcon, selectors=[], type_arguments=None), label=None)], parameters=[MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]] call[backgroundIconColorFadeAnimation.play, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setBackgroundIconColorAnimated] operator[SEP] Keyword[final] identifier[Color] identifier[color] , Keyword[final] Keyword[int] identifier[cycleCount] operator[SEP] { Keyword[if] operator[SEP] identifier[backgroundIcon] operator[==] Other[null] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[stopBackgroundIconColorFadeAnimation] operator[SEP] operator[SEP] operator[SEP] identifier[backgroundFadeIcon] operator[SEP] identifier[setFill] operator[SEP] identifier[color] operator[SEP] operator[SEP] identifier[backgroundIconColorFadeAnimation] operator[=] identifier[Animations] operator[SEP] identifier[createFadeTransition] operator[SEP] identifier[backgroundFadeIcon] , identifier[JFXConstants] operator[SEP] identifier[TRANSPARENCY_FULLY] , identifier[JFXConstants] operator[SEP] identifier[TRANSPARENCY_NONE] , identifier[cycleCount] , identifier[JFXConstants] operator[SEP] identifier[ANIMATION_DURATION_FADE_DEFAULT] operator[SEP] operator[SEP] identifier[backgroundIconColorFadeAnimation] operator[SEP] identifier[setOnFinished] operator[SEP] identifier[event] operator[->] { identifier[backgroundFadeIcon] operator[SEP] identifier[setFill] operator[SEP] identifier[color] operator[SEP] operator[SEP] identifier[backgroundFadeIcon] operator[SEP] identifier[setOpacity] operator[SEP] identifier[JFXConstants] operator[SEP] identifier[TRANSPARENCY_FULLY] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] identifier[backgroundIconColorFadeAnimation] operator[SEP] identifier[play] operator[SEP] operator[SEP] operator[SEP] }
public void setMFAOptions(java.util.Collection<MFAOptionType> mFAOptions) { if (mFAOptions == null) { this.mFAOptions = null; return; } this.mFAOptions = new java.util.ArrayList<MFAOptionType>(mFAOptions); }
class class_name[name] begin[{] method[setMFAOptions, return_type[void], modifier[public], parameter[mFAOptions]] begin[{] if[binary_operation[member[.mFAOptions], ==, literal[null]]] begin[{] assign[THIS[member[None.mFAOptions]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.mFAOptions]], ClassCreator(arguments=[MemberReference(member=mFAOptions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=MFAOptionType, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setMFAOptions] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[MFAOptionType] operator[>] identifier[mFAOptions] operator[SEP] { Keyword[if] operator[SEP] identifier[mFAOptions] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[mFAOptions] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[mFAOptions] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[MFAOptionType] operator[>] operator[SEP] identifier[mFAOptions] operator[SEP] operator[SEP] }
@Override public void restore(Object context, Bundle bundle) { Set<Field> fieldsToRestore = FieldUtils.getAllFields(context, Stateful.class); for (Field field : fieldsToRestore) { try { if(!field.isAccessible()) field.setAccessible(true); Serializable state = bundle.getSerializable(field.getName()); field.set(context, state); } catch (Exception e) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("Failed to restore state of field "); stringBuilder.append(field.getName()); stringBuilder.append(" in "); stringBuilder.append(context.getClass().getName()); stringBuilder.append(". "); Log.e(getClass().getName(), stringBuilder.toString(), e); } } }
class class_name[name] begin[{] method[restore, return_type[void], modifier[public], parameter[context, bundle]] begin[{] local_variable[type[Set], fieldsToRestore] ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isAccessible, postfix_operators=[], prefix_operators=['!'], qualifier=field, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setAccessible, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None), label=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None)], member=getSerializable, postfix_operators=[], prefix_operators=[], qualifier=bundle, selectors=[], type_arguments=None), name=state)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Serializable, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=set, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuilder, sub_type=None)), name=stringBuilder)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuilder, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to restore state of field ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=stringBuilder, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=stringBuilder, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" in ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=stringBuilder, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=context, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=stringBuilder, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=". ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=stringBuilder, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=stringBuilder, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=e, postfix_operators=[], prefix_operators=[], qualifier=Log, 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)]), control=EnhancedForControl(iterable=MemberReference(member=fieldsToRestore, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=field)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Field, sub_type=None))), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[restore] operator[SEP] identifier[Object] identifier[context] , identifier[Bundle] identifier[bundle] operator[SEP] { identifier[Set] operator[<] identifier[Field] operator[>] identifier[fieldsToRestore] operator[=] identifier[FieldUtils] operator[SEP] identifier[getAllFields] operator[SEP] identifier[context] , identifier[Stateful] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Field] identifier[field] operator[:] identifier[fieldsToRestore] operator[SEP] { Keyword[try] { Keyword[if] operator[SEP] operator[!] identifier[field] operator[SEP] identifier[isAccessible] operator[SEP] operator[SEP] operator[SEP] identifier[field] operator[SEP] identifier[setAccessible] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[Serializable] identifier[state] operator[=] identifier[bundle] operator[SEP] identifier[getSerializable] operator[SEP] identifier[field] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[field] operator[SEP] identifier[set] operator[SEP] identifier[context] , identifier[state] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[StringBuilder] identifier[stringBuilder] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[stringBuilder] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[stringBuilder] operator[SEP] identifier[append] operator[SEP] identifier[field] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[stringBuilder] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[stringBuilder] operator[SEP] identifier[append] operator[SEP] identifier[context] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[stringBuilder] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Log] operator[SEP] identifier[e] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[stringBuilder] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } } }
static List<String> sanitizeInput(List<String> words) { words = words.stream() .map(s -> s.replaceAll("^\\n+|\\n+$", "")) // CR at beginning/end of line introduced by backslash continuation .map(s -> s.replaceAll("\\n+", " ")) // CR in middle of word introduced by return inside a quoted string .collect(Collectors.toList()); return words; }
class class_name[name] begin[{] method[sanitizeInput, return_type[type[List]], modifier[static], parameter[words]] begin[{] assign[member[.words], call[words.stream, parameter[]]] return[member[.words]] end[}] END[}]
Keyword[static] identifier[List] operator[<] identifier[String] operator[>] identifier[sanitizeInput] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[words] operator[SEP] { identifier[words] operator[=] identifier[words] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[s] operator[->] identifier[s] operator[SEP] identifier[replaceAll] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[s] operator[->] identifier[s] operator[SEP] identifier[replaceAll] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[toList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[words] operator[SEP] }
public static boolean isGooglebot(HttpServletRequest request) { @SuppressWarnings("unchecked") Enumeration<String> headers = request.getHeaders("User-Agent"); while(headers.hasMoreElements()) { String userAgent = headers.nextElement(); if(userAgent.contains("Googlebot")) { // Verify through reverse then forward DNS lookups String remoteAddr = request.getRemoteAddr(); String remoteHost = request.getRemoteHost(); try { InetAddress remoteIp = InetAddress.getByName(remoteAddr); // Do reverse lookup if container didn't do so if(remoteAddr.equals(remoteHost)) remoteHost = remoteIp.getCanonicalHostName(); // Reverse DNS result must be in the googlebot.com domain if(remoteHost.endsWith(".googlebot.com") || remoteHost.endsWith(".googlebot.com.")) { // Forward DNS must resolve back to the original IP for(InetAddress actualIp : InetAddress.getAllByName(remoteHost)) { System.out.println("DEBUG: ServletUtil: Googlebot verified: userAgent=\""+userAgent+"\", remoteAddr=\""+remoteAddr+"\", remoteHost=\""+remoteHost+"\""); if(actualIp.equals(remoteIp)) return true; } System.out.println("DEBUG: ServletUtil: Googlebot agent with valid reverse DNS failed forward lookup: userAgent=\""+userAgent+"\", remoteAddr=\""+remoteAddr+"\", remoteHost=\""+remoteHost+"\""); } System.out.println("DEBUG: ServletUtil: Googlebot agent failed valid reverse DNS lookup: userAgent=\""+userAgent+"\", remoteAddr=\""+remoteAddr+"\", remoteHost=\""+remoteHost+"\""); } catch(UnknownHostException exception) { // Ignored System.out.println("DEBUG: ServletUtil: Googlebot agent verification failed due to exception: userAgent=\""+userAgent+"\", remoteAddr=\""+remoteAddr+"\", remoteHost=\""+remoteHost+"\", exception=\""+exception+"\""); } break; // Only check the first Googlebot User-Agent header (there should normally only be one anyway) } } return false; }
class class_name[name] begin[{] method[isGooglebot, return_type[type[boolean]], modifier[public static], parameter[request]] begin[{] local_variable[type[Enumeration], headers] while[call[headers.hasMoreElements, parameter[]]] begin[{] local_variable[type[String], userAgent] if[call[userAgent.contains, parameter[literal["Googlebot"]]]] begin[{] local_variable[type[String], remoteAddr] local_variable[type[String], remoteHost] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=remoteAddr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getByName, postfix_operators=[], prefix_operators=[], qualifier=InetAddress, selectors=[], type_arguments=None), name=remoteIp)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InetAddress, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=remoteHost, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=remoteAddr, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=remoteHost, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getCanonicalHostName, postfix_operators=[], prefix_operators=[], qualifier=remoteIp, selectors=[], type_arguments=None)), label=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".googlebot.com")], member=endsWith, postfix_operators=[], prefix_operators=[], qualifier=remoteHost, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".googlebot.com.")], member=endsWith, postfix_operators=[], prefix_operators=[], qualifier=remoteHost, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DEBUG: ServletUtil: Googlebot verified: userAgent=\""), operandr=MemberReference(member=userAgent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\", remoteAddr=\""), operator=+), operandr=MemberReference(member=remoteAddr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\", remoteHost=\""), operator=+), operandr=MemberReference(member=remoteHost, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\""), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=remoteIp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=actualIp, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=remoteHost, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAllByName, postfix_operators=[], prefix_operators=[], qualifier=InetAddress, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=actualIp)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InetAddress, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DEBUG: ServletUtil: Googlebot agent with valid reverse DNS failed forward lookup: userAgent=\""), operandr=MemberReference(member=userAgent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\", remoteAddr=\""), operator=+), operandr=MemberReference(member=remoteAddr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\", remoteHost=\""), operator=+), operandr=MemberReference(member=remoteHost, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\""), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DEBUG: ServletUtil: Googlebot agent failed valid reverse DNS lookup: userAgent=\""), operandr=MemberReference(member=userAgent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\", remoteAddr=\""), operator=+), operandr=MemberReference(member=remoteAddr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\", remoteHost=\""), operator=+), operandr=MemberReference(member=remoteHost, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\""), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DEBUG: ServletUtil: Googlebot agent verification failed due to exception: userAgent=\""), operandr=MemberReference(member=userAgent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\", remoteAddr=\""), operator=+), operandr=MemberReference(member=remoteAddr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\", remoteHost=\""), operator=+), operandr=MemberReference(member=remoteHost, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\", exception=\""), operator=+), operandr=MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\""), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=exception, types=['UnknownHostException']))], finally_block=None, label=None, resources=None) BreakStatement(goto=None, label=None) else begin[{] None end[}] end[}] return[literal[false]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isGooglebot] operator[SEP] identifier[HttpServletRequest] identifier[request] operator[SEP] { annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[Enumeration] operator[<] identifier[String] operator[>] identifier[headers] operator[=] identifier[request] operator[SEP] identifier[getHeaders] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[headers] operator[SEP] identifier[hasMoreElements] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[userAgent] operator[=] identifier[headers] operator[SEP] identifier[nextElement] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[userAgent] operator[SEP] identifier[contains] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[String] identifier[remoteAddr] operator[=] identifier[request] operator[SEP] identifier[getRemoteAddr] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[remoteHost] operator[=] identifier[request] operator[SEP] identifier[getRemoteHost] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[InetAddress] identifier[remoteIp] operator[=] identifier[InetAddress] operator[SEP] identifier[getByName] operator[SEP] identifier[remoteAddr] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[remoteAddr] operator[SEP] identifier[equals] operator[SEP] identifier[remoteHost] operator[SEP] operator[SEP] identifier[remoteHost] operator[=] identifier[remoteIp] operator[SEP] identifier[getCanonicalHostName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[remoteHost] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[remoteHost] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[InetAddress] identifier[actualIp] operator[:] identifier[InetAddress] operator[SEP] identifier[getAllByName] operator[SEP] identifier[remoteHost] operator[SEP] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[userAgent] operator[+] literal[String] operator[+] identifier[remoteAddr] operator[+] literal[String] operator[+] identifier[remoteHost] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[actualIp] operator[SEP] identifier[equals] operator[SEP] identifier[remoteIp] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[userAgent] operator[+] literal[String] operator[+] identifier[remoteAddr] operator[+] literal[String] operator[+] identifier[remoteHost] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[userAgent] operator[+] literal[String] operator[+] identifier[remoteAddr] operator[+] literal[String] operator[+] identifier[remoteHost] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[UnknownHostException] identifier[exception] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[userAgent] operator[+] literal[String] operator[+] identifier[remoteAddr] operator[+] literal[String] operator[+] identifier[remoteHost] operator[+] literal[String] operator[+] identifier[exception] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
public static Point2Transform2_F64 transformRectToPixel(CameraPinholeBrown param, DMatrixRMaj rectify) { return ImplRectifyImageOps_F64.transformRectToPixel(param, rectify); }
class class_name[name] begin[{] method[transformRectToPixel, return_type[type[Point2Transform2_F64]], modifier[public static], parameter[param, rectify]] begin[{] return[call[ImplRectifyImageOps_F64.transformRectToPixel, parameter[member[.param], member[.rectify]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Point2Transform2_F64] identifier[transformRectToPixel] operator[SEP] identifier[CameraPinholeBrown] identifier[param] , identifier[DMatrixRMaj] identifier[rectify] operator[SEP] { Keyword[return] identifier[ImplRectifyImageOps_F64] operator[SEP] identifier[transformRectToPixel] operator[SEP] identifier[param] , identifier[rectify] operator[SEP] operator[SEP] }
public void setServerOwner(final String iClusterName, final String iServerName) { if (iClusterName == null) throw new IllegalArgumentException("cluster name cannot be null"); synchronized (configuration) { final ODocument clusters = configuration.field(CLUSTERS); ODocument cluster = clusters.field(iClusterName); if (cluster == null) // CREATE IT cluster = createCluster(iClusterName); else { // CHECK IF THE OWNER IS ALREADY CONFIGURED final String owner = cluster.field(OWNER); if (owner != null && !iServerName.equalsIgnoreCase(owner)) throw new ODistributedException("Cannot overwrite ownership of cluster '" + iClusterName + "' to the server '" + iServerName + "', because server '" + owner + "' was already configured as owner"); } List<String> serverList = getClusterConfiguration(iClusterName).field(SERVERS); if (serverList == null) { serverList = initClusterServers(cluster); } if (!serverList.isEmpty() && serverList.get(0).equals(iServerName)) // ALREADY OWNER return; // REMOVE THE NODE IF ANY boolean removed = false; for (Iterator<String> it = serverList.iterator(); it.hasNext();) { if (it.next().equals(iServerName)) { it.remove(); removed = true; break; } } if( !removed ) throw new ODistributedException("Cannot set ownership of cluster '" + iClusterName + "' to the server '" + iServerName + "', because the server has no that cluster (sharding)"); // ADD THE NODE AS FIRST OF THE LIST = MASTER serverList.add(0, iServerName); incrementVersion(); } }
class class_name[name] begin[{] method[setServerOwner, return_type[void], modifier[public], parameter[iClusterName, iServerName]] begin[{] if[binary_operation[member[.iClusterName], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="cluster name cannot be null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] SYNCHRONIZED[member[.configuration]] BEGIN[{] local_variable[type[ODocument], clusters] local_variable[type[ODocument], cluster] if[binary_operation[member[.cluster], ==, literal[null]]] begin[{] assign[member[.cluster], call[.createCluster, parameter[member[.iClusterName]]]] else begin[{] local_variable[type[String], owner] if[binary_operation[binary_operation[member[.owner], !=, literal[null]], &&, call[iServerName.equalsIgnoreCase, parameter[member[.owner]]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot overwrite ownership of cluster '"), operandr=MemberReference(member=iClusterName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' to the server '"), operator=+), operandr=MemberReference(member=iServerName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="', because server '"), operator=+), operandr=MemberReference(member=owner, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' was already configured as owner"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ODistributedException, sub_type=None)), label=None) else begin[{] None end[}] end[}] local_variable[type[List], serverList] if[binary_operation[member[.serverList], ==, literal[null]]] begin[{] assign[member[.serverList], call[.initClusterServers, parameter[member[.cluster]]]] else begin[{] None end[}] if[binary_operation[call[serverList.isEmpty, parameter[]], &&, call[serverList.get, parameter[literal[0]]]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[boolean], removed] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[MethodInvocation(arguments=[MemberReference(member=iServerName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=remove, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=removed, 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=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=iterator, postfix_operators=[], prefix_operators=[], qualifier=serverList, selectors=[], type_arguments=None), name=it)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=Iterator, sub_type=None)), update=None), label=None) if[member[.removed]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot set ownership of cluster '"), operandr=MemberReference(member=iClusterName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' to the server '"), operator=+), operandr=MemberReference(member=iServerName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="', because the server has no that cluster (sharding)"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ODistributedException, sub_type=None)), label=None) else begin[{] None end[}] call[serverList.add, parameter[literal[0], member[.iServerName]]] call[.incrementVersion, parameter[]] END[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setServerOwner] operator[SEP] Keyword[final] identifier[String] identifier[iClusterName] , Keyword[final] identifier[String] identifier[iServerName] operator[SEP] { Keyword[if] operator[SEP] identifier[iClusterName] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] identifier[configuration] operator[SEP] { Keyword[final] identifier[ODocument] identifier[clusters] operator[=] identifier[configuration] operator[SEP] identifier[field] operator[SEP] identifier[CLUSTERS] operator[SEP] operator[SEP] identifier[ODocument] identifier[cluster] operator[=] identifier[clusters] operator[SEP] identifier[field] operator[SEP] identifier[iClusterName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cluster] operator[==] Other[null] operator[SEP] identifier[cluster] operator[=] identifier[createCluster] operator[SEP] identifier[iClusterName] operator[SEP] operator[SEP] Keyword[else] { Keyword[final] identifier[String] identifier[owner] operator[=] identifier[cluster] operator[SEP] identifier[field] operator[SEP] identifier[OWNER] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[owner] operator[!=] Other[null] operator[&&] operator[!] identifier[iServerName] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[owner] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[ODistributedException] operator[SEP] literal[String] operator[+] identifier[iClusterName] operator[+] literal[String] operator[+] identifier[iServerName] operator[+] literal[String] operator[+] identifier[owner] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[String] operator[>] identifier[serverList] operator[=] identifier[getClusterConfiguration] operator[SEP] identifier[iClusterName] operator[SEP] operator[SEP] identifier[field] operator[SEP] identifier[SERVERS] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[serverList] operator[==] Other[null] operator[SEP] { identifier[serverList] operator[=] identifier[initClusterServers] operator[SEP] identifier[cluster] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[serverList] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[&&] identifier[serverList] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[iServerName] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[boolean] identifier[removed] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[Iterator] operator[<] identifier[String] operator[>] identifier[it] operator[=] identifier[serverList] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[it] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[iServerName] operator[SEP] operator[SEP] { identifier[it] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] identifier[removed] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] } } Keyword[if] operator[SEP] operator[!] identifier[removed] operator[SEP] Keyword[throw] Keyword[new] identifier[ODistributedException] operator[SEP] literal[String] operator[+] identifier[iClusterName] operator[+] literal[String] operator[+] identifier[iServerName] operator[+] literal[String] operator[SEP] operator[SEP] identifier[serverList] operator[SEP] identifier[add] operator[SEP] Other[0] , identifier[iServerName] operator[SEP] operator[SEP] identifier[incrementVersion] operator[SEP] operator[SEP] operator[SEP] } }
public UITextField setColors(int bgColor, int cursorColor, int selectColor) { setColor(bgColor); this.cursorColor = cursorColor; this.selectColor = selectColor; return this; }
class class_name[name] begin[{] method[setColors, return_type[type[UITextField]], modifier[public], parameter[bgColor, cursorColor, selectColor]] begin[{] call[.setColor, parameter[member[.bgColor]]] assign[THIS[member[None.cursorColor]], member[.cursorColor]] assign[THIS[member[None.selectColor]], member[.selectColor]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[UITextField] identifier[setColors] operator[SEP] Keyword[int] identifier[bgColor] , Keyword[int] identifier[cursorColor] , Keyword[int] identifier[selectColor] operator[SEP] { identifier[setColor] operator[SEP] identifier[bgColor] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[cursorColor] operator[=] identifier[cursorColor] operator[SEP] Keyword[this] operator[SEP] identifier[selectColor] operator[=] identifier[selectColor] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
@Override public void run() { try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } super.subjectRepository.createSubject(this.subject, new SubjectRepository.SubjectUseCase() { @Override public void onMissionAccomplished(final Subject subject) { CreateSubjectUseCaseImp.super.mainThread.post(new Runnable() { @Override public void run() { callback.onMissionAccomplished(subject); } }); } @Override public void onError(final SubjectException subjectException) { CreateSubjectUseCaseImp.super.mainThread.post(new Runnable() { @Override public void run() { callback.onError(subjectException); } }); } }); }
class class_name[name] begin[{] method[run, return_type[void], modifier[public], parameter[]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1000)], member=sleep, postfix_operators=[], prefix_operators=[], qualifier=Thread, 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=['InterruptedException']))], finally_block=None, label=None, resources=None) SuperMemberReference(member=subjectRepository, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=subject, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MemberReference(member=CreateSubjectUseCaseImp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[SuperMemberReference(member=mainThread, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=subject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onMissionAccomplished, postfix_operators=[], prefix_operators=[], qualifier=callback, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=run, parameters=[], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Runnable, sub_type=None))], member=post, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)], documentation=None, modifiers={'public'}, name=onMissionAccomplished, parameters=[FormalParameter(annotations=[], modifiers={'final'}, name=subject, type=ReferenceType(arguments=None, dimensions=[], name=Subject, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MemberReference(member=CreateSubjectUseCaseImp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[SuperMemberReference(member=mainThread, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=subjectException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onError, postfix_operators=[], prefix_operators=[], qualifier=callback, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=run, parameters=[], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Runnable, sub_type=None))], member=post, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)], documentation=None, modifiers={'public'}, name=onError, parameters=[FormalParameter(annotations=[], modifiers={'final'}, name=subjectException, type=ReferenceType(arguments=None, dimensions=[], name=SubjectException, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SubjectRepository, sub_type=ReferenceType(arguments=None, dimensions=None, name=SubjectUseCase, sub_type=None)))], member=createSubject, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] { Keyword[try] { identifier[Thread] operator[SEP] identifier[sleep] operator[SEP] Other[1000] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InterruptedException] identifier[e] operator[SEP] { identifier[e] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } Keyword[super] operator[SEP] identifier[subjectRepository] operator[SEP] identifier[createSubject] operator[SEP] Keyword[this] operator[SEP] identifier[subject] , Keyword[new] identifier[SubjectRepository] operator[SEP] identifier[SubjectUseCase] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onMissionAccomplished] operator[SEP] Keyword[final] identifier[Subject] identifier[subject] operator[SEP] { identifier[CreateSubjectUseCaseImp] operator[SEP] Keyword[super] operator[SEP] identifier[mainThread] operator[SEP] identifier[post] operator[SEP] Keyword[new] identifier[Runnable] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] { identifier[callback] operator[SEP] identifier[onMissionAccomplished] operator[SEP] identifier[subject] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onError] operator[SEP] Keyword[final] identifier[SubjectException] identifier[subjectException] operator[SEP] { identifier[CreateSubjectUseCaseImp] operator[SEP] Keyword[super] operator[SEP] identifier[mainThread] operator[SEP] identifier[post] operator[SEP] Keyword[new] identifier[Runnable] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] { identifier[callback] operator[SEP] identifier[onError] operator[SEP] identifier[subjectException] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
private void setupButtons() { cancelButton = (TextView) findViewById(R.id.cancelButton); cancelButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { setResult(CANCELLED); finish(); } }); forgetButton = (TextView) findViewById(R.id.forgotPin); forgetButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { onForgotPin(); setResult(FORGOT); finish(); } }); }
class class_name[name] begin[{] method[setupButtons, return_type[void], modifier[private], parameter[]] begin[{] assign[member[.cancelButton], Cast(expression=MethodInvocation(arguments=[MemberReference(member=cancelButton, postfix_operators=[], prefix_operators=[], qualifier=R.id, selectors=[])], member=findViewById, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=TextView, sub_type=None))] call[cancelButton.setOnClickListener, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=CANCELLED, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=finish, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=onClick, parameters=[FormalParameter(annotations=[], modifiers=set(), name=v, type=ReferenceType(arguments=None, dimensions=[], name=View, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=View, sub_type=ReferenceType(arguments=None, dimensions=None, name=OnClickListener, sub_type=None)))]] assign[member[.forgetButton], Cast(expression=MethodInvocation(arguments=[MemberReference(member=forgotPin, postfix_operators=[], prefix_operators=[], qualifier=R.id, selectors=[])], member=findViewById, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=TextView, sub_type=None))] call[forgetButton.setOnClickListener, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[], member=onForgotPin, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FORGOT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=finish, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=onClick, parameters=[FormalParameter(annotations=[], modifiers=set(), name=v, type=ReferenceType(arguments=None, dimensions=[], name=View, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=View, sub_type=ReferenceType(arguments=None, dimensions=None, name=OnClickListener, sub_type=None)))]] end[}] END[}]
Keyword[private] Keyword[void] identifier[setupButtons] operator[SEP] operator[SEP] { identifier[cancelButton] operator[=] operator[SEP] identifier[TextView] operator[SEP] identifier[findViewById] operator[SEP] identifier[R] operator[SEP] identifier[id] operator[SEP] identifier[cancelButton] operator[SEP] operator[SEP] identifier[cancelButton] operator[SEP] identifier[setOnClickListener] operator[SEP] Keyword[new] identifier[View] operator[SEP] identifier[OnClickListener] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onClick] operator[SEP] identifier[View] identifier[v] operator[SEP] { identifier[setResult] operator[SEP] identifier[CANCELLED] operator[SEP] operator[SEP] identifier[finish] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[forgetButton] operator[=] operator[SEP] identifier[TextView] operator[SEP] identifier[findViewById] operator[SEP] identifier[R] operator[SEP] identifier[id] operator[SEP] identifier[forgotPin] operator[SEP] operator[SEP] identifier[forgetButton] operator[SEP] identifier[setOnClickListener] operator[SEP] Keyword[new] identifier[View] operator[SEP] identifier[OnClickListener] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onClick] operator[SEP] identifier[View] identifier[v] operator[SEP] { identifier[onForgotPin] operator[SEP] operator[SEP] operator[SEP] identifier[setResult] operator[SEP] identifier[FORGOT] operator[SEP] operator[SEP] identifier[finish] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
<T> Class<T> loadClass(String name) throws ClassNotFoundException { ClassLoader cl = Thread.currentThread().getContextClassLoader(); if (null == cl) { cl = ToHelper.class.getClassLoader(); } return (Class<T>) cl.loadClass(name); }
class class_name[name] begin[{] method[loadClass, return_type[type[Class]], modifier[default], parameter[name]] begin[{] local_variable[type[ClassLoader], cl] if[binary_operation[literal[null], ==, member[.cl]]] begin[{] assign[member[.cl], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getClassLoader, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=ToHelper, sub_type=None))] else begin[{] None end[}] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=loadClass, postfix_operators=[], prefix_operators=[], qualifier=cl, selectors=[], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=Class, sub_type=None))] end[}] END[}]
operator[<] identifier[T] operator[>] identifier[Class] operator[<] identifier[T] operator[>] identifier[loadClass] operator[SEP] identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[ClassNotFoundException] { identifier[ClassLoader] identifier[cl] operator[=] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] identifier[getContextClassLoader] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[==] identifier[cl] operator[SEP] { identifier[cl] operator[=] identifier[ToHelper] operator[SEP] Keyword[class] operator[SEP] identifier[getClassLoader] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] operator[SEP] identifier[cl] operator[SEP] identifier[loadClass] operator[SEP] identifier[name] operator[SEP] operator[SEP] }
public static int streamableBytes(StreamByteDistributor.StreamState state) { return max(0, (int) min(state.pendingBytes(), state.windowSize())); }
class class_name[name] begin[{] method[streamableBytes, return_type[type[int]], modifier[public static], parameter[state]] begin[{] return[call[.max, parameter[literal[0], Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=pendingBytes, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=windowSize, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[], type_arguments=None)], member=min, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int))]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[streamableBytes] operator[SEP] identifier[StreamByteDistributor] operator[SEP] identifier[StreamState] identifier[state] operator[SEP] { Keyword[return] identifier[max] operator[SEP] Other[0] , operator[SEP] Keyword[int] operator[SEP] identifier[min] operator[SEP] identifier[state] operator[SEP] identifier[pendingBytes] operator[SEP] operator[SEP] , identifier[state] operator[SEP] identifier[windowSize] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void marshall(TransformJobSummary transformJobSummary, ProtocolMarshaller protocolMarshaller) { if (transformJobSummary == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(transformJobSummary.getTransformJobName(), TRANSFORMJOBNAME_BINDING); protocolMarshaller.marshall(transformJobSummary.getTransformJobArn(), TRANSFORMJOBARN_BINDING); protocolMarshaller.marshall(transformJobSummary.getCreationTime(), CREATIONTIME_BINDING); protocolMarshaller.marshall(transformJobSummary.getTransformEndTime(), TRANSFORMENDTIME_BINDING); protocolMarshaller.marshall(transformJobSummary.getLastModifiedTime(), LASTMODIFIEDTIME_BINDING); protocolMarshaller.marshall(transformJobSummary.getTransformJobStatus(), TRANSFORMJOBSTATUS_BINDING); protocolMarshaller.marshall(transformJobSummary.getFailureReason(), FAILUREREASON_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[transformJobSummary, protocolMarshaller]] begin[{] if[binary_operation[member[.transformJobSummary], ==, 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=getTransformJobName, postfix_operators=[], prefix_operators=[], qualifier=transformJobSummary, selectors=[], type_arguments=None), MemberReference(member=TRANSFORMJOBNAME_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTransformJobArn, postfix_operators=[], prefix_operators=[], qualifier=transformJobSummary, selectors=[], type_arguments=None), MemberReference(member=TRANSFORMJOBARN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getCreationTime, postfix_operators=[], prefix_operators=[], qualifier=transformJobSummary, selectors=[], type_arguments=None), MemberReference(member=CREATIONTIME_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTransformEndTime, postfix_operators=[], prefix_operators=[], qualifier=transformJobSummary, selectors=[], type_arguments=None), MemberReference(member=TRANSFORMENDTIME_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLastModifiedTime, postfix_operators=[], prefix_operators=[], qualifier=transformJobSummary, selectors=[], type_arguments=None), MemberReference(member=LASTMODIFIEDTIME_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTransformJobStatus, postfix_operators=[], prefix_operators=[], qualifier=transformJobSummary, selectors=[], type_arguments=None), MemberReference(member=TRANSFORMJOBSTATUS_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getFailureReason, postfix_operators=[], prefix_operators=[], qualifier=transformJobSummary, selectors=[], type_arguments=None), MemberReference(member=FAILUREREASON_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[TransformJobSummary] identifier[transformJobSummary] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[transformJobSummary] 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[transformJobSummary] operator[SEP] identifier[getTransformJobName] operator[SEP] operator[SEP] , identifier[TRANSFORMJOBNAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[transformJobSummary] operator[SEP] identifier[getTransformJobArn] operator[SEP] operator[SEP] , identifier[TRANSFORMJOBARN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[transformJobSummary] operator[SEP] identifier[getCreationTime] operator[SEP] operator[SEP] , identifier[CREATIONTIME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[transformJobSummary] operator[SEP] identifier[getTransformEndTime] operator[SEP] operator[SEP] , identifier[TRANSFORMENDTIME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[transformJobSummary] operator[SEP] identifier[getLastModifiedTime] operator[SEP] operator[SEP] , identifier[LASTMODIFIEDTIME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[transformJobSummary] operator[SEP] identifier[getTransformJobStatus] operator[SEP] operator[SEP] , identifier[TRANSFORMJOBSTATUS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[transformJobSummary] operator[SEP] identifier[getFailureReason] operator[SEP] operator[SEP] , identifier[FAILUREREASON_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 T authentication(String username, String password, boolean allowAnyHost) { if (StringUtils.isNotBlank(username)) { if (defaultHost == null || StringUtils.isBlank(defaultHost.getHostName())) { throw new IllegalStateException("Cannot configure authentication when host is not set."); } AuthScope authscope = allowAnyHost ? new AuthScope(AuthScope.ANY_HOST, AuthScope.ANY_PORT, AuthScope.ANY_REALM) : new AuthScope(defaultHost.getHostName(), AuthScope.ANY_PORT, AuthScope.ANY_REALM); credsProvider.setCredentials(authscope, new UsernamePasswordCredentials(username, password)); } return self(); }
class class_name[name] begin[{] method[authentication, return_type[type[T]], modifier[public], parameter[username, password, allowAnyHost]] begin[{] if[call[StringUtils.isNotBlank, parameter[member[.username]]]] begin[{] if[binary_operation[binary_operation[member[.defaultHost], ==, literal[null]], ||, call[StringUtils.isBlank, parameter[call[defaultHost.getHostName, parameter[]]]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot configure authentication when host is not set.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[AuthScope], authscope] call[credsProvider.setCredentials, parameter[member[.authscope], ClassCreator(arguments=[MemberReference(member=username, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=password, 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=UsernamePasswordCredentials, sub_type=None))]] else begin[{] None end[}] return[call[.self, parameter[]]] end[}] END[}]
Keyword[public] identifier[T] identifier[authentication] operator[SEP] identifier[String] identifier[username] , identifier[String] identifier[password] , Keyword[boolean] identifier[allowAnyHost] operator[SEP] { Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isNotBlank] operator[SEP] identifier[username] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[defaultHost] operator[==] Other[null] operator[||] identifier[StringUtils] operator[SEP] identifier[isBlank] operator[SEP] identifier[defaultHost] operator[SEP] identifier[getHostName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[AuthScope] identifier[authscope] operator[=] identifier[allowAnyHost] operator[?] Keyword[new] identifier[AuthScope] operator[SEP] identifier[AuthScope] operator[SEP] identifier[ANY_HOST] , identifier[AuthScope] operator[SEP] identifier[ANY_PORT] , identifier[AuthScope] operator[SEP] identifier[ANY_REALM] operator[SEP] operator[:] Keyword[new] identifier[AuthScope] operator[SEP] identifier[defaultHost] operator[SEP] identifier[getHostName] operator[SEP] operator[SEP] , identifier[AuthScope] operator[SEP] identifier[ANY_PORT] , identifier[AuthScope] operator[SEP] identifier[ANY_REALM] operator[SEP] operator[SEP] identifier[credsProvider] operator[SEP] identifier[setCredentials] operator[SEP] identifier[authscope] , Keyword[new] identifier[UsernamePasswordCredentials] operator[SEP] identifier[username] , identifier[password] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[self] operator[SEP] operator[SEP] operator[SEP] }
@Override public Prediction _predictRecord(Record r) { Set<Object> classesSet = knowledgeBase.getModelParameters().getClasses(); AssociativeArray predictionScores = new AssociativeArray(); for(Object theClass : classesSet) { predictionScores.put(theClass, calculateClassScore(r.getX(), theClass)); } Object predictedClass=getSelectedClassFromClassScores(predictionScores); Descriptives.normalizeExp(predictionScores); return new Prediction(predictedClass, predictionScores); }
class class_name[name] begin[{] method[_predictRecord, return_type[type[Prediction]], modifier[public], parameter[r]] begin[{] local_variable[type[Set], classesSet] local_variable[type[AssociativeArray], predictionScores] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=theClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getX, postfix_operators=[], prefix_operators=[], qualifier=r, selectors=[], type_arguments=None), MemberReference(member=theClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=calculateClassScore, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=predictionScores, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=classesSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=theClass)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))), label=None) local_variable[type[Object], predictedClass] call[Descriptives.normalizeExp, parameter[member[.predictionScores]]] return[ClassCreator(arguments=[MemberReference(member=predictedClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=predictionScores, 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=Prediction, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Prediction] identifier[_predictRecord] operator[SEP] identifier[Record] identifier[r] operator[SEP] { identifier[Set] operator[<] identifier[Object] operator[>] identifier[classesSet] operator[=] identifier[knowledgeBase] operator[SEP] identifier[getModelParameters] operator[SEP] operator[SEP] operator[SEP] identifier[getClasses] operator[SEP] operator[SEP] operator[SEP] identifier[AssociativeArray] identifier[predictionScores] operator[=] Keyword[new] identifier[AssociativeArray] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Object] identifier[theClass] operator[:] identifier[classesSet] operator[SEP] { identifier[predictionScores] operator[SEP] identifier[put] operator[SEP] identifier[theClass] , identifier[calculateClassScore] operator[SEP] identifier[r] operator[SEP] identifier[getX] operator[SEP] operator[SEP] , identifier[theClass] operator[SEP] operator[SEP] operator[SEP] } identifier[Object] identifier[predictedClass] operator[=] identifier[getSelectedClassFromClassScores] operator[SEP] identifier[predictionScores] operator[SEP] operator[SEP] identifier[Descriptives] operator[SEP] identifier[normalizeExp] operator[SEP] identifier[predictionScores] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[Prediction] operator[SEP] identifier[predictedClass] , identifier[predictionScores] operator[SEP] operator[SEP] }
public void writeTo(final PacketOutputStream pos) throws IOException { DateTimeFormatter formatter = DateTimeFormatter.ofPattern( fractionalSeconds ? "yyyy-MM-dd HH:mm:ss.SSSSSS" : "yyyy-MM-dd HH:mm:ss", Locale.ENGLISH); pos.write(QUOTE); pos.write(formatter.format(tz).getBytes()); pos.write(QUOTE); }
class class_name[name] begin[{] method[writeTo, return_type[void], modifier[public], parameter[pos]] begin[{] local_variable[type[DateTimeFormatter], formatter] call[pos.write, parameter[member[.QUOTE]]] call[pos.write, parameter[call[formatter.format, parameter[member[.tz]]]]] call[pos.write, parameter[member[.QUOTE]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[writeTo] operator[SEP] Keyword[final] identifier[PacketOutputStream] identifier[pos] operator[SEP] Keyword[throws] identifier[IOException] { identifier[DateTimeFormatter] identifier[formatter] operator[=] identifier[DateTimeFormatter] operator[SEP] identifier[ofPattern] operator[SEP] identifier[fractionalSeconds] operator[?] literal[String] operator[:] literal[String] , identifier[Locale] operator[SEP] identifier[ENGLISH] operator[SEP] operator[SEP] identifier[pos] operator[SEP] identifier[write] operator[SEP] identifier[QUOTE] operator[SEP] operator[SEP] identifier[pos] operator[SEP] identifier[write] operator[SEP] identifier[formatter] operator[SEP] identifier[format] operator[SEP] identifier[tz] operator[SEP] operator[SEP] identifier[getBytes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[pos] operator[SEP] identifier[write] operator[SEP] identifier[QUOTE] operator[SEP] operator[SEP] }
@Override public void setState(TransferState state) { super.setState(state); switch (state) { case Completed : fireProgressEvent(ProgressEventType.TRANSFER_COMPLETED_EVENT); break; case Canceled: fireProgressEvent(ProgressEventType.TRANSFER_CANCELED_EVENT); break; case Failed: fireProgressEvent(ProgressEventType.TRANSFER_FAILED_EVENT); break; default: break; } }
class class_name[name] begin[{] method[setState, return_type[void], modifier[public], parameter[state]] begin[{] SuperMethodInvocation(arguments=[MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setState, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) SwitchStatement(cases=[SwitchStatementCase(case=['Completed'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TRANSFER_COMPLETED_EVENT, postfix_operators=[], prefix_operators=[], qualifier=ProgressEventType, selectors=[])], member=fireProgressEvent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['Canceled'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TRANSFER_CANCELED_EVENT, postfix_operators=[], prefix_operators=[], qualifier=ProgressEventType, selectors=[])], member=fireProgressEvent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['Failed'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TRANSFER_FAILED_EVENT, postfix_operators=[], prefix_operators=[], qualifier=ProgressEventType, selectors=[])], member=fireProgressEvent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=None, label=None)])], expression=MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setState] operator[SEP] identifier[TransferState] identifier[state] operator[SEP] { Keyword[super] operator[SEP] identifier[setState] operator[SEP] identifier[state] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[state] operator[SEP] { Keyword[case] identifier[Completed] operator[:] identifier[fireProgressEvent] operator[SEP] identifier[ProgressEventType] operator[SEP] identifier[TRANSFER_COMPLETED_EVENT] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Canceled] operator[:] identifier[fireProgressEvent] operator[SEP] identifier[ProgressEventType] operator[SEP] identifier[TRANSFER_CANCELED_EVENT] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Failed] operator[:] identifier[fireProgressEvent] operator[SEP] identifier[ProgressEventType] operator[SEP] identifier[TRANSFER_FAILED_EVENT] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[break] operator[SEP] } }
public void setCustomFields(Map<String, String> fields) { clearCustomFields(); for (String key : fields.keySet()) { CustomField f = new CustomField(); f.setName(key); f.setValue(fields.get(key)); customFields.add(f); } }
class class_name[name] begin[{] method[setCustomFields, return_type[void], modifier[public], parameter[fields]] begin[{] call[.clearCustomFields, parameter[]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CustomField, sub_type=None)), name=f)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CustomField, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setName, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=fields, selectors=[], type_arguments=None)], member=setValue, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=customFields, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=fields, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[setCustomFields] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[fields] operator[SEP] { identifier[clearCustomFields] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[key] operator[:] identifier[fields] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { identifier[CustomField] identifier[f] operator[=] Keyword[new] identifier[CustomField] operator[SEP] operator[SEP] operator[SEP] identifier[f] operator[SEP] identifier[setName] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[f] operator[SEP] identifier[setValue] operator[SEP] identifier[fields] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] operator[SEP] identifier[customFields] operator[SEP] identifier[add] operator[SEP] identifier[f] operator[SEP] operator[SEP] } }
@Nonnull public static SimpleURL getStreamURL (@Nonnull final IRequestWebScopeWithoutResponse aRequestScope, @Nonnull @Nonempty final String sURL) { ValueEnforcer.notNull (aRequestScope, "RequestScope"); ValueEnforcer.notEmpty (sURL, "URL"); // If the URL is absolute, use it if (hasKnownProtocol (sURL)) return new SimpleURL (sURL); final StringBuilder aPrefix = new StringBuilder (getStreamServletPath ()); if (!StringHelper.startsWith (sURL, '/')) aPrefix.append ('/'); return getURLWithContext (aRequestScope, aPrefix.append (sURL).toString ()); }
class class_name[name] begin[{] method[getStreamURL, return_type[type[SimpleURL]], modifier[public static], parameter[aRequestScope, sURL]] begin[{] call[ValueEnforcer.notNull, parameter[member[.aRequestScope], literal["RequestScope"]]] call[ValueEnforcer.notEmpty, parameter[member[.sURL], literal["URL"]]] if[call[.hasKnownProtocol, parameter[member[.sURL]]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=sURL, 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=SimpleURL, sub_type=None))] else begin[{] None end[}] local_variable[type[StringBuilder], aPrefix] if[call[StringHelper.startsWith, parameter[member[.sURL], literal['/']]]] begin[{] call[aPrefix.append, parameter[literal['/']]] else begin[{] None end[}] return[call[.getURLWithContext, parameter[member[.aRequestScope], call[aPrefix.append, parameter[member[.sURL]]]]]] end[}] END[}]
annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] identifier[SimpleURL] identifier[getStreamURL] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[IRequestWebScopeWithoutResponse] identifier[aRequestScope] , annotation[@] identifier[Nonnull] annotation[@] identifier[Nonempty] Keyword[final] identifier[String] identifier[sURL] operator[SEP] { identifier[ValueEnforcer] operator[SEP] identifier[notNull] operator[SEP] identifier[aRequestScope] , literal[String] operator[SEP] operator[SEP] identifier[ValueEnforcer] operator[SEP] identifier[notEmpty] operator[SEP] identifier[sURL] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[hasKnownProtocol] operator[SEP] identifier[sURL] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[SimpleURL] operator[SEP] identifier[sURL] operator[SEP] operator[SEP] Keyword[final] identifier[StringBuilder] identifier[aPrefix] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[getStreamServletPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[StringHelper] operator[SEP] identifier[startsWith] operator[SEP] identifier[sURL] , literal[String] operator[SEP] operator[SEP] identifier[aPrefix] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[getURLWithContext] operator[SEP] identifier[aRequestScope] , identifier[aPrefix] operator[SEP] identifier[append] operator[SEP] identifier[sURL] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public com.google.api.ads.adwords.axis.v201809.cm.ProductBiddingCategory getParentDimensionValue() { return parentDimensionValue; }
class class_name[name] begin[{] method[getParentDimensionValue, return_type[type[com]], modifier[public], parameter[]] begin[{] return[member[.parentDimensionValue]] end[}] END[}]
Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[adwords] operator[SEP] identifier[axis] operator[SEP] identifier[v201809] operator[SEP] identifier[cm] operator[SEP] identifier[ProductBiddingCategory] identifier[getParentDimensionValue] operator[SEP] operator[SEP] { Keyword[return] identifier[parentDimensionValue] operator[SEP] }
public void setJobsNotFound(java.util.Collection<String> jobsNotFound) { if (jobsNotFound == null) { this.jobsNotFound = null; return; } this.jobsNotFound = new java.util.ArrayList<String>(jobsNotFound); }
class class_name[name] begin[{] method[setJobsNotFound, return_type[void], modifier[public], parameter[jobsNotFound]] begin[{] if[binary_operation[member[.jobsNotFound], ==, literal[null]]] begin[{] assign[THIS[member[None.jobsNotFound]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.jobsNotFound]], ClassCreator(arguments=[MemberReference(member=jobsNotFound, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setJobsNotFound] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[jobsNotFound] operator[SEP] { Keyword[if] operator[SEP] identifier[jobsNotFound] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[jobsNotFound] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[jobsNotFound] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] identifier[jobsNotFound] operator[SEP] operator[SEP] }
public boolean matches(Object obj) { if (!(obj instanceof Exception)) return false; Exception exception = (Exception) obj; return exception.getCause() == null; }
class class_name[name] begin[{] method[matches, return_type[type[boolean]], modifier[public], parameter[obj]] begin[{] if[binary_operation[member[.obj], instanceof, type[Exception]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[Exception], exception] return[binary_operation[call[exception.getCause, parameter[]], ==, literal[null]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[matches] operator[SEP] identifier[Object] identifier[obj] operator[SEP] { Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[obj] Keyword[instanceof] identifier[Exception] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] identifier[Exception] identifier[exception] operator[=] operator[SEP] identifier[Exception] operator[SEP] identifier[obj] operator[SEP] Keyword[return] identifier[exception] operator[SEP] identifier[getCause] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] }
private final int appendNode(int w0, int w1, int w2, int w3) { // A decent compiler may inline this. int slotnumber = nodes.appendSlot(w0, w1, w2, w3); if (DEBUG) System.out.println(slotnumber+": "+w0+" "+w1+" "+w2+" "+w3); if (previousSiblingWasParent) nodes.writeEntry(previousSibling,2,slotnumber); previousSiblingWasParent = false; // Set the default; endElement overrides return slotnumber; }
class class_name[name] begin[{] method[appendNode, return_type[type[int]], modifier[final private], parameter[w0, w1, w2, w3]] begin[{] local_variable[type[int], slotnumber] if[member[.DEBUG]] begin[{] call[System.out.println, parameter[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[member[.slotnumber], +, literal[": "]], +, member[.w0]], +, literal[" "]], +, member[.w1]], +, literal[" "]], +, member[.w2]], +, literal[" "]], +, member[.w3]]]] else begin[{] None end[}] if[member[.previousSiblingWasParent]] begin[{] call[nodes.writeEntry, parameter[member[.previousSibling], literal[2], member[.slotnumber]]] else begin[{] None end[}] assign[member[.previousSiblingWasParent], literal[false]] return[member[.slotnumber]] end[}] END[}]
Keyword[private] Keyword[final] Keyword[int] identifier[appendNode] operator[SEP] Keyword[int] identifier[w0] , Keyword[int] identifier[w1] , Keyword[int] identifier[w2] , Keyword[int] identifier[w3] operator[SEP] { Keyword[int] identifier[slotnumber] operator[=] identifier[nodes] operator[SEP] identifier[appendSlot] operator[SEP] identifier[w0] , identifier[w1] , identifier[w2] , identifier[w3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[DEBUG] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[slotnumber] operator[+] literal[String] operator[+] identifier[w0] operator[+] literal[String] operator[+] identifier[w1] operator[+] literal[String] operator[+] identifier[w2] operator[+] literal[String] operator[+] identifier[w3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[previousSiblingWasParent] operator[SEP] identifier[nodes] operator[SEP] identifier[writeEntry] operator[SEP] identifier[previousSibling] , Other[2] , identifier[slotnumber] operator[SEP] operator[SEP] identifier[previousSiblingWasParent] operator[=] literal[boolean] operator[SEP] Keyword[return] identifier[slotnumber] operator[SEP] }
public boolean matchesPosTagRegex(String posTagRegex) { Pattern pattern = Pattern.compile(posTagRegex); boolean found = false; for (AnalyzedToken reading : anTokReadings) { if (reading.getPOSTag() != null) { found = pattern.matcher(reading.getPOSTag()).matches(); if (found) { break; } } } return found; }
class class_name[name] begin[{] method[matchesPosTagRegex, return_type[type[boolean]], modifier[public], parameter[posTagRegex]] begin[{] local_variable[type[Pattern], pattern] local_variable[type[boolean], found] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getPOSTag, postfix_operators=[], prefix_operators=[], qualifier=reading, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=found, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getPOSTag, postfix_operators=[], prefix_operators=[], qualifier=reading, selectors=[], type_arguments=None)], member=matcher, postfix_operators=[], prefix_operators=[], qualifier=pattern, selectors=[MethodInvocation(arguments=[], member=matches, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), IfStatement(condition=MemberReference(member=found, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)]))]))]), control=EnhancedForControl(iterable=MemberReference(member=anTokReadings, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=reading)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AnalyzedToken, sub_type=None))), label=None) return[member[.found]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[matchesPosTagRegex] operator[SEP] identifier[String] identifier[posTagRegex] operator[SEP] { identifier[Pattern] identifier[pattern] operator[=] identifier[Pattern] operator[SEP] identifier[compile] operator[SEP] identifier[posTagRegex] operator[SEP] operator[SEP] Keyword[boolean] identifier[found] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[AnalyzedToken] identifier[reading] operator[:] identifier[anTokReadings] operator[SEP] { Keyword[if] operator[SEP] identifier[reading] operator[SEP] identifier[getPOSTag] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[found] operator[=] identifier[pattern] operator[SEP] identifier[matcher] operator[SEP] identifier[reading] operator[SEP] identifier[getPOSTag] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[found] operator[SEP] { Keyword[break] operator[SEP] } } } Keyword[return] identifier[found] operator[SEP] }
@Override public UnixSshPath relativize( Path other ) { if ( other == null ) { throw new NullPointerException(); } if ( !(other instanceof UnixSshPath) ) { throw new ProviderMismatchException(); } UnixSshPath unixOther = (UnixSshPath) other; if ( isAbsolute() && !unixOther.isAbsolute() ) { throw new IllegalArgumentException( "this and other must have same isAbsolute" ); } if ( getNameCount() == 0 ) { return unixOther; } Path relative = null; Path remainingOther = null; Iterator<Path> otherIterator = unixOther.iterator(); for ( Path part : this ) { if ( relative != null ) { relative = relative.resolve( ".." ); continue; } if ( otherIterator.hasNext() ) { Path otherPart = otherIterator.next(); if ( !part.equals( otherPart ) ) { remainingOther = otherPart; while ( otherIterator.hasNext() ) { remainingOther = remainingOther.resolve( otherIterator.next() ); } relative = new UnixSshPath( getFileSystem(), ".." ); } } else { relative = new UnixSshPath( getFileSystem(), ".." ); } } if ( relative == null ) { while ( otherIterator.hasNext() ) { if ( remainingOther == null ) { remainingOther = new UnixSshPath( getFileSystem(), "" ); } else { remainingOther = remainingOther.resolve( otherIterator.next() ); } } return remainingOther == null ? new UnixSshPath( getFileSystem(), "" ) : (UnixSshPath) remainingOther; } return remainingOther == null ? (UnixSshPath) relative : (UnixSshPath) relative.resolve( remainingOther ); }
class class_name[name] begin[{] method[relativize, return_type[type[UnixSshPath]], modifier[public], parameter[other]] begin[{] if[binary_operation[member[.other], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NullPointerException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.other], instanceof, type[UnixSshPath]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ProviderMismatchException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[UnixSshPath], unixOther] if[binary_operation[call[.isAbsolute, parameter[]], &&, call[unixOther.isAbsolute, parameter[]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="this and other must have same isAbsolute")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[call[.getNameCount, parameter[]], ==, literal[0]]] begin[{] return[member[.unixOther]] else begin[{] None end[}] local_variable[type[Path], relative] local_variable[type[Path], remainingOther] local_variable[type[Iterator], otherIterator] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=relative, 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=relative, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="..")], member=resolve, postfix_operators=[], prefix_operators=[], qualifier=relative, selectors=[], type_arguments=None)), label=None), ContinueStatement(goto=None, label=None)])), IfStatement(condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=otherIterator, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=relative, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getFileSystem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), 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=UnixSshPath, sub_type=None))), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=otherIterator, selectors=[], type_arguments=None), name=otherPart)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Path, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=otherPart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=['!'], qualifier=part, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=remainingOther, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=otherPart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=remainingOther, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=otherIterator, selectors=[], type_arguments=None)], member=resolve, postfix_operators=[], prefix_operators=[], qualifier=remainingOther, selectors=[], type_arguments=None)), label=None)]), condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=otherIterator, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=relative, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getFileSystem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), 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=UnixSshPath, sub_type=None))), label=None)]))]))]), control=EnhancedForControl(iterable=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=part)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Path, sub_type=None))), label=None) if[binary_operation[member[.relative], ==, literal[null]]] begin[{] while[call[otherIterator.hasNext, parameter[]]] begin[{] if[binary_operation[member[.remainingOther], ==, literal[null]]] begin[{] assign[member[.remainingOther], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getFileSystem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), 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=UnixSshPath, sub_type=None))] else begin[{] assign[member[.remainingOther], call[remainingOther.resolve, parameter[call[otherIterator.next, parameter[]]]]] end[}] end[}] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=remainingOther, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=Cast(expression=MemberReference(member=remainingOther, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=UnixSshPath, sub_type=None)), if_true=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getFileSystem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), 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=UnixSshPath, sub_type=None)))] else begin[{] None end[}] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=remainingOther, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=Cast(expression=MethodInvocation(arguments=[MemberReference(member=remainingOther, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=resolve, postfix_operators=[], prefix_operators=[], qualifier=relative, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=UnixSshPath, sub_type=None)), if_true=Cast(expression=MemberReference(member=relative, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=UnixSshPath, sub_type=None)))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[UnixSshPath] identifier[relativize] operator[SEP] identifier[Path] identifier[other] operator[SEP] { Keyword[if] operator[SEP] identifier[other] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[other] Keyword[instanceof] identifier[UnixSshPath] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[ProviderMismatchException] operator[SEP] operator[SEP] operator[SEP] } identifier[UnixSshPath] identifier[unixOther] operator[=] operator[SEP] identifier[UnixSshPath] operator[SEP] identifier[other] operator[SEP] Keyword[if] operator[SEP] identifier[isAbsolute] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[unixOther] operator[SEP] identifier[isAbsolute] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[getNameCount] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[return] identifier[unixOther] operator[SEP] } identifier[Path] identifier[relative] operator[=] Other[null] operator[SEP] identifier[Path] identifier[remainingOther] operator[=] Other[null] operator[SEP] identifier[Iterator] operator[<] identifier[Path] operator[>] identifier[otherIterator] operator[=] identifier[unixOther] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Path] identifier[part] operator[:] Keyword[this] operator[SEP] { Keyword[if] operator[SEP] identifier[relative] operator[!=] Other[null] operator[SEP] { identifier[relative] operator[=] identifier[relative] operator[SEP] identifier[resolve] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] } Keyword[if] operator[SEP] identifier[otherIterator] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[Path] identifier[otherPart] operator[=] identifier[otherIterator] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[part] operator[SEP] identifier[equals] operator[SEP] identifier[otherPart] operator[SEP] operator[SEP] { identifier[remainingOther] operator[=] identifier[otherPart] operator[SEP] Keyword[while] operator[SEP] identifier[otherIterator] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[remainingOther] operator[=] identifier[remainingOther] operator[SEP] identifier[resolve] operator[SEP] identifier[otherIterator] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[relative] operator[=] Keyword[new] identifier[UnixSshPath] operator[SEP] identifier[getFileSystem] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] } } Keyword[else] { identifier[relative] operator[=] Keyword[new] identifier[UnixSshPath] operator[SEP] identifier[getFileSystem] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[relative] operator[==] Other[null] operator[SEP] { Keyword[while] operator[SEP] identifier[otherIterator] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[remainingOther] operator[==] Other[null] operator[SEP] { identifier[remainingOther] operator[=] Keyword[new] identifier[UnixSshPath] operator[SEP] identifier[getFileSystem] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[remainingOther] operator[=] identifier[remainingOther] operator[SEP] identifier[resolve] operator[SEP] identifier[otherIterator] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[remainingOther] operator[==] Other[null] operator[?] Keyword[new] identifier[UnixSshPath] operator[SEP] identifier[getFileSystem] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[:] operator[SEP] identifier[UnixSshPath] operator[SEP] identifier[remainingOther] operator[SEP] } Keyword[return] identifier[remainingOther] operator[==] Other[null] operator[?] operator[SEP] identifier[UnixSshPath] operator[SEP] identifier[relative] operator[:] operator[SEP] identifier[UnixSshPath] operator[SEP] identifier[relative] operator[SEP] identifier[resolve] operator[SEP] identifier[remainingOther] operator[SEP] operator[SEP] }
protected Color getTextForeground(boolean selected) { Color c = UIManager.getColor(selected ? "SimpleInternalFrame.activeTitleForeground" : "SimpleInternalFrame.inactiveTitleForeground"); if (c != null) { return c; } return UIManager.getColor(selected ? "InternalFrame.activeTitleForeground" : "Label.foreground"); }
class class_name[name] begin[{] method[getTextForeground, return_type[type[Color]], modifier[protected], parameter[selected]] begin[{] local_variable[type[Color], c] if[binary_operation[member[.c], !=, literal[null]]] begin[{] return[member[.c]] else begin[{] None end[}] return[call[UIManager.getColor, parameter[TernaryExpression(condition=MemberReference(member=selected, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Label.foreground"), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="InternalFrame.activeTitleForeground"))]]] end[}] END[}]
Keyword[protected] identifier[Color] identifier[getTextForeground] operator[SEP] Keyword[boolean] identifier[selected] operator[SEP] { identifier[Color] identifier[c] operator[=] identifier[UIManager] operator[SEP] identifier[getColor] operator[SEP] identifier[selected] operator[?] literal[String] operator[:] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[c] operator[SEP] } Keyword[return] identifier[UIManager] operator[SEP] identifier[getColor] operator[SEP] identifier[selected] operator[?] literal[String] operator[:] literal[String] operator[SEP] operator[SEP] }
public static vpnglobal_vpnintranetapplication_binding[] get_filtered(nitro_service service, String filter) throws Exception{ vpnglobal_vpnintranetapplication_binding obj = new vpnglobal_vpnintranetapplication_binding(); options option = new options(); option.set_filter(filter); vpnglobal_vpnintranetapplication_binding[] response = (vpnglobal_vpnintranetapplication_binding[]) obj.getfiltered(service, option); return response; }
class class_name[name] begin[{] method[get_filtered, return_type[type[vpnglobal_vpnintranetapplication_binding]], modifier[public static], parameter[service, filter]] begin[{] local_variable[type[vpnglobal_vpnintranetapplication_binding], obj] local_variable[type[options], option] call[option.set_filter, parameter[member[.filter]]] local_variable[type[vpnglobal_vpnintranetapplication_binding], response] return[member[.response]] end[}] END[}]
Keyword[public] Keyword[static] identifier[vpnglobal_vpnintranetapplication_binding] operator[SEP] operator[SEP] identifier[get_filtered] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[filter] operator[SEP] Keyword[throws] identifier[Exception] { identifier[vpnglobal_vpnintranetapplication_binding] identifier[obj] operator[=] Keyword[new] identifier[vpnglobal_vpnintranetapplication_binding] operator[SEP] operator[SEP] operator[SEP] identifier[options] identifier[option] operator[=] Keyword[new] identifier[options] operator[SEP] operator[SEP] operator[SEP] identifier[option] operator[SEP] identifier[set_filter] operator[SEP] identifier[filter] operator[SEP] operator[SEP] identifier[vpnglobal_vpnintranetapplication_binding] operator[SEP] operator[SEP] identifier[response] operator[=] operator[SEP] identifier[vpnglobal_vpnintranetapplication_binding] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[getfiltered] operator[SEP] identifier[service] , identifier[option] operator[SEP] operator[SEP] Keyword[return] identifier[response] operator[SEP] }
@Override public InputType getOutputType(InputType... inputType) throws InvalidKerasConfigurationException { if (inputType.length > 1) throw new InvalidKerasConfigurationException( "Keras LRN layer accepts only one input (received " + inputType.length + ")"); return this.getLocalResponseNormalization().getOutputType(-1, inputType[0]); }
class class_name[name] begin[{] method[getOutputType, return_type[type[InputType]], modifier[public], parameter[inputType]] begin[{] if[binary_operation[member[inputType.length], >, literal[1]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Keras LRN layer accepts only one input (received "), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=inputType, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=")"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InvalidKerasConfigurationException, sub_type=None)), label=None) else begin[{] None end[}] return[THIS[call[None.getLocalResponseNormalization, parameter[]]call[None.getOutputType, parameter[literal[1], member[.inputType]]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[InputType] identifier[getOutputType] operator[SEP] identifier[InputType] operator[...] identifier[inputType] operator[SEP] Keyword[throws] identifier[InvalidKerasConfigurationException] { Keyword[if] operator[SEP] identifier[inputType] operator[SEP] identifier[length] operator[>] Other[1] operator[SEP] Keyword[throw] Keyword[new] identifier[InvalidKerasConfigurationException] operator[SEP] literal[String] operator[+] identifier[inputType] operator[SEP] identifier[length] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] identifier[getLocalResponseNormalization] operator[SEP] operator[SEP] operator[SEP] identifier[getOutputType] operator[SEP] operator[-] Other[1] , identifier[inputType] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] }
public com.google.protobuf.UInt32Value getConfigVersion() { return configVersion_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : configVersion_; }
class class_name[name] begin[{] method[getConfigVersion, return_type[type[com]], modifier[public], parameter[]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=configVersion_, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MemberReference(member=configVersion_, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[], member=getDefaultInstance, postfix_operators=[], prefix_operators=[], qualifier=com.google.protobuf.UInt32Value, selectors=[], type_arguments=None))] end[}] END[}]
Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[UInt32Value] identifier[getConfigVersion] operator[SEP] operator[SEP] { Keyword[return] identifier[configVersion_] operator[==] Other[null] operator[?] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[UInt32Value] operator[SEP] identifier[getDefaultInstance] operator[SEP] operator[SEP] operator[:] identifier[configVersion_] operator[SEP] }
private static List<Integer> parseArray(String value, ValueParser parser){ final List<Integer> values = new ArrayList<>(); final List<String> parts = StrUtil.split(value, StrUtil.C_COMMA); for (String part : parts) { CollectionUtil.addAllIfNotContains(values, parseStep(part, parser)); } return values; }
class class_name[name] begin[{] method[parseArray, return_type[type[List]], modifier[private static], parameter[value, parser]] begin[{] local_variable[type[List], values] local_variable[type[List], parts] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=part, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=parser, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseStep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=addAllIfNotContains, postfix_operators=[], prefix_operators=[], qualifier=CollectionUtil, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=parts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=part)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[member[.values]] end[}] END[}]
Keyword[private] Keyword[static] identifier[List] operator[<] identifier[Integer] operator[>] identifier[parseArray] operator[SEP] identifier[String] identifier[value] , identifier[ValueParser] identifier[parser] operator[SEP] { Keyword[final] identifier[List] operator[<] identifier[Integer] operator[>] identifier[values] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[parts] operator[=] identifier[StrUtil] operator[SEP] identifier[split] operator[SEP] identifier[value] , identifier[StrUtil] operator[SEP] identifier[C_COMMA] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[part] operator[:] identifier[parts] operator[SEP] { identifier[CollectionUtil] operator[SEP] identifier[addAllIfNotContains] operator[SEP] identifier[values] , identifier[parseStep] operator[SEP] identifier[part] , identifier[parser] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[values] operator[SEP] }
private void flush() { try { parent.append(future.get(60, TimeUnit.SECONDS).collect(this)); parent.append(buffer); if (parent instanceof AsyncAppendable) { ((AsyncAppendable) parent).flush(); } } catch (Exception e) { throw new MustacheException( MustacheProblem.RENDER_ASYNC_PROCESSING_ERROR, e); } }
class class_name[name] begin[{] method[flush, return_type[void], modifier[private], parameter[]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=60), MemberReference(member=SECONDS, postfix_operators=[], prefix_operators=[], qualifier=TimeUnit, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=future, selectors=[MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=collect, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=parent, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=parent, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=parent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=AsyncAppendable, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Cast(expression=MemberReference(member=parent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=AsyncAppendable, sub_type=None)), label=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=RENDER_ASYNC_PROCESSING_ERROR, postfix_operators=[], prefix_operators=[], qualifier=MustacheProblem, selectors=[]), 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=MustacheException, 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[private] Keyword[void] identifier[flush] operator[SEP] operator[SEP] { Keyword[try] { identifier[parent] operator[SEP] identifier[append] operator[SEP] identifier[future] operator[SEP] identifier[get] operator[SEP] Other[60] , identifier[TimeUnit] operator[SEP] identifier[SECONDS] operator[SEP] operator[SEP] identifier[collect] operator[SEP] Keyword[this] operator[SEP] operator[SEP] operator[SEP] identifier[parent] operator[SEP] identifier[append] operator[SEP] identifier[buffer] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[parent] Keyword[instanceof] identifier[AsyncAppendable] operator[SEP] { operator[SEP] operator[SEP] identifier[AsyncAppendable] operator[SEP] identifier[parent] operator[SEP] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[MustacheException] operator[SEP] identifier[MustacheProblem] operator[SEP] identifier[RENDER_ASYNC_PROCESSING_ERROR] , identifier[e] operator[SEP] operator[SEP] } }
private void updateTaskProgress() { m_taskRecord.setProperty(TaskRecord.PROP_EXECUTOR, m_hostID); m_taskRecord.setProperty(TaskRecord.PROP_PROGRESS, m_progressMessage); m_taskRecord.setProperty(TaskRecord.PROP_PROGRESS_TIME, Long.toString(m_lastProgressTimestamp)); TaskManagerService.instance().updateTaskStatus(m_tenant, m_taskRecord, false); }
class class_name[name] begin[{] method[updateTaskProgress, return_type[void], modifier[private], parameter[]] begin[{] call[m_taskRecord.setProperty, parameter[member[TaskRecord.PROP_EXECUTOR], member[.m_hostID]]] call[m_taskRecord.setProperty, parameter[member[TaskRecord.PROP_PROGRESS], member[.m_progressMessage]]] call[m_taskRecord.setProperty, parameter[member[TaskRecord.PROP_PROGRESS_TIME], call[Long.toString, parameter[member[.m_lastProgressTimestamp]]]]] call[TaskManagerService.instance, parameter[]] end[}] END[}]
Keyword[private] Keyword[void] identifier[updateTaskProgress] operator[SEP] operator[SEP] { identifier[m_taskRecord] operator[SEP] identifier[setProperty] operator[SEP] identifier[TaskRecord] operator[SEP] identifier[PROP_EXECUTOR] , identifier[m_hostID] operator[SEP] operator[SEP] identifier[m_taskRecord] operator[SEP] identifier[setProperty] operator[SEP] identifier[TaskRecord] operator[SEP] identifier[PROP_PROGRESS] , identifier[m_progressMessage] operator[SEP] operator[SEP] identifier[m_taskRecord] operator[SEP] identifier[setProperty] operator[SEP] identifier[TaskRecord] operator[SEP] identifier[PROP_PROGRESS_TIME] , identifier[Long] operator[SEP] identifier[toString] operator[SEP] identifier[m_lastProgressTimestamp] operator[SEP] operator[SEP] operator[SEP] identifier[TaskManagerService] operator[SEP] identifier[instance] operator[SEP] operator[SEP] operator[SEP] identifier[updateTaskStatus] operator[SEP] identifier[m_tenant] , identifier[m_taskRecord] , literal[boolean] operator[SEP] operator[SEP] }
public static void print(Matrix m, String format) { print(m, DEFAULT_CONTROL, new FormatterNumberFormatter(format, Locale.getDefault())); }
class class_name[name] begin[{] method[print, return_type[void], modifier[public static], parameter[m, format]] begin[{] call[.print, parameter[member[.m], member[.DEFAULT_CONTROL], ClassCreator(arguments=[MemberReference(member=format, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getDefault, postfix_operators=[], prefix_operators=[], qualifier=Locale, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FormatterNumberFormatter, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[print] operator[SEP] identifier[Matrix] identifier[m] , identifier[String] identifier[format] operator[SEP] { identifier[print] operator[SEP] identifier[m] , identifier[DEFAULT_CONTROL] , Keyword[new] identifier[FormatterNumberFormatter] operator[SEP] identifier[format] , identifier[Locale] operator[SEP] identifier[getDefault] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@NonNull protected InputStream openFile(@NonNull Artwork artwork) throws IOException { Context context = getContext(); if (context == null) { throw new IOException(); } Uri persistentUri = artwork.getPersistentUri(); if (persistentUri == null) { throw new IllegalStateException("Got null persistent URI for " + artwork + ". +" + "The default implementation of openFile() requires a persistent URI. " + "You must override this method or write the binary data directly " + "to the artwork's data file."); } String scheme = persistentUri.getScheme(); if (scheme == null) { throw new IOException("Uri had no scheme"); } InputStream in = null; if (ContentResolver.SCHEME_CONTENT.equals(scheme) || ContentResolver.SCHEME_ANDROID_RESOURCE.equals(scheme)) { in = context.getContentResolver().openInputStream(persistentUri); } else if (ContentResolver.SCHEME_FILE.equals(scheme)) { List<String> segments = persistentUri.getPathSegments(); if (segments != null && segments.size() > 1 && "android_asset".equals(segments.get(0))) { StringBuilder assetPath = new StringBuilder(); for (int i = 1; i < segments.size(); i++) { if (i > 1) { assetPath.append("/"); } assetPath.append(segments.get(i)); } in = context.getAssets().open(assetPath.toString()); } else { in = new FileInputStream(new File(persistentUri.getPath())); } } else if ("http".equals(scheme) || "https".equals(scheme)) { URL url = new URL(persistentUri.toString()); HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection(); int responseCode = urlConnection.getResponseCode(); if (!(responseCode >= 200 && responseCode < 300)) { throw new IOException("HTTP error response " + responseCode); } in = urlConnection.getInputStream(); } if (in == null) { throw new FileNotFoundException("Null input stream for URI: " + persistentUri); } return in; }
class class_name[name] begin[{] method[openFile, return_type[type[InputStream]], modifier[protected], parameter[artwork]] begin[{] local_variable[type[Context], context] if[binary_operation[member[.context], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[Uri], persistentUri] if[binary_operation[member[.persistentUri], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Got null persistent URI for "), operandr=MemberReference(member=artwork, 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="The default implementation of openFile() requires a persistent URI. "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="You must override this method or write the binary data directly "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="to the artwork's data file."), 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) else begin[{] None end[}] local_variable[type[String], scheme] if[binary_operation[member[.scheme], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Uri had no scheme")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[InputStream], in] if[binary_operation[call[ContentResolver.SCHEME_CONTENT.equals, parameter[member[.scheme]]], ||, call[ContentResolver.SCHEME_ANDROID_RESOURCE.equals, parameter[member[.scheme]]]]] begin[{] assign[member[.in], call[context.getContentResolver, parameter[]]] else begin[{] if[call[ContentResolver.SCHEME_FILE.equals, parameter[member[.scheme]]]] begin[{] local_variable[type[List], segments] if[binary_operation[binary_operation[binary_operation[member[.segments], !=, literal[null]], &&, binary_operation[call[segments.size, parameter[]], >, literal[1]]], &&, literal["android_asset"]]] begin[{] local_variable[type[StringBuilder], assetPath] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=i, 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=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/")], member=append, postfix_operators=[], prefix_operators=[], qualifier=assetPath, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=segments, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=assetPath, 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=segments, selectors=[], type_arguments=None), 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) assign[member[.in], call[context.getAssets, parameter[]]] else begin[{] assign[member[.in], ClassCreator(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getPath, postfix_operators=[], prefix_operators=[], qualifier=persistentUri, 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))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileInputStream, sub_type=None))] end[}] else begin[{] if[binary_operation[literal["http"], ||, literal["https"]]] begin[{] local_variable[type[URL], url] local_variable[type[HttpURLConnection], urlConnection] local_variable[type[int], responseCode] if[binary_operation[binary_operation[member[.responseCode], >=, literal[200]], &&, binary_operation[member[.responseCode], <, literal[300]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="HTTP error response "), operandr=MemberReference(member=responseCode, 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=IOException, sub_type=None)), label=None) else begin[{] None end[}] assign[member[.in], call[urlConnection.getInputStream, parameter[]]] else begin[{] None end[}] end[}] end[}] if[binary_operation[member[.in], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Null input stream for URI: "), operandr=MemberReference(member=persistentUri, 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=FileNotFoundException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.in]] end[}] END[}]
annotation[@] identifier[NonNull] Keyword[protected] identifier[InputStream] identifier[openFile] operator[SEP] annotation[@] identifier[NonNull] identifier[Artwork] identifier[artwork] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Context] identifier[context] operator[=] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[context] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] operator[SEP] operator[SEP] } identifier[Uri] identifier[persistentUri] operator[=] identifier[artwork] operator[SEP] identifier[getPersistentUri] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[persistentUri] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[artwork] operator[+] literal[String] operator[+] literal[String] operator[+] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[String] identifier[scheme] operator[=] identifier[persistentUri] operator[SEP] identifier[getScheme] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[scheme] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[InputStream] identifier[in] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[ContentResolver] operator[SEP] identifier[SCHEME_CONTENT] operator[SEP] identifier[equals] operator[SEP] identifier[scheme] operator[SEP] operator[||] identifier[ContentResolver] operator[SEP] identifier[SCHEME_ANDROID_RESOURCE] operator[SEP] identifier[equals] operator[SEP] identifier[scheme] operator[SEP] operator[SEP] { identifier[in] operator[=] identifier[context] operator[SEP] identifier[getContentResolver] operator[SEP] operator[SEP] operator[SEP] identifier[openInputStream] operator[SEP] identifier[persistentUri] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[ContentResolver] operator[SEP] identifier[SCHEME_FILE] operator[SEP] identifier[equals] operator[SEP] identifier[scheme] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[segments] operator[=] identifier[persistentUri] operator[SEP] identifier[getPathSegments] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[segments] operator[!=] Other[null] operator[&&] identifier[segments] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[1] operator[&&] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[segments] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] { identifier[StringBuilder] identifier[assetPath] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[1] operator[SEP] identifier[i] operator[<] identifier[segments] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[i] operator[>] Other[1] operator[SEP] { identifier[assetPath] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[assetPath] operator[SEP] identifier[append] operator[SEP] identifier[segments] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } identifier[in] operator[=] identifier[context] operator[SEP] identifier[getAssets] operator[SEP] operator[SEP] operator[SEP] identifier[open] operator[SEP] identifier[assetPath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[in] operator[=] Keyword[new] identifier[FileInputStream] operator[SEP] Keyword[new] identifier[File] operator[SEP] identifier[persistentUri] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[scheme] operator[SEP] operator[||] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[scheme] operator[SEP] operator[SEP] { identifier[URL] identifier[url] operator[=] Keyword[new] identifier[URL] operator[SEP] identifier[persistentUri] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[HttpURLConnection] identifier[urlConnection] operator[=] operator[SEP] identifier[HttpURLConnection] operator[SEP] identifier[url] operator[SEP] identifier[openConnection] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[responseCode] operator[=] identifier[urlConnection] operator[SEP] identifier[getResponseCode] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[responseCode] operator[>=] Other[200] operator[&&] identifier[responseCode] operator[<] Other[300] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[responseCode] operator[SEP] operator[SEP] } identifier[in] operator[=] identifier[urlConnection] operator[SEP] identifier[getInputStream] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[in] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[FileNotFoundException] operator[SEP] literal[String] operator[+] identifier[persistentUri] operator[SEP] operator[SEP] } Keyword[return] identifier[in] operator[SEP] }
private List<Serializable> getSelectedValues(List<IdName> values, List<Serializable> defaultValues) { List<Serializable> selectedValues = new ArrayList<Serializable>(); if (defaultValues == null) { return selectedValues; } for (Serializable s : defaultValues) { for (IdName in : values) { if (s instanceof IdName) { if ((in.getId() != null) && in.getId().equals( ((IdName)s).getId())) { selectedValues.add(in); break; } } else if ((in.getId() != null) && in.getId().equals(s)) { selectedValues.add(in); break; } } } return selectedValues; }
class class_name[name] begin[{] method[getSelectedValues, return_type[type[List]], modifier[private], parameter[values, defaultValues]] begin[{] local_variable[type[List], selectedValues] if[binary_operation[member[.defaultValues], ==, literal[null]]] begin[{] return[member[.selectedValues]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=IdName, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[MethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=selectedValues, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[MethodInvocation(arguments=[Cast(expression=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=IdName, sub_type=None))], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=selectedValues, selectors=[], type_arguments=None), label=None), BreakStatement(goto=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=in)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=IdName, sub_type=None))), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=defaultValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=s)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Serializable, sub_type=None))), label=None) return[member[.selectedValues]] end[}] END[}]
Keyword[private] identifier[List] operator[<] identifier[Serializable] operator[>] identifier[getSelectedValues] operator[SEP] identifier[List] operator[<] identifier[IdName] operator[>] identifier[values] , identifier[List] operator[<] identifier[Serializable] operator[>] identifier[defaultValues] operator[SEP] { identifier[List] operator[<] identifier[Serializable] operator[>] identifier[selectedValues] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Serializable] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[defaultValues] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[selectedValues] operator[SEP] } Keyword[for] operator[SEP] identifier[Serializable] identifier[s] operator[:] identifier[defaultValues] operator[SEP] { Keyword[for] operator[SEP] identifier[IdName] identifier[in] operator[:] identifier[values] operator[SEP] { Keyword[if] operator[SEP] identifier[s] Keyword[instanceof] identifier[IdName] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[in] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] operator[&&] identifier[in] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] operator[SEP] operator[SEP] identifier[IdName] operator[SEP] identifier[s] operator[SEP] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[selectedValues] operator[SEP] identifier[add] operator[SEP] identifier[in] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] operator[SEP] identifier[in] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] operator[&&] identifier[in] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[s] operator[SEP] operator[SEP] { identifier[selectedValues] operator[SEP] identifier[add] operator[SEP] identifier[in] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } } } Keyword[return] identifier[selectedValues] operator[SEP] }
public void onError(def<Void> handler) { while (!inProcess) { // block Style.sleep(1); } synchronized (lock) { this.handler = handler; if (err != null) { handler.apply(err); } } }
class class_name[name] begin[{] method[onError, return_type[void], modifier[public], parameter[handler]] begin[{] while[member[.inProcess]] begin[{] call[Style.sleep, parameter[literal[1]]] end[}] SYNCHRONIZED[member[.lock]] BEGIN[{] assign[THIS[member[None.handler]], member[.handler]] if[binary_operation[member[.err], !=, literal[null]]] begin[{] call[handler.apply, parameter[member[.err]]] else begin[{] None end[}] END[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[onError] operator[SEP] identifier[def] operator[<] identifier[Void] operator[>] identifier[handler] operator[SEP] { Keyword[while] operator[SEP] operator[!] identifier[inProcess] operator[SEP] { identifier[Style] operator[SEP] identifier[sleep] operator[SEP] Other[1] operator[SEP] operator[SEP] } Keyword[synchronized] operator[SEP] identifier[lock] operator[SEP] { Keyword[this] operator[SEP] identifier[handler] operator[=] identifier[handler] operator[SEP] Keyword[if] operator[SEP] identifier[err] operator[!=] Other[null] operator[SEP] { identifier[handler] operator[SEP] identifier[apply] operator[SEP] identifier[err] operator[SEP] operator[SEP] } } }
public T getDefaultInstance() { Object result; // For basic Java types return the standard default value. For others, try the default constructor. switch (type) { case BOOLEAN: result = DEFAULT_BOOLEAN; break; case CHARACTER: result = DEFAULT_CHARACTER; break; case BYTE: result = DEFAULT_BYTE; break; case SHORT: result = DEFAULT_SHORT; break; case INTEGER: result = DEFAULT_INTEGER; break; case LONG: result = DEFAULT_LONG; break; case FLOAT: result = DEFAULT_FLOAT; break; case DOUBLE: result = DEFAULT_DOUBLE; break; case OTHER: default: try { result = underlyingClass.newInstance(); } catch (InstantiationException e) { throw new IllegalStateException(e); } catch (IllegalAccessException e) { throw new IllegalStateException(e); } break; } return (T) result; }
class class_name[name] begin[{] method[getDefaultInstance, return_type[type[T]], modifier[public], parameter[]] begin[{] local_variable[type[Object], result] SwitchStatement(cases=[SwitchStatementCase(case=['BOOLEAN'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=DEFAULT_BOOLEAN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['CHARACTER'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=DEFAULT_CHARACTER, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['BYTE'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=DEFAULT_BYTE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['SHORT'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=DEFAULT_SHORT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['INTEGER'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=DEFAULT_INTEGER, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['LONG'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=DEFAULT_LONG, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['FLOAT'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=DEFAULT_FLOAT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['DOUBLE'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=DEFAULT_DOUBLE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['OTHER'], statements=[TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=underlyingClass, 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=IllegalStateException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InstantiationException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IllegalAccessException']))], finally_block=None, label=None, resources=None), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) return[Cast(expression=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))] end[}] END[}]
Keyword[public] identifier[T] identifier[getDefaultInstance] operator[SEP] operator[SEP] { identifier[Object] identifier[result] operator[SEP] Keyword[switch] operator[SEP] identifier[type] operator[SEP] { Keyword[case] identifier[BOOLEAN] operator[:] identifier[result] operator[=] identifier[DEFAULT_BOOLEAN] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[CHARACTER] operator[:] identifier[result] operator[=] identifier[DEFAULT_CHARACTER] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[BYTE] operator[:] identifier[result] operator[=] identifier[DEFAULT_BYTE] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[SHORT] operator[:] identifier[result] operator[=] identifier[DEFAULT_SHORT] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[INTEGER] operator[:] identifier[result] operator[=] identifier[DEFAULT_INTEGER] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[LONG] operator[:] identifier[result] operator[=] identifier[DEFAULT_LONG] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[FLOAT] operator[:] identifier[result] operator[=] identifier[DEFAULT_FLOAT] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[DOUBLE] operator[:] identifier[result] operator[=] identifier[DEFAULT_DOUBLE] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[OTHER] operator[:] Keyword[default] operator[:] Keyword[try] { identifier[result] operator[=] identifier[underlyingClass] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InstantiationException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalAccessException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] } Keyword[return] operator[SEP] identifier[T] operator[SEP] identifier[result] operator[SEP] }
private Stream<Triple> memberRelations(final FedoraResource container) throws RepositoryException { final org.apache.jena.graph.Node memberRelation; if (container.hasProperty(LDP_HAS_MEMBER_RELATION)) { final Property property = getJcrNode(container).getProperty(LDP_HAS_MEMBER_RELATION); memberRelation = createURI(property.getString()); } else if (container.hasType(LDP_BASIC_CONTAINER)) { memberRelation = LDP_MEMBER.asNode(); } else { return empty(); } final String insertedContainerProperty; if (container.hasType(LDP_INDIRECT_CONTAINER)) { if (container.hasProperty(LDP_INSERTED_CONTENT_RELATION)) { insertedContainerProperty = getJcrNode(container).getProperty(LDP_INSERTED_CONTENT_RELATION) .getString(); } else { return empty(); } } else { insertedContainerProperty = MEMBER_SUBJECT.getURI(); } return container.getChildren().flatMap( UncheckedFunction.uncheck(child -> { final org.apache.jena.graph.Node childSubject = uriFor(child.getDescribedResource()); if (insertedContainerProperty.equals(MEMBER_SUBJECT.getURI())) { return of(create(subject(), memberRelation, childSubject)); } String insertedContentProperty = getPropertyNameFromPredicate(getJcrNode(resource()), createResource(insertedContainerProperty), null); if (child.hasProperty(insertedContentProperty)) { // do nothing, insertedContentProperty is good } else if (child.hasProperty(getReferencePropertyName(insertedContentProperty))) { // The insertedContentProperty is a pseudo reference property insertedContentProperty = getReferencePropertyName(insertedContentProperty); } else { // No property found! return empty(); } return iteratorToStream(new PropertyValueIterator( getJcrNode(child).getProperty(insertedContentProperty))) .map(uncheck(v -> create(subject(), memberRelation, new ValueConverter(getJcrNode(container).getSession(), translator()).convert(v).asNode()))); })); }
class class_name[name] begin[{] method[memberRelations, return_type[type[Stream]], modifier[private], parameter[container]] begin[{] local_variable[type[org], memberRelation] if[call[container.hasProperty, parameter[member[.LDP_HAS_MEMBER_RELATION]]]] begin[{] local_variable[type[Property], property] assign[member[.memberRelation], call[.createURI, parameter[call[property.getString, parameter[]]]]] else begin[{] if[call[container.hasType, parameter[member[.LDP_BASIC_CONTAINER]]]] begin[{] assign[member[.memberRelation], call[LDP_MEMBER.asNode, parameter[]]] else begin[{] return[call[.empty, parameter[]]] end[}] end[}] local_variable[type[String], insertedContainerProperty] if[call[container.hasType, parameter[member[.LDP_INDIRECT_CONTAINER]]]] begin[{] if[call[container.hasProperty, parameter[member[.LDP_INSERTED_CONTENT_RELATION]]]] begin[{] assign[member[.insertedContainerProperty], call[.getJcrNode, parameter[member[.container]]]] else begin[{] return[call[.empty, parameter[]]] end[}] else begin[{] assign[member[.insertedContainerProperty], call[MEMBER_SUBJECT.getURI, parameter[]]] end[}] return[call[container.getChildren, parameter[]]] end[}] END[}]
Keyword[private] identifier[Stream] operator[<] identifier[Triple] operator[>] identifier[memberRelations] operator[SEP] Keyword[final] identifier[FedoraResource] identifier[container] operator[SEP] Keyword[throws] identifier[RepositoryException] { Keyword[final] identifier[org] operator[SEP] identifier[apache] operator[SEP] identifier[jena] operator[SEP] identifier[graph] operator[SEP] identifier[Node] identifier[memberRelation] operator[SEP] Keyword[if] operator[SEP] identifier[container] operator[SEP] identifier[hasProperty] operator[SEP] identifier[LDP_HAS_MEMBER_RELATION] operator[SEP] operator[SEP] { Keyword[final] identifier[Property] identifier[property] operator[=] identifier[getJcrNode] operator[SEP] identifier[container] operator[SEP] operator[SEP] identifier[getProperty] operator[SEP] identifier[LDP_HAS_MEMBER_RELATION] operator[SEP] operator[SEP] identifier[memberRelation] operator[=] identifier[createURI] operator[SEP] identifier[property] operator[SEP] identifier[getString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[container] operator[SEP] identifier[hasType] operator[SEP] identifier[LDP_BASIC_CONTAINER] operator[SEP] operator[SEP] { identifier[memberRelation] operator[=] identifier[LDP_MEMBER] operator[SEP] identifier[asNode] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[empty] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[String] identifier[insertedContainerProperty] operator[SEP] Keyword[if] operator[SEP] identifier[container] operator[SEP] identifier[hasType] operator[SEP] identifier[LDP_INDIRECT_CONTAINER] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[container] operator[SEP] identifier[hasProperty] operator[SEP] identifier[LDP_INSERTED_CONTENT_RELATION] operator[SEP] operator[SEP] { identifier[insertedContainerProperty] operator[=] identifier[getJcrNode] operator[SEP] identifier[container] operator[SEP] operator[SEP] identifier[getProperty] operator[SEP] identifier[LDP_INSERTED_CONTENT_RELATION] operator[SEP] operator[SEP] identifier[getString] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[empty] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[insertedContainerProperty] operator[=] identifier[MEMBER_SUBJECT] operator[SEP] identifier[getURI] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[container] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] identifier[flatMap] operator[SEP] identifier[UncheckedFunction] operator[SEP] identifier[uncheck] operator[SEP] identifier[child] operator[->] { Keyword[final] identifier[org] operator[SEP] identifier[apache] operator[SEP] identifier[jena] operator[SEP] identifier[graph] operator[SEP] identifier[Node] identifier[childSubject] operator[=] identifier[uriFor] operator[SEP] identifier[child] operator[SEP] identifier[getDescribedResource] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[insertedContainerProperty] operator[SEP] identifier[equals] operator[SEP] identifier[MEMBER_SUBJECT] operator[SEP] identifier[getURI] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[of] operator[SEP] identifier[create] operator[SEP] identifier[subject] operator[SEP] operator[SEP] , identifier[memberRelation] , identifier[childSubject] operator[SEP] operator[SEP] operator[SEP] } identifier[String] identifier[insertedContentProperty] operator[=] identifier[getPropertyNameFromPredicate] operator[SEP] identifier[getJcrNode] operator[SEP] identifier[resource] operator[SEP] operator[SEP] operator[SEP] , identifier[createResource] operator[SEP] identifier[insertedContainerProperty] operator[SEP] , Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[child] operator[SEP] identifier[hasProperty] operator[SEP] identifier[insertedContentProperty] operator[SEP] operator[SEP] { } Keyword[else] Keyword[if] operator[SEP] identifier[child] operator[SEP] identifier[hasProperty] operator[SEP] identifier[getReferencePropertyName] operator[SEP] identifier[insertedContentProperty] operator[SEP] operator[SEP] operator[SEP] { identifier[insertedContentProperty] operator[=] identifier[getReferencePropertyName] operator[SEP] identifier[insertedContentProperty] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[empty] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[iteratorToStream] operator[SEP] Keyword[new] identifier[PropertyValueIterator] operator[SEP] identifier[getJcrNode] operator[SEP] identifier[child] operator[SEP] operator[SEP] identifier[getProperty] operator[SEP] identifier[insertedContentProperty] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[uncheck] operator[SEP] identifier[v] operator[->] identifier[create] operator[SEP] identifier[subject] operator[SEP] operator[SEP] , identifier[memberRelation] , Keyword[new] identifier[ValueConverter] operator[SEP] identifier[getJcrNode] operator[SEP] identifier[container] operator[SEP] operator[SEP] identifier[getSession] operator[SEP] operator[SEP] , identifier[translator] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[convert] operator[SEP] identifier[v] operator[SEP] operator[SEP] identifier[asNode] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] operator[SEP] }
public Attribute getChild(String attrName) { Iterable<Attribute> attrParts = getEntities(CHILDREN, Attribute.class); return Streams.stream(attrParts) .filter(attrPart -> attrPart.getName().equals(attrName)) .findFirst() .orElse(null); }
class class_name[name] begin[{] method[getChild, return_type[type[Attribute]], modifier[public], parameter[attrName]] begin[{] local_variable[type[Iterable], attrParts] return[call[Streams.stream, parameter[member[.attrParts]]]] end[}] END[}]
Keyword[public] identifier[Attribute] identifier[getChild] operator[SEP] identifier[String] identifier[attrName] operator[SEP] { identifier[Iterable] operator[<] identifier[Attribute] operator[>] identifier[attrParts] operator[=] identifier[getEntities] operator[SEP] identifier[CHILDREN] , identifier[Attribute] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[return] identifier[Streams] operator[SEP] identifier[stream] operator[SEP] identifier[attrParts] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[attrPart] operator[->] identifier[attrPart] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[attrName] operator[SEP] operator[SEP] operator[SEP] identifier[findFirst] operator[SEP] operator[SEP] operator[SEP] identifier[orElse] operator[SEP] Other[null] operator[SEP] operator[SEP] }
private List<MethodNode> findMacroMethods(String methodName, List<Expression> callArguments) { List<MethodNode> methods = MacroMethodsCache.get(classLoader).get(methodName); if (methods == null) { // Not a macro call return Collections.emptyList(); } ClassNode[] argumentsList = new ClassNode[callArguments.size()]; for (int i = 0; i < callArguments.size(); i++) { argumentsList[i] = ClassHelper.make(callArguments.get(i).getClass()); } return StaticTypeCheckingSupport.chooseBestMethod(MACRO_CONTEXT_CLASS_NODE, methods, argumentsList); }
class class_name[name] begin[{] method[findMacroMethods, return_type[type[List]], modifier[private], parameter[methodName, callArguments]] begin[{] local_variable[type[List], methods] if[binary_operation[member[.methods], ==, literal[null]]] begin[{] return[call[Collections.emptyList, parameter[]]] else begin[{] None end[}] local_variable[type[ClassNode], argumentsList] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=argumentsList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=callArguments, selectors=[MethodInvocation(arguments=[], member=getClass, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=make, postfix_operators=[], prefix_operators=[], qualifier=ClassHelper, 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=callArguments, 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) return[call[StaticTypeCheckingSupport.chooseBestMethod, parameter[member[.MACRO_CONTEXT_CLASS_NODE], member[.methods], member[.argumentsList]]]] end[}] END[}]
Keyword[private] identifier[List] operator[<] identifier[MethodNode] operator[>] identifier[findMacroMethods] operator[SEP] identifier[String] identifier[methodName] , identifier[List] operator[<] identifier[Expression] operator[>] identifier[callArguments] operator[SEP] { identifier[List] operator[<] identifier[MethodNode] operator[>] identifier[methods] operator[=] identifier[MacroMethodsCache] operator[SEP] identifier[get] operator[SEP] identifier[classLoader] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[methodName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[methods] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[Collections] operator[SEP] identifier[emptyList] operator[SEP] operator[SEP] operator[SEP] } identifier[ClassNode] operator[SEP] operator[SEP] identifier[argumentsList] operator[=] Keyword[new] identifier[ClassNode] operator[SEP] identifier[callArguments] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[callArguments] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[argumentsList] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[ClassHelper] operator[SEP] identifier[make] operator[SEP] identifier[callArguments] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[StaticTypeCheckingSupport] operator[SEP] identifier[chooseBestMethod] operator[SEP] identifier[MACRO_CONTEXT_CLASS_NODE] , identifier[methods] , identifier[argumentsList] operator[SEP] operator[SEP] }
final MemorySegment getNextBuffer() { // check if the list directly offers memory int s = this.availableMemory.size(); if (s > 0) { return this.availableMemory.remove(s-1); } // check if there are write behind buffers that actually are to be used for the hash table if (this.writeBehindBuffersAvailable > 0) { // grab at least one, no matter what MemorySegment toReturn; try { toReturn = this.writeBehindBuffers.take(); } catch (InterruptedException iex) { throw new RuntimeException("Hybrid Hash Join was interrupted while taking a buffer."); } this.writeBehindBuffersAvailable--; // grab as many more buffers as are available directly MemorySegment currBuff = null; while (this.writeBehindBuffersAvailable > 0 && (currBuff = this.writeBehindBuffers.poll()) != null) { this.availableMemory.add(currBuff); this.writeBehindBuffersAvailable--; } return toReturn; } else { // no memory available return null; } }
class class_name[name] begin[{] method[getNextBuffer, return_type[type[MemorySegment]], modifier[final], parameter[]] begin[{] local_variable[type[int], s] if[binary_operation[member[.s], >, literal[0]]] begin[{] return[THIS[member[None.availableMemory]call[None.remove, parameter[binary_operation[member[.s], -, literal[1]]]]]] else begin[{] None end[}] if[binary_operation[THIS[member[None.writeBehindBuffersAvailable]], >, literal[0]]] begin[{] local_variable[type[MemorySegment], toReturn] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=toReturn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=writeBehindBuffers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=take, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Hybrid Hash Join was interrupted while taking a buffer.")], 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=iex, types=['InterruptedException']))], finally_block=None, label=None, resources=None) THIS[member[None.writeBehindBuffersAvailable]] local_variable[type[MemorySegment], currBuff] while[binary_operation[binary_operation[THIS[member[None.writeBehindBuffersAvailable]], >, literal[0]], &&, binary_operation[assign[member[.currBuff], THIS[member[None.writeBehindBuffers]call[None.poll, parameter[]]]], !=, literal[null]]]] begin[{] THIS[member[None.availableMemory]call[None.add, parameter[member[.currBuff]]]] THIS[member[None.writeBehindBuffersAvailable]] end[}] return[member[.toReturn]] else begin[{] return[literal[null]] end[}] end[}] END[}]
Keyword[final] identifier[MemorySegment] identifier[getNextBuffer] operator[SEP] operator[SEP] { Keyword[int] identifier[s] operator[=] Keyword[this] operator[SEP] identifier[availableMemory] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[s] operator[>] Other[0] operator[SEP] { Keyword[return] Keyword[this] operator[SEP] identifier[availableMemory] operator[SEP] identifier[remove] operator[SEP] identifier[s] operator[-] Other[1] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[writeBehindBuffersAvailable] operator[>] Other[0] operator[SEP] { identifier[MemorySegment] identifier[toReturn] operator[SEP] Keyword[try] { identifier[toReturn] operator[=] Keyword[this] operator[SEP] identifier[writeBehindBuffers] operator[SEP] identifier[take] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InterruptedException] identifier[iex] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[writeBehindBuffersAvailable] operator[--] operator[SEP] identifier[MemorySegment] identifier[currBuff] operator[=] Other[null] operator[SEP] Keyword[while] operator[SEP] Keyword[this] operator[SEP] identifier[writeBehindBuffersAvailable] operator[>] Other[0] operator[&&] operator[SEP] identifier[currBuff] operator[=] Keyword[this] operator[SEP] identifier[writeBehindBuffers] operator[SEP] identifier[poll] operator[SEP] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[availableMemory] operator[SEP] identifier[add] operator[SEP] identifier[currBuff] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[writeBehindBuffersAvailable] operator[--] operator[SEP] } Keyword[return] identifier[toReturn] operator[SEP] } Keyword[else] { Keyword[return] Other[null] operator[SEP] } }
private void generateImmutableToBuilder() { if (data.isBuilderGenerated()) { if (data.isConstructable()) { List<PropertyGen> nonDerived = nonDerivedProperties(); if (nonDerived.size() > 0 || !data.isTypeFinal()) { addLine(1, "/**"); addLine(1, " * Returns a builder that allows this bean to be mutated."); addLine(1, " * @return the mutable builder, not null"); addLine(1, " */"); if (data.isRootClass() == false) { addLine(1, "@Override"); } addLine(1, data.getEffectiveBuilderScope() + "Builder" + data.getTypeGenericName(true) + " toBuilder() {"); addLine(2, "return new Builder" + data.getTypeGenericDiamond() + "(this);"); addLine(1, "}"); addBlankLine(); } } else { addLine(1, "/**"); addLine(1, " * Returns a builder that allows this bean to be mutated."); addLine(1, " * @return the mutable builder, not null"); addLine(1, " */"); if (data.isRootClass() == false) { addLine(1, "@Override"); } addLine(1, "public abstract Builder" + data.getTypeGenericName(true) + " toBuilder();"); addBlankLine(); } } }
class class_name[name] begin[{] method[generateImmutableToBuilder, return_type[void], modifier[private], parameter[]] begin[{] if[call[data.isBuilderGenerated, parameter[]]] begin[{] if[call[data.isConstructable, parameter[]]] begin[{] local_variable[type[List], nonDerived] if[binary_operation[binary_operation[call[nonDerived.size, parameter[]], >, literal[0]], ||, call[data.isTypeFinal, parameter[]]]] begin[{] call[.addLine, parameter[literal[1], literal["/**"]]] call[.addLine, parameter[literal[1], literal[" * Returns a builder that allows this bean to be mutated."]]] call[.addLine, parameter[literal[1], literal[" * @return the mutable builder, not null"]]] call[.addLine, parameter[literal[1], literal[" */"]]] if[binary_operation[call[data.isRootClass, parameter[]], ==, literal[false]]] begin[{] call[.addLine, parameter[literal[1], literal["@Override"]]] else begin[{] None end[}] call[.addLine, parameter[literal[1], binary_operation[binary_operation[binary_operation[call[data.getEffectiveBuilderScope, parameter[]], +, literal["Builder"]], +, call[data.getTypeGenericName, parameter[literal[true]]]], +, literal[" toBuilder() {"]]]] call[.addLine, parameter[literal[2], binary_operation[binary_operation[literal["return new Builder"], +, call[data.getTypeGenericDiamond, parameter[]]], +, literal["(this);"]]]] call[.addLine, parameter[literal[1], literal["}"]]] call[.addBlankLine, parameter[]] else begin[{] None end[}] else begin[{] call[.addLine, parameter[literal[1], literal["/**"]]] call[.addLine, parameter[literal[1], literal[" * Returns a builder that allows this bean to be mutated."]]] call[.addLine, parameter[literal[1], literal[" * @return the mutable builder, not null"]]] call[.addLine, parameter[literal[1], literal[" */"]]] if[binary_operation[call[data.isRootClass, parameter[]], ==, literal[false]]] begin[{] call[.addLine, parameter[literal[1], literal["@Override"]]] else begin[{] None end[}] call[.addLine, parameter[literal[1], binary_operation[binary_operation[literal["public abstract Builder"], +, call[data.getTypeGenericName, parameter[literal[true]]]], +, literal[" toBuilder();"]]]] call[.addBlankLine, parameter[]] end[}] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[generateImmutableToBuilder] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[data] operator[SEP] identifier[isBuilderGenerated] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[data] operator[SEP] identifier[isConstructable] operator[SEP] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[PropertyGen] operator[>] identifier[nonDerived] operator[=] identifier[nonDerivedProperties] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nonDerived] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[||] operator[!] identifier[data] operator[SEP] identifier[isTypeFinal] operator[SEP] operator[SEP] operator[SEP] { identifier[addLine] operator[SEP] Other[1] , literal[String] operator[SEP] operator[SEP] identifier[addLine] operator[SEP] Other[1] , literal[String] operator[SEP] operator[SEP] identifier[addLine] operator[SEP] Other[1] , literal[String] operator[SEP] operator[SEP] identifier[addLine] operator[SEP] Other[1] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[data] operator[SEP] identifier[isRootClass] operator[SEP] operator[SEP] operator[==] literal[boolean] operator[SEP] { identifier[addLine] operator[SEP] Other[1] , literal[String] operator[SEP] operator[SEP] } identifier[addLine] operator[SEP] Other[1] , identifier[data] operator[SEP] identifier[getEffectiveBuilderScope] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[data] operator[SEP] identifier[getTypeGenericName] operator[SEP] literal[boolean] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[addLine] operator[SEP] Other[2] , literal[String] operator[+] identifier[data] operator[SEP] identifier[getTypeGenericDiamond] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[addLine] operator[SEP] Other[1] , literal[String] operator[SEP] operator[SEP] identifier[addBlankLine] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[addLine] operator[SEP] Other[1] , literal[String] operator[SEP] operator[SEP] identifier[addLine] operator[SEP] Other[1] , literal[String] operator[SEP] operator[SEP] identifier[addLine] operator[SEP] Other[1] , literal[String] operator[SEP] operator[SEP] identifier[addLine] operator[SEP] Other[1] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[data] operator[SEP] identifier[isRootClass] operator[SEP] operator[SEP] operator[==] literal[boolean] operator[SEP] { identifier[addLine] operator[SEP] Other[1] , literal[String] operator[SEP] operator[SEP] } identifier[addLine] operator[SEP] Other[1] , literal[String] operator[+] identifier[data] operator[SEP] identifier[getTypeGenericName] operator[SEP] literal[boolean] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[addBlankLine] operator[SEP] operator[SEP] operator[SEP] } } }
@Override public List<CPDefinitionGroupedEntry> getCPDefinitionGroupedEntriesByUuidAndCompanyId( String uuid, long companyId) { return cpDefinitionGroupedEntryPersistence.findByUuid_C(uuid, companyId); }
class class_name[name] begin[{] method[getCPDefinitionGroupedEntriesByUuidAndCompanyId, return_type[type[List]], modifier[public], parameter[uuid, companyId]] begin[{] return[call[cpDefinitionGroupedEntryPersistence.findByUuid_C, parameter[member[.uuid], member[.companyId]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[CPDefinitionGroupedEntry] operator[>] identifier[getCPDefinitionGroupedEntriesByUuidAndCompanyId] operator[SEP] identifier[String] identifier[uuid] , Keyword[long] identifier[companyId] operator[SEP] { Keyword[return] identifier[cpDefinitionGroupedEntryPersistence] operator[SEP] identifier[findByUuid_C] operator[SEP] identifier[uuid] , identifier[companyId] operator[SEP] operator[SEP] }
public void setCPDefinitionVirtualSettingLocalService( com.liferay.commerce.product.type.virtual.service.CPDefinitionVirtualSettingLocalService cpDefinitionVirtualSettingLocalService) { this.cpDefinitionVirtualSettingLocalService = cpDefinitionVirtualSettingLocalService; }
class class_name[name] begin[{] method[setCPDefinitionVirtualSettingLocalService, return_type[void], modifier[public], parameter[cpDefinitionVirtualSettingLocalService]] begin[{] assign[THIS[member[None.cpDefinitionVirtualSettingLocalService]], member[.cpDefinitionVirtualSettingLocalService]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setCPDefinitionVirtualSettingLocalService] operator[SEP] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[product] operator[SEP] identifier[type] operator[SEP] identifier[virtual] operator[SEP] identifier[service] operator[SEP] identifier[CPDefinitionVirtualSettingLocalService] identifier[cpDefinitionVirtualSettingLocalService] operator[SEP] { Keyword[this] operator[SEP] identifier[cpDefinitionVirtualSettingLocalService] operator[=] identifier[cpDefinitionVirtualSettingLocalService] operator[SEP] }
public static Predicate greaterThan(String attribute, Comparable value) { return new GreaterLessPredicate(attribute, value, false, false); }
class class_name[name] begin[{] method[greaterThan, return_type[type[Predicate]], modifier[public static], parameter[attribute, value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=attribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, 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=false)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GreaterLessPredicate, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Predicate] identifier[greaterThan] operator[SEP] identifier[String] identifier[attribute] , identifier[Comparable] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[GreaterLessPredicate] operator[SEP] identifier[attribute] , identifier[value] , literal[boolean] , literal[boolean] operator[SEP] operator[SEP] }
@Override public void close() { log.debug("Close"); if (dataSource != null) { try { dataSource.close(); } catch (IOException e) { log.error("Channel close {}", e); } finally { if (frames != null) { frames.clear(); frames = null; } } } }
class class_name[name] begin[{] method[close, return_type[void], modifier[public], parameter[]] begin[{] call[log.debug, parameter[literal["Close"]]] if[binary_operation[member[.dataSource], !=, literal[null]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=dataSource, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Channel close {}"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=frames, 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=clear, postfix_operators=[], prefix_operators=[], qualifier=frames, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=frames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None)]))], label=None, resources=None) else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dataSource] operator[!=] Other[null] operator[SEP] { Keyword[try] { identifier[dataSource] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[log] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[if] operator[SEP] identifier[frames] operator[!=] Other[null] operator[SEP] { identifier[frames] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[frames] operator[=] Other[null] operator[SEP] } } } }
public static String removeStartingChars(String s, char c) { int lastToRemove = -1; for (int i = 0; i < s.length(); i++) { if (s.charAt(i) == c) { lastToRemove = i; continue; } if (s.charAt(i) != c) { break; } } if (lastToRemove < 0) return s; return s.substring(lastToRemove + 1); }
class class_name[name] begin[{] method[removeStartingChars, return_type[type[String]], modifier[public static], parameter[s, c]] begin[{] local_variable[type[int], lastToRemove] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[], type_arguments=None), operandr=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastToRemove, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), ContinueStatement(goto=None, label=None)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[], type_arguments=None), operandr=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) if[binary_operation[member[.lastToRemove], <, literal[0]]] begin[{] return[member[.s]] else begin[{] None end[}] return[call[s.substring, parameter[binary_operation[member[.lastToRemove], +, literal[1]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[removeStartingChars] operator[SEP] identifier[String] identifier[s] , Keyword[char] identifier[c] operator[SEP] { Keyword[int] identifier[lastToRemove] operator[=] operator[-] Other[1] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[s] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[s] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[==] identifier[c] operator[SEP] { identifier[lastToRemove] operator[=] identifier[i] operator[SEP] Keyword[continue] operator[SEP] } Keyword[if] operator[SEP] identifier[s] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[!=] identifier[c] operator[SEP] { Keyword[break] operator[SEP] } } Keyword[if] operator[SEP] identifier[lastToRemove] operator[<] Other[0] operator[SEP] Keyword[return] identifier[s] operator[SEP] Keyword[return] identifier[s] operator[SEP] identifier[substring] operator[SEP] identifier[lastToRemove] operator[+] Other[1] operator[SEP] operator[SEP] }
public void setPositionType(com.google.api.ads.admanager.axis.v201805.VideoPositionType positionType) { this.positionType = positionType; }
class class_name[name] begin[{] method[setPositionType, return_type[void], modifier[public], parameter[positionType]] begin[{] assign[THIS[member[None.positionType]], member[.positionType]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setPositionType] operator[SEP] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201805] operator[SEP] identifier[VideoPositionType] identifier[positionType] operator[SEP] { Keyword[this] operator[SEP] identifier[positionType] operator[=] identifier[positionType] operator[SEP] }
void writeSomeValueRestriction(String propertyUri, String rangeUri, Resource bnode) throws RDFHandlerException { this.rdfWriter.writeTripleValueObject(bnode, RdfWriter.RDF_TYPE, RdfWriter.OWL_RESTRICTION); this.rdfWriter.writeTripleUriObject(bnode, RdfWriter.OWL_ON_PROPERTY, propertyUri); this.rdfWriter.writeTripleUriObject(bnode, RdfWriter.OWL_SOME_VALUES_FROM, rangeUri); }
class class_name[name] begin[{] method[writeSomeValueRestriction, return_type[void], modifier[default], parameter[propertyUri, rangeUri, bnode]] begin[{] THIS[member[None.rdfWriter]call[None.writeTripleValueObject, parameter[member[.bnode], member[RdfWriter.RDF_TYPE], member[RdfWriter.OWL_RESTRICTION]]]] THIS[member[None.rdfWriter]call[None.writeTripleUriObject, parameter[member[.bnode], member[RdfWriter.OWL_ON_PROPERTY], member[.propertyUri]]]] THIS[member[None.rdfWriter]call[None.writeTripleUriObject, parameter[member[.bnode], member[RdfWriter.OWL_SOME_VALUES_FROM], member[.rangeUri]]]] end[}] END[}]
Keyword[void] identifier[writeSomeValueRestriction] operator[SEP] identifier[String] identifier[propertyUri] , identifier[String] identifier[rangeUri] , identifier[Resource] identifier[bnode] operator[SEP] Keyword[throws] identifier[RDFHandlerException] { Keyword[this] operator[SEP] identifier[rdfWriter] operator[SEP] identifier[writeTripleValueObject] operator[SEP] identifier[bnode] , identifier[RdfWriter] operator[SEP] identifier[RDF_TYPE] , identifier[RdfWriter] operator[SEP] identifier[OWL_RESTRICTION] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[rdfWriter] operator[SEP] identifier[writeTripleUriObject] operator[SEP] identifier[bnode] , identifier[RdfWriter] operator[SEP] identifier[OWL_ON_PROPERTY] , identifier[propertyUri] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[rdfWriter] operator[SEP] identifier[writeTripleUriObject] operator[SEP] identifier[bnode] , identifier[RdfWriter] operator[SEP] identifier[OWL_SOME_VALUES_FROM] , identifier[rangeUri] operator[SEP] operator[SEP] }
public <T extends Number> void compareFloatingPoint( Local<Integer> target, Local<T> a, Local<T> b, int nanValue) { Rop rop; if (nanValue == 1) { rop = Rops.opCmpg(a.type.ropType); } else if (nanValue == -1) { rop = Rops.opCmpl(a.type.ropType); } else { throw new IllegalArgumentException("expected 1 or -1 but was " + nanValue); } addInstruction(new PlainInsn(rop, sourcePosition, target.spec(), RegisterSpecList.make(a.spec(), b.spec()))); }
class class_name[name] begin[{] method[compareFloatingPoint, return_type[void], modifier[public], parameter[target, a, b, nanValue]] begin[{] local_variable[type[Rop], rop] if[binary_operation[member[.nanValue], ==, literal[1]]] begin[{] assign[member[.rop], call[Rops.opCmpg, parameter[member[a.type.ropType]]]] else begin[{] if[binary_operation[member[.nanValue], ==, literal[1]]] begin[{] assign[member[.rop], call[Rops.opCmpl, parameter[member[a.type.ropType]]]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="expected 1 or -1 but was "), operandr=MemberReference(member=nanValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) end[}] end[}] call[.addInstruction, parameter[ClassCreator(arguments=[MemberReference(member=rop, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sourcePosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=spec, postfix_operators=[], prefix_operators=[], qualifier=target, selectors=[], type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=spec, postfix_operators=[], prefix_operators=[], qualifier=a, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=spec, postfix_operators=[], prefix_operators=[], qualifier=b, selectors=[], type_arguments=None)], member=make, postfix_operators=[], prefix_operators=[], qualifier=RegisterSpecList, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PlainInsn, sub_type=None))]] end[}] END[}]
Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[Number] operator[>] Keyword[void] identifier[compareFloatingPoint] operator[SEP] identifier[Local] operator[<] identifier[Integer] operator[>] identifier[target] , identifier[Local] operator[<] identifier[T] operator[>] identifier[a] , identifier[Local] operator[<] identifier[T] operator[>] identifier[b] , Keyword[int] identifier[nanValue] operator[SEP] { identifier[Rop] identifier[rop] operator[SEP] Keyword[if] operator[SEP] identifier[nanValue] operator[==] Other[1] operator[SEP] { identifier[rop] operator[=] identifier[Rops] operator[SEP] identifier[opCmpg] operator[SEP] identifier[a] operator[SEP] identifier[type] operator[SEP] identifier[ropType] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[nanValue] operator[==] operator[-] Other[1] operator[SEP] { identifier[rop] operator[=] identifier[Rops] operator[SEP] identifier[opCmpl] operator[SEP] identifier[a] operator[SEP] identifier[type] operator[SEP] identifier[ropType] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[nanValue] operator[SEP] operator[SEP] } identifier[addInstruction] operator[SEP] Keyword[new] identifier[PlainInsn] operator[SEP] identifier[rop] , identifier[sourcePosition] , identifier[target] operator[SEP] identifier[spec] operator[SEP] operator[SEP] , identifier[RegisterSpecList] operator[SEP] identifier[make] operator[SEP] identifier[a] operator[SEP] identifier[spec] operator[SEP] operator[SEP] , identifier[b] operator[SEP] identifier[spec] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override public void position(long pos) { log.debug("position: {}", pos); currentFrame = getFrame(pos); log.debug("Setting current sample: {}", currentFrame); }
class class_name[name] begin[{] method[position, return_type[void], modifier[public], parameter[pos]] begin[{] call[log.debug, parameter[literal["position: {}"], member[.pos]]] assign[member[.currentFrame], call[.getFrame, parameter[member[.pos]]]] call[log.debug, parameter[literal["Setting current sample: {}"], member[.currentFrame]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[position] operator[SEP] Keyword[long] identifier[pos] operator[SEP] { identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[pos] operator[SEP] operator[SEP] identifier[currentFrame] operator[=] identifier[getFrame] operator[SEP] identifier[pos] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[currentFrame] operator[SEP] operator[SEP] }
public void marshall(DeleteMethodRequest deleteMethodRequest, ProtocolMarshaller protocolMarshaller) { if (deleteMethodRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(deleteMethodRequest.getRestApiId(), RESTAPIID_BINDING); protocolMarshaller.marshall(deleteMethodRequest.getResourceId(), RESOURCEID_BINDING); protocolMarshaller.marshall(deleteMethodRequest.getHttpMethod(), HTTPMETHOD_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[deleteMethodRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.deleteMethodRequest], ==, 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=getRestApiId, postfix_operators=[], prefix_operators=[], qualifier=deleteMethodRequest, selectors=[], type_arguments=None), MemberReference(member=RESTAPIID_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getResourceId, postfix_operators=[], prefix_operators=[], qualifier=deleteMethodRequest, selectors=[], type_arguments=None), MemberReference(member=RESOURCEID_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getHttpMethod, postfix_operators=[], prefix_operators=[], qualifier=deleteMethodRequest, selectors=[], type_arguments=None), MemberReference(member=HTTPMETHOD_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[DeleteMethodRequest] identifier[deleteMethodRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[deleteMethodRequest] 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[deleteMethodRequest] operator[SEP] identifier[getRestApiId] operator[SEP] operator[SEP] , identifier[RESTAPIID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[deleteMethodRequest] operator[SEP] identifier[getResourceId] operator[SEP] operator[SEP] , identifier[RESOURCEID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[deleteMethodRequest] operator[SEP] identifier[getHttpMethod] operator[SEP] operator[SEP] , identifier[HTTPMETHOD_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 void visitPreOrder( Node node, Visitor visitor, Predicate<Node> traverseChildrenPred) { visitor.visit(node); if (traverseChildrenPred.apply(node)) { for (Node c = node.getFirstChild(); c != null; c = c.getNext()) { visitPreOrder(c, visitor, traverseChildrenPred); } } }
class class_name[name] begin[{] method[visitPreOrder, return_type[void], modifier[public static], parameter[node, visitor, traverseChildrenPred]] begin[{] call[visitor.visit, parameter[member[.node]]] if[call[traverseChildrenPred.apply, parameter[member[.node]]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=visitor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=traverseChildrenPred, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=visitPreOrder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=getFirstChild, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[], type_arguments=None), name=c)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None)), update=[Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getNext, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None))]), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[visitPreOrder] operator[SEP] identifier[Node] identifier[node] , identifier[Visitor] identifier[visitor] , identifier[Predicate] operator[<] identifier[Node] operator[>] identifier[traverseChildrenPred] operator[SEP] { identifier[visitor] operator[SEP] identifier[visit] operator[SEP] identifier[node] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[traverseChildrenPred] operator[SEP] identifier[apply] operator[SEP] identifier[node] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[Node] identifier[c] operator[=] identifier[node] operator[SEP] identifier[getFirstChild] operator[SEP] operator[SEP] operator[SEP] identifier[c] operator[!=] Other[null] operator[SEP] identifier[c] operator[=] identifier[c] operator[SEP] identifier[getNext] operator[SEP] operator[SEP] operator[SEP] { identifier[visitPreOrder] operator[SEP] identifier[c] , identifier[visitor] , identifier[traverseChildrenPred] operator[SEP] operator[SEP] } } }
public ISarlInterfaceBuilder addSarlInterface(String name) { ISarlInterfaceBuilder builder = this.iSarlInterfaceBuilderProvider.get(); builder.eInit(getSarlAgent(), name, getTypeResolutionContext()); return builder; }
class class_name[name] begin[{] method[addSarlInterface, return_type[type[ISarlInterfaceBuilder]], modifier[public], parameter[name]] begin[{] local_variable[type[ISarlInterfaceBuilder], builder] call[builder.eInit, parameter[call[.getSarlAgent, parameter[]], member[.name], call[.getTypeResolutionContext, parameter[]]]] return[member[.builder]] end[}] END[}]
Keyword[public] identifier[ISarlInterfaceBuilder] identifier[addSarlInterface] operator[SEP] identifier[String] identifier[name] operator[SEP] { identifier[ISarlInterfaceBuilder] identifier[builder] operator[=] Keyword[this] operator[SEP] identifier[iSarlInterfaceBuilderProvider] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[eInit] operator[SEP] identifier[getSarlAgent] operator[SEP] operator[SEP] , identifier[name] , identifier[getTypeResolutionContext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[builder] operator[SEP] }
@Nonnull public static <T1, T2, R> LBiObjCharFunctionBuilder<T1, T2, R> biObjCharFunction(Consumer<LBiObjCharFunction<T1, T2, R>> consumer) { return new LBiObjCharFunctionBuilder(consumer); }
class class_name[name] begin[{] method[biObjCharFunction, return_type[type[LBiObjCharFunctionBuilder]], modifier[public static], parameter[consumer]] begin[{] return[ClassCreator(arguments=[MemberReference(member=consumer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LBiObjCharFunctionBuilder, sub_type=None))] end[}] END[}]
annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] operator[<] identifier[T1] , identifier[T2] , identifier[R] operator[>] identifier[LBiObjCharFunctionBuilder] operator[<] identifier[T1] , identifier[T2] , identifier[R] operator[>] identifier[biObjCharFunction] operator[SEP] identifier[Consumer] operator[<] identifier[LBiObjCharFunction] operator[<] identifier[T1] , identifier[T2] , identifier[R] operator[>] operator[>] identifier[consumer] operator[SEP] { Keyword[return] Keyword[new] identifier[LBiObjCharFunctionBuilder] operator[SEP] identifier[consumer] operator[SEP] operator[SEP] }
public Transactions getAccountTransactions(final String accountCode) { return doGET(Accounts.ACCOUNTS_RESOURCE + "/" + accountCode + Transactions.TRANSACTIONS_RESOURCE, Transactions.class, new QueryParams()); }
class class_name[name] begin[{] method[getAccountTransactions, return_type[type[Transactions]], modifier[public], parameter[accountCode]] begin[{] return[call[.doGET, parameter[binary_operation[binary_operation[binary_operation[member[Accounts.ACCOUNTS_RESOURCE], +, literal["/"]], +, member[.accountCode]], +, member[Transactions.TRANSACTIONS_RESOURCE]], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Transactions, sub_type=None)), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=QueryParams, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[Transactions] identifier[getAccountTransactions] operator[SEP] Keyword[final] identifier[String] identifier[accountCode] operator[SEP] { Keyword[return] identifier[doGET] operator[SEP] identifier[Accounts] operator[SEP] identifier[ACCOUNTS_RESOURCE] operator[+] literal[String] operator[+] identifier[accountCode] operator[+] identifier[Transactions] operator[SEP] identifier[TRANSACTIONS_RESOURCE] , identifier[Transactions] operator[SEP] Keyword[class] , Keyword[new] identifier[QueryParams] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void generateProxy(Element element) { try { getClassBuilder(element) .buildProxyClass() .build() .writeTo(filer); } catch (Exception ex) { messager.printMessage(Diagnostic.Kind.WARNING, "Error while generating Proxy " + ex.getMessage()); } }
class class_name[name] begin[{] method[generateProxy, return_type[void], modifier[public], parameter[element]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=element, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getClassBuilder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=buildProxyClass, 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), MethodInvocation(arguments=[MemberReference(member=filer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeTo, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=WARNING, postfix_operators=[], prefix_operators=[], qualifier=Diagnostic.Kind, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error while generating Proxy "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None), operator=+)], member=printMessage, postfix_operators=[], prefix_operators=[], qualifier=messager, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[generateProxy] operator[SEP] identifier[Element] identifier[element] operator[SEP] { Keyword[try] { identifier[getClassBuilder] operator[SEP] identifier[element] operator[SEP] operator[SEP] identifier[buildProxyClass] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[writeTo] operator[SEP] identifier[filer] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { identifier[messager] operator[SEP] identifier[printMessage] operator[SEP] identifier[Diagnostic] operator[SEP] identifier[Kind] operator[SEP] identifier[WARNING] , literal[String] operator[+] identifier[ex] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public void logInfo(Object[] message,Throwable throwable) { this.log(LogLevel.INFO,message,throwable); }
class class_name[name] begin[{] method[logInfo, return_type[void], modifier[public], parameter[message, throwable]] begin[{] THIS[call[None.log, parameter[member[LogLevel.INFO], member[.message], member[.throwable]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[logInfo] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[message] , identifier[Throwable] identifier[throwable] operator[SEP] { Keyword[this] operator[SEP] identifier[log] operator[SEP] identifier[LogLevel] operator[SEP] identifier[INFO] , identifier[message] , identifier[throwable] operator[SEP] operator[SEP] }
protected Response getConfiguration(final String extensionId, final Sid accountSid, final MediaType responseType) { //Parameter "extensionId" could be the extension Sid or extension name. ExtensionConfiguration extensionConfiguration = null; ExtensionConfiguration extensionAccountConfiguration = null; Sid extensionSid = null; String extensionName = null; if(Sid.pattern.matcher(extensionId).matches()){ extensionSid = new Sid(extensionId); } else { extensionName = extensionId; } if (Sid.pattern.matcher(extensionId).matches()) { try { extensionConfiguration = extensionsConfigurationDao.getConfigurationBySid(extensionSid); } catch (Exception e) { return status(NOT_FOUND).build(); } } else { try { extensionConfiguration = extensionsConfigurationDao.getConfigurationByName(extensionName); } catch (Exception e) { return status(NOT_FOUND).build(); } } if (accountSid!=null) { if(extensionSid == null ){ extensionSid = extensionConfiguration.getSid(); } try { extensionAccountConfiguration = extensionsConfigurationDao.getAccountExtensionConfiguration(accountSid.toString(), extensionSid.toString()); extensionConfiguration.setConfigurationData(extensionAccountConfiguration.getConfigurationData(), extensionAccountConfiguration.getConfigurationType()); } catch (Exception e) { return status(NOT_FOUND).build(); } } if (extensionConfiguration == null) { return status(NOT_FOUND).build(); } else { if (APPLICATION_XML_TYPE.equals(responseType)) { final RestCommResponse response = new RestCommResponse(extensionConfiguration); return ok(xstream.toXML(response), APPLICATION_XML).build(); } else if (APPLICATION_JSON_TYPE.equals(responseType)) { return ok(gson.toJson(extensionConfiguration), APPLICATION_JSON).build(); } else { return null; } } }
class class_name[name] begin[{] method[getConfiguration, return_type[type[Response]], modifier[protected], parameter[extensionId, accountSid, responseType]] begin[{] local_variable[type[ExtensionConfiguration], extensionConfiguration] local_variable[type[ExtensionConfiguration], extensionAccountConfiguration] local_variable[type[Sid], extensionSid] local_variable[type[String], extensionName] if[call[Sid.pattern.matcher, parameter[member[.extensionId]]]] begin[{] assign[member[.extensionSid], ClassCreator(arguments=[MemberReference(member=extensionId, 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=Sid, sub_type=None))] else begin[{] assign[member[.extensionName], member[.extensionId]] end[}] if[call[Sid.pattern.matcher, parameter[member[.extensionId]]]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=extensionConfiguration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=extensionSid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getConfigurationBySid, postfix_operators=[], prefix_operators=[], qualifier=extensionsConfigurationDao, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=NOT_FOUND, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=status, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], 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[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=extensionConfiguration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=extensionName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getConfigurationByName, postfix_operators=[], prefix_operators=[], qualifier=extensionsConfigurationDao, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=NOT_FOUND, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=status, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] if[binary_operation[member[.accountSid], !=, literal[null]]] begin[{] if[binary_operation[member[.extensionSid], ==, literal[null]]] begin[{] assign[member[.extensionSid], call[extensionConfiguration.getSid, parameter[]]] else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=extensionAccountConfiguration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=accountSid, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=extensionSid, selectors=[], type_arguments=None)], member=getAccountExtensionConfiguration, postfix_operators=[], prefix_operators=[], qualifier=extensionsConfigurationDao, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getConfigurationData, postfix_operators=[], prefix_operators=[], qualifier=extensionAccountConfiguration, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getConfigurationType, postfix_operators=[], prefix_operators=[], qualifier=extensionAccountConfiguration, selectors=[], type_arguments=None)], member=setConfigurationData, postfix_operators=[], prefix_operators=[], qualifier=extensionConfiguration, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=NOT_FOUND, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=status, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], 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[.extensionConfiguration], ==, literal[null]]] begin[{] return[call[.status, parameter[member[.NOT_FOUND]]]] else begin[{] if[call[APPLICATION_XML_TYPE.equals, parameter[member[.responseType]]]] begin[{] local_variable[type[RestCommResponse], response] return[call[.ok, parameter[call[xstream.toXML, parameter[member[.response]]], member[.APPLICATION_XML]]]] else begin[{] if[call[APPLICATION_JSON_TYPE.equals, parameter[member[.responseType]]]] begin[{] return[call[.ok, parameter[call[gson.toJson, parameter[member[.extensionConfiguration]]], member[.APPLICATION_JSON]]]] else begin[{] return[literal[null]] end[}] end[}] end[}] end[}] END[}]
Keyword[protected] identifier[Response] identifier[getConfiguration] operator[SEP] Keyword[final] identifier[String] identifier[extensionId] , Keyword[final] identifier[Sid] identifier[accountSid] , Keyword[final] identifier[MediaType] identifier[responseType] operator[SEP] { identifier[ExtensionConfiguration] identifier[extensionConfiguration] operator[=] Other[null] operator[SEP] identifier[ExtensionConfiguration] identifier[extensionAccountConfiguration] operator[=] Other[null] operator[SEP] identifier[Sid] identifier[extensionSid] operator[=] Other[null] operator[SEP] identifier[String] identifier[extensionName] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[Sid] operator[SEP] identifier[pattern] operator[SEP] identifier[matcher] operator[SEP] identifier[extensionId] operator[SEP] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] { identifier[extensionSid] operator[=] Keyword[new] identifier[Sid] operator[SEP] identifier[extensionId] operator[SEP] operator[SEP] } Keyword[else] { identifier[extensionName] operator[=] identifier[extensionId] operator[SEP] } Keyword[if] operator[SEP] identifier[Sid] operator[SEP] identifier[pattern] operator[SEP] identifier[matcher] operator[SEP] identifier[extensionId] operator[SEP] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { identifier[extensionConfiguration] operator[=] identifier[extensionsConfigurationDao] operator[SEP] identifier[getConfigurationBySid] operator[SEP] identifier[extensionSid] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[return] identifier[status] operator[SEP] identifier[NOT_FOUND] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[try] { identifier[extensionConfiguration] operator[=] identifier[extensionsConfigurationDao] operator[SEP] identifier[getConfigurationByName] operator[SEP] identifier[extensionName] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[return] identifier[status] operator[SEP] identifier[NOT_FOUND] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[accountSid] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[extensionSid] operator[==] Other[null] operator[SEP] { identifier[extensionSid] operator[=] identifier[extensionConfiguration] operator[SEP] identifier[getSid] operator[SEP] operator[SEP] operator[SEP] } Keyword[try] { identifier[extensionAccountConfiguration] operator[=] identifier[extensionsConfigurationDao] operator[SEP] identifier[getAccountExtensionConfiguration] operator[SEP] identifier[accountSid] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[extensionSid] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[extensionConfiguration] operator[SEP] identifier[setConfigurationData] operator[SEP] identifier[extensionAccountConfiguration] operator[SEP] identifier[getConfigurationData] operator[SEP] operator[SEP] , identifier[extensionAccountConfiguration] operator[SEP] identifier[getConfigurationType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[return] identifier[status] operator[SEP] identifier[NOT_FOUND] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[extensionConfiguration] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[status] operator[SEP] identifier[NOT_FOUND] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[APPLICATION_XML_TYPE] operator[SEP] identifier[equals] operator[SEP] identifier[responseType] operator[SEP] operator[SEP] { Keyword[final] identifier[RestCommResponse] identifier[response] operator[=] Keyword[new] identifier[RestCommResponse] operator[SEP] identifier[extensionConfiguration] operator[SEP] operator[SEP] Keyword[return] identifier[ok] operator[SEP] identifier[xstream] operator[SEP] identifier[toXML] operator[SEP] identifier[response] operator[SEP] , identifier[APPLICATION_XML] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[APPLICATION_JSON_TYPE] operator[SEP] identifier[equals] operator[SEP] identifier[responseType] operator[SEP] operator[SEP] { Keyword[return] identifier[ok] operator[SEP] identifier[gson] operator[SEP] identifier[toJson] operator[SEP] identifier[extensionConfiguration] operator[SEP] , identifier[APPLICATION_JSON] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Other[null] operator[SEP] } } }
@Override public List<String> getTrailerNames() { HttpTrailers trailers = message.getTrailers(); if (trailers != null) return trailers.getAllHeaderNames(); else return null; }
class class_name[name] begin[{] method[getTrailerNames, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[HttpTrailers], trailers] if[binary_operation[member[.trailers], !=, literal[null]]] begin[{] return[call[trailers.getAllHeaderNames, parameter[]]] else begin[{] return[literal[null]] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[getTrailerNames] operator[SEP] operator[SEP] { identifier[HttpTrailers] identifier[trailers] operator[=] identifier[message] operator[SEP] identifier[getTrailers] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[trailers] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[trailers] operator[SEP] identifier[getAllHeaderNames] operator[SEP] operator[SEP] operator[SEP] Keyword[else] Keyword[return] Other[null] operator[SEP] }
protected void encodeInvalidData(final FacesContext context, final Sheet sheet, final WidgetBuilder wb) throws IOException { wb.attr("errors", sheet.getInvalidDataValue()); }
class class_name[name] begin[{] method[encodeInvalidData, return_type[void], modifier[protected], parameter[context, sheet, wb]] begin[{] call[wb.attr, parameter[literal["errors"], call[sheet.getInvalidDataValue, parameter[]]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[encodeInvalidData] operator[SEP] Keyword[final] identifier[FacesContext] identifier[context] , Keyword[final] identifier[Sheet] identifier[sheet] , Keyword[final] identifier[WidgetBuilder] identifier[wb] operator[SEP] Keyword[throws] identifier[IOException] { identifier[wb] operator[SEP] identifier[attr] operator[SEP] literal[String] , identifier[sheet] operator[SEP] identifier[getInvalidDataValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override public DisassociateRouteTableResult disassociateRouteTable(DisassociateRouteTableRequest request) { request = beforeClientExecution(request); return executeDisassociateRouteTable(request); }
class class_name[name] begin[{] method[disassociateRouteTable, return_type[type[DisassociateRouteTableResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeDisassociateRouteTable, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[DisassociateRouteTableResult] identifier[disassociateRouteTable] operator[SEP] identifier[DisassociateRouteTableRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeDisassociateRouteTable] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public static MaskedText maskInUrl(String url){ MaskedText result = new MaskedText(); result.setClearText(url); result.setText(url); result.setMasked(null); if (url != null){ Matcher urlMatcher = URL_PATTERN.matcher(url); if (urlMatcher.find()) { Matcher pwdMatcher = PASSWORD_IN_URL_PATTERN.matcher(url); if (pwdMatcher.find()){ result.setText(pwdMatcher.replaceFirst(PASSWORD_IN_URL_MASK)); String s = pwdMatcher.group(); // with leading ":" and trailing "@" result.setMasked(s.substring(1, s.length()-1)); } } } return result; }
class class_name[name] begin[{] method[maskInUrl, return_type[type[MaskedText]], modifier[public static], parameter[url]] begin[{] local_variable[type[MaskedText], result] call[result.setClearText, parameter[member[.url]]] call[result.setText, parameter[member[.url]]] call[result.setMasked, parameter[literal[null]]] if[binary_operation[member[.url], !=, literal[null]]] begin[{] local_variable[type[Matcher], urlMatcher] if[call[urlMatcher.find, parameter[]]] begin[{] local_variable[type[Matcher], pwdMatcher] if[call[pwdMatcher.find, parameter[]]] begin[{] call[result.setText, parameter[call[pwdMatcher.replaceFirst, parameter[member[.PASSWORD_IN_URL_MASK]]]]] local_variable[type[String], s] call[result.setMasked, parameter[call[s.substring, parameter[literal[1], binary_operation[call[s.length, parameter[]], -, literal[1]]]]]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] identifier[MaskedText] identifier[maskInUrl] operator[SEP] identifier[String] identifier[url] operator[SEP] { identifier[MaskedText] identifier[result] operator[=] Keyword[new] identifier[MaskedText] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[setClearText] operator[SEP] identifier[url] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[setText] operator[SEP] identifier[url] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[setMasked] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[url] operator[!=] Other[null] operator[SEP] { identifier[Matcher] identifier[urlMatcher] operator[=] identifier[URL_PATTERN] operator[SEP] identifier[matcher] operator[SEP] identifier[url] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[urlMatcher] operator[SEP] identifier[find] operator[SEP] operator[SEP] operator[SEP] { identifier[Matcher] identifier[pwdMatcher] operator[=] identifier[PASSWORD_IN_URL_PATTERN] operator[SEP] identifier[matcher] operator[SEP] identifier[url] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pwdMatcher] operator[SEP] identifier[find] operator[SEP] operator[SEP] operator[SEP] { identifier[result] operator[SEP] identifier[setText] operator[SEP] identifier[pwdMatcher] operator[SEP] identifier[replaceFirst] operator[SEP] identifier[PASSWORD_IN_URL_MASK] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[s] operator[=] identifier[pwdMatcher] operator[SEP] identifier[group] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[setMasked] operator[SEP] identifier[s] operator[SEP] identifier[substring] operator[SEP] Other[1] , identifier[s] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[return] identifier[result] operator[SEP] }
public HttpComponentsClientHttpRequestFactory getObject() throws Exception { Assert.notNull(credentials, "User credentials not set properly!"); HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory(httpClient) { @Override protected HttpContext createHttpContext(HttpMethod httpMethod, URI uri) { // we have to use preemptive authentication // therefore add some basic auth cache to the local context AuthCache authCache = new BasicAuthCache(); BasicScheme basicAuth = new BasicScheme(); authCache.put(new HttpHost(authScope.getHost(), authScope.getPort(), "http"), basicAuth); authCache.put(new HttpHost(authScope.getHost(), authScope.getPort(), "https"), basicAuth); BasicHttpContext localcontext = new BasicHttpContext(); localcontext.setAttribute(ClientContext.AUTH_CACHE, authCache); return localcontext; } }; if (httpClient instanceof AbstractHttpClient) { ((AbstractHttpClient)httpClient).getCredentialsProvider().setCredentials(authScope, credentials); } else { log.warn("Unable to set username password credentials for basic authentication, " + "because nested HttpClient implementation does not support a credentials provider!"); } return requestFactory; }
class class_name[name] begin[{] method[getObject, return_type[type[HttpComponentsClientHttpRequestFactory]], modifier[public], parameter[]] begin[{] call[Assert.notNull, parameter[member[.credentials], literal["User credentials not set properly!"]]] local_variable[type[HttpComponentsClientHttpRequestFactory], requestFactory] if[binary_operation[member[.httpClient], instanceof, type[AbstractHttpClient]]] begin[{] Cast(expression=MemberReference(member=httpClient, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=AbstractHttpClient, sub_type=None)) else begin[{] call[log.warn, parameter[binary_operation[literal["Unable to set username password credentials for basic authentication, "], +, literal["because nested HttpClient implementation does not support a credentials provider!"]]]] end[}] return[member[.requestFactory]] end[}] END[}]
Keyword[public] identifier[HttpComponentsClientHttpRequestFactory] identifier[getObject] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] identifier[credentials] , literal[String] operator[SEP] operator[SEP] identifier[HttpComponentsClientHttpRequestFactory] identifier[requestFactory] operator[=] Keyword[new] identifier[HttpComponentsClientHttpRequestFactory] operator[SEP] identifier[httpClient] operator[SEP] { annotation[@] identifier[Override] Keyword[protected] identifier[HttpContext] identifier[createHttpContext] operator[SEP] identifier[HttpMethod] identifier[httpMethod] , identifier[URI] identifier[uri] operator[SEP] { identifier[AuthCache] identifier[authCache] operator[=] Keyword[new] identifier[BasicAuthCache] operator[SEP] operator[SEP] operator[SEP] identifier[BasicScheme] identifier[basicAuth] operator[=] Keyword[new] identifier[BasicScheme] operator[SEP] operator[SEP] operator[SEP] identifier[authCache] operator[SEP] identifier[put] operator[SEP] Keyword[new] identifier[HttpHost] operator[SEP] identifier[authScope] operator[SEP] identifier[getHost] operator[SEP] operator[SEP] , identifier[authScope] operator[SEP] identifier[getPort] operator[SEP] operator[SEP] , literal[String] operator[SEP] , identifier[basicAuth] operator[SEP] operator[SEP] identifier[authCache] operator[SEP] identifier[put] operator[SEP] Keyword[new] identifier[HttpHost] operator[SEP] identifier[authScope] operator[SEP] identifier[getHost] operator[SEP] operator[SEP] , identifier[authScope] operator[SEP] identifier[getPort] operator[SEP] operator[SEP] , literal[String] operator[SEP] , identifier[basicAuth] operator[SEP] operator[SEP] identifier[BasicHttpContext] identifier[localcontext] operator[=] Keyword[new] identifier[BasicHttpContext] operator[SEP] operator[SEP] operator[SEP] identifier[localcontext] operator[SEP] identifier[setAttribute] operator[SEP] identifier[ClientContext] operator[SEP] identifier[AUTH_CACHE] , identifier[authCache] operator[SEP] operator[SEP] Keyword[return] identifier[localcontext] operator[SEP] } } operator[SEP] Keyword[if] operator[SEP] identifier[httpClient] Keyword[instanceof] identifier[AbstractHttpClient] operator[SEP] { operator[SEP] operator[SEP] identifier[AbstractHttpClient] operator[SEP] identifier[httpClient] operator[SEP] operator[SEP] identifier[getCredentialsProvider] operator[SEP] operator[SEP] operator[SEP] identifier[setCredentials] operator[SEP] identifier[authScope] , identifier[credentials] operator[SEP] operator[SEP] } Keyword[else] { identifier[log] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[requestFactory] operator[SEP] }
private void initComponents() { fileChooser = new javax.swing.JFileChooser(); jLabel1 = new javax.swing.JLabel(); txtInputDir = new javax.swing.JTextField(); btCancel = new javax.swing.JButton(); btOk = new javax.swing.JButton(); btSearchInputDir = new javax.swing.JButton(); pbImport = new javax.swing.JProgressBar(); jLabel2 = new javax.swing.JLabel(); lblStatus = new javax.swing.JLabel(); pbCorpus = new javax.swing.JProgressBar(); lblCurrentCorpus = new javax.swing.JLabel(); jCheckBox1 = new javax.swing.JCheckBox(); fileChooser.setFileSelectionMode(javax.swing.JFileChooser.FILES_AND_DIRECTORIES); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Import - ANNIS Kickstarter"); setLocationByPlatform(true); jLabel1.setText("Directory to import:"); btCancel.setMnemonic('c'); btCancel.setText("Cancel"); btCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btCancelActionPerformed(evt); } }); btOk.setMnemonic('o'); btOk.setText("Ok"); btOk.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btOkActionPerformed(evt); } }); btSearchInputDir.setText("..."); btSearchInputDir.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btSearchInputDirActionPerformed(evt); } }); jLabel2.setText("status:"); lblStatus.setText("..."); lblCurrentCorpus.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); lblCurrentCorpus.setText("Please select corpus for import!"); jCheckBox1.setText("overwrite"); jCheckBox1.setMnemonic('w'); jCheckBox1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jCheckBox1ActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(pbImport, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(txtInputDir, javax.swing.GroupLayout.DEFAULT_SIZE, 462, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btSearchInputDir, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lblStatus, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(jCheckBox1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lblCurrentCorpus, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(pbCorpus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addComponent(btCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btOk, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(txtInputDir, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btSearchInputDir)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(pbCorpus, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblCurrentCorpus, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jCheckBox1))) .addGap(6, 6, 6) .addComponent(pbImport, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent(lblStatus, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btCancel) .addComponent(btOk)) .addContainerGap()) ); pack(); }
class class_name[name] begin[{] method[initComponents, return_type[void], modifier[private], parameter[]] begin[{] assign[member[.fileChooser], 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=JFileChooser, sub_type=None))))] assign[member[.jLabel1], 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[.txtInputDir], 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[.btCancel], 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=JButton, sub_type=None))))] assign[member[.btOk], 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=JButton, sub_type=None))))] assign[member[.btSearchInputDir], 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=JButton, sub_type=None))))] assign[member[.pbImport], 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=JProgressBar, sub_type=None))))] assign[member[.jLabel2], 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[.lblStatus], 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[.pbCorpus], 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=JProgressBar, sub_type=None))))] assign[member[.lblCurrentCorpus], 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[.jCheckBox1], 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=JCheckBox, sub_type=None))))] call[fileChooser.setFileSelectionMode, parameter[member[javax.swing.JFileChooser.FILES_AND_DIRECTORIES]]] call[.setDefaultCloseOperation, parameter[member[javax.swing.WindowConstants.DISPOSE_ON_CLOSE]]] call[.setTitle, parameter[literal["Import - ANNIS Kickstarter"]]] call[.setLocationByPlatform, parameter[literal[true]]] call[jLabel1.setText, parameter[literal["Directory to import:"]]] call[btCancel.setMnemonic, parameter[literal['c']]] call[btCancel.setText, parameter[literal["Cancel"]]] call[btCancel.addActionListener, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=evt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=btCancelActionPerformed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=actionPerformed, parameters=[FormalParameter(annotations=[], modifiers=set(), name=evt, type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=ActionEvent, sub_type=None)))), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=ActionListener, sub_type=None)))))]] call[btOk.setMnemonic, parameter[literal['o']]] call[btOk.setText, parameter[literal["Ok"]]] call[btOk.addActionListener, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=evt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=btOkActionPerformed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=actionPerformed, parameters=[FormalParameter(annotations=[], modifiers=set(), name=evt, type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=ActionEvent, sub_type=None)))), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=ActionListener, sub_type=None)))))]] call[btSearchInputDir.setText, parameter[literal["..."]]] call[btSearchInputDir.addActionListener, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=evt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=btSearchInputDirActionPerformed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=actionPerformed, parameters=[FormalParameter(annotations=[], modifiers=set(), name=evt, type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=ActionEvent, sub_type=None)))), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=ActionListener, sub_type=None)))))]] call[jLabel2.setText, parameter[literal["status:"]]] call[lblStatus.setText, parameter[literal["..."]]] call[lblCurrentCorpus.setHorizontalAlignment, parameter[member[javax.swing.SwingConstants.RIGHT]]] call[lblCurrentCorpus.setText, parameter[literal["Please select corpus for import!"]]] call[jCheckBox1.setText, parameter[literal["overwrite"]]] call[jCheckBox1.setMnemonic, parameter[literal['w']]] call[jCheckBox1.addActionListener, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=evt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=jCheckBox1ActionPerformed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=actionPerformed, parameters=[FormalParameter(annotations=[], modifiers=set(), name=evt, type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=ActionEvent, sub_type=None)))), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=awt, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=ActionListener, sub_type=None)))))]] local_variable[type[javax], layout] call[.getContentPane, parameter[]] call[layout.setHorizontalGroup, parameter[call[layout.createParallelGroup, parameter[member[javax.swing.GroupLayout.Alignment.LEADING]]]]] call[layout.setVerticalGroup, parameter[call[layout.createParallelGroup, parameter[member[javax.swing.GroupLayout.Alignment.LEADING]]]]] call[.pack, parameter[]] end[}] END[}]
Keyword[private] Keyword[void] identifier[initComponents] operator[SEP] operator[SEP] { identifier[fileChooser] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JFileChooser] operator[SEP] operator[SEP] operator[SEP] identifier[jLabel1] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JLabel] operator[SEP] operator[SEP] operator[SEP] identifier[txtInputDir] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JTextField] operator[SEP] operator[SEP] operator[SEP] identifier[btCancel] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JButton] operator[SEP] operator[SEP] operator[SEP] identifier[btOk] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JButton] operator[SEP] operator[SEP] operator[SEP] identifier[btSearchInputDir] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JButton] operator[SEP] operator[SEP] operator[SEP] identifier[pbImport] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JProgressBar] operator[SEP] operator[SEP] operator[SEP] identifier[jLabel2] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JLabel] operator[SEP] operator[SEP] operator[SEP] identifier[lblStatus] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JLabel] operator[SEP] operator[SEP] operator[SEP] identifier[pbCorpus] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JProgressBar] operator[SEP] operator[SEP] operator[SEP] identifier[lblCurrentCorpus] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JLabel] operator[SEP] operator[SEP] operator[SEP] identifier[jCheckBox1] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JCheckBox] operator[SEP] operator[SEP] operator[SEP] identifier[fileChooser] operator[SEP] identifier[setFileSelectionMode] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JFileChooser] operator[SEP] identifier[FILES_AND_DIRECTORIES] operator[SEP] operator[SEP] identifier[setDefaultCloseOperation] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[WindowConstants] operator[SEP] identifier[DISPOSE_ON_CLOSE] operator[SEP] operator[SEP] identifier[setTitle] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[setLocationByPlatform] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[jLabel1] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[btCancel] operator[SEP] identifier[setMnemonic] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[btCancel] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[btCancel] operator[SEP] identifier[addActionListener] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[ActionListener] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[actionPerformed] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[ActionEvent] identifier[evt] operator[SEP] { identifier[btCancelActionPerformed] operator[SEP] identifier[evt] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[btOk] operator[SEP] identifier[setMnemonic] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[btOk] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[btOk] operator[SEP] identifier[addActionListener] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[ActionListener] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[actionPerformed] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[ActionEvent] identifier[evt] operator[SEP] { identifier[btOkActionPerformed] operator[SEP] identifier[evt] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[btSearchInputDir] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[btSearchInputDir] operator[SEP] identifier[addActionListener] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[ActionListener] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[actionPerformed] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[ActionEvent] identifier[evt] operator[SEP] { identifier[btSearchInputDirActionPerformed] operator[SEP] identifier[evt] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[jLabel2] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[lblStatus] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[lblCurrentCorpus] operator[SEP] identifier[setHorizontalAlignment] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[SwingConstants] operator[SEP] identifier[RIGHT] operator[SEP] operator[SEP] identifier[lblCurrentCorpus] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[jCheckBox1] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[jCheckBox1] operator[SEP] identifier[setMnemonic] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[jCheckBox1] operator[SEP] identifier[addActionListener] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[ActionListener] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[actionPerformed] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[ActionEvent] identifier[evt] operator[SEP] { identifier[jCheckBox1ActionPerformed] operator[SEP] identifier[evt] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] identifier[layout] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[getContentPane] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getContentPane] operator[SEP] operator[SEP] operator[SEP] identifier[setLayout] operator[SEP] identifier[layout] operator[SEP] operator[SEP] identifier[layout] operator[SEP] identifier[setHorizontalGroup] operator[SEP] identifier[layout] operator[SEP] identifier[createParallelGroup] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[Alignment] operator[SEP] identifier[LEADING] operator[SEP] operator[SEP] identifier[addGroup] operator[SEP] identifier[layout] operator[SEP] identifier[createSequentialGroup] operator[SEP] operator[SEP] operator[SEP] identifier[addContainerGap] operator[SEP] operator[SEP] operator[SEP] identifier[addGroup] operator[SEP] identifier[layout] operator[SEP] identifier[createParallelGroup] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[Alignment] operator[SEP] identifier[LEADING] operator[SEP] operator[SEP] identifier[addComponent] operator[SEP] identifier[pbImport] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[DEFAULT_SIZE] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[DEFAULT_SIZE] , identifier[Short] operator[SEP] identifier[MAX_VALUE] operator[SEP] operator[SEP] identifier[addGroup] operator[SEP] identifier[layout] operator[SEP] identifier[createSequentialGroup] operator[SEP] operator[SEP] operator[SEP] identifier[addComponent] operator[SEP] identifier[jLabel1] operator[SEP] operator[SEP] identifier[addPreferredGap] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[LayoutStyle] operator[SEP] identifier[ComponentPlacement] operator[SEP] identifier[RELATED] operator[SEP] operator[SEP] identifier[addComponent] operator[SEP] identifier[txtInputDir] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[DEFAULT_SIZE] , Other[462] , identifier[Short] operator[SEP] identifier[MAX_VALUE] operator[SEP] operator[SEP] identifier[addPreferredGap] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[LayoutStyle] operator[SEP] identifier[ComponentPlacement] operator[SEP] identifier[RELATED] operator[SEP] operator[SEP] identifier[addComponent] operator[SEP] identifier[btSearchInputDir] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[PREFERRED_SIZE] , Other[36] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[PREFERRED_SIZE] operator[SEP] operator[SEP] operator[SEP] identifier[addGroup] operator[SEP] identifier[layout] operator[SEP] identifier[createSequentialGroup] operator[SEP] operator[SEP] operator[SEP] identifier[addComponent] operator[SEP] identifier[jLabel2] operator[SEP] operator[SEP] identifier[addPreferredGap] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[LayoutStyle] operator[SEP] identifier[ComponentPlacement] operator[SEP] identifier[RELATED] operator[SEP] operator[SEP] identifier[addComponent] operator[SEP] identifier[lblStatus] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[DEFAULT_SIZE] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[DEFAULT_SIZE] , identifier[Short] operator[SEP] identifier[MAX_VALUE] operator[SEP] operator[SEP] operator[SEP] identifier[addGroup] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[Alignment] operator[SEP] identifier[TRAILING] , identifier[layout] operator[SEP] identifier[createSequentialGroup] operator[SEP] operator[SEP] operator[SEP] identifier[addComponent] operator[SEP] identifier[jCheckBox1] operator[SEP] operator[SEP] identifier[addPreferredGap] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[LayoutStyle] operator[SEP] identifier[ComponentPlacement] operator[SEP] identifier[RELATED] operator[SEP] operator[SEP] identifier[addComponent] operator[SEP] identifier[lblCurrentCorpus] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[DEFAULT_SIZE] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[DEFAULT_SIZE] , identifier[Short] operator[SEP] identifier[MAX_VALUE] operator[SEP] operator[SEP] identifier[addPreferredGap] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[LayoutStyle] operator[SEP] identifier[ComponentPlacement] operator[SEP] identifier[RELATED] operator[SEP] operator[SEP] identifier[addComponent] operator[SEP] identifier[pbCorpus] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[PREFERRED_SIZE] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[DEFAULT_SIZE] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[PREFERRED_SIZE] operator[SEP] operator[SEP] operator[SEP] identifier[addGroup] operator[SEP] identifier[layout] operator[SEP] identifier[createSequentialGroup] operator[SEP] operator[SEP] operator[SEP] identifier[addComponent] operator[SEP] identifier[btCancel] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[PREFERRED_SIZE] , Other[105] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[PREFERRED_SIZE] operator[SEP] operator[SEP] identifier[addPreferredGap] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[LayoutStyle] operator[SEP] identifier[ComponentPlacement] operator[SEP] identifier[RELATED] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[DEFAULT_SIZE] , identifier[Short] operator[SEP] identifier[MAX_VALUE] operator[SEP] operator[SEP] identifier[addComponent] operator[SEP] identifier[btOk] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[PREFERRED_SIZE] , Other[105] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[PREFERRED_SIZE] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addContainerGap] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[layout] operator[SEP] identifier[setVerticalGroup] operator[SEP] identifier[layout] operator[SEP] identifier[createParallelGroup] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[Alignment] operator[SEP] identifier[LEADING] operator[SEP] operator[SEP] identifier[addGroup] operator[SEP] identifier[layout] operator[SEP] identifier[createSequentialGroup] operator[SEP] operator[SEP] operator[SEP] identifier[addContainerGap] operator[SEP] operator[SEP] operator[SEP] identifier[addGroup] operator[SEP] identifier[layout] operator[SEP] identifier[createParallelGroup] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[Alignment] operator[SEP] identifier[BASELINE] operator[SEP] operator[SEP] identifier[addComponent] operator[SEP] identifier[jLabel1] operator[SEP] operator[SEP] identifier[addComponent] operator[SEP] identifier[txtInputDir] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[PREFERRED_SIZE] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[DEFAULT_SIZE] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[PREFERRED_SIZE] operator[SEP] operator[SEP] identifier[addComponent] operator[SEP] identifier[btSearchInputDir] operator[SEP] operator[SEP] operator[SEP] identifier[addPreferredGap] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[LayoutStyle] operator[SEP] identifier[ComponentPlacement] operator[SEP] identifier[RELATED] operator[SEP] operator[SEP] identifier[addGroup] operator[SEP] identifier[layout] operator[SEP] identifier[createParallelGroup] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[Alignment] operator[SEP] identifier[LEADING] , literal[boolean] operator[SEP] operator[SEP] identifier[addComponent] operator[SEP] identifier[pbCorpus] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[DEFAULT_SIZE] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[DEFAULT_SIZE] , identifier[Short] operator[SEP] identifier[MAX_VALUE] operator[SEP] operator[SEP] identifier[addGroup] operator[SEP] identifier[layout] operator[SEP] identifier[createParallelGroup] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[Alignment] operator[SEP] identifier[BASELINE] operator[SEP] operator[SEP] identifier[addComponent] operator[SEP] identifier[lblCurrentCorpus] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[DEFAULT_SIZE] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[DEFAULT_SIZE] , identifier[Short] operator[SEP] identifier[MAX_VALUE] operator[SEP] operator[SEP] identifier[addComponent] operator[SEP] identifier[jCheckBox1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addGap] operator[SEP] Other[6] , Other[6] , Other[6] operator[SEP] operator[SEP] identifier[addComponent] operator[SEP] identifier[pbImport] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[PREFERRED_SIZE] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[DEFAULT_SIZE] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[PREFERRED_SIZE] operator[SEP] operator[SEP] identifier[addPreferredGap] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[LayoutStyle] operator[SEP] identifier[ComponentPlacement] operator[SEP] identifier[UNRELATED] operator[SEP] operator[SEP] identifier[addGroup] operator[SEP] identifier[layout] operator[SEP] identifier[createParallelGroup] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[Alignment] operator[SEP] identifier[BASELINE] operator[SEP] operator[SEP] identifier[addComponent] operator[SEP] identifier[jLabel2] operator[SEP] operator[SEP] identifier[addComponent] operator[SEP] identifier[lblStatus] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[PREFERRED_SIZE] , Other[15] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[PREFERRED_SIZE] operator[SEP] operator[SEP] operator[SEP] identifier[addPreferredGap] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[LayoutStyle] operator[SEP] identifier[ComponentPlacement] operator[SEP] identifier[RELATED] , identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[DEFAULT_SIZE] , identifier[Short] operator[SEP] identifier[MAX_VALUE] operator[SEP] operator[SEP] identifier[addGroup] operator[SEP] identifier[layout] operator[SEP] identifier[createParallelGroup] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[GroupLayout] operator[SEP] identifier[Alignment] operator[SEP] identifier[BASELINE] operator[SEP] operator[SEP] identifier[addComponent] operator[SEP] identifier[btCancel] operator[SEP] operator[SEP] identifier[addComponent] operator[SEP] identifier[btOk] operator[SEP] operator[SEP] operator[SEP] identifier[addContainerGap] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[pack] operator[SEP] operator[SEP] operator[SEP] }
private String getObjectUrl( CPath path ) { String containerUrl = getCurrentContainerUrl(); return containerUrl + path.getUrlEncoded(); }
class class_name[name] begin[{] method[getObjectUrl, return_type[type[String]], modifier[private], parameter[path]] begin[{] local_variable[type[String], containerUrl] return[binary_operation[member[.containerUrl], +, call[path.getUrlEncoded, parameter[]]]] end[}] END[}]
Keyword[private] identifier[String] identifier[getObjectUrl] operator[SEP] identifier[CPath] identifier[path] operator[SEP] { identifier[String] identifier[containerUrl] operator[=] identifier[getCurrentContainerUrl] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[containerUrl] operator[+] identifier[path] operator[SEP] identifier[getUrlEncoded] operator[SEP] operator[SEP] operator[SEP] }
public final ListFindingTypeStatsResponse listFindingTypeStats(String parent) { ListFindingTypeStatsRequest request = ListFindingTypeStatsRequest.newBuilder().setParent(parent).build(); return listFindingTypeStats(request); }
class class_name[name] begin[{] method[listFindingTypeStats, return_type[type[ListFindingTypeStatsResponse]], modifier[final public], parameter[parent]] begin[{] local_variable[type[ListFindingTypeStatsRequest], request] return[call[.listFindingTypeStats, parameter[member[.request]]]] end[}] END[}]
Keyword[public] Keyword[final] identifier[ListFindingTypeStatsResponse] identifier[listFindingTypeStats] operator[SEP] identifier[String] identifier[parent] operator[SEP] { identifier[ListFindingTypeStatsRequest] identifier[request] operator[=] identifier[ListFindingTypeStatsRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setParent] operator[SEP] identifier[parent] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[listFindingTypeStats] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
@BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<Empty, OperationMetadata> deleteDatasetAsync(DatasetName name) { DeleteDatasetRequest request = DeleteDatasetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return deleteDatasetAsync(request); }
class class_name[name] begin[{] method[deleteDatasetAsync, return_type[type[OperationFuture]], modifier[final public], parameter[name]] begin[{] local_variable[type[DeleteDatasetRequest], request] return[call[.deleteDatasetAsync, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[BetaApi] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[final] identifier[OperationFuture] operator[<] identifier[Empty] , identifier[OperationMetadata] operator[>] identifier[deleteDatasetAsync] operator[SEP] identifier[DatasetName] identifier[name] operator[SEP] { identifier[DeleteDatasetRequest] identifier[request] operator[=] identifier[DeleteDatasetRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setName] operator[SEP] identifier[name] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[name] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[deleteDatasetAsync] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
@Override public synchronized void addOrUpdateMessages(ApptentiveMessage... apptentiveMessages) { fetchEntries(); for (ApptentiveMessage apptentiveMessage : apptentiveMessages) { MessageEntry existing = findMessageEntry(apptentiveMessage); if (existing != null) { // Update existing.id = apptentiveMessage.getId(); existing.state = apptentiveMessage.getState().name(); if (apptentiveMessage.isRead()) { // A message can't be unread after being read. existing.isRead = true; } existing.json = apptentiveMessage.getJsonObject().toString(); } else { // Insert MessageEntry entry = new MessageEntry(); entry.id = apptentiveMessage.getId(); entry.clientCreatedAt = apptentiveMessage.getClientCreatedAt(); entry.nonce = apptentiveMessage.getNonce(); entry.state = apptentiveMessage.getState().name(); entry.isRead = apptentiveMessage.isRead(); entry.json = apptentiveMessage.getJsonObject().toString(); messageEntries.add(entry); } } writeToFile(); }
class class_name[name] begin[{] method[addOrUpdateMessages, return_type[void], modifier[synchronized public], parameter[apptentiveMessages]] begin[{] call[.fetchEntries, parameter[]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=apptentiveMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=findMessageEntry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=existing)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MessageEntry, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=existing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MessageEntry, sub_type=None)), name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MessageEntry, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=apptentiveMessage, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=clientCreatedAt, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getClientCreatedAt, postfix_operators=[], prefix_operators=[], qualifier=apptentiveMessage, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=nonce, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getNonce, postfix_operators=[], prefix_operators=[], qualifier=apptentiveMessage, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getState, postfix_operators=[], prefix_operators=[], qualifier=apptentiveMessage, selectors=[MethodInvocation(arguments=[], member=name, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=isRead, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[]), type==, value=MethodInvocation(arguments=[], member=isRead, postfix_operators=[], prefix_operators=[], qualifier=apptentiveMessage, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=json, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getJsonObject, postfix_operators=[], prefix_operators=[], qualifier=apptentiveMessage, 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=MethodInvocation(arguments=[MemberReference(member=entry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=messageEntries, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=existing, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=apptentiveMessage, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=existing, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getState, postfix_operators=[], prefix_operators=[], qualifier=apptentiveMessage, selectors=[MethodInvocation(arguments=[], member=name, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isRead, postfix_operators=[], prefix_operators=[], qualifier=apptentiveMessage, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=isRead, postfix_operators=[], prefix_operators=[], qualifier=existing, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=json, postfix_operators=[], prefix_operators=[], qualifier=existing, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getJsonObject, postfix_operators=[], prefix_operators=[], qualifier=apptentiveMessage, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=apptentiveMessages, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=apptentiveMessage)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ApptentiveMessage, sub_type=None))), label=None) call[.writeToFile, parameter[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[synchronized] Keyword[void] identifier[addOrUpdateMessages] operator[SEP] identifier[ApptentiveMessage] operator[...] identifier[apptentiveMessages] operator[SEP] { identifier[fetchEntries] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ApptentiveMessage] identifier[apptentiveMessage] operator[:] identifier[apptentiveMessages] operator[SEP] { identifier[MessageEntry] identifier[existing] operator[=] identifier[findMessageEntry] operator[SEP] identifier[apptentiveMessage] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[existing] operator[!=] Other[null] operator[SEP] { identifier[existing] operator[SEP] identifier[id] operator[=] identifier[apptentiveMessage] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] identifier[existing] operator[SEP] identifier[state] operator[=] identifier[apptentiveMessage] operator[SEP] identifier[getState] operator[SEP] operator[SEP] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[apptentiveMessage] operator[SEP] identifier[isRead] operator[SEP] operator[SEP] operator[SEP] { identifier[existing] operator[SEP] identifier[isRead] operator[=] literal[boolean] operator[SEP] } identifier[existing] operator[SEP] identifier[json] operator[=] identifier[apptentiveMessage] operator[SEP] identifier[getJsonObject] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[MessageEntry] identifier[entry] operator[=] Keyword[new] identifier[MessageEntry] operator[SEP] operator[SEP] operator[SEP] identifier[entry] operator[SEP] identifier[id] operator[=] identifier[apptentiveMessage] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] identifier[entry] operator[SEP] identifier[clientCreatedAt] operator[=] identifier[apptentiveMessage] operator[SEP] identifier[getClientCreatedAt] operator[SEP] operator[SEP] operator[SEP] identifier[entry] operator[SEP] identifier[nonce] operator[=] identifier[apptentiveMessage] operator[SEP] identifier[getNonce] operator[SEP] operator[SEP] operator[SEP] identifier[entry] operator[SEP] identifier[state] operator[=] identifier[apptentiveMessage] operator[SEP] identifier[getState] operator[SEP] operator[SEP] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] identifier[entry] operator[SEP] identifier[isRead] operator[=] identifier[apptentiveMessage] operator[SEP] identifier[isRead] operator[SEP] operator[SEP] operator[SEP] identifier[entry] operator[SEP] identifier[json] operator[=] identifier[apptentiveMessage] operator[SEP] identifier[getJsonObject] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[messageEntries] operator[SEP] identifier[add] operator[SEP] identifier[entry] operator[SEP] operator[SEP] } } identifier[writeToFile] operator[SEP] operator[SEP] operator[SEP] }
@Override public void visitCode(Code obj) { stack.resetForMethodEntry(this); toStringRegisters.clear(); super.visitCode(obj); }
class class_name[name] begin[{] method[visitCode, return_type[void], modifier[public], parameter[obj]] begin[{] call[stack.resetForMethodEntry, parameter[THIS[]]] call[toStringRegisters.clear, parameter[]] SuperMethodInvocation(arguments=[MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=visitCode, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[visitCode] operator[SEP] identifier[Code] identifier[obj] operator[SEP] { identifier[stack] operator[SEP] identifier[resetForMethodEntry] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[toStringRegisters] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] Keyword[super] operator[SEP] identifier[visitCode] operator[SEP] identifier[obj] operator[SEP] operator[SEP] }
@SuppressWarnings("deprecation") MenuItem findItemWithShortcutForKey(int keyCode, KeyEvent event) { // Get all items that can be associated directly or indirectly with the keyCode ArrayList<MenuItem> items = mTempShortcutItemList; items.clear(); findItemsWithShortcutForKey(items, keyCode, event); if (items.isEmpty()) { return null; } final int metaState = event.getMetaState(); final KeyCharacterMap.KeyData possibleChars = new KeyCharacterMap.KeyData(); // Get the chars associated with the keyCode (i.e using any chording combo) event.getKeyData(possibleChars); // If we have only one element, we can safely returns it final int size = items.size(); if (size == 1) { return items.get(0); } final boolean qwerty = isQwertyMode(); // If we found more than one item associated with the key, // we have to return the exact match for (int i = 0; i < size; i++) { final MenuItem item = items.get(i); final char shortcutChar = qwerty ? item.getAlphabeticShortcut() : item.getNumericShortcut(); if ((shortcutChar == possibleChars.meta[0] && (metaState & KeyEvent.META_ALT_ON) == 0) || (shortcutChar == possibleChars.meta[2] && (metaState & KeyEvent.META_ALT_ON) != 0) || (qwerty && shortcutChar == '\b' && keyCode == KeyEvent.KEYCODE_DEL)) { return item; } } return null; }
class class_name[name] begin[{] method[findItemWithShortcutForKey, return_type[type[MenuItem]], modifier[default], parameter[keyCode, event]] begin[{] local_variable[type[ArrayList], items] call[items.clear, parameter[]] call[.findItemsWithShortcutForKey, parameter[member[.items], member[.keyCode], member[.event]]] if[call[items.isEmpty, parameter[]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[int], metaState] local_variable[type[KeyCharacterMap], possibleChars] call[event.getKeyData, parameter[member[.possibleChars]]] local_variable[type[int], size] if[binary_operation[member[.size], ==, literal[1]]] begin[{] return[call[items.get, parameter[literal[0]]]] else begin[{] None end[}] local_variable[type[boolean], qwerty] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=items, selectors=[], type_arguments=None), name=item)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=MenuItem, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=MemberReference(member=qwerty, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=MethodInvocation(arguments=[], member=getNumericShortcut, postfix_operators=[], prefix_operators=[], qualifier=item, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[], member=getAlphabeticShortcut, postfix_operators=[], prefix_operators=[], qualifier=item, selectors=[], type_arguments=None)), name=shortcutChar)], modifiers={'final'}, type=BasicType(dimensions=[], name=char)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=shortcutChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=meta, postfix_operators=[], prefix_operators=[], qualifier=possibleChars, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operator===), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=metaState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=META_ALT_ON, postfix_operators=[], prefix_operators=[], qualifier=KeyEvent, selectors=[]), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), operator=&&), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=shortcutChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=meta, postfix_operators=[], prefix_operators=[], qualifier=possibleChars, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2))]), operator===), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=metaState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=META_ALT_ON, postfix_operators=[], prefix_operators=[], qualifier=KeyEvent, selectors=[]), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), operator=&&), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=qwerty, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=shortcutChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\b'), operator===), operator=&&), operandr=BinaryOperation(operandl=MemberReference(member=keyCode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=KEYCODE_DEL, postfix_operators=[], prefix_operators=[], qualifier=KeyEvent, selectors=[]), operator===), operator=&&), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=item, 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=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=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[literal[null]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[MenuItem] identifier[findItemWithShortcutForKey] operator[SEP] Keyword[int] identifier[keyCode] , identifier[KeyEvent] identifier[event] operator[SEP] { identifier[ArrayList] operator[<] identifier[MenuItem] operator[>] identifier[items] operator[=] identifier[mTempShortcutItemList] operator[SEP] identifier[items] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[findItemsWithShortcutForKey] operator[SEP] identifier[items] , identifier[keyCode] , identifier[event] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[items] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[final] Keyword[int] identifier[metaState] operator[=] identifier[event] operator[SEP] identifier[getMetaState] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[KeyCharacterMap] operator[SEP] identifier[KeyData] identifier[possibleChars] operator[=] Keyword[new] identifier[KeyCharacterMap] operator[SEP] identifier[KeyData] operator[SEP] operator[SEP] operator[SEP] identifier[event] operator[SEP] identifier[getKeyData] operator[SEP] identifier[possibleChars] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[size] operator[=] identifier[items] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[size] operator[==] Other[1] operator[SEP] { Keyword[return] identifier[items] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] } Keyword[final] Keyword[boolean] identifier[qwerty] operator[=] identifier[isQwertyMode] 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[++] operator[SEP] { Keyword[final] identifier[MenuItem] identifier[item] operator[=] identifier[items] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[final] Keyword[char] identifier[shortcutChar] operator[=] identifier[qwerty] operator[?] identifier[item] operator[SEP] identifier[getAlphabeticShortcut] operator[SEP] operator[SEP] operator[:] identifier[item] operator[SEP] identifier[getNumericShortcut] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[shortcutChar] operator[==] identifier[possibleChars] operator[SEP] identifier[meta] operator[SEP] Other[0] operator[SEP] operator[&&] operator[SEP] identifier[metaState] operator[&] identifier[KeyEvent] operator[SEP] identifier[META_ALT_ON] operator[SEP] operator[==] Other[0] operator[SEP] operator[||] operator[SEP] identifier[shortcutChar] operator[==] identifier[possibleChars] operator[SEP] identifier[meta] operator[SEP] Other[2] operator[SEP] operator[&&] operator[SEP] identifier[metaState] operator[&] identifier[KeyEvent] operator[SEP] identifier[META_ALT_ON] operator[SEP] operator[!=] Other[0] operator[SEP] operator[||] operator[SEP] identifier[qwerty] operator[&&] identifier[shortcutChar] operator[==] literal[String] operator[&&] identifier[keyCode] operator[==] identifier[KeyEvent] operator[SEP] identifier[KEYCODE_DEL] operator[SEP] operator[SEP] { Keyword[return] identifier[item] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
public static Expression constant(final char value) { return new Expression(Type.CHAR_TYPE, Feature.CHEAP) { @Override protected void doGen(CodeBuilder mv) { mv.pushInt(value); } }; }
class class_name[name] begin[{] method[constant, return_type[type[Expression]], modifier[public static], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=CHAR_TYPE, postfix_operators=[], prefix_operators=[], qualifier=Type, selectors=[]), MemberReference(member=CHEAP, postfix_operators=[], prefix_operators=[], qualifier=Feature, selectors=[])], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushInt, postfix_operators=[], prefix_operators=[], qualifier=mv, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'protected'}, name=doGen, parameters=[FormalParameter(annotations=[], modifiers=set(), name=mv, type=ReferenceType(arguments=None, dimensions=[], name=CodeBuilder, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Expression, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Expression] identifier[constant] operator[SEP] Keyword[final] Keyword[char] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[Expression] operator[SEP] identifier[Type] operator[SEP] identifier[CHAR_TYPE] , identifier[Feature] operator[SEP] identifier[CHEAP] operator[SEP] { annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[doGen] operator[SEP] identifier[CodeBuilder] identifier[mv] operator[SEP] { identifier[mv] operator[SEP] identifier[pushInt] operator[SEP] identifier[value] operator[SEP] operator[SEP] } } operator[SEP] }
public void fillParams(CmsGallerySearchBean search) { m_localeSelection.setFormValue(search.getLocale(), false); m_searchInput.setFormValueAsString(search.getQuery()); m_includeExpiredCheckBox.setChecked(search.isIncludeExpired()); if (search.getDateCreatedStart() > 9) { m_dateCreatedStartDateBox.setValue(new Date(search.getDateCreatedStart())); } if (search.getDateCreatedEnd() > 0) { m_dateCreatedEndDateBox.setValue(new Date(search.getDateCreatedEnd())); } if (search.getDateModifiedStart() > 0) { m_dateModifiedStartDateBox.setValue(new Date(search.getDateModifiedStart())); } if (search.getDateModifiedEnd() > 0) { m_dateModifiedEndDateBox.setValue(new Date(search.getDateModifiedEnd())); } if (search.getScope() != null) { m_scopeSelection.setFormValue(search.getScope().name()); } }
class class_name[name] begin[{] method[fillParams, return_type[void], modifier[public], parameter[search]] begin[{] call[m_localeSelection.setFormValue, parameter[call[search.getLocale, parameter[]], literal[false]]] call[m_searchInput.setFormValueAsString, parameter[call[search.getQuery, parameter[]]]] call[m_includeExpiredCheckBox.setChecked, parameter[call[search.isIncludeExpired, parameter[]]]] if[binary_operation[call[search.getDateCreatedStart, parameter[]], >, literal[9]]] begin[{] call[m_dateCreatedStartDateBox.setValue, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getDateCreatedStart, postfix_operators=[], prefix_operators=[], qualifier=search, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Date, sub_type=None))]] else begin[{] None end[}] if[binary_operation[call[search.getDateCreatedEnd, parameter[]], >, literal[0]]] begin[{] call[m_dateCreatedEndDateBox.setValue, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getDateCreatedEnd, postfix_operators=[], prefix_operators=[], qualifier=search, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Date, sub_type=None))]] else begin[{] None end[}] if[binary_operation[call[search.getDateModifiedStart, parameter[]], >, literal[0]]] begin[{] call[m_dateModifiedStartDateBox.setValue, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getDateModifiedStart, postfix_operators=[], prefix_operators=[], qualifier=search, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Date, sub_type=None))]] else begin[{] None end[}] if[binary_operation[call[search.getDateModifiedEnd, parameter[]], >, literal[0]]] begin[{] call[m_dateModifiedEndDateBox.setValue, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getDateModifiedEnd, postfix_operators=[], prefix_operators=[], qualifier=search, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Date, sub_type=None))]] else begin[{] None end[}] if[binary_operation[call[search.getScope, parameter[]], !=, literal[null]]] begin[{] call[m_scopeSelection.setFormValue, parameter[call[search.getScope, parameter[]]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[fillParams] operator[SEP] identifier[CmsGallerySearchBean] identifier[search] operator[SEP] { identifier[m_localeSelection] operator[SEP] identifier[setFormValue] operator[SEP] identifier[search] operator[SEP] identifier[getLocale] operator[SEP] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] identifier[m_searchInput] operator[SEP] identifier[setFormValueAsString] operator[SEP] identifier[search] operator[SEP] identifier[getQuery] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[m_includeExpiredCheckBox] operator[SEP] identifier[setChecked] operator[SEP] identifier[search] operator[SEP] identifier[isIncludeExpired] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[search] operator[SEP] identifier[getDateCreatedStart] operator[SEP] operator[SEP] operator[>] Other[9] operator[SEP] { identifier[m_dateCreatedStartDateBox] operator[SEP] identifier[setValue] operator[SEP] Keyword[new] identifier[Date] operator[SEP] identifier[search] operator[SEP] identifier[getDateCreatedStart] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[search] operator[SEP] identifier[getDateCreatedEnd] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[m_dateCreatedEndDateBox] operator[SEP] identifier[setValue] operator[SEP] Keyword[new] identifier[Date] operator[SEP] identifier[search] operator[SEP] identifier[getDateCreatedEnd] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[search] operator[SEP] identifier[getDateModifiedStart] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[m_dateModifiedStartDateBox] operator[SEP] identifier[setValue] operator[SEP] Keyword[new] identifier[Date] operator[SEP] identifier[search] operator[SEP] identifier[getDateModifiedStart] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[search] operator[SEP] identifier[getDateModifiedEnd] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[m_dateModifiedEndDateBox] operator[SEP] identifier[setValue] operator[SEP] Keyword[new] identifier[Date] operator[SEP] identifier[search] operator[SEP] identifier[getDateModifiedEnd] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[search] operator[SEP] identifier[getScope] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[m_scopeSelection] operator[SEP] identifier[setFormValue] operator[SEP] identifier[search] operator[SEP] identifier[getScope] operator[SEP] operator[SEP] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public static sslpolicy_sslvserver_binding[] get(nitro_service service, String name) throws Exception{ sslpolicy_sslvserver_binding obj = new sslpolicy_sslvserver_binding(); obj.set_name(name); sslpolicy_sslvserver_binding response[] = (sslpolicy_sslvserver_binding[]) obj.get_resources(service); return response; }
class class_name[name] begin[{] method[get, return_type[type[sslpolicy_sslvserver_binding]], modifier[public static], parameter[service, name]] begin[{] local_variable[type[sslpolicy_sslvserver_binding], obj] call[obj.set_name, parameter[member[.name]]] local_variable[type[sslpolicy_sslvserver_binding], response] return[member[.response]] end[}] END[}]
Keyword[public] Keyword[static] identifier[sslpolicy_sslvserver_binding] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[Exception] { identifier[sslpolicy_sslvserver_binding] identifier[obj] operator[=] Keyword[new] identifier[sslpolicy_sslvserver_binding] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[set_name] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[sslpolicy_sslvserver_binding] identifier[response] operator[SEP] operator[SEP] operator[=] operator[SEP] identifier[sslpolicy_sslvserver_binding] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[get_resources] operator[SEP] identifier[service] operator[SEP] operator[SEP] Keyword[return] identifier[response] operator[SEP] }
public AwsSecurityFindingFilters withSourceUrl(StringFilter... sourceUrl) { if (this.sourceUrl == null) { setSourceUrl(new java.util.ArrayList<StringFilter>(sourceUrl.length)); } for (StringFilter ele : sourceUrl) { this.sourceUrl.add(ele); } return this; }
class class_name[name] begin[{] method[withSourceUrl, return_type[type[AwsSecurityFindingFilters]], modifier[public], parameter[sourceUrl]] begin[{] if[binary_operation[THIS[member[None.sourceUrl]], ==, literal[null]]] begin[{] call[.setSourceUrl, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=sourceUrl, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=StringFilter, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=sourceUrl, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=sourceUrl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ele)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringFilter, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[AwsSecurityFindingFilters] identifier[withSourceUrl] operator[SEP] identifier[StringFilter] operator[...] identifier[sourceUrl] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[sourceUrl] operator[==] Other[null] operator[SEP] { identifier[setSourceUrl] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[StringFilter] operator[>] operator[SEP] identifier[sourceUrl] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[StringFilter] identifier[ele] operator[:] identifier[sourceUrl] operator[SEP] { Keyword[this] operator[SEP] identifier[sourceUrl] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
protected static String getSQLSelectString(PoiCategoryFilter filter, int count, int version) { if (filter != null) { return PoiCategoryRangeQueryGenerator.getSQLSelectString(filter, count, version); } StringBuilder sb = new StringBuilder(); sb.append(DbConstants.FIND_IN_BOX_CLAUSE_SELECT); if (count > 0) { sb.append(DbConstants.JOIN_DATA_CLAUSE); } sb.append(DbConstants.FIND_IN_BOX_CLAUSE_WHERE); for (int i = 0; i < count; i++) { sb.append(DbConstants.FIND_BY_DATA_CLAUSE); } return sb.append(" LIMIT ?;").toString(); }
class class_name[name] begin[{] method[getSQLSelectString, return_type[type[String]], modifier[static protected], parameter[filter, count, version]] begin[{] if[binary_operation[member[.filter], !=, literal[null]]] begin[{] return[call[PoiCategoryRangeQueryGenerator.getSQLSelectString, parameter[member[.filter], member[.count], member[.version]]]] else begin[{] None end[}] local_variable[type[StringBuilder], sb] call[sb.append, parameter[member[DbConstants.FIND_IN_BOX_CLAUSE_SELECT]]] if[binary_operation[member[.count], >, literal[0]]] begin[{] call[sb.append, parameter[member[DbConstants.JOIN_DATA_CLAUSE]]] else begin[{] None end[}] call[sb.append, parameter[member[DbConstants.FIND_IN_BOX_CLAUSE_WHERE]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FIND_BY_DATA_CLAUSE, postfix_operators=[], prefix_operators=[], qualifier=DbConstants, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[call[sb.append, parameter[literal[" LIMIT ?;"]]]] end[}] END[}]
Keyword[protected] Keyword[static] identifier[String] identifier[getSQLSelectString] operator[SEP] identifier[PoiCategoryFilter] identifier[filter] , Keyword[int] identifier[count] , Keyword[int] identifier[version] operator[SEP] { Keyword[if] operator[SEP] identifier[filter] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[PoiCategoryRangeQueryGenerator] operator[SEP] identifier[getSQLSelectString] operator[SEP] identifier[filter] , identifier[count] , identifier[version] operator[SEP] operator[SEP] } identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[DbConstants] operator[SEP] identifier[FIND_IN_BOX_CLAUSE_SELECT] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[count] operator[>] Other[0] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[DbConstants] operator[SEP] identifier[JOIN_DATA_CLAUSE] operator[SEP] operator[SEP] } identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[DbConstants] operator[SEP] identifier[FIND_IN_BOX_CLAUSE_WHERE] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[count] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[DbConstants] operator[SEP] identifier[FIND_BY_DATA_CLAUSE] operator[SEP] operator[SEP] } Keyword[return] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public RequestedAttributes buildObject(String namespaceURI, String localName, String namespacePrefix) { return new RequestedAttributesImpl(namespaceURI, localName, namespacePrefix); }
class class_name[name] begin[{] method[buildObject, return_type[type[RequestedAttributes]], modifier[public], parameter[namespaceURI, localName, namespacePrefix]] begin[{] return[ClassCreator(arguments=[MemberReference(member=namespaceURI, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=localName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=namespacePrefix, 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=RequestedAttributesImpl, sub_type=None))] end[}] END[}]
Keyword[public] identifier[RequestedAttributes] identifier[buildObject] operator[SEP] identifier[String] identifier[namespaceURI] , identifier[String] identifier[localName] , identifier[String] identifier[namespacePrefix] operator[SEP] { Keyword[return] Keyword[new] identifier[RequestedAttributesImpl] operator[SEP] identifier[namespaceURI] , identifier[localName] , identifier[namespacePrefix] operator[SEP] operator[SEP] }
private boolean transfer(long total, GlobusInputStream in, GlobusOutputStream out) throws IOException { byte [] buffer = new byte[bufferSize]; int bytes = 0; long totalBytes = total; long transferedBytes = 0; if (total == -1) { while( (bytes = in.read(buffer)) != -1) { out.write(buffer, 0, bytes); out.flush(); if (listeners != null) { transferedBytes += bytes; fireUrlTransferProgressEvent(totalBytes, transferedBytes); } if (isCanceled()) return false; } } else { while ( total != 0 ) { bytes = bufferSize; if (total < bufferSize) bytes = (int)total; bytes = in.read(buffer); out.write(buffer, 0, bytes); out.flush(); total -= bytes; if (listeners != null) { transferedBytes += bytes; fireUrlTransferProgressEvent(totalBytes, transferedBytes); } if (isCanceled()) return false; } } return true; }
class class_name[name] begin[{] method[transfer, return_type[type[boolean]], modifier[private], parameter[total, in, out]] begin[{] local_variable[type[byte], buffer] local_variable[type[int], bytes] local_variable[type[long], totalBytes] local_variable[type[long], transferedBytes] if[binary_operation[member[.total], ==, literal[1]]] begin[{] while[binary_operation[assign[member[.bytes], call[in.read, parameter[member[.buffer]]]], !=, literal[1]]] begin[{] call[out.write, parameter[member[.buffer], literal[0], member[.bytes]]] call[out.flush, parameter[]] if[binary_operation[member[.listeners], !=, literal[null]]] begin[{] assign[member[.transferedBytes], member[.bytes]] call[.fireUrlTransferProgressEvent, parameter[member[.totalBytes], member[.transferedBytes]]] else begin[{] None end[}] if[call[.isCanceled, parameter[]]] begin[{] return[literal[false]] else begin[{] None end[}] end[}] else begin[{] while[binary_operation[member[.total], !=, literal[0]]] begin[{] assign[member[.bytes], member[.bufferSize]] if[binary_operation[member[.total], <, member[.bufferSize]]] begin[{] assign[member[.bytes], Cast(expression=MemberReference(member=total, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int))] else begin[{] None end[}] assign[member[.bytes], call[in.read, parameter[member[.buffer]]]] call[out.write, parameter[member[.buffer], literal[0], member[.bytes]]] call[out.flush, parameter[]] assign[member[.total], member[.bytes]] if[binary_operation[member[.listeners], !=, literal[null]]] begin[{] assign[member[.transferedBytes], member[.bytes]] call[.fireUrlTransferProgressEvent, parameter[member[.totalBytes], member[.transferedBytes]]] else begin[{] None end[}] if[call[.isCanceled, parameter[]]] begin[{] return[literal[false]] else begin[{] None end[}] end[}] end[}] return[literal[true]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[transfer] operator[SEP] Keyword[long] identifier[total] , identifier[GlobusInputStream] identifier[in] , identifier[GlobusOutputStream] identifier[out] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[byte] operator[SEP] operator[SEP] identifier[buffer] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[bufferSize] operator[SEP] operator[SEP] Keyword[int] identifier[bytes] operator[=] Other[0] operator[SEP] Keyword[long] identifier[totalBytes] operator[=] identifier[total] operator[SEP] Keyword[long] identifier[transferedBytes] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[total] operator[==] operator[-] Other[1] operator[SEP] { Keyword[while] operator[SEP] operator[SEP] identifier[bytes] operator[=] identifier[in] operator[SEP] identifier[read] operator[SEP] identifier[buffer] operator[SEP] operator[SEP] operator[!=] operator[-] Other[1] operator[SEP] { identifier[out] operator[SEP] identifier[write] operator[SEP] identifier[buffer] , Other[0] , identifier[bytes] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[listeners] operator[!=] Other[null] operator[SEP] { identifier[transferedBytes] operator[+=] identifier[bytes] operator[SEP] identifier[fireUrlTransferProgressEvent] operator[SEP] identifier[totalBytes] , identifier[transferedBytes] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[isCanceled] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } } Keyword[else] { Keyword[while] operator[SEP] identifier[total] operator[!=] Other[0] operator[SEP] { identifier[bytes] operator[=] identifier[bufferSize] operator[SEP] Keyword[if] operator[SEP] identifier[total] operator[<] identifier[bufferSize] operator[SEP] identifier[bytes] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[total] operator[SEP] identifier[bytes] operator[=] identifier[in] operator[SEP] identifier[read] operator[SEP] identifier[buffer] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[write] operator[SEP] identifier[buffer] , Other[0] , identifier[bytes] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] identifier[total] operator[-=] identifier[bytes] operator[SEP] Keyword[if] operator[SEP] identifier[listeners] operator[!=] Other[null] operator[SEP] { identifier[transferedBytes] operator[+=] identifier[bytes] operator[SEP] identifier[fireUrlTransferProgressEvent] operator[SEP] identifier[totalBytes] , identifier[transferedBytes] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[isCanceled] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
public void setFile(String file) throws ApplicationException { if (StringUtil.isEmpty(file)) return; if (file.indexOf('/') != -1 || file.indexOf('\\') != -1) throw new ApplicationException("value [" + file + "] from attribute [file] at tag [log] can only contain a filename, file separators like [\\/] are not allowed"); if (!file.endsWith(".log")) file += ".log"; this.file = file; }
class class_name[name] begin[{] method[setFile, return_type[void], modifier[public], parameter[file]] begin[{] if[call[StringUtil.isEmpty, parameter[member[.file]]]] begin[{] return[None] else begin[{] None end[}] if[binary_operation[binary_operation[call[file.indexOf, parameter[literal['/']]], !=, literal[1]], ||, binary_operation[call[file.indexOf, parameter[literal['\\']]], !=, literal[1]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="value ["), operandr=MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="] from attribute [file] at tag [log] can only contain a filename, file separators like [\\/] are not allowed"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ApplicationException, sub_type=None)), label=None) else begin[{] None end[}] if[call[file.endsWith, parameter[literal[".log"]]]] begin[{] assign[member[.file], literal[".log"]] else begin[{] None end[}] assign[THIS[member[None.file]], member[.file]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setFile] operator[SEP] identifier[String] identifier[file] operator[SEP] Keyword[throws] identifier[ApplicationException] { Keyword[if] operator[SEP] identifier[StringUtil] operator[SEP] identifier[isEmpty] operator[SEP] identifier[file] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[if] operator[SEP] identifier[file] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[!=] operator[-] Other[1] operator[||] identifier[file] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[!=] operator[-] Other[1] operator[SEP] Keyword[throw] Keyword[new] identifier[ApplicationException] operator[SEP] literal[String] operator[+] identifier[file] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[file] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[file] operator[+=] literal[String] operator[SEP] Keyword[this] operator[SEP] identifier[file] operator[=] identifier[file] operator[SEP] }
public Object parse(URL url, String charset) { return parseURL(url, null, charset); }
class class_name[name] begin[{] method[parse, return_type[type[Object]], modifier[public], parameter[url, charset]] begin[{] return[call[.parseURL, parameter[member[.url], literal[null], member[.charset]]]] end[}] END[}]
Keyword[public] identifier[Object] identifier[parse] operator[SEP] identifier[URL] identifier[url] , identifier[String] identifier[charset] operator[SEP] { Keyword[return] identifier[parseURL] operator[SEP] identifier[url] , Other[null] , identifier[charset] operator[SEP] operator[SEP] }
public static ResourcePatternResolver getResourcePatternResolver(ResourceLoader resourceLoader) { Assert.notNull(resourceLoader, "ResourceLoader must not be null"); if (resourceLoader instanceof ResourcePatternResolver) { return (ResourcePatternResolver) resourceLoader; } else if (resourceLoader != null) { return new PathMatchingResourcePatternResolver(resourceLoader); } else { return new PathMatchingResourcePatternResolver(); } }
class class_name[name] begin[{] method[getResourcePatternResolver, return_type[type[ResourcePatternResolver]], modifier[public static], parameter[resourceLoader]] begin[{] call[Assert.notNull, parameter[member[.resourceLoader], literal["ResourceLoader must not be null"]]] if[binary_operation[member[.resourceLoader], instanceof, type[ResourcePatternResolver]]] begin[{] return[Cast(expression=MemberReference(member=resourceLoader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ResourcePatternResolver, sub_type=None))] else begin[{] if[binary_operation[member[.resourceLoader], !=, literal[null]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=resourceLoader, 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=PathMatchingResourcePatternResolver, sub_type=None))] else begin[{] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PathMatchingResourcePatternResolver, sub_type=None))] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[ResourcePatternResolver] identifier[getResourcePatternResolver] operator[SEP] identifier[ResourceLoader] identifier[resourceLoader] operator[SEP] { identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] identifier[resourceLoader] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[resourceLoader] Keyword[instanceof] identifier[ResourcePatternResolver] operator[SEP] { Keyword[return] operator[SEP] identifier[ResourcePatternResolver] operator[SEP] identifier[resourceLoader] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[resourceLoader] operator[!=] Other[null] operator[SEP] { Keyword[return] Keyword[new] identifier[PathMatchingResourcePatternResolver] operator[SEP] identifier[resourceLoader] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Keyword[new] identifier[PathMatchingResourcePatternResolver] operator[SEP] operator[SEP] operator[SEP] } }
public void redirect(final String location) { // set the header AND a meta refresh just in case response().headers().set("Location", location); sendReply(HttpResponseStatus.OK, new StringBuilder( "<html></head><meta http-equiv=\"refresh\" content=\"0; url=" + location + "\"></head></html>") .toString().getBytes(this.getCharset()) ); }
class class_name[name] begin[{] method[redirect, return_type[void], modifier[public], parameter[location]] begin[{] call[.response, parameter[]] call[.sendReply, parameter[member[HttpResponseStatus.OK], ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="<html></head><meta http-equiv=\"refresh\" content=\"0; url="), operandr=MemberReference(member=location, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\"></head></html>"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getCharset, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], member=getBytes, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=StringBuilder, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[void] identifier[redirect] operator[SEP] Keyword[final] identifier[String] identifier[location] operator[SEP] { identifier[response] operator[SEP] operator[SEP] operator[SEP] identifier[headers] operator[SEP] operator[SEP] operator[SEP] identifier[set] operator[SEP] literal[String] , identifier[location] operator[SEP] operator[SEP] identifier[sendReply] operator[SEP] identifier[HttpResponseStatus] operator[SEP] identifier[OK] , Keyword[new] identifier[StringBuilder] operator[SEP] literal[String] operator[+] identifier[location] operator[+] literal[String] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[getBytes] operator[SEP] Keyword[this] operator[SEP] identifier[getCharset] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
protected void recordTiming(String statKey, long timeSpan) { final String longKey = getActualStatKey(statKey); statsCollector.recordTiming(longKey, timeSpan); }
class class_name[name] begin[{] method[recordTiming, return_type[void], modifier[protected], parameter[statKey, timeSpan]] begin[{] local_variable[type[String], longKey] call[statsCollector.recordTiming, parameter[member[.longKey], member[.timeSpan]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[recordTiming] operator[SEP] identifier[String] identifier[statKey] , Keyword[long] identifier[timeSpan] operator[SEP] { Keyword[final] identifier[String] identifier[longKey] operator[=] identifier[getActualStatKey] operator[SEP] identifier[statKey] operator[SEP] operator[SEP] identifier[statsCollector] operator[SEP] identifier[recordTiming] operator[SEP] identifier[longKey] , identifier[timeSpan] operator[SEP] operator[SEP] }
@Pure public static Point3f computeLineLineIntersection( double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3, double x4, double y4, double z4) { double s = computeLineLineIntersectionFactor(x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4); if (Double.isNaN(s)) { return null; } return new Point3f( x1 + s * (x2 - x1), y1 + s * (y2 - y1), z1 + s * (z2 - z1)); }
class class_name[name] begin[{] method[computeLineLineIntersection, return_type[type[Point3f]], modifier[public static], parameter[x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4]] begin[{] local_variable[type[double], s] if[call[Double.isNaN, parameter[member[.s]]]] begin[{] return[literal[null]] else begin[{] None end[}] return[ClassCreator(arguments=[BinaryOperation(operandl=MemberReference(member=x1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=x2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=x1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operator=*), operator=+), BinaryOperation(operandl=MemberReference(member=y1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=y2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=y1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operator=*), operator=+), BinaryOperation(operandl=MemberReference(member=z1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=z2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=z1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operator=*), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Point3f, sub_type=None))] end[}] END[}]
annotation[@] identifier[Pure] Keyword[public] Keyword[static] identifier[Point3f] identifier[computeLineLineIntersection] operator[SEP] Keyword[double] identifier[x1] , Keyword[double] identifier[y1] , Keyword[double] identifier[z1] , Keyword[double] identifier[x2] , Keyword[double] identifier[y2] , Keyword[double] identifier[z2] , Keyword[double] identifier[x3] , Keyword[double] identifier[y3] , Keyword[double] identifier[z3] , Keyword[double] identifier[x4] , Keyword[double] identifier[y4] , Keyword[double] identifier[z4] operator[SEP] { Keyword[double] identifier[s] operator[=] identifier[computeLineLineIntersectionFactor] operator[SEP] identifier[x1] , identifier[y1] , identifier[z1] , identifier[x2] , identifier[y2] , identifier[z2] , identifier[x3] , identifier[y3] , identifier[z3] , identifier[x4] , identifier[y4] , identifier[z4] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Double] operator[SEP] identifier[isNaN] operator[SEP] identifier[s] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[return] Keyword[new] identifier[Point3f] operator[SEP] identifier[x1] operator[+] identifier[s] operator[*] operator[SEP] identifier[x2] operator[-] identifier[x1] operator[SEP] , identifier[y1] operator[+] identifier[s] operator[*] operator[SEP] identifier[y2] operator[-] identifier[y1] operator[SEP] , identifier[z1] operator[+] identifier[s] operator[*] operator[SEP] identifier[z2] operator[-] identifier[z1] operator[SEP] operator[SEP] operator[SEP] }
public Map<List<String>, String> extractNestedTypes(XEvent event) { return XCostType.instance().extractNestedValues(event); }
class class_name[name] begin[{] method[extractNestedTypes, return_type[type[Map]], modifier[public], parameter[event]] begin[{] return[call[XCostType.instance, parameter[]]] end[}] END[}]
Keyword[public] identifier[Map] operator[<] identifier[List] operator[<] identifier[String] operator[>] , identifier[String] operator[>] identifier[extractNestedTypes] operator[SEP] identifier[XEvent] identifier[event] operator[SEP] { Keyword[return] identifier[XCostType] operator[SEP] identifier[instance] operator[SEP] operator[SEP] operator[SEP] identifier[extractNestedValues] operator[SEP] identifier[event] operator[SEP] operator[SEP] }