code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public void process(final Resource resource, final Reader reader, final Writer writer) throws IOException { try { final String content = IOUtils.toString(reader); String result = ConsoleStripperProcessor.PATTERN.matcher(content).replaceAll(""); writer.write(result); } finally { reader.close(); writer.close(); } }
class class_name[name] begin[{] method[process, return_type[void], modifier[public], parameter[resource, reader, writer]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=IOUtils, selectors=[], type_arguments=None), name=content)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=content, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=matcher, postfix_operators=[], prefix_operators=[], qualifier=ConsoleStripperProcessor.PATTERN, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=replaceAll, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=result)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=writer, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=writer, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[process] operator[SEP] Keyword[final] identifier[Resource] identifier[resource] , Keyword[final] identifier[Reader] identifier[reader] , Keyword[final] identifier[Writer] identifier[writer] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[try] { Keyword[final] identifier[String] identifier[content] operator[=] identifier[IOUtils] operator[SEP] identifier[toString] operator[SEP] identifier[reader] operator[SEP] operator[SEP] identifier[String] identifier[result] operator[=] identifier[ConsoleStripperProcessor] operator[SEP] identifier[PATTERN] operator[SEP] identifier[matcher] operator[SEP] identifier[content] operator[SEP] operator[SEP] identifier[replaceAll] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[writer] operator[SEP] identifier[write] operator[SEP] identifier[result] operator[SEP] operator[SEP] } Keyword[finally] { identifier[reader] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[writer] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } }
public static void yu12ToBoof(byte[] data, int width, int height, ImageBase output) { if( output instanceof Planar) { Planar ms = (Planar) output; ms.reshape(width,height,3); if( BoofConcurrency.USE_CONCURRENT ) { if (ms.getBandType() == GrayU8.class) { ImplConvertYV12_MT.yv12ToPlanarRgb_U8(data, ms); } else if (ms.getBandType() == GrayF32.class) { ImplConvertYV12_MT.yv12ToPlanarRgb_F32(data, ms); } else { throw new IllegalArgumentException("Unsupported output band format"); } } else { if (ms.getBandType() == GrayU8.class) { ImplConvertYV12.yv12ToPlanarRgb_U8(data, ms); } else if (ms.getBandType() == GrayF32.class) { ImplConvertYV12.yv12ToPlanarRgb_F32(data, ms); } else { throw new IllegalArgumentException("Unsupported output band format"); } } } else if( output instanceof ImageGray) { if (output.getClass() == GrayU8.class) { yu12ToGray(data, width, height, (GrayU8) output); } else if (output.getClass() == GrayF32.class) { yu12ToGray(data, width, height, (GrayF32) output); } else { throw new IllegalArgumentException("Unsupported output type"); } } else if( output instanceof ImageInterleaved ) { ((ImageMultiBand)output).reshape(width,height,3); if( BoofConcurrency.USE_CONCURRENT ) { if (output.getClass() == InterleavedU8.class) { ImplConvertYV12_MT.yv12ToInterleaved(data, (InterleavedU8) output); } else if (output.getClass() == InterleavedF32.class) { ImplConvertYV12_MT.yv12ToInterleaved(data, (InterleavedF32) output); } else { throw new IllegalArgumentException("Unsupported output type"); } } else { if (output.getClass() == InterleavedU8.class) { ImplConvertYV12.yv12ToInterleaved(data, (InterleavedU8) output); } else if (output.getClass() == InterleavedF32.class) { ImplConvertYV12.yv12ToInterleaved(data, (InterleavedF32) output); } else { throw new IllegalArgumentException("Unsupported output type"); } } } else { throw new IllegalArgumentException("Boofcv image type not yet supported"); } }
class class_name[name] begin[{] method[yu12ToBoof, return_type[void], modifier[public static], parameter[data, width, height, output]] begin[{] if[binary_operation[member[.output], instanceof, type[Planar]]] begin[{] local_variable[type[Planar], ms] call[ms.reshape, parameter[member[.width], member[.height], literal[3]]] if[member[BoofConcurrency.USE_CONCURRENT]] begin[{] if[binary_operation[call[ms.getBandType, parameter[]], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GrayU8, sub_type=None))]] begin[{] call[ImplConvertYV12_MT.yv12ToPlanarRgb_U8, parameter[member[.data], member[.ms]]] else begin[{] if[binary_operation[call[ms.getBandType, parameter[]], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GrayF32, sub_type=None))]] begin[{] call[ImplConvertYV12_MT.yv12ToPlanarRgb_F32, parameter[member[.data], member[.ms]]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unsupported output band format")], 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[}] else begin[{] if[binary_operation[call[ms.getBandType, parameter[]], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GrayU8, sub_type=None))]] begin[{] call[ImplConvertYV12.yv12ToPlanarRgb_U8, parameter[member[.data], member[.ms]]] else begin[{] if[binary_operation[call[ms.getBandType, parameter[]], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GrayF32, sub_type=None))]] begin[{] call[ImplConvertYV12.yv12ToPlanarRgb_F32, parameter[member[.data], member[.ms]]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unsupported output band format")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) end[}] end[}] end[}] else begin[{] if[binary_operation[member[.output], instanceof, type[ImageGray]]] begin[{] if[binary_operation[call[output.getClass, parameter[]], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GrayU8, sub_type=None))]] begin[{] call[.yu12ToGray, parameter[member[.data], member[.width], member[.height], Cast(expression=MemberReference(member=output, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=GrayU8, sub_type=None))]] else begin[{] if[binary_operation[call[output.getClass, parameter[]], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GrayF32, sub_type=None))]] begin[{] call[.yu12ToGray, parameter[member[.data], member[.width], member[.height], Cast(expression=MemberReference(member=output, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=GrayF32, sub_type=None))]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unsupported output type")], 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[}] else begin[{] if[binary_operation[member[.output], instanceof, type[ImageInterleaved]]] begin[{] Cast(expression=MemberReference(member=output, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ImageMultiBand, sub_type=None)) if[member[BoofConcurrency.USE_CONCURRENT]] begin[{] if[binary_operation[call[output.getClass, parameter[]], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InterleavedU8, sub_type=None))]] begin[{] call[ImplConvertYV12_MT.yv12ToInterleaved, parameter[member[.data], Cast(expression=MemberReference(member=output, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=InterleavedU8, sub_type=None))]] else begin[{] if[binary_operation[call[output.getClass, parameter[]], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InterleavedF32, sub_type=None))]] begin[{] call[ImplConvertYV12_MT.yv12ToInterleaved, parameter[member[.data], Cast(expression=MemberReference(member=output, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=InterleavedF32, sub_type=None))]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unsupported output type")], 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[}] else begin[{] if[binary_operation[call[output.getClass, parameter[]], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InterleavedU8, sub_type=None))]] begin[{] call[ImplConvertYV12.yv12ToInterleaved, parameter[member[.data], Cast(expression=MemberReference(member=output, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=InterleavedU8, sub_type=None))]] else begin[{] if[binary_operation[call[output.getClass, parameter[]], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InterleavedF32, sub_type=None))]] begin[{] call[ImplConvertYV12.yv12ToInterleaved, parameter[member[.data], Cast(expression=MemberReference(member=output, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=InterleavedF32, sub_type=None))]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unsupported output type")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) end[}] end[}] end[}] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Boofcv image type not yet supported")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) end[}] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[yu12ToBoof] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[data] , Keyword[int] identifier[width] , Keyword[int] identifier[height] , identifier[ImageBase] identifier[output] operator[SEP] { Keyword[if] operator[SEP] identifier[output] Keyword[instanceof] identifier[Planar] operator[SEP] { identifier[Planar] identifier[ms] operator[=] operator[SEP] identifier[Planar] operator[SEP] identifier[output] operator[SEP] identifier[ms] operator[SEP] identifier[reshape] operator[SEP] identifier[width] , identifier[height] , Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[BoofConcurrency] operator[SEP] identifier[USE_CONCURRENT] operator[SEP] { Keyword[if] operator[SEP] identifier[ms] operator[SEP] identifier[getBandType] operator[SEP] operator[SEP] operator[==] identifier[GrayU8] operator[SEP] Keyword[class] operator[SEP] { identifier[ImplConvertYV12_MT] operator[SEP] identifier[yv12ToPlanarRgb_U8] operator[SEP] identifier[data] , identifier[ms] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[ms] operator[SEP] identifier[getBandType] operator[SEP] operator[SEP] operator[==] identifier[GrayF32] operator[SEP] Keyword[class] operator[SEP] { identifier[ImplConvertYV12_MT] operator[SEP] identifier[yv12ToPlanarRgb_F32] operator[SEP] identifier[data] , identifier[ms] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[if] operator[SEP] identifier[ms] operator[SEP] identifier[getBandType] operator[SEP] operator[SEP] operator[==] identifier[GrayU8] operator[SEP] Keyword[class] operator[SEP] { identifier[ImplConvertYV12] operator[SEP] identifier[yv12ToPlanarRgb_U8] operator[SEP] identifier[data] , identifier[ms] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[ms] operator[SEP] identifier[getBandType] operator[SEP] operator[SEP] operator[==] identifier[GrayF32] operator[SEP] Keyword[class] operator[SEP] { identifier[ImplConvertYV12] operator[SEP] identifier[yv12ToPlanarRgb_F32] operator[SEP] identifier[data] , identifier[ms] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } } } Keyword[else] Keyword[if] operator[SEP] identifier[output] Keyword[instanceof] identifier[ImageGray] operator[SEP] { Keyword[if] operator[SEP] identifier[output] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[==] identifier[GrayU8] operator[SEP] Keyword[class] operator[SEP] { identifier[yu12ToGray] operator[SEP] identifier[data] , identifier[width] , identifier[height] , operator[SEP] identifier[GrayU8] operator[SEP] identifier[output] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[output] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[==] identifier[GrayF32] operator[SEP] Keyword[class] operator[SEP] { identifier[yu12ToGray] operator[SEP] identifier[data] , identifier[width] , identifier[height] , operator[SEP] identifier[GrayF32] operator[SEP] identifier[output] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[output] Keyword[instanceof] identifier[ImageInterleaved] operator[SEP] { operator[SEP] operator[SEP] identifier[ImageMultiBand] operator[SEP] identifier[output] operator[SEP] operator[SEP] identifier[reshape] operator[SEP] identifier[width] , identifier[height] , Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[BoofConcurrency] operator[SEP] identifier[USE_CONCURRENT] operator[SEP] { Keyword[if] operator[SEP] identifier[output] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[==] identifier[InterleavedU8] operator[SEP] Keyword[class] operator[SEP] { identifier[ImplConvertYV12_MT] operator[SEP] identifier[yv12ToInterleaved] operator[SEP] identifier[data] , operator[SEP] identifier[InterleavedU8] operator[SEP] identifier[output] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[output] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[==] identifier[InterleavedF32] operator[SEP] Keyword[class] operator[SEP] { identifier[ImplConvertYV12_MT] operator[SEP] identifier[yv12ToInterleaved] operator[SEP] identifier[data] , operator[SEP] identifier[InterleavedF32] operator[SEP] identifier[output] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[if] operator[SEP] identifier[output] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[==] identifier[InterleavedU8] operator[SEP] Keyword[class] operator[SEP] { identifier[ImplConvertYV12] operator[SEP] identifier[yv12ToInterleaved] operator[SEP] identifier[data] , operator[SEP] identifier[InterleavedU8] operator[SEP] identifier[output] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[output] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[==] identifier[InterleavedF32] operator[SEP] Keyword[class] operator[SEP] { identifier[ImplConvertYV12] operator[SEP] identifier[yv12ToInterleaved] operator[SEP] identifier[data] , operator[SEP] identifier[InterleavedF32] operator[SEP] identifier[output] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } } } Keyword[else] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } }
final boolean lookahead(char c, int n) { int pos = (m_queueMark + n); boolean b; if ((pos <= m_ops.getTokenQueueSize()) && (pos > 0) && (m_ops.getTokenQueueSize() != 0)) { String tok = ((String) m_ops.m_tokenQueue.elementAt(pos - 1)); b = (tok.length() == 1) ? (tok.charAt(0) == c) : false; } else { b = false; } return b; }
class class_name[name] begin[{] method[lookahead, return_type[type[boolean]], modifier[final], parameter[c, n]] begin[{] local_variable[type[int], pos] local_variable[type[boolean], b] if[binary_operation[binary_operation[binary_operation[member[.pos], <=, call[m_ops.getTokenQueueSize, parameter[]]], &&, binary_operation[member[.pos], >, literal[0]]], &&, binary_operation[call[m_ops.getTokenQueueSize, parameter[]], !=, literal[0]]]] begin[{] local_variable[type[String], tok] assign[member[.b], TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=tok, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator===), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), if_true=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=tok, selectors=[], type_arguments=None), operandr=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===))] else begin[{] assign[member[.b], literal[false]] end[}] return[member[.b]] end[}] END[}]
Keyword[final] Keyword[boolean] identifier[lookahead] operator[SEP] Keyword[char] identifier[c] , Keyword[int] identifier[n] operator[SEP] { Keyword[int] identifier[pos] operator[=] operator[SEP] identifier[m_queueMark] operator[+] identifier[n] operator[SEP] operator[SEP] Keyword[boolean] identifier[b] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[pos] operator[<=] identifier[m_ops] operator[SEP] identifier[getTokenQueueSize] operator[SEP] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[pos] operator[>] Other[0] operator[SEP] operator[&&] operator[SEP] identifier[m_ops] operator[SEP] identifier[getTokenQueueSize] operator[SEP] operator[SEP] operator[!=] Other[0] operator[SEP] operator[SEP] { identifier[String] identifier[tok] operator[=] operator[SEP] operator[SEP] identifier[String] operator[SEP] identifier[m_ops] operator[SEP] identifier[m_tokenQueue] operator[SEP] identifier[elementAt] operator[SEP] identifier[pos] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[b] operator[=] operator[SEP] identifier[tok] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[1] operator[SEP] operator[?] operator[SEP] identifier[tok] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[==] identifier[c] operator[SEP] operator[:] literal[boolean] operator[SEP] } Keyword[else] { identifier[b] operator[=] literal[boolean] operator[SEP] } Keyword[return] identifier[b] operator[SEP] }
public boolean similar(Object other) { if (!(other instanceof JSONArray)) { return false; } int len = this.length(); if (len != ((JSONArray)other).length()) { return false; } for (int i = 0; i < len; i += 1) { Object valueThis = this.get(i); Object valueOther = ((JSONArray)other).get(i); if (valueThis instanceof JSONObject) { if (!((JSONObject)valueThis).similar(valueOther)) { return false; } } else if (valueThis instanceof JSONArray) { if (!((JSONArray)valueThis).similar(valueOther)) { return false; } } else if (!valueThis.equals(valueOther)) { return false; } } return true; }
class class_name[name] begin[{] method[similar, return_type[type[boolean]], modifier[public], parameter[other]] begin[{] if[binary_operation[member[.other], instanceof, type[JSONArray]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[int], len] if[binary_operation[member[.len], !=, Cast(expression=MemberReference(member=other, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=JSONArray, sub_type=None))]] begin[{] return[literal[false]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=valueThis)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=other, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=JSONArray, sub_type=None)), name=valueOther)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=valueThis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=JSONObject, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=valueThis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=JSONArray, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=valueOther, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=['!'], qualifier=valueThis, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=Cast(expression=MemberReference(member=valueThis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=JSONArray, sub_type=None)), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=Cast(expression=MemberReference(member=valueThis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=JSONObject, sub_type=None)), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)]))]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), label=None) return[literal[true]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[similar] operator[SEP] identifier[Object] identifier[other] operator[SEP] { Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[other] Keyword[instanceof] identifier[JSONArray] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[int] identifier[len] operator[=] Keyword[this] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[len] operator[!=] operator[SEP] operator[SEP] identifier[JSONArray] operator[SEP] identifier[other] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[len] operator[SEP] identifier[i] operator[+=] Other[1] operator[SEP] { identifier[Object] identifier[valueThis] operator[=] Keyword[this] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[Object] identifier[valueOther] operator[=] operator[SEP] operator[SEP] identifier[JSONArray] operator[SEP] identifier[other] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[valueThis] Keyword[instanceof] identifier[JSONObject] operator[SEP] { Keyword[if] operator[SEP] operator[!] operator[SEP] operator[SEP] identifier[JSONObject] operator[SEP] identifier[valueThis] operator[SEP] operator[SEP] identifier[similar] operator[SEP] identifier[valueOther] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[valueThis] Keyword[instanceof] identifier[JSONArray] operator[SEP] { Keyword[if] operator[SEP] operator[!] operator[SEP] operator[SEP] identifier[JSONArray] operator[SEP] identifier[valueThis] operator[SEP] operator[SEP] identifier[similar] operator[SEP] identifier[valueOther] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] operator[!] identifier[valueThis] operator[SEP] identifier[equals] operator[SEP] identifier[valueOther] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
private void fireFrameReceived(final KnxTunnelEmi emiType, final byte[] frame) throws KNXFormatException { logger.debug("received {} frame {}", emiType, DataUnitBuilder.toHex(frame, "")); final FrameEvent fe = emiType == KnxTunnelEmi.CEmi ? new FrameEvent(this, CEMIFactory.create(frame, 0, frame.length)) : new FrameEvent(this, frame); listeners.fire(l -> l.frameReceived(fe)); }
class class_name[name] begin[{] method[fireFrameReceived, return_type[void], modifier[private], parameter[emiType, frame]] begin[{] call[logger.debug, parameter[literal["received {} frame {}"], member[.emiType], call[DataUnitBuilder.toHex, parameter[member[.frame], literal[""]]]]] local_variable[type[FrameEvent], fe] call[listeners.fire, parameter[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=fe, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=frameReceived, postfix_operators=[], prefix_operators=[], qualifier=l, selectors=[], type_arguments=None), parameters=[MemberReference(member=l, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]] end[}] END[}]
Keyword[private] Keyword[void] identifier[fireFrameReceived] operator[SEP] Keyword[final] identifier[KnxTunnelEmi] identifier[emiType] , Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[frame] operator[SEP] Keyword[throws] identifier[KNXFormatException] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[emiType] , identifier[DataUnitBuilder] operator[SEP] identifier[toHex] operator[SEP] identifier[frame] , literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[FrameEvent] identifier[fe] operator[=] identifier[emiType] operator[==] identifier[KnxTunnelEmi] operator[SEP] identifier[CEmi] operator[?] Keyword[new] identifier[FrameEvent] operator[SEP] Keyword[this] , identifier[CEMIFactory] operator[SEP] identifier[create] operator[SEP] identifier[frame] , Other[0] , identifier[frame] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[:] Keyword[new] identifier[FrameEvent] operator[SEP] Keyword[this] , identifier[frame] operator[SEP] operator[SEP] identifier[listeners] operator[SEP] identifier[fire] operator[SEP] identifier[l] operator[->] identifier[l] operator[SEP] identifier[frameReceived] operator[SEP] identifier[fe] operator[SEP] operator[SEP] operator[SEP] }
private void generateBucketDelete(TableBucket bucket, UpdateInstructions update) { if (bucket.exists()) { update.withAttribute(new AttributeUpdate(bucket.getHash(), AttributeUpdateType.Replace, Attributes.NULL_ATTRIBUTE_VALUE)); update.bucketRemoved(); } }
class class_name[name] begin[{] method[generateBucketDelete, return_type[void], modifier[private], parameter[bucket, update]] begin[{] if[call[bucket.exists, parameter[]]] begin[{] call[update.withAttribute, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getHash, postfix_operators=[], prefix_operators=[], qualifier=bucket, selectors=[], type_arguments=None), MemberReference(member=Replace, postfix_operators=[], prefix_operators=[], qualifier=AttributeUpdateType, selectors=[]), MemberReference(member=NULL_ATTRIBUTE_VALUE, postfix_operators=[], prefix_operators=[], qualifier=Attributes, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AttributeUpdate, sub_type=None))]] call[update.bucketRemoved, parameter[]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[generateBucketDelete] operator[SEP] identifier[TableBucket] identifier[bucket] , identifier[UpdateInstructions] identifier[update] operator[SEP] { Keyword[if] operator[SEP] identifier[bucket] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { identifier[update] operator[SEP] identifier[withAttribute] operator[SEP] Keyword[new] identifier[AttributeUpdate] operator[SEP] identifier[bucket] operator[SEP] identifier[getHash] operator[SEP] operator[SEP] , identifier[AttributeUpdateType] operator[SEP] identifier[Replace] , identifier[Attributes] operator[SEP] identifier[NULL_ATTRIBUTE_VALUE] operator[SEP] operator[SEP] operator[SEP] identifier[update] operator[SEP] identifier[bucketRemoved] operator[SEP] operator[SEP] operator[SEP] } }
protected void beforeSaveToDestination(Map<Identity, JsonNode> sourceDocs, Map<Identity, JsonNode> destDocs, Set<Identity> insertDocs, Set<Identity> rewriteDocs, List<JsonNode> saveDocsList) { // do nothing by default // override this in child classes to get access to docs before they are saved }
class class_name[name] begin[{] method[beforeSaveToDestination, return_type[void], modifier[protected], parameter[sourceDocs, destDocs, insertDocs, rewriteDocs, saveDocsList]] begin[{] end[}] END[}]
Keyword[protected] Keyword[void] identifier[beforeSaveToDestination] operator[SEP] identifier[Map] operator[<] identifier[Identity] , identifier[JsonNode] operator[>] identifier[sourceDocs] , identifier[Map] operator[<] identifier[Identity] , identifier[JsonNode] operator[>] identifier[destDocs] , identifier[Set] operator[<] identifier[Identity] operator[>] identifier[insertDocs] , identifier[Set] operator[<] identifier[Identity] operator[>] identifier[rewriteDocs] , identifier[List] operator[<] identifier[JsonNode] operator[>] identifier[saveDocsList] operator[SEP] { }
public QueueConfig findQueueConfig(String name) { name = getBaseName(name); QueueConfig config = lookupByPattern(configPatternMatcher, queueConfigs, name); if (config != null) { return config.getAsReadOnly(); } return getQueueConfig("default").getAsReadOnly(); }
class class_name[name] begin[{] method[findQueueConfig, return_type[type[QueueConfig]], modifier[public], parameter[name]] begin[{] assign[member[.name], call[.getBaseName, parameter[member[.name]]]] local_variable[type[QueueConfig], config] if[binary_operation[member[.config], !=, literal[null]]] begin[{] return[call[config.getAsReadOnly, parameter[]]] else begin[{] None end[}] return[call[.getQueueConfig, parameter[literal["default"]]]] end[}] END[}]
Keyword[public] identifier[QueueConfig] identifier[findQueueConfig] operator[SEP] identifier[String] identifier[name] operator[SEP] { identifier[name] operator[=] identifier[getBaseName] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[QueueConfig] identifier[config] operator[=] identifier[lookupByPattern] operator[SEP] identifier[configPatternMatcher] , identifier[queueConfigs] , identifier[name] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[config] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[config] operator[SEP] identifier[getAsReadOnly] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[getQueueConfig] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[getAsReadOnly] operator[SEP] operator[SEP] operator[SEP] }
public final void registerStatus(TaskStatus status) { TaskStatus.validate(this.status, status); this.status = status; if (status.equals(TaskStatus.SUBMITTED)) { clear(); } }
class class_name[name] begin[{] method[registerStatus, return_type[void], modifier[final public], parameter[status]] begin[{] call[TaskStatus.validate, parameter[THIS[member[None.status]], member[.status]]] assign[THIS[member[None.status]], member[.status]] if[call[status.equals, parameter[member[TaskStatus.SUBMITTED]]]] begin[{] call[.clear, parameter[]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[registerStatus] operator[SEP] identifier[TaskStatus] identifier[status] operator[SEP] { identifier[TaskStatus] operator[SEP] identifier[validate] operator[SEP] Keyword[this] operator[SEP] identifier[status] , identifier[status] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[status] operator[=] identifier[status] operator[SEP] Keyword[if] operator[SEP] identifier[status] operator[SEP] identifier[equals] operator[SEP] identifier[TaskStatus] operator[SEP] identifier[SUBMITTED] operator[SEP] operator[SEP] { identifier[clear] operator[SEP] operator[SEP] operator[SEP] } }
public static boolean isCData(String string) { if (string != null) { for (int i = 0; i < string.length(); i++) { char chChar = string.charAt(i); if ((chChar == 0x9) || (chChar == 0xD) || (chChar == 0xA)) return true; // Carriage return/Line feed/newline } } return false; }
class class_name[name] begin[{] method[isCData, return_type[type[boolean]], modifier[public static], parameter[string]] begin[{] if[binary_operation[member[.string], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=string, selectors=[], type_arguments=None), name=chChar)], modifiers=set(), type=BasicType(dimensions=[], name=char)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=chChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x9), operator===), operandr=BinaryOperation(operandl=MemberReference(member=chChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xD), operator===), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=chChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xA), operator===), operator=||), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=string, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) else begin[{] None end[}] return[literal[false]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isCData] operator[SEP] identifier[String] identifier[string] operator[SEP] { Keyword[if] operator[SEP] identifier[string] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[string] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[char] identifier[chChar] operator[=] identifier[string] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[chChar] operator[==] literal[Integer] operator[SEP] operator[||] operator[SEP] identifier[chChar] operator[==] literal[Integer] operator[SEP] operator[||] operator[SEP] identifier[chChar] operator[==] literal[Integer] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
protected void addOption(AbstractRenderAppender buffer, String type, String optionValue, String optionDisplay, int idx, String altText, char accessKey, boolean disabled) throws JspException { ServletRequest req = pageContext.getRequest(); if (_cr == null) _cr = TagRenderingBase.Factory.getConstantRendering(req); assert(buffer != null); assert(optionValue != null); assert(optionDisplay != null); assert(type != null); if (_orientation != null && isVertical()) { _cr.TR_TD(buffer); } _inputState.clear(); _inputState.type = type; _inputState.name = getQualifiedDataSourceName(); _inputState.value = optionValue; _inputState.style = _style; _inputState.styleClass = _class; if (isMatched(optionValue, null)) { _inputState.checked = true; } _inputState.disabled = isDisabled(); _inputState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, ALT, altText); if (accessKey != 0x00) _inputState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, ACCESSKEY, Character.toString(accessKey)); // if there are attributes defined push them to the options. if (_attrs != null && _attrs.size() > 0) { Iterator iterator = _attrs.keySet().iterator(); for (; iterator.hasNext();) { String key = (String) iterator.next(); if (key == null) continue; String value = (String) _attrs.get(key); _inputState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, key, value); } } TagRenderingBase br = TagRenderingBase.Factory.getRendering(TagRenderingBase.INPUT_BOOLEAN_TAG, req); br.doStartTag(buffer, _inputState); br.doEndTag(buffer); String ls = _labelStyle; String lsc = _labelStyleClass; _spanState.style = ls; _spanState.styleClass = lsc; br = TagRenderingBase.Factory.getRendering(TagRenderingBase.SPAN_TAG, req); br.doStartTag(buffer, _spanState); buffer.append(optionDisplay); br.doEndTag(buffer); // backward compatibility this is now overridden by the _orientation if (_orientation == null) { _cr.BR(buffer); } else { if (isVertical()) { _cr.TR_TD(buffer); } else { _cr.NBSP(buffer); } } }
class class_name[name] begin[{] method[addOption, return_type[void], modifier[protected], parameter[buffer, type, optionValue, optionDisplay, idx, altText, accessKey, disabled]] begin[{] local_variable[type[ServletRequest], req] if[binary_operation[member[._cr], ==, literal[null]]] begin[{] assign[member[._cr], call[TagRenderingBase.Factory.getConstantRendering, parameter[member[.req]]]] else begin[{] None end[}] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=None) AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=optionValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=None) AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=optionDisplay, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=None) AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=None) if[binary_operation[binary_operation[member[._orientation], !=, literal[null]], &&, call[.isVertical, parameter[]]]] begin[{] call[_cr.TR_TD, parameter[member[.buffer]]] else begin[{] None end[}] call[_inputState.clear, parameter[]] assign[member[_inputState.type], member[.type]] assign[member[_inputState.name], call[.getQualifiedDataSourceName, parameter[]]] assign[member[_inputState.value], member[.optionValue]] assign[member[_inputState.style], member[._style]] assign[member[_inputState.styleClass], member[._class]] if[call[.isMatched, parameter[member[.optionValue], literal[null]]]] begin[{] assign[member[_inputState.checked], literal[true]] else begin[{] None end[}] assign[member[_inputState.disabled], call[.isDisabled, parameter[]]] call[_inputState.registerAttribute, parameter[member[AbstractHtmlState.ATTR_GENERAL], member[.ALT], member[.altText]]] if[binary_operation[member[.accessKey], !=, literal[0x00]]] begin[{] call[_inputState.registerAttribute, parameter[member[AbstractHtmlState.ATTR_GENERAL], member[.ACCESSKEY], call[Character.toString, parameter[member[.accessKey]]]]] else begin[{] None end[}] if[binary_operation[binary_operation[member[._attrs], !=, literal[null]], &&, binary_operation[call[_attrs.size, parameter[]], >, literal[0]]]] begin[{] local_variable[type[Iterator], iterator] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=iterator, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=ContinueStatement(goto=None, label=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=_attrs, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ATTR_GENERAL, postfix_operators=[], prefix_operators=[], qualifier=AbstractHtmlState, selectors=[]), MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=registerAttribute, postfix_operators=[], prefix_operators=[], qualifier=_inputState, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=iterator, selectors=[], type_arguments=None), init=None, update=None), label=None) else begin[{] None end[}] local_variable[type[TagRenderingBase], br] call[br.doStartTag, parameter[member[.buffer], member[._inputState]]] call[br.doEndTag, parameter[member[.buffer]]] local_variable[type[String], ls] local_variable[type[String], lsc] assign[member[_spanState.style], member[.ls]] assign[member[_spanState.styleClass], member[.lsc]] assign[member[.br], call[TagRenderingBase.Factory.getRendering, parameter[member[TagRenderingBase.SPAN_TAG], member[.req]]]] call[br.doStartTag, parameter[member[.buffer], member[._spanState]]] call[buffer.append, parameter[member[.optionDisplay]]] call[br.doEndTag, parameter[member[.buffer]]] if[binary_operation[member[._orientation], ==, literal[null]]] begin[{] call[_cr.BR, parameter[member[.buffer]]] else begin[{] if[call[.isVertical, parameter[]]] begin[{] call[_cr.TR_TD, parameter[member[.buffer]]] else begin[{] call[_cr.NBSP, parameter[member[.buffer]]] end[}] end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[addOption] operator[SEP] identifier[AbstractRenderAppender] identifier[buffer] , identifier[String] identifier[type] , identifier[String] identifier[optionValue] , identifier[String] identifier[optionDisplay] , Keyword[int] identifier[idx] , identifier[String] identifier[altText] , Keyword[char] identifier[accessKey] , Keyword[boolean] identifier[disabled] operator[SEP] Keyword[throws] identifier[JspException] { identifier[ServletRequest] identifier[req] operator[=] identifier[pageContext] operator[SEP] identifier[getRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_cr] operator[==] Other[null] operator[SEP] identifier[_cr] operator[=] identifier[TagRenderingBase] operator[SEP] identifier[Factory] operator[SEP] identifier[getConstantRendering] operator[SEP] identifier[req] operator[SEP] operator[SEP] Keyword[assert] operator[SEP] identifier[buffer] operator[!=] Other[null] operator[SEP] operator[SEP] Keyword[assert] operator[SEP] identifier[optionValue] operator[!=] Other[null] operator[SEP] operator[SEP] Keyword[assert] operator[SEP] identifier[optionDisplay] operator[!=] Other[null] operator[SEP] operator[SEP] Keyword[assert] operator[SEP] identifier[type] operator[!=] Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_orientation] operator[!=] Other[null] operator[&&] identifier[isVertical] operator[SEP] operator[SEP] operator[SEP] { identifier[_cr] operator[SEP] identifier[TR_TD] operator[SEP] identifier[buffer] operator[SEP] operator[SEP] } identifier[_inputState] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[_inputState] operator[SEP] identifier[type] operator[=] identifier[type] operator[SEP] identifier[_inputState] operator[SEP] identifier[name] operator[=] identifier[getQualifiedDataSourceName] operator[SEP] operator[SEP] operator[SEP] identifier[_inputState] operator[SEP] identifier[value] operator[=] identifier[optionValue] operator[SEP] identifier[_inputState] operator[SEP] identifier[style] operator[=] identifier[_style] operator[SEP] identifier[_inputState] operator[SEP] identifier[styleClass] operator[=] identifier[_class] operator[SEP] Keyword[if] operator[SEP] identifier[isMatched] operator[SEP] identifier[optionValue] , Other[null] operator[SEP] operator[SEP] { identifier[_inputState] operator[SEP] identifier[checked] operator[=] literal[boolean] operator[SEP] } identifier[_inputState] operator[SEP] identifier[disabled] operator[=] identifier[isDisabled] operator[SEP] operator[SEP] operator[SEP] identifier[_inputState] operator[SEP] identifier[registerAttribute] operator[SEP] identifier[AbstractHtmlState] operator[SEP] identifier[ATTR_GENERAL] , identifier[ALT] , identifier[altText] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[accessKey] operator[!=] literal[Integer] operator[SEP] identifier[_inputState] operator[SEP] identifier[registerAttribute] operator[SEP] identifier[AbstractHtmlState] operator[SEP] identifier[ATTR_GENERAL] , identifier[ACCESSKEY] , identifier[Character] operator[SEP] identifier[toString] operator[SEP] identifier[accessKey] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_attrs] operator[!=] Other[null] operator[&&] identifier[_attrs] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[Iterator] identifier[iterator] operator[=] identifier[_attrs] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[key] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[iterator] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[key] operator[==] Other[null] operator[SEP] Keyword[continue] operator[SEP] identifier[String] identifier[value] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[_attrs] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[_inputState] operator[SEP] identifier[registerAttribute] operator[SEP] identifier[AbstractHtmlState] operator[SEP] identifier[ATTR_GENERAL] , identifier[key] , identifier[value] operator[SEP] operator[SEP] } } identifier[TagRenderingBase] identifier[br] operator[=] identifier[TagRenderingBase] operator[SEP] identifier[Factory] operator[SEP] identifier[getRendering] operator[SEP] identifier[TagRenderingBase] operator[SEP] identifier[INPUT_BOOLEAN_TAG] , identifier[req] operator[SEP] operator[SEP] identifier[br] operator[SEP] identifier[doStartTag] operator[SEP] identifier[buffer] , identifier[_inputState] operator[SEP] operator[SEP] identifier[br] operator[SEP] identifier[doEndTag] operator[SEP] identifier[buffer] operator[SEP] operator[SEP] identifier[String] identifier[ls] operator[=] identifier[_labelStyle] operator[SEP] identifier[String] identifier[lsc] operator[=] identifier[_labelStyleClass] operator[SEP] identifier[_spanState] operator[SEP] identifier[style] operator[=] identifier[ls] operator[SEP] identifier[_spanState] operator[SEP] identifier[styleClass] operator[=] identifier[lsc] operator[SEP] identifier[br] operator[=] identifier[TagRenderingBase] operator[SEP] identifier[Factory] operator[SEP] identifier[getRendering] operator[SEP] identifier[TagRenderingBase] operator[SEP] identifier[SPAN_TAG] , identifier[req] operator[SEP] operator[SEP] identifier[br] operator[SEP] identifier[doStartTag] operator[SEP] identifier[buffer] , identifier[_spanState] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[append] operator[SEP] identifier[optionDisplay] operator[SEP] operator[SEP] identifier[br] operator[SEP] identifier[doEndTag] operator[SEP] identifier[buffer] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_orientation] operator[==] Other[null] operator[SEP] { identifier[_cr] operator[SEP] identifier[BR] operator[SEP] identifier[buffer] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[isVertical] operator[SEP] operator[SEP] operator[SEP] { identifier[_cr] operator[SEP] identifier[TR_TD] operator[SEP] identifier[buffer] operator[SEP] operator[SEP] } Keyword[else] { identifier[_cr] operator[SEP] identifier[NBSP] operator[SEP] identifier[buffer] operator[SEP] operator[SEP] } } }
public static List<CommerceAccountOrganizationRel> findByOrganizationId( long organizationId, int start, int end) { return getPersistence().findByOrganizationId(organizationId, start, end); }
class class_name[name] begin[{] method[findByOrganizationId, return_type[type[List]], modifier[public static], parameter[organizationId, start, end]] begin[{] return[call[.getPersistence, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[CommerceAccountOrganizationRel] operator[>] identifier[findByOrganizationId] operator[SEP] Keyword[long] identifier[organizationId] , Keyword[int] identifier[start] , Keyword[int] identifier[end] operator[SEP] { Keyword[return] identifier[getPersistence] operator[SEP] operator[SEP] operator[SEP] identifier[findByOrganizationId] operator[SEP] identifier[organizationId] , identifier[start] , identifier[end] operator[SEP] operator[SEP] }
public void setDefaultInterval(long defaultInterval) { if(defaultInterval <= 0) { LOG.severe("collector.scheduler.interval must be greater than 0. Recommended value is 500-1000. Current value is " + defaultInterval); throw new IllegalArgumentException("collector.scheduler.interval must be greater than 0. Recommended value is 500-1000. Current value is " + defaultInterval); } this.defaultInterval = defaultInterval; }
class class_name[name] begin[{] method[setDefaultInterval, return_type[void], modifier[public], parameter[defaultInterval]] begin[{] if[binary_operation[member[.defaultInterval], <=, literal[0]]] begin[{] call[LOG.severe, parameter[binary_operation[literal["collector.scheduler.interval must be greater than 0. Recommended value is 500-1000. Current value is "], +, member[.defaultInterval]]]] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="collector.scheduler.interval must be greater than 0. Recommended value is 500-1000. Current value is "), operandr=MemberReference(member=defaultInterval, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] assign[THIS[member[None.defaultInterval]], member[.defaultInterval]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setDefaultInterval] operator[SEP] Keyword[long] identifier[defaultInterval] operator[SEP] { Keyword[if] operator[SEP] identifier[defaultInterval] operator[<=] Other[0] operator[SEP] { identifier[LOG] operator[SEP] identifier[severe] operator[SEP] literal[String] operator[+] identifier[defaultInterval] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[defaultInterval] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[defaultInterval] operator[=] identifier[defaultInterval] operator[SEP] }
public <H extends EventHandler> HandlerRegistration registerDomHandler(final H handler, DomEvent.Type<H> type) { return addDomHandler(handler, type); }
class class_name[name] begin[{] method[registerDomHandler, return_type[type[HandlerRegistration]], modifier[public], parameter[handler, type]] begin[{] return[call[.addDomHandler, parameter[member[.handler], member[.type]]]] end[}] END[}]
Keyword[public] operator[<] identifier[H] Keyword[extends] identifier[EventHandler] operator[>] identifier[HandlerRegistration] identifier[registerDomHandler] operator[SEP] Keyword[final] identifier[H] identifier[handler] , identifier[DomEvent] operator[SEP] identifier[Type] operator[<] identifier[H] operator[>] identifier[type] operator[SEP] { Keyword[return] identifier[addDomHandler] operator[SEP] identifier[handler] , identifier[type] operator[SEP] operator[SEP] }
protected Schema getFieldSchema(GenericRecord record, String schemaIdLocation) throws Exception { Optional<Object> schemaIdValue = AvroUtils.getFieldValue(record, schemaIdLocation); if (!schemaIdValue.isPresent()) { throw new Exception("Schema id with key " + schemaIdLocation + " not found in the record"); } String schemaKey = String.valueOf(schemaIdValue.get()); return (Schema) registry.getSchemaByKey(schemaKey); }
class class_name[name] begin[{] method[getFieldSchema, return_type[type[Schema]], modifier[protected], parameter[record, schemaIdLocation]] begin[{] local_variable[type[Optional], schemaIdValue] if[call[schemaIdValue.isPresent, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Schema id with key "), operandr=MemberReference(member=schemaIdLocation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" not found in the record"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Exception, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[String], schemaKey] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=schemaKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getSchemaByKey, postfix_operators=[], prefix_operators=[], qualifier=registry, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Schema, sub_type=None))] end[}] END[}]
Keyword[protected] identifier[Schema] identifier[getFieldSchema] operator[SEP] identifier[GenericRecord] identifier[record] , identifier[String] identifier[schemaIdLocation] operator[SEP] Keyword[throws] identifier[Exception] { identifier[Optional] operator[<] identifier[Object] operator[>] identifier[schemaIdValue] operator[=] identifier[AvroUtils] operator[SEP] identifier[getFieldValue] operator[SEP] identifier[record] , identifier[schemaIdLocation] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[schemaIdValue] operator[SEP] identifier[isPresent] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[Exception] operator[SEP] literal[String] operator[+] identifier[schemaIdLocation] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[String] identifier[schemaKey] operator[=] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[schemaIdValue] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[Schema] operator[SEP] identifier[registry] operator[SEP] identifier[getSchemaByKey] operator[SEP] identifier[schemaKey] operator[SEP] operator[SEP] }
@Override public void doAction(char cha) throws SimplePolymerSectionException { /* an additional annotation is starting */ if (cha == '\"') { LOG.info("Annotation for simple polymer is starting:"); _parser.setState(new InlineAnnotationsParser(_parser, 1)); } /* a new unit is starting */ else if (cha == '|') { LOG.info("One simple polymer is finished:"); LOG.info("New simple polymer is starting:"); _parser.setState(new SimplePolymersParser(_parser)); } /* a new section is starting */ else if (cha == '$') { LOG.info("One simple polymer is finished:"); LOG.info("Simple polymer section is finished:"); LOG.info("Transition to connection section:"); _parser.setState(new ConnectionsParser(_parser)); } else { LOG.error("Invalid syntax in simple polymer section: " + cha); throw new SimplePolymerSectionException("Invalid syntax in simple polymer section: " + cha); } }
class class_name[name] begin[{] method[doAction, return_type[void], modifier[public], parameter[cha]] begin[{] if[binary_operation[member[.cha], ==, literal['\"']]] begin[{] call[LOG.info, parameter[literal["Annotation for simple polymer is starting:"]]] call[_parser.setState, parameter[ClassCreator(arguments=[MemberReference(member=_parser, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InlineAnnotationsParser, sub_type=None))]] else begin[{] if[binary_operation[member[.cha], ==, literal['|']]] begin[{] call[LOG.info, parameter[literal["One simple polymer is finished:"]]] call[LOG.info, parameter[literal["New simple polymer is starting:"]]] call[_parser.setState, parameter[ClassCreator(arguments=[MemberReference(member=_parser, 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=SimplePolymersParser, sub_type=None))]] else begin[{] if[binary_operation[member[.cha], ==, literal['$']]] begin[{] call[LOG.info, parameter[literal["One simple polymer is finished:"]]] call[LOG.info, parameter[literal["Simple polymer section is finished:"]]] call[LOG.info, parameter[literal["Transition to connection section:"]]] call[_parser.setState, parameter[ClassCreator(arguments=[MemberReference(member=_parser, 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=ConnectionsParser, sub_type=None))]] else begin[{] call[LOG.error, parameter[binary_operation[literal["Invalid syntax in simple polymer section: "], +, member[.cha]]]] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid syntax in simple polymer section: "), operandr=MemberReference(member=cha, 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=SimplePolymerSectionException, sub_type=None)), label=None) end[}] end[}] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[doAction] operator[SEP] Keyword[char] identifier[cha] operator[SEP] Keyword[throws] identifier[SimplePolymerSectionException] { Keyword[if] operator[SEP] identifier[cha] operator[==] literal[String] operator[SEP] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[_parser] operator[SEP] identifier[setState] operator[SEP] Keyword[new] identifier[InlineAnnotationsParser] operator[SEP] identifier[_parser] , Other[1] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[cha] operator[==] literal[String] operator[SEP] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[_parser] operator[SEP] identifier[setState] operator[SEP] Keyword[new] identifier[SimplePolymersParser] operator[SEP] identifier[_parser] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[cha] operator[==] literal[String] operator[SEP] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[_parser] operator[SEP] identifier[setState] operator[SEP] Keyword[new] identifier[ConnectionsParser] operator[SEP] identifier[_parser] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[cha] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[SimplePolymerSectionException] operator[SEP] literal[String] operator[+] identifier[cha] operator[SEP] operator[SEP] } }
private void injectTagsToEvent(GobblinTrackingEvent event) { Map<String, String> originalMetadata = event.getMetadata(); Map<String, Object> tags = getTagMap(); Map<String, String> newMetadata = Maps.newHashMap(); for(Map.Entry<String, Object> entry : tags.entrySet()) { newMetadata.put(entry.getKey(), entry.getValue().toString()); } newMetadata.putAll(originalMetadata); event.setMetadata(newMetadata); }
class class_name[name] begin[{] method[injectTagsToEvent, return_type[void], modifier[private], parameter[event]] begin[{] local_variable[type[Map], originalMetadata] local_variable[type[Map], tags] local_variable[type[Map], newMetadata] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=newMetadata, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=tags, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None) call[newMetadata.putAll, parameter[member[.originalMetadata]]] call[event.setMetadata, parameter[member[.newMetadata]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[injectTagsToEvent] operator[SEP] identifier[GobblinTrackingEvent] identifier[event] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[originalMetadata] operator[=] identifier[event] operator[SEP] identifier[getMetadata] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[tags] operator[=] identifier[getTagMap] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[newMetadata] operator[=] identifier[Maps] operator[SEP] identifier[newHashMap] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[Object] operator[>] identifier[entry] operator[:] identifier[tags] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[newMetadata] operator[SEP] identifier[put] operator[SEP] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] , identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[newMetadata] operator[SEP] identifier[putAll] operator[SEP] identifier[originalMetadata] operator[SEP] operator[SEP] identifier[event] operator[SEP] identifier[setMetadata] operator[SEP] identifier[newMetadata] operator[SEP] operator[SEP] }
public Filter<S> mergeRemainderFilter(FilteringScore<S> other) { Filter<S> thisRemainderFilter = getRemainderFilter(); if (this == other) { return thisRemainderFilter; } Filter<S> otherRemainderFilter = other.getRemainderFilter(); if (thisRemainderFilter == null) { return otherRemainderFilter; } else if (otherRemainderFilter == null) { return thisRemainderFilter; } else if (thisRemainderFilter.equals(otherRemainderFilter)) { return thisRemainderFilter; } else { return thisRemainderFilter.or(otherRemainderFilter); } }
class class_name[name] begin[{] method[mergeRemainderFilter, return_type[type[Filter]], modifier[public], parameter[other]] begin[{] local_variable[type[Filter], thisRemainderFilter] if[binary_operation[THIS[], ==, member[.other]]] begin[{] return[member[.thisRemainderFilter]] else begin[{] None end[}] local_variable[type[Filter], otherRemainderFilter] if[binary_operation[member[.thisRemainderFilter], ==, literal[null]]] begin[{] return[member[.otherRemainderFilter]] else begin[{] if[binary_operation[member[.otherRemainderFilter], ==, literal[null]]] begin[{] return[member[.thisRemainderFilter]] else begin[{] if[call[thisRemainderFilter.equals, parameter[member[.otherRemainderFilter]]]] begin[{] return[member[.thisRemainderFilter]] else begin[{] return[call[thisRemainderFilter.or, parameter[member[.otherRemainderFilter]]]] end[}] end[}] end[}] end[}] END[}]
Keyword[public] identifier[Filter] operator[<] identifier[S] operator[>] identifier[mergeRemainderFilter] operator[SEP] identifier[FilteringScore] operator[<] identifier[S] operator[>] identifier[other] operator[SEP] { identifier[Filter] operator[<] identifier[S] operator[>] identifier[thisRemainderFilter] operator[=] identifier[getRemainderFilter] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[==] identifier[other] operator[SEP] { Keyword[return] identifier[thisRemainderFilter] operator[SEP] } identifier[Filter] operator[<] identifier[S] operator[>] identifier[otherRemainderFilter] operator[=] identifier[other] operator[SEP] identifier[getRemainderFilter] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[thisRemainderFilter] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[otherRemainderFilter] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[otherRemainderFilter] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[thisRemainderFilter] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[thisRemainderFilter] operator[SEP] identifier[equals] operator[SEP] identifier[otherRemainderFilter] operator[SEP] operator[SEP] { Keyword[return] identifier[thisRemainderFilter] operator[SEP] } Keyword[else] { Keyword[return] identifier[thisRemainderFilter] operator[SEP] identifier[or] operator[SEP] identifier[otherRemainderFilter] operator[SEP] operator[SEP] } }
@Override public void setState(PowerState state) { switch(state) { case OFF: { if(!isOff()) { // apply the new pin state pin.setState(offState); } break; } case ON: { if(!isOn()) { // apply the new pin state pin.setState(onState); } break; } default: { throw new UnsupportedOperationException("Cannot set power state: " + state.toString()); } } }
class class_name[name] begin[{] method[setState, return_type[void], modifier[public], parameter[state]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['OFF'], statements=[BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isOff, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=offState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setState, postfix_operators=[], prefix_operators=[], qualifier=pin, selectors=[], type_arguments=None), label=None)])), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=['ON'], statements=[BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isOn, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=onState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setState, postfix_operators=[], prefix_operators=[], qualifier=pin, selectors=[], type_arguments=None), label=None)])), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=[], statements=[BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot set power state: "), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UnsupportedOperationException, sub_type=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[PowerState] identifier[state] operator[SEP] { Keyword[switch] operator[SEP] identifier[state] operator[SEP] { Keyword[case] identifier[OFF] operator[:] { Keyword[if] operator[SEP] operator[!] identifier[isOff] operator[SEP] operator[SEP] operator[SEP] { identifier[pin] operator[SEP] identifier[setState] operator[SEP] identifier[offState] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] } Keyword[case] identifier[ON] operator[:] { Keyword[if] operator[SEP] operator[!] identifier[isOn] operator[SEP] operator[SEP] operator[SEP] { identifier[pin] operator[SEP] identifier[setState] operator[SEP] identifier[onState] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] } Keyword[default] operator[:] { Keyword[throw] Keyword[new] identifier[UnsupportedOperationException] operator[SEP] literal[String] operator[+] identifier[state] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } }
public MutableDouble mapOutput(final DoubleUnaryOperator fn) { final MutableDouble host = this; return new MutableDouble() { @Override public double getAsDouble() { return fn.applyAsDouble(host.getAsDouble()); } }; }
class class_name[name] begin[{] method[mapOutput, return_type[type[MutableDouble]], modifier[public], parameter[fn]] begin[{] local_variable[type[MutableDouble], host] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAsDouble, postfix_operators=[], prefix_operators=[], qualifier=host, selectors=[], type_arguments=None)], member=applyAsDouble, postfix_operators=[], prefix_operators=[], qualifier=fn, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=getAsDouble, parameters=[], return_type=BasicType(dimensions=[], name=double), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MutableDouble, sub_type=None))] end[}] END[}]
Keyword[public] identifier[MutableDouble] identifier[mapOutput] operator[SEP] Keyword[final] identifier[DoubleUnaryOperator] identifier[fn] operator[SEP] { Keyword[final] identifier[MutableDouble] identifier[host] operator[=] Keyword[this] operator[SEP] Keyword[return] Keyword[new] identifier[MutableDouble] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[double] identifier[getAsDouble] operator[SEP] operator[SEP] { Keyword[return] identifier[fn] operator[SEP] identifier[applyAsDouble] operator[SEP] identifier[host] operator[SEP] identifier[getAsDouble] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] }
public boolean classMatch(String targetClass, String templateClass) { //x if (targetClass.startsWith(Constants.ROOT_PACKAGE)) // Always //x targetClass = targetClass.substring(Constants.ROOT_PACKAGE.length() - 1); //x if (templateClass.startsWith(Constants.ROOT_PACKAGE)) // Never //x templateClass = templateClass.substring(Constants.ROOT_PACKAGE.length() - 1); //x if (targetClass.startsWith(Constants.THIN_SUBPACKAGE)) //x if (!templateClass.startsWith(THIN_CLASS)) //x targetClass = targetClass.substring(THIN_CLASS.length()); // Include thin classes if (targetClass.startsWith(BASE_CLASS)) return true; // Allow access to all base classes if (templateClass.endsWith("*")) { if (templateClass.startsWith("*")) return targetClass.indexOf(templateClass.substring(1, templateClass.length() - 1)) != -1; return targetClass.startsWith(templateClass.substring(0, templateClass.length() - 1)); } else { // Exact match return templateClass.equalsIgnoreCase(targetClass); } }
class class_name[name] begin[{] method[classMatch, return_type[type[boolean]], modifier[public], parameter[targetClass, templateClass]] begin[{] if[call[targetClass.startsWith, parameter[member[.BASE_CLASS]]]] begin[{] return[literal[true]] else begin[{] None end[}] if[call[templateClass.endsWith, parameter[literal["*"]]]] begin[{] if[call[templateClass.startsWith, parameter[literal["*"]]]] begin[{] return[binary_operation[call[targetClass.indexOf, parameter[call[templateClass.substring, parameter[literal[1], binary_operation[call[templateClass.length, parameter[]], -, literal[1]]]]]], !=, literal[1]]] else begin[{] None end[}] return[call[targetClass.startsWith, parameter[call[templateClass.substring, parameter[literal[0], binary_operation[call[templateClass.length, parameter[]], -, literal[1]]]]]]] else begin[{] return[call[templateClass.equalsIgnoreCase, parameter[member[.targetClass]]]] end[}] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[classMatch] operator[SEP] identifier[String] identifier[targetClass] , identifier[String] identifier[templateClass] operator[SEP] { Keyword[if] operator[SEP] identifier[targetClass] operator[SEP] identifier[startsWith] operator[SEP] identifier[BASE_CLASS] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[templateClass] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[templateClass] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[targetClass] operator[SEP] identifier[indexOf] operator[SEP] identifier[templateClass] operator[SEP] identifier[substring] operator[SEP] Other[1] , identifier[templateClass] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] operator[!=] operator[-] Other[1] operator[SEP] Keyword[return] identifier[targetClass] operator[SEP] identifier[startsWith] operator[SEP] identifier[templateClass] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[templateClass] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[templateClass] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[targetClass] operator[SEP] operator[SEP] } }
@Override public boolean eIsSet(int featureID) { switch (featureID) { case AfplibPackage.ECA__CAT_NAME: return CAT_NAME_EDEFAULT == null ? catName != null : !CAT_NAME_EDEFAULT.equals(catName); case AfplibPackage.ECA__TRIPLETS: return triplets != null && !triplets.isEmpty(); } return super.eIsSet(featureID); }
class class_name[name] begin[{] method[eIsSet, return_type[type[boolean]], modifier[public], parameter[featureID]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=ECA__CAT_NAME, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[ReturnStatement(expression=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=CAT_NAME_EDEFAULT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[MemberReference(member=catName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=['!'], qualifier=CAT_NAME_EDEFAULT, selectors=[], type_arguments=None), if_true=BinaryOperation(operandl=MemberReference(member=catName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=)), label=None)]), SwitchStatementCase(case=[MemberReference(member=ECA__TRIPLETS, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=triplets, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=triplets, selectors=[], type_arguments=None), operator=&&), label=None)])], expression=MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) return[SuperMethodInvocation(arguments=[MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=eIsSet, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[eIsSet] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] { Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] { Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[ECA__CAT_NAME] operator[:] Keyword[return] identifier[CAT_NAME_EDEFAULT] operator[==] Other[null] operator[?] identifier[catName] operator[!=] Other[null] operator[:] operator[!] identifier[CAT_NAME_EDEFAULT] operator[SEP] identifier[equals] operator[SEP] identifier[catName] operator[SEP] operator[SEP] Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[ECA__TRIPLETS] operator[:] Keyword[return] identifier[triplets] operator[!=] Other[null] operator[&&] operator[!] identifier[triplets] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[super] operator[SEP] identifier[eIsSet] operator[SEP] identifier[featureID] operator[SEP] operator[SEP] }
public static GsonBuilder registerLocalDate(GsonBuilder builder) { if (builder == null) { throw new NullPointerException("builder cannot be null"); } builder.registerTypeAdapter(LOCAL_DATE_TYPE, new LocalDateConverter()); return builder; }
class class_name[name] begin[{] method[registerLocalDate, return_type[type[GsonBuilder]], modifier[public static], parameter[builder]] begin[{] if[binary_operation[member[.builder], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="builder cannot be null")], 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[}] call[builder.registerTypeAdapter, parameter[member[.LOCAL_DATE_TYPE], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LocalDateConverter, sub_type=None))]] return[member[.builder]] end[}] END[}]
Keyword[public] Keyword[static] identifier[GsonBuilder] identifier[registerLocalDate] operator[SEP] identifier[GsonBuilder] identifier[builder] operator[SEP] { Keyword[if] operator[SEP] identifier[builder] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[builder] operator[SEP] identifier[registerTypeAdapter] operator[SEP] identifier[LOCAL_DATE_TYPE] , Keyword[new] identifier[LocalDateConverter] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[builder] operator[SEP] }
@Override public void deleteStepThreadInstanceOfRelatedPartitions(TopLevelStepInstanceKey stepInstanceKey) { long compareInstanceId = stepInstanceKey.getJobInstance(); for (StepThreadInstanceEntity stepThreadInstance : data.stepThreadInstanceData.values()) { if ((stepThreadInstance.getJobInstance().getInstanceId() == compareInstanceId) && (stepThreadInstance.getStepName().equals(stepInstanceKey.getStepName())) && (!(stepThreadInstance instanceof TopLevelStepInstanceEntity))) { StepThreadInstanceKey removalKey = new StepThreadInstanceKey(stepThreadInstance); data.stepThreadInstanceData.remove(removalKey); } } }
class class_name[name] begin[{] method[deleteStepThreadInstanceOfRelatedPartitions, return_type[void], modifier[public], parameter[stepInstanceKey]] begin[{] local_variable[type[long], compareInstanceId] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getJobInstance, postfix_operators=[], prefix_operators=[], qualifier=stepThreadInstance, selectors=[MethodInvocation(arguments=[], member=getInstanceId, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MemberReference(member=compareInstanceId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=MethodInvocation(arguments=[], member=getStepName, postfix_operators=[], prefix_operators=[], qualifier=stepThreadInstance, selectors=[], type_arguments=None), operator=&&), operandr=BinaryOperation(operandl=MemberReference(member=stepThreadInstance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=TopLevelStepInstanceEntity, sub_type=None), operator=instanceof), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=stepThreadInstance, 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=StepThreadInstanceKey, sub_type=None)), name=removalKey)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StepThreadInstanceKey, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=removalKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=data.stepThreadInstanceData, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=data.stepThreadInstanceData, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=stepThreadInstance)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StepThreadInstanceEntity, sub_type=None))), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[deleteStepThreadInstanceOfRelatedPartitions] operator[SEP] identifier[TopLevelStepInstanceKey] identifier[stepInstanceKey] operator[SEP] { Keyword[long] identifier[compareInstanceId] operator[=] identifier[stepInstanceKey] operator[SEP] identifier[getJobInstance] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[StepThreadInstanceEntity] identifier[stepThreadInstance] operator[:] identifier[data] operator[SEP] identifier[stepThreadInstanceData] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[stepThreadInstance] operator[SEP] identifier[getJobInstance] operator[SEP] operator[SEP] operator[SEP] identifier[getInstanceId] operator[SEP] operator[SEP] operator[==] identifier[compareInstanceId] operator[SEP] operator[&&] operator[SEP] identifier[stepThreadInstance] operator[SEP] identifier[getStepName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[stepInstanceKey] operator[SEP] identifier[getStepName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[&&] operator[SEP] operator[!] operator[SEP] identifier[stepThreadInstance] Keyword[instanceof] identifier[TopLevelStepInstanceEntity] operator[SEP] operator[SEP] operator[SEP] { identifier[StepThreadInstanceKey] identifier[removalKey] operator[=] Keyword[new] identifier[StepThreadInstanceKey] operator[SEP] identifier[stepThreadInstance] operator[SEP] operator[SEP] identifier[data] operator[SEP] identifier[stepThreadInstanceData] operator[SEP] identifier[remove] operator[SEP] identifier[removalKey] operator[SEP] operator[SEP] } } }
public double percentile(String eventCollection, String targetProperty, Double percentile, Timeframe timeframe) throws IOException { Query queryParams = new Query.Builder(QueryType.PERCENTILE) .withEventCollection(eventCollection) .withTargetProperty(targetProperty) .withPercentile(percentile) .withTimeframe(timeframe) .build(); QueryResult result = execute(queryParams); return queryResultToDouble(result); }
class class_name[name] begin[{] method[percentile, return_type[type[double]], modifier[public], parameter[eventCollection, targetProperty, percentile, timeframe]] begin[{] local_variable[type[Query], queryParams] local_variable[type[QueryResult], result] return[call[.queryResultToDouble, parameter[member[.result]]]] end[}] END[}]
Keyword[public] Keyword[double] identifier[percentile] operator[SEP] identifier[String] identifier[eventCollection] , identifier[String] identifier[targetProperty] , identifier[Double] identifier[percentile] , identifier[Timeframe] identifier[timeframe] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Query] identifier[queryParams] operator[=] Keyword[new] identifier[Query] operator[SEP] identifier[Builder] operator[SEP] identifier[QueryType] operator[SEP] identifier[PERCENTILE] operator[SEP] operator[SEP] identifier[withEventCollection] operator[SEP] identifier[eventCollection] operator[SEP] operator[SEP] identifier[withTargetProperty] operator[SEP] identifier[targetProperty] operator[SEP] operator[SEP] identifier[withPercentile] operator[SEP] identifier[percentile] operator[SEP] operator[SEP] identifier[withTimeframe] operator[SEP] identifier[timeframe] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[QueryResult] identifier[result] operator[=] identifier[execute] operator[SEP] identifier[queryParams] operator[SEP] operator[SEP] Keyword[return] identifier[queryResultToDouble] operator[SEP] identifier[result] operator[SEP] operator[SEP] }
private void amk(final EncodingResult result, final Variable[] vars, int rhs) { if (rhs < 0) throw new IllegalArgumentException("Invalid right hand side of cardinality constraint: " + rhs); if (rhs >= vars.length) // there is no constraint return; if (rhs == 0) { // no variable can be true for (final Variable var : vars) result.addClause(var.negate()); return; } switch (this.config().amkEncoder) { case TOTALIZER: if (this.amkTotalizer == null) this.amkTotalizer = new CCAMKTotalizer(); this.amkTotalizer.build(result, vars, rhs); break; case MODULAR_TOTALIZER: if (this.amkModularTotalizer == null) this.amkModularTotalizer = new CCAMKModularTotalizer(this.f); this.amkModularTotalizer.build(result, vars, rhs); break; case CARDINALITY_NETWORK: if (this.amkCardinalityNetwork == null) this.amkCardinalityNetwork = new CCAMKCardinalityNetwork(); this.amkCardinalityNetwork.build(result, vars, rhs); break; case BEST: this.bestAMK(vars.length).build(result, vars, rhs); break; default: throw new IllegalStateException("Unknown at-most-k encoder: " + this.config().amkEncoder); } }
class class_name[name] begin[{] method[amk, return_type[void], modifier[private], parameter[result, vars, rhs]] begin[{] if[binary_operation[member[.rhs], <, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid right hand side of cardinality constraint: "), operandr=MemberReference(member=rhs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.rhs], >=, member[vars.length]]] begin[{] return[None] else begin[{] None end[}] if[binary_operation[member[.rhs], ==, literal[0]]] begin[{] ForStatement(body=StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=negate, postfix_operators=[], prefix_operators=[], qualifier=var, selectors=[], type_arguments=None)], member=addClause, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None), control=EnhancedForControl(iterable=MemberReference(member=vars, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=var)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Variable, sub_type=None))), label=None) return[None] else begin[{] None end[}] SwitchStatement(cases=[SwitchStatementCase(case=['TOTALIZER'], statements=[IfStatement(condition=BinaryOperation(operandl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=amkTotalizer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=amkTotalizer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CCAMKTotalizer, sub_type=None))), label=None)), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=amkTotalizer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=vars, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rhs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['MODULAR_TOTALIZER'], statements=[IfStatement(condition=BinaryOperation(operandl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=amkModularTotalizer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=amkModularTotalizer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=f, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CCAMKModularTotalizer, sub_type=None))), label=None)), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=amkModularTotalizer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=vars, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rhs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['CARDINALITY_NETWORK'], statements=[IfStatement(condition=BinaryOperation(operandl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=amkCardinalityNetwork, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=amkCardinalityNetwork, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CCAMKCardinalityNetwork, sub_type=None))), label=None)), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=amkCardinalityNetwork, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=vars, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rhs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['BEST'], statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=vars, selectors=[])], member=bestAMK, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=vars, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rhs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unknown at-most-k encoder: "), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=config, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MemberReference(member=amkEncoder, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None)])], expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=config, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MemberReference(member=amkEncoder, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[amk] operator[SEP] Keyword[final] identifier[EncodingResult] identifier[result] , Keyword[final] identifier[Variable] operator[SEP] operator[SEP] identifier[vars] , Keyword[int] identifier[rhs] operator[SEP] { Keyword[if] operator[SEP] identifier[rhs] operator[<] Other[0] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[rhs] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[rhs] operator[>=] identifier[vars] operator[SEP] identifier[length] operator[SEP] Keyword[return] operator[SEP] Keyword[if] operator[SEP] identifier[rhs] operator[==] Other[0] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] identifier[Variable] identifier[var] operator[:] identifier[vars] operator[SEP] identifier[result] operator[SEP] identifier[addClause] operator[SEP] identifier[var] operator[SEP] identifier[negate] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[switch] operator[SEP] Keyword[this] operator[SEP] identifier[config] operator[SEP] operator[SEP] operator[SEP] identifier[amkEncoder] operator[SEP] { Keyword[case] identifier[TOTALIZER] operator[:] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[amkTotalizer] operator[==] Other[null] operator[SEP] Keyword[this] operator[SEP] identifier[amkTotalizer] operator[=] Keyword[new] identifier[CCAMKTotalizer] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[amkTotalizer] operator[SEP] identifier[build] operator[SEP] identifier[result] , identifier[vars] , identifier[rhs] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[MODULAR_TOTALIZER] operator[:] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[amkModularTotalizer] operator[==] Other[null] operator[SEP] Keyword[this] operator[SEP] identifier[amkModularTotalizer] operator[=] Keyword[new] identifier[CCAMKModularTotalizer] operator[SEP] Keyword[this] operator[SEP] identifier[f] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[amkModularTotalizer] operator[SEP] identifier[build] operator[SEP] identifier[result] , identifier[vars] , identifier[rhs] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[CARDINALITY_NETWORK] operator[:] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[amkCardinalityNetwork] operator[==] Other[null] operator[SEP] Keyword[this] operator[SEP] identifier[amkCardinalityNetwork] operator[=] Keyword[new] identifier[CCAMKCardinalityNetwork] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[amkCardinalityNetwork] operator[SEP] identifier[build] operator[SEP] identifier[result] , identifier[vars] , identifier[rhs] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[BEST] operator[:] Keyword[this] operator[SEP] identifier[bestAMK] operator[SEP] identifier[vars] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[build] operator[SEP] identifier[result] , identifier[vars] , identifier[rhs] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] Keyword[this] operator[SEP] identifier[config] operator[SEP] operator[SEP] operator[SEP] identifier[amkEncoder] operator[SEP] operator[SEP] } }
private void parseVariableDeclaration() { Variable var = new Variable(); var.setName(tokenizer.consume().getContents()); tokenizer.consumeExpectedSymbol(":"); var.setValue(parseExpression(true)); if (tokenizer.current().isSymbol("!") && tokenizer.next().hasContent("default")) { var.setDefaultValue(true); tokenizer.consume(); tokenizer.consume(); } result.addVariable(var); tokenizer.consumeExpectedSymbol(";"); }
class class_name[name] begin[{] method[parseVariableDeclaration, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[Variable], var] call[var.setName, parameter[call[tokenizer.consume, parameter[]]]] call[tokenizer.consumeExpectedSymbol, parameter[literal[":"]]] call[var.setValue, parameter[call[.parseExpression, parameter[literal[true]]]]] if[binary_operation[call[tokenizer.current, parameter[]], &&, call[tokenizer.next, parameter[]]]] begin[{] call[var.setDefaultValue, parameter[literal[true]]] call[tokenizer.consume, parameter[]] call[tokenizer.consume, parameter[]] else begin[{] None end[}] call[result.addVariable, parameter[member[.var]]] call[tokenizer.consumeExpectedSymbol, parameter[literal[";"]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[parseVariableDeclaration] operator[SEP] operator[SEP] { identifier[Variable] identifier[var] operator[=] Keyword[new] identifier[Variable] operator[SEP] operator[SEP] operator[SEP] identifier[var] operator[SEP] identifier[setName] operator[SEP] identifier[tokenizer] operator[SEP] identifier[consume] operator[SEP] operator[SEP] operator[SEP] identifier[getContents] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[tokenizer] operator[SEP] identifier[consumeExpectedSymbol] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[var] operator[SEP] identifier[setValue] operator[SEP] identifier[parseExpression] operator[SEP] literal[boolean] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tokenizer] operator[SEP] identifier[current] operator[SEP] operator[SEP] operator[SEP] identifier[isSymbol] operator[SEP] literal[String] operator[SEP] operator[&&] identifier[tokenizer] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[hasContent] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[var] operator[SEP] identifier[setDefaultValue] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[tokenizer] operator[SEP] identifier[consume] operator[SEP] operator[SEP] operator[SEP] identifier[tokenizer] operator[SEP] identifier[consume] operator[SEP] operator[SEP] operator[SEP] } identifier[result] operator[SEP] identifier[addVariable] operator[SEP] identifier[var] operator[SEP] operator[SEP] identifier[tokenizer] operator[SEP] identifier[consumeExpectedSymbol] operator[SEP] literal[String] operator[SEP] operator[SEP] }
protected void updateCreatedConnections(int increment) { try { this.statsLock.writeLock().lock(); this.createdConnections += increment; } finally { this.statsLock.writeLock().unlock(); } }
class class_name[name] begin[{] method[updateCreatedConnections, return_type[void], modifier[protected], parameter[increment]] begin[{] TryStatement(block=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=statsLock, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=writeLock, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=lock, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=createdConnections, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type=+=, value=MemberReference(member=increment, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)], catches=None, finally_block=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=statsLock, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=writeLock, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=unlock, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)], label=None, resources=None) end[}] END[}]
Keyword[protected] Keyword[void] identifier[updateCreatedConnections] operator[SEP] Keyword[int] identifier[increment] operator[SEP] { Keyword[try] { Keyword[this] operator[SEP] identifier[statsLock] operator[SEP] identifier[writeLock] operator[SEP] operator[SEP] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[createdConnections] operator[+=] identifier[increment] operator[SEP] } Keyword[finally] { Keyword[this] operator[SEP] identifier[statsLock] operator[SEP] identifier[writeLock] operator[SEP] operator[SEP] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP] } }
public static void storeProperties(Map pProperties, OutputStream pOutput, String pHeader) throws IOException { // Create new properties Properties props = new Properties(); // Copy all elements from the pProperties (shallow) Iterator iterator = pProperties.entrySet().iterator(); while (iterator.hasNext()) { Map.Entry entry = (Map.Entry) iterator.next(); props.setProperty((String) entry.getKey(), StringUtil.valueOf(entry.getValue())); } // Store normal properties props.store(pOutput, pHeader); }
class class_name[name] begin[{] method[storeProperties, return_type[void], modifier[public static], parameter[pProperties, pOutput, pHeader]] begin[{] local_variable[type[Properties], props] local_variable[type[Iterator], iterator] while[call[iterator.hasNext, parameter[]]] begin[{] local_variable[type[Map], entry] call[props.setProperty, parameter[Cast(expression=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), call[StringUtil.valueOf, parameter[call[entry.getValue, parameter[]]]]]] end[}] call[props.store, parameter[member[.pOutput], member[.pHeader]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[storeProperties] operator[SEP] identifier[Map] identifier[pProperties] , identifier[OutputStream] identifier[pOutput] , identifier[String] identifier[pHeader] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Properties] identifier[props] operator[=] Keyword[new] identifier[Properties] operator[SEP] operator[SEP] operator[SEP] identifier[Iterator] identifier[iterator] operator[=] identifier[pProperties] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[iterator] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[Map] operator[SEP] identifier[Entry] identifier[entry] operator[=] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[SEP] identifier[iterator] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[props] operator[SEP] identifier[setProperty] operator[SEP] operator[SEP] identifier[String] operator[SEP] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] , identifier[StringUtil] operator[SEP] identifier[valueOf] operator[SEP] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[props] operator[SEP] identifier[store] operator[SEP] identifier[pOutput] , identifier[pHeader] operator[SEP] operator[SEP] }
protected long checkRegions(long offset, int length) throws IOException { if (offset + length > filledUpTo) throw new IOException("Can't access memory outside the file size (" + filledUpTo + " bytes). You've requested portion " + offset + "-" + (offset + length) + " bytes. File: " + osFile.getAbsolutePath() + "\n" + "actual Filesize: " + size + "\n" + "actual filledUpTo: " + filledUpTo); return offset; }
class class_name[name] begin[{] method[checkRegions, return_type[type[long]], modifier[protected], parameter[offset, length]] begin[{] if[binary_operation[binary_operation[member[.offset], +, member[.length]], >, member[.filledUpTo]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=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="Can't access memory outside the file size ("), operandr=MemberReference(member=filledUpTo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" bytes). You've requested portion "), operator=+), operandr=MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="-"), operator=+), operandr=BinaryOperation(operandl=MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" bytes. File: "), operator=+), operandr=MethodInvocation(arguments=[], member=getAbsolutePath, postfix_operators=[], prefix_operators=[], qualifier=osFile, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n"), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="actual Filesize: "), operator=+), operandr=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n"), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="actual filledUpTo: "), operator=+), operandr=MemberReference(member=filledUpTo, 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[}] return[member[.offset]] end[}] END[}]
Keyword[protected] Keyword[long] identifier[checkRegions] operator[SEP] Keyword[long] identifier[offset] , Keyword[int] identifier[length] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[offset] operator[+] identifier[length] operator[>] identifier[filledUpTo] operator[SEP] Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[filledUpTo] operator[+] literal[String] operator[+] identifier[offset] operator[+] literal[String] operator[+] operator[SEP] identifier[offset] operator[+] identifier[length] operator[SEP] operator[+] literal[String] operator[+] identifier[osFile] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[size] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[filledUpTo] operator[SEP] operator[SEP] Keyword[return] identifier[offset] operator[SEP] }
public static boolean isCausedBy(Exception ex, Class<? extends Exception>... causeExceptionClasses) { Throwable cause = ex.getCause(); while (cause != null) { for (Class<? extends Exception> causeClass : causeExceptionClasses) { if (causeClass.isInstance(cause)) { return true; } } cause = cause.getCause(); } return false; }
class class_name[name] begin[{] method[isCausedBy, return_type[type[boolean]], modifier[public static], parameter[ex, causeExceptionClasses]] begin[{] local_variable[type[Throwable], cause] while[binary_operation[member[.cause], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=cause, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isInstance, postfix_operators=[], prefix_operators=[], qualifier=causeClass, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=causeExceptionClasses, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=causeClass)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=extends, type=ReferenceType(arguments=None, dimensions=[], name=Exception, sub_type=None))], dimensions=[], name=Class, sub_type=None))), label=None) assign[member[.cause], call[cause.getCause, parameter[]]] end[}] return[literal[false]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isCausedBy] operator[SEP] identifier[Exception] identifier[ex] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Exception] operator[>] operator[...] identifier[causeExceptionClasses] operator[SEP] { identifier[Throwable] identifier[cause] operator[=] identifier[ex] operator[SEP] identifier[getCause] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[cause] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Exception] operator[>] identifier[causeClass] operator[:] identifier[causeExceptionClasses] operator[SEP] { Keyword[if] operator[SEP] identifier[causeClass] operator[SEP] identifier[isInstance] operator[SEP] identifier[cause] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } identifier[cause] operator[=] identifier[cause] operator[SEP] identifier[getCause] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public void marshall(H264Settings h264Settings, ProtocolMarshaller protocolMarshaller) { if (h264Settings == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(h264Settings.getAdaptiveQuantization(), ADAPTIVEQUANTIZATION_BINDING); protocolMarshaller.marshall(h264Settings.getAfdSignaling(), AFDSIGNALING_BINDING); protocolMarshaller.marshall(h264Settings.getBitrate(), BITRATE_BINDING); protocolMarshaller.marshall(h264Settings.getBufFillPct(), BUFFILLPCT_BINDING); protocolMarshaller.marshall(h264Settings.getBufSize(), BUFSIZE_BINDING); protocolMarshaller.marshall(h264Settings.getColorMetadata(), COLORMETADATA_BINDING); protocolMarshaller.marshall(h264Settings.getEntropyEncoding(), ENTROPYENCODING_BINDING); protocolMarshaller.marshall(h264Settings.getFixedAfd(), FIXEDAFD_BINDING); protocolMarshaller.marshall(h264Settings.getFlickerAq(), FLICKERAQ_BINDING); protocolMarshaller.marshall(h264Settings.getFramerateControl(), FRAMERATECONTROL_BINDING); protocolMarshaller.marshall(h264Settings.getFramerateDenominator(), FRAMERATEDENOMINATOR_BINDING); protocolMarshaller.marshall(h264Settings.getFramerateNumerator(), FRAMERATENUMERATOR_BINDING); protocolMarshaller.marshall(h264Settings.getGopBReference(), GOPBREFERENCE_BINDING); protocolMarshaller.marshall(h264Settings.getGopClosedCadence(), GOPCLOSEDCADENCE_BINDING); protocolMarshaller.marshall(h264Settings.getGopNumBFrames(), GOPNUMBFRAMES_BINDING); protocolMarshaller.marshall(h264Settings.getGopSize(), GOPSIZE_BINDING); protocolMarshaller.marshall(h264Settings.getGopSizeUnits(), GOPSIZEUNITS_BINDING); protocolMarshaller.marshall(h264Settings.getLevel(), LEVEL_BINDING); protocolMarshaller.marshall(h264Settings.getLookAheadRateControl(), LOOKAHEADRATECONTROL_BINDING); protocolMarshaller.marshall(h264Settings.getMaxBitrate(), MAXBITRATE_BINDING); protocolMarshaller.marshall(h264Settings.getMinIInterval(), MINIINTERVAL_BINDING); protocolMarshaller.marshall(h264Settings.getNumRefFrames(), NUMREFFRAMES_BINDING); protocolMarshaller.marshall(h264Settings.getParControl(), PARCONTROL_BINDING); protocolMarshaller.marshall(h264Settings.getParDenominator(), PARDENOMINATOR_BINDING); protocolMarshaller.marshall(h264Settings.getParNumerator(), PARNUMERATOR_BINDING); protocolMarshaller.marshall(h264Settings.getProfile(), PROFILE_BINDING); protocolMarshaller.marshall(h264Settings.getQvbrQualityLevel(), QVBRQUALITYLEVEL_BINDING); protocolMarshaller.marshall(h264Settings.getRateControlMode(), RATECONTROLMODE_BINDING); protocolMarshaller.marshall(h264Settings.getScanType(), SCANTYPE_BINDING); protocolMarshaller.marshall(h264Settings.getSceneChangeDetect(), SCENECHANGEDETECT_BINDING); protocolMarshaller.marshall(h264Settings.getSlices(), SLICES_BINDING); protocolMarshaller.marshall(h264Settings.getSoftness(), SOFTNESS_BINDING); protocolMarshaller.marshall(h264Settings.getSpatialAq(), SPATIALAQ_BINDING); protocolMarshaller.marshall(h264Settings.getSubgopLength(), SUBGOPLENGTH_BINDING); protocolMarshaller.marshall(h264Settings.getSyntax(), SYNTAX_BINDING); protocolMarshaller.marshall(h264Settings.getTemporalAq(), TEMPORALAQ_BINDING); protocolMarshaller.marshall(h264Settings.getTimecodeInsertion(), TIMECODEINSERTION_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[h264Settings, protocolMarshaller]] begin[{] if[binary_operation[member[.h264Settings], ==, 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=getAdaptiveQuantization, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=ADAPTIVEQUANTIZATION_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=getAfdSignaling, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=AFDSIGNALING_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=getBitrate, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=BITRATE_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=getBufFillPct, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=BUFFILLPCT_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=getBufSize, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=BUFSIZE_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=getColorMetadata, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=COLORMETADATA_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=getEntropyEncoding, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=ENTROPYENCODING_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=getFixedAfd, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=FIXEDAFD_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=getFlickerAq, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=FLICKERAQ_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=getFramerateControl, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=FRAMERATECONTROL_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=getFramerateDenominator, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=FRAMERATEDENOMINATOR_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=getFramerateNumerator, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=FRAMERATENUMERATOR_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=getGopBReference, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=GOPBREFERENCE_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=getGopClosedCadence, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=GOPCLOSEDCADENCE_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=getGopNumBFrames, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=GOPNUMBFRAMES_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=getGopSize, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=GOPSIZE_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=getGopSizeUnits, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=GOPSIZEUNITS_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=getLevel, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=LEVEL_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=getLookAheadRateControl, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=LOOKAHEADRATECONTROL_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=getMaxBitrate, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=MAXBITRATE_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=getMinIInterval, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=MINIINTERVAL_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=getNumRefFrames, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=NUMREFFRAMES_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=getParControl, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=PARCONTROL_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=getParDenominator, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=PARDENOMINATOR_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=getParNumerator, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=PARNUMERATOR_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=getProfile, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=PROFILE_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=getQvbrQualityLevel, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=QVBRQUALITYLEVEL_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=getRateControlMode, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=RATECONTROLMODE_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=getScanType, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=SCANTYPE_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=getSceneChangeDetect, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=SCENECHANGEDETECT_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=getSlices, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=SLICES_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=getSoftness, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=SOFTNESS_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=getSpatialAq, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=SPATIALAQ_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=getSubgopLength, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=SUBGOPLENGTH_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=getSyntax, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=SYNTAX_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=getTemporalAq, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=TEMPORALAQ_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=getTimecodeInsertion, postfix_operators=[], prefix_operators=[], qualifier=h264Settings, selectors=[], type_arguments=None), MemberReference(member=TIMECODEINSERTION_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[H264Settings] identifier[h264Settings] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[h264Settings] 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[h264Settings] operator[SEP] identifier[getAdaptiveQuantization] operator[SEP] operator[SEP] , identifier[ADAPTIVEQUANTIZATION_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getAfdSignaling] operator[SEP] operator[SEP] , identifier[AFDSIGNALING_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getBitrate] operator[SEP] operator[SEP] , identifier[BITRATE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getBufFillPct] operator[SEP] operator[SEP] , identifier[BUFFILLPCT_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getBufSize] operator[SEP] operator[SEP] , identifier[BUFSIZE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getColorMetadata] operator[SEP] operator[SEP] , identifier[COLORMETADATA_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getEntropyEncoding] operator[SEP] operator[SEP] , identifier[ENTROPYENCODING_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getFixedAfd] operator[SEP] operator[SEP] , identifier[FIXEDAFD_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getFlickerAq] operator[SEP] operator[SEP] , identifier[FLICKERAQ_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getFramerateControl] operator[SEP] operator[SEP] , identifier[FRAMERATECONTROL_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getFramerateDenominator] operator[SEP] operator[SEP] , identifier[FRAMERATEDENOMINATOR_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getFramerateNumerator] operator[SEP] operator[SEP] , identifier[FRAMERATENUMERATOR_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getGopBReference] operator[SEP] operator[SEP] , identifier[GOPBREFERENCE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getGopClosedCadence] operator[SEP] operator[SEP] , identifier[GOPCLOSEDCADENCE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getGopNumBFrames] operator[SEP] operator[SEP] , identifier[GOPNUMBFRAMES_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getGopSize] operator[SEP] operator[SEP] , identifier[GOPSIZE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getGopSizeUnits] operator[SEP] operator[SEP] , identifier[GOPSIZEUNITS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getLevel] operator[SEP] operator[SEP] , identifier[LEVEL_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getLookAheadRateControl] operator[SEP] operator[SEP] , identifier[LOOKAHEADRATECONTROL_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getMaxBitrate] operator[SEP] operator[SEP] , identifier[MAXBITRATE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getMinIInterval] operator[SEP] operator[SEP] , identifier[MINIINTERVAL_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getNumRefFrames] operator[SEP] operator[SEP] , identifier[NUMREFFRAMES_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getParControl] operator[SEP] operator[SEP] , identifier[PARCONTROL_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getParDenominator] operator[SEP] operator[SEP] , identifier[PARDENOMINATOR_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getParNumerator] operator[SEP] operator[SEP] , identifier[PARNUMERATOR_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getProfile] operator[SEP] operator[SEP] , identifier[PROFILE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getQvbrQualityLevel] operator[SEP] operator[SEP] , identifier[QVBRQUALITYLEVEL_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getRateControlMode] operator[SEP] operator[SEP] , identifier[RATECONTROLMODE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getScanType] operator[SEP] operator[SEP] , identifier[SCANTYPE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getSceneChangeDetect] operator[SEP] operator[SEP] , identifier[SCENECHANGEDETECT_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getSlices] operator[SEP] operator[SEP] , identifier[SLICES_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getSoftness] operator[SEP] operator[SEP] , identifier[SOFTNESS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getSpatialAq] operator[SEP] operator[SEP] , identifier[SPATIALAQ_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getSubgopLength] operator[SEP] operator[SEP] , identifier[SUBGOPLENGTH_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getSyntax] operator[SEP] operator[SEP] , identifier[SYNTAX_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getTemporalAq] operator[SEP] operator[SEP] , identifier[TEMPORALAQ_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[h264Settings] operator[SEP] identifier[getTimecodeInsertion] operator[SEP] operator[SEP] , identifier[TIMECODEINSERTION_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 SwitchBlock<T, R> Case(T ca, RFunc0<R> func) { return Case(ca, $(func)); }
class class_name[name] begin[{] method[Case, return_type[type[SwitchBlock]], modifier[public], parameter[ca, func]] begin[{] return[call[.Case, parameter[member[.ca], call[.$, parameter[member[.func]]]]]] end[}] END[}]
Keyword[public] identifier[SwitchBlock] operator[<] identifier[T] , identifier[R] operator[>] identifier[Case] operator[SEP] identifier[T] identifier[ca] , identifier[RFunc0] operator[<] identifier[R] operator[>] identifier[func] operator[SEP] { Keyword[return] identifier[Case] operator[SEP] identifier[ca] , identifier[$] operator[SEP] identifier[func] operator[SEP] operator[SEP] operator[SEP] }
public static void write(Node node, Writer writer, String charset, int indent) { transform(new DOMSource(node), new StreamResult(writer), charset, indent); }
class class_name[name] begin[{] method[write, return_type[void], modifier[public static], parameter[node, writer, charset, indent]] begin[{] call[.transform, parameter[ClassCreator(arguments=[MemberReference(member=node, 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=DOMSource, sub_type=None)), ClassCreator(arguments=[MemberReference(member=writer, 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=StreamResult, sub_type=None)), member[.charset], member[.indent]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[write] operator[SEP] identifier[Node] identifier[node] , identifier[Writer] identifier[writer] , identifier[String] identifier[charset] , Keyword[int] identifier[indent] operator[SEP] { identifier[transform] operator[SEP] Keyword[new] identifier[DOMSource] operator[SEP] identifier[node] operator[SEP] , Keyword[new] identifier[StreamResult] operator[SEP] identifier[writer] operator[SEP] , identifier[charset] , identifier[indent] operator[SEP] operator[SEP] }
public static <S> boolean includes( final PAreaSizeL<S> a, final PAreaSizeL<S> b) { Objects.requireNonNull(a, "Area A"); Objects.requireNonNull(b, "Area B"); return Long.compareUnsigned(b.sizeX(), a.sizeX()) <= 0 && Long.compareUnsigned(b.sizeY(), a.sizeY()) <= 0; }
class class_name[name] begin[{] method[includes, return_type[type[boolean]], modifier[public static], parameter[a, b]] begin[{] call[Objects.requireNonNull, parameter[member[.a], literal["Area A"]]] call[Objects.requireNonNull, parameter[member[.b], literal["Area B"]]] return[binary_operation[binary_operation[call[Long.compareUnsigned, parameter[call[b.sizeX, parameter[]], call[a.sizeX, parameter[]]]], <=, literal[0]], &&, binary_operation[call[Long.compareUnsigned, parameter[call[b.sizeY, parameter[]], call[a.sizeY, parameter[]]]], <=, literal[0]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[S] operator[>] Keyword[boolean] identifier[includes] operator[SEP] Keyword[final] identifier[PAreaSizeL] operator[<] identifier[S] operator[>] identifier[a] , Keyword[final] identifier[PAreaSizeL] operator[<] identifier[S] operator[>] identifier[b] operator[SEP] { identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[a] , literal[String] operator[SEP] operator[SEP] identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[b] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[Long] operator[SEP] identifier[compareUnsigned] operator[SEP] identifier[b] operator[SEP] identifier[sizeX] operator[SEP] operator[SEP] , identifier[a] operator[SEP] identifier[sizeX] operator[SEP] operator[SEP] operator[SEP] operator[<=] Other[0] operator[&&] identifier[Long] operator[SEP] identifier[compareUnsigned] operator[SEP] identifier[b] operator[SEP] identifier[sizeY] operator[SEP] operator[SEP] , identifier[a] operator[SEP] identifier[sizeY] operator[SEP] operator[SEP] operator[SEP] operator[<=] Other[0] operator[SEP] }
public synchronized CompletableFuture<Void> kill() { if (state == State.CLOSED) return CompletableFuture.completedFuture(null); if (closeFuture == null) { closeFuture = session.kill() .whenComplete((result, error) -> { setState(State.CLOSED); CompletableFuture.runAsync(() -> { ioContext.close(); eventContext.close(); transport.close(); }); }); } return closeFuture; }
class class_name[name] begin[{] method[kill, return_type[type[CompletableFuture]], modifier[synchronized public], parameter[]] begin[{] if[binary_operation[member[.state], ==, member[State.CLOSED]]] begin[{] return[call[CompletableFuture.completedFuture, parameter[literal[null]]]] else begin[{] None end[}] if[binary_operation[member[.closeFuture], ==, literal[null]]] begin[{] assign[member[.closeFuture], call[session.kill, parameter[]]] else begin[{] None end[}] return[member[.closeFuture]] end[}] END[}]
Keyword[public] Keyword[synchronized] identifier[CompletableFuture] operator[<] identifier[Void] operator[>] identifier[kill] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[state] operator[==] identifier[State] operator[SEP] identifier[CLOSED] operator[SEP] Keyword[return] identifier[CompletableFuture] operator[SEP] identifier[completedFuture] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[closeFuture] operator[==] Other[null] operator[SEP] { identifier[closeFuture] operator[=] identifier[session] operator[SEP] identifier[kill] operator[SEP] operator[SEP] operator[SEP] identifier[whenComplete] operator[SEP] operator[SEP] identifier[result] , identifier[error] operator[SEP] operator[->] { identifier[setState] operator[SEP] identifier[State] operator[SEP] identifier[CLOSED] operator[SEP] operator[SEP] identifier[CompletableFuture] operator[SEP] identifier[runAsync] operator[SEP] operator[SEP] operator[SEP] operator[->] { identifier[ioContext] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[eventContext] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[transport] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] } operator[SEP] operator[SEP] } Keyword[return] identifier[closeFuture] operator[SEP] }
@Override public int prepare(final Xid _xid) { if (JDBCStoreResource.LOG.isDebugEnabled()) { JDBCStoreResource.LOG.debug("prepare (xid = " + _xid + ")"); } return 0; }
class class_name[name] begin[{] method[prepare, return_type[type[int]], modifier[public], parameter[_xid]] begin[{] if[call[JDBCStoreResource.LOG.isDebugEnabled, parameter[]]] begin[{] call[JDBCStoreResource.LOG.debug, parameter[binary_operation[binary_operation[literal["prepare (xid = "], +, member[._xid]], +, literal[")"]]]] else begin[{] None end[}] return[literal[0]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[prepare] operator[SEP] Keyword[final] identifier[Xid] identifier[_xid] operator[SEP] { Keyword[if] operator[SEP] identifier[JDBCStoreResource] operator[SEP] identifier[LOG] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[JDBCStoreResource] operator[SEP] identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[_xid] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[return] Other[0] operator[SEP] }
public static void instrument(final ThreadPoolExecutor executor, String threadPoolName) { MetricRegistry registry = Metrics.getRegistry(); registry.register(name(threadPoolName, "queue-size"), new Gauge<Integer>() { @Override public Integer getValue() { return executor.getQueue().size(); } }); registry.register(name(threadPoolName, "queue-max"), new Gauge<Integer>() { @Override public Integer getValue() { return executor.getQueue().size() + executor.getQueue().remainingCapacity(); } }); registry.register(name(threadPoolName, "threadpool-active"), new Gauge<Integer>() { @Override public Integer getValue() { return executor.getActiveCount(); } }); registry.register(name(threadPoolName, "threadpool-max"), new Gauge<Integer>() { @Override public Integer getValue() { return executor.getMaximumPoolSize(); } }); }
class class_name[name] begin[{] method[instrument, return_type[void], modifier[public static], parameter[executor, threadPoolName]] begin[{] local_variable[type[MetricRegistry], registry] call[registry.register, parameter[call[.name, parameter[member[.threadPoolName], literal["queue-size"]]], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getQueue, postfix_operators=[], prefix_operators=[], qualifier=executor, selectors=[MethodInvocation(arguments=[], member=size, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=getValue, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))], dimensions=None, name=Gauge, sub_type=None))]] call[registry.register, parameter[call[.name, parameter[member[.threadPoolName], literal["queue-max"]]], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getQueue, postfix_operators=[], prefix_operators=[], qualifier=executor, selectors=[MethodInvocation(arguments=[], member=size, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getQueue, postfix_operators=[], prefix_operators=[], qualifier=executor, selectors=[MethodInvocation(arguments=[], member=remainingCapacity, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), label=None)], documentation=None, modifiers={'public'}, name=getValue, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))], dimensions=None, name=Gauge, sub_type=None))]] call[registry.register, parameter[call[.name, parameter[member[.threadPoolName], literal["threadpool-active"]]], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getActiveCount, postfix_operators=[], prefix_operators=[], qualifier=executor, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=getValue, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))], dimensions=None, name=Gauge, sub_type=None))]] call[registry.register, parameter[call[.name, parameter[member[.threadPoolName], literal["threadpool-max"]]], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getMaximumPoolSize, postfix_operators=[], prefix_operators=[], qualifier=executor, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=getValue, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))], dimensions=None, name=Gauge, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[instrument] operator[SEP] Keyword[final] identifier[ThreadPoolExecutor] identifier[executor] , identifier[String] identifier[threadPoolName] operator[SEP] { identifier[MetricRegistry] identifier[registry] operator[=] identifier[Metrics] operator[SEP] identifier[getRegistry] operator[SEP] operator[SEP] operator[SEP] identifier[registry] operator[SEP] identifier[register] operator[SEP] identifier[name] operator[SEP] identifier[threadPoolName] , literal[String] operator[SEP] , Keyword[new] identifier[Gauge] operator[<] identifier[Integer] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Integer] identifier[getValue] operator[SEP] operator[SEP] { Keyword[return] identifier[executor] operator[SEP] identifier[getQueue] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[registry] operator[SEP] identifier[register] operator[SEP] identifier[name] operator[SEP] identifier[threadPoolName] , literal[String] operator[SEP] , Keyword[new] identifier[Gauge] operator[<] identifier[Integer] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Integer] identifier[getValue] operator[SEP] operator[SEP] { Keyword[return] identifier[executor] operator[SEP] identifier[getQueue] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[+] identifier[executor] operator[SEP] identifier[getQueue] operator[SEP] operator[SEP] operator[SEP] identifier[remainingCapacity] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[registry] operator[SEP] identifier[register] operator[SEP] identifier[name] operator[SEP] identifier[threadPoolName] , literal[String] operator[SEP] , Keyword[new] identifier[Gauge] operator[<] identifier[Integer] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Integer] identifier[getValue] operator[SEP] operator[SEP] { Keyword[return] identifier[executor] operator[SEP] identifier[getActiveCount] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[registry] operator[SEP] identifier[register] operator[SEP] identifier[name] operator[SEP] identifier[threadPoolName] , literal[String] operator[SEP] , Keyword[new] identifier[Gauge] operator[<] identifier[Integer] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Integer] identifier[getValue] operator[SEP] operator[SEP] { Keyword[return] identifier[executor] operator[SEP] identifier[getMaximumPoolSize] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
protected void writeCoveralls(final JsonWriter writer, final SourceCallback sourceCallback, final List<CoverageParser> parsers) throws ProcessingException, IOException { try { getLog().info("Writing Coveralls data to " + writer.getCoverallsFile().getAbsolutePath() + "..."); long now = System.currentTimeMillis(); sourceCallback.onBegin(); for (CoverageParser parser : parsers) { getLog().info("Processing coverage report from " + parser.getCoverageFile().getAbsolutePath()); parser.parse(sourceCallback); } sourceCallback.onComplete(); long duration = System.currentTimeMillis() - now; getLog().info("Successfully wrote Coveralls data in " + duration + "ms"); } finally { writer.close(); } }
class class_name[name] begin[{] method[writeCoveralls, return_type[void], modifier[protected], parameter[writer, sourceCallback, parsers]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=getLog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Writing Coveralls data to "), operandr=MethodInvocation(arguments=[], member=getCoverallsFile, postfix_operators=[], prefix_operators=[], qualifier=writer, selectors=[MethodInvocation(arguments=[], member=getAbsolutePath, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="..."), operator=+)], member=info, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=currentTimeMillis, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), name=now)], modifiers=set(), type=BasicType(dimensions=[], name=long)), StatementExpression(expression=MethodInvocation(arguments=[], member=onBegin, postfix_operators=[], prefix_operators=[], qualifier=sourceCallback, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getLog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Processing coverage report from "), operandr=MethodInvocation(arguments=[], member=getCoverageFile, postfix_operators=[], prefix_operators=[], qualifier=parser, selectors=[MethodInvocation(arguments=[], member=getAbsolutePath, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+)], member=info, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sourceCallback, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parse, postfix_operators=[], prefix_operators=[], qualifier=parser, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=parsers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=parser)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CoverageParser, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=onComplete, postfix_operators=[], prefix_operators=[], qualifier=sourceCallback, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MethodInvocation(arguments=[], member=currentTimeMillis, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), operandr=MemberReference(member=now, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), name=duration)], modifiers=set(), type=BasicType(dimensions=[], name=long)), StatementExpression(expression=MethodInvocation(arguments=[], member=getLog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Successfully wrote Coveralls data in "), operandr=MemberReference(member=duration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ms"), operator=+)], member=info, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=writer, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[protected] Keyword[void] identifier[writeCoveralls] operator[SEP] Keyword[final] identifier[JsonWriter] identifier[writer] , Keyword[final] identifier[SourceCallback] identifier[sourceCallback] , Keyword[final] identifier[List] operator[<] identifier[CoverageParser] operator[>] identifier[parsers] operator[SEP] Keyword[throws] identifier[ProcessingException] , identifier[IOException] { Keyword[try] { identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[writer] operator[SEP] identifier[getCoverallsFile] operator[SEP] operator[SEP] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[long] identifier[now] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] identifier[sourceCallback] operator[SEP] identifier[onBegin] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[CoverageParser] identifier[parser] operator[:] identifier[parsers] operator[SEP] { identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[parser] operator[SEP] identifier[getCoverageFile] operator[SEP] operator[SEP] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[parser] operator[SEP] identifier[parse] operator[SEP] identifier[sourceCallback] operator[SEP] operator[SEP] } identifier[sourceCallback] operator[SEP] identifier[onComplete] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[duration] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[-] identifier[now] operator[SEP] identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[duration] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[finally] { identifier[writer] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } }
public void putStage(String stage) throws JSONException { if (stage != null) { this.stage = stage; this.put(Defines.LinkParam.Stage.getKey(), stage); } }
class class_name[name] begin[{] method[putStage, return_type[void], modifier[public], parameter[stage]] begin[{] if[binary_operation[member[.stage], !=, literal[null]]] begin[{] assign[THIS[member[None.stage]], member[.stage]] THIS[call[None.put, parameter[call[Defines.LinkParam.Stage.getKey, parameter[]], member[.stage]]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[putStage] operator[SEP] identifier[String] identifier[stage] operator[SEP] Keyword[throws] identifier[JSONException] { Keyword[if] operator[SEP] identifier[stage] operator[!=] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[stage] operator[=] identifier[stage] operator[SEP] Keyword[this] operator[SEP] identifier[put] operator[SEP] identifier[Defines] operator[SEP] identifier[LinkParam] operator[SEP] identifier[Stage] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] , identifier[stage] operator[SEP] operator[SEP] } }
@Nonnull public static <T> LOiToByteFunctionBuilder<T> oiToByteFunction(Consumer<LOiToByteFunction<T>> consumer) { return new LOiToByteFunctionBuilder(consumer); }
class class_name[name] begin[{] method[oiToByteFunction, return_type[type[LOiToByteFunctionBuilder]], 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=LOiToByteFunctionBuilder, sub_type=None))] end[}] END[}]
annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[LOiToByteFunctionBuilder] operator[<] identifier[T] operator[>] identifier[oiToByteFunction] operator[SEP] identifier[Consumer] operator[<] identifier[LOiToByteFunction] operator[<] identifier[T] operator[>] operator[>] identifier[consumer] operator[SEP] { Keyword[return] Keyword[new] identifier[LOiToByteFunctionBuilder] operator[SEP] identifier[consumer] operator[SEP] operator[SEP] }
public void startXML() { fileOutput += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; fileOutput += "<schema " + "xmlns:" + WFSController.TDSNAMESPACE + "=" + WFSXMLHelper.encQuotes(namespace) + " " + "xmlns:ogc=\"http://www.opengis.net/ogc\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" " + "xmlns=\"http://www.w3.org/2001/XMLSchema\" xmlns:gml=\"http://www.opengis.net/gml\" " + "targetNamespace=\"" + server + "\" elementFormDefault=\"qualified\" " + "version=\"0.1\">"; fileOutput += "<xsd:import namespace=\"http://www.opengis.net/gml\" " + "schemaLocation=\"http://schemas.opengis.net/gml/2.1.2/feature.xsd\"/>"; }
class class_name[name] begin[{] method[startXML, return_type[void], modifier[public], parameter[]] begin[{] assign[member[.fileOutput], literal["<?xml version=\"1.0\" encoding=\"UTF-8\"?>"]] assign[member[.fileOutput], binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["<schema "], +, literal["xmlns:"]], +, member[WFSController.TDSNAMESPACE]], +, literal["="]], +, call[WFSXMLHelper.encQuotes, parameter[member[.namespace]]]], +, literal[" "]], +, literal["xmlns:ogc=\"http://www.opengis.net/ogc\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" "]], +, literal["xmlns=\"http://www.w3.org/2001/XMLSchema\" xmlns:gml=\"http://www.opengis.net/gml\" "]], +, literal["targetNamespace=\""]], +, member[.server]], +, literal["\" elementFormDefault=\"qualified\" "]], +, literal["version=\"0.1\">"]]] assign[member[.fileOutput], binary_operation[literal["<xsd:import namespace=\"http://www.opengis.net/gml\" "], +, literal["schemaLocation=\"http://schemas.opengis.net/gml/2.1.2/feature.xsd\"/>"]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[startXML] operator[SEP] operator[SEP] { identifier[fileOutput] operator[+=] literal[String] operator[SEP] identifier[fileOutput] operator[+=] literal[String] operator[+] literal[String] operator[+] identifier[WFSController] operator[SEP] identifier[TDSNAMESPACE] operator[+] literal[String] operator[+] identifier[WFSXMLHelper] operator[SEP] identifier[encQuotes] operator[SEP] identifier[namespace] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[server] operator[+] literal[String] operator[+] literal[String] operator[SEP] identifier[fileOutput] operator[+=] literal[String] operator[+] literal[String] operator[SEP] }
public static nat64[] get(nitro_service service) throws Exception{ nat64 obj = new nat64(); nat64[] response = (nat64[])obj.get_resources(service); return response; }
class class_name[name] begin[{] method[get, return_type[type[nat64]], modifier[public static], parameter[service]] begin[{] local_variable[type[nat64], obj] local_variable[type[nat64], response] return[member[.response]] end[}] END[}]
Keyword[public] Keyword[static] identifier[nat64] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] operator[SEP] Keyword[throws] identifier[Exception] { identifier[nat64] identifier[obj] operator[=] Keyword[new] identifier[nat64] operator[SEP] operator[SEP] operator[SEP] identifier[nat64] operator[SEP] operator[SEP] identifier[response] operator[=] operator[SEP] identifier[nat64] 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 static List<int[]> longestCommonSubsequenceWithIsomorphism(List<ITree> s0, List<ITree> s1) { int[][] lengths = new int[s0.size() + 1][s1.size() + 1]; for (int i = 0; i < s0.size(); i++) for (int j = 0; j < s1.size(); j++) if (s0.get(i).isIsomorphicTo(s1.get(j))) lengths[i + 1][j + 1] = lengths[i][j] + 1; else lengths[i + 1][j + 1] = Math.max(lengths[i + 1][j], lengths[i][j + 1]); return extractIndexes(lengths, s0.size(), s1.size()); }
class class_name[name] begin[{] method[longestCommonSubsequenceWithIsomorphism, return_type[type[List]], modifier[public static], parameter[s0, s1]] begin[{] local_variable[type[int], lengths] ForStatement(body=ForStatement(body=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=s0, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=s1, selectors=[], type_arguments=None)], member=isIsomorphicTo, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=lengths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), type==, value=MethodInvocation(arguments=[MemberReference(member=lengths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), MemberReference(member=lengths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))])], member=max, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)), label=None), label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=lengths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), type==, value=BinaryOperation(operandl=MemberReference(member=lengths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), label=None)), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=s1, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=s0, 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[.extractIndexes, parameter[member[.lengths], call[s0.size, parameter[]], call[s1.size, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] Keyword[int] operator[SEP] operator[SEP] operator[>] identifier[longestCommonSubsequenceWithIsomorphism] operator[SEP] identifier[List] operator[<] identifier[ITree] operator[>] identifier[s0] , identifier[List] operator[<] identifier[ITree] operator[>] identifier[s1] operator[SEP] { Keyword[int] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[lengths] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[s0] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[+] Other[1] operator[SEP] operator[SEP] identifier[s1] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[s0] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[s1] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[j] operator[++] operator[SEP] Keyword[if] operator[SEP] identifier[s0] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[isIsomorphicTo] operator[SEP] identifier[s1] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] operator[SEP] operator[SEP] identifier[lengths] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] identifier[j] operator[+] Other[1] operator[SEP] operator[=] identifier[lengths] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[j] operator[SEP] operator[+] Other[1] operator[SEP] Keyword[else] identifier[lengths] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] identifier[j] operator[+] Other[1] operator[SEP] operator[=] identifier[Math] operator[SEP] identifier[max] operator[SEP] identifier[lengths] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] identifier[j] operator[SEP] , identifier[lengths] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[j] operator[+] Other[1] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[extractIndexes] operator[SEP] identifier[lengths] , identifier[s0] operator[SEP] identifier[size] operator[SEP] operator[SEP] , identifier[s1] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public long parse() throws IOException { /* * ---------------------------- * 52 45 44 49 53 # Magic String "REDIS" * 30 30 30 33 # RDB Version Number in big endian. In this case, version = 0003 = 3 * ---------------------------- */ this.replicator.submitEvent(new PreRdbSyncEvent()); rdbVisitor.applyMagic(in); int version = rdbVisitor.applyVersion(in); DB db = null; /* * rdb */ loop: while (this.replicator.getStatus() == CONNECTED) { Event event = null; int type = rdbVisitor.applyType(in); ContextKeyValuePair kv = new ContextKeyValuePair(); kv.setDb(db); switch (type) { case RDB_OPCODE_EXPIRETIME: event = rdbVisitor.applyExpireTime(in, version, kv); break; case RDB_OPCODE_EXPIRETIME_MS: event = rdbVisitor.applyExpireTimeMs(in, version, kv); break; case RDB_OPCODE_FREQ: event = rdbVisitor.applyFreq(in, version, kv); break; case RDB_OPCODE_IDLE: event = rdbVisitor.applyIdle(in, version, kv); break; case RDB_OPCODE_AUX: event = rdbVisitor.applyAux(in, version); break; case RDB_OPCODE_MODULE_AUX: event = rdbVisitor.applyModuleAux(in, version); break; case RDB_OPCODE_RESIZEDB: rdbVisitor.applyResizeDB(in, version, kv); break; case RDB_OPCODE_SELECTDB: db = rdbVisitor.applySelectDB(in, version); break; case RDB_OPCODE_EOF: long checksum = rdbVisitor.applyEof(in, version); this.replicator.submitEvent(new PostRdbSyncEvent(checksum)); break loop; case RDB_TYPE_STRING: event = rdbVisitor.applyString(in, version, kv); break; case RDB_TYPE_LIST: event = rdbVisitor.applyList(in, version, kv); break; case RDB_TYPE_SET: event = rdbVisitor.applySet(in, version, kv); break; case RDB_TYPE_ZSET: event = rdbVisitor.applyZSet(in, version, kv); break; case RDB_TYPE_ZSET_2: event = rdbVisitor.applyZSet2(in, version, kv); break; case RDB_TYPE_HASH: event = rdbVisitor.applyHash(in, version, kv); break; case RDB_TYPE_HASH_ZIPMAP: event = rdbVisitor.applyHashZipMap(in, version, kv); break; case RDB_TYPE_LIST_ZIPLIST: event = rdbVisitor.applyListZipList(in, version, kv); break; case RDB_TYPE_SET_INTSET: event = rdbVisitor.applySetIntSet(in, version, kv); break; case RDB_TYPE_ZSET_ZIPLIST: event = rdbVisitor.applyZSetZipList(in, version, kv); break; case RDB_TYPE_HASH_ZIPLIST: event = rdbVisitor.applyHashZipList(in, version, kv); break; case RDB_TYPE_LIST_QUICKLIST: event = rdbVisitor.applyListQuickList(in, version, kv); break; case RDB_TYPE_MODULE: event = rdbVisitor.applyModule(in, version, kv); break; case RDB_TYPE_MODULE_2: event = rdbVisitor.applyModule2(in, version, kv); break; case RDB_TYPE_STREAM_LISTPACKS: event = rdbVisitor.applyStreamListPacks(in, version, kv); break; default: throw new AssertionError("unexpected value type:" + type + ", check your ModuleParser or ValueIterableRdbVisitor."); } if (event == null) continue; if (replicator.verbose() && logger.isDebugEnabled()) logger.debug("{}", event); this.replicator.submitEvent(event); } return in.total(); }
class class_name[name] begin[{] method[parse, return_type[type[long]], modifier[public], parameter[]] begin[{] THIS[member[None.replicator]call[None.submitEvent, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PreRdbSyncEvent, sub_type=None))]]] call[rdbVisitor.applyMagic, parameter[member[.in]]] local_variable[type[int], version] local_variable[type[DB], db] while[binary_operation[THIS[member[None.replicator]call[None.getStatus, parameter[]]], ==, member[.CONNECTED]]] begin[{] local_variable[type[Event], event] local_variable[type[int], type] local_variable[type[ContextKeyValuePair], kv] call[kv.setDb, parameter[member[.db]]] SwitchStatement(cases=[SwitchStatementCase(case=['RDB_OPCODE_EXPIRETIME'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=kv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=applyExpireTime, postfix_operators=[], prefix_operators=[], qualifier=rdbVisitor, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['RDB_OPCODE_EXPIRETIME_MS'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=kv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=applyExpireTimeMs, postfix_operators=[], prefix_operators=[], qualifier=rdbVisitor, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['RDB_OPCODE_FREQ'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=kv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=applyFreq, postfix_operators=[], prefix_operators=[], qualifier=rdbVisitor, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['RDB_OPCODE_IDLE'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=kv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=applyIdle, postfix_operators=[], prefix_operators=[], qualifier=rdbVisitor, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['RDB_OPCODE_AUX'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=applyAux, postfix_operators=[], prefix_operators=[], qualifier=rdbVisitor, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['RDB_OPCODE_MODULE_AUX'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=applyModuleAux, postfix_operators=[], prefix_operators=[], qualifier=rdbVisitor, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['RDB_OPCODE_RESIZEDB'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=kv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=applyResizeDB, postfix_operators=[], prefix_operators=[], qualifier=rdbVisitor, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['RDB_OPCODE_SELECTDB'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=db, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=applySelectDB, postfix_operators=[], prefix_operators=[], qualifier=rdbVisitor, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['RDB_OPCODE_EOF'], statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=applyEof, postfix_operators=[], prefix_operators=[], qualifier=rdbVisitor, selectors=[], type_arguments=None), name=checksum)], modifiers=set(), type=BasicType(dimensions=[], name=long)), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=replicator, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=checksum, 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=PostRdbSyncEvent, sub_type=None))], member=submitEvent, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), BreakStatement(goto=loop, label=None)]), SwitchStatementCase(case=['RDB_TYPE_STRING'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=kv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=applyString, postfix_operators=[], prefix_operators=[], qualifier=rdbVisitor, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['RDB_TYPE_LIST'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=kv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=applyList, postfix_operators=[], prefix_operators=[], qualifier=rdbVisitor, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['RDB_TYPE_SET'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=kv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=applySet, postfix_operators=[], prefix_operators=[], qualifier=rdbVisitor, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['RDB_TYPE_ZSET'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=kv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=applyZSet, postfix_operators=[], prefix_operators=[], qualifier=rdbVisitor, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['RDB_TYPE_ZSET_2'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=kv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=applyZSet2, postfix_operators=[], prefix_operators=[], qualifier=rdbVisitor, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['RDB_TYPE_HASH'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=kv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=applyHash, postfix_operators=[], prefix_operators=[], qualifier=rdbVisitor, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['RDB_TYPE_HASH_ZIPMAP'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=kv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=applyHashZipMap, postfix_operators=[], prefix_operators=[], qualifier=rdbVisitor, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['RDB_TYPE_LIST_ZIPLIST'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=kv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=applyListZipList, postfix_operators=[], prefix_operators=[], qualifier=rdbVisitor, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['RDB_TYPE_SET_INTSET'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=kv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=applySetIntSet, postfix_operators=[], prefix_operators=[], qualifier=rdbVisitor, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['RDB_TYPE_ZSET_ZIPLIST'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=kv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=applyZSetZipList, postfix_operators=[], prefix_operators=[], qualifier=rdbVisitor, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['RDB_TYPE_HASH_ZIPLIST'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=kv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=applyHashZipList, postfix_operators=[], prefix_operators=[], qualifier=rdbVisitor, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['RDB_TYPE_LIST_QUICKLIST'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=kv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=applyListQuickList, postfix_operators=[], prefix_operators=[], qualifier=rdbVisitor, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['RDB_TYPE_MODULE'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=kv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=applyModule, postfix_operators=[], prefix_operators=[], qualifier=rdbVisitor, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['RDB_TYPE_MODULE_2'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=kv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=applyModule2, postfix_operators=[], prefix_operators=[], qualifier=rdbVisitor, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['RDB_TYPE_STREAM_LISTPACKS'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=kv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=applyStreamListPacks, postfix_operators=[], prefix_operators=[], qualifier=rdbVisitor, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="unexpected value type:"), operandr=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", check your ModuleParser or ValueIterableRdbVisitor."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AssertionError, sub_type=None)), label=None)])], expression=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) if[binary_operation[member[.event], ==, literal[null]]] begin[{] ContinueStatement(goto=None, label=None) else begin[{] None end[}] if[binary_operation[call[replicator.verbose, parameter[]], &&, call[logger.isDebugEnabled, parameter[]]]] begin[{] call[logger.debug, parameter[literal["{}"], member[.event]]] else begin[{] None end[}] THIS[member[None.replicator]call[None.submitEvent, parameter[member[.event]]]] end[}] return[call[in.total, parameter[]]] end[}] END[}]
Keyword[public] Keyword[long] identifier[parse] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[this] operator[SEP] identifier[replicator] operator[SEP] identifier[submitEvent] operator[SEP] Keyword[new] identifier[PreRdbSyncEvent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[rdbVisitor] operator[SEP] identifier[applyMagic] operator[SEP] identifier[in] operator[SEP] operator[SEP] Keyword[int] identifier[version] operator[=] identifier[rdbVisitor] operator[SEP] identifier[applyVersion] operator[SEP] identifier[in] operator[SEP] operator[SEP] identifier[DB] identifier[db] operator[=] Other[null] operator[SEP] identifier[loop] operator[:] Keyword[while] operator[SEP] Keyword[this] operator[SEP] identifier[replicator] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] operator[==] identifier[CONNECTED] operator[SEP] { identifier[Event] identifier[event] operator[=] Other[null] operator[SEP] Keyword[int] identifier[type] operator[=] identifier[rdbVisitor] operator[SEP] identifier[applyType] operator[SEP] identifier[in] operator[SEP] operator[SEP] identifier[ContextKeyValuePair] identifier[kv] operator[=] Keyword[new] identifier[ContextKeyValuePair] operator[SEP] operator[SEP] operator[SEP] identifier[kv] operator[SEP] identifier[setDb] operator[SEP] identifier[db] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[type] operator[SEP] { Keyword[case] identifier[RDB_OPCODE_EXPIRETIME] operator[:] identifier[event] operator[=] identifier[rdbVisitor] operator[SEP] identifier[applyExpireTime] operator[SEP] identifier[in] , identifier[version] , identifier[kv] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[RDB_OPCODE_EXPIRETIME_MS] operator[:] identifier[event] operator[=] identifier[rdbVisitor] operator[SEP] identifier[applyExpireTimeMs] operator[SEP] identifier[in] , identifier[version] , identifier[kv] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[RDB_OPCODE_FREQ] operator[:] identifier[event] operator[=] identifier[rdbVisitor] operator[SEP] identifier[applyFreq] operator[SEP] identifier[in] , identifier[version] , identifier[kv] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[RDB_OPCODE_IDLE] operator[:] identifier[event] operator[=] identifier[rdbVisitor] operator[SEP] identifier[applyIdle] operator[SEP] identifier[in] , identifier[version] , identifier[kv] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[RDB_OPCODE_AUX] operator[:] identifier[event] operator[=] identifier[rdbVisitor] operator[SEP] identifier[applyAux] operator[SEP] identifier[in] , identifier[version] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[RDB_OPCODE_MODULE_AUX] operator[:] identifier[event] operator[=] identifier[rdbVisitor] operator[SEP] identifier[applyModuleAux] operator[SEP] identifier[in] , identifier[version] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[RDB_OPCODE_RESIZEDB] operator[:] identifier[rdbVisitor] operator[SEP] identifier[applyResizeDB] operator[SEP] identifier[in] , identifier[version] , identifier[kv] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[RDB_OPCODE_SELECTDB] operator[:] identifier[db] operator[=] identifier[rdbVisitor] operator[SEP] identifier[applySelectDB] operator[SEP] identifier[in] , identifier[version] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[RDB_OPCODE_EOF] operator[:] Keyword[long] identifier[checksum] operator[=] identifier[rdbVisitor] operator[SEP] identifier[applyEof] operator[SEP] identifier[in] , identifier[version] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[replicator] operator[SEP] identifier[submitEvent] operator[SEP] Keyword[new] identifier[PostRdbSyncEvent] operator[SEP] identifier[checksum] operator[SEP] operator[SEP] operator[SEP] Keyword[break] identifier[loop] operator[SEP] Keyword[case] identifier[RDB_TYPE_STRING] operator[:] identifier[event] operator[=] identifier[rdbVisitor] operator[SEP] identifier[applyString] operator[SEP] identifier[in] , identifier[version] , identifier[kv] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[RDB_TYPE_LIST] operator[:] identifier[event] operator[=] identifier[rdbVisitor] operator[SEP] identifier[applyList] operator[SEP] identifier[in] , identifier[version] , identifier[kv] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[RDB_TYPE_SET] operator[:] identifier[event] operator[=] identifier[rdbVisitor] operator[SEP] identifier[applySet] operator[SEP] identifier[in] , identifier[version] , identifier[kv] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[RDB_TYPE_ZSET] operator[:] identifier[event] operator[=] identifier[rdbVisitor] operator[SEP] identifier[applyZSet] operator[SEP] identifier[in] , identifier[version] , identifier[kv] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[RDB_TYPE_ZSET_2] operator[:] identifier[event] operator[=] identifier[rdbVisitor] operator[SEP] identifier[applyZSet2] operator[SEP] identifier[in] , identifier[version] , identifier[kv] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[RDB_TYPE_HASH] operator[:] identifier[event] operator[=] identifier[rdbVisitor] operator[SEP] identifier[applyHash] operator[SEP] identifier[in] , identifier[version] , identifier[kv] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[RDB_TYPE_HASH_ZIPMAP] operator[:] identifier[event] operator[=] identifier[rdbVisitor] operator[SEP] identifier[applyHashZipMap] operator[SEP] identifier[in] , identifier[version] , identifier[kv] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[RDB_TYPE_LIST_ZIPLIST] operator[:] identifier[event] operator[=] identifier[rdbVisitor] operator[SEP] identifier[applyListZipList] operator[SEP] identifier[in] , identifier[version] , identifier[kv] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[RDB_TYPE_SET_INTSET] operator[:] identifier[event] operator[=] identifier[rdbVisitor] operator[SEP] identifier[applySetIntSet] operator[SEP] identifier[in] , identifier[version] , identifier[kv] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[RDB_TYPE_ZSET_ZIPLIST] operator[:] identifier[event] operator[=] identifier[rdbVisitor] operator[SEP] identifier[applyZSetZipList] operator[SEP] identifier[in] , identifier[version] , identifier[kv] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[RDB_TYPE_HASH_ZIPLIST] operator[:] identifier[event] operator[=] identifier[rdbVisitor] operator[SEP] identifier[applyHashZipList] operator[SEP] identifier[in] , identifier[version] , identifier[kv] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[RDB_TYPE_LIST_QUICKLIST] operator[:] identifier[event] operator[=] identifier[rdbVisitor] operator[SEP] identifier[applyListQuickList] operator[SEP] identifier[in] , identifier[version] , identifier[kv] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[RDB_TYPE_MODULE] operator[:] identifier[event] operator[=] identifier[rdbVisitor] operator[SEP] identifier[applyModule] operator[SEP] identifier[in] , identifier[version] , identifier[kv] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[RDB_TYPE_MODULE_2] operator[:] identifier[event] operator[=] identifier[rdbVisitor] operator[SEP] identifier[applyModule2] operator[SEP] identifier[in] , identifier[version] , identifier[kv] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[RDB_TYPE_STREAM_LISTPACKS] operator[:] identifier[event] operator[=] identifier[rdbVisitor] operator[SEP] identifier[applyStreamListPacks] operator[SEP] identifier[in] , identifier[version] , identifier[kv] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[AssertionError] operator[SEP] literal[String] operator[+] identifier[type] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[event] operator[==] Other[null] operator[SEP] Keyword[continue] operator[SEP] Keyword[if] operator[SEP] identifier[replicator] operator[SEP] identifier[verbose] operator[SEP] operator[SEP] operator[&&] identifier[logger] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[event] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[replicator] operator[SEP] identifier[submitEvent] operator[SEP] identifier[event] operator[SEP] operator[SEP] } Keyword[return] identifier[in] operator[SEP] identifier[total] operator[SEP] operator[SEP] operator[SEP] }
@Override public RowIterator findFirstRow(Session session, PersistentStore store, Object[] rowdata, int match) { NodeAVL node = findNode(session, store, rowdata, defaultColMap, match); return getIterator(session, store, node); }
class class_name[name] begin[{] method[findFirstRow, return_type[type[RowIterator]], modifier[public], parameter[session, store, rowdata, match]] begin[{] local_variable[type[NodeAVL], node] return[call[.getIterator, parameter[member[.session], member[.store], member[.node]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[RowIterator] identifier[findFirstRow] operator[SEP] identifier[Session] identifier[session] , identifier[PersistentStore] identifier[store] , identifier[Object] operator[SEP] operator[SEP] identifier[rowdata] , Keyword[int] identifier[match] operator[SEP] { identifier[NodeAVL] identifier[node] operator[=] identifier[findNode] operator[SEP] identifier[session] , identifier[store] , identifier[rowdata] , identifier[defaultColMap] , identifier[match] operator[SEP] operator[SEP] Keyword[return] identifier[getIterator] operator[SEP] identifier[session] , identifier[store] , identifier[node] operator[SEP] operator[SEP] }
public void monitor(Monitor target) { log.info("starting monitor: {}", target); try { target.getMonitorDriver(props, configService).run(); } catch (Exception e) { ByteArrayOutputStream out = new ByteArrayOutputStream(); PrintStream error = new PrintStream(out); error.println("Error in MonitorsDriver: " + e.getMessage()); e.printStackTrace(error); error.flush(); IOUtils.closeQuietly(out); String msg = new String(out.toByteArray()); log.error(msg); sendEmail("Management Console Monitors Error", msg); } }
class class_name[name] begin[{] method[monitor, return_type[void], modifier[public], parameter[target]] begin[{] call[log.info, parameter[literal["starting monitor: {}"], member[.target]]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=props, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=configService, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getMonitorDriver, postfix_operators=[], prefix_operators=[], qualifier=target, selectors=[MethodInvocation(arguments=[], member=run, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], 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=ByteArrayOutputStream, sub_type=None)), name=out)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ByteArrayOutputStream, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PrintStream, sub_type=None)), name=error)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PrintStream, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error in MonitorsDriver: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=error, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=error, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=flush, postfix_operators=[], prefix_operators=[], qualifier=error, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=closeQuietly, postfix_operators=[], prefix_operators=[], qualifier=IOUtils, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toByteArray, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), name=msg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Management Console Monitors Error"), MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sendEmail, postfix_operators=[], prefix_operators=[], qualifier=, 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) end[}] END[}]
Keyword[public] Keyword[void] identifier[monitor] operator[SEP] identifier[Monitor] identifier[target] operator[SEP] { identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[target] operator[SEP] operator[SEP] Keyword[try] { identifier[target] operator[SEP] identifier[getMonitorDriver] operator[SEP] identifier[props] , identifier[configService] operator[SEP] operator[SEP] identifier[run] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[ByteArrayOutputStream] identifier[out] operator[=] Keyword[new] identifier[ByteArrayOutputStream] operator[SEP] operator[SEP] operator[SEP] identifier[PrintStream] identifier[error] operator[=] Keyword[new] identifier[PrintStream] operator[SEP] identifier[out] operator[SEP] operator[SEP] identifier[error] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[printStackTrace] operator[SEP] identifier[error] operator[SEP] operator[SEP] identifier[error] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] identifier[IOUtils] operator[SEP] identifier[closeQuietly] operator[SEP] identifier[out] operator[SEP] operator[SEP] identifier[String] identifier[msg] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[out] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[error] operator[SEP] identifier[msg] operator[SEP] operator[SEP] identifier[sendEmail] operator[SEP] literal[String] , identifier[msg] operator[SEP] operator[SEP] } }
private String getMethod() { String methods = this.metadataJson.getString(METHODS); if (methods.contains(HttpMethod.POST.name())) { return HttpMethod.POST.name(); } else if (methods.contains(HttpMethod.PUT.name())) { return HttpMethod.PUT.name(); } else { return methods; } }
class class_name[name] begin[{] method[getMethod, return_type[type[String]], modifier[private], parameter[]] begin[{] local_variable[type[String], methods] if[call[methods.contains, parameter[call[HttpMethod.POST.name, parameter[]]]]] begin[{] return[call[HttpMethod.POST.name, parameter[]]] else begin[{] if[call[methods.contains, parameter[call[HttpMethod.PUT.name, parameter[]]]]] begin[{] return[call[HttpMethod.PUT.name, parameter[]]] else begin[{] return[member[.methods]] end[}] end[}] end[}] END[}]
Keyword[private] identifier[String] identifier[getMethod] operator[SEP] operator[SEP] { identifier[String] identifier[methods] operator[=] Keyword[this] operator[SEP] identifier[metadataJson] operator[SEP] identifier[getString] operator[SEP] identifier[METHODS] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[methods] operator[SEP] identifier[contains] operator[SEP] identifier[HttpMethod] operator[SEP] identifier[POST] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[HttpMethod] operator[SEP] identifier[POST] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[methods] operator[SEP] identifier[contains] operator[SEP] identifier[HttpMethod] operator[SEP] identifier[PUT] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[HttpMethod] operator[SEP] identifier[PUT] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[methods] operator[SEP] } }
@NonNull public static SourceParams createSepaDebitParams( @NonNull String name, @NonNull String iban, @Nullable String email, @Nullable String addressLine1, @Nullable String city, @Nullable String postalCode, @Nullable @Size(2) String country) { final SourceParams params = new SourceParams() .setType(Source.SEPA_DEBIT) .setCurrency(Source.EURO); final AbstractMap<String, Object> address = new HashMap<>(); address.put(FIELD_LINE_1, addressLine1); address.put(FIELD_CITY, city); address.put(FIELD_POSTAL_CODE, postalCode); address.put(FIELD_COUNTRY, country); final AbstractMap<String, Object> ownerMap = new HashMap<>(); ownerMap.put(FIELD_NAME, name); ownerMap.put(FIELD_EMAIL, email); ownerMap.put(FIELD_ADDRESS, address); return params .setOwner(ownerMap) .setApiParameterMap(createSimpleMap(FIELD_IBAN, iban)); }
class class_name[name] begin[{] method[createSepaDebitParams, return_type[type[SourceParams]], modifier[public static], parameter[name, iban, email, addressLine1, city, postalCode, country]] begin[{] local_variable[type[SourceParams], params] local_variable[type[AbstractMap], address] call[address.put, parameter[member[.FIELD_LINE_1], member[.addressLine1]]] call[address.put, parameter[member[.FIELD_CITY], member[.city]]] call[address.put, parameter[member[.FIELD_POSTAL_CODE], member[.postalCode]]] call[address.put, parameter[member[.FIELD_COUNTRY], member[.country]]] local_variable[type[AbstractMap], ownerMap] call[ownerMap.put, parameter[member[.FIELD_NAME], member[.name]]] call[ownerMap.put, parameter[member[.FIELD_EMAIL], member[.email]]] call[ownerMap.put, parameter[member[.FIELD_ADDRESS], member[.address]]] return[call[params.setOwner, parameter[member[.ownerMap]]]] end[}] END[}]
annotation[@] identifier[NonNull] Keyword[public] Keyword[static] identifier[SourceParams] identifier[createSepaDebitParams] operator[SEP] annotation[@] identifier[NonNull] identifier[String] identifier[name] , annotation[@] identifier[NonNull] identifier[String] identifier[iban] , annotation[@] identifier[Nullable] identifier[String] identifier[email] , annotation[@] identifier[Nullable] identifier[String] identifier[addressLine1] , annotation[@] identifier[Nullable] identifier[String] identifier[city] , annotation[@] identifier[Nullable] identifier[String] identifier[postalCode] , annotation[@] identifier[Nullable] annotation[@] identifier[Size] operator[SEP] Other[2] operator[SEP] identifier[String] identifier[country] operator[SEP] { Keyword[final] identifier[SourceParams] identifier[params] operator[=] Keyword[new] identifier[SourceParams] operator[SEP] operator[SEP] operator[SEP] identifier[setType] operator[SEP] identifier[Source] operator[SEP] identifier[SEPA_DEBIT] operator[SEP] operator[SEP] identifier[setCurrency] operator[SEP] identifier[Source] operator[SEP] identifier[EURO] operator[SEP] operator[SEP] Keyword[final] identifier[AbstractMap] operator[<] identifier[String] , identifier[Object] operator[>] identifier[address] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[address] operator[SEP] identifier[put] operator[SEP] identifier[FIELD_LINE_1] , identifier[addressLine1] operator[SEP] operator[SEP] identifier[address] operator[SEP] identifier[put] operator[SEP] identifier[FIELD_CITY] , identifier[city] operator[SEP] operator[SEP] identifier[address] operator[SEP] identifier[put] operator[SEP] identifier[FIELD_POSTAL_CODE] , identifier[postalCode] operator[SEP] operator[SEP] identifier[address] operator[SEP] identifier[put] operator[SEP] identifier[FIELD_COUNTRY] , identifier[country] operator[SEP] operator[SEP] Keyword[final] identifier[AbstractMap] operator[<] identifier[String] , identifier[Object] operator[>] identifier[ownerMap] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[ownerMap] operator[SEP] identifier[put] operator[SEP] identifier[FIELD_NAME] , identifier[name] operator[SEP] operator[SEP] identifier[ownerMap] operator[SEP] identifier[put] operator[SEP] identifier[FIELD_EMAIL] , identifier[email] operator[SEP] operator[SEP] identifier[ownerMap] operator[SEP] identifier[put] operator[SEP] identifier[FIELD_ADDRESS] , identifier[address] operator[SEP] operator[SEP] Keyword[return] identifier[params] operator[SEP] identifier[setOwner] operator[SEP] identifier[ownerMap] operator[SEP] operator[SEP] identifier[setApiParameterMap] operator[SEP] identifier[createSimpleMap] operator[SEP] identifier[FIELD_IBAN] , identifier[iban] operator[SEP] operator[SEP] operator[SEP] }
public Observable<EventSubscriptionFullUrlInner> getFullUrlAsync(String scope, String eventSubscriptionName) { return getFullUrlWithServiceResponseAsync(scope, eventSubscriptionName).map(new Func1<ServiceResponse<EventSubscriptionFullUrlInner>, EventSubscriptionFullUrlInner>() { @Override public EventSubscriptionFullUrlInner call(ServiceResponse<EventSubscriptionFullUrlInner> response) { return response.body(); } }); }
class class_name[name] begin[{] method[getFullUrlAsync, return_type[type[Observable]], modifier[public], parameter[scope, eventSubscriptionName]] begin[{] return[call[.getFullUrlWithServiceResponseAsync, parameter[member[.scope], member[.eventSubscriptionName]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[EventSubscriptionFullUrlInner] operator[>] identifier[getFullUrlAsync] operator[SEP] identifier[String] identifier[scope] , identifier[String] identifier[eventSubscriptionName] operator[SEP] { Keyword[return] identifier[getFullUrlWithServiceResponseAsync] operator[SEP] identifier[scope] , identifier[eventSubscriptionName] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[EventSubscriptionFullUrlInner] operator[>] , identifier[EventSubscriptionFullUrlInner] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[EventSubscriptionFullUrlInner] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[EventSubscriptionFullUrlInner] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public Matrix3f scaling(float x, float y, float z) { MemUtil.INSTANCE.zero(this); m00 = x; m11 = y; m22 = z; return this; }
class class_name[name] begin[{] method[scaling, return_type[type[Matrix3f]], modifier[public], parameter[x, y, z]] begin[{] call[MemUtil.INSTANCE.zero, parameter[THIS[]]] assign[member[.m00], member[.x]] assign[member[.m11], member[.y]] assign[member[.m22], member[.z]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[Matrix3f] identifier[scaling] operator[SEP] Keyword[float] identifier[x] , Keyword[float] identifier[y] , Keyword[float] identifier[z] operator[SEP] { identifier[MemUtil] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[zero] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[m00] operator[=] identifier[x] operator[SEP] identifier[m11] operator[=] identifier[y] operator[SEP] identifier[m22] operator[=] identifier[z] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public DestinationHandler getNamedDestination() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, "getNamedDestination"); SibTr.exit(tc, "getNamedDestination", _dest); } return _dest; }
class class_name[name] begin[{] method[getNamedDestination, return_type[type[DestinationHandler]], modifier[public], parameter[]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["getNamedDestination"]]] call[SibTr.exit, parameter[member[.tc], literal["getNamedDestination"], member[._dest]]] else begin[{] None end[}] return[member[._dest]] end[}] END[}]
Keyword[public] identifier[DestinationHandler] identifier[getNamedDestination] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , identifier[_dest] operator[SEP] operator[SEP] } Keyword[return] identifier[_dest] operator[SEP] }
private static <T, ID> void addCreateTableStatements(DatabaseType databaseType, TableInfo<T, ID> tableInfo, List<String> statements, List<String> queriesAfter, boolean ifNotExists, boolean logDetails) throws SQLException { StringBuilder sb = new StringBuilder(256); if (logDetails) { logger.info("creating table '{}'", tableInfo.getTableName()); } sb.append("CREATE TABLE "); if (ifNotExists && databaseType.isCreateIfNotExistsSupported()) { sb.append("IF NOT EXISTS "); } databaseType.appendEscapedEntityName(sb, tableInfo.getTableName()); sb.append(" ("); List<String> additionalArgs = new ArrayList<String>(); List<String> statementsBefore = new ArrayList<String>(); List<String> statementsAfter = new ArrayList<String>(); // our statement will be set here later boolean first = true; for (FieldType fieldType : tableInfo.getFieldTypes()) { // skip foreign collections if (fieldType.isForeignCollection()) { continue; } else if (first) { first = false; } else { sb.append(", "); } String columnDefinition = fieldType.getColumnDefinition(); if (columnDefinition == null) { // we have to call back to the database type for the specific create syntax databaseType.appendColumnArg(tableInfo.getTableName(), sb, fieldType, additionalArgs, statementsBefore, statementsAfter, queriesAfter); } else { // hand defined field databaseType.appendEscapedEntityName(sb, fieldType.getColumnName()); sb.append(' ').append(columnDefinition).append(' '); } } // add any sql that sets any primary key fields databaseType.addPrimaryKeySql(tableInfo.getFieldTypes(), additionalArgs, statementsBefore, statementsAfter, queriesAfter); // add any sql that sets any unique fields databaseType.addUniqueComboSql(tableInfo.getFieldTypes(), additionalArgs, statementsBefore, statementsAfter, queriesAfter); for (String arg : additionalArgs) { // we will have spat out one argument already so we don't have to do the first dance sb.append(", ").append(arg); } sb.append(") "); databaseType.appendCreateTableSuffix(sb); statements.addAll(statementsBefore); statements.add(sb.toString()); statements.addAll(statementsAfter); addCreateIndexStatements(databaseType, tableInfo, statements, ifNotExists, false, logDetails); addCreateIndexStatements(databaseType, tableInfo, statements, ifNotExists, true, logDetails); }
class class_name[name] begin[{] method[addCreateTableStatements, return_type[void], modifier[private static], parameter[databaseType, tableInfo, statements, queriesAfter, ifNotExists, logDetails]] begin[{] local_variable[type[StringBuilder], sb] if[member[.logDetails]] begin[{] call[logger.info, parameter[literal["creating table '{}'"], call[tableInfo.getTableName, parameter[]]]] else begin[{] None end[}] call[sb.append, parameter[literal["CREATE TABLE "]]] if[binary_operation[member[.ifNotExists], &&, call[databaseType.isCreateIfNotExistsSupported, parameter[]]]] begin[{] call[sb.append, parameter[literal["IF NOT EXISTS "]]] else begin[{] None end[}] call[databaseType.appendEscapedEntityName, parameter[member[.sb], call[tableInfo.getTableName, parameter[]]]] call[sb.append, parameter[literal[" ("]]] local_variable[type[List], additionalArgs] local_variable[type[List], statementsBefore] local_variable[type[List], statementsAfter] local_variable[type[boolean], first] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isForeignCollection, postfix_operators=[], prefix_operators=[], qualifier=fieldType, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MemberReference(member=first, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_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=sb, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=first, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getColumnDefinition, postfix_operators=[], prefix_operators=[], qualifier=fieldType, selectors=[], type_arguments=None), name=columnDefinition)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=columnDefinition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sb, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getColumnName, postfix_operators=[], prefix_operators=[], qualifier=fieldType, selectors=[], type_arguments=None)], member=appendEscapedEntityName, postfix_operators=[], prefix_operators=[], qualifier=databaseType, 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=sb, selectors=[MethodInvocation(arguments=[MemberReference(member=columnDefinition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=' ')], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTableName, postfix_operators=[], prefix_operators=[], qualifier=tableInfo, selectors=[], type_arguments=None), MemberReference(member=sb, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fieldType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=additionalArgs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=statementsBefore, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=statementsAfter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=queriesAfter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=appendColumnArg, postfix_operators=[], prefix_operators=[], qualifier=databaseType, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getFieldTypes, postfix_operators=[], prefix_operators=[], qualifier=tableInfo, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=fieldType)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FieldType, sub_type=None))), label=None) call[databaseType.addPrimaryKeySql, parameter[call[tableInfo.getFieldTypes, parameter[]], member[.additionalArgs], member[.statementsBefore], member[.statementsAfter], member[.queriesAfter]]] call[databaseType.addUniqueComboSql, parameter[call[tableInfo.getFieldTypes, parameter[]], member[.additionalArgs], member[.statementsBefore], member[.statementsAfter], member[.queriesAfter]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=additionalArgs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=arg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) call[sb.append, parameter[literal[") "]]] call[databaseType.appendCreateTableSuffix, parameter[member[.sb]]] call[statements.addAll, parameter[member[.statementsBefore]]] call[statements.add, parameter[call[sb.toString, parameter[]]]] call[statements.addAll, parameter[member[.statementsAfter]]] call[.addCreateIndexStatements, parameter[member[.databaseType], member[.tableInfo], member[.statements], member[.ifNotExists], literal[false], member[.logDetails]]] call[.addCreateIndexStatements, parameter[member[.databaseType], member[.tableInfo], member[.statements], member[.ifNotExists], literal[true], member[.logDetails]]] end[}] END[}]
Keyword[private] Keyword[static] operator[<] identifier[T] , identifier[ID] operator[>] Keyword[void] identifier[addCreateTableStatements] operator[SEP] identifier[DatabaseType] identifier[databaseType] , identifier[TableInfo] operator[<] identifier[T] , identifier[ID] operator[>] identifier[tableInfo] , identifier[List] operator[<] identifier[String] operator[>] identifier[statements] , identifier[List] operator[<] identifier[String] operator[>] identifier[queriesAfter] , Keyword[boolean] identifier[ifNotExists] , Keyword[boolean] identifier[logDetails] operator[SEP] Keyword[throws] identifier[SQLException] { identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] Other[256] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[logDetails] operator[SEP] { identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[tableInfo] operator[SEP] identifier[getTableName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ifNotExists] operator[&&] identifier[databaseType] operator[SEP] identifier[isCreateIfNotExistsSupported] operator[SEP] operator[SEP] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[databaseType] operator[SEP] identifier[appendEscapedEntityName] operator[SEP] identifier[sb] , identifier[tableInfo] operator[SEP] identifier[getTableName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[additionalArgs] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[statementsBefore] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[statementsAfter] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[first] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[FieldType] identifier[fieldType] operator[:] identifier[tableInfo] operator[SEP] identifier[getFieldTypes] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[fieldType] operator[SEP] identifier[isForeignCollection] operator[SEP] operator[SEP] operator[SEP] { Keyword[continue] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[first] operator[SEP] { identifier[first] operator[=] literal[boolean] operator[SEP] } Keyword[else] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[String] identifier[columnDefinition] operator[=] identifier[fieldType] operator[SEP] identifier[getColumnDefinition] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[columnDefinition] operator[==] Other[null] operator[SEP] { identifier[databaseType] operator[SEP] identifier[appendColumnArg] operator[SEP] identifier[tableInfo] operator[SEP] identifier[getTableName] operator[SEP] operator[SEP] , identifier[sb] , identifier[fieldType] , identifier[additionalArgs] , identifier[statementsBefore] , identifier[statementsAfter] , identifier[queriesAfter] operator[SEP] operator[SEP] } Keyword[else] { identifier[databaseType] operator[SEP] identifier[appendEscapedEntityName] operator[SEP] identifier[sb] , identifier[fieldType] operator[SEP] identifier[getColumnName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[columnDefinition] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } } identifier[databaseType] operator[SEP] identifier[addPrimaryKeySql] operator[SEP] identifier[tableInfo] operator[SEP] identifier[getFieldTypes] operator[SEP] operator[SEP] , identifier[additionalArgs] , identifier[statementsBefore] , identifier[statementsAfter] , identifier[queriesAfter] operator[SEP] operator[SEP] identifier[databaseType] operator[SEP] identifier[addUniqueComboSql] operator[SEP] identifier[tableInfo] operator[SEP] identifier[getFieldTypes] operator[SEP] operator[SEP] , identifier[additionalArgs] , identifier[statementsBefore] , identifier[statementsAfter] , identifier[queriesAfter] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[arg] operator[:] identifier[additionalArgs] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[arg] operator[SEP] operator[SEP] } identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[databaseType] operator[SEP] identifier[appendCreateTableSuffix] operator[SEP] identifier[sb] operator[SEP] operator[SEP] identifier[statements] operator[SEP] identifier[addAll] operator[SEP] identifier[statementsBefore] operator[SEP] operator[SEP] identifier[statements] operator[SEP] identifier[add] operator[SEP] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[statements] operator[SEP] identifier[addAll] operator[SEP] identifier[statementsAfter] operator[SEP] operator[SEP] identifier[addCreateIndexStatements] operator[SEP] identifier[databaseType] , identifier[tableInfo] , identifier[statements] , identifier[ifNotExists] , literal[boolean] , identifier[logDetails] operator[SEP] operator[SEP] identifier[addCreateIndexStatements] operator[SEP] identifier[databaseType] , identifier[tableInfo] , identifier[statements] , identifier[ifNotExists] , literal[boolean] , identifier[logDetails] operator[SEP] operator[SEP] }
public static <T> List<T> concat(List<T> inputs, T newValue) { List<T> outputs = new ArrayList<>(inputs.size() + 1); outputs.addAll(inputs); outputs.add(newValue); return outputs; }
class class_name[name] begin[{] method[concat, return_type[type[List]], modifier[public static], parameter[inputs, newValue]] begin[{] local_variable[type[List], outputs] call[outputs.addAll, parameter[member[.inputs]]] call[outputs.add, parameter[member[.newValue]]] return[member[.outputs]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[concat] operator[SEP] identifier[List] operator[<] identifier[T] operator[>] identifier[inputs] , identifier[T] identifier[newValue] operator[SEP] { identifier[List] operator[<] identifier[T] operator[>] identifier[outputs] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[inputs] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[+] Other[1] operator[SEP] operator[SEP] identifier[outputs] operator[SEP] identifier[addAll] operator[SEP] identifier[inputs] operator[SEP] operator[SEP] identifier[outputs] operator[SEP] identifier[add] operator[SEP] identifier[newValue] operator[SEP] operator[SEP] Keyword[return] identifier[outputs] operator[SEP] }
public String getKeyType(UniqueKeyDefinition key){ String tType; List<ColumnDefinition> keyColumns = key.getKeyColumns(); if (keyColumns.size() == 1) { tType = getJavaType(keyColumns.get(0).getType()); } else if (keyColumns.size() <= Constants.MAX_ROW_DEGREE) { String generics = ""; String separator = ""; for (ColumnDefinition column : keyColumns) { generics += separator + (getJavaType(column.getType())); separator = ", "; } tType = Record.class.getName() + keyColumns.size() + "<" + generics + ">"; } else { tType = Record.class.getName(); } return tType; }
class class_name[name] begin[{] method[getKeyType, return_type[type[String]], modifier[public], parameter[key]] begin[{] local_variable[type[String], tType] local_variable[type[List], keyColumns] if[binary_operation[call[keyColumns.size, parameter[]], ==, literal[1]]] begin[{] assign[member[.tType], call[.getJavaType, parameter[call[keyColumns.get, parameter[literal[0]]]]]] else begin[{] if[binary_operation[call[keyColumns.size, parameter[]], <=, member[Constants.MAX_ROW_DEGREE]]] begin[{] local_variable[type[String], generics] local_variable[type[String], separator] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=generics, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=MemberReference(member=separator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=column, selectors=[], type_arguments=None)], member=getJavaType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=separator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", ")), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=keyColumns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=column)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ColumnDefinition, sub_type=None))), label=None) assign[member[.tType], binary_operation[binary_operation[binary_operation[binary_operation[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Record, sub_type=None)), +, call[keyColumns.size, parameter[]]], +, literal["<"]], +, member[.generics]], +, literal[">"]]] else begin[{] assign[member[.tType], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Record, sub_type=None))] end[}] end[}] return[member[.tType]] end[}] END[}]
Keyword[public] identifier[String] identifier[getKeyType] operator[SEP] identifier[UniqueKeyDefinition] identifier[key] operator[SEP] { identifier[String] identifier[tType] operator[SEP] identifier[List] operator[<] identifier[ColumnDefinition] operator[>] identifier[keyColumns] operator[=] identifier[key] operator[SEP] identifier[getKeyColumns] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[keyColumns] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[1] operator[SEP] { identifier[tType] operator[=] identifier[getJavaType] operator[SEP] identifier[keyColumns] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[keyColumns] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[<=] identifier[Constants] operator[SEP] identifier[MAX_ROW_DEGREE] operator[SEP] { identifier[String] identifier[generics] operator[=] literal[String] operator[SEP] identifier[String] identifier[separator] operator[=] literal[String] operator[SEP] Keyword[for] operator[SEP] identifier[ColumnDefinition] identifier[column] operator[:] identifier[keyColumns] operator[SEP] { identifier[generics] operator[+=] identifier[separator] operator[+] operator[SEP] identifier[getJavaType] operator[SEP] identifier[column] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[separator] operator[=] literal[String] operator[SEP] } identifier[tType] operator[=] identifier[Record] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] identifier[keyColumns] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[generics] operator[+] literal[String] operator[SEP] } Keyword[else] { identifier[tType] operator[=] identifier[Record] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[tType] operator[SEP] }
private static Binding buildBinding(UrlLepResourceKey scriptResourceKey, LepManagerService managerService, LepMethod method, ProceedingLep proceedingLep, LepMethodResult lepMethodResult, Object... overrodeArgValues) { boolean isOverrodeArgs = overrodeArgValues != null && overrodeArgValues.length > 0; if (isOverrodeArgs) { int actual = overrodeArgValues.length; int expected = method.getMethodSignature().getParameterTypes().length; if (actual != expected) { throw new IllegalArgumentException("When calling LEP resource: " + scriptResourceKey + ", overrode method argument values " + "count doesn't corresponds method signature (expected: " + expected + ", actual: " + actual + ")"); } } Map<String, Object> lepContext = new LinkedHashMap<>(); Binding binding = new Binding(); // add execution context values ScopedContext executionContext = managerService.getContext(ContextScopes.EXECUTION); if (executionContext != null) { executionContext.getValues().forEach(lepContext::put); } // add method arg values final String[] parameterNames = method.getMethodSignature().getParameterNames(); final Object[] methodArgValues = isOverrodeArgs ? overrodeArgValues : method.getMethodArgValues(); Map<String, Object> inVars = new LinkedHashMap<>(parameterNames.length); for (int i = 0; i < parameterNames.length; i++) { String paramName = parameterNames[i]; Object paramValue = methodArgValues[i]; inVars.put(paramName, paramValue); } lepContext.put(XmLepScriptConstants.BINDING_KEY_IN_ARGS, inVars); // add proceedingLep support lepContext.put(XmLepScriptConstants.BINDING_KEY_LEP, proceedingLep); // add returned value if (lepMethodResult != null) { lepContext.put(XmLepScriptConstants.BINDING_KEY_RETURNED_VALUE, lepMethodResult.getReturnedValue()); } // add method result lepContext.put(XmLepScriptConstants.BINDING_KEY_METHOD_RESULT, lepMethodResult); binding.setVariable(XmLepScriptConstants.BINDING_VAR_LEP_SCRIPT_CONTEXT, lepContext); return binding; }
class class_name[name] begin[{] method[buildBinding, return_type[type[Binding]], modifier[private static], parameter[scriptResourceKey, managerService, method, proceedingLep, lepMethodResult, overrodeArgValues]] begin[{] local_variable[type[boolean], isOverrodeArgs] if[member[.isOverrodeArgs]] begin[{] local_variable[type[int], actual] local_variable[type[int], expected] if[binary_operation[member[.actual], !=, member[.expected]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="When calling LEP resource: "), operandr=MemberReference(member=scriptResourceKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", overrode method argument values "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="count doesn't corresponds method signature (expected: "), operator=+), operandr=MemberReference(member=expected, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", actual: "), operator=+), operandr=MemberReference(member=actual, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=")"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] else begin[{] None end[}] local_variable[type[Map], lepContext] local_variable[type[Binding], binding] local_variable[type[ScopedContext], executionContext] if[binary_operation[member[.executionContext], !=, literal[null]]] begin[{] call[executionContext.getValues, parameter[]] else begin[{] None end[}] local_variable[type[String], parameterNames] local_variable[type[Object], methodArgValues] local_variable[type[Map], inVars] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=parameterNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=paramName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=methodArgValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=paramValue)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=paramName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=paramValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=inVars, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=parameterNames, 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) call[lepContext.put, parameter[member[XmLepScriptConstants.BINDING_KEY_IN_ARGS], member[.inVars]]] call[lepContext.put, parameter[member[XmLepScriptConstants.BINDING_KEY_LEP], member[.proceedingLep]]] if[binary_operation[member[.lepMethodResult], !=, literal[null]]] begin[{] call[lepContext.put, parameter[member[XmLepScriptConstants.BINDING_KEY_RETURNED_VALUE], call[lepMethodResult.getReturnedValue, parameter[]]]] else begin[{] None end[}] call[lepContext.put, parameter[member[XmLepScriptConstants.BINDING_KEY_METHOD_RESULT], member[.lepMethodResult]]] call[binding.setVariable, parameter[member[XmLepScriptConstants.BINDING_VAR_LEP_SCRIPT_CONTEXT], member[.lepContext]]] return[member[.binding]] end[}] END[}]
Keyword[private] Keyword[static] identifier[Binding] identifier[buildBinding] operator[SEP] identifier[UrlLepResourceKey] identifier[scriptResourceKey] , identifier[LepManagerService] identifier[managerService] , identifier[LepMethod] identifier[method] , identifier[ProceedingLep] identifier[proceedingLep] , identifier[LepMethodResult] identifier[lepMethodResult] , identifier[Object] operator[...] identifier[overrodeArgValues] operator[SEP] { Keyword[boolean] identifier[isOverrodeArgs] operator[=] identifier[overrodeArgValues] operator[!=] Other[null] operator[&&] identifier[overrodeArgValues] operator[SEP] identifier[length] operator[>] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[isOverrodeArgs] operator[SEP] { Keyword[int] identifier[actual] operator[=] identifier[overrodeArgValues] operator[SEP] identifier[length] operator[SEP] Keyword[int] identifier[expected] operator[=] identifier[method] operator[SEP] identifier[getMethodSignature] operator[SEP] operator[SEP] operator[SEP] identifier[getParameterTypes] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] Keyword[if] operator[SEP] identifier[actual] operator[!=] identifier[expected] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[scriptResourceKey] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[expected] operator[+] literal[String] operator[+] identifier[actual] operator[+] literal[String] operator[SEP] operator[SEP] } } identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[lepContext] operator[=] Keyword[new] identifier[LinkedHashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Binding] identifier[binding] operator[=] Keyword[new] identifier[Binding] operator[SEP] operator[SEP] operator[SEP] identifier[ScopedContext] identifier[executionContext] operator[=] identifier[managerService] operator[SEP] identifier[getContext] operator[SEP] identifier[ContextScopes] operator[SEP] identifier[EXECUTION] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[executionContext] operator[!=] Other[null] operator[SEP] { identifier[executionContext] operator[SEP] identifier[getValues] operator[SEP] operator[SEP] operator[SEP] identifier[forEach] operator[SEP] identifier[lepContext] operator[::] identifier[put] operator[SEP] operator[SEP] } Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[parameterNames] operator[=] identifier[method] operator[SEP] identifier[getMethodSignature] operator[SEP] operator[SEP] operator[SEP] identifier[getParameterNames] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Object] operator[SEP] operator[SEP] identifier[methodArgValues] operator[=] identifier[isOverrodeArgs] operator[?] identifier[overrodeArgValues] operator[:] identifier[method] operator[SEP] identifier[getMethodArgValues] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[inVars] operator[=] Keyword[new] identifier[LinkedHashMap] operator[<] operator[>] operator[SEP] identifier[parameterNames] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[parameterNames] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[String] identifier[paramName] operator[=] identifier[parameterNames] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[Object] identifier[paramValue] operator[=] identifier[methodArgValues] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[inVars] operator[SEP] identifier[put] operator[SEP] identifier[paramName] , identifier[paramValue] operator[SEP] operator[SEP] } identifier[lepContext] operator[SEP] identifier[put] operator[SEP] identifier[XmLepScriptConstants] operator[SEP] identifier[BINDING_KEY_IN_ARGS] , identifier[inVars] operator[SEP] operator[SEP] identifier[lepContext] operator[SEP] identifier[put] operator[SEP] identifier[XmLepScriptConstants] operator[SEP] identifier[BINDING_KEY_LEP] , identifier[proceedingLep] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[lepMethodResult] operator[!=] Other[null] operator[SEP] { identifier[lepContext] operator[SEP] identifier[put] operator[SEP] identifier[XmLepScriptConstants] operator[SEP] identifier[BINDING_KEY_RETURNED_VALUE] , identifier[lepMethodResult] operator[SEP] identifier[getReturnedValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[lepContext] operator[SEP] identifier[put] operator[SEP] identifier[XmLepScriptConstants] operator[SEP] identifier[BINDING_KEY_METHOD_RESULT] , identifier[lepMethodResult] operator[SEP] operator[SEP] identifier[binding] operator[SEP] identifier[setVariable] operator[SEP] identifier[XmLepScriptConstants] operator[SEP] identifier[BINDING_VAR_LEP_SCRIPT_CONTEXT] , identifier[lepContext] operator[SEP] operator[SEP] Keyword[return] identifier[binding] operator[SEP] }
public void addTrace (String info) { if (info == null) throw new IllegalArgumentException("info cannot be null."); if (trace == null) trace = new StringBuffer(512); trace.append('\n'); trace.append(info); }
class class_name[name] begin[{] method[addTrace, return_type[void], modifier[public], parameter[info]] begin[{] if[binary_operation[member[.info], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="info 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[}] if[binary_operation[member[.trace], ==, literal[null]]] begin[{] assign[member[.trace], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=512)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuffer, sub_type=None))] else begin[{] None end[}] call[trace.append, parameter[literal['\n']]] call[trace.append, parameter[member[.info]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addTrace] operator[SEP] identifier[String] identifier[info] operator[SEP] { Keyword[if] operator[SEP] identifier[info] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[trace] operator[==] Other[null] operator[SEP] identifier[trace] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] Other[512] operator[SEP] operator[SEP] identifier[trace] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[trace] operator[SEP] identifier[append] operator[SEP] identifier[info] operator[SEP] operator[SEP] }
List<PageEntry> getEntries(int firstIndex, int lastIndex) { Preconditions.checkArgument(firstIndex <= lastIndex, "firstIndex must be smaller than or equal to lastIndex."); ArrayList<PageEntry> result = new ArrayList<>(); for (int i = firstIndex; i <= lastIndex; i++) { result.add(getEntryAt(i)); } return result; }
class class_name[name] begin[{] method[getEntries, return_type[type[List]], modifier[default], parameter[firstIndex, lastIndex]] begin[{] call[Preconditions.checkArgument, parameter[binary_operation[member[.firstIndex], <=, member[.lastIndex]], literal["firstIndex must be smaller than or equal to lastIndex."]]] local_variable[type[ArrayList], result] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getEntryAt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=lastIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=firstIndex, 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) return[member[.result]] end[}] END[}]
identifier[List] operator[<] identifier[PageEntry] operator[>] identifier[getEntries] operator[SEP] Keyword[int] identifier[firstIndex] , Keyword[int] identifier[lastIndex] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] identifier[firstIndex] operator[<=] identifier[lastIndex] , literal[String] operator[SEP] operator[SEP] identifier[ArrayList] operator[<] identifier[PageEntry] operator[>] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[firstIndex] operator[SEP] identifier[i] operator[<=] identifier[lastIndex] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[result] operator[SEP] identifier[add] operator[SEP] identifier[getEntryAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
protected Enumeration cleanUpCache(long now) { //create local variable - JIT performance improvement final boolean isTraceOn = com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled(); if (isTraceOn && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINER)) { LoggingUtil.SESSION_LOGGER_WAS.entering(methodClassName, methodNames[CLEAN_UP_CACHE]); } Vector timedOutSessions = new Vector(); Enumeration sessionIds = tableKeys(); while (sessionIds.hasMoreElements()) { String id = (String) sessionIds.nextElement(); BackedSession backedSess = (BackedSession) superGet(id); if (backedSess != null) { try { if (hasTimedOut(backedSess, now)) { if (isTraceOn && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) { LoggingUtil.SESSION_LOGGER_WAS.logp(Level.FINE, methodClassName, methodNames[CLEAN_UP_CACHE], "adding to inval list " + backedSess.getId()); } timedOutSessions.addElement(backedSess.getId()); } } catch (Throwable t) { com.ibm.ws.ffdc.FFDCFilter.processException(t, "com.ibm.ws.session.store.common.BackedHashMap.cleanUpCache", "951", backedSess); timedOutSessions.addElement(backedSess.getId()); } } } Enumeration timedOutEnum = timedOutSessions.elements(); handleDiscardedCacheItems(timedOutEnum); if (isTraceOn && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINER)) { LoggingUtil.SESSION_LOGGER_WAS.exiting(methodClassName, methodNames[CLEAN_UP_CACHE], timedOutSessions.elements()); } return timedOutSessions.elements(); }
class class_name[name] begin[{] method[cleanUpCache, return_type[type[Enumeration]], modifier[protected], parameter[now]] begin[{] local_variable[type[boolean], isTraceOn] if[binary_operation[member[.isTraceOn], &&, call[LoggingUtil.SESSION_LOGGER_WAS.isLoggable, parameter[member[Level.FINER]]]]] begin[{] call[LoggingUtil.SESSION_LOGGER_WAS.entering, parameter[member[.methodClassName], member[.methodNames]]] else begin[{] None end[}] local_variable[type[Vector], timedOutSessions] local_variable[type[Enumeration], sessionIds] while[call[sessionIds.hasMoreElements, parameter[]]] begin[{] local_variable[type[String], id] local_variable[type[BackedSession], backedSess] if[binary_operation[member[.backedSess], !=, literal[null]]] begin[{] TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=backedSess, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=now, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=hasTimedOut, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=isTraceOn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[MemberReference(member=FINE, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[])], member=isLoggable, postfix_operators=[], prefix_operators=[], qualifier=LoggingUtil.SESSION_LOGGER_WAS, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FINE, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[]), MemberReference(member=methodClassName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=methodNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=CLEAN_UP_CACHE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="adding to inval list "), operandr=MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=backedSess, selectors=[], type_arguments=None), operator=+)], member=logp, postfix_operators=[], prefix_operators=[], qualifier=LoggingUtil.SESSION_LOGGER_WAS, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=backedSess, selectors=[], type_arguments=None)], member=addElement, postfix_operators=[], prefix_operators=[], qualifier=timedOutSessions, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ws.session.store.common.BackedHashMap.cleanUpCache"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="951"), MemberReference(member=backedSess, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=com.ibm.ws.ffdc.FFDCFilter, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=backedSess, selectors=[], type_arguments=None)], member=addElement, postfix_operators=[], prefix_operators=[], qualifier=timedOutSessions, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] end[}] local_variable[type[Enumeration], timedOutEnum] call[.handleDiscardedCacheItems, parameter[member[.timedOutEnum]]] if[binary_operation[member[.isTraceOn], &&, call[LoggingUtil.SESSION_LOGGER_WAS.isLoggable, parameter[member[Level.FINER]]]]] begin[{] call[LoggingUtil.SESSION_LOGGER_WAS.exiting, parameter[member[.methodClassName], member[.methodNames], call[timedOutSessions.elements, parameter[]]]] else begin[{] None end[}] return[call[timedOutSessions.elements, parameter[]]] end[}] END[}]
Keyword[protected] identifier[Enumeration] identifier[cleanUpCache] operator[SEP] Keyword[long] identifier[now] operator[SEP] { Keyword[final] Keyword[boolean] identifier[isTraceOn] operator[=] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[websphere] operator[SEP] identifier[ras] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[LoggingUtil] operator[SEP] identifier[SESSION_LOGGER_WAS] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[FINER] operator[SEP] operator[SEP] { identifier[LoggingUtil] operator[SEP] identifier[SESSION_LOGGER_WAS] operator[SEP] identifier[entering] operator[SEP] identifier[methodClassName] , identifier[methodNames] operator[SEP] identifier[CLEAN_UP_CACHE] operator[SEP] operator[SEP] operator[SEP] } identifier[Vector] identifier[timedOutSessions] operator[=] Keyword[new] identifier[Vector] operator[SEP] operator[SEP] operator[SEP] identifier[Enumeration] identifier[sessionIds] operator[=] identifier[tableKeys] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[sessionIds] operator[SEP] identifier[hasMoreElements] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[id] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[sessionIds] operator[SEP] identifier[nextElement] operator[SEP] operator[SEP] operator[SEP] identifier[BackedSession] identifier[backedSess] operator[=] operator[SEP] identifier[BackedSession] operator[SEP] identifier[superGet] operator[SEP] identifier[id] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[backedSess] operator[!=] Other[null] operator[SEP] { Keyword[try] { Keyword[if] operator[SEP] identifier[hasTimedOut] operator[SEP] identifier[backedSess] , identifier[now] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[LoggingUtil] operator[SEP] identifier[SESSION_LOGGER_WAS] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[FINE] operator[SEP] operator[SEP] { identifier[LoggingUtil] operator[SEP] identifier[SESSION_LOGGER_WAS] operator[SEP] identifier[logp] operator[SEP] identifier[Level] operator[SEP] identifier[FINE] , identifier[methodClassName] , identifier[methodNames] operator[SEP] identifier[CLEAN_UP_CACHE] operator[SEP] , literal[String] operator[+] identifier[backedSess] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[timedOutSessions] operator[SEP] identifier[addElement] operator[SEP] identifier[backedSess] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ws] operator[SEP] identifier[ffdc] operator[SEP] identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[t] , literal[String] , literal[String] , identifier[backedSess] operator[SEP] operator[SEP] identifier[timedOutSessions] operator[SEP] identifier[addElement] operator[SEP] identifier[backedSess] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } identifier[Enumeration] identifier[timedOutEnum] operator[=] identifier[timedOutSessions] operator[SEP] identifier[elements] operator[SEP] operator[SEP] operator[SEP] identifier[handleDiscardedCacheItems] operator[SEP] identifier[timedOutEnum] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[LoggingUtil] operator[SEP] identifier[SESSION_LOGGER_WAS] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[FINER] operator[SEP] operator[SEP] { identifier[LoggingUtil] operator[SEP] identifier[SESSION_LOGGER_WAS] operator[SEP] identifier[exiting] operator[SEP] identifier[methodClassName] , identifier[methodNames] operator[SEP] identifier[CLEAN_UP_CACHE] operator[SEP] , identifier[timedOutSessions] operator[SEP] identifier[elements] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[timedOutSessions] operator[SEP] identifier[elements] operator[SEP] operator[SEP] operator[SEP] }
@CheckResult @NonNull public QueryObservable createQuery(@NonNull final Iterable<String> tables, @NonNull SupportSQLiteQuery query) { return createQuery(new DatabaseQuery(tables, query)); }
class class_name[name] begin[{] method[createQuery, return_type[type[QueryObservable]], modifier[public], parameter[tables, query]] begin[{] return[call[.createQuery, parameter[ClassCreator(arguments=[MemberReference(member=tables, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=query, 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=DatabaseQuery, sub_type=None))]]] end[}] END[}]
annotation[@] identifier[CheckResult] annotation[@] identifier[NonNull] Keyword[public] identifier[QueryObservable] identifier[createQuery] operator[SEP] annotation[@] identifier[NonNull] Keyword[final] identifier[Iterable] operator[<] identifier[String] operator[>] identifier[tables] , annotation[@] identifier[NonNull] identifier[SupportSQLiteQuery] identifier[query] operator[SEP] { Keyword[return] identifier[createQuery] operator[SEP] Keyword[new] identifier[DatabaseQuery] operator[SEP] identifier[tables] , identifier[query] operator[SEP] operator[SEP] operator[SEP] }
StringBuilder scanPara(String id) { char quotes = '"'; int localState = 0; int parenDepth = 1; // 指令后面参数的第一个 '(' 深度为 1 next(); int paraStart = forward; while (true) { switch (localState) { case 0: for (char c=peek(); true; c=next()) { if (c == ')') { parenDepth--; if (parenDepth == 0) { // parenDepth 不可能小于0,因为初始值为 1 next(); return subBuf(paraStart, forward - 2); } continue ; } if (c == '(') { parenDepth++; continue ; } if (c == '"' || c == '\'') { quotes = c; localState = 1; break ; } if (CharTable.isExprChar(c)) { continue ; } if (c == EOF) { throw new ParseException("#" + id + " parameter can not match the end char ')'", new Location(fileName, beginRow)); } throw new ParseException("#" + id + " parameter exists illegal char: '" + c + "'", new Location(fileName, beginRow)); } break ; case 1: for (char c=next(); true; c=next()) { if (c == quotes) { if (buf[forward - 1] != '\\') { // 前一个字符不是转义字符 next(); localState = 0; break ; } else { continue ; } } if (c == EOF) { throw new ParseException("#" + id + " parameter error, the string parameter not ending", new Location(fileName, beginRow)); } } break ; } } }
class class_name[name] begin[{] method[scanPara, return_type[type[StringBuilder]], modifier[default], parameter[id]] begin[{] local_variable[type[char], quotes] local_variable[type[int], localState] local_variable[type[int], parenDepth] call[.next, parameter[]] local_variable[type[int], paraStart] while[literal[true]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], statements=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=')'), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=parenDepth, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[]), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=parenDepth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=paraStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=forward, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=-)], member=subBuf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), ContinueStatement(goto=None, label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='('), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=parenDepth, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), ContinueStatement(goto=None, label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='"'), operator===), operandr=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\''), operator===), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=quotes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=localState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None), BreakStatement(goto=None, label=None)])), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isExprChar, postfix_operators=[], prefix_operators=[], qualifier=CharTable, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=EOF, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="#"), operandr=MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" parameter can not match the end char ')'"), operator=+), ClassCreator(arguments=[MemberReference(member=fileName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=beginRow, 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=Location, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ParseException, sub_type=None)), label=None)])), ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="#"), operandr=MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" parameter exists illegal char: '"), operator=+), operandr=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'"), operator=+), ClassCreator(arguments=[MemberReference(member=fileName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=beginRow, 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=Location, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ParseException, sub_type=None)), label=None)]), control=ForControl(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=peek, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=c)], modifiers=set(), type=BasicType(dimensions=[], name=char)), update=[Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None))]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=quotes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=buf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=forward, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\\'), operator=!=), else_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=localState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), BreakStatement(goto=None, label=None)]))])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=EOF, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="#"), operandr=MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" parameter error, the string parameter not ending"), operator=+), ClassCreator(arguments=[MemberReference(member=fileName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=beginRow, 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=Location, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ParseException, sub_type=None)), label=None)]))]), control=ForControl(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=c)], modifiers=set(), type=BasicType(dimensions=[], name=char)), update=[Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None))]), label=None), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=localState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] end[}] END[}]
identifier[StringBuilder] identifier[scanPara] operator[SEP] identifier[String] identifier[id] operator[SEP] { Keyword[char] identifier[quotes] operator[=] literal[String] operator[SEP] Keyword[int] identifier[localState] operator[=] Other[0] operator[SEP] Keyword[int] identifier[parenDepth] operator[=] Other[1] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[paraStart] operator[=] identifier[forward] operator[SEP] Keyword[while] operator[SEP] literal[boolean] operator[SEP] { Keyword[switch] operator[SEP] identifier[localState] operator[SEP] { Keyword[case] Other[0] operator[:] Keyword[for] operator[SEP] Keyword[char] identifier[c] operator[=] identifier[peek] operator[SEP] operator[SEP] operator[SEP] literal[boolean] operator[SEP] identifier[c] operator[=] identifier[next] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[SEP] { identifier[parenDepth] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[parenDepth] operator[==] Other[0] operator[SEP] { identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[subBuf] operator[SEP] identifier[paraStart] , identifier[forward] operator[-] Other[2] operator[SEP] operator[SEP] } Keyword[continue] operator[SEP] } Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[SEP] { identifier[parenDepth] operator[++] operator[SEP] Keyword[continue] operator[SEP] } Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[||] identifier[c] operator[==] literal[String] operator[SEP] { identifier[quotes] operator[=] identifier[c] operator[SEP] identifier[localState] operator[=] Other[1] operator[SEP] Keyword[break] operator[SEP] } Keyword[if] operator[SEP] identifier[CharTable] operator[SEP] identifier[isExprChar] operator[SEP] identifier[c] operator[SEP] operator[SEP] { Keyword[continue] operator[SEP] } Keyword[if] operator[SEP] identifier[c] operator[==] identifier[EOF] operator[SEP] { Keyword[throw] Keyword[new] identifier[ParseException] operator[SEP] literal[String] operator[+] identifier[id] operator[+] literal[String] , Keyword[new] identifier[Location] operator[SEP] identifier[fileName] , identifier[beginRow] operator[SEP] operator[SEP] operator[SEP] } Keyword[throw] Keyword[new] identifier[ParseException] operator[SEP] literal[String] operator[+] identifier[id] operator[+] literal[String] operator[+] identifier[c] operator[+] literal[String] , Keyword[new] identifier[Location] operator[SEP] identifier[fileName] , identifier[beginRow] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[1] operator[:] Keyword[for] operator[SEP] Keyword[char] identifier[c] operator[=] identifier[next] operator[SEP] operator[SEP] operator[SEP] literal[boolean] operator[SEP] identifier[c] operator[=] identifier[next] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[c] operator[==] identifier[quotes] operator[SEP] { Keyword[if] operator[SEP] identifier[buf] operator[SEP] identifier[forward] operator[-] Other[1] operator[SEP] operator[!=] literal[String] operator[SEP] { identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[localState] operator[=] Other[0] operator[SEP] Keyword[break] operator[SEP] } Keyword[else] { Keyword[continue] operator[SEP] } } Keyword[if] operator[SEP] identifier[c] operator[==] identifier[EOF] operator[SEP] { Keyword[throw] Keyword[new] identifier[ParseException] operator[SEP] literal[String] operator[+] identifier[id] operator[+] literal[String] , Keyword[new] identifier[Location] operator[SEP] identifier[fileName] , identifier[beginRow] operator[SEP] operator[SEP] operator[SEP] } } Keyword[break] operator[SEP] } } }
private boolean updateLinkRemoveValues() { Set<String> removeSet = m_dbObj.getRemoveValues(m_fieldName); List<String> addSet = m_dbObj.getFieldValues(m_fieldName); if (removeSet != null && addSet != null) { removeSet.removeAll(addSet); // add+remove of same ID negates the remove } if (removeSet == null || removeSet.size() == 0) { return false; } for (String removeObjID : removeSet) { deleteLinkValue(removeObjID); } return true; }
class class_name[name] begin[{] method[updateLinkRemoveValues, return_type[type[boolean]], modifier[private], parameter[]] begin[{] local_variable[type[Set], removeSet] local_variable[type[List], addSet] if[binary_operation[binary_operation[member[.removeSet], !=, literal[null]], &&, binary_operation[member[.addSet], !=, literal[null]]]] begin[{] call[removeSet.removeAll, parameter[member[.addSet]]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.removeSet], ==, literal[null]], ||, binary_operation[call[removeSet.size, parameter[]], ==, literal[0]]]] begin[{] return[literal[false]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=removeObjID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=deleteLinkValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=removeSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=removeObjID)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[literal[true]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[updateLinkRemoveValues] operator[SEP] operator[SEP] { identifier[Set] operator[<] identifier[String] operator[>] identifier[removeSet] operator[=] identifier[m_dbObj] operator[SEP] identifier[getRemoveValues] operator[SEP] identifier[m_fieldName] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[addSet] operator[=] identifier[m_dbObj] operator[SEP] identifier[getFieldValues] operator[SEP] identifier[m_fieldName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[removeSet] operator[!=] Other[null] operator[&&] identifier[addSet] operator[!=] Other[null] operator[SEP] { identifier[removeSet] operator[SEP] identifier[removeAll] operator[SEP] identifier[addSet] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[removeSet] operator[==] Other[null] operator[||] identifier[removeSet] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[for] operator[SEP] identifier[String] identifier[removeObjID] operator[:] identifier[removeSet] operator[SEP] { identifier[deleteLinkValue] operator[SEP] identifier[removeObjID] operator[SEP] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public static AlipayTradeOrderSettleResponse tradeOrderSettleToResponse(AlipayTradeOrderSettleModel model, String appAuthToken) throws AlipayApiException { AlipayTradeOrderSettleRequest request = new AlipayTradeOrderSettleRequest(); request.setBizModel(model); return AliPayApiConfigKit.getAliPayApiConfig().getAlipayClient().execute(request, null, appAuthToken); }
class class_name[name] begin[{] method[tradeOrderSettleToResponse, return_type[type[AlipayTradeOrderSettleResponse]], modifier[public static], parameter[model, appAuthToken]] begin[{] local_variable[type[AlipayTradeOrderSettleRequest], request] call[request.setBizModel, parameter[member[.model]]] return[call[AliPayApiConfigKit.getAliPayApiConfig, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[AlipayTradeOrderSettleResponse] identifier[tradeOrderSettleToResponse] operator[SEP] identifier[AlipayTradeOrderSettleModel] identifier[model] , identifier[String] identifier[appAuthToken] operator[SEP] Keyword[throws] identifier[AlipayApiException] { identifier[AlipayTradeOrderSettleRequest] identifier[request] operator[=] Keyword[new] identifier[AlipayTradeOrderSettleRequest] operator[SEP] operator[SEP] operator[SEP] identifier[request] operator[SEP] identifier[setBizModel] operator[SEP] identifier[model] operator[SEP] operator[SEP] Keyword[return] identifier[AliPayApiConfigKit] operator[SEP] identifier[getAliPayApiConfig] operator[SEP] operator[SEP] operator[SEP] identifier[getAlipayClient] operator[SEP] operator[SEP] operator[SEP] identifier[execute] operator[SEP] identifier[request] , Other[null] , identifier[appAuthToken] operator[SEP] operator[SEP] }
public static base_response init(nitro_service client, sslfipssimsource resource) throws Exception { sslfipssimsource initresource = new sslfipssimsource(); initresource.certfile = resource.certfile; return initresource.perform_operation(client,"init"); }
class class_name[name] begin[{] method[init, return_type[type[base_response]], modifier[public static], parameter[client, resource]] begin[{] local_variable[type[sslfipssimsource], initresource] assign[member[initresource.certfile], member[resource.certfile]] return[call[initresource.perform_operation, parameter[member[.client], literal["init"]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[base_response] identifier[init] operator[SEP] identifier[nitro_service] identifier[client] , identifier[sslfipssimsource] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] { identifier[sslfipssimsource] identifier[initresource] operator[=] Keyword[new] identifier[sslfipssimsource] operator[SEP] operator[SEP] operator[SEP] identifier[initresource] operator[SEP] identifier[certfile] operator[=] identifier[resource] operator[SEP] identifier[certfile] operator[SEP] Keyword[return] identifier[initresource] operator[SEP] identifier[perform_operation] operator[SEP] identifier[client] , literal[String] operator[SEP] operator[SEP] }
public OvhServiceMonitoring serviceName_serviceMonitoring_monitoringId_GET(String serviceName, Long monitoringId) throws IOException { String qPath = "/dedicated/server/{serviceName}/serviceMonitoring/{monitoringId}"; StringBuilder sb = path(qPath, serviceName, monitoringId); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhServiceMonitoring.class); }
class class_name[name] begin[{] method[serviceName_serviceMonitoring_monitoringId_GET, return_type[type[OvhServiceMonitoring]], modifier[public], parameter[serviceName, monitoringId]] begin[{] local_variable[type[String], qPath] local_variable[type[StringBuilder], sb] local_variable[type[String], resp] return[call[.convertTo, parameter[member[.resp], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OvhServiceMonitoring, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[OvhServiceMonitoring] identifier[serviceName_serviceMonitoring_monitoringId_GET] operator[SEP] identifier[String] identifier[serviceName] , identifier[Long] identifier[monitoringId] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[qPath] operator[=] literal[String] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] identifier[path] operator[SEP] identifier[qPath] , identifier[serviceName] , identifier[monitoringId] operator[SEP] operator[SEP] identifier[String] identifier[resp] operator[=] identifier[exec] operator[SEP] identifier[qPath] , literal[String] , identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , Other[null] operator[SEP] operator[SEP] Keyword[return] identifier[convertTo] operator[SEP] identifier[resp] , identifier[OvhServiceMonitoring] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public Tile getAboveLeft() { int y = tileY - 1; int x = tileX - 1; if (y < 0) { y = getMaxTileNumber(this.zoomLevel); } if (x < 0) { x = getMaxTileNumber(this.zoomLevel); } return new Tile(x, y, this.zoomLevel, this.tileSize); }
class class_name[name] begin[{] method[getAboveLeft, return_type[type[Tile]], modifier[public], parameter[]] begin[{] local_variable[type[int], y] local_variable[type[int], x] if[binary_operation[member[.y], <, literal[0]]] begin[{] assign[member[.y], call[.getMaxTileNumber, parameter[THIS[member[None.zoomLevel]]]]] else begin[{] None end[}] if[binary_operation[member[.x], <, literal[0]]] begin[{] assign[member[.x], call[.getMaxTileNumber, parameter[THIS[member[None.zoomLevel]]]]] else begin[{] None end[}] return[ClassCreator(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=zoomLevel, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=tileSize, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Tile, sub_type=None))] end[}] END[}]
Keyword[public] identifier[Tile] identifier[getAboveLeft] operator[SEP] operator[SEP] { Keyword[int] identifier[y] operator[=] identifier[tileY] operator[-] Other[1] operator[SEP] Keyword[int] identifier[x] operator[=] identifier[tileX] operator[-] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[y] operator[<] Other[0] operator[SEP] { identifier[y] operator[=] identifier[getMaxTileNumber] operator[SEP] Keyword[this] operator[SEP] identifier[zoomLevel] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[x] operator[<] Other[0] operator[SEP] { identifier[x] operator[=] identifier[getMaxTileNumber] operator[SEP] Keyword[this] operator[SEP] identifier[zoomLevel] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[Tile] operator[SEP] identifier[x] , identifier[y] , Keyword[this] operator[SEP] identifier[zoomLevel] , Keyword[this] operator[SEP] identifier[tileSize] operator[SEP] operator[SEP] }
public void setCase(String v) { if (PronounFeats_Type.featOkTst && ((PronounFeats_Type)jcasType).casFeat_case == null) jcasType.jcas.throwFeatMissing("case", "de.julielab.jules.types.PronounFeats"); jcasType.ll_cas.ll_setStringValue(addr, ((PronounFeats_Type)jcasType).casFeatCode_case, v);}
class class_name[name] begin[{] method[setCase, return_type[void], modifier[public], parameter[v]] begin[{] if[binary_operation[member[PronounFeats_Type.featOkTst], &&, binary_operation[Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=PronounFeats_Type, sub_type=None)), ==, literal[null]]]] begin[{] call[jcasType.jcas.throwFeatMissing, parameter[literal["case"], literal["de.julielab.jules.types.PronounFeats"]]] else begin[{] None end[}] call[jcasType.ll_cas.ll_setStringValue, parameter[member[.addr], Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=PronounFeats_Type, sub_type=None)), member[.v]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setCase] operator[SEP] identifier[String] identifier[v] operator[SEP] { Keyword[if] operator[SEP] identifier[PronounFeats_Type] operator[SEP] identifier[featOkTst] operator[&&] operator[SEP] operator[SEP] identifier[PronounFeats_Type] operator[SEP] identifier[jcasType] operator[SEP] operator[SEP] identifier[casFeat_case] operator[==] Other[null] operator[SEP] identifier[jcasType] operator[SEP] identifier[jcas] operator[SEP] identifier[throwFeatMissing] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[jcasType] operator[SEP] identifier[ll_cas] operator[SEP] identifier[ll_setStringValue] operator[SEP] identifier[addr] , operator[SEP] operator[SEP] identifier[PronounFeats_Type] operator[SEP] identifier[jcasType] operator[SEP] operator[SEP] identifier[casFeatCode_case] , identifier[v] operator[SEP] operator[SEP] }
public SourceUnit addSource(File file) { return addSource(new SourceUnit(file, configuration, classLoader, getErrorCollector())); }
class class_name[name] begin[{] method[addSource, return_type[type[SourceUnit]], modifier[public], parameter[file]] begin[{] return[call[.addSource, parameter[ClassCreator(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=configuration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=classLoader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getErrorCollector, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SourceUnit, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[SourceUnit] identifier[addSource] operator[SEP] identifier[File] identifier[file] operator[SEP] { Keyword[return] identifier[addSource] operator[SEP] Keyword[new] identifier[SourceUnit] operator[SEP] identifier[file] , identifier[configuration] , identifier[classLoader] , identifier[getErrorCollector] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private void initButtonPanel() { if ((m_buttonPanel == null) && m_isFrame) { m_buttonPanel = new FlowPanel(); m_buttonPanel.addStyleName(I_CmsLayoutBundle.INSTANCE.dialogCss().popupButtonPanel()); m_main.add(m_buttonPanel); } }
class class_name[name] begin[{] method[initButtonPanel, return_type[void], modifier[private], parameter[]] begin[{] if[binary_operation[binary_operation[member[.m_buttonPanel], ==, literal[null]], &&, member[.m_isFrame]]] begin[{] assign[member[.m_buttonPanel], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FlowPanel, sub_type=None))] call[m_buttonPanel.addStyleName, parameter[call[I_CmsLayoutBundle.INSTANCE.dialogCss, parameter[]]]] call[m_main.add, parameter[member[.m_buttonPanel]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[initButtonPanel] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[m_buttonPanel] operator[==] Other[null] operator[SEP] operator[&&] identifier[m_isFrame] operator[SEP] { identifier[m_buttonPanel] operator[=] Keyword[new] identifier[FlowPanel] operator[SEP] operator[SEP] operator[SEP] identifier[m_buttonPanel] operator[SEP] identifier[addStyleName] operator[SEP] identifier[I_CmsLayoutBundle] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[dialogCss] operator[SEP] operator[SEP] operator[SEP] identifier[popupButtonPanel] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[m_main] operator[SEP] identifier[add] operator[SEP] identifier[m_buttonPanel] operator[SEP] operator[SEP] } }
public com.google.cloud.audit.AuthorizationInfo getAuthorizationInfo(int index) { return authorizationInfo_.get(index); }
class class_name[name] begin[{] method[getAuthorizationInfo, return_type[type[com]], modifier[public], parameter[index]] begin[{] return[call[authorizationInfo_.get, parameter[member[.index]]]] end[}] END[}]
Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[cloud] operator[SEP] identifier[audit] operator[SEP] identifier[AuthorizationInfo] identifier[getAuthorizationInfo] operator[SEP] Keyword[int] identifier[index] operator[SEP] { Keyword[return] identifier[authorizationInfo_] operator[SEP] identifier[get] operator[SEP] identifier[index] operator[SEP] operator[SEP] }
public static Map assoc(final Map map, final Object[] path, final Object value) { return assoc(map, map.getClass(), path, value); }
class class_name[name] begin[{] method[assoc, return_type[type[Map]], modifier[public static], parameter[map, path, value]] begin[{] return[call[.assoc, parameter[member[.map], call[map.getClass, parameter[]], member[.path], member[.value]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Map] identifier[assoc] operator[SEP] Keyword[final] identifier[Map] identifier[map] , Keyword[final] identifier[Object] operator[SEP] operator[SEP] identifier[path] , Keyword[final] identifier[Object] identifier[value] operator[SEP] { Keyword[return] identifier[assoc] operator[SEP] identifier[map] , identifier[map] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] , identifier[path] , identifier[value] operator[SEP] operator[SEP] }
protected void validateUrl(String field, String errorKey, String errorMessage) { String value = controller.getPara(field); if (StrKit.isBlank(value)) { addError(errorKey, errorMessage); return ; } try { value = value.trim(); if (value.startsWith("https://")) { value = "http://" + value.substring(8); // URL doesn't understand the https protocol, hack it } new URL(value); } catch (MalformedURLException e) { addError(errorKey, errorMessage); } }
class class_name[name] begin[{] method[validateUrl, return_type[void], modifier[protected], parameter[field, errorKey, errorMessage]] begin[{] local_variable[type[String], value] if[call[StrKit.isBlank, parameter[member[.value]]]] begin[{] call[.addError, parameter[member[.errorKey], member[.errorMessage]]] return[None] else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=trim, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None)), label=None), IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="https://")], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="http://"), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), operator=+)), label=None)])), StatementExpression(expression=ClassCreator(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=URL, sub_type=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=errorKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=errorMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['MalformedURLException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[protected] Keyword[void] identifier[validateUrl] operator[SEP] identifier[String] identifier[field] , identifier[String] identifier[errorKey] , identifier[String] identifier[errorMessage] operator[SEP] { identifier[String] identifier[value] operator[=] identifier[controller] operator[SEP] identifier[getPara] operator[SEP] identifier[field] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[StrKit] operator[SEP] identifier[isBlank] operator[SEP] identifier[value] operator[SEP] operator[SEP] { identifier[addError] operator[SEP] identifier[errorKey] , identifier[errorMessage] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[try] { identifier[value] operator[=] identifier[value] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[value] operator[=] literal[String] operator[+] identifier[value] operator[SEP] identifier[substring] operator[SEP] Other[8] operator[SEP] operator[SEP] } Keyword[new] identifier[URL] operator[SEP] identifier[value] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[MalformedURLException] identifier[e] operator[SEP] { identifier[addError] operator[SEP] identifier[errorKey] , identifier[errorMessage] operator[SEP] operator[SEP] } }
public static <K, V> Map<K, V> toSorted(Map<K, V> self) { return toSorted(self, new NumberAwareValueComparator<K, V>()); }
class class_name[name] begin[{] method[toSorted, return_type[type[Map]], modifier[public static], parameter[self]] begin[{] return[call[.toSorted, parameter[member[.self], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=K, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None))], dimensions=None, name=NumberAwareValueComparator, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[toSorted] operator[SEP] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[self] operator[SEP] { Keyword[return] identifier[toSorted] operator[SEP] identifier[self] , Keyword[new] identifier[NumberAwareValueComparator] operator[<] identifier[K] , identifier[V] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override public String buildSetFormValues() { StringBuffer result = new StringBuffer(1024); Iterator<String> i = getExplorerTypeSettings().getProperties().iterator(); // iterate over the customized properties while (i.hasNext()) { String curProperty = i.next(); if (getActiveProperties().containsKey(curProperty)) { CmsProperty property = getActiveProperties().get(curProperty); String propValue = property.getValue(); if (propValue != null) { propValue = propValue.trim(); propValue = CmsStringUtil.escapeJavaScript(propValue); // create the JS output for a single property result.append("\tdocument.getElementById(\""); result.append(PREFIX_VALUE); result.append(curProperty); result.append("\").value = \""); result.append(propValue); result.append("\";\n"); } } } // check if the navigation text property value has to be added if (showNavigation() && getActiveProperties().containsKey(CmsPropertyDefinition.PROPERTY_NAVTEXT)) { CmsProperty property = getActiveProperties().get(CmsPropertyDefinition.PROPERTY_NAVTEXT); String propValue = property.getValue(); if (propValue != null) { propValue = propValue.trim(); propValue = CmsStringUtil.escapeJavaScript(propValue); // create the JS output for a single property result.append("\tdocument.getElementById(\""); result.append(PREFIX_VALUE); result.append(CmsPropertyDefinition.PROPERTY_NAVTEXT); result.append("\").value = \""); result.append(propValue); result.append("\";\n"); } } return result.toString(); }
class class_name[name] begin[{] method[buildSetFormValues, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[StringBuffer], result] local_variable[type[Iterator], i] while[call[i.hasNext, parameter[]]] begin[{] local_variable[type[String], curProperty] if[call[.getActiveProperties, parameter[]]] begin[{] local_variable[type[CmsProperty], property] local_variable[type[String], propValue] if[binary_operation[member[.propValue], !=, literal[null]]] begin[{] assign[member[.propValue], call[propValue.trim, parameter[]]] assign[member[.propValue], call[CmsStringUtil.escapeJavaScript, parameter[member[.propValue]]]] call[result.append, parameter[literal["\tdocument.getElementById(\""]]] call[result.append, parameter[member[.PREFIX_VALUE]]] call[result.append, parameter[member[.curProperty]]] call[result.append, parameter[literal["\").value = \""]]] call[result.append, parameter[member[.propValue]]] call[result.append, parameter[literal["\";\n"]]] else begin[{] None end[}] else begin[{] None end[}] end[}] if[binary_operation[call[.showNavigation, parameter[]], &&, call[.getActiveProperties, parameter[]]]] begin[{] local_variable[type[CmsProperty], property] local_variable[type[String], propValue] if[binary_operation[member[.propValue], !=, literal[null]]] begin[{] assign[member[.propValue], call[propValue.trim, parameter[]]] assign[member[.propValue], call[CmsStringUtil.escapeJavaScript, parameter[member[.propValue]]]] call[result.append, parameter[literal["\tdocument.getElementById(\""]]] call[result.append, parameter[member[.PREFIX_VALUE]]] call[result.append, parameter[member[CmsPropertyDefinition.PROPERTY_NAVTEXT]]] call[result.append, parameter[literal["\").value = \""]]] call[result.append, parameter[member[.propValue]]] call[result.append, parameter[literal["\";\n"]]] else begin[{] None end[}] else begin[{] None end[}] return[call[result.toString, parameter[]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[buildSetFormValues] operator[SEP] operator[SEP] { identifier[StringBuffer] identifier[result] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] Other[1024] operator[SEP] operator[SEP] identifier[Iterator] operator[<] identifier[String] operator[>] identifier[i] operator[=] identifier[getExplorerTypeSettings] operator[SEP] operator[SEP] operator[SEP] identifier[getProperties] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[i] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[curProperty] operator[=] identifier[i] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[getActiveProperties] operator[SEP] operator[SEP] operator[SEP] identifier[containsKey] operator[SEP] identifier[curProperty] operator[SEP] operator[SEP] { identifier[CmsProperty] identifier[property] operator[=] identifier[getActiveProperties] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[curProperty] operator[SEP] operator[SEP] identifier[String] identifier[propValue] operator[=] identifier[property] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[propValue] operator[!=] Other[null] operator[SEP] { identifier[propValue] operator[=] identifier[propValue] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[propValue] operator[=] identifier[CmsStringUtil] operator[SEP] identifier[escapeJavaScript] operator[SEP] identifier[propValue] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[append] operator[SEP] identifier[PREFIX_VALUE] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[append] operator[SEP] identifier[curProperty] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[append] operator[SEP] identifier[propValue] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[showNavigation] operator[SEP] operator[SEP] operator[&&] identifier[getActiveProperties] operator[SEP] operator[SEP] operator[SEP] identifier[containsKey] operator[SEP] identifier[CmsPropertyDefinition] operator[SEP] identifier[PROPERTY_NAVTEXT] operator[SEP] operator[SEP] { identifier[CmsProperty] identifier[property] operator[=] identifier[getActiveProperties] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[CmsPropertyDefinition] operator[SEP] identifier[PROPERTY_NAVTEXT] operator[SEP] operator[SEP] identifier[String] identifier[propValue] operator[=] identifier[property] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[propValue] operator[!=] Other[null] operator[SEP] { identifier[propValue] operator[=] identifier[propValue] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[propValue] operator[=] identifier[CmsStringUtil] operator[SEP] identifier[escapeJavaScript] operator[SEP] identifier[propValue] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[append] operator[SEP] identifier[PREFIX_VALUE] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[append] operator[SEP] identifier[CmsPropertyDefinition] operator[SEP] identifier[PROPERTY_NAVTEXT] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[append] operator[SEP] identifier[propValue] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } } Keyword[return] identifier[result] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public String getString(String key) { return resolver.getMessage(caller, null, ivBundleName, key, null, null, false, null, false); }
class class_name[name] begin[{] method[getString, return_type[type[String]], modifier[public], parameter[key]] begin[{] return[call[resolver.getMessage, parameter[member[.caller], literal[null], member[.ivBundleName], member[.key], literal[null], literal[null], literal[false], literal[null], literal[false]]]] end[}] END[}]
Keyword[public] identifier[String] identifier[getString] operator[SEP] identifier[String] identifier[key] operator[SEP] { Keyword[return] identifier[resolver] operator[SEP] identifier[getMessage] operator[SEP] identifier[caller] , Other[null] , identifier[ivBundleName] , identifier[key] , Other[null] , Other[null] , literal[boolean] , Other[null] , literal[boolean] operator[SEP] operator[SEP] }
@Override protected void initView() { super.initView(); final ImageView appName = new ImageView(TodosImages.HEADER_LOGO.get()); node().setTop(appName); this.borderPane = new BorderPane(); node().setCenter(this.borderPane); this.borderPane.setTop(model().headerModel().node()); this.borderPane.setCenter(model().contentModel().node()); this.borderPane.setBottom(model().statusModel().node()); }
class class_name[name] begin[{] method[initView, return_type[void], modifier[protected], parameter[]] begin[{] SuperMethodInvocation(arguments=[], member=initView, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) local_variable[type[ImageView], appName] call[.node, parameter[]] assign[THIS[member[None.borderPane]], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BorderPane, sub_type=None))] call[.node, parameter[]] THIS[member[None.borderPane]call[None.setTop, parameter[call[.model, parameter[]]]]] THIS[member[None.borderPane]call[None.setCenter, parameter[call[.model, parameter[]]]]] THIS[member[None.borderPane]call[None.setBottom, parameter[call[.model, parameter[]]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[initView] operator[SEP] operator[SEP] { Keyword[super] operator[SEP] identifier[initView] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[ImageView] identifier[appName] operator[=] Keyword[new] identifier[ImageView] operator[SEP] identifier[TodosImages] operator[SEP] identifier[HEADER_LOGO] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[node] operator[SEP] operator[SEP] operator[SEP] identifier[setTop] operator[SEP] identifier[appName] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[borderPane] operator[=] Keyword[new] identifier[BorderPane] operator[SEP] operator[SEP] operator[SEP] identifier[node] operator[SEP] operator[SEP] operator[SEP] identifier[setCenter] operator[SEP] Keyword[this] operator[SEP] identifier[borderPane] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[borderPane] operator[SEP] identifier[setTop] operator[SEP] identifier[model] operator[SEP] operator[SEP] operator[SEP] identifier[headerModel] operator[SEP] operator[SEP] operator[SEP] identifier[node] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[borderPane] operator[SEP] identifier[setCenter] operator[SEP] identifier[model] operator[SEP] operator[SEP] operator[SEP] identifier[contentModel] operator[SEP] operator[SEP] operator[SEP] identifier[node] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[borderPane] operator[SEP] identifier[setBottom] operator[SEP] identifier[model] operator[SEP] operator[SEP] operator[SEP] identifier[statusModel] operator[SEP] operator[SEP] operator[SEP] identifier[node] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public ArrayList<V> toArrayList (int maxElements) throws SQLException { ArrayList<V> al = new ArrayList<V>(Math.min(maxElements, 100)); V o; while (--maxElements >= 0 && (o = next()) != null) { al.add(o); } return al; }
class class_name[name] begin[{] method[toArrayList, return_type[type[ArrayList]], modifier[public], parameter[maxElements]] begin[{] local_variable[type[ArrayList], al] local_variable[type[V], o] while[binary_operation[binary_operation[member[.maxElements], >=, literal[0]], &&, binary_operation[assign[member[.o], call[.next, parameter[]]], !=, literal[null]]]] begin[{] call[al.add, parameter[member[.o]]] end[}] return[member[.al]] end[}] END[}]
Keyword[public] identifier[ArrayList] operator[<] identifier[V] operator[>] identifier[toArrayList] operator[SEP] Keyword[int] identifier[maxElements] operator[SEP] Keyword[throws] identifier[SQLException] { identifier[ArrayList] operator[<] identifier[V] operator[>] identifier[al] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[V] operator[>] operator[SEP] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[maxElements] , Other[100] operator[SEP] operator[SEP] operator[SEP] identifier[V] identifier[o] operator[SEP] Keyword[while] operator[SEP] operator[--] identifier[maxElements] operator[>=] Other[0] operator[&&] operator[SEP] identifier[o] operator[=] identifier[next] operator[SEP] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[al] operator[SEP] identifier[add] operator[SEP] identifier[o] operator[SEP] operator[SEP] } Keyword[return] identifier[al] operator[SEP] }
public void updateFrameData(String id, byte[] data) { if (frames.containsKey(id)) { ((ID3v2Frame) frames.get(id)).setFrameData(data); } else { ID3v2Frame frame = new ID3v2Frame(id, data); frames.put(id, frame); } updateSize(); }
class class_name[name] begin[{] method[updateFrameData, return_type[void], modifier[public], parameter[id, data]] begin[{] if[call[frames.containsKey, parameter[member[.id]]]] begin[{] Cast(expression=MethodInvocation(arguments=[MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=frames, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=ID3v2Frame, sub_type=None)) else begin[{] local_variable[type[ID3v2Frame], frame] call[frames.put, parameter[member[.id], member[.frame]]] end[}] call[.updateSize, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[updateFrameData] operator[SEP] identifier[String] identifier[id] , Keyword[byte] operator[SEP] operator[SEP] identifier[data] operator[SEP] { Keyword[if] operator[SEP] identifier[frames] operator[SEP] identifier[containsKey] operator[SEP] identifier[id] operator[SEP] operator[SEP] { operator[SEP] operator[SEP] identifier[ID3v2Frame] operator[SEP] identifier[frames] operator[SEP] identifier[get] operator[SEP] identifier[id] operator[SEP] operator[SEP] operator[SEP] identifier[setFrameData] operator[SEP] identifier[data] operator[SEP] operator[SEP] } Keyword[else] { identifier[ID3v2Frame] identifier[frame] operator[=] Keyword[new] identifier[ID3v2Frame] operator[SEP] identifier[id] , identifier[data] operator[SEP] operator[SEP] identifier[frames] operator[SEP] identifier[put] operator[SEP] identifier[id] , identifier[frame] operator[SEP] operator[SEP] } identifier[updateSize] operator[SEP] operator[SEP] operator[SEP] }
private Optional<String> tryGerritHttpAuth(HttpClientBuilder client, HttpContext httpContext) throws IOException, HttpStatusException { String loginUrl = authData.getHost() + "/login/"; HttpResponse loginResponse = httpRequestExecutor.execute(client, new HttpGet(loginUrl), httpContext); return extractGerritAuth(loginResponse); }
class class_name[name] begin[{] method[tryGerritHttpAuth, return_type[type[Optional]], modifier[private], parameter[client, httpContext]] begin[{] local_variable[type[String], loginUrl] local_variable[type[HttpResponse], loginResponse] return[call[.extractGerritAuth, parameter[member[.loginResponse]]]] end[}] END[}]
Keyword[private] identifier[Optional] operator[<] identifier[String] operator[>] identifier[tryGerritHttpAuth] operator[SEP] identifier[HttpClientBuilder] identifier[client] , identifier[HttpContext] identifier[httpContext] operator[SEP] Keyword[throws] identifier[IOException] , identifier[HttpStatusException] { identifier[String] identifier[loginUrl] operator[=] identifier[authData] operator[SEP] identifier[getHost] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] identifier[HttpResponse] identifier[loginResponse] operator[=] identifier[httpRequestExecutor] operator[SEP] identifier[execute] operator[SEP] identifier[client] , Keyword[new] identifier[HttpGet] operator[SEP] identifier[loginUrl] operator[SEP] , identifier[httpContext] operator[SEP] operator[SEP] Keyword[return] identifier[extractGerritAuth] operator[SEP] identifier[loginResponse] operator[SEP] operator[SEP] }
public void marshall(Application application, ProtocolMarshaller protocolMarshaller) { if (application == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(application.getName(), NAME_BINDING); protocolMarshaller.marshall(application.getVersion(), VERSION_BINDING); protocolMarshaller.marshall(application.getArgs(), ARGS_BINDING); protocolMarshaller.marshall(application.getAdditionalInfo(), ADDITIONALINFO_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[application, protocolMarshaller]] begin[{] if[binary_operation[member[.application], ==, 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=getName, postfix_operators=[], prefix_operators=[], qualifier=application, selectors=[], type_arguments=None), MemberReference(member=NAME_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=getVersion, postfix_operators=[], prefix_operators=[], qualifier=application, selectors=[], type_arguments=None), MemberReference(member=VERSION_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=getArgs, postfix_operators=[], prefix_operators=[], qualifier=application, selectors=[], type_arguments=None), MemberReference(member=ARGS_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=getAdditionalInfo, postfix_operators=[], prefix_operators=[], qualifier=application, selectors=[], type_arguments=None), MemberReference(member=ADDITIONALINFO_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[Application] identifier[application] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[application] 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[application] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[NAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[application] operator[SEP] identifier[getVersion] operator[SEP] operator[SEP] , identifier[VERSION_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[application] operator[SEP] identifier[getArgs] operator[SEP] operator[SEP] , identifier[ARGS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[application] operator[SEP] identifier[getAdditionalInfo] operator[SEP] operator[SEP] , identifier[ADDITIONALINFO_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 boolean containsKey(String inputKey) { String key = Normalizer.normalize(inputKey, Normalizer.NORMALIZE_LOWER); List<String> list = this.values.get(key); boolean rc = (null == list) ? false : !list.isEmpty(); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "containsKey: key=" + inputKey + " rc=" + rc); } return rc; }
class class_name[name] begin[{] method[containsKey, return_type[type[boolean]], modifier[public], parameter[inputKey]] begin[{] local_variable[type[String], key] local_variable[type[List], list] local_variable[type[boolean], rc] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[binary_operation[binary_operation[literal["containsKey: key="], +, member[.inputKey]], +, literal[" rc="]], +, member[.rc]]]] else begin[{] None end[}] return[member[.rc]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[containsKey] operator[SEP] identifier[String] identifier[inputKey] operator[SEP] { identifier[String] identifier[key] operator[=] identifier[Normalizer] operator[SEP] identifier[normalize] operator[SEP] identifier[inputKey] , identifier[Normalizer] operator[SEP] identifier[NORMALIZE_LOWER] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[list] operator[=] Keyword[this] operator[SEP] identifier[values] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[boolean] identifier[rc] operator[=] operator[SEP] Other[null] operator[==] identifier[list] operator[SEP] operator[?] literal[boolean] operator[:] operator[!] identifier[list] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[inputKey] operator[+] literal[String] operator[+] identifier[rc] operator[SEP] operator[SEP] } Keyword[return] identifier[rc] operator[SEP] }
public boolean forEachPair(final IntIntProcedure procedure) { return forEachKey( new IntProcedure() { public boolean apply(int key) { return procedure.apply(key,get(key)); } } ); }
class class_name[name] begin[{] method[forEachPair, return_type[type[boolean]], modifier[public], parameter[procedure]] begin[{] return[call[.forEachKey, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=apply, postfix_operators=[], prefix_operators=[], qualifier=procedure, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=apply, parameters=[FormalParameter(annotations=[], modifiers=set(), name=key, type=BasicType(dimensions=[], name=int), varargs=False)], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IntProcedure, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[forEachPair] operator[SEP] Keyword[final] identifier[IntIntProcedure] identifier[procedure] operator[SEP] { Keyword[return] identifier[forEachKey] operator[SEP] Keyword[new] identifier[IntProcedure] operator[SEP] operator[SEP] { Keyword[public] Keyword[boolean] identifier[apply] operator[SEP] Keyword[int] identifier[key] operator[SEP] { Keyword[return] identifier[procedure] operator[SEP] identifier[apply] operator[SEP] identifier[key] , identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public static <T extends Enum> T getSelector(SlingHttpServletRequest request, T defaultValue) { String[] selectors = request.getRequestPathInfo().getSelectors(); Class type = defaultValue.getClass(); for (String selector : selectors) { try { T value = (T) T.valueOf(type, selector); return value; } catch (IllegalArgumentException iaex) { // ok, try next } } return defaultValue; }
class class_name[name] begin[{] method[getSelector, return_type[type[T]], modifier[public static], parameter[request, defaultValue]] begin[{] local_variable[type[String], selectors] local_variable[type[Class], type] ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=selector, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=T, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None)), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None)), ReturnStatement(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=iaex, types=['IllegalArgumentException']))], finally_block=None, label=None, resources=None)]), control=EnhancedForControl(iterable=MemberReference(member=selectors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=selector)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[member[.defaultValue]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Enum] operator[>] identifier[T] identifier[getSelector] operator[SEP] identifier[SlingHttpServletRequest] identifier[request] , identifier[T] identifier[defaultValue] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[selectors] operator[=] identifier[request] operator[SEP] identifier[getRequestPathInfo] operator[SEP] operator[SEP] operator[SEP] identifier[getSelectors] operator[SEP] operator[SEP] operator[SEP] identifier[Class] identifier[type] operator[=] identifier[defaultValue] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[selector] operator[:] identifier[selectors] operator[SEP] { Keyword[try] { identifier[T] identifier[value] operator[=] operator[SEP] identifier[T] operator[SEP] identifier[T] operator[SEP] identifier[valueOf] operator[SEP] identifier[type] , identifier[selector] operator[SEP] operator[SEP] Keyword[return] identifier[value] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalArgumentException] identifier[iaex] operator[SEP] { } } Keyword[return] identifier[defaultValue] operator[SEP] }
public void showAt(Node target, double x, double y) { requireNonNull(target, "Parameter 'target' is null"); internalShow(pointer, target, x, y); pointer.setVisible(true); }
class class_name[name] begin[{] method[showAt, return_type[void], modifier[public], parameter[target, x, y]] begin[{] call[.requireNonNull, parameter[member[.target], literal["Parameter 'target' is null"]]] call[.internalShow, parameter[member[.pointer], member[.target], member[.x], member[.y]]] call[pointer.setVisible, parameter[literal[true]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[showAt] operator[SEP] identifier[Node] identifier[target] , Keyword[double] identifier[x] , Keyword[double] identifier[y] operator[SEP] { identifier[requireNonNull] operator[SEP] identifier[target] , literal[String] operator[SEP] operator[SEP] identifier[internalShow] operator[SEP] identifier[pointer] , identifier[target] , identifier[x] , identifier[y] operator[SEP] operator[SEP] identifier[pointer] operator[SEP] identifier[setVisible] operator[SEP] literal[boolean] operator[SEP] operator[SEP] }
public ListResourceRecordSetsResult withResourceRecordSets(ResourceRecordSet... resourceRecordSets) { if (this.resourceRecordSets == null) { setResourceRecordSets(new com.amazonaws.internal.SdkInternalList<ResourceRecordSet>(resourceRecordSets.length)); } for (ResourceRecordSet ele : resourceRecordSets) { this.resourceRecordSets.add(ele); } return this; }
class class_name[name] begin[{] method[withResourceRecordSets, return_type[type[ListResourceRecordSetsResult]], modifier[public], parameter[resourceRecordSets]] begin[{] if[binary_operation[THIS[member[None.resourceRecordSets]], ==, literal[null]]] begin[{] call[.setResourceRecordSets, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=resourceRecordSets, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=amazonaws, sub_type=ReferenceType(arguments=None, dimensions=None, name=internal, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ResourceRecordSet, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=resourceRecordSets, 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=resourceRecordSets, 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=ResourceRecordSet, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[ListResourceRecordSetsResult] identifier[withResourceRecordSets] operator[SEP] identifier[ResourceRecordSet] operator[...] identifier[resourceRecordSets] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[resourceRecordSets] operator[==] Other[null] operator[SEP] { identifier[setResourceRecordSets] operator[SEP] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[ResourceRecordSet] operator[>] operator[SEP] identifier[resourceRecordSets] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[ResourceRecordSet] identifier[ele] operator[:] identifier[resourceRecordSets] operator[SEP] { Keyword[this] operator[SEP] identifier[resourceRecordSets] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
protected List<T> list() { List<T> items = new ArrayList<>(); for (Iterator<String> iterator = map.keySet().iterator(); iterator.hasNext();) { items.addAll(map.get(iterator.next()).values()); } return items; }
class class_name[name] begin[{] method[list, return_type[type[List]], modifier[protected], parameter[]] begin[{] local_variable[type[List], items] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=iterator, selectors=[], type_arguments=None)], member=get, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[MethodInvocation(arguments=[], member=values, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=items, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=iterator, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[MethodInvocation(arguments=[], member=iterator, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=iterator)], 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) return[member[.items]] end[}] END[}]
Keyword[protected] identifier[List] operator[<] identifier[T] operator[>] identifier[list] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[T] operator[>] identifier[items] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Iterator] operator[<] identifier[String] operator[>] identifier[iterator] operator[=] identifier[map] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[items] operator[SEP] identifier[addAll] operator[SEP] identifier[map] operator[SEP] identifier[get] operator[SEP] identifier[iterator] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[items] operator[SEP] }
public boolean isCodeInCC(Encoding enc, int code) { int len; if (enc.minLength() > 1) { len = 2; } else { len = enc.codeToMbcLength(code); } return isCodeInCCLength(len, code); }
class class_name[name] begin[{] method[isCodeInCC, return_type[type[boolean]], modifier[public], parameter[enc, code]] begin[{] local_variable[type[int], len] if[binary_operation[call[enc.minLength, parameter[]], >, literal[1]]] begin[{] assign[member[.len], literal[2]] else begin[{] assign[member[.len], call[enc.codeToMbcLength, parameter[member[.code]]]] end[}] return[call[.isCodeInCCLength, parameter[member[.len], member[.code]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isCodeInCC] operator[SEP] identifier[Encoding] identifier[enc] , Keyword[int] identifier[code] operator[SEP] { Keyword[int] identifier[len] operator[SEP] Keyword[if] operator[SEP] identifier[enc] operator[SEP] identifier[minLength] operator[SEP] operator[SEP] operator[>] Other[1] operator[SEP] { identifier[len] operator[=] Other[2] operator[SEP] } Keyword[else] { identifier[len] operator[=] identifier[enc] operator[SEP] identifier[codeToMbcLength] operator[SEP] identifier[code] operator[SEP] operator[SEP] } Keyword[return] identifier[isCodeInCCLength] operator[SEP] identifier[len] , identifier[code] operator[SEP] operator[SEP] }
private EventCallBackStruct getEventCallBackStruct(String eventName) { Enumeration keys = event_callback_map.keys(); while (keys.hasMoreElements()) { String key = (String) keys.nextElement(); // Notifd do not use tango host int start = key.indexOf('/', "tango:// ".length()); String shortName = key.substring(start+1); if (eventName.equalsIgnoreCase(shortName)) { return event_callback_map.get(key); } } return null; }
class class_name[name] begin[{] method[getEventCallBackStruct, return_type[type[EventCallBackStruct]], modifier[private], parameter[eventName]] begin[{] local_variable[type[Enumeration], keys] while[call[keys.hasMoreElements, parameter[]]] begin[{] local_variable[type[String], key] local_variable[type[int], start] local_variable[type[String], shortName] if[call[eventName.equalsIgnoreCase, parameter[member[.shortName]]]] begin[{] return[call[event_callback_map.get, parameter[member[.key]]]] else begin[{] None end[}] end[}] return[literal[null]] end[}] END[}]
Keyword[private] identifier[EventCallBackStruct] identifier[getEventCallBackStruct] operator[SEP] identifier[String] identifier[eventName] operator[SEP] { identifier[Enumeration] identifier[keys] operator[=] identifier[event_callback_map] operator[SEP] identifier[keys] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[keys] operator[SEP] identifier[hasMoreElements] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[key] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[keys] operator[SEP] identifier[nextElement] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[start] operator[=] identifier[key] operator[SEP] identifier[indexOf] operator[SEP] literal[String] , literal[String] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[shortName] operator[=] identifier[key] operator[SEP] identifier[substring] operator[SEP] identifier[start] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[eventName] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[shortName] operator[SEP] operator[SEP] { Keyword[return] identifier[event_callback_map] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
public boolean containsGreaterThan( VersionID m ) { for ( Object _versionId : _versionIds ) { VersionID vi = (VersionID) _versionId; boolean check = vi.isGreaterThan( m ); if ( check ) { return true; } } return false; }
class class_name[name] begin[{] method[containsGreaterThan, return_type[type[boolean]], modifier[public], parameter[m]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=_versionId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=VersionID, sub_type=None)), name=vi)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=VersionID, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isGreaterThan, postfix_operators=[], prefix_operators=[], qualifier=vi, selectors=[], type_arguments=None), name=check)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), IfStatement(condition=MemberReference(member=check, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=_versionIds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=_versionId)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))), label=None) return[literal[false]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[containsGreaterThan] operator[SEP] identifier[VersionID] identifier[m] operator[SEP] { Keyword[for] operator[SEP] identifier[Object] identifier[_versionId] operator[:] identifier[_versionIds] operator[SEP] { identifier[VersionID] identifier[vi] operator[=] operator[SEP] identifier[VersionID] operator[SEP] identifier[_versionId] operator[SEP] Keyword[boolean] identifier[check] operator[=] identifier[vi] operator[SEP] identifier[isGreaterThan] operator[SEP] identifier[m] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[check] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
public void printStackTrace() { if (detail == null) { super.printStackTrace(); } else { synchronized(System.err) { System.err.println(super.getMessage() + "; nested exception is:"); detail.printStackTrace(); } } }
class class_name[name] begin[{] method[printStackTrace, return_type[void], modifier[public], parameter[]] begin[{] if[binary_operation[member[.detail], ==, literal[null]]] begin[{] SuperMethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) else begin[{] SYNCHRONIZED[member[System.err]] BEGIN[{] call[System.err.println, parameter[binary_operation[SuperMethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None), +, literal["; nested exception is:"]]]] call[detail.printStackTrace, parameter[]] END[}] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[printStackTrace] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[detail] operator[==] Other[null] operator[SEP] { Keyword[super] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[synchronized] operator[SEP] identifier[System] operator[SEP] identifier[err] operator[SEP] { identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] Keyword[super] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[detail] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } } }
public java.lang.String getProducerProjectId() { java.lang.Object ref = producerProjectId_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); producerProjectId_ = s; return s; } }
class class_name[name] begin[{] method[getProducerProjectId, return_type[type[java]], modifier[public], parameter[]] begin[{] local_variable[type[java], ref] if[binary_operation[member[.ref], instanceof, type[java]]] begin[{] return[Cast(expression=MemberReference(member=ref, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=lang, sub_type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))))] else begin[{] local_variable[type[com], bs] local_variable[type[java], s] assign[member[.producerProjectId_], member[.s]] return[member[.s]] end[}] end[}] END[}]
Keyword[public] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] identifier[getProducerProjectId] operator[SEP] operator[SEP] { identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[Object] identifier[ref] operator[=] identifier[producerProjectId_] operator[SEP] Keyword[if] operator[SEP] identifier[ref] Keyword[instanceof] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] operator[SEP] { Keyword[return] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] operator[SEP] identifier[ref] operator[SEP] } Keyword[else] { identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[ByteString] identifier[bs] operator[=] operator[SEP] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[ByteString] operator[SEP] identifier[ref] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] identifier[s] operator[=] identifier[bs] operator[SEP] identifier[toStringUtf8] operator[SEP] operator[SEP] operator[SEP] identifier[producerProjectId_] operator[=] identifier[s] operator[SEP] Keyword[return] identifier[s] operator[SEP] } }
public com.google.api.ads.adwords.axis.v201809.cm.Media getFieldMedia() { return fieldMedia; }
class class_name[name] begin[{] method[getFieldMedia, return_type[type[com]], modifier[public], parameter[]] begin[{] return[member[.fieldMedia]] 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[Media] identifier[getFieldMedia] operator[SEP] operator[SEP] { Keyword[return] identifier[fieldMedia] operator[SEP] }
public static INDArrayIndex[] fillIn(int[] shape, INDArrayIndex... indexes) { if (shape.length == indexes.length) return indexes; INDArrayIndex[] newIndexes = new INDArrayIndex[shape.length]; System.arraycopy(indexes, 0, newIndexes, 0, indexes.length); for (int i = indexes.length; i < shape.length; i++) { newIndexes[i] = NDArrayIndex.interval(0, shape[i]); } return newIndexes; }
class class_name[name] begin[{] method[fillIn, return_type[type[INDArrayIndex]], modifier[public static], parameter[shape, indexes]] begin[{] if[binary_operation[member[shape.length], ==, member[indexes.length]]] begin[{] return[member[.indexes]] else begin[{] None end[}] local_variable[type[INDArrayIndex], newIndexes] call[System.arraycopy, parameter[member[.indexes], literal[0], member[.newIndexes], literal[0], member[indexes.length]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=newIndexes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=shape, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=interval, postfix_operators=[], prefix_operators=[], qualifier=NDArrayIndex, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=shape, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=indexes, selectors=[]), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.newIndexes]] end[}] END[}]
Keyword[public] Keyword[static] identifier[INDArrayIndex] operator[SEP] operator[SEP] identifier[fillIn] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[shape] , identifier[INDArrayIndex] operator[...] identifier[indexes] operator[SEP] { Keyword[if] operator[SEP] identifier[shape] operator[SEP] identifier[length] operator[==] identifier[indexes] operator[SEP] identifier[length] operator[SEP] Keyword[return] identifier[indexes] operator[SEP] identifier[INDArrayIndex] operator[SEP] operator[SEP] identifier[newIndexes] operator[=] Keyword[new] identifier[INDArrayIndex] operator[SEP] identifier[shape] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[indexes] , Other[0] , identifier[newIndexes] , Other[0] , identifier[indexes] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[indexes] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[<] identifier[shape] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[newIndexes] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[NDArrayIndex] operator[SEP] identifier[interval] operator[SEP] Other[0] , identifier[shape] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[newIndexes] operator[SEP] }
public static boolean is_kharanta(String str) { String s1 = VarnaUtil.getAntyaVarna(str); if (is_khar(s1)) return true; return false; }
class class_name[name] begin[{] method[is_kharanta, return_type[type[boolean]], modifier[public static], parameter[str]] begin[{] local_variable[type[String], s1] if[call[.is_khar, parameter[member[.s1]]]] begin[{] return[literal[true]] else begin[{] None end[}] return[literal[false]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[is_kharanta] operator[SEP] identifier[String] identifier[str] operator[SEP] { identifier[String] identifier[s1] operator[=] identifier[VarnaUtil] operator[SEP] identifier[getAntyaVarna] operator[SEP] identifier[str] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[is_khar] operator[SEP] identifier[s1] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
@SuppressWarnings("unchecked") @Deprecated public Form<T> bind(Map<String, String> data, String... allowedFields) { return bind(ctxLang(), ctxRequestAttrs(), data, allowedFields); }
class class_name[name] begin[{] method[bind, return_type[type[Form]], modifier[public], parameter[data, allowedFields]] begin[{] return[call[.bind, parameter[call[.ctxLang, parameter[]], call[.ctxRequestAttrs, parameter[]], member[.data], member[.allowedFields]]]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Deprecated] Keyword[public] identifier[Form] operator[<] identifier[T] operator[>] identifier[bind] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[data] , identifier[String] operator[...] identifier[allowedFields] operator[SEP] { Keyword[return] identifier[bind] operator[SEP] identifier[ctxLang] operator[SEP] operator[SEP] , identifier[ctxRequestAttrs] operator[SEP] operator[SEP] , identifier[data] , identifier[allowedFields] operator[SEP] operator[SEP] }
private static Pair<Integer, Integer> getVP8XDimension(final InputStream is) throws IOException { // We have to skip 8 bytes is.skip(8); // Read 3 bytes for width and height return new Pair<>(read3Bytes(is) + 1, read3Bytes(is) + 1); }
class class_name[name] begin[{] method[getVP8XDimension, return_type[type[Pair]], modifier[private static], parameter[is]] begin[{] call[is.skip, parameter[literal[8]]] return[ClassCreator(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=read3Bytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=read3Bytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=Pair, sub_type=None))] end[}] END[}]
Keyword[private] Keyword[static] identifier[Pair] operator[<] identifier[Integer] , identifier[Integer] operator[>] identifier[getVP8XDimension] operator[SEP] Keyword[final] identifier[InputStream] identifier[is] operator[SEP] Keyword[throws] identifier[IOException] { identifier[is] operator[SEP] identifier[skip] operator[SEP] Other[8] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[Pair] operator[<] operator[>] operator[SEP] identifier[read3Bytes] operator[SEP] identifier[is] operator[SEP] operator[+] Other[1] , identifier[read3Bytes] operator[SEP] identifier[is] operator[SEP] operator[+] Other[1] operator[SEP] operator[SEP] }
public String constructLocalLoginServiceUrl(final HttpServletRequest request, final HttpServletResponse response, final String service, final String serverName, final String artifactParameterName, final boolean encode) { if (Strings.isNotBlank(service)) return encode ? response.encodeURL(service) : service; final StringBuilder buffer = new StringBuilder(); if (!serverName.startsWith("https://") && !serverName.startsWith("http://")) { buffer.append(request.isSecure() ? "https://" : "http://"); } buffer.append(serverName); buffer.append(request.getContextPath()); buffer.append(localLogin); final String returnValue = encode ? response.encodeURL(buffer.toString()) : buffer.toString(); return returnValue; }
class class_name[name] begin[{] method[constructLocalLoginServiceUrl, return_type[type[String]], modifier[public], parameter[request, response, service, serverName, artifactParameterName, encode]] begin[{] if[call[Strings.isNotBlank, parameter[member[.service]]]] begin[{] return[TernaryExpression(condition=MemberReference(member=encode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=MemberReference(member=service, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[MemberReference(member=service, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=encodeURL, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None))] else begin[{] None end[}] local_variable[type[StringBuilder], buffer] if[binary_operation[call[serverName.startsWith, parameter[literal["https://"]]], &&, call[serverName.startsWith, parameter[literal["http://"]]]]] begin[{] call[buffer.append, parameter[TernaryExpression(condition=MethodInvocation(arguments=[], member=isSecure, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[], type_arguments=None), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="http://"), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="https://"))]] else begin[{] None end[}] call[buffer.append, parameter[member[.serverName]]] call[buffer.append, parameter[call[request.getContextPath, parameter[]]]] call[buffer.append, parameter[member[.localLogin]]] local_variable[type[String], returnValue] return[member[.returnValue]] end[}] END[}]
Keyword[public] identifier[String] identifier[constructLocalLoginServiceUrl] operator[SEP] Keyword[final] identifier[HttpServletRequest] identifier[request] , Keyword[final] identifier[HttpServletResponse] identifier[response] , Keyword[final] identifier[String] identifier[service] , Keyword[final] identifier[String] identifier[serverName] , Keyword[final] identifier[String] identifier[artifactParameterName] , Keyword[final] Keyword[boolean] identifier[encode] operator[SEP] { Keyword[if] operator[SEP] identifier[Strings] operator[SEP] identifier[isNotBlank] operator[SEP] identifier[service] operator[SEP] operator[SEP] Keyword[return] identifier[encode] operator[?] identifier[response] operator[SEP] identifier[encodeURL] operator[SEP] identifier[service] operator[SEP] operator[:] identifier[service] operator[SEP] Keyword[final] identifier[StringBuilder] identifier[buffer] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[serverName] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[&&] operator[!] identifier[serverName] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[buffer] operator[SEP] identifier[append] operator[SEP] identifier[request] operator[SEP] identifier[isSecure] operator[SEP] operator[SEP] operator[?] literal[String] operator[:] literal[String] operator[SEP] operator[SEP] } identifier[buffer] operator[SEP] identifier[append] operator[SEP] identifier[serverName] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[append] operator[SEP] identifier[request] operator[SEP] identifier[getContextPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[append] operator[SEP] identifier[localLogin] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[returnValue] operator[=] identifier[encode] operator[?] identifier[response] operator[SEP] identifier[encodeURL] operator[SEP] identifier[buffer] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[:] identifier[buffer] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[returnValue] operator[SEP] }
public void disableStart() { EventTarget targ = (EventTarget) element; targ.removeEventListener(SVGConstants.SVG_EVENT_MOUSEDOWN, this, false); }
class class_name[name] begin[{] method[disableStart, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[EventTarget], targ] call[targ.removeEventListener, parameter[member[SVGConstants.SVG_EVENT_MOUSEDOWN], THIS[], literal[false]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[disableStart] operator[SEP] operator[SEP] { identifier[EventTarget] identifier[targ] operator[=] operator[SEP] identifier[EventTarget] operator[SEP] identifier[element] operator[SEP] identifier[targ] operator[SEP] identifier[removeEventListener] operator[SEP] identifier[SVGConstants] operator[SEP] identifier[SVG_EVENT_MOUSEDOWN] , Keyword[this] , literal[boolean] operator[SEP] operator[SEP] }
protected void onBaseChanged() { //System.out.println("JChord.onBaseChanged : "+multiNote); byte h = multiNote.getHighestNote().getHeight(); byte l = multiNote.getLowestNote().getHeight(); //if normalizedChords!=null [0] stems down, [1] stems up //autoStemming is disabled byte midHeight = getClef().getMiddleNote().getHeight(); if ((m_normalizedChords == null) && isAutoStem()) { boolean stemUp = h <= midHeight || l <= midHeight && (h - midHeight) < (midHeight - l); //recalculate anchor and valuate its note char setStemUp(stemUp); } if (m_normalizedChords == null) { // set stemYEnd // get highest/lowest in group // set stems appropriately int stemYEnd; if (m_stemYEndForChord == -1) { //auto calculated, chord is not part of group int stemLength = getMetrics().getStemLengthForContext(ScoreMetrics.NOTATION_CONTEXT_NOTE); int halfNoteHeight = (int) (getMetrics().getNoteHeight() / 2); int highestNoteY = (int) getHighestNote().getStemUpBeginPosition().getY() - stemLength - halfNoteHeight; int lowestNoteY = (int) getLowestNote().getStemDownBeginPosition().getY() + stemLength + halfNoteHeight; stemYEnd = isStemUp()?highestNoteY:lowestNoteY; } else { stemYEnd = m_stemYEndForChord; } for (JNote m_sNoteInstance : m_sNoteInstances) { ((JNotePartOfGroup) m_sNoteInstance).setStemYEnd(stemYEnd); } } double graceNotesWidth = 0; boolean graceNotesAfter = false; if (m_jGracenotes != null) { if (multiNote.getGracingType() == GracingType.ACCIACCATURA) graceNotesAfter = getTemplate().getAttributeBoolean(ScoreAttribute.ACCIACCATURA_AFTER_NOTE); graceNotesWidth = m_jGracenotes.getWidth() + getMetrics().getGraceNotesSpacing(); if (graceNotesAfter) graceNotesWidth += getMetrics().getGraceNotesSpacing(); // m_jGracenotes.onBaseChanged(); // graceNotesWidth = m_jGracenotes.getWidth() // + getMetrics().getGraceNotesSpacing(); } double accidentalsWidth = 0; if (!isPartOfANormalizedChord) { //not already calculated //calculate accidantal position for all notes Note[] notes = multiNote.toArray(); boolean chordHasStemDownInverted = false; for (int i = notes.length - 1; i >= 0; i--) { JNote jnote = getJNote(notes[i]); if (!jnote.isStemUp() && jnote.isHeadInverted()) { chordHasStemDownInverted = true; break; } } int accOffset = 1; int refAccidentedNote = -1; for (int i = notes.length - 1; i >= 0; i--) { //from highest to lowest if (notes[i].hasAccidental()) { JNote jnote = getJNote(notes[i]); if (refAccidentedNote == -1) { refAccidentedNote = i; } else { //if interval between reference and this note is smaller than //a sixth, accidentals are moved on the left //else accidental is at normal position, set note as referenec Interval interv = new Interval(notes[refAccidentedNote], notes[i], null); if (interv.getLabel() < Interval.SIXTH) { accOffset++; } else { accOffset = 1; refAccidentedNote = i; } } //For stem down chord with inverted heads, add a .5 (a note head) //offset to the accidental position float w_accOffset = accOffset; if (!jnote.isStemUp() && !jnote.isHeadInverted() && chordHasStemDownInverted) w_accOffset += .5f; if (w_accOffset != 1) jnote.setAccidentalPositionOffset(w_accOffset); double accWidth = jnote.getNotePosition().getX() - jnote.getBase().getX(); accidentalsWidth = Math.max(accidentalsWidth, accWidth); } } } /* Horizontal position of note head, after graces and accidentals */ double m_noteHeadX = getBase().getX() + (graceNotesAfter ? 0 : graceNotesWidth); Point2D chordBase = new Point2D.Double(m_noteHeadX, getBase().getY()); double chordWidth = 0; // TODO: setBase for decorations if (m_normalizedChords==null) { // calculate slur/tie position last because slurs/ties must // go over any decorations //if (note.getSlurDefinition()!=null) /*for (int i=0; i<m_sNoteInstances.length; i++) { ((JNote)m_sNoteInstances[i]).calcSlursAndTiesPosition(); }*/ double biggestStemX = -1; for (JNote m_sNoteInstance : m_sNoteInstances) { m_sNoteInstance.setBase(chordBase); if (m_sNoteInstance.getStemBeginPosition().getX() > biggestStemX) biggestStemX = m_sNoteInstance.getStemBeginPosition().getX(); if (m_sNoteInstance.getWidth() > chordWidth) chordWidth = m_sNoteInstance.getWidth(); } //realign all stems for (JNote m_sNoteInstance : m_sNoteInstances) { Point2D stemBegin = m_sNoteInstance.getStemBeginPosition(); Point2D newStemBegin = new Point2D.Double(biggestStemX, stemBegin.getY()); m_sNoteInstance.setStemBeginPosition(newStemBegin); } } else { for (JChord m_normalizedChord : m_normalizedChords) { Point2D newBase = (Point2D) chordBase.clone(); if (accidentalsWidth > 0) { double tmpAccWidth = 0; //determinate accidental width of the chord for (int j = 0; j < m_normalizedChord.m_sNoteInstances.length; j++) { JNote jnote = m_normalizedChord.m_sNoteInstances[j]; double accWidth = jnote.getNotePosition().getX() - jnote.getBase().getX(); tmpAccWidth = Math.max(tmpAccWidth, accWidth); } newBase.setLocation(newBase.getX() + accidentalsWidth - tmpAccWidth, newBase.getY()); if (newBase.getX() == chordBase.getX()) newBase = chordBase; } m_normalizedChord.setBase(newBase); if (m_normalizedChord.getWidth() > chordWidth) chordWidth = m_normalizedChord.getWidth(); //m_normalizedChords[i].onBaseChanged(); } } //slur anchors if (m_normalizedChords == null) { ScoreMetrics metrics = getMetrics(); slurUnderAnchor = m_sNoteInstances[0].getSlurUnderAnchor(); slurUnderAnchorOutOfStem = stemUp ?slurUnderAnchor :new Point2D.Double(getBoundingBox().getMinX(), getBoundingBox().getMaxY()+metrics.getSlurAnchorYOffset()); slurAboveAnchor = m_sNoteInstances[m_sNoteInstances.length-1].getSlurAboveAnchor(); slurAboveAnchorOutOfStem = stemUp ?new Point2D.Double(getBoundingBox().getMaxX(), getBoundingBox().getMinY()-metrics.getSlurAnchorYOffset()) :slurAboveAnchor; //calcDecorationPosition(); } if (m_jGracenotes != null) { Point2D gracesPosition; if (!graceNotesAfter) gracesPosition = (Point2D) getBase().clone(); else { gracesPosition = new Point2D.Double( m_noteHeadX +chordWidth +getMetrics().getGraceNotesSpacing()*2, getBase().getY() ); } m_jGracenotes.setBase(gracesPosition); } m_width = (int)(graceNotesWidth/*+accidentalsWidth*/+chordWidth); //m_width = /*c_width + */graceNotesWidth + accidentalsWidth + chordWidth; //m_width = getBoundingBox().getWidth(); }
class class_name[name] begin[{] method[onBaseChanged, return_type[void], modifier[protected], parameter[]] begin[{] local_variable[type[byte], h] local_variable[type[byte], l] local_variable[type[byte], midHeight] if[binary_operation[binary_operation[member[.m_normalizedChords], ==, literal[null]], &&, call[.isAutoStem, parameter[]]]] begin[{] local_variable[type[boolean], stemUp] call[.setStemUp, parameter[member[.stemUp]]] else begin[{] None end[}] if[binary_operation[member[.m_normalizedChords], ==, literal[null]]] begin[{] local_variable[type[int], stemYEnd] if[binary_operation[member[.m_stemYEndForChord], ==, literal[1]]] begin[{] local_variable[type[int], stemLength] local_variable[type[int], halfNoteHeight] local_variable[type[int], highestNoteY] local_variable[type[int], lowestNoteY] assign[member[.stemYEnd], TernaryExpression(condition=MethodInvocation(arguments=[], member=isStemUp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), if_false=MemberReference(member=lowestNoteY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=highestNoteY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] else begin[{] assign[member[.stemYEnd], member[.m_stemYEndForChord]] end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Cast(expression=MemberReference(member=m_sNoteInstance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=JNotePartOfGroup, sub_type=None)), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=m_sNoteInstances, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=m_sNoteInstance)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JNote, sub_type=None))), label=None) else begin[{] None end[}] local_variable[type[double], graceNotesWidth] local_variable[type[boolean], graceNotesAfter] if[binary_operation[member[.m_jGracenotes], !=, literal[null]]] begin[{] if[binary_operation[call[multiNote.getGracingType, parameter[]], ==, member[GracingType.ACCIACCATURA]]] begin[{] assign[member[.graceNotesAfter], call[.getTemplate, parameter[]]] else begin[{] None end[}] assign[member[.graceNotesWidth], binary_operation[call[m_jGracenotes.getWidth, parameter[]], +, call[.getMetrics, parameter[]]]] if[member[.graceNotesAfter]] begin[{] assign[member[.graceNotesWidth], call[.getMetrics, parameter[]]] else begin[{] None end[}] else begin[{] None end[}] local_variable[type[double], accidentalsWidth] if[member[.isPartOfANormalizedChord]] begin[{] local_variable[type[Note], notes] local_variable[type[boolean], chordHasStemDownInverted] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=notes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=getJNote, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=jnote)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JNote, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isStemUp, postfix_operators=[], prefix_operators=['!'], qualifier=jnote, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isHeadInverted, postfix_operators=[], prefix_operators=[], qualifier=jnote, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=chordHasStemDownInverted, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), BreakStatement(goto=None, label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=notes, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[])]), label=None) local_variable[type[int], accOffset] local_variable[type[int], refAccidentedNote] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=notes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=hasAccidental, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=notes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=getJNote, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=jnote)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JNote, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=refAccidentedNote, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator===), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=notes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=refAccidentedNote, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), MemberReference(member=notes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Interval, sub_type=None)), name=interv)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Interval, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getLabel, postfix_operators=[], prefix_operators=[], qualifier=interv, selectors=[], type_arguments=None), operandr=MemberReference(member=SIXTH, postfix_operators=[], prefix_operators=[], qualifier=Interval, selectors=[]), operator=<), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=accOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=refAccidentedNote, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=accOffset, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=refAccidentedNote, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=accOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=w_accOffset)], modifiers=set(), type=BasicType(dimensions=[], name=float)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isStemUp, postfix_operators=[], prefix_operators=['!'], qualifier=jnote, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isHeadInverted, postfix_operators=[], prefix_operators=['!'], qualifier=jnote, selectors=[], type_arguments=None), operator=&&), operandr=MemberReference(member=chordHasStemDownInverted, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=w_accOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=.5f)), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=w_accOffset, 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=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=w_accOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setAccidentalPositionOffset, postfix_operators=[], prefix_operators=[], qualifier=jnote, selectors=[], type_arguments=None), label=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getNotePosition, postfix_operators=[], prefix_operators=[], qualifier=jnote, selectors=[MethodInvocation(arguments=[], member=getX, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getBase, postfix_operators=[], prefix_operators=[], qualifier=jnote, selectors=[MethodInvocation(arguments=[], member=getX, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=-), name=accWidth)], modifiers=set(), type=BasicType(dimensions=[], name=double)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=accidentalsWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=accidentalsWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=accWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=max, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=notes, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[])]), label=None) else begin[{] None end[}] local_variable[type[double], m_noteHeadX] local_variable[type[Point2D], chordBase] local_variable[type[double], chordWidth] if[binary_operation[member[.m_normalizedChords], ==, literal[null]]] begin[{] local_variable[type[double], biggestStemX] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=chordBase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setBase, postfix_operators=[], prefix_operators=[], qualifier=m_sNoteInstance, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getStemBeginPosition, postfix_operators=[], prefix_operators=[], qualifier=m_sNoteInstance, selectors=[MethodInvocation(arguments=[], member=getX, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MemberReference(member=biggestStemX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=biggestStemX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getStemBeginPosition, postfix_operators=[], prefix_operators=[], qualifier=m_sNoteInstance, selectors=[MethodInvocation(arguments=[], member=getX, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=m_sNoteInstance, selectors=[], type_arguments=None), operandr=MemberReference(member=chordWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=chordWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=m_sNoteInstance, selectors=[], type_arguments=None)), label=None))]), control=EnhancedForControl(iterable=MemberReference(member=m_sNoteInstances, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=m_sNoteInstance)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JNote, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getStemBeginPosition, postfix_operators=[], prefix_operators=[], qualifier=m_sNoteInstance, selectors=[], type_arguments=None), name=stemBegin)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Point2D, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=biggestStemX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getY, postfix_operators=[], prefix_operators=[], qualifier=stemBegin, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Point2D, sub_type=ReferenceType(arguments=None, dimensions=None, name=Double, sub_type=None))), name=newStemBegin)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Point2D, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=newStemBegin, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setStemBeginPosition, postfix_operators=[], prefix_operators=[], qualifier=m_sNoteInstance, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=m_sNoteInstances, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=m_sNoteInstance)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JNote, sub_type=None))), label=None) else begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=clone, postfix_operators=[], prefix_operators=[], qualifier=chordBase, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Point2D, sub_type=None)), name=newBase)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Point2D, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=accidentalsWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=tmpAccWidth)], modifiers=set(), type=BasicType(dimensions=[], name=double)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=m_sNoteInstances, postfix_operators=[], prefix_operators=[], qualifier=m_normalizedChord, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=jnote)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JNote, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getNotePosition, postfix_operators=[], prefix_operators=[], qualifier=jnote, selectors=[MethodInvocation(arguments=[], member=getX, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getBase, postfix_operators=[], prefix_operators=[], qualifier=jnote, selectors=[MethodInvocation(arguments=[], member=getX, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=-), name=accWidth)], modifiers=set(), type=BasicType(dimensions=[], name=double)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=tmpAccWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=tmpAccWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=accWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=max, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=m_normalizedChord.m_sNoteInstances, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getX, postfix_operators=[], prefix_operators=[], qualifier=newBase, selectors=[], type_arguments=None), operandr=MemberReference(member=accidentalsWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=tmpAccWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), MethodInvocation(arguments=[], member=getY, postfix_operators=[], prefix_operators=[], qualifier=newBase, selectors=[], type_arguments=None)], member=setLocation, postfix_operators=[], prefix_operators=[], qualifier=newBase, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getX, postfix_operators=[], prefix_operators=[], qualifier=newBase, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getX, postfix_operators=[], prefix_operators=[], qualifier=chordBase, selectors=[], type_arguments=None), operator===), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=newBase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=chordBase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None))])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=newBase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setBase, postfix_operators=[], prefix_operators=[], qualifier=m_normalizedChord, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=m_normalizedChord, selectors=[], type_arguments=None), operandr=MemberReference(member=chordWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=chordWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=m_normalizedChord, selectors=[], type_arguments=None)), label=None))]), control=EnhancedForControl(iterable=MemberReference(member=m_normalizedChords, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=m_normalizedChord)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JChord, sub_type=None))), label=None) end[}] if[binary_operation[member[.m_normalizedChords], ==, literal[null]]] begin[{] local_variable[type[ScoreMetrics], metrics] assign[member[.slurUnderAnchor], member[.m_sNoteInstances]] assign[member[.slurUnderAnchorOutOfStem], TernaryExpression(condition=MemberReference(member=stemUp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getBoundingBox, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getMinX, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), BinaryOperation(operandl=MethodInvocation(arguments=[], member=getBoundingBox, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getMaxY, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getSlurAnchorYOffset, postfix_operators=[], prefix_operators=[], qualifier=metrics, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Point2D, sub_type=ReferenceType(arguments=None, dimensions=None, name=Double, sub_type=None))), if_true=MemberReference(member=slurUnderAnchor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] assign[member[.slurAboveAnchor], member[.m_sNoteInstances]] assign[member[.slurAboveAnchorOutOfStem], TernaryExpression(condition=MemberReference(member=stemUp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=MemberReference(member=slurAboveAnchor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getBoundingBox, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getMaxX, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), BinaryOperation(operandl=MethodInvocation(arguments=[], member=getBoundingBox, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getMinY, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getSlurAnchorYOffset, postfix_operators=[], prefix_operators=[], qualifier=metrics, selectors=[], type_arguments=None), operator=-)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Point2D, sub_type=ReferenceType(arguments=None, dimensions=None, name=Double, sub_type=None))))] else begin[{] None end[}] if[binary_operation[member[.m_jGracenotes], !=, literal[null]]] begin[{] local_variable[type[Point2D], gracesPosition] if[member[.graceNotesAfter]] begin[{] assign[member[.gracesPosition], Cast(expression=MethodInvocation(arguments=[], member=getBase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=clone, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Point2D, sub_type=None))] else begin[{] assign[member[.gracesPosition], ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=m_noteHeadX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=chordWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getMetrics, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getGraceNotesSpacing, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=*), operator=+), MethodInvocation(arguments=[], member=getBase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getY, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Point2D, sub_type=ReferenceType(arguments=None, dimensions=None, name=Double, sub_type=None)))] end[}] call[m_jGracenotes.setBase, parameter[member[.gracesPosition]]] else begin[{] None end[}] assign[member[.m_width], Cast(expression=BinaryOperation(operandl=MemberReference(member=graceNotesWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=chordWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), type=BasicType(dimensions=[], name=int))] end[}] END[}]
Keyword[protected] Keyword[void] identifier[onBaseChanged] operator[SEP] operator[SEP] { Keyword[byte] identifier[h] operator[=] identifier[multiNote] operator[SEP] identifier[getHighestNote] operator[SEP] operator[SEP] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[SEP] Keyword[byte] identifier[l] operator[=] identifier[multiNote] operator[SEP] identifier[getLowestNote] operator[SEP] operator[SEP] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[SEP] Keyword[byte] identifier[midHeight] operator[=] identifier[getClef] operator[SEP] operator[SEP] operator[SEP] identifier[getMiddleNote] operator[SEP] operator[SEP] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[m_normalizedChords] operator[==] Other[null] operator[SEP] operator[&&] identifier[isAutoStem] operator[SEP] operator[SEP] operator[SEP] { Keyword[boolean] identifier[stemUp] operator[=] identifier[h] operator[<=] identifier[midHeight] operator[||] identifier[l] operator[<=] identifier[midHeight] operator[&&] operator[SEP] identifier[h] operator[-] identifier[midHeight] operator[SEP] operator[<] operator[SEP] identifier[midHeight] operator[-] identifier[l] operator[SEP] operator[SEP] identifier[setStemUp] operator[SEP] identifier[stemUp] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[m_normalizedChords] operator[==] Other[null] operator[SEP] { Keyword[int] identifier[stemYEnd] operator[SEP] Keyword[if] operator[SEP] identifier[m_stemYEndForChord] operator[==] operator[-] Other[1] operator[SEP] { Keyword[int] identifier[stemLength] operator[=] identifier[getMetrics] operator[SEP] operator[SEP] operator[SEP] identifier[getStemLengthForContext] operator[SEP] identifier[ScoreMetrics] operator[SEP] identifier[NOTATION_CONTEXT_NOTE] operator[SEP] operator[SEP] Keyword[int] identifier[halfNoteHeight] operator[=] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[getMetrics] operator[SEP] operator[SEP] operator[SEP] identifier[getNoteHeight] operator[SEP] operator[SEP] operator[/] Other[2] operator[SEP] operator[SEP] Keyword[int] identifier[highestNoteY] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[getHighestNote] operator[SEP] operator[SEP] operator[SEP] identifier[getStemUpBeginPosition] operator[SEP] operator[SEP] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[-] identifier[stemLength] operator[-] identifier[halfNoteHeight] operator[SEP] Keyword[int] identifier[lowestNoteY] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[getLowestNote] operator[SEP] operator[SEP] operator[SEP] identifier[getStemDownBeginPosition] operator[SEP] operator[SEP] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[+] identifier[stemLength] operator[+] identifier[halfNoteHeight] operator[SEP] identifier[stemYEnd] operator[=] identifier[isStemUp] operator[SEP] operator[SEP] operator[?] identifier[highestNoteY] operator[:] identifier[lowestNoteY] operator[SEP] } Keyword[else] { identifier[stemYEnd] operator[=] identifier[m_stemYEndForChord] operator[SEP] } Keyword[for] operator[SEP] identifier[JNote] identifier[m_sNoteInstance] operator[:] identifier[m_sNoteInstances] operator[SEP] { operator[SEP] operator[SEP] identifier[JNotePartOfGroup] operator[SEP] identifier[m_sNoteInstance] operator[SEP] operator[SEP] identifier[setStemYEnd] operator[SEP] identifier[stemYEnd] operator[SEP] operator[SEP] } } Keyword[double] identifier[graceNotesWidth] operator[=] Other[0] operator[SEP] Keyword[boolean] identifier[graceNotesAfter] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[m_jGracenotes] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[multiNote] operator[SEP] identifier[getGracingType] operator[SEP] operator[SEP] operator[==] identifier[GracingType] operator[SEP] identifier[ACCIACCATURA] operator[SEP] identifier[graceNotesAfter] operator[=] identifier[getTemplate] operator[SEP] operator[SEP] operator[SEP] identifier[getAttributeBoolean] operator[SEP] identifier[ScoreAttribute] operator[SEP] identifier[ACCIACCATURA_AFTER_NOTE] operator[SEP] operator[SEP] identifier[graceNotesWidth] operator[=] identifier[m_jGracenotes] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[+] identifier[getMetrics] operator[SEP] operator[SEP] operator[SEP] identifier[getGraceNotesSpacing] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[graceNotesAfter] operator[SEP] identifier[graceNotesWidth] operator[+=] identifier[getMetrics] operator[SEP] operator[SEP] operator[SEP] identifier[getGraceNotesSpacing] operator[SEP] operator[SEP] operator[SEP] } Keyword[double] identifier[accidentalsWidth] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isPartOfANormalizedChord] operator[SEP] { identifier[Note] operator[SEP] operator[SEP] identifier[notes] operator[=] identifier[multiNote] operator[SEP] identifier[toArray] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[chordHasStemDownInverted] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[notes] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] identifier[i] operator[>=] Other[0] operator[SEP] identifier[i] operator[--] operator[SEP] { identifier[JNote] identifier[jnote] operator[=] identifier[getJNote] operator[SEP] identifier[notes] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[jnote] operator[SEP] identifier[isStemUp] operator[SEP] operator[SEP] operator[&&] identifier[jnote] operator[SEP] identifier[isHeadInverted] operator[SEP] operator[SEP] operator[SEP] { identifier[chordHasStemDownInverted] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] } } Keyword[int] identifier[accOffset] operator[=] Other[1] operator[SEP] Keyword[int] identifier[refAccidentedNote] operator[=] operator[-] Other[1] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[notes] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] identifier[i] operator[>=] Other[0] operator[SEP] identifier[i] operator[--] operator[SEP] { Keyword[if] operator[SEP] identifier[notes] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[hasAccidental] operator[SEP] operator[SEP] operator[SEP] { identifier[JNote] identifier[jnote] operator[=] identifier[getJNote] operator[SEP] identifier[notes] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[refAccidentedNote] operator[==] operator[-] Other[1] operator[SEP] { identifier[refAccidentedNote] operator[=] identifier[i] operator[SEP] } Keyword[else] { identifier[Interval] identifier[interv] operator[=] Keyword[new] identifier[Interval] operator[SEP] identifier[notes] operator[SEP] identifier[refAccidentedNote] operator[SEP] , identifier[notes] operator[SEP] identifier[i] operator[SEP] , Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[interv] operator[SEP] identifier[getLabel] operator[SEP] operator[SEP] operator[<] identifier[Interval] operator[SEP] identifier[SIXTH] operator[SEP] { identifier[accOffset] operator[++] operator[SEP] } Keyword[else] { identifier[accOffset] operator[=] Other[1] operator[SEP] identifier[refAccidentedNote] operator[=] identifier[i] operator[SEP] } } Keyword[float] identifier[w_accOffset] operator[=] identifier[accOffset] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[jnote] operator[SEP] identifier[isStemUp] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[jnote] operator[SEP] identifier[isHeadInverted] operator[SEP] operator[SEP] operator[&&] identifier[chordHasStemDownInverted] operator[SEP] identifier[w_accOffset] operator[+=] literal[Float] operator[SEP] Keyword[if] operator[SEP] identifier[w_accOffset] operator[!=] Other[1] operator[SEP] identifier[jnote] operator[SEP] identifier[setAccidentalPositionOffset] operator[SEP] identifier[w_accOffset] operator[SEP] operator[SEP] Keyword[double] identifier[accWidth] operator[=] identifier[jnote] operator[SEP] identifier[getNotePosition] operator[SEP] operator[SEP] operator[SEP] identifier[getX] operator[SEP] operator[SEP] operator[-] identifier[jnote] operator[SEP] identifier[getBase] operator[SEP] operator[SEP] operator[SEP] identifier[getX] operator[SEP] operator[SEP] operator[SEP] identifier[accidentalsWidth] operator[=] identifier[Math] operator[SEP] identifier[max] operator[SEP] identifier[accidentalsWidth] , identifier[accWidth] operator[SEP] operator[SEP] } } } Keyword[double] identifier[m_noteHeadX] operator[=] identifier[getBase] operator[SEP] operator[SEP] operator[SEP] identifier[getX] operator[SEP] operator[SEP] operator[+] operator[SEP] identifier[graceNotesAfter] operator[?] Other[0] operator[:] identifier[graceNotesWidth] operator[SEP] operator[SEP] identifier[Point2D] identifier[chordBase] operator[=] Keyword[new] identifier[Point2D] operator[SEP] identifier[Double] operator[SEP] identifier[m_noteHeadX] , identifier[getBase] operator[SEP] operator[SEP] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[chordWidth] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[m_normalizedChords] operator[==] Other[null] operator[SEP] { Keyword[double] identifier[biggestStemX] operator[=] operator[-] Other[1] operator[SEP] Keyword[for] operator[SEP] identifier[JNote] identifier[m_sNoteInstance] operator[:] identifier[m_sNoteInstances] operator[SEP] { identifier[m_sNoteInstance] operator[SEP] identifier[setBase] operator[SEP] identifier[chordBase] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m_sNoteInstance] operator[SEP] identifier[getStemBeginPosition] operator[SEP] operator[SEP] operator[SEP] identifier[getX] operator[SEP] operator[SEP] operator[>] identifier[biggestStemX] operator[SEP] identifier[biggestStemX] operator[=] identifier[m_sNoteInstance] operator[SEP] identifier[getStemBeginPosition] operator[SEP] operator[SEP] operator[SEP] identifier[getX] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m_sNoteInstance] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[>] identifier[chordWidth] operator[SEP] identifier[chordWidth] operator[=] identifier[m_sNoteInstance] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[JNote] identifier[m_sNoteInstance] operator[:] identifier[m_sNoteInstances] operator[SEP] { identifier[Point2D] identifier[stemBegin] operator[=] identifier[m_sNoteInstance] operator[SEP] identifier[getStemBeginPosition] operator[SEP] operator[SEP] operator[SEP] identifier[Point2D] identifier[newStemBegin] operator[=] Keyword[new] identifier[Point2D] operator[SEP] identifier[Double] operator[SEP] identifier[biggestStemX] , identifier[stemBegin] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[m_sNoteInstance] operator[SEP] identifier[setStemBeginPosition] operator[SEP] identifier[newStemBegin] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[for] operator[SEP] identifier[JChord] identifier[m_normalizedChord] operator[:] identifier[m_normalizedChords] operator[SEP] { identifier[Point2D] identifier[newBase] operator[=] operator[SEP] identifier[Point2D] operator[SEP] identifier[chordBase] operator[SEP] identifier[clone] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[accidentalsWidth] operator[>] Other[0] operator[SEP] { Keyword[double] identifier[tmpAccWidth] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[m_normalizedChord] operator[SEP] identifier[m_sNoteInstances] operator[SEP] identifier[length] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[JNote] identifier[jnote] operator[=] identifier[m_normalizedChord] operator[SEP] identifier[m_sNoteInstances] operator[SEP] identifier[j] operator[SEP] operator[SEP] Keyword[double] identifier[accWidth] operator[=] identifier[jnote] operator[SEP] identifier[getNotePosition] operator[SEP] operator[SEP] operator[SEP] identifier[getX] operator[SEP] operator[SEP] operator[-] identifier[jnote] operator[SEP] identifier[getBase] operator[SEP] operator[SEP] operator[SEP] identifier[getX] operator[SEP] operator[SEP] operator[SEP] identifier[tmpAccWidth] operator[=] identifier[Math] operator[SEP] identifier[max] operator[SEP] identifier[tmpAccWidth] , identifier[accWidth] operator[SEP] operator[SEP] } identifier[newBase] operator[SEP] identifier[setLocation] operator[SEP] identifier[newBase] operator[SEP] identifier[getX] operator[SEP] operator[SEP] operator[+] identifier[accidentalsWidth] operator[-] identifier[tmpAccWidth] , identifier[newBase] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[newBase] operator[SEP] identifier[getX] operator[SEP] operator[SEP] operator[==] identifier[chordBase] operator[SEP] identifier[getX] operator[SEP] operator[SEP] operator[SEP] identifier[newBase] operator[=] identifier[chordBase] operator[SEP] } identifier[m_normalizedChord] operator[SEP] identifier[setBase] operator[SEP] identifier[newBase] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m_normalizedChord] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[>] identifier[chordWidth] operator[SEP] identifier[chordWidth] operator[=] identifier[m_normalizedChord] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[m_normalizedChords] operator[==] Other[null] operator[SEP] { identifier[ScoreMetrics] identifier[metrics] operator[=] identifier[getMetrics] operator[SEP] operator[SEP] operator[SEP] identifier[slurUnderAnchor] operator[=] identifier[m_sNoteInstances] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getSlurUnderAnchor] operator[SEP] operator[SEP] operator[SEP] identifier[slurUnderAnchorOutOfStem] operator[=] identifier[stemUp] operator[?] identifier[slurUnderAnchor] operator[:] Keyword[new] identifier[Point2D] operator[SEP] identifier[Double] operator[SEP] identifier[getBoundingBox] operator[SEP] operator[SEP] operator[SEP] identifier[getMinX] operator[SEP] operator[SEP] , identifier[getBoundingBox] operator[SEP] operator[SEP] operator[SEP] identifier[getMaxY] operator[SEP] operator[SEP] operator[+] identifier[metrics] operator[SEP] identifier[getSlurAnchorYOffset] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[slurAboveAnchor] operator[=] identifier[m_sNoteInstances] operator[SEP] identifier[m_sNoteInstances] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] operator[SEP] identifier[getSlurAboveAnchor] operator[SEP] operator[SEP] operator[SEP] identifier[slurAboveAnchorOutOfStem] operator[=] identifier[stemUp] operator[?] Keyword[new] identifier[Point2D] operator[SEP] identifier[Double] operator[SEP] identifier[getBoundingBox] operator[SEP] operator[SEP] operator[SEP] identifier[getMaxX] operator[SEP] operator[SEP] , identifier[getBoundingBox] operator[SEP] operator[SEP] operator[SEP] identifier[getMinY] operator[SEP] operator[SEP] operator[-] identifier[metrics] operator[SEP] identifier[getSlurAnchorYOffset] operator[SEP] operator[SEP] operator[SEP] operator[:] identifier[slurAboveAnchor] operator[SEP] } Keyword[if] operator[SEP] identifier[m_jGracenotes] operator[!=] Other[null] operator[SEP] { identifier[Point2D] identifier[gracesPosition] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[graceNotesAfter] operator[SEP] identifier[gracesPosition] operator[=] operator[SEP] identifier[Point2D] operator[SEP] identifier[getBase] operator[SEP] operator[SEP] operator[SEP] identifier[clone] operator[SEP] operator[SEP] operator[SEP] Keyword[else] { identifier[gracesPosition] operator[=] Keyword[new] identifier[Point2D] operator[SEP] identifier[Double] operator[SEP] identifier[m_noteHeadX] operator[+] identifier[chordWidth] operator[+] identifier[getMetrics] operator[SEP] operator[SEP] operator[SEP] identifier[getGraceNotesSpacing] operator[SEP] operator[SEP] operator[*] Other[2] , identifier[getBase] operator[SEP] operator[SEP] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[m_jGracenotes] operator[SEP] identifier[setBase] operator[SEP] identifier[gracesPosition] operator[SEP] operator[SEP] } identifier[m_width] operator[=] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[graceNotesWidth] operator[+] identifier[chordWidth] operator[SEP] operator[SEP] }
public Token next() throws IOException { skipWhitespace(); int c = reader.read(); if (c < 0) { return new Token(Token.EOF); } else if (c == '\n') { return new Token(Token.EOL); } else if (c == '\'' || c == '"') { return munchString(c); } else if (c == '/') { return maybeComment(); } else if (single.get(c)) { return new Token(Token.SINGLE, String.valueOf((char) c)); } else { reader.unread(c); return parseWord(); } }
class class_name[name] begin[{] method[next, return_type[type[Token]], modifier[public], parameter[]] begin[{] call[.skipWhitespace, parameter[]] local_variable[type[int], c] if[binary_operation[member[.c], <, literal[0]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=EOF, postfix_operators=[], prefix_operators=[], qualifier=Token, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Token, sub_type=None))] else begin[{] if[binary_operation[member[.c], ==, literal['\n']]] begin[{] return[ClassCreator(arguments=[MemberReference(member=EOL, postfix_operators=[], prefix_operators=[], qualifier=Token, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Token, sub_type=None))] else begin[{] if[binary_operation[binary_operation[member[.c], ==, literal['\'']], ||, binary_operation[member[.c], ==, literal['"']]]] begin[{] return[call[.munchString, parameter[member[.c]]]] else begin[{] if[binary_operation[member[.c], ==, literal['/']]] begin[{] return[call[.maybeComment, parameter[]]] else begin[{] if[call[single.get, parameter[member[.c]]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=SINGLE, postfix_operators=[], prefix_operators=[], qualifier=Token, selectors=[]), MethodInvocation(arguments=[Cast(expression=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=char))], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Token, sub_type=None))] else begin[{] call[reader.unread, parameter[member[.c]]] return[call[.parseWord, parameter[]]] end[}] end[}] end[}] end[}] end[}] end[}] END[}]
Keyword[public] identifier[Token] identifier[next] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[skipWhitespace] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[c] operator[=] identifier[reader] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[<] Other[0] operator[SEP] { Keyword[return] Keyword[new] identifier[Token] operator[SEP] identifier[Token] operator[SEP] identifier[EOF] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[SEP] { Keyword[return] Keyword[new] identifier[Token] operator[SEP] identifier[Token] operator[SEP] identifier[EOL] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[||] identifier[c] operator[==] literal[String] operator[SEP] { Keyword[return] identifier[munchString] operator[SEP] identifier[c] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[SEP] { Keyword[return] identifier[maybeComment] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[single] operator[SEP] identifier[get] operator[SEP] identifier[c] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[Token] operator[SEP] identifier[Token] operator[SEP] identifier[SINGLE] , identifier[String] operator[SEP] identifier[valueOf] operator[SEP] operator[SEP] Keyword[char] operator[SEP] identifier[c] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[reader] operator[SEP] identifier[unread] operator[SEP] identifier[c] operator[SEP] operator[SEP] Keyword[return] identifier[parseWord] operator[SEP] operator[SEP] operator[SEP] } }