code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
private ByteBuffer removeChar(Sequence sequenceObj) { byte[] sequenceByte = sequenceObj.getSequenceByte(); int beginPosition = 0; int endPosition = (int) sequenceObj.getLength(); if (sequenceByte[0] == 'n') { for (byte base : sequenceByte) { if ('n' == (char) base) { beginPosition++; beginDelSequenceStr+=(char)base; } else { break; } } if (beginPosition == endPosition) { return ByteBuffer.wrap(new byte[0]); } } if (sequenceByte[endPosition - 1] == 'n') { for (int i = endPosition - 1; i > 0; i--) { if ('n' == sequenceByte[i]) { endPosition--; } else { break; } } } int length = (int) (endPosition - beginPosition); int offset = beginPosition; byte[] strippedSequence = new byte[length]; System.arraycopy(sequenceObj.getSequenceByte(), offset, strippedSequence, 0, length); return ByteBuffer.wrap(strippedSequence, 0, strippedSequence.length); }
class class_name[name] begin[{] method[removeChar, return_type[type[ByteBuffer]], modifier[private], parameter[sequenceObj]] begin[{] local_variable[type[byte], sequenceByte] local_variable[type[int], beginPosition] local_variable[type[int], endPosition] if[binary_operation[member[.sequenceByte], ==, literal['n']]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='n'), operandr=Cast(expression=MemberReference(member=base, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=char)), operator===), else_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=beginPosition, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=beginDelSequenceStr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Cast(expression=MemberReference(member=base, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=char))), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=sequenceByte, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=base)], modifiers=set(), type=BasicType(dimensions=[], name=byte))), label=None) if[binary_operation[member[.beginPosition], ==, member[.endPosition]]] begin[{] return[call[ByteBuffer.wrap, parameter[ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte))]]] else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[member[.sequenceByte], ==, literal['n']]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='n'), operandr=MemberReference(member=sequenceByte, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator===), else_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=endPosition, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[]), 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=endPosition, postfix_operators=[], prefix_operators=[], qualifier=, 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[int], length] local_variable[type[int], offset] local_variable[type[byte], strippedSequence] call[System.arraycopy, parameter[call[sequenceObj.getSequenceByte, parameter[]], member[.offset], member[.strippedSequence], literal[0], member[.length]]] return[call[ByteBuffer.wrap, parameter[member[.strippedSequence], literal[0], member[strippedSequence.length]]]] end[}] END[}]
Keyword[private] identifier[ByteBuffer] identifier[removeChar] operator[SEP] identifier[Sequence] identifier[sequenceObj] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[sequenceByte] operator[=] identifier[sequenceObj] operator[SEP] identifier[getSequenceByte] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[beginPosition] operator[=] Other[0] operator[SEP] Keyword[int] identifier[endPosition] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[sequenceObj] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sequenceByte] operator[SEP] Other[0] operator[SEP] operator[==] literal[String] operator[SEP] { Keyword[for] operator[SEP] Keyword[byte] identifier[base] operator[:] identifier[sequenceByte] operator[SEP] { Keyword[if] operator[SEP] literal[String] operator[==] operator[SEP] Keyword[char] operator[SEP] identifier[base] operator[SEP] { identifier[beginPosition] operator[++] operator[SEP] identifier[beginDelSequenceStr] operator[+=] operator[SEP] Keyword[char] operator[SEP] identifier[base] operator[SEP] } Keyword[else] { Keyword[break] operator[SEP] } } Keyword[if] operator[SEP] identifier[beginPosition] operator[==] identifier[endPosition] operator[SEP] { Keyword[return] identifier[ByteBuffer] operator[SEP] identifier[wrap] operator[SEP] Keyword[new] Keyword[byte] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[sequenceByte] operator[SEP] identifier[endPosition] operator[-] Other[1] operator[SEP] operator[==] literal[String] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[endPosition] operator[-] Other[1] operator[SEP] identifier[i] operator[>] Other[0] operator[SEP] identifier[i] operator[--] operator[SEP] { Keyword[if] operator[SEP] literal[String] operator[==] identifier[sequenceByte] operator[SEP] identifier[i] operator[SEP] operator[SEP] { identifier[endPosition] operator[--] operator[SEP] } Keyword[else] { Keyword[break] operator[SEP] } } } Keyword[int] identifier[length] operator[=] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[endPosition] operator[-] identifier[beginPosition] operator[SEP] operator[SEP] Keyword[int] identifier[offset] operator[=] identifier[beginPosition] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[strippedSequence] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[sequenceObj] operator[SEP] identifier[getSequenceByte] operator[SEP] operator[SEP] , identifier[offset] , identifier[strippedSequence] , Other[0] , identifier[length] operator[SEP] operator[SEP] Keyword[return] identifier[ByteBuffer] operator[SEP] identifier[wrap] operator[SEP] identifier[strippedSequence] , Other[0] , identifier[strippedSequence] operator[SEP] identifier[length] operator[SEP] operator[SEP] }
public static MutableRoaringBitmap or(final ImmutableRoaringBitmap x1, final ImmutableRoaringBitmap x2) { final MutableRoaringBitmap answer = new MutableRoaringBitmap(); MappeableContainerPointer i1 = x1.highLowContainer.getContainerPointer(); MappeableContainerPointer i2 = x2.highLowContainer.getContainerPointer(); main: if (i1.hasContainer() && i2.hasContainer()) { while (true) { if (i1.key() == i2.key()) { answer.getMappeableRoaringArray().append(i1.key(), i1.getContainer().or(i2.getContainer())); i1.advance(); i2.advance(); if (!i1.hasContainer() || !i2.hasContainer()) { break main; } } else if (Util.compareUnsigned(i1.key(), i2.key()) < 0) { // i1.key() < i2.key() answer.getMappeableRoaringArray().appendCopy(i1.key(), i1.getContainer()); i1.advance(); if (!i1.hasContainer()) { break main; } } else { // i1.key() > i2.key() answer.getMappeableRoaringArray().appendCopy(i2.key(), i2.getContainer()); i2.advance(); if (!i2.hasContainer()) { break main; } } } } if (!i1.hasContainer()) { while (i2.hasContainer()) { answer.getMappeableRoaringArray().appendCopy(i2.key(), i2.getContainer()); i2.advance(); } } else if (!i2.hasContainer()) { while (i1.hasContainer()) { answer.getMappeableRoaringArray().appendCopy(i1.key(), i1.getContainer()); i1.advance(); } } return answer; }
class class_name[name] begin[{] method[or, return_type[type[MutableRoaringBitmap]], modifier[public static], parameter[x1, x2]] begin[{] local_variable[type[MutableRoaringBitmap], answer] local_variable[type[MappeableContainerPointer], i1] local_variable[type[MappeableContainerPointer], i2] if[binary_operation[call[i1.hasContainer, parameter[]], &&, call[i2.hasContainer, parameter[]]]] begin[{] while[literal[true]] begin[{] if[binary_operation[call[i1.key, parameter[]], ==, call[i2.key, parameter[]]]] begin[{] call[answer.getMappeableRoaringArray, parameter[]] call[i1.advance, parameter[]] call[i2.advance, parameter[]] if[binary_operation[call[i1.hasContainer, parameter[]], ||, call[i2.hasContainer, parameter[]]]] begin[{] BreakStatement(goto=main, label=None) else begin[{] None end[}] else begin[{] if[binary_operation[call[Util.compareUnsigned, parameter[call[i1.key, parameter[]], call[i2.key, parameter[]]]], <, literal[0]]] begin[{] call[answer.getMappeableRoaringArray, parameter[]] call[i1.advance, parameter[]] if[call[i1.hasContainer, parameter[]]] begin[{] BreakStatement(goto=main, label=None) else begin[{] None end[}] else begin[{] call[answer.getMappeableRoaringArray, parameter[]] call[i2.advance, parameter[]] if[call[i2.hasContainer, parameter[]]] begin[{] BreakStatement(goto=main, label=None) else begin[{] None end[}] end[}] end[}] end[}] else begin[{] None end[}] if[call[i1.hasContainer, parameter[]]] begin[{] while[call[i2.hasContainer, parameter[]]] begin[{] call[answer.getMappeableRoaringArray, parameter[]] call[i2.advance, parameter[]] end[}] else begin[{] if[call[i2.hasContainer, parameter[]]] begin[{] while[call[i1.hasContainer, parameter[]]] begin[{] call[answer.getMappeableRoaringArray, parameter[]] call[i1.advance, parameter[]] end[}] else begin[{] None end[}] end[}] return[member[.answer]] end[}] END[}]
Keyword[public] Keyword[static] identifier[MutableRoaringBitmap] identifier[or] operator[SEP] Keyword[final] identifier[ImmutableRoaringBitmap] identifier[x1] , Keyword[final] identifier[ImmutableRoaringBitmap] identifier[x2] operator[SEP] { Keyword[final] identifier[MutableRoaringBitmap] identifier[answer] operator[=] Keyword[new] identifier[MutableRoaringBitmap] operator[SEP] operator[SEP] operator[SEP] identifier[MappeableContainerPointer] identifier[i1] operator[=] identifier[x1] operator[SEP] identifier[highLowContainer] operator[SEP] identifier[getContainerPointer] operator[SEP] operator[SEP] operator[SEP] identifier[MappeableContainerPointer] identifier[i2] operator[=] identifier[x2] operator[SEP] identifier[highLowContainer] operator[SEP] identifier[getContainerPointer] operator[SEP] operator[SEP] operator[SEP] identifier[main] operator[:] Keyword[if] operator[SEP] identifier[i1] operator[SEP] identifier[hasContainer] operator[SEP] operator[SEP] operator[&&] identifier[i2] operator[SEP] identifier[hasContainer] operator[SEP] operator[SEP] operator[SEP] { Keyword[while] operator[SEP] literal[boolean] operator[SEP] { Keyword[if] operator[SEP] identifier[i1] operator[SEP] identifier[key] operator[SEP] operator[SEP] operator[==] identifier[i2] operator[SEP] identifier[key] operator[SEP] operator[SEP] operator[SEP] { identifier[answer] operator[SEP] identifier[getMappeableRoaringArray] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[i1] operator[SEP] identifier[key] operator[SEP] operator[SEP] , identifier[i1] operator[SEP] identifier[getContainer] operator[SEP] operator[SEP] operator[SEP] identifier[or] operator[SEP] identifier[i2] operator[SEP] identifier[getContainer] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[i1] operator[SEP] identifier[advance] operator[SEP] operator[SEP] operator[SEP] identifier[i2] operator[SEP] identifier[advance] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[i1] operator[SEP] identifier[hasContainer] operator[SEP] operator[SEP] operator[||] operator[!] identifier[i2] operator[SEP] identifier[hasContainer] operator[SEP] operator[SEP] operator[SEP] { Keyword[break] identifier[main] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[Util] operator[SEP] identifier[compareUnsigned] operator[SEP] identifier[i1] operator[SEP] identifier[key] operator[SEP] operator[SEP] , identifier[i2] operator[SEP] identifier[key] operator[SEP] operator[SEP] operator[SEP] operator[<] Other[0] operator[SEP] { identifier[answer] operator[SEP] identifier[getMappeableRoaringArray] operator[SEP] operator[SEP] operator[SEP] identifier[appendCopy] operator[SEP] identifier[i1] operator[SEP] identifier[key] operator[SEP] operator[SEP] , identifier[i1] operator[SEP] identifier[getContainer] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[i1] operator[SEP] identifier[advance] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[i1] operator[SEP] identifier[hasContainer] operator[SEP] operator[SEP] operator[SEP] { Keyword[break] identifier[main] operator[SEP] } } Keyword[else] { identifier[answer] operator[SEP] identifier[getMappeableRoaringArray] operator[SEP] operator[SEP] operator[SEP] identifier[appendCopy] operator[SEP] identifier[i2] operator[SEP] identifier[key] operator[SEP] operator[SEP] , identifier[i2] operator[SEP] identifier[getContainer] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[i2] operator[SEP] identifier[advance] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[i2] operator[SEP] identifier[hasContainer] operator[SEP] operator[SEP] operator[SEP] { Keyword[break] identifier[main] operator[SEP] } } } } Keyword[if] operator[SEP] operator[!] identifier[i1] operator[SEP] identifier[hasContainer] operator[SEP] operator[SEP] operator[SEP] { Keyword[while] operator[SEP] identifier[i2] operator[SEP] identifier[hasContainer] operator[SEP] operator[SEP] operator[SEP] { identifier[answer] operator[SEP] identifier[getMappeableRoaringArray] operator[SEP] operator[SEP] operator[SEP] identifier[appendCopy] operator[SEP] identifier[i2] operator[SEP] identifier[key] operator[SEP] operator[SEP] , identifier[i2] operator[SEP] identifier[getContainer] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[i2] operator[SEP] identifier[advance] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] operator[!] identifier[i2] operator[SEP] identifier[hasContainer] operator[SEP] operator[SEP] operator[SEP] { Keyword[while] operator[SEP] identifier[i1] operator[SEP] identifier[hasContainer] operator[SEP] operator[SEP] operator[SEP] { identifier[answer] operator[SEP] identifier[getMappeableRoaringArray] operator[SEP] operator[SEP] operator[SEP] identifier[appendCopy] operator[SEP] identifier[i1] operator[SEP] identifier[key] operator[SEP] operator[SEP] , identifier[i1] operator[SEP] identifier[getContainer] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[i1] operator[SEP] identifier[advance] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[answer] operator[SEP] }
public static AliPayApiConfig putApiConfig(AliPayApiConfig aliPayApiConfig) { if (CFG_MAP.size() == 0) { CFG_MAP.put(DEFAULT_CFG_KEY, aliPayApiConfig); } return CFG_MAP.put(aliPayApiConfig.getAppId(), aliPayApiConfig); }
class class_name[name] begin[{] method[putApiConfig, return_type[type[AliPayApiConfig]], modifier[public static], parameter[aliPayApiConfig]] begin[{] if[binary_operation[call[CFG_MAP.size, parameter[]], ==, literal[0]]] begin[{] call[CFG_MAP.put, parameter[member[.DEFAULT_CFG_KEY], member[.aliPayApiConfig]]] else begin[{] None end[}] return[call[CFG_MAP.put, parameter[call[aliPayApiConfig.getAppId, parameter[]], member[.aliPayApiConfig]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[AliPayApiConfig] identifier[putApiConfig] operator[SEP] identifier[AliPayApiConfig] identifier[aliPayApiConfig] operator[SEP] { Keyword[if] operator[SEP] identifier[CFG_MAP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[CFG_MAP] operator[SEP] identifier[put] operator[SEP] identifier[DEFAULT_CFG_KEY] , identifier[aliPayApiConfig] operator[SEP] operator[SEP] } Keyword[return] identifier[CFG_MAP] operator[SEP] identifier[put] operator[SEP] identifier[aliPayApiConfig] operator[SEP] identifier[getAppId] operator[SEP] operator[SEP] , identifier[aliPayApiConfig] operator[SEP] operator[SEP] }
public void setInAppStreamNames(java.util.Collection<String> inAppStreamNames) { if (inAppStreamNames == null) { this.inAppStreamNames = null; return; } this.inAppStreamNames = new java.util.ArrayList<String>(inAppStreamNames); }
class class_name[name] begin[{] method[setInAppStreamNames, return_type[void], modifier[public], parameter[inAppStreamNames]] begin[{] if[binary_operation[member[.inAppStreamNames], ==, literal[null]]] begin[{] assign[THIS[member[None.inAppStreamNames]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.inAppStreamNames]], ClassCreator(arguments=[MemberReference(member=inAppStreamNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setInAppStreamNames] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[inAppStreamNames] operator[SEP] { Keyword[if] operator[SEP] identifier[inAppStreamNames] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[inAppStreamNames] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[inAppStreamNames] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] identifier[inAppStreamNames] operator[SEP] operator[SEP] }
public int doStartTag() throws JspException { if (_rolloverImage != null && getJavaScriptAttribute(ONMOUSEOVER) == null) { // cause the roll over script to be inserted WriteRenderAppender writer = new WriteRenderAppender(pageContext); ScriptRequestState srs = ScriptRequestState.getScriptRequestState((HttpServletRequest) pageContext.getRequest()); srs.writeFeature(getScriptReporter(), writer, CoreScriptFeature.ROLLOVER, true, false, null); } return EVAL_BODY_BUFFERED; }
class class_name[name] begin[{] method[doStartTag, return_type[type[int]], modifier[public], parameter[]] begin[{] if[binary_operation[binary_operation[member[._rolloverImage], !=, literal[null]], &&, binary_operation[call[.getJavaScriptAttribute, parameter[member[.ONMOUSEOVER]]], ==, literal[null]]]] begin[{] local_variable[type[WriteRenderAppender], writer] local_variable[type[ScriptRequestState], srs] call[srs.writeFeature, parameter[call[.getScriptReporter, parameter[]], member[.writer], member[CoreScriptFeature.ROLLOVER], literal[true], literal[false], literal[null]]] else begin[{] None end[}] return[member[.EVAL_BODY_BUFFERED]] end[}] END[}]
Keyword[public] Keyword[int] identifier[doStartTag] operator[SEP] operator[SEP] Keyword[throws] identifier[JspException] { Keyword[if] operator[SEP] identifier[_rolloverImage] operator[!=] Other[null] operator[&&] identifier[getJavaScriptAttribute] operator[SEP] identifier[ONMOUSEOVER] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[WriteRenderAppender] identifier[writer] operator[=] Keyword[new] identifier[WriteRenderAppender] operator[SEP] identifier[pageContext] operator[SEP] operator[SEP] identifier[ScriptRequestState] identifier[srs] operator[=] identifier[ScriptRequestState] operator[SEP] identifier[getScriptRequestState] operator[SEP] operator[SEP] identifier[HttpServletRequest] operator[SEP] identifier[pageContext] operator[SEP] identifier[getRequest] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[srs] operator[SEP] identifier[writeFeature] operator[SEP] identifier[getScriptReporter] operator[SEP] operator[SEP] , identifier[writer] , identifier[CoreScriptFeature] operator[SEP] identifier[ROLLOVER] , literal[boolean] , literal[boolean] , Other[null] operator[SEP] operator[SEP] } Keyword[return] identifier[EVAL_BODY_BUFFERED] operator[SEP] }
public static void writeClassMethod(final File srcDir, final Class<?> cls) { writeClassMethod(srcDir, cls, false, false, false, null, null, Objects.class); }
class class_name[name] begin[{] method[writeClassMethod, return_type[void], modifier[public static], parameter[srcDir, cls]] begin[{] call[.writeClassMethod, parameter[member[.srcDir], member[.cls], literal[false], literal[false], literal[false], literal[null], literal[null], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Objects, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[writeClassMethod] operator[SEP] Keyword[final] identifier[File] identifier[srcDir] , Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[cls] operator[SEP] { identifier[writeClassMethod] operator[SEP] identifier[srcDir] , identifier[cls] , literal[boolean] , literal[boolean] , literal[boolean] , Other[null] , Other[null] , identifier[Objects] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public boolean hasNonSpecificConsumers() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "hasNonSpecificConsumers"); boolean value; if (generalMemberCount > 0) value = true; else value = false; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "hasNonSpecificConsumers", Boolean.valueOf(value)); return value; }
class class_name[name] begin[{] method[hasNonSpecificConsumers, return_type[type[boolean]], modifier[public], parameter[]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["hasNonSpecificConsumers"]]] else begin[{] None end[}] local_variable[type[boolean], value] if[binary_operation[member[.generalMemberCount], >, literal[0]]] begin[{] assign[member[.value], literal[true]] else begin[{] assign[member[.value], literal[false]] end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["hasNonSpecificConsumers"], call[Boolean.valueOf, parameter[member[.value]]]]] else begin[{] None end[}] return[member[.value]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[hasNonSpecificConsumers] 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] Keyword[boolean] identifier[value] operator[SEP] Keyword[if] operator[SEP] identifier[generalMemberCount] operator[>] Other[0] operator[SEP] identifier[value] operator[=] literal[boolean] operator[SEP] Keyword[else] identifier[value] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[value] operator[SEP] }
@Override public void psSetBytes(PreparedStatement pstmtImpl, int i, byte[] x) throws SQLException { int length = (x == null ? 0 : x.length); if (tc.isDebugEnabled()) Tr.debug(this, tc, "psSetBytes: " + length); if ((x != null) && (length > 2000)) { if (tc.isDebugEnabled()) Tr.debug(this, tc, "ORACLE setBytes byte array length > 2000 workaround."); pstmtImpl.setBinaryStream(i, new ByteArrayInputStream(x), length); } else pstmtImpl.setBytes(i, x); }
class class_name[name] begin[{] method[psSetBytes, return_type[void], modifier[public], parameter[pstmtImpl, i, x]] begin[{] local_variable[type[int], length] if[call[tc.isDebugEnabled, parameter[]]] begin[{] call[Tr.debug, parameter[THIS[], member[.tc], binary_operation[literal["psSetBytes: "], +, member[.length]]]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.x], !=, literal[null]], &&, binary_operation[member[.length], >, literal[2000]]]] begin[{] if[call[tc.isDebugEnabled, parameter[]]] begin[{] call[Tr.debug, parameter[THIS[], member[.tc], literal["ORACLE setBytes byte array length > 2000 workaround."]]] else begin[{] None end[}] call[pstmtImpl.setBinaryStream, parameter[member[.i], ClassCreator(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ByteArrayInputStream, sub_type=None)), member[.length]]] else begin[{] call[pstmtImpl.setBytes, parameter[member[.i], member[.x]]] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[psSetBytes] operator[SEP] identifier[PreparedStatement] identifier[pstmtImpl] , Keyword[int] identifier[i] , Keyword[byte] operator[SEP] operator[SEP] identifier[x] operator[SEP] Keyword[throws] identifier[SQLException] { Keyword[int] identifier[length] operator[=] operator[SEP] identifier[x] operator[==] Other[null] operator[?] Other[0] operator[:] identifier[x] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[+] identifier[length] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[x] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[length] operator[>] Other[2000] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] identifier[pstmtImpl] operator[SEP] identifier[setBinaryStream] operator[SEP] identifier[i] , Keyword[new] identifier[ByteArrayInputStream] operator[SEP] identifier[x] operator[SEP] , identifier[length] operator[SEP] operator[SEP] } Keyword[else] identifier[pstmtImpl] operator[SEP] identifier[setBytes] operator[SEP] identifier[i] , identifier[x] operator[SEP] operator[SEP] }
public Quaterniond rotateAxis(double angle, double axisX, double axisY, double axisZ, Quaterniond dest) { double hangle = angle / 2.0; double sinAngle = Math.sin(hangle); double invVLength = 1.0 / Math.sqrt(axisX * axisX + axisY * axisY + axisZ * axisZ); double rx = axisX * invVLength * sinAngle; double ry = axisY * invVLength * sinAngle; double rz = axisZ * invVLength * sinAngle; double rw = Math.cosFromSin(sinAngle, hangle); dest.set(w * rx + x * rw + y * rz - z * ry, w * ry - x * rz + y * rw + z * rx, w * rz + x * ry - y * rx + z * rw, w * rw - x * rx - y * ry - z * rz); return dest; }
class class_name[name] begin[{] method[rotateAxis, return_type[type[Quaterniond]], modifier[public], parameter[angle, axisX, axisY, axisZ, dest]] begin[{] local_variable[type[double], hangle] local_variable[type[double], sinAngle] local_variable[type[double], invVLength] local_variable[type[double], rx] local_variable[type[double], ry] local_variable[type[double], rz] local_variable[type[double], rw] call[dest.set, parameter[binary_operation[binary_operation[binary_operation[binary_operation[member[.w], *, member[.rx]], +, binary_operation[member[.x], *, member[.rw]]], +, binary_operation[member[.y], *, member[.rz]]], -, binary_operation[member[.z], *, member[.ry]]], binary_operation[binary_operation[binary_operation[binary_operation[member[.w], *, member[.ry]], -, binary_operation[member[.x], *, member[.rz]]], +, binary_operation[member[.y], *, member[.rw]]], +, binary_operation[member[.z], *, member[.rx]]], binary_operation[binary_operation[binary_operation[binary_operation[member[.w], *, member[.rz]], +, binary_operation[member[.x], *, member[.ry]]], -, binary_operation[member[.y], *, member[.rx]]], +, binary_operation[member[.z], *, member[.rw]]], binary_operation[binary_operation[binary_operation[binary_operation[member[.w], *, member[.rw]], -, binary_operation[member[.x], *, member[.rx]]], -, binary_operation[member[.y], *, member[.ry]]], -, binary_operation[member[.z], *, member[.rz]]]]] return[member[.dest]] end[}] END[}]
Keyword[public] identifier[Quaterniond] identifier[rotateAxis] operator[SEP] Keyword[double] identifier[angle] , Keyword[double] identifier[axisX] , Keyword[double] identifier[axisY] , Keyword[double] identifier[axisZ] , identifier[Quaterniond] identifier[dest] operator[SEP] { Keyword[double] identifier[hangle] operator[=] identifier[angle] operator[/] literal[Float] operator[SEP] Keyword[double] identifier[sinAngle] operator[=] identifier[Math] operator[SEP] identifier[sin] operator[SEP] identifier[hangle] operator[SEP] operator[SEP] Keyword[double] identifier[invVLength] operator[=] literal[Float] operator[/] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] identifier[axisX] operator[*] identifier[axisX] operator[+] identifier[axisY] operator[*] identifier[axisY] operator[+] identifier[axisZ] operator[*] identifier[axisZ] operator[SEP] operator[SEP] Keyword[double] identifier[rx] operator[=] identifier[axisX] operator[*] identifier[invVLength] operator[*] identifier[sinAngle] operator[SEP] Keyword[double] identifier[ry] operator[=] identifier[axisY] operator[*] identifier[invVLength] operator[*] identifier[sinAngle] operator[SEP] Keyword[double] identifier[rz] operator[=] identifier[axisZ] operator[*] identifier[invVLength] operator[*] identifier[sinAngle] operator[SEP] Keyword[double] identifier[rw] operator[=] identifier[Math] operator[SEP] identifier[cosFromSin] operator[SEP] identifier[sinAngle] , identifier[hangle] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[set] operator[SEP] identifier[w] operator[*] identifier[rx] operator[+] identifier[x] operator[*] identifier[rw] operator[+] identifier[y] operator[*] identifier[rz] operator[-] identifier[z] operator[*] identifier[ry] , identifier[w] operator[*] identifier[ry] operator[-] identifier[x] operator[*] identifier[rz] operator[+] identifier[y] operator[*] identifier[rw] operator[+] identifier[z] operator[*] identifier[rx] , identifier[w] operator[*] identifier[rz] operator[+] identifier[x] operator[*] identifier[ry] operator[-] identifier[y] operator[*] identifier[rx] operator[+] identifier[z] operator[*] identifier[rw] , identifier[w] operator[*] identifier[rw] operator[-] identifier[x] operator[*] identifier[rx] operator[-] identifier[y] operator[*] identifier[ry] operator[-] identifier[z] operator[*] identifier[rz] operator[SEP] operator[SEP] Keyword[return] identifier[dest] operator[SEP] }
public Router connect(@NotNull final String pattern, @NotNull final IMiddleware... handlers) { addPattern("CONNECT", pattern, handlers, connectBindings); return this; }
class class_name[name] begin[{] method[connect, return_type[type[Router]], modifier[public], parameter[pattern, handlers]] begin[{] call[.addPattern, parameter[literal["CONNECT"], member[.pattern], member[.handlers], member[.connectBindings]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[Router] identifier[connect] operator[SEP] annotation[@] identifier[NotNull] Keyword[final] identifier[String] identifier[pattern] , annotation[@] identifier[NotNull] Keyword[final] identifier[IMiddleware] operator[...] identifier[handlers] operator[SEP] { identifier[addPattern] operator[SEP] literal[String] , identifier[pattern] , identifier[handlers] , identifier[connectBindings] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public Response doValidate(String name, ExecutionRequest executionRequest, UserDetails userDetails, RestUIContext uiContext) throws Exception { try (RestUIContext context = uiContext) { UICommand command = getCommandByName(context, name); if (command == null) { return Response.status(Status.NOT_FOUND).build(); } List<Map<String, Object>> inputList = executionRequest.getInputList(); CommandController controller = createController(context, command); configureAttributeMaps(userDetails, controller, executionRequest); ValidationResult answer = null; if (controller instanceof WizardCommandController) { WizardCommandController wizardCommandController = (WizardCommandController) controller; List<WizardCommandController> controllers = new ArrayList<>(); List<CommandInputDTO> stepPropertiesList = new ArrayList<>(); List<ValidationResult> stepResultList = new ArrayList<>(); List<ValidationResult> stepValidationList = new ArrayList<>(); controllers.add(wizardCommandController); WizardCommandController lastController = wizardCommandController; List<UIMessage> lastResult = null; int page = executionRequest.wizardStep(); int nextPage = page + 1; boolean canMoveToNextStep = false; for (Map<String, Object> inputs : inputList) { UICommands.populateController(inputs, lastController, getConverterFactory()); CommandInputDTO stepDto = UICommands.createCommandInputDTO(context, command, lastController); stepPropertiesList.add(stepDto); canMoveToNextStep = lastController.canMoveToNextStep(); boolean valid = lastController.isValid(); if (!canMoveToNextStep) { // lets assume we can execute now lastResult = lastController.validate(); LOG.debug("Invoked command " + name + " with " + executionRequest + " result: " + lastResult); ValidationResult stepResults = UICommands.createValidationResult(context, controller, lastResult); stepResultList.add(stepResults); break; } else if (!valid) { LOG.warn("Cannot move to next step as invalid despite the validation saying otherwise"); break; } WizardCommandController nextController = lastController.next(); if (nextController != null) { if (nextController == lastController) { LOG.warn("No idea whats going on ;)"); break; } lastController = nextController; lastController.initialize(); controllers.add(lastController); } else { int i = 0; for (WizardCommandController stepController : controllers) { Map<String, Object> stepControllerInputs = inputList.get(i++); UICommands.populateController(stepControllerInputs, stepController, getConverterFactory()); lastResult = stepController.validate(); LOG.debug("Invoked command " + name + " with " + executionRequest + " result: " + lastResult); ValidationResult stepResults = UICommands.createValidationResult(context, controller, lastResult); stepResultList.add(stepResults); } break; } } answer = UICommands.createValidationResult(context, controller, lastResult); // TODO do we need stepValidationList? //WizardResultsDTO wizardResultsDTO = new WizardResultsDTO(stepPropertiesList, stepValidationList, stepResultList); WizardResultsDTO wizardResultsDTO = new WizardResultsDTO(stepPropertiesList, stepResultList, new ArrayList<ExecutionResult>()); answer.setWizardResults(wizardResultsDTO); } else { Map<String, Object> inputs = inputList.get(0); UICommands.populateController(inputs, controller, getConverterFactory()); List<UIMessage> result = controller.validate(); LOG.debug("Invoked command " + name + " with " + executionRequest + " result: " + result); answer = UICommands.createValidationResult(context, controller, result); } return Response.ok(answer).build(); } }
class class_name[name] begin[{] method[doValidate, return_type[type[Response]], modifier[public], parameter[name, executionRequest, userDetails, uiContext]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getCommandByName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=command)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=UICommand, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=command, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=NOT_FOUND, postfix_operators=[], prefix_operators=[], qualifier=Status, selectors=[])], member=status, postfix_operators=[], prefix_operators=[], qualifier=Response, selectors=[MethodInvocation(arguments=[], member=build, 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=getInputList, postfix_operators=[], prefix_operators=[], qualifier=executionRequest, selectors=[], type_arguments=None), name=inputList)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, 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=[], name=Map, sub_type=None))], dimensions=[], name=List, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=command, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createController, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=controller)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CommandController, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=userDetails, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=controller, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=executionRequest, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=configureAttributeMaps, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=answer)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ValidationResult, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=controller, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=WizardCommandController, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=inputList, selectors=[], type_arguments=None), name=inputs)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=Map, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=inputs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=controller, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getConverterFactory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=populateController, postfix_operators=[], prefix_operators=[], qualifier=UICommands, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=validate, postfix_operators=[], prefix_operators=[], qualifier=controller, selectors=[], type_arguments=None), name=result)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=UIMessage, sub_type=None))], dimensions=[], name=List, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invoked command "), operandr=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" with "), operator=+), operandr=MemberReference(member=executionRequest, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" result: "), operator=+), operandr=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=answer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=controller, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createValidationResult, postfix_operators=[], prefix_operators=[], qualifier=UICommands, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=controller, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=WizardCommandController, sub_type=None)), name=wizardCommandController)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=WizardCommandController, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None)), name=controllers)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=WizardCommandController, sub_type=None))], dimensions=[], name=List, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None)), name=stepPropertiesList)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=CommandInputDTO, sub_type=None))], dimensions=[], name=List, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None)), name=stepResultList)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ValidationResult, sub_type=None))], dimensions=[], name=List, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None)), name=stepValidationList)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ValidationResult, sub_type=None))], dimensions=[], name=List, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=wizardCommandController, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=controllers, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=wizardCommandController, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=lastController)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=WizardCommandController, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=lastResult)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=UIMessage, sub_type=None))], dimensions=[], name=List, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=wizardStep, postfix_operators=[], prefix_operators=[], qualifier=executionRequest, selectors=[], type_arguments=None), name=page)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=page, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), name=nextPage)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=canMoveToNextStep)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=inputs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lastController, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getConverterFactory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=populateController, postfix_operators=[], prefix_operators=[], qualifier=UICommands, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=command, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lastController, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createCommandInputDTO, postfix_operators=[], prefix_operators=[], qualifier=UICommands, selectors=[], type_arguments=None), name=stepDto)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CommandInputDTO, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=stepDto, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=stepPropertiesList, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=canMoveToNextStep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=canMoveToNextStep, postfix_operators=[], prefix_operators=[], qualifier=lastController, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=isValid, postfix_operators=[], prefix_operators=[], qualifier=lastController, selectors=[], type_arguments=None), name=valid)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), IfStatement(condition=MemberReference(member=canMoveToNextStep, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=IfStatement(condition=MemberReference(member=valid, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot move to next step as invalid despite the validation saying otherwise")], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=validate, postfix_operators=[], prefix_operators=[], qualifier=lastController, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invoked command "), operandr=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" with "), operator=+), operandr=MemberReference(member=executionRequest, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" result: "), operator=+), operandr=MemberReference(member=lastResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=controller, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lastResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createValidationResult, postfix_operators=[], prefix_operators=[], qualifier=UICommands, selectors=[], type_arguments=None), name=stepResults)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ValidationResult, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=stepResults, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=stepResultList, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=lastController, selectors=[], type_arguments=None), name=nextController)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=WizardCommandController, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=nextController, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=inputList, selectors=[], type_arguments=None), name=stepControllerInputs)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=Map, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=stepControllerInputs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=stepController, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getConverterFactory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=populateController, postfix_operators=[], prefix_operators=[], qualifier=UICommands, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=validate, postfix_operators=[], prefix_operators=[], qualifier=stepController, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invoked command "), operandr=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" with "), operator=+), operandr=MemberReference(member=executionRequest, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" result: "), operator=+), operandr=MemberReference(member=lastResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=controller, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lastResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createValidationResult, postfix_operators=[], prefix_operators=[], qualifier=UICommands, selectors=[], type_arguments=None), name=stepResults)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ValidationResult, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=stepResults, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=stepResultList, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=controllers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=stepController)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=WizardCommandController, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=nextController, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=lastController, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No idea whats going on ;)")], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastController, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=nextController, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=initialize, postfix_operators=[], prefix_operators=[], qualifier=lastController, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=lastController, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=controllers, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=inputList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=inputs)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=Map, sub_type=None))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=answer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=controller, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lastResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createValidationResult, postfix_operators=[], prefix_operators=[], qualifier=UICommands, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=stepPropertiesList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=stepResultList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=ExecutionResult, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WizardResultsDTO, sub_type=None)), name=wizardResultsDTO)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=WizardResultsDTO, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=wizardResultsDTO, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setWizardResults, postfix_operators=[], prefix_operators=[], qualifier=answer, selectors=[], type_arguments=None), label=None)])), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=answer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=ok, postfix_operators=[], prefix_operators=[], qualifier=Response, selectors=[MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=None, finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=context, type=ReferenceType(arguments=None, dimensions=[], name=RestUIContext, sub_type=None), value=MemberReference(member=uiContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]) end[}] END[}]
Keyword[public] identifier[Response] identifier[doValidate] operator[SEP] identifier[String] identifier[name] , identifier[ExecutionRequest] identifier[executionRequest] , identifier[UserDetails] identifier[userDetails] , identifier[RestUIContext] identifier[uiContext] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[try] operator[SEP] identifier[RestUIContext] identifier[context] operator[=] identifier[uiContext] operator[SEP] { identifier[UICommand] identifier[command] operator[=] identifier[getCommandByName] operator[SEP] identifier[context] , identifier[name] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[command] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[Response] operator[SEP] identifier[status] operator[SEP] identifier[Status] operator[SEP] identifier[NOT_FOUND] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] operator[>] identifier[inputList] operator[=] identifier[executionRequest] operator[SEP] identifier[getInputList] operator[SEP] operator[SEP] operator[SEP] identifier[CommandController] identifier[controller] operator[=] identifier[createController] operator[SEP] identifier[context] , identifier[command] operator[SEP] operator[SEP] identifier[configureAttributeMaps] operator[SEP] identifier[userDetails] , identifier[controller] , identifier[executionRequest] operator[SEP] operator[SEP] identifier[ValidationResult] identifier[answer] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[controller] Keyword[instanceof] identifier[WizardCommandController] operator[SEP] { identifier[WizardCommandController] identifier[wizardCommandController] operator[=] operator[SEP] identifier[WizardCommandController] operator[SEP] identifier[controller] operator[SEP] identifier[List] operator[<] identifier[WizardCommandController] operator[>] identifier[controllers] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[CommandInputDTO] operator[>] identifier[stepPropertiesList] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[ValidationResult] operator[>] identifier[stepResultList] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[ValidationResult] operator[>] identifier[stepValidationList] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[controllers] operator[SEP] identifier[add] operator[SEP] identifier[wizardCommandController] operator[SEP] operator[SEP] identifier[WizardCommandController] identifier[lastController] operator[=] identifier[wizardCommandController] operator[SEP] identifier[List] operator[<] identifier[UIMessage] operator[>] identifier[lastResult] operator[=] Other[null] operator[SEP] Keyword[int] identifier[page] operator[=] identifier[executionRequest] operator[SEP] identifier[wizardStep] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[nextPage] operator[=] identifier[page] operator[+] Other[1] operator[SEP] Keyword[boolean] identifier[canMoveToNextStep] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[inputs] operator[:] identifier[inputList] operator[SEP] { identifier[UICommands] operator[SEP] identifier[populateController] operator[SEP] identifier[inputs] , identifier[lastController] , identifier[getConverterFactory] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[CommandInputDTO] identifier[stepDto] operator[=] identifier[UICommands] operator[SEP] identifier[createCommandInputDTO] operator[SEP] identifier[context] , identifier[command] , identifier[lastController] operator[SEP] operator[SEP] identifier[stepPropertiesList] operator[SEP] identifier[add] operator[SEP] identifier[stepDto] operator[SEP] operator[SEP] identifier[canMoveToNextStep] operator[=] identifier[lastController] operator[SEP] identifier[canMoveToNextStep] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[valid] operator[=] identifier[lastController] operator[SEP] identifier[isValid] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[canMoveToNextStep] operator[SEP] { identifier[lastResult] operator[=] identifier[lastController] operator[SEP] identifier[validate] operator[SEP] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[name] operator[+] literal[String] operator[+] identifier[executionRequest] operator[+] literal[String] operator[+] identifier[lastResult] operator[SEP] operator[SEP] identifier[ValidationResult] identifier[stepResults] operator[=] identifier[UICommands] operator[SEP] identifier[createValidationResult] operator[SEP] identifier[context] , identifier[controller] , identifier[lastResult] operator[SEP] operator[SEP] identifier[stepResultList] operator[SEP] identifier[add] operator[SEP] identifier[stepResults] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[!] identifier[valid] operator[SEP] { identifier[LOG] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } identifier[WizardCommandController] identifier[nextController] operator[=] identifier[lastController] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nextController] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[nextController] operator[==] identifier[lastController] operator[SEP] { identifier[LOG] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } identifier[lastController] operator[=] identifier[nextController] operator[SEP] identifier[lastController] operator[SEP] identifier[initialize] operator[SEP] operator[SEP] operator[SEP] identifier[controllers] operator[SEP] identifier[add] operator[SEP] identifier[lastController] operator[SEP] operator[SEP] } Keyword[else] { Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[WizardCommandController] identifier[stepController] operator[:] identifier[controllers] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[stepControllerInputs] operator[=] identifier[inputList] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[++] operator[SEP] operator[SEP] identifier[UICommands] operator[SEP] identifier[populateController] operator[SEP] identifier[stepControllerInputs] , identifier[stepController] , identifier[getConverterFactory] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[lastResult] operator[=] identifier[stepController] operator[SEP] identifier[validate] operator[SEP] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[name] operator[+] literal[String] operator[+] identifier[executionRequest] operator[+] literal[String] operator[+] identifier[lastResult] operator[SEP] operator[SEP] identifier[ValidationResult] identifier[stepResults] operator[=] identifier[UICommands] operator[SEP] identifier[createValidationResult] operator[SEP] identifier[context] , identifier[controller] , identifier[lastResult] operator[SEP] operator[SEP] identifier[stepResultList] operator[SEP] identifier[add] operator[SEP] identifier[stepResults] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] } } identifier[answer] operator[=] identifier[UICommands] operator[SEP] identifier[createValidationResult] operator[SEP] identifier[context] , identifier[controller] , identifier[lastResult] operator[SEP] operator[SEP] identifier[WizardResultsDTO] identifier[wizardResultsDTO] operator[=] Keyword[new] identifier[WizardResultsDTO] operator[SEP] identifier[stepPropertiesList] , identifier[stepResultList] , Keyword[new] identifier[ArrayList] operator[<] identifier[ExecutionResult] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[answer] operator[SEP] identifier[setWizardResults] operator[SEP] identifier[wizardResultsDTO] operator[SEP] operator[SEP] } Keyword[else] { identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[inputs] operator[=] identifier[inputList] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[UICommands] operator[SEP] identifier[populateController] operator[SEP] identifier[inputs] , identifier[controller] , identifier[getConverterFactory] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[UIMessage] operator[>] identifier[result] operator[=] identifier[controller] operator[SEP] identifier[validate] operator[SEP] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[name] operator[+] literal[String] operator[+] identifier[executionRequest] operator[+] literal[String] operator[+] identifier[result] operator[SEP] operator[SEP] identifier[answer] operator[=] identifier[UICommands] operator[SEP] identifier[createValidationResult] operator[SEP] identifier[context] , identifier[controller] , identifier[result] operator[SEP] operator[SEP] } Keyword[return] identifier[Response] operator[SEP] identifier[ok] operator[SEP] identifier[answer] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] } }
public int read (CharBuffer target) throws IOException { if (target == this) { throw new IllegalArgumentException(); } if (remaining() == 0) { return target.remaining() == 0 ? 0 : -1; } int result = Math.min(target.remaining(), remaining()); char[] chars = new char[result]; get(chars); target.put(chars); return result; }
class class_name[name] begin[{] method[read, return_type[type[int]], modifier[public], parameter[target]] begin[{] if[binary_operation[member[.target], ==, THIS[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[call[.remaining, parameter[]], ==, literal[0]]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=remaining, postfix_operators=[], prefix_operators=[], qualifier=target, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), if_false=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))] else begin[{] None end[}] local_variable[type[int], result] local_variable[type[char], chars] call[.get, parameter[member[.chars]]] call[target.put, parameter[member[.chars]]] return[member[.result]] end[}] END[}]
Keyword[public] Keyword[int] identifier[read] operator[SEP] identifier[CharBuffer] identifier[target] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[target] operator[==] Keyword[this] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[remaining] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[return] identifier[target] operator[SEP] identifier[remaining] operator[SEP] operator[SEP] operator[==] Other[0] operator[?] Other[0] operator[:] operator[-] Other[1] operator[SEP] } Keyword[int] identifier[result] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[target] operator[SEP] identifier[remaining] operator[SEP] operator[SEP] , identifier[remaining] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[chars] operator[=] Keyword[new] Keyword[char] operator[SEP] identifier[result] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[chars] operator[SEP] operator[SEP] identifier[target] operator[SEP] identifier[put] operator[SEP] identifier[chars] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
@RequestMapping(method = RequestMethod.POST, params = "action=updateAttributes") public ModelAndView updateAttributes( HttpServletRequest request, HttpServletResponse response, @RequestParam("targetId") String targetId, @RequestBody Map<String, Map<String, String>> attributes) { IUserLayoutManager ulm = userInstanceManager .getUserInstance(request) .getPreferencesManager() .getUserLayoutManager(); if (!ulm.getNode(targetId).isEditAllowed()) { response.setStatus(HttpServletResponse.SC_FORBIDDEN); return new ModelAndView( "jsonView", Collections.singletonMap( "error", getMessage( "error.element.update", "Unable to update element", RequestContextUtils.getLocale(request)))); } // Update the attributes based on the supplied JSON (request body name-value pairs) IUserLayoutNodeDescription node = ulm.getNode(targetId); if (node == null) { logger.warn("[updateAttributes()] Unable to locate node with id: " + targetId); response.setStatus(HttpServletResponse.SC_BAD_REQUEST); return new ModelAndView( "jsonView", Collections.singletonMap( "error", "Unable to locate node with id: " + targetId)); } else { setObjectAttributes(node, request, attributes); final Locale locale = RequestContextUtils.getLocale(request); try { ulm.saveUserLayout(); } catch (PortalException e) { return handlePersistError(request, response, e); } Map<String, String> model = Collections.singletonMap( "success", getMessage( "success.element.update", "Updated element attributes", locale)); return new ModelAndView("jsonView", model); } }
class class_name[name] begin[{] method[updateAttributes, return_type[type[ModelAndView]], modifier[public], parameter[request, response, targetId, attributes]] begin[{] local_variable[type[IUserLayoutManager], ulm] if[call[ulm.getNode, parameter[member[.targetId]]]] begin[{] call[response.setStatus, parameter[member[HttpServletResponse.SC_FORBIDDEN]]] return[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="jsonView"), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="error"), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="error.element.update"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to update element"), MethodInvocation(arguments=[MemberReference(member=request, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getLocale, postfix_operators=[], prefix_operators=[], qualifier=RequestContextUtils, selectors=[], type_arguments=None)], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=singletonMap, postfix_operators=[], prefix_operators=[], qualifier=Collections, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ModelAndView, sub_type=None))] else begin[{] None end[}] local_variable[type[IUserLayoutNodeDescription], node] if[binary_operation[member[.node], ==, literal[null]]] begin[{] call[logger.warn, parameter[binary_operation[literal["[updateAttributes()] Unable to locate node with id: "], +, member[.targetId]]]] call[response.setStatus, parameter[member[HttpServletResponse.SC_BAD_REQUEST]]] return[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="jsonView"), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="error"), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to locate node with id: "), operandr=MemberReference(member=targetId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=singletonMap, postfix_operators=[], prefix_operators=[], qualifier=Collections, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ModelAndView, sub_type=None))] else begin[{] call[.setObjectAttributes, parameter[member[.node], member[.request], member[.attributes]]] local_variable[type[Locale], locale] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=saveUserLayout, postfix_operators=[], prefix_operators=[], qualifier=ulm, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=request, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=response, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=handlePersistError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['PortalException']))], finally_block=None, label=None, resources=None) local_variable[type[Map], model] return[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="jsonView"), MemberReference(member=model, 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=ModelAndView, sub_type=None))] end[}] end[}] END[}]
annotation[@] identifier[RequestMapping] operator[SEP] identifier[method] operator[=] identifier[RequestMethod] operator[SEP] identifier[POST] , identifier[params] operator[=] literal[String] operator[SEP] Keyword[public] identifier[ModelAndView] identifier[updateAttributes] operator[SEP] identifier[HttpServletRequest] identifier[request] , identifier[HttpServletResponse] identifier[response] , annotation[@] identifier[RequestParam] operator[SEP] literal[String] operator[SEP] identifier[String] identifier[targetId] , annotation[@] identifier[RequestBody] identifier[Map] operator[<] identifier[String] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] operator[>] identifier[attributes] operator[SEP] { identifier[IUserLayoutManager] identifier[ulm] operator[=] identifier[userInstanceManager] operator[SEP] identifier[getUserInstance] operator[SEP] identifier[request] operator[SEP] operator[SEP] identifier[getPreferencesManager] operator[SEP] operator[SEP] operator[SEP] identifier[getUserLayoutManager] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[ulm] operator[SEP] identifier[getNode] operator[SEP] identifier[targetId] operator[SEP] operator[SEP] identifier[isEditAllowed] operator[SEP] operator[SEP] operator[SEP] { identifier[response] operator[SEP] identifier[setStatus] operator[SEP] identifier[HttpServletResponse] operator[SEP] identifier[SC_FORBIDDEN] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ModelAndView] operator[SEP] literal[String] , identifier[Collections] operator[SEP] identifier[singletonMap] operator[SEP] literal[String] , identifier[getMessage] operator[SEP] literal[String] , literal[String] , identifier[RequestContextUtils] operator[SEP] identifier[getLocale] operator[SEP] identifier[request] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[IUserLayoutNodeDescription] identifier[node] operator[=] identifier[ulm] operator[SEP] identifier[getNode] operator[SEP] identifier[targetId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[node] operator[==] Other[null] operator[SEP] { identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[targetId] operator[SEP] operator[SEP] identifier[response] operator[SEP] identifier[setStatus] operator[SEP] identifier[HttpServletResponse] operator[SEP] identifier[SC_BAD_REQUEST] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ModelAndView] operator[SEP] literal[String] , identifier[Collections] operator[SEP] identifier[singletonMap] operator[SEP] literal[String] , literal[String] operator[+] identifier[targetId] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[setObjectAttributes] operator[SEP] identifier[node] , identifier[request] , identifier[attributes] operator[SEP] operator[SEP] Keyword[final] identifier[Locale] identifier[locale] operator[=] identifier[RequestContextUtils] operator[SEP] identifier[getLocale] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[try] { identifier[ulm] operator[SEP] identifier[saveUserLayout] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[PortalException] identifier[e] operator[SEP] { Keyword[return] identifier[handlePersistError] operator[SEP] identifier[request] , identifier[response] , identifier[e] operator[SEP] operator[SEP] } identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[model] operator[=] identifier[Collections] operator[SEP] identifier[singletonMap] operator[SEP] literal[String] , identifier[getMessage] operator[SEP] literal[String] , literal[String] , identifier[locale] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ModelAndView] operator[SEP] literal[String] , identifier[model] operator[SEP] operator[SEP] } }
@VisibleForTesting @GwtIncompatible("Unnecessary") void printBundleTo(Iterable<CompilerInput> inputs, Appendable out) throws IOException { // Prebuild ASTs before they're needed in getLoadFlags, for performance and because // StackOverflowErrors can be hit if not prebuilt. if (compiler.getOptions().numParallelThreads > 1) { new PrebuildAst(compiler, compiler.getOptions().numParallelThreads).prebuild(inputs); } if (!compiler.getOptions().preventLibraryInjection) { // ES6 modules will need a runtime in a bundle. Skip appending this runtime if there are no // ES6 modules to cut down on size. for (CompilerInput input : inputs) { if ("es6".equals(input.getLoadFlags().get("module"))) { appendRuntimeTo(out); break; } } } for (CompilerInput input : inputs) { String name = input.getName(); String code = input.getSourceFile().getCode(); // Ignore empty fill files created by the compiler to facilitate cross-module code motion. // Note that non-empty fill files (ones whose code has actually been moved into) are still // emitted. In particular, this ensures that if there are no (real) inputs the bundle will be // empty. if (Compiler.isFillFileName(name) && code.isEmpty()) { continue; } String rootRelativePath = rootRelativePathsMap.get(name); String displayName = rootRelativePath != null ? rootRelativePath : input.getName(); out.append("//"); out.append(displayName); out.append("\n"); prepForBundleAndAppendTo(out, input, code); out.append("\n"); } }
class class_name[name] begin[{] method[printBundleTo, return_type[void], modifier[default], parameter[inputs, out]] begin[{] if[binary_operation[call[compiler.getOptions, parameter[]], >, literal[1]]] begin[{] ClassCreator(arguments=[MemberReference(member=compiler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getOptions, postfix_operators=[], prefix_operators=[], qualifier=compiler, selectors=[MemberReference(member=numParallelThreads, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=inputs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=prebuild, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=PrebuildAst, sub_type=None)) else begin[{] None end[}] if[call[compiler.getOptions, parameter[]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLoadFlags, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="module")], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], value="es6"), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=appendRuntimeTo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=inputs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=input)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CompilerInput, sub_type=None))), label=None) else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=name)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getSourceFile, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[MethodInvocation(arguments=[], member=getCode, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=code)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isFillFileName, postfix_operators=[], prefix_operators=[], qualifier=Compiler, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=code, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=rootRelativePathsMap, selectors=[], type_arguments=None), name=rootRelativePath)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=rootRelativePath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), if_true=MemberReference(member=rootRelativePath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), name=displayName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="//")], member=append, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=displayName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n")], member=append, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=code, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=prepForBundleAndAppendTo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n")], member=append, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=inputs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=input)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CompilerInput, sub_type=None))), label=None) end[}] END[}]
annotation[@] identifier[VisibleForTesting] annotation[@] identifier[GwtIncompatible] operator[SEP] literal[String] operator[SEP] Keyword[void] identifier[printBundleTo] operator[SEP] identifier[Iterable] operator[<] identifier[CompilerInput] operator[>] identifier[inputs] , identifier[Appendable] identifier[out] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[compiler] operator[SEP] identifier[getOptions] operator[SEP] operator[SEP] operator[SEP] identifier[numParallelThreads] operator[>] Other[1] operator[SEP] { Keyword[new] identifier[PrebuildAst] operator[SEP] identifier[compiler] , identifier[compiler] operator[SEP] identifier[getOptions] operator[SEP] operator[SEP] operator[SEP] identifier[numParallelThreads] operator[SEP] operator[SEP] identifier[prebuild] operator[SEP] identifier[inputs] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[compiler] operator[SEP] identifier[getOptions] operator[SEP] operator[SEP] operator[SEP] identifier[preventLibraryInjection] operator[SEP] { Keyword[for] operator[SEP] identifier[CompilerInput] identifier[input] operator[:] identifier[inputs] operator[SEP] { Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[input] operator[SEP] identifier[getLoadFlags] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] { identifier[appendRuntimeTo] operator[SEP] identifier[out] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } } } Keyword[for] operator[SEP] identifier[CompilerInput] identifier[input] operator[:] identifier[inputs] operator[SEP] { identifier[String] identifier[name] operator[=] identifier[input] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[code] operator[=] identifier[input] operator[SEP] identifier[getSourceFile] operator[SEP] operator[SEP] operator[SEP] identifier[getCode] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Compiler] operator[SEP] identifier[isFillFileName] operator[SEP] identifier[name] operator[SEP] operator[&&] identifier[code] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[continue] operator[SEP] } identifier[String] identifier[rootRelativePath] operator[=] identifier[rootRelativePathsMap] operator[SEP] identifier[get] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[String] identifier[displayName] operator[=] identifier[rootRelativePath] operator[!=] Other[null] operator[?] identifier[rootRelativePath] operator[:] identifier[input] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[append] operator[SEP] identifier[displayName] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[prepForBundleAndAppendTo] operator[SEP] identifier[out] , identifier[input] , identifier[code] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } }
public static List<Element> getAllChildElements(Element parent) { List<Element> result; NodeList nodes; int i; int max; Node node; result = new ArrayList<>(); nodes = parent.getChildNodes(); max = nodes.getLength(); for (i = 0; i < max; i++) { node = nodes.item(i); if (node instanceof Element) { result.add((Element) node); } } return result; }
class class_name[name] begin[{] method[getAllChildElements, return_type[type[List]], modifier[public static], parameter[parent]] begin[{] local_variable[type[List], result] local_variable[type[NodeList], nodes] local_variable[type[int], i] local_variable[type[int], max] local_variable[type[Node], node] assign[member[.result], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None))] assign[member[.nodes], call[parent.getChildNodes, parameter[]]] assign[member[.max], call[nodes.getLength, parameter[]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=item, postfix_operators=[], prefix_operators=[], qualifier=nodes, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=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=max, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=[Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))], update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[Element] operator[>] identifier[getAllChildElements] operator[SEP] identifier[Element] identifier[parent] operator[SEP] { identifier[List] operator[<] identifier[Element] operator[>] identifier[result] operator[SEP] identifier[NodeList] identifier[nodes] operator[SEP] Keyword[int] identifier[i] operator[SEP] Keyword[int] identifier[max] operator[SEP] identifier[Node] identifier[node] operator[SEP] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[nodes] operator[=] identifier[parent] operator[SEP] identifier[getChildNodes] operator[SEP] operator[SEP] operator[SEP] identifier[max] operator[=] identifier[nodes] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[max] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[node] operator[=] identifier[nodes] operator[SEP] identifier[item] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[node] Keyword[instanceof] identifier[Element] operator[SEP] { identifier[result] operator[SEP] identifier[add] operator[SEP] operator[SEP] identifier[Element] operator[SEP] identifier[node] operator[SEP] operator[SEP] } } Keyword[return] identifier[result] operator[SEP] }
Response delete(URI uri) { HttpConnection connection = Http.DELETE(uri); return executeToResponse(connection); }
class class_name[name] begin[{] method[delete, return_type[type[Response]], modifier[default], parameter[uri]] begin[{] local_variable[type[HttpConnection], connection] return[call[.executeToResponse, parameter[member[.connection]]]] end[}] END[}]
identifier[Response] identifier[delete] operator[SEP] identifier[URI] identifier[uri] operator[SEP] { identifier[HttpConnection] identifier[connection] operator[=] identifier[Http] operator[SEP] identifier[DELETE] operator[SEP] identifier[uri] operator[SEP] operator[SEP] Keyword[return] identifier[executeToResponse] operator[SEP] identifier[connection] operator[SEP] operator[SEP] }
private void parseGrid(Element gridElement, String indent) throws DASException, NoSuchTypeException, BadSemanticsException { parseLevel++; // Grab the parent object (which better be a Grid!) // just to elminate the hassle of casting everytime... DGrid myGrid = (DGrid) parentDC; if (_Debug) { System.out.println("Parsing Grid Element: " + gridElement); System.out.println("Grid Elements: "); //showXMLElement(gridElement, indent); for (Element element : gridElement.getChildren()) System.out.println(element); } // Get and parse the grid's Array element. String eName = "Array"; if (_Debug) { System.out.println("Parsing Array element."); System.out.println("Asking for element: '" + eName + "' in namespace: '" + opendapNameSpace + "'"); } Element arrayElement = gridElement.getChild(eName, opendapNameSpace); if (_Debug) System.out.println("Got Array element: " + arrayElement); DArray gridArray = (DArray) newBaseType(arrayElement); parseArray(arrayElement, gridArray, indent + " "); // Add it to the Grid myGrid.addVariable(gridArray, DGrid.ARRAY); // Get the Map elements eName = "Map"; if (_Debug) { System.out.println("Parsing Map elements."); System.out.println("Asking for element: '" + eName + "' in namespace: '" + opendapNameSpace + "'"); } List<Element> mapElements = gridElement.getChildren("Map", opendapNameSpace); // Make sure the number of Map elements matches the dimension of the Grid Array. if (mapElements.size() != gridArray.numDimensions()) throw new BadSemanticsException("Error in Grid syntax: " + "The number of Map arrays must " + "equal the number of dimensions " + "of the data array."); // Parse each Map element and poke it into the Grid. for (Element mapElement : mapElements) { DArray thisMap = (DArray) newBaseType(mapElement); parseArray(mapElement, thisMap, indent + " "); if (thisMap.numDimensions() != 1) throw new BadSemanticsException("Error in Grid syntax: " + "Maps may have only one dimension."); myGrid.addVariable(thisMap, DGrid.MAPS); } parseLevel--; }
class class_name[name] begin[{] method[parseGrid, return_type[void], modifier[private], parameter[gridElement, indent]] begin[{] member[.parseLevel] local_variable[type[DGrid], myGrid] if[member[._Debug]] begin[{] call[System.out.println, parameter[binary_operation[literal["Parsing Grid Element: "], +, member[.gridElement]]]] call[System.out.println, parameter[literal["Grid Elements: "]]] ForStatement(body=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=element, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getChildren, postfix_operators=[], prefix_operators=[], qualifier=gridElement, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=element)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None))), label=None) else begin[{] None end[}] local_variable[type[String], eName] if[member[._Debug]] begin[{] call[System.out.println, parameter[literal["Parsing Array element."]]] call[System.out.println, parameter[binary_operation[binary_operation[binary_operation[binary_operation[literal["Asking for element: '"], +, member[.eName]], +, literal["' in namespace: '"]], +, member[.opendapNameSpace]], +, literal["'"]]]] else begin[{] None end[}] local_variable[type[Element], arrayElement] if[member[._Debug]] begin[{] call[System.out.println, parameter[binary_operation[literal["Got Array element: "], +, member[.arrayElement]]]] else begin[{] None end[}] local_variable[type[DArray], gridArray] call[.parseArray, parameter[member[.arrayElement], member[.gridArray], binary_operation[member[.indent], +, literal[" "]]]] call[myGrid.addVariable, parameter[member[.gridArray], member[DGrid.ARRAY]]] assign[member[.eName], literal["Map"]] if[member[._Debug]] begin[{] call[System.out.println, parameter[literal["Parsing Map elements."]]] call[System.out.println, parameter[binary_operation[binary_operation[binary_operation[binary_operation[literal["Asking for element: '"], +, member[.eName]], +, literal["' in namespace: '"]], +, member[.opendapNameSpace]], +, literal["'"]]]] else begin[{] None end[}] local_variable[type[List], mapElements] if[binary_operation[call[mapElements.size, parameter[]], !=, call[gridArray.numDimensions, parameter[]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error in Grid syntax: "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The number of Map arrays must "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="equal the number of dimensions "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="of the data array."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BadSemanticsException, sub_type=None)), label=None) else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=mapElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=newBaseType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=DArray, sub_type=None)), name=thisMap)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DArray, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=mapElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=thisMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=indent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" "), operator=+)], member=parseArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=numDimensions, postfix_operators=[], prefix_operators=[], qualifier=thisMap, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=!=), else_statement=None, label=None, then_statement=ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error in Grid syntax: "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Maps may have only one dimension."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BadSemanticsException, sub_type=None)), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=thisMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=MAPS, postfix_operators=[], prefix_operators=[], qualifier=DGrid, selectors=[])], member=addVariable, postfix_operators=[], prefix_operators=[], qualifier=myGrid, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=mapElements, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=mapElement)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None))), label=None) member[.parseLevel] end[}] END[}]
Keyword[private] Keyword[void] identifier[parseGrid] operator[SEP] identifier[Element] identifier[gridElement] , identifier[String] identifier[indent] operator[SEP] Keyword[throws] identifier[DASException] , identifier[NoSuchTypeException] , identifier[BadSemanticsException] { identifier[parseLevel] operator[++] operator[SEP] identifier[DGrid] identifier[myGrid] operator[=] operator[SEP] identifier[DGrid] operator[SEP] identifier[parentDC] operator[SEP] Keyword[if] operator[SEP] identifier[_Debug] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[gridElement] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Element] identifier[element] operator[:] identifier[gridElement] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[element] operator[SEP] operator[SEP] } identifier[String] identifier[eName] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[_Debug] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[eName] operator[+] literal[String] operator[+] identifier[opendapNameSpace] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[Element] identifier[arrayElement] operator[=] identifier[gridElement] operator[SEP] identifier[getChild] operator[SEP] identifier[eName] , identifier[opendapNameSpace] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_Debug] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[arrayElement] operator[SEP] operator[SEP] identifier[DArray] identifier[gridArray] operator[=] operator[SEP] identifier[DArray] operator[SEP] identifier[newBaseType] operator[SEP] identifier[arrayElement] operator[SEP] operator[SEP] identifier[parseArray] operator[SEP] identifier[arrayElement] , identifier[gridArray] , identifier[indent] operator[+] literal[String] operator[SEP] operator[SEP] identifier[myGrid] operator[SEP] identifier[addVariable] operator[SEP] identifier[gridArray] , identifier[DGrid] operator[SEP] identifier[ARRAY] operator[SEP] operator[SEP] identifier[eName] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[_Debug] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[eName] operator[+] literal[String] operator[+] identifier[opendapNameSpace] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[Element] operator[>] identifier[mapElements] operator[=] identifier[gridElement] operator[SEP] identifier[getChildren] operator[SEP] literal[String] , identifier[opendapNameSpace] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mapElements] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[!=] identifier[gridArray] operator[SEP] identifier[numDimensions] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[BadSemanticsException] operator[SEP] literal[String] operator[+] literal[String] operator[+] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Element] identifier[mapElement] operator[:] identifier[mapElements] operator[SEP] { identifier[DArray] identifier[thisMap] operator[=] operator[SEP] identifier[DArray] operator[SEP] identifier[newBaseType] operator[SEP] identifier[mapElement] operator[SEP] operator[SEP] identifier[parseArray] operator[SEP] identifier[mapElement] , identifier[thisMap] , identifier[indent] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[thisMap] operator[SEP] identifier[numDimensions] operator[SEP] operator[SEP] operator[!=] Other[1] operator[SEP] Keyword[throw] Keyword[new] identifier[BadSemanticsException] operator[SEP] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] identifier[myGrid] operator[SEP] identifier[addVariable] operator[SEP] identifier[thisMap] , identifier[DGrid] operator[SEP] identifier[MAPS] operator[SEP] operator[SEP] } identifier[parseLevel] operator[--] operator[SEP] }
@SuppressWarnings({"checkstyle:parametername", "checkstyle:localfinalvariablename"}) private static Point2d NTFLambert_NTFLambdaPhi(double x, double y, double n, double c, double Xs, double Ys) { // Several constants from the IGN specifications //Longitude in radians of Paris (2°20'14.025" E) from Greenwich final double lambda_0 = 0.; // Extended Lambert II (x,y) -> graphical coordinate NTF (lambda_ntf,phi_ntf) // ALG0004 final double R = Math.hypot(x - Xs, y - Ys); final double g = Math.atan((x - Xs) / (Ys - y)); final double lamdda_ntf = lambda_0 + (g / n); final double L = -(1 / n) * Math.log(Math.abs(R / c)); final double phi0 = 2 * Math.atan(Math.exp(L)) - (Math.PI / 2.0); double phiprec = phi0; double phii = compute1(phiprec, L); while (Math.abs(phii - phiprec) >= EPSILON) { phiprec = phii; phii = compute1(phiprec, L); } final double phi_ntf = phii; return new Point2d(lamdda_ntf, phi_ntf); }
class class_name[name] begin[{] method[NTFLambert_NTFLambdaPhi, return_type[type[Point2d]], modifier[private static], parameter[x, y, n, c, Xs, Ys]] begin[{] local_variable[type[double], lambda_0] local_variable[type[double], R] local_variable[type[double], g] local_variable[type[double], lamdda_ntf] local_variable[type[double], L] local_variable[type[double], phi0] local_variable[type[double], phiprec] local_variable[type[double], phii] while[binary_operation[call[Math.abs, parameter[binary_operation[member[.phii], -, member[.phiprec]]]], >=, member[.EPSILON]]] begin[{] assign[member[.phiprec], member[.phii]] assign[member[.phii], call[.compute1, parameter[member[.phiprec], member[.L]]]] end[}] local_variable[type[double], phi_ntf] return[ClassCreator(arguments=[MemberReference(member=lamdda_ntf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=phi_ntf, 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=Point2d, sub_type=None))] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] { literal[String] , literal[String] } operator[SEP] Keyword[private] Keyword[static] identifier[Point2d] identifier[NTFLambert_NTFLambdaPhi] operator[SEP] Keyword[double] identifier[x] , Keyword[double] identifier[y] , Keyword[double] identifier[n] , Keyword[double] identifier[c] , Keyword[double] identifier[Xs] , Keyword[double] identifier[Ys] operator[SEP] { Keyword[final] Keyword[double] identifier[lambda_0] operator[=] literal[Float] operator[SEP] Keyword[final] Keyword[double] identifier[R] operator[=] identifier[Math] operator[SEP] identifier[hypot] operator[SEP] identifier[x] operator[-] identifier[Xs] , identifier[y] operator[-] identifier[Ys] operator[SEP] operator[SEP] Keyword[final] Keyword[double] identifier[g] operator[=] identifier[Math] operator[SEP] identifier[atan] operator[SEP] operator[SEP] identifier[x] operator[-] identifier[Xs] operator[SEP] operator[/] operator[SEP] identifier[Ys] operator[-] identifier[y] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[double] identifier[lamdda_ntf] operator[=] identifier[lambda_0] operator[+] operator[SEP] identifier[g] operator[/] identifier[n] operator[SEP] operator[SEP] Keyword[final] Keyword[double] identifier[L] operator[=] operator[-] operator[SEP] Other[1] operator[/] identifier[n] operator[SEP] operator[*] identifier[Math] operator[SEP] identifier[log] operator[SEP] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[R] operator[/] identifier[c] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[double] identifier[phi0] operator[=] Other[2] operator[*] identifier[Math] operator[SEP] identifier[atan] operator[SEP] identifier[Math] operator[SEP] identifier[exp] operator[SEP] identifier[L] operator[SEP] operator[SEP] operator[-] operator[SEP] identifier[Math] operator[SEP] identifier[PI] operator[/] literal[Float] operator[SEP] operator[SEP] Keyword[double] identifier[phiprec] operator[=] identifier[phi0] operator[SEP] Keyword[double] identifier[phii] operator[=] identifier[compute1] operator[SEP] identifier[phiprec] , identifier[L] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[phii] operator[-] identifier[phiprec] operator[SEP] operator[>=] identifier[EPSILON] operator[SEP] { identifier[phiprec] operator[=] identifier[phii] operator[SEP] identifier[phii] operator[=] identifier[compute1] operator[SEP] identifier[phiprec] , identifier[L] operator[SEP] operator[SEP] } Keyword[final] Keyword[double] identifier[phi_ntf] operator[=] identifier[phii] operator[SEP] Keyword[return] Keyword[new] identifier[Point2d] operator[SEP] identifier[lamdda_ntf] , identifier[phi_ntf] operator[SEP] operator[SEP] }
public TransformActionBuilder source(Resource xmlResource, Charset charset) { try { action.setXmlData(FileUtils.readToString(xmlResource, charset)); } catch (IOException e) { throw new CitrusRuntimeException("Failed to read xml resource", e); } return this; }
class class_name[name] begin[{] method[source, return_type[type[TransformActionBuilder]], modifier[public], parameter[xmlResource, charset]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=xmlResource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=charset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readToString, postfix_operators=[], prefix_operators=[], qualifier=FileUtils, selectors=[], type_arguments=None)], member=setXmlData, postfix_operators=[], prefix_operators=[], qualifier=action, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to read xml resource"), 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=CitrusRuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[TransformActionBuilder] identifier[source] operator[SEP] identifier[Resource] identifier[xmlResource] , identifier[Charset] identifier[charset] operator[SEP] { Keyword[try] { identifier[action] operator[SEP] identifier[setXmlData] operator[SEP] identifier[FileUtils] operator[SEP] identifier[readToString] operator[SEP] identifier[xmlResource] , identifier[charset] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[CitrusRuntimeException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public final void registerForActivityResult(final int requestCode) { executeWithRouter(new RouterRequiringFunc() { @Override public void execute() { router.registerForActivityResult(instanceId, requestCode); } }); }
class class_name[name] begin[{] method[registerForActivityResult, return_type[void], modifier[final public], parameter[requestCode]] begin[{] call[.executeWithRouter, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=instanceId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=requestCode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=registerForActivityResult, postfix_operators=[], prefix_operators=[], qualifier=router, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=execute, parameters=[], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RouterRequiringFunc, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[registerForActivityResult] operator[SEP] Keyword[final] Keyword[int] identifier[requestCode] operator[SEP] { identifier[executeWithRouter] operator[SEP] Keyword[new] identifier[RouterRequiringFunc] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[execute] operator[SEP] operator[SEP] { identifier[router] operator[SEP] identifier[registerForActivityResult] operator[SEP] identifier[instanceId] , identifier[requestCode] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
protected void gatherForwardRenderData(HtmlResponse response) { final RenderData data = newRenderData(); response.getRegistrationList().forEach(reg -> reg.register(data)); validateHtmlBeanIfNeeds(response); // manage validator data.getDataMap().forEach((key, value) -> runtime.registerData(key, value)); // so validated here }
class class_name[name] begin[{] method[gatherForwardRenderData, return_type[void], modifier[protected], parameter[response]] begin[{] local_variable[type[RenderData], data] call[response.getRegistrationList, parameter[]] call[.validateHtmlBeanIfNeeds, parameter[member[.response]]] call[data.getDataMap, parameter[]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[gatherForwardRenderData] operator[SEP] identifier[HtmlResponse] identifier[response] operator[SEP] { Keyword[final] identifier[RenderData] identifier[data] operator[=] identifier[newRenderData] operator[SEP] operator[SEP] operator[SEP] identifier[response] operator[SEP] identifier[getRegistrationList] operator[SEP] operator[SEP] operator[SEP] identifier[forEach] operator[SEP] identifier[reg] operator[->] identifier[reg] operator[SEP] identifier[register] operator[SEP] identifier[data] operator[SEP] operator[SEP] operator[SEP] identifier[validateHtmlBeanIfNeeds] operator[SEP] identifier[response] operator[SEP] operator[SEP] identifier[data] operator[SEP] identifier[getDataMap] operator[SEP] operator[SEP] operator[SEP] identifier[forEach] operator[SEP] operator[SEP] identifier[key] , identifier[value] operator[SEP] operator[->] identifier[runtime] operator[SEP] identifier[registerData] operator[SEP] identifier[key] , identifier[value] operator[SEP] operator[SEP] operator[SEP] }
public static AuthCallsCredentialListMappingCreator creator(final String pathAccountSid, final String pathDomainSid, final String credentialListSid) { return new AuthCallsCredentialListMappingCreator(pathAccountSid, pathDomainSid, credentialListSid); }
class class_name[name] begin[{] method[creator, return_type[type[AuthCallsCredentialListMappingCreator]], modifier[public static], parameter[pathAccountSid, pathDomainSid, credentialListSid]] begin[{] return[ClassCreator(arguments=[MemberReference(member=pathAccountSid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pathDomainSid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=credentialListSid, 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=AuthCallsCredentialListMappingCreator, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[AuthCallsCredentialListMappingCreator] identifier[creator] operator[SEP] Keyword[final] identifier[String] identifier[pathAccountSid] , Keyword[final] identifier[String] identifier[pathDomainSid] , Keyword[final] identifier[String] identifier[credentialListSid] operator[SEP] { Keyword[return] Keyword[new] identifier[AuthCallsCredentialListMappingCreator] operator[SEP] identifier[pathAccountSid] , identifier[pathDomainSid] , identifier[credentialListSid] operator[SEP] operator[SEP] }
public JsonWriter keyLiteral(CharSequence key) { startKey(); if (key == null) { throw new IllegalArgumentException("Expected map key, but got null."); } writer.write(key.toString()); writer.write(':'); return this; }
class class_name[name] begin[{] method[keyLiteral, return_type[type[JsonWriter]], modifier[public], parameter[key]] begin[{] call[.startKey, parameter[]] if[binary_operation[member[.key], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Expected map key, but got 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[}] call[writer.write, parameter[call[key.toString, parameter[]]]] call[writer.write, parameter[literal[':']]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[JsonWriter] identifier[keyLiteral] operator[SEP] identifier[CharSequence] identifier[key] operator[SEP] { identifier[startKey] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[key] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[writer] operator[SEP] identifier[write] operator[SEP] identifier[key] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[writer] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public File download(final File workDir, final URL url, final String displayName, final Boolean overwrite, final boolean checkAttributes, final boolean failOnValidation, final boolean downloadFeeback) { LOGGER.debug("Downloading [" + url + "]"); File downloadedBundlesFile = new File(workDir, "downloaded_bundles.properties"); Properties fileNamesForUrls = loadProperties(downloadedBundlesFile); String downloadedFileName = fileNamesForUrls.getProperty(url.toExternalForm()); String hashFileName = "" + url.toExternalForm().hashCode(); if (downloadedFileName == null) { // destination will be made based on the hashcode of the url to be downloaded downloadedFileName = hashFileName + ".jar"; } File destination = new File(workDir, downloadedFileName); // download the bundle only if is a forced overwrite or the file does not exist or the file // is there but is // invalid boolean forceOverwrite = overwrite || !destination.exists(); if (!forceOverwrite) { try { String cachingName = determineCachingName(destination, hashFileName); if (!destination.getName().equals(cachingName)) { throw new TestContainerException("File " + destination + " should have name " + cachingName); } } catch (TestContainerException ignore) { forceOverwrite = true; } } if (forceOverwrite) { try { LOGGER.debug("Creating new file at destination: " + destination.getAbsolutePath()); destination.getParentFile().mkdirs(); destination.createNewFile(); FileOutputStream os = null; try { os = new FileOutputStream(destination); FileChannel fileChannel = os.getChannel(); StreamUtils.ProgressBar progressBar = null; if (LOGGER.isInfoEnabled()) { if (downloadFeeback) { progressBar = new StreamUtils.FineGrainedProgressBar(displayName); } else { progressBar = new StreamUtils.CoarseGrainedProgressBar(displayName); } } // Check if this is an exploded bundle... if (url.getPath().endsWith("/") && "file".equals(url.getProtocol())) { StreamUtils.streamCopy(new URL("assembly:" + url.toExternalForm()), fileChannel, progressBar); } else { StreamUtils.streamCopy(url, fileChannel, progressBar); } fileChannel.close(); LOGGER.debug("Successfully downloaded to [" + destination + "]"); } finally { if (os != null) { os.close(); } } } catch (IOException e) { throw new TestContainerException("[" + url + "] could not be downloaded", e); } } if (checkAttributes) { try { validateBundle(url, destination); } catch (TestContainerException e) { if (failOnValidation) { throw e; } return null; } } String cachingName = determineCachingName(destination, hashFileName); File newDestination = new File(destination.getParentFile(), cachingName); if (!cachingName.equals(destination.getName())) { if (newDestination.exists()) { if (!newDestination.delete()) { throw new TestContainerException("Cannot delete " + newDestination); } } if (!destination.renameTo(newDestination)) { throw new TestContainerException("Cannot rename " + destination + " to " + newDestination); } fileNamesForUrls.setProperty(url.toExternalForm(), cachingName); saveProperties(fileNamesForUrls, downloadedBundlesFile); } return newDestination; }
class class_name[name] begin[{] method[download, return_type[type[File]], modifier[public], parameter[workDir, url, displayName, overwrite, checkAttributes, failOnValidation, downloadFeeback]] begin[{] call[LOGGER.debug, parameter[binary_operation[binary_operation[literal["Downloading ["], +, member[.url]], +, literal["]"]]]] local_variable[type[File], downloadedBundlesFile] local_variable[type[Properties], fileNamesForUrls] local_variable[type[String], downloadedFileName] local_variable[type[String], hashFileName] if[binary_operation[member[.downloadedFileName], ==, literal[null]]] begin[{] assign[member[.downloadedFileName], binary_operation[member[.hashFileName], +, literal[".jar"]]] else begin[{] None end[}] local_variable[type[File], destination] local_variable[type[boolean], forceOverwrite] if[member[.forceOverwrite]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=destination, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=hashFileName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=determineCachingName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=cachingName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=['!'], qualifier=destination, selectors=[MethodInvocation(arguments=[MemberReference(member=cachingName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="File "), operandr=MemberReference(member=destination, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" should have name "), operator=+), operandr=MemberReference(member=cachingName, 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=TestContainerException, sub_type=None)), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=forceOverwrite, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ignore, types=['TestContainerException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] if[member[.forceOverwrite]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Creating new file at destination: "), operandr=MethodInvocation(arguments=[], member=getAbsolutePath, postfix_operators=[], prefix_operators=[], qualifier=destination, selectors=[], type_arguments=None), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getParentFile, postfix_operators=[], prefix_operators=[], qualifier=destination, selectors=[MethodInvocation(arguments=[], member=mkdirs, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=createNewFile, postfix_operators=[], prefix_operators=[], qualifier=destination, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=os)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FileOutputStream, sub_type=None)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=os, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=destination, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileOutputStream, sub_type=None))), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getChannel, postfix_operators=[], prefix_operators=[], qualifier=os, selectors=[], type_arguments=None), name=fileChannel)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FileChannel, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=progressBar)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StreamUtils, sub_type=ReferenceType(arguments=None, dimensions=None, name=ProgressBar, sub_type=None))), IfStatement(condition=MethodInvocation(arguments=[], member=isInfoEnabled, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=downloadFeeback, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=progressBar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=displayName, 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=StreamUtils, sub_type=ReferenceType(arguments=None, dimensions=None, name=CoarseGrainedProgressBar, sub_type=None)))), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=progressBar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=displayName, 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=StreamUtils, sub_type=ReferenceType(arguments=None, dimensions=None, name=FineGrainedProgressBar, sub_type=None)))), label=None)]))])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getPath, postfix_operators=[], prefix_operators=[], qualifier=url, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/")], member=endsWith, 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=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getProtocol, postfix_operators=[], prefix_operators=[], qualifier=url, selectors=[], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], value="file"), operator=&&), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fileChannel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=progressBar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=streamCopy, postfix_operators=[], prefix_operators=[], qualifier=StreamUtils, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="assembly:"), operandr=MethodInvocation(arguments=[], member=toExternalForm, postfix_operators=[], prefix_operators=[], qualifier=url, 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=URL, sub_type=None)), MemberReference(member=fileChannel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=progressBar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=streamCopy, postfix_operators=[], prefix_operators=[], qualifier=StreamUtils, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=fileChannel, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Successfully downloaded to ["), operandr=MemberReference(member=destination, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]"), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=os, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=os, selectors=[], type_arguments=None), label=None)]))], label=None, resources=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="["), operandr=MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="] could not be downloaded"), 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=TestContainerException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] if[member[.checkAttributes]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=destination, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=validateBundle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[IfStatement(condition=MemberReference(member=failOnValidation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['TestContainerException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] local_variable[type[String], cachingName] local_variable[type[File], newDestination] if[call[cachingName.equals, parameter[call[destination.getName, parameter[]]]]] begin[{] if[call[newDestination.exists, parameter[]]] begin[{] if[call[newDestination.delete, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot delete "), operandr=MemberReference(member=newDestination, 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=TestContainerException, sub_type=None)), label=None) else begin[{] None end[}] else begin[{] None end[}] if[call[destination.renameTo, parameter[member[.newDestination]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot rename "), operandr=MemberReference(member=destination, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" to "), operator=+), operandr=MemberReference(member=newDestination, 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=TestContainerException, sub_type=None)), label=None) else begin[{] None end[}] call[fileNamesForUrls.setProperty, parameter[call[url.toExternalForm, parameter[]], member[.cachingName]]] call[.saveProperties, parameter[member[.fileNamesForUrls], member[.downloadedBundlesFile]]] else begin[{] None end[}] return[member[.newDestination]] end[}] END[}]
Keyword[public] identifier[File] identifier[download] operator[SEP] Keyword[final] identifier[File] identifier[workDir] , Keyword[final] identifier[URL] identifier[url] , Keyword[final] identifier[String] identifier[displayName] , Keyword[final] identifier[Boolean] identifier[overwrite] , Keyword[final] Keyword[boolean] identifier[checkAttributes] , Keyword[final] Keyword[boolean] identifier[failOnValidation] , Keyword[final] Keyword[boolean] identifier[downloadFeeback] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[url] operator[+] literal[String] operator[SEP] operator[SEP] identifier[File] identifier[downloadedBundlesFile] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[workDir] , literal[String] operator[SEP] operator[SEP] identifier[Properties] identifier[fileNamesForUrls] operator[=] identifier[loadProperties] operator[SEP] identifier[downloadedBundlesFile] operator[SEP] operator[SEP] identifier[String] identifier[downloadedFileName] operator[=] identifier[fileNamesForUrls] operator[SEP] identifier[getProperty] operator[SEP] identifier[url] operator[SEP] identifier[toExternalForm] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[hashFileName] operator[=] literal[String] operator[+] identifier[url] operator[SEP] identifier[toExternalForm] operator[SEP] operator[SEP] operator[SEP] identifier[hashCode] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[downloadedFileName] operator[==] Other[null] operator[SEP] { identifier[downloadedFileName] operator[=] identifier[hashFileName] operator[+] literal[String] operator[SEP] } identifier[File] identifier[destination] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[workDir] , identifier[downloadedFileName] operator[SEP] operator[SEP] Keyword[boolean] identifier[forceOverwrite] operator[=] identifier[overwrite] operator[||] operator[!] identifier[destination] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[forceOverwrite] operator[SEP] { Keyword[try] { identifier[String] identifier[cachingName] operator[=] identifier[determineCachingName] operator[SEP] identifier[destination] , identifier[hashFileName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[destination] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[cachingName] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[TestContainerException] operator[SEP] literal[String] operator[+] identifier[destination] operator[+] literal[String] operator[+] identifier[cachingName] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[TestContainerException] identifier[ignore] operator[SEP] { identifier[forceOverwrite] operator[=] literal[boolean] operator[SEP] } } Keyword[if] operator[SEP] identifier[forceOverwrite] operator[SEP] { Keyword[try] { identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[destination] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[destination] operator[SEP] identifier[getParentFile] operator[SEP] operator[SEP] operator[SEP] identifier[mkdirs] operator[SEP] operator[SEP] operator[SEP] identifier[destination] operator[SEP] identifier[createNewFile] operator[SEP] operator[SEP] operator[SEP] identifier[FileOutputStream] identifier[os] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[os] operator[=] Keyword[new] identifier[FileOutputStream] operator[SEP] identifier[destination] operator[SEP] operator[SEP] identifier[FileChannel] identifier[fileChannel] operator[=] identifier[os] operator[SEP] identifier[getChannel] operator[SEP] operator[SEP] operator[SEP] identifier[StreamUtils] operator[SEP] identifier[ProgressBar] identifier[progressBar] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[LOGGER] operator[SEP] identifier[isInfoEnabled] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[downloadFeeback] operator[SEP] { identifier[progressBar] operator[=] Keyword[new] identifier[StreamUtils] operator[SEP] identifier[FineGrainedProgressBar] operator[SEP] identifier[displayName] operator[SEP] operator[SEP] } Keyword[else] { identifier[progressBar] operator[=] Keyword[new] identifier[StreamUtils] operator[SEP] identifier[CoarseGrainedProgressBar] operator[SEP] identifier[displayName] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[url] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[&&] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[url] operator[SEP] identifier[getProtocol] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[StreamUtils] operator[SEP] identifier[streamCopy] operator[SEP] Keyword[new] identifier[URL] operator[SEP] literal[String] operator[+] identifier[url] operator[SEP] identifier[toExternalForm] operator[SEP] operator[SEP] operator[SEP] , identifier[fileChannel] , identifier[progressBar] operator[SEP] operator[SEP] } Keyword[else] { identifier[StreamUtils] operator[SEP] identifier[streamCopy] operator[SEP] identifier[url] , identifier[fileChannel] , identifier[progressBar] operator[SEP] operator[SEP] } identifier[fileChannel] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[destination] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[if] operator[SEP] identifier[os] operator[!=] Other[null] operator[SEP] { identifier[os] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[TestContainerException] operator[SEP] literal[String] operator[+] identifier[url] operator[+] literal[String] , identifier[e] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[checkAttributes] operator[SEP] { Keyword[try] { identifier[validateBundle] operator[SEP] identifier[url] , identifier[destination] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[TestContainerException] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[failOnValidation] operator[SEP] { Keyword[throw] identifier[e] operator[SEP] } Keyword[return] Other[null] operator[SEP] } } identifier[String] identifier[cachingName] operator[=] identifier[determineCachingName] operator[SEP] identifier[destination] , identifier[hashFileName] operator[SEP] operator[SEP] identifier[File] identifier[newDestination] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[destination] operator[SEP] identifier[getParentFile] operator[SEP] operator[SEP] , identifier[cachingName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[cachingName] operator[SEP] identifier[equals] operator[SEP] identifier[destination] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[newDestination] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[newDestination] operator[SEP] identifier[delete] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[TestContainerException] operator[SEP] literal[String] operator[+] identifier[newDestination] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] operator[!] identifier[destination] operator[SEP] identifier[renameTo] operator[SEP] identifier[newDestination] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[TestContainerException] operator[SEP] literal[String] operator[+] identifier[destination] operator[+] literal[String] operator[+] identifier[newDestination] operator[SEP] operator[SEP] } identifier[fileNamesForUrls] operator[SEP] identifier[setProperty] operator[SEP] identifier[url] operator[SEP] identifier[toExternalForm] operator[SEP] operator[SEP] , identifier[cachingName] operator[SEP] operator[SEP] identifier[saveProperties] operator[SEP] identifier[fileNamesForUrls] , identifier[downloadedBundlesFile] operator[SEP] operator[SEP] } Keyword[return] identifier[newDestination] operator[SEP] }
public int waitFor() throws InterruptedException { if(_process == null) throw new IllegalStateException("you must call start first"); _out.join(); _err.join(); return _process.waitFor(); }
class class_name[name] begin[{] method[waitFor, return_type[type[int]], modifier[public], parameter[]] begin[{] if[binary_operation[member[._process], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="you must call start first")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] call[_out.join, parameter[]] call[_err.join, parameter[]] return[call[_process.waitFor, parameter[]]] end[}] END[}]
Keyword[public] Keyword[int] identifier[waitFor] operator[SEP] operator[SEP] Keyword[throws] identifier[InterruptedException] { Keyword[if] operator[SEP] identifier[_process] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[_out] operator[SEP] identifier[join] operator[SEP] operator[SEP] operator[SEP] identifier[_err] operator[SEP] identifier[join] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[_process] operator[SEP] identifier[waitFor] operator[SEP] operator[SEP] operator[SEP] }
public Result redirect(String url) { status(Result.SC_303_SEE_OTHER); addHeader(Result.LOCATION, url); return this; }
class class_name[name] begin[{] method[redirect, return_type[type[Result]], modifier[public], parameter[url]] begin[{] call[.status, parameter[member[Result.SC_303_SEE_OTHER]]] call[.addHeader, parameter[member[Result.LOCATION], member[.url]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[Result] identifier[redirect] operator[SEP] identifier[String] identifier[url] operator[SEP] { identifier[status] operator[SEP] identifier[Result] operator[SEP] identifier[SC_303_SEE_OTHER] operator[SEP] operator[SEP] identifier[addHeader] operator[SEP] identifier[Result] operator[SEP] identifier[LOCATION] , identifier[url] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public void marshall(ActionConfiguration actionConfiguration, ProtocolMarshaller protocolMarshaller) { if (actionConfiguration == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(actionConfiguration.getConfiguration(), CONFIGURATION_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[actionConfiguration, protocolMarshaller]] begin[{] if[binary_operation[member[.actionConfiguration], ==, 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=getConfiguration, postfix_operators=[], prefix_operators=[], qualifier=actionConfiguration, selectors=[], type_arguments=None), MemberReference(member=CONFIGURATION_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[ActionConfiguration] identifier[actionConfiguration] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[actionConfiguration] 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[actionConfiguration] operator[SEP] identifier[getConfiguration] operator[SEP] operator[SEP] , identifier[CONFIGURATION_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] } }
private boolean removeKunderaProxies(EntityMetadata metadata, Object entity, List<RelationHolder> relationHolders) { boolean proxyRemoved = false; for (Relation relation : metadata.getRelations()) { if (relation != null && relation.isUnary()) { Object relationObject = PropertyAccessorHelper.getObject(entity, relation.getProperty()); if (relationObject != null && ProxyHelper.isKunderaProxy(relationObject)) { EntityMetadata relMetadata = KunderaMetadataManager.getEntityMetadata(kunderaMetadata, relation.getTargetEntity()); Method idAccessorMethod = relMetadata.getReadIdentifierMethod(); Object foreignKey = null; try { foreignKey = idAccessorMethod.invoke(relationObject, new Object[] {}); } catch (IllegalArgumentException e) { log.error("Error while Fetching relationship value of {}, Caused by {}.", metadata.getEntityClazz(), e); } catch (IllegalAccessException e) { log.error("Error while Fetching relationship value of {}, Caused by {}.", metadata.getEntityClazz(), e); } catch (InvocationTargetException e) { log.error("Error while Fetching relationship value of {}, Caused by {}.", metadata.getEntityClazz(), e); } if (foreignKey != null) { relationObject = null; PropertyAccessorHelper.set(entity, relation.getProperty(), relationObject); relationHolders .add(new RelationHolder(relation.getJoinColumnName(kunderaMetadata), foreignKey)); proxyRemoved = true; } } } } return proxyRemoved; }
class class_name[name] begin[{] method[removeKunderaProxies, return_type[type[boolean]], modifier[private], parameter[metadata, entity, relationHolders]] begin[{] local_variable[type[boolean], proxyRemoved] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=relation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[], member=isUnary, postfix_operators=[], prefix_operators=[], qualifier=relation, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=entity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getProperty, postfix_operators=[], prefix_operators=[], qualifier=relation, selectors=[], type_arguments=None)], member=getObject, postfix_operators=[], prefix_operators=[], qualifier=PropertyAccessorHelper, selectors=[], type_arguments=None), name=relationObject)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=relationObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[MemberReference(member=relationObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isKunderaProxy, postfix_operators=[], prefix_operators=[], qualifier=ProxyHelper, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=kunderaMetadata, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getTargetEntity, postfix_operators=[], prefix_operators=[], qualifier=relation, selectors=[], type_arguments=None)], member=getEntityMetadata, postfix_operators=[], prefix_operators=[], qualifier=KunderaMetadataManager, selectors=[], type_arguments=None), name=relMetadata)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=EntityMetadata, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getReadIdentifierMethod, postfix_operators=[], prefix_operators=[], qualifier=relMetadata, selectors=[], type_arguments=None), name=idAccessorMethod)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=foreignKey)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=foreignKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=relationObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=idAccessorMethod, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error while Fetching relationship value of {}, Caused by {}."), MethodInvocation(arguments=[], member=getEntityClazz, postfix_operators=[], prefix_operators=[], qualifier=metadata, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IllegalArgumentException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error while Fetching relationship value of {}, Caused by {}."), MethodInvocation(arguments=[], member=getEntityClazz, postfix_operators=[], prefix_operators=[], qualifier=metadata, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IllegalAccessException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error while Fetching relationship value of {}, Caused by {}."), MethodInvocation(arguments=[], member=getEntityClazz, postfix_operators=[], prefix_operators=[], qualifier=metadata, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InvocationTargetException']))], finally_block=None, label=None, resources=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=foreignKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=relationObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=entity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getProperty, postfix_operators=[], prefix_operators=[], qualifier=relation, selectors=[], type_arguments=None), MemberReference(member=relationObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=set, postfix_operators=[], prefix_operators=[], qualifier=PropertyAccessorHelper, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=kunderaMetadata, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getJoinColumnName, postfix_operators=[], prefix_operators=[], qualifier=relation, selectors=[], type_arguments=None), MemberReference(member=foreignKey, 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=RelationHolder, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=relationHolders, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=proxyRemoved, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]))]))]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getRelations, postfix_operators=[], prefix_operators=[], qualifier=metadata, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=relation)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Relation, sub_type=None))), label=None) return[member[.proxyRemoved]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[removeKunderaProxies] operator[SEP] identifier[EntityMetadata] identifier[metadata] , identifier[Object] identifier[entity] , identifier[List] operator[<] identifier[RelationHolder] operator[>] identifier[relationHolders] operator[SEP] { Keyword[boolean] identifier[proxyRemoved] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[Relation] identifier[relation] operator[:] identifier[metadata] operator[SEP] identifier[getRelations] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[relation] operator[!=] Other[null] operator[&&] identifier[relation] operator[SEP] identifier[isUnary] operator[SEP] operator[SEP] operator[SEP] { identifier[Object] identifier[relationObject] operator[=] identifier[PropertyAccessorHelper] operator[SEP] identifier[getObject] operator[SEP] identifier[entity] , identifier[relation] operator[SEP] identifier[getProperty] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[relationObject] operator[!=] Other[null] operator[&&] identifier[ProxyHelper] operator[SEP] identifier[isKunderaProxy] operator[SEP] identifier[relationObject] operator[SEP] operator[SEP] { identifier[EntityMetadata] identifier[relMetadata] operator[=] identifier[KunderaMetadataManager] operator[SEP] identifier[getEntityMetadata] operator[SEP] identifier[kunderaMetadata] , identifier[relation] operator[SEP] identifier[getTargetEntity] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Method] identifier[idAccessorMethod] operator[=] identifier[relMetadata] operator[SEP] identifier[getReadIdentifierMethod] operator[SEP] operator[SEP] operator[SEP] identifier[Object] identifier[foreignKey] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[foreignKey] operator[=] identifier[idAccessorMethod] operator[SEP] identifier[invoke] operator[SEP] identifier[relationObject] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { } operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalArgumentException] identifier[e] operator[SEP] { identifier[log] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[metadata] operator[SEP] identifier[getEntityClazz] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalAccessException] identifier[e] operator[SEP] { identifier[log] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[metadata] operator[SEP] identifier[getEntityClazz] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InvocationTargetException] identifier[e] operator[SEP] { identifier[log] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[metadata] operator[SEP] identifier[getEntityClazz] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[foreignKey] operator[!=] Other[null] operator[SEP] { identifier[relationObject] operator[=] Other[null] operator[SEP] identifier[PropertyAccessorHelper] operator[SEP] identifier[set] operator[SEP] identifier[entity] , identifier[relation] operator[SEP] identifier[getProperty] operator[SEP] operator[SEP] , identifier[relationObject] operator[SEP] operator[SEP] identifier[relationHolders] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[RelationHolder] operator[SEP] identifier[relation] operator[SEP] identifier[getJoinColumnName] operator[SEP] identifier[kunderaMetadata] operator[SEP] , identifier[foreignKey] operator[SEP] operator[SEP] operator[SEP] identifier[proxyRemoved] operator[=] literal[boolean] operator[SEP] } } } } Keyword[return] identifier[proxyRemoved] operator[SEP] }
@SuppressWarnings("unchecked") public static <K, OLD, NEW> DataSet<Vertex<K, NEW>> translateVertexValues(DataSet<Vertex<K, OLD>> vertices, TranslateFunction<OLD, NEW> translator, int parallelism) { Preconditions.checkNotNull(vertices); Preconditions.checkNotNull(translator); Class<Vertex<K, NEW>> vertexClass = (Class<Vertex<K, NEW>>) (Class<? extends Vertex>) Vertex.class; TypeInformation<K> idType = ((TupleTypeInfo<Vertex<K, OLD>>) vertices.getType()).getTypeAt(0); TypeInformation<OLD> oldType = ((TupleTypeInfo<Vertex<K, OLD>>) vertices.getType()).getTypeAt(1); TypeInformation<NEW> newType = TypeExtractor.getUnaryOperatorReturnType( translator, TranslateFunction.class, 0, 1, new int[]{1}, oldType, null, false); TupleTypeInfo<Vertex<K, NEW>> returnType = new TupleTypeInfo<>(vertexClass, idType, newType); return vertices .map(new TranslateVertexValue<>(translator)) .returns(returnType) .setParallelism(parallelism) .name("Translate vertex values"); }
class class_name[name] begin[{] method[translateVertexValues, return_type[type[DataSet]], modifier[public static], parameter[vertices, translator, parallelism]] begin[{] call[Preconditions.checkNotNull, parameter[member[.vertices]]] call[Preconditions.checkNotNull, parameter[member[.translator]]] local_variable[type[Class], vertexClass] local_variable[type[TypeInformation], idType] local_variable[type[TypeInformation], oldType] local_variable[type[TypeInformation], newType] local_variable[type[TupleTypeInfo], returnType] return[call[vertices.map, parameter[ClassCreator(arguments=[MemberReference(member=translator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=TranslateVertexValue, sub_type=None))]]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[OLD] , identifier[NEW] operator[>] identifier[DataSet] operator[<] identifier[Vertex] operator[<] identifier[K] , identifier[NEW] operator[>] operator[>] identifier[translateVertexValues] operator[SEP] identifier[DataSet] operator[<] identifier[Vertex] operator[<] identifier[K] , identifier[OLD] operator[>] operator[>] identifier[vertices] , identifier[TranslateFunction] operator[<] identifier[OLD] , identifier[NEW] operator[>] identifier[translator] , Keyword[int] identifier[parallelism] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[vertices] operator[SEP] operator[SEP] identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[translator] operator[SEP] operator[SEP] identifier[Class] operator[<] identifier[Vertex] operator[<] identifier[K] , identifier[NEW] operator[>] operator[>] identifier[vertexClass] operator[=] operator[SEP] identifier[Class] operator[<] identifier[Vertex] operator[<] identifier[K] , identifier[NEW] operator[>] operator[>] operator[SEP] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Vertex] operator[>] operator[SEP] identifier[Vertex] operator[SEP] Keyword[class] operator[SEP] identifier[TypeInformation] operator[<] identifier[K] operator[>] identifier[idType] operator[=] operator[SEP] operator[SEP] identifier[TupleTypeInfo] operator[<] identifier[Vertex] operator[<] identifier[K] , identifier[OLD] operator[>] operator[>] operator[SEP] identifier[vertices] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getTypeAt] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[TypeInformation] operator[<] identifier[OLD] operator[>] identifier[oldType] operator[=] operator[SEP] operator[SEP] identifier[TupleTypeInfo] operator[<] identifier[Vertex] operator[<] identifier[K] , identifier[OLD] operator[>] operator[>] operator[SEP] identifier[vertices] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getTypeAt] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[TypeInformation] operator[<] identifier[NEW] operator[>] identifier[newType] operator[=] identifier[TypeExtractor] operator[SEP] identifier[getUnaryOperatorReturnType] operator[SEP] identifier[translator] , identifier[TranslateFunction] operator[SEP] Keyword[class] , Other[0] , Other[1] , Keyword[new] Keyword[int] operator[SEP] operator[SEP] { Other[1] } , identifier[oldType] , Other[null] , literal[boolean] operator[SEP] operator[SEP] identifier[TupleTypeInfo] operator[<] identifier[Vertex] operator[<] identifier[K] , identifier[NEW] operator[>] operator[>] identifier[returnType] operator[=] Keyword[new] identifier[TupleTypeInfo] operator[<] operator[>] operator[SEP] identifier[vertexClass] , identifier[idType] , identifier[newType] operator[SEP] operator[SEP] Keyword[return] identifier[vertices] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[TranslateVertexValue] operator[<] operator[>] operator[SEP] identifier[translator] operator[SEP] operator[SEP] operator[SEP] identifier[returns] operator[SEP] identifier[returnType] operator[SEP] operator[SEP] identifier[setParallelism] operator[SEP] identifier[parallelism] operator[SEP] operator[SEP] identifier[name] operator[SEP] literal[String] operator[SEP] operator[SEP] }
public boolean isRunning(String logicalQueueName) { Future<?> future = this.scheduledFutureByQueue.get(logicalQueueName); return future != null && !future.isCancelled() && !future.isDone(); }
class class_name[name] begin[{] method[isRunning, return_type[type[boolean]], modifier[public], parameter[logicalQueueName]] begin[{] local_variable[type[Future], future] return[binary_operation[binary_operation[binary_operation[member[.future], !=, literal[null]], &&, call[future.isCancelled, parameter[]]], &&, call[future.isDone, parameter[]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isRunning] operator[SEP] identifier[String] identifier[logicalQueueName] operator[SEP] { identifier[Future] operator[<] operator[?] operator[>] identifier[future] operator[=] Keyword[this] operator[SEP] identifier[scheduledFutureByQueue] operator[SEP] identifier[get] operator[SEP] identifier[logicalQueueName] operator[SEP] operator[SEP] Keyword[return] identifier[future] operator[!=] Other[null] operator[&&] operator[!] identifier[future] operator[SEP] identifier[isCancelled] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[future] operator[SEP] identifier[isDone] operator[SEP] operator[SEP] operator[SEP] }
public <T> long getCount(final Class<T> cls) { final Query query = pm.newQuery(cls); //query.addExtension("datanucleus.query.resultSizeMethod", "count"); query.setResult("count(id)"); return (Long) query.execute(); }
class class_name[name] begin[{] method[getCount, return_type[type[long]], modifier[public], parameter[cls]] begin[{] local_variable[type[Query], query] call[query.setResult, parameter[literal["count(id)"]]] return[Cast(expression=MethodInvocation(arguments=[], member=execute, postfix_operators=[], prefix_operators=[], qualifier=query, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Long, sub_type=None))] end[}] END[}]
Keyword[public] operator[<] identifier[T] operator[>] Keyword[long] identifier[getCount] operator[SEP] Keyword[final] identifier[Class] operator[<] identifier[T] operator[>] identifier[cls] operator[SEP] { Keyword[final] identifier[Query] identifier[query] operator[=] identifier[pm] operator[SEP] identifier[newQuery] operator[SEP] identifier[cls] operator[SEP] operator[SEP] identifier[query] operator[SEP] identifier[setResult] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[Long] operator[SEP] identifier[query] operator[SEP] identifier[execute] operator[SEP] operator[SEP] operator[SEP] }
private static void process(String targetTool, String[] args) { if("mkmetric".equals(targetTool)) { shift(args); } if(!"tsd".equals(targetTool)) { try { COMMANDS.get(targetTool).getDeclaredMethod("main", String[].class).invoke(null, new Object[] {args}); } catch(Exception x) { log.error("Failed to call [" + targetTool + "].", x); System.exit(-1); } } else { launchTSD(args); } }
class class_name[name] begin[{] method[process, return_type[void], modifier[private static], parameter[targetTool, args]] begin[{] if[literal["mkmetric"]] begin[{] call[.shift, parameter[member[.args]]] else begin[{] None end[}] if[literal["tsd"]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=targetTool, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=COMMANDS, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="main"), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))], member=getDeclaredMethod, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=invoke, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to call ["), operandr=MemberReference(member=targetTool, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]."), operator=+), MemberReference(member=x, 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=1)], member=exit, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=x, types=['Exception']))], finally_block=None, label=None, resources=None) else begin[{] call[.launchTSD, parameter[member[.args]]] end[}] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[process] operator[SEP] identifier[String] identifier[targetTool] , identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] { Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[targetTool] operator[SEP] operator[SEP] { identifier[shift] operator[SEP] identifier[args] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[targetTool] operator[SEP] operator[SEP] { Keyword[try] { identifier[COMMANDS] operator[SEP] identifier[get] operator[SEP] identifier[targetTool] operator[SEP] operator[SEP] identifier[getDeclaredMethod] operator[SEP] literal[String] , identifier[String] operator[SEP] operator[SEP] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[invoke] operator[SEP] Other[null] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[args] } operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[x] operator[SEP] { identifier[log] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[targetTool] operator[+] literal[String] , identifier[x] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[exit] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] } } Keyword[else] { identifier[launchTSD] operator[SEP] identifier[args] operator[SEP] operator[SEP] } }
public void setLowerAndUpperBounds(double lower, double upper) { if (data == null) { return; } this.originalLowerBound = lower; this.originalUpperBound = upper; if (originalLowerBound < min) { offset = Math.abs(originalLowerBound) + 10; } else { offset = Math.abs(min) + 10; } if (calibrationType == MEAN) { lowerBound = (originalLowerBound + offset) * (mean + offset) / (min + offset) - offset; upperBound = (originalUpperBound + offset) * (mean + offset) / (max + offset) - offset; } else { lowerBound = originalLowerBound; upperBound = originalUpperBound; } hasBounds = true; setDeviation(); }
class class_name[name] begin[{] method[setLowerAndUpperBounds, return_type[void], modifier[public], parameter[lower, upper]] begin[{] if[binary_operation[member[.data], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] assign[THIS[member[None.originalLowerBound]], member[.lower]] assign[THIS[member[None.originalUpperBound]], member[.upper]] if[binary_operation[member[.originalLowerBound], <, member[.min]]] begin[{] assign[member[.offset], binary_operation[call[Math.abs, parameter[member[.originalLowerBound]]], +, literal[10]]] else begin[{] assign[member[.offset], binary_operation[call[Math.abs, parameter[member[.min]]], +, literal[10]]] end[}] if[binary_operation[member[.calibrationType], ==, member[.MEAN]]] begin[{] assign[member[.lowerBound], binary_operation[binary_operation[binary_operation[binary_operation[member[.originalLowerBound], +, member[.offset]], *, binary_operation[member[.mean], +, member[.offset]]], /, binary_operation[member[.min], +, member[.offset]]], -, member[.offset]]] assign[member[.upperBound], binary_operation[binary_operation[binary_operation[binary_operation[member[.originalUpperBound], +, member[.offset]], *, binary_operation[member[.mean], +, member[.offset]]], /, binary_operation[member[.max], +, member[.offset]]], -, member[.offset]]] else begin[{] assign[member[.lowerBound], member[.originalLowerBound]] assign[member[.upperBound], member[.originalUpperBound]] end[}] assign[member[.hasBounds], literal[true]] call[.setDeviation, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setLowerAndUpperBounds] operator[SEP] Keyword[double] identifier[lower] , Keyword[double] identifier[upper] operator[SEP] { Keyword[if] operator[SEP] identifier[data] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[originalLowerBound] operator[=] identifier[lower] operator[SEP] Keyword[this] operator[SEP] identifier[originalUpperBound] operator[=] identifier[upper] operator[SEP] Keyword[if] operator[SEP] identifier[originalLowerBound] operator[<] identifier[min] operator[SEP] { identifier[offset] operator[=] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[originalLowerBound] operator[SEP] operator[+] Other[10] operator[SEP] } Keyword[else] { identifier[offset] operator[=] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[min] operator[SEP] operator[+] Other[10] operator[SEP] } Keyword[if] operator[SEP] identifier[calibrationType] operator[==] identifier[MEAN] operator[SEP] { identifier[lowerBound] operator[=] operator[SEP] identifier[originalLowerBound] operator[+] identifier[offset] operator[SEP] operator[*] operator[SEP] identifier[mean] operator[+] identifier[offset] operator[SEP] operator[/] operator[SEP] identifier[min] operator[+] identifier[offset] operator[SEP] operator[-] identifier[offset] operator[SEP] identifier[upperBound] operator[=] operator[SEP] identifier[originalUpperBound] operator[+] identifier[offset] operator[SEP] operator[*] operator[SEP] identifier[mean] operator[+] identifier[offset] operator[SEP] operator[/] operator[SEP] identifier[max] operator[+] identifier[offset] operator[SEP] operator[-] identifier[offset] operator[SEP] } Keyword[else] { identifier[lowerBound] operator[=] identifier[originalLowerBound] operator[SEP] identifier[upperBound] operator[=] identifier[originalUpperBound] operator[SEP] } identifier[hasBounds] operator[=] literal[boolean] operator[SEP] identifier[setDeviation] operator[SEP] operator[SEP] operator[SEP] }
public boolean free(T obj) { int top = _top.get(); if (top < _freeStack.length()) { boolean isFree = _freeStack.compareAndSet(top, null, obj); _top.compareAndSet(top, top + 1); return isFree; } else return false; }
class class_name[name] begin[{] method[free, return_type[type[boolean]], modifier[public], parameter[obj]] begin[{] local_variable[type[int], top] if[binary_operation[member[.top], <, call[_freeStack.length, parameter[]]]] begin[{] local_variable[type[boolean], isFree] call[_top.compareAndSet, parameter[member[.top], binary_operation[member[.top], +, literal[1]]]] return[member[.isFree]] else begin[{] return[literal[false]] end[}] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[free] operator[SEP] identifier[T] identifier[obj] operator[SEP] { Keyword[int] identifier[top] operator[=] identifier[_top] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[top] operator[<] identifier[_freeStack] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] { Keyword[boolean] identifier[isFree] operator[=] identifier[_freeStack] operator[SEP] identifier[compareAndSet] operator[SEP] identifier[top] , Other[null] , identifier[obj] operator[SEP] operator[SEP] identifier[_top] operator[SEP] identifier[compareAndSet] operator[SEP] identifier[top] , identifier[top] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[return] identifier[isFree] operator[SEP] } Keyword[else] Keyword[return] literal[boolean] operator[SEP] }
private ContentType getContentType() { String contentTypeValue = m_request.getContentType(); if (contentTypeValue == null) { return ContentType.TEXT_XML; } return new ContentType(contentTypeValue); }
class class_name[name] begin[{] method[getContentType, return_type[type[ContentType]], modifier[private], parameter[]] begin[{] local_variable[type[String], contentTypeValue] if[binary_operation[member[.contentTypeValue], ==, literal[null]]] begin[{] return[member[ContentType.TEXT_XML]] else begin[{] None end[}] return[ClassCreator(arguments=[MemberReference(member=contentTypeValue, 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=ContentType, sub_type=None))] end[}] END[}]
Keyword[private] identifier[ContentType] identifier[getContentType] operator[SEP] operator[SEP] { identifier[String] identifier[contentTypeValue] operator[=] identifier[m_request] operator[SEP] identifier[getContentType] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[contentTypeValue] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[ContentType] operator[SEP] identifier[TEXT_XML] operator[SEP] } Keyword[return] Keyword[new] identifier[ContentType] operator[SEP] identifier[contentTypeValue] operator[SEP] operator[SEP] }
public void getPvPGameInfo(String api, String[] ids, Callback<List<PvPGame>> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ParamType.API, api), new ParamChecker(ids)); gw2API.getPvPGameInfo(api, processIds(ids)).enqueue(callback); }
class class_name[name] begin[{] method[getPvPGameInfo, return_type[void], modifier[public], parameter[api, ids, callback]] begin[{] call[.isParamValid, parameter[ClassCreator(arguments=[MemberReference(member=API, postfix_operators=[], prefix_operators=[], qualifier=ParamType, selectors=[]), MemberReference(member=api, 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=ParamChecker, sub_type=None)), ClassCreator(arguments=[MemberReference(member=ids, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ParamChecker, sub_type=None))]] call[gw2API.getPvPGameInfo, parameter[member[.api], call[.processIds, parameter[member[.ids]]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[getPvPGameInfo] operator[SEP] identifier[String] identifier[api] , identifier[String] operator[SEP] operator[SEP] identifier[ids] , identifier[Callback] operator[<] identifier[List] operator[<] identifier[PvPGame] operator[>] operator[>] identifier[callback] operator[SEP] Keyword[throws] identifier[GuildWars2Exception] , identifier[NullPointerException] { identifier[isParamValid] operator[SEP] Keyword[new] identifier[ParamChecker] operator[SEP] identifier[ParamType] operator[SEP] identifier[API] , identifier[api] operator[SEP] , Keyword[new] identifier[ParamChecker] operator[SEP] identifier[ids] operator[SEP] operator[SEP] operator[SEP] identifier[gw2API] operator[SEP] identifier[getPvPGameInfo] operator[SEP] identifier[api] , identifier[processIds] operator[SEP] identifier[ids] operator[SEP] operator[SEP] operator[SEP] identifier[enqueue] operator[SEP] identifier[callback] operator[SEP] operator[SEP] }
protected ILocator protectedCheckOut() throws DAVException { IResponse response = null; try { response = davClient.checkout(locator, newContext(), null); examineResponse(response); String resourceUrl = response.getContext().getLocation(); return davClient.getDAVFactory().newStableLocator(resourceUrl); } catch (IOException e) { throw new SystemException(e); } finally { closeResponse(response); } }
class class_name[name] begin[{] method[protectedCheckOut, return_type[type[ILocator]], modifier[protected], parameter[]] begin[{] local_variable[type[IResponse], response] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=response, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=locator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=newContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=checkout, postfix_operators=[], prefix_operators=[], qualifier=davClient, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=response, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=examineResponse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getContext, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[MethodInvocation(arguments=[], member=getLocation, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=resourceUrl)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[], member=getDAVFactory, postfix_operators=[], prefix_operators=[], qualifier=davClient, selectors=[MethodInvocation(arguments=[MemberReference(member=resourceUrl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=newStableLocator, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[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=SystemException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=response, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=closeResponse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[protected] identifier[ILocator] identifier[protectedCheckOut] operator[SEP] operator[SEP] Keyword[throws] identifier[DAVException] { identifier[IResponse] identifier[response] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[response] operator[=] identifier[davClient] operator[SEP] identifier[checkout] operator[SEP] identifier[locator] , identifier[newContext] operator[SEP] operator[SEP] , Other[null] operator[SEP] operator[SEP] identifier[examineResponse] operator[SEP] identifier[response] operator[SEP] operator[SEP] identifier[String] identifier[resourceUrl] operator[=] identifier[response] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] identifier[getLocation] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[davClient] operator[SEP] identifier[getDAVFactory] operator[SEP] operator[SEP] operator[SEP] identifier[newStableLocator] operator[SEP] identifier[resourceUrl] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SystemException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[finally] { identifier[closeResponse] operator[SEP] identifier[response] operator[SEP] operator[SEP] } }
public final Policy getIamPolicy(QueueName resource) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() .setResource(resource == null ? null : resource.toString()) .build(); return getIamPolicy(request); }
class class_name[name] begin[{] method[getIamPolicy, return_type[type[Policy]], modifier[final public], parameter[resource]] begin[{] local_variable[type[GetIamPolicyRequest], request] return[call[.getIamPolicy, parameter[member[.request]]]] end[}] END[}]
Keyword[public] Keyword[final] identifier[Policy] identifier[getIamPolicy] operator[SEP] identifier[QueueName] identifier[resource] operator[SEP] { identifier[GetIamPolicyRequest] identifier[request] operator[=] identifier[GetIamPolicyRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setResource] operator[SEP] identifier[resource] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[resource] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[getIamPolicy] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public static Map<String, Object> jsonObjectToMap(JSONObject jsonObj) { Map<String, Object> map = new Hashtable<String, Object>(); Iterator<?> iterator = jsonObj.keys(); while (iterator.hasNext()) { try { String key = (String)iterator.next(); String value = jsonObj.getString(key); // TODO what if this is a JSONObject? map.put(key, value); } catch (JSONException e) { e.printStackTrace(); } } return map; }
class class_name[name] begin[{] method[jsonObjectToMap, return_type[type[Map]], modifier[public static], parameter[jsonObj]] begin[{] local_variable[type[Map], map] local_variable[type[Iterator], iterator] while[call[iterator.hasNext, parameter[]]] begin[{] TryStatement(block=[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)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getString, postfix_operators=[], prefix_operators=[], qualifier=jsonObj, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['JSONException']))], finally_block=None, label=None, resources=None) end[}] return[member[.map]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[jsonObjectToMap] operator[SEP] identifier[JSONObject] identifier[jsonObj] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[map] operator[=] Keyword[new] identifier[Hashtable] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Iterator] operator[<] operator[?] operator[>] identifier[iterator] operator[=] identifier[jsonObj] operator[SEP] identifier[keys] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[iterator] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { identifier[String] identifier[key] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[iterator] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[value] operator[=] identifier[jsonObj] operator[SEP] identifier[getString] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[value] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[JSONException] identifier[e] operator[SEP] { identifier[e] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[map] operator[SEP] }
public <T> File writeLines(Collection<T> list, LineSeparator lineSeparator, boolean isAppend) throws IORuntimeException { try (PrintWriter writer = getPrintWriter(isAppend)){ for (T t : list) { if (null != t) { writer.print(t.toString()); printNewLine(writer, lineSeparator); writer.flush(); } } } return this.file; }
class class_name[name] begin[{] method[writeLines, return_type[type[File]], modifier[public], parameter[list, lineSeparator, isAppend]] begin[{] TryStatement(block=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None)], member=print, postfix_operators=[], prefix_operators=[], qualifier=writer, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=writer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lineSeparator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=printNewLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=flush, postfix_operators=[], prefix_operators=[], qualifier=writer, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=t)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))), label=None)], catches=None, finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=writer, type=ReferenceType(arguments=None, dimensions=[], name=PrintWriter, sub_type=None), value=MethodInvocation(arguments=[MemberReference(member=isAppend, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getPrintWriter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None))]) return[THIS[member[None.file]]] end[}] END[}]
Keyword[public] operator[<] identifier[T] operator[>] identifier[File] identifier[writeLines] operator[SEP] identifier[Collection] operator[<] identifier[T] operator[>] identifier[list] , identifier[LineSeparator] identifier[lineSeparator] , Keyword[boolean] identifier[isAppend] operator[SEP] Keyword[throws] identifier[IORuntimeException] { Keyword[try] operator[SEP] identifier[PrintWriter] identifier[writer] operator[=] identifier[getPrintWriter] operator[SEP] identifier[isAppend] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[T] identifier[t] operator[:] identifier[list] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[!=] identifier[t] operator[SEP] { identifier[writer] operator[SEP] identifier[print] operator[SEP] identifier[t] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[printNewLine] operator[SEP] identifier[writer] , identifier[lineSeparator] operator[SEP] operator[SEP] identifier[writer] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[return] Keyword[this] operator[SEP] identifier[file] operator[SEP] }
public Calendar moveCurrentDate(final BaseCalculator<Calendar> calculator) { return adjustDate(calculator.getCurrentBusinessDate(), calculator.getCurrentIncrement(), calculator); }
class class_name[name] begin[{] method[moveCurrentDate, return_type[type[Calendar]], modifier[public], parameter[calculator]] begin[{] return[call[.adjustDate, parameter[call[calculator.getCurrentBusinessDate, parameter[]], call[calculator.getCurrentIncrement, parameter[]], member[.calculator]]]] end[}] END[}]
Keyword[public] identifier[Calendar] identifier[moveCurrentDate] operator[SEP] Keyword[final] identifier[BaseCalculator] operator[<] identifier[Calendar] operator[>] identifier[calculator] operator[SEP] { Keyword[return] identifier[adjustDate] operator[SEP] identifier[calculator] operator[SEP] identifier[getCurrentBusinessDate] operator[SEP] operator[SEP] , identifier[calculator] operator[SEP] identifier[getCurrentIncrement] operator[SEP] operator[SEP] , identifier[calculator] operator[SEP] operator[SEP] }
protected void initValid(EnhancedAnnotation<T> annotatedAnnotation) { this.valid = false; for (Class<? extends Annotation> annotationType : getMetaAnnotationTypes()) { if (annotatedAnnotation.isAnnotationPresent(annotationType)) { this.valid = true; } } }
class class_name[name] begin[{] method[initValid, return_type[void], modifier[protected], parameter[annotatedAnnotation]] begin[{] assign[THIS[member[None.valid]], literal[false]] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=annotationType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isAnnotationPresent, postfix_operators=[], prefix_operators=[], qualifier=annotatedAnnotation, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=valid, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getMetaAnnotationTypes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=annotationType)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=extends, type=ReferenceType(arguments=None, dimensions=[], name=Annotation, sub_type=None))], dimensions=[], name=Class, sub_type=None))), label=None) end[}] END[}]
Keyword[protected] Keyword[void] identifier[initValid] operator[SEP] identifier[EnhancedAnnotation] operator[<] identifier[T] operator[>] identifier[annotatedAnnotation] operator[SEP] { Keyword[this] operator[SEP] identifier[valid] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Annotation] operator[>] identifier[annotationType] operator[:] identifier[getMetaAnnotationTypes] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[annotatedAnnotation] operator[SEP] identifier[isAnnotationPresent] operator[SEP] identifier[annotationType] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[valid] operator[=] literal[boolean] operator[SEP] } } }
public synchronized void changeEndpoints(Endpoints endpoints) { this.endpoints = endpoints; this.apiBroker.send(new ApiBroker.ChangeEndpoints(endpoints)); }
class class_name[name] begin[{] method[changeEndpoints, return_type[void], modifier[synchronized public], parameter[endpoints]] begin[{] assign[THIS[member[None.endpoints]], member[.endpoints]] THIS[member[None.apiBroker]call[None.send, parameter[ClassCreator(arguments=[MemberReference(member=endpoints, 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=ApiBroker, sub_type=ReferenceType(arguments=None, dimensions=None, name=ChangeEndpoints, sub_type=None)))]]] end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[void] identifier[changeEndpoints] operator[SEP] identifier[Endpoints] identifier[endpoints] operator[SEP] { Keyword[this] operator[SEP] identifier[endpoints] operator[=] identifier[endpoints] operator[SEP] Keyword[this] operator[SEP] identifier[apiBroker] operator[SEP] identifier[send] operator[SEP] Keyword[new] identifier[ApiBroker] operator[SEP] identifier[ChangeEndpoints] operator[SEP] identifier[endpoints] operator[SEP] operator[SEP] operator[SEP] }
private final void setto(String s) { int l = s.length(); int o = j+1; for (int i = 0; i < l; i++) sb.setCharAt(o+i, s.charAt(i)); k = j+l; }
class class_name[name] begin[{] method[setto, return_type[void], modifier[final private], parameter[s]] begin[{] local_variable[type[int], l] local_variable[type[int], o] ForStatement(body=StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[], type_arguments=None)], member=setCharAt, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=l, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) assign[member[.k], binary_operation[member[.j], +, member[.l]]] end[}] END[}]
Keyword[private] Keyword[final] Keyword[void] identifier[setto] operator[SEP] identifier[String] identifier[s] operator[SEP] { Keyword[int] identifier[l] operator[=] identifier[s] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[o] operator[=] identifier[j] operator[+] Other[1] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[l] operator[SEP] identifier[i] operator[++] operator[SEP] identifier[sb] operator[SEP] identifier[setCharAt] operator[SEP] identifier[o] operator[+] identifier[i] , identifier[s] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] identifier[k] operator[=] identifier[j] operator[+] identifier[l] operator[SEP] }
public static Object x(final Object x, final String expression) throws CompilationFailedException { return me("x", x, expression); }
class class_name[name] begin[{] method[x, return_type[type[Object]], modifier[public static], parameter[x, expression]] begin[{] return[call[.me, parameter[literal["x"], member[.x], member[.expression]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Object] identifier[x] operator[SEP] Keyword[final] identifier[Object] identifier[x] , Keyword[final] identifier[String] identifier[expression] operator[SEP] Keyword[throws] identifier[CompilationFailedException] { Keyword[return] identifier[me] operator[SEP] literal[String] , identifier[x] , identifier[expression] operator[SEP] operator[SEP] }
public static MediaTable create(String tableName, List<UserCustomColumn> additionalColumns) { return create(tableName, null, additionalColumns); }
class class_name[name] begin[{] method[create, return_type[type[MediaTable]], modifier[public static], parameter[tableName, additionalColumns]] begin[{] return[call[.create, parameter[member[.tableName], literal[null], member[.additionalColumns]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[MediaTable] identifier[create] operator[SEP] identifier[String] identifier[tableName] , identifier[List] operator[<] identifier[UserCustomColumn] operator[>] identifier[additionalColumns] operator[SEP] { Keyword[return] identifier[create] operator[SEP] identifier[tableName] , Other[null] , identifier[additionalColumns] operator[SEP] operator[SEP] }
private void registerEntry(String ID, String source, String target, String variant, Object entry, boolean visible) { CaseInsensitiveString ciID = new CaseInsensitiveString(ID); Object[] arrayOfObj; // Store the entry within an array so it can be modified later if (entry instanceof Object[]) { arrayOfObj = (Object[])entry; } else { arrayOfObj = new Object[] { entry }; } registry.put(ciID, arrayOfObj); if (visible) { registerSTV(source, target, variant); if (!availableIDs.contains(ciID)) { availableIDs.add(ciID); } } else { removeSTV(source, target, variant); availableIDs.remove(ciID); } }
class class_name[name] begin[{] method[registerEntry, return_type[void], modifier[private], parameter[ID, source, target, variant, entry, visible]] begin[{] local_variable[type[CaseInsensitiveString], ciID] local_variable[type[Object], arrayOfObj] if[binary_operation[member[.entry], instanceof, type[Object]]] begin[{] assign[member[.arrayOfObj], Cast(expression=MemberReference(member=entry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[None], name=Object, sub_type=None))] else begin[{] assign[member[.arrayOfObj], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=entry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))] end[}] call[registry.put, parameter[member[.ciID], member[.arrayOfObj]]] if[member[.visible]] begin[{] call[.registerSTV, parameter[member[.source], member[.target], member[.variant]]] if[call[availableIDs.contains, parameter[member[.ciID]]]] begin[{] call[availableIDs.add, parameter[member[.ciID]]] else begin[{] None end[}] else begin[{] call[.removeSTV, parameter[member[.source], member[.target], member[.variant]]] call[availableIDs.remove, parameter[member[.ciID]]] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[registerEntry] operator[SEP] identifier[String] identifier[ID] , identifier[String] identifier[source] , identifier[String] identifier[target] , identifier[String] identifier[variant] , identifier[Object] identifier[entry] , Keyword[boolean] identifier[visible] operator[SEP] { identifier[CaseInsensitiveString] identifier[ciID] operator[=] Keyword[new] identifier[CaseInsensitiveString] operator[SEP] identifier[ID] operator[SEP] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[arrayOfObj] operator[SEP] Keyword[if] operator[SEP] identifier[entry] Keyword[instanceof] identifier[Object] operator[SEP] operator[SEP] operator[SEP] { identifier[arrayOfObj] operator[=] operator[SEP] identifier[Object] operator[SEP] operator[SEP] operator[SEP] identifier[entry] operator[SEP] } Keyword[else] { identifier[arrayOfObj] operator[=] Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[entry] } operator[SEP] } identifier[registry] operator[SEP] identifier[put] operator[SEP] identifier[ciID] , identifier[arrayOfObj] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[visible] operator[SEP] { identifier[registerSTV] operator[SEP] identifier[source] , identifier[target] , identifier[variant] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[availableIDs] operator[SEP] identifier[contains] operator[SEP] identifier[ciID] operator[SEP] operator[SEP] { identifier[availableIDs] operator[SEP] identifier[add] operator[SEP] identifier[ciID] operator[SEP] operator[SEP] } } Keyword[else] { identifier[removeSTV] operator[SEP] identifier[source] , identifier[target] , identifier[variant] operator[SEP] operator[SEP] identifier[availableIDs] operator[SEP] identifier[remove] operator[SEP] identifier[ciID] operator[SEP] operator[SEP] } }
protected void startInitialAlignment(boolean resetTxOffset) { if (logger.isDebugEnabled()) { logger.debug(String.format("(%s) Starting initial alignment", name)); } // Comment from Oleg: this is done initialy to setup correct spot in tx // buffer: dunno, I just believe, for now. if (resetTxOffset) { // txOffset = 3; this.txFrame.offset = 3; // I really dont get this shift. } this.reset(); // switch state // this.state = MTP2_NOT_ALIGNED; this.setState(MTP2_NOT_ALIGNED); // starting T2 timer start_T2(); }
class class_name[name] begin[{] method[startInitialAlignment, return_type[void], modifier[protected], parameter[resetTxOffset]] begin[{] if[call[logger.isDebugEnabled, parameter[]]] begin[{] call[logger.debug, parameter[call[String.format, parameter[literal["(%s) Starting initial alignment"], member[.name]]]]] else begin[{] None end[}] if[member[.resetTxOffset]] begin[{] assign[THIS[member[None.txFrame]member[None.offset]], literal[3]] else begin[{] None end[}] THIS[call[None.reset, parameter[]]] THIS[call[None.setState, parameter[member[.MTP2_NOT_ALIGNED]]]] call[.start_T2, parameter[]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[startInitialAlignment] operator[SEP] Keyword[boolean] identifier[resetTxOffset] operator[SEP] { Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[name] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[resetTxOffset] operator[SEP] { Keyword[this] operator[SEP] identifier[txFrame] operator[SEP] identifier[offset] operator[=] Other[3] operator[SEP] } Keyword[this] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[setState] operator[SEP] identifier[MTP2_NOT_ALIGNED] operator[SEP] operator[SEP] identifier[start_T2] operator[SEP] operator[SEP] operator[SEP] }
public TupleQueryResult sendTupleQuery(String queryString,SPARQLQueryBindingSet bindings, long start, long pageLength, boolean includeInferred, String baseURI) throws RepositoryException, MalformedQueryException, QueryInterruptedException { InputStream stream = null; try { stream = getClient().performSPARQLQuery(queryString, bindings, start, pageLength, this.tx, includeInferred, baseURI); } catch (JsonProcessingException e) { logger.error(e.getLocalizedMessage()); throw new MarkLogicSesameException("Issue processing json."); } TupleQueryResultParser parser = QueryResultIO.createParser(format, getValueFactory()); MarkLogicBackgroundTupleResult tRes = new MarkLogicBackgroundTupleResult(parser,stream); execute(tRes); return tRes; }
class class_name[name] begin[{] method[sendTupleQuery, return_type[type[TupleQueryResult]], modifier[public], parameter[queryString, bindings, start, pageLength, includeInferred, baseURI]] begin[{] local_variable[type[InputStream], stream] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=stream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getClient, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=queryString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=bindings, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pageLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=tx, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), MemberReference(member=includeInferred, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=baseURI, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=performSPARQLQuery, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLocalizedMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Issue processing json.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MarkLogicSesameException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['JsonProcessingException']))], finally_block=None, label=None, resources=None) local_variable[type[TupleQueryResultParser], parser] local_variable[type[MarkLogicBackgroundTupleResult], tRes] call[.execute, parameter[member[.tRes]]] return[member[.tRes]] end[}] END[}]
Keyword[public] identifier[TupleQueryResult] identifier[sendTupleQuery] operator[SEP] identifier[String] identifier[queryString] , identifier[SPARQLQueryBindingSet] identifier[bindings] , Keyword[long] identifier[start] , Keyword[long] identifier[pageLength] , Keyword[boolean] identifier[includeInferred] , identifier[String] identifier[baseURI] operator[SEP] Keyword[throws] identifier[RepositoryException] , identifier[MalformedQueryException] , identifier[QueryInterruptedException] { identifier[InputStream] identifier[stream] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[stream] operator[=] identifier[getClient] operator[SEP] operator[SEP] operator[SEP] identifier[performSPARQLQuery] operator[SEP] identifier[queryString] , identifier[bindings] , identifier[start] , identifier[pageLength] , Keyword[this] operator[SEP] identifier[tx] , identifier[includeInferred] , identifier[baseURI] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[JsonProcessingException] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] identifier[e] operator[SEP] identifier[getLocalizedMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[MarkLogicSesameException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[TupleQueryResultParser] identifier[parser] operator[=] identifier[QueryResultIO] operator[SEP] identifier[createParser] operator[SEP] identifier[format] , identifier[getValueFactory] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[MarkLogicBackgroundTupleResult] identifier[tRes] operator[=] Keyword[new] identifier[MarkLogicBackgroundTupleResult] operator[SEP] identifier[parser] , identifier[stream] operator[SEP] operator[SEP] identifier[execute] operator[SEP] identifier[tRes] operator[SEP] operator[SEP] Keyword[return] identifier[tRes] operator[SEP] }
public static MozuUrl getProductsUrl(String cursorMark, String defaultSort, String filter, Integer pageSize, String responseFields, String responseOptions, String sortBy, Integer startIndex) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/storefront/products/?filter={filter}&startIndex={startIndex}&pageSize={pageSize}&sortBy={sortBy}&responseOptions={responseOptions}&cursorMark={cursorMark}&defaultSort={defaultSort}&responseFields={responseFields}"); formatter.formatUrl("cursorMark", cursorMark); formatter.formatUrl("defaultSort", defaultSort); formatter.formatUrl("filter", filter); formatter.formatUrl("pageSize", pageSize); formatter.formatUrl("responseFields", responseFields); formatter.formatUrl("responseOptions", responseOptions); formatter.formatUrl("sortBy", sortBy); formatter.formatUrl("startIndex", startIndex); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
class class_name[name] begin[{] method[getProductsUrl, return_type[type[MozuUrl]], modifier[public static], parameter[cursorMark, defaultSort, filter, pageSize, responseFields, responseOptions, sortBy, startIndex]] begin[{] local_variable[type[UrlFormatter], formatter] call[formatter.formatUrl, parameter[literal["cursorMark"], member[.cursorMark]]] call[formatter.formatUrl, parameter[literal["defaultSort"], member[.defaultSort]]] call[formatter.formatUrl, parameter[literal["filter"], member[.filter]]] call[formatter.formatUrl, parameter[literal["pageSize"], member[.pageSize]]] call[formatter.formatUrl, parameter[literal["responseFields"], member[.responseFields]]] call[formatter.formatUrl, parameter[literal["responseOptions"], member[.responseOptions]]] call[formatter.formatUrl, parameter[literal["sortBy"], member[.sortBy]]] call[formatter.formatUrl, parameter[literal["startIndex"], member[.startIndex]]] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getResourceUrl, postfix_operators=[], prefix_operators=[], qualifier=formatter, selectors=[], type_arguments=None), MemberReference(member=TENANT_POD, postfix_operators=[], prefix_operators=[], qualifier=MozuUrl.UrlLocation, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MozuUrl, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[MozuUrl] identifier[getProductsUrl] operator[SEP] identifier[String] identifier[cursorMark] , identifier[String] identifier[defaultSort] , identifier[String] identifier[filter] , identifier[Integer] identifier[pageSize] , identifier[String] identifier[responseFields] , identifier[String] identifier[responseOptions] , identifier[String] identifier[sortBy] , identifier[Integer] identifier[startIndex] operator[SEP] { identifier[UrlFormatter] identifier[formatter] operator[=] Keyword[new] identifier[UrlFormatter] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[formatter] operator[SEP] identifier[formatUrl] operator[SEP] literal[String] , identifier[cursorMark] operator[SEP] operator[SEP] identifier[formatter] operator[SEP] identifier[formatUrl] operator[SEP] literal[String] , identifier[defaultSort] operator[SEP] operator[SEP] identifier[formatter] operator[SEP] identifier[formatUrl] operator[SEP] literal[String] , identifier[filter] operator[SEP] operator[SEP] identifier[formatter] operator[SEP] identifier[formatUrl] operator[SEP] literal[String] , identifier[pageSize] operator[SEP] operator[SEP] identifier[formatter] operator[SEP] identifier[formatUrl] operator[SEP] literal[String] , identifier[responseFields] operator[SEP] operator[SEP] identifier[formatter] operator[SEP] identifier[formatUrl] operator[SEP] literal[String] , identifier[responseOptions] operator[SEP] operator[SEP] identifier[formatter] operator[SEP] identifier[formatUrl] operator[SEP] literal[String] , identifier[sortBy] operator[SEP] operator[SEP] identifier[formatter] operator[SEP] identifier[formatUrl] operator[SEP] literal[String] , identifier[startIndex] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[MozuUrl] operator[SEP] identifier[formatter] operator[SEP] identifier[getResourceUrl] operator[SEP] operator[SEP] , identifier[MozuUrl] operator[SEP] identifier[UrlLocation] operator[SEP] identifier[TENANT_POD] operator[SEP] operator[SEP] }
public static RateLimiterMetricsCollector ofSupplier(Supplier<? extends Iterable<? extends RateLimiter>> supplier) { return new RateLimiterMetricsCollector(MetricNames.ofDefaults(), supplier); }
class class_name[name] begin[{] method[ofSupplier, return_type[type[RateLimiterMetricsCollector]], modifier[public static], parameter[supplier]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=ofDefaults, postfix_operators=[], prefix_operators=[], qualifier=MetricNames, selectors=[], type_arguments=None), MemberReference(member=supplier, 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=RateLimiterMetricsCollector, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[RateLimiterMetricsCollector] identifier[ofSupplier] operator[SEP] identifier[Supplier] operator[<] operator[?] Keyword[extends] identifier[Iterable] operator[<] operator[?] Keyword[extends] identifier[RateLimiter] operator[>] operator[>] identifier[supplier] operator[SEP] { Keyword[return] Keyword[new] identifier[RateLimiterMetricsCollector] operator[SEP] identifier[MetricNames] operator[SEP] identifier[ofDefaults] operator[SEP] operator[SEP] , identifier[supplier] operator[SEP] operator[SEP] }
@Override public AuthorizationResponse authorization(AuthorizationRequest request) throws AuthleteApiException { return executeApiCall( new ServicePostApiCaller<AuthorizationResponse>( AuthorizationResponse.class, request, AUTH_AUTHORIZATION_API_PATH)); }
class class_name[name] begin[{] method[authorization, return_type[type[AuthorizationResponse]], modifier[public], parameter[request]] begin[{] return[call[.executeApiCall, parameter[ClassCreator(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AuthorizationResponse, sub_type=None)), MemberReference(member=request, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=AUTH_AUTHORIZATION_API_PATH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=AuthorizationResponse, sub_type=None))], dimensions=None, name=ServicePostApiCaller, sub_type=None))]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[AuthorizationResponse] identifier[authorization] operator[SEP] identifier[AuthorizationRequest] identifier[request] operator[SEP] Keyword[throws] identifier[AuthleteApiException] { Keyword[return] identifier[executeApiCall] operator[SEP] Keyword[new] identifier[ServicePostApiCaller] operator[<] identifier[AuthorizationResponse] operator[>] operator[SEP] identifier[AuthorizationResponse] operator[SEP] Keyword[class] , identifier[request] , identifier[AUTH_AUTHORIZATION_API_PATH] operator[SEP] operator[SEP] operator[SEP] }
private void validateStandardLocations() throws MojoExecutionException { boolean hasNonStandardStructure = false; if ( androidManifestFilePre4.exists() && !androidManifestFilePre4.equals( androidManifestFile ) ) { getLog().warn( "Non-standard location of AndroidManifest.xml file found, but not configured:\n " + androidManifestFilePre4 + "\nMove to the standard location src/main/AndroidManifest.xml\n" + "Or configure androidManifestFile. \n" ); hasNonStandardStructure = true; } if ( resourceDirectoryPre4.exists() && !resourceDirectoryPre4.equals( resourceDirectory ) ) { getLog().warn( "Non-standard location of Android res folder found, but not configured:\n " + resourceDirectoryPre4 + "\nMove to the standard location src/main/res/\n" + "Or configure resourceDirectory. \n" ); hasNonStandardStructure = true; } if ( assetsDirectoryPre4.exists() && !assetsDirectoryPre4.equals( assetsDirectory ) ) { getLog().warn( "Non-standard location assets folder found, but not configured:\n " + assetsDirectoryPre4 + "\nMove to the standard location src/main/assets/\n" + "Or configure assetsDirectory. \n" ); hasNonStandardStructure = true; } if ( nativeLibrariesDirectoryPre4.exists() && !nativeLibrariesDirectoryPre4.equals( nativeLibrariesDirectory ) ) { getLog().warn( "Non-standard location native libs folder found, but not configured:\n " + nativeLibrariesDirectoryPre4 + "\nMove to the standard location src/main/libs/\n" + "Or configure nativeLibrariesDirectory. \n" ); hasNonStandardStructure = true; } if ( hasNonStandardStructure && failOnNonStandardStructure ) { throw new MojoExecutionException( "\n\nFound files or folders in non-standard locations in the project!\n" + "....This might be a side-effect of a migration to Android Maven Plugin 4+.\n" + "....Please observe the warnings for specific files and folders above.\n" + "....Ideally you should restructure your project.\n" + "....Alternatively add explicit configuration overrides for files or folders.\n" + "....Finally you could set failOnNonStandardStructure to false, potentially " + "resulting in other failures.\n\n\n" ); } }
class class_name[name] begin[{] method[validateStandardLocations, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[boolean], hasNonStandardStructure] if[binary_operation[call[androidManifestFilePre4.exists, parameter[]], &&, call[androidManifestFilePre4.equals, parameter[member[.androidManifestFile]]]]] begin[{] call[.getLog, parameter[]] assign[member[.hasNonStandardStructure], literal[true]] else begin[{] None end[}] if[binary_operation[call[resourceDirectoryPre4.exists, parameter[]], &&, call[resourceDirectoryPre4.equals, parameter[member[.resourceDirectory]]]]] begin[{] call[.getLog, parameter[]] assign[member[.hasNonStandardStructure], literal[true]] else begin[{] None end[}] if[binary_operation[call[assetsDirectoryPre4.exists, parameter[]], &&, call[assetsDirectoryPre4.equals, parameter[member[.assetsDirectory]]]]] begin[{] call[.getLog, parameter[]] assign[member[.hasNonStandardStructure], literal[true]] else begin[{] None end[}] if[binary_operation[call[nativeLibrariesDirectoryPre4.exists, parameter[]], &&, call[nativeLibrariesDirectoryPre4.equals, parameter[member[.nativeLibrariesDirectory]]]]] begin[{] call[.getLog, parameter[]] assign[member[.hasNonStandardStructure], literal[true]] else begin[{] None end[}] if[binary_operation[member[.hasNonStandardStructure], &&, member[.failOnNonStandardStructure]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n\nFound files or folders in non-standard locations in the project!\n"), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="....This might be a side-effect of a migration to Android Maven Plugin 4+.\n"), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="....Please observe the warnings for specific files and folders above.\n"), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="....Ideally you should restructure your project.\n"), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="....Alternatively add explicit configuration overrides for files or folders.\n"), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="....Finally you could set failOnNonStandardStructure to false, potentially "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="resulting in other failures.\n\n\n"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MojoExecutionException, sub_type=None)), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[validateStandardLocations] operator[SEP] operator[SEP] Keyword[throws] identifier[MojoExecutionException] { Keyword[boolean] identifier[hasNonStandardStructure] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[androidManifestFilePre4] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[androidManifestFilePre4] operator[SEP] identifier[equals] operator[SEP] identifier[androidManifestFile] operator[SEP] operator[SEP] { identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[androidManifestFilePre4] operator[+] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] identifier[hasNonStandardStructure] operator[=] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[resourceDirectoryPre4] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[resourceDirectoryPre4] operator[SEP] identifier[equals] operator[SEP] identifier[resourceDirectory] operator[SEP] operator[SEP] { identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[resourceDirectoryPre4] operator[+] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] identifier[hasNonStandardStructure] operator[=] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[assetsDirectoryPre4] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[assetsDirectoryPre4] operator[SEP] identifier[equals] operator[SEP] identifier[assetsDirectory] operator[SEP] operator[SEP] { identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[assetsDirectoryPre4] operator[+] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] identifier[hasNonStandardStructure] operator[=] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[nativeLibrariesDirectoryPre4] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[nativeLibrariesDirectoryPre4] operator[SEP] identifier[equals] operator[SEP] identifier[nativeLibrariesDirectory] operator[SEP] operator[SEP] { identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[nativeLibrariesDirectoryPre4] operator[+] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] identifier[hasNonStandardStructure] operator[=] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[hasNonStandardStructure] operator[&&] identifier[failOnNonStandardStructure] operator[SEP] { Keyword[throw] Keyword[new] identifier[MojoExecutionException] operator[SEP] literal[String] operator[+] literal[String] operator[+] literal[String] operator[+] literal[String] operator[+] literal[String] operator[+] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] } }
protected File getReportFile(String outputLocation, Format format) { File outFile = new File(outputLocation); if (outFile.getParentFile() == null) { outFile = new File(".", outputLocation); } final String pathToCheck = outputLocation.toLowerCase(); if (format == Format.XML && !pathToCheck.endsWith(".xml")) { return new File(outFile, "dependency-check-report.xml"); } if (format == Format.HTML && !pathToCheck.endsWith(".html") && !pathToCheck.endsWith(".htm")) { return new File(outFile, "dependency-check-report.html"); } if (format == Format.JSON && !pathToCheck.endsWith(".json")) { return new File(outFile, "dependency-check-report.json"); } if (format == Format.CSV && !pathToCheck.endsWith(".csv")) { return new File(outFile, "dependency-check-report.csv"); } if (format == Format.JUNIT && !pathToCheck.endsWith(".xml")) { return new File(outFile, "dependency-check-junit.xml"); } return outFile; }
class class_name[name] begin[{] method[getReportFile, return_type[type[File]], modifier[protected], parameter[outputLocation, format]] begin[{] local_variable[type[File], outFile] if[binary_operation[call[outFile.getParentFile, parameter[]], ==, literal[null]]] begin[{] assign[member[.outFile], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="."), MemberReference(member=outputLocation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))] else begin[{] None end[}] local_variable[type[String], pathToCheck] if[binary_operation[binary_operation[member[.format], ==, member[Format.XML]], &&, call[pathToCheck.endsWith, parameter[literal[".xml"]]]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=outFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="dependency-check-report.xml")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))] else begin[{] None end[}] if[binary_operation[binary_operation[binary_operation[member[.format], ==, member[Format.HTML]], &&, call[pathToCheck.endsWith, parameter[literal[".html"]]]], &&, call[pathToCheck.endsWith, parameter[literal[".htm"]]]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=outFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="dependency-check-report.html")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))] else begin[{] None end[}] if[binary_operation[binary_operation[member[.format], ==, member[Format.JSON]], &&, call[pathToCheck.endsWith, parameter[literal[".json"]]]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=outFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="dependency-check-report.json")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))] else begin[{] None end[}] if[binary_operation[binary_operation[member[.format], ==, member[Format.CSV]], &&, call[pathToCheck.endsWith, parameter[literal[".csv"]]]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=outFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="dependency-check-report.csv")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))] else begin[{] None end[}] if[binary_operation[binary_operation[member[.format], ==, member[Format.JUNIT]], &&, call[pathToCheck.endsWith, parameter[literal[".xml"]]]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=outFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="dependency-check-junit.xml")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))] else begin[{] None end[}] return[member[.outFile]] end[}] END[}]
Keyword[protected] identifier[File] identifier[getReportFile] operator[SEP] identifier[String] identifier[outputLocation] , identifier[Format] identifier[format] operator[SEP] { identifier[File] identifier[outFile] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[outputLocation] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[outFile] operator[SEP] identifier[getParentFile] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[outFile] operator[=] Keyword[new] identifier[File] operator[SEP] literal[String] , identifier[outputLocation] operator[SEP] operator[SEP] } Keyword[final] identifier[String] identifier[pathToCheck] operator[=] identifier[outputLocation] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[format] operator[==] identifier[Format] operator[SEP] identifier[XML] operator[&&] operator[!] identifier[pathToCheck] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[File] operator[SEP] identifier[outFile] , literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[format] operator[==] identifier[Format] operator[SEP] identifier[HTML] operator[&&] operator[!] identifier[pathToCheck] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[&&] operator[!] identifier[pathToCheck] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[File] operator[SEP] identifier[outFile] , literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[format] operator[==] identifier[Format] operator[SEP] identifier[JSON] operator[&&] operator[!] identifier[pathToCheck] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[File] operator[SEP] identifier[outFile] , literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[format] operator[==] identifier[Format] operator[SEP] identifier[CSV] operator[&&] operator[!] identifier[pathToCheck] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[File] operator[SEP] identifier[outFile] , literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[format] operator[==] identifier[Format] operator[SEP] identifier[JUNIT] operator[&&] operator[!] identifier[pathToCheck] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[File] operator[SEP] identifier[outFile] , literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[outFile] operator[SEP] }
public RunInstancesRequest withLicenseSpecifications(LicenseConfigurationRequest... licenseSpecifications) { if (this.licenseSpecifications == null) { setLicenseSpecifications(new com.amazonaws.internal.SdkInternalList<LicenseConfigurationRequest>(licenseSpecifications.length)); } for (LicenseConfigurationRequest ele : licenseSpecifications) { this.licenseSpecifications.add(ele); } return this; }
class class_name[name] begin[{] method[withLicenseSpecifications, return_type[type[RunInstancesRequest]], modifier[public], parameter[licenseSpecifications]] begin[{] if[binary_operation[THIS[member[None.licenseSpecifications]], ==, literal[null]]] begin[{] call[.setLicenseSpecifications, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=licenseSpecifications, 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=LicenseConfigurationRequest, 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=licenseSpecifications, 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=licenseSpecifications, 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=LicenseConfigurationRequest, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[RunInstancesRequest] identifier[withLicenseSpecifications] operator[SEP] identifier[LicenseConfigurationRequest] operator[...] identifier[licenseSpecifications] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[licenseSpecifications] operator[==] Other[null] operator[SEP] { identifier[setLicenseSpecifications] operator[SEP] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[LicenseConfigurationRequest] operator[>] operator[SEP] identifier[licenseSpecifications] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[LicenseConfigurationRequest] identifier[ele] operator[:] identifier[licenseSpecifications] operator[SEP] { Keyword[this] operator[SEP] identifier[licenseSpecifications] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public static Class getHttpsProviderClass() throws ClassNotFoundException { if (_httpsProviderClass == null) { // [ 1520925 ] SSL patch Provider[] sslProviders = Security.getProviders("SSLContext.SSLv3"); // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> // IBM-FIX: Prevent NPE when SSLv3 is disabled. // Security.getProviders(String) returns // null, not an empty array, when there // are no providers. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< // // if (sslProviders.length > 0) { // if (sslProviders != null && sslProviders.length > 0) { // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> // END IBM-FIX // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< _httpsProviderClass = sslProviders[0].getClass(); } // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> // IBM-FIX: Try TLS if SSLv3 does not have a // provider. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< if (_httpsProviderClass == null) { sslProviders = Security.getProviders("SSLContext.TLS"); if (sslProviders != null && sslProviders.length > 0) { _httpsProviderClass = sslProviders[0].getClass(); } } // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> // END IBM-FIX // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< if (_httpsProviderClass == null) { _httpsProviderClass = Class.forName( JSSE_PROVIDER_CLASS ); } } return _httpsProviderClass; }
class class_name[name] begin[{] method[getHttpsProviderClass, return_type[type[Class]], modifier[public static], parameter[]] begin[{] if[binary_operation[member[._httpsProviderClass], ==, literal[null]]] begin[{] local_variable[type[Provider], sslProviders] if[binary_operation[binary_operation[member[.sslProviders], !=, literal[null]], &&, binary_operation[member[sslProviders.length], >, literal[0]]]] begin[{] assign[member[._httpsProviderClass], member[.sslProviders]] else begin[{] None end[}] if[binary_operation[member[._httpsProviderClass], ==, literal[null]]] begin[{] assign[member[.sslProviders], call[Security.getProviders, parameter[literal["SSLContext.TLS"]]]] if[binary_operation[binary_operation[member[.sslProviders], !=, literal[null]], &&, binary_operation[member[sslProviders.length], >, literal[0]]]] begin[{] assign[member[._httpsProviderClass], member[.sslProviders]] else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[member[._httpsProviderClass], ==, literal[null]]] begin[{] assign[member[._httpsProviderClass], call[Class.forName, parameter[member[.JSSE_PROVIDER_CLASS]]]] else begin[{] None end[}] else begin[{] None end[}] return[member[._httpsProviderClass]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Class] identifier[getHttpsProviderClass] operator[SEP] operator[SEP] Keyword[throws] identifier[ClassNotFoundException] { Keyword[if] operator[SEP] identifier[_httpsProviderClass] operator[==] Other[null] operator[SEP] { identifier[Provider] operator[SEP] operator[SEP] identifier[sslProviders] operator[=] identifier[Security] operator[SEP] identifier[getProviders] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sslProviders] operator[!=] Other[null] operator[&&] identifier[sslProviders] operator[SEP] identifier[length] operator[>] Other[0] operator[SEP] { identifier[_httpsProviderClass] operator[=] identifier[sslProviders] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[_httpsProviderClass] operator[==] Other[null] operator[SEP] { identifier[sslProviders] operator[=] identifier[Security] operator[SEP] identifier[getProviders] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sslProviders] operator[!=] Other[null] operator[&&] identifier[sslProviders] operator[SEP] identifier[length] operator[>] Other[0] operator[SEP] { identifier[_httpsProviderClass] operator[=] identifier[sslProviders] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[_httpsProviderClass] operator[==] Other[null] operator[SEP] { identifier[_httpsProviderClass] operator[=] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[JSSE_PROVIDER_CLASS] operator[SEP] operator[SEP] } } Keyword[return] identifier[_httpsProviderClass] operator[SEP] }
public void clearListField(String fieldName) { Object val = getFieldValue(fieldName, true); // internal if (val instanceof List<?>) ((List<?>)val).clear(); else if (val != null && val.getClass().isArray()) { DOField fld = getDomainObjectType().getFieldByName(fieldName); String ctn = fld.getComponentTypeName(); Class<?> clazz; try { clazz = getDomainObjectType().getDomainModel().getClassForName(ctn); tryInitListOrArray(null, fld, clazz); } catch (ClassNotFoundException e) { throw new RuntimeException(e); } } else { if (!getDomainObjectType().getFieldByName(fieldName).isListOrArray()) throw new RuntimeException("field: [" + fieldName + "] is neither list nor array"); if (val == null) throw new RuntimeException("list or array field: [" + fieldName + "] is null"); } }
class class_name[name] begin[{] method[clearListField, return_type[void], modifier[public], parameter[fieldName]] begin[{] local_variable[type[Object], val] if[binary_operation[member[.val], instanceof, type[List]]] begin[{] Cast(expression=MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=List, sub_type=None)) else begin[{] if[binary_operation[binary_operation[member[.val], !=, literal[null]], &&, call[val.getClass, parameter[]]]] begin[{] local_variable[type[DOField], fld] local_variable[type[String], ctn] local_variable[type[Class], clazz] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getDomainObjectType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getDomainModel, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=ctn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getClassForName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=fld, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=tryInitListOrArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ClassNotFoundException']))], finally_block=None, label=None, resources=None) else begin[{] if[call[.getDomainObjectType, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="field: ["), operandr=MemberReference(member=fieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="] is neither list nor array"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.val], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="list or array field: ["), operandr=MemberReference(member=fieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="] is null"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None) else begin[{] None end[}] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[clearListField] operator[SEP] identifier[String] identifier[fieldName] operator[SEP] { identifier[Object] identifier[val] operator[=] identifier[getFieldValue] operator[SEP] identifier[fieldName] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[val] Keyword[instanceof] identifier[List] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] operator[?] operator[>] operator[SEP] identifier[val] operator[SEP] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[val] operator[!=] Other[null] operator[&&] identifier[val] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[isArray] operator[SEP] operator[SEP] operator[SEP] { identifier[DOField] identifier[fld] operator[=] identifier[getDomainObjectType] operator[SEP] operator[SEP] operator[SEP] identifier[getFieldByName] operator[SEP] identifier[fieldName] operator[SEP] operator[SEP] identifier[String] identifier[ctn] operator[=] identifier[fld] operator[SEP] identifier[getComponentTypeName] operator[SEP] operator[SEP] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[SEP] Keyword[try] { identifier[clazz] operator[=] identifier[getDomainObjectType] operator[SEP] operator[SEP] operator[SEP] identifier[getDomainModel] operator[SEP] operator[SEP] operator[SEP] identifier[getClassForName] operator[SEP] identifier[ctn] operator[SEP] operator[SEP] identifier[tryInitListOrArray] operator[SEP] Other[null] , identifier[fld] , identifier[clazz] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ClassNotFoundException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[if] operator[SEP] operator[!] identifier[getDomainObjectType] operator[SEP] operator[SEP] operator[SEP] identifier[getFieldByName] operator[SEP] identifier[fieldName] operator[SEP] operator[SEP] identifier[isListOrArray] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[+] identifier[fieldName] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[val] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[+] identifier[fieldName] operator[+] literal[String] operator[SEP] operator[SEP] } }
public static void send(final PacketOutputStream pos, final long clientCapabilities, final byte serverLanguage) throws IOException { pos.startPacket(1); pos.writeInt((int) clientCapabilities); pos.writeInt(1024 * 1024 * 1024); pos.write(serverLanguage); //1 pos.writeBytes((byte) 0, 19); //19 pos.writeInt((int) (clientCapabilities >> 32)); //Maria extended flag pos.flush(); }
class class_name[name] begin[{] method[send, return_type[void], modifier[public static], parameter[pos, clientCapabilities, serverLanguage]] begin[{] call[pos.startPacket, parameter[literal[1]]] call[pos.writeInt, parameter[Cast(expression=MemberReference(member=clientCapabilities, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int))]] call[pos.writeInt, parameter[binary_operation[binary_operation[literal[1024], *, literal[1024]], *, literal[1024]]]] call[pos.write, parameter[member[.serverLanguage]]] call[pos.writeBytes, parameter[Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), type=BasicType(dimensions=[], name=byte)), literal[19]]] call[pos.writeInt, parameter[Cast(expression=BinaryOperation(operandl=MemberReference(member=clientCapabilities, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32), operator=>>), type=BasicType(dimensions=[], name=int))]] call[pos.flush, parameter[]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[send] operator[SEP] Keyword[final] identifier[PacketOutputStream] identifier[pos] , Keyword[final] Keyword[long] identifier[clientCapabilities] , Keyword[final] Keyword[byte] identifier[serverLanguage] operator[SEP] Keyword[throws] identifier[IOException] { identifier[pos] operator[SEP] identifier[startPacket] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[pos] operator[SEP] identifier[writeInt] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[clientCapabilities] operator[SEP] operator[SEP] identifier[pos] operator[SEP] identifier[writeInt] operator[SEP] Other[1024] operator[*] Other[1024] operator[*] Other[1024] operator[SEP] operator[SEP] identifier[pos] operator[SEP] identifier[write] operator[SEP] identifier[serverLanguage] operator[SEP] operator[SEP] identifier[pos] operator[SEP] identifier[writeBytes] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] Other[0] , Other[19] operator[SEP] operator[SEP] identifier[pos] operator[SEP] identifier[writeInt] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[clientCapabilities] operator[>] operator[>] Other[32] operator[SEP] operator[SEP] operator[SEP] identifier[pos] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] }
public Observable<ServiceResponse<Void>> publishWithServiceResponseAsync(String resourceGroupName, String labAccountName, String labName, String environmentSettingName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (labAccountName == null) { throw new IllegalArgumentException("Parameter labAccountName is required and cannot be null."); } if (labName == null) { throw new IllegalArgumentException("Parameter labName is required and cannot be null."); } if (environmentSettingName == null) { throw new IllegalArgumentException("Parameter environmentSettingName is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } final Boolean useExistingImage = null; PublishPayload publishPayload = new PublishPayload(); publishPayload.withUseExistingImage(null); return service.publish(this.client.subscriptionId(), resourceGroupName, labAccountName, labName, environmentSettingName, this.client.apiVersion(), this.client.acceptLanguage(), publishPayload, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() { @Override public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) { try { ServiceResponse<Void> clientResponse = publishDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
class class_name[name] begin[{] method[publishWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, labAccountName, labName, environmentSettingName]] begin[{] if[binary_operation[THIS[member[None.client]call[None.subscriptionId, parameter[]]], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter this.client.subscriptionId() is required and 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[.resourceGroupName], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter resourceGroupName is required and 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[.labAccountName], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter labAccountName is required and 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[.labName], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter labName is required and 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[.environmentSettingName], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter environmentSettingName is required and 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[THIS[member[None.client]call[None.apiVersion, parameter[]]], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter this.client.apiVersion() is required and 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[}] local_variable[type[Boolean], useExistingImage] local_variable[type[PublishPayload], publishPayload] call[publishPayload.withUseExistingImage, parameter[literal[null]]] return[call[service.publish, parameter[THIS[member[None.client]call[None.subscriptionId, parameter[]]], member[.resourceGroupName], member[.labAccountName], member[.labName], member[.environmentSettingName], THIS[member[None.client]call[None.apiVersion, parameter[]]], THIS[member[None.client]call[None.acceptLanguage, parameter[]]], member[.publishPayload], THIS[member[None.client]call[None.userAgent, parameter[]]]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Void] operator[>] operator[>] identifier[publishWithServiceResponseAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[labAccountName] , identifier[String] identifier[labName] , identifier[String] identifier[environmentSettingName] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[subscriptionId] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[resourceGroupName] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[labAccountName] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[labName] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[environmentSettingName] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[apiVersion] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[final] identifier[Boolean] identifier[useExistingImage] operator[=] Other[null] operator[SEP] identifier[PublishPayload] identifier[publishPayload] operator[=] Keyword[new] identifier[PublishPayload] operator[SEP] operator[SEP] operator[SEP] identifier[publishPayload] operator[SEP] identifier[withUseExistingImage] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[return] identifier[service] operator[SEP] identifier[publish] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[subscriptionId] operator[SEP] operator[SEP] , identifier[resourceGroupName] , identifier[labAccountName] , identifier[labName] , identifier[environmentSettingName] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[apiVersion] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[acceptLanguage] operator[SEP] operator[SEP] , identifier[publishPayload] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[userAgent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[flatMap] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[Response] operator[<] identifier[ResponseBody] operator[>] , identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Void] operator[>] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Void] operator[>] operator[>] identifier[call] operator[SEP] identifier[Response] operator[<] identifier[ResponseBody] operator[>] identifier[response] operator[SEP] { Keyword[try] { identifier[ServiceResponse] operator[<] identifier[Void] operator[>] identifier[clientResponse] operator[=] identifier[publishDelegate] operator[SEP] identifier[response] operator[SEP] operator[SEP] Keyword[return] identifier[Observable] operator[SEP] identifier[just] operator[SEP] identifier[clientResponse] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { Keyword[return] identifier[Observable] operator[SEP] identifier[error] operator[SEP] identifier[t] operator[SEP] operator[SEP] } } } operator[SEP] operator[SEP] }
public static AnimationConfig imports(Xml root) { Check.notNull(root); final Map<String, Animation> animations = new HashMap<>(0); for (final Xml node : root.getChildren(ANIMATION)) { final String anim = node.readString(ANIMATION_NAME); final Animation animation = createAnimation(node); animations.put(anim, animation); } return new AnimationConfig(animations); }
class class_name[name] begin[{] method[imports, return_type[type[AnimationConfig]], modifier[public static], parameter[root]] begin[{] call[Check.notNull, parameter[member[.root]]] local_variable[type[Map], animations] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=ANIMATION_NAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readString, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[], type_arguments=None), name=anim)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createAnimation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=animation)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Animation, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=anim, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=animation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=animations, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=ANIMATION, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getChildren, postfix_operators=[], prefix_operators=[], qualifier=root, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=node)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Xml, sub_type=None))), label=None) return[ClassCreator(arguments=[MemberReference(member=animations, 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=AnimationConfig, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[AnimationConfig] identifier[imports] operator[SEP] identifier[Xml] identifier[root] operator[SEP] { identifier[Check] operator[SEP] identifier[notNull] operator[SEP] identifier[root] operator[SEP] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Animation] operator[>] identifier[animations] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[Xml] identifier[node] operator[:] identifier[root] operator[SEP] identifier[getChildren] operator[SEP] identifier[ANIMATION] operator[SEP] operator[SEP] { Keyword[final] identifier[String] identifier[anim] operator[=] identifier[node] operator[SEP] identifier[readString] operator[SEP] identifier[ANIMATION_NAME] operator[SEP] operator[SEP] Keyword[final] identifier[Animation] identifier[animation] operator[=] identifier[createAnimation] operator[SEP] identifier[node] operator[SEP] operator[SEP] identifier[animations] operator[SEP] identifier[put] operator[SEP] identifier[anim] , identifier[animation] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[AnimationConfig] operator[SEP] identifier[animations] operator[SEP] operator[SEP] }
public static void log(LogLevel logLevel, String message, String... values) { log(logLevel, LOCAL_CLASS, message, values); }
class class_name[name] begin[{] method[log, return_type[void], modifier[public static], parameter[logLevel, message, values]] begin[{] call[.log, parameter[member[.logLevel], member[.LOCAL_CLASS], member[.message], member[.values]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[log] operator[SEP] identifier[LogLevel] identifier[logLevel] , identifier[String] identifier[message] , identifier[String] operator[...] identifier[values] operator[SEP] { identifier[log] operator[SEP] identifier[logLevel] , identifier[LOCAL_CLASS] , identifier[message] , identifier[values] operator[SEP] operator[SEP] }
public static PropertyOrder.Builder makeOrder(String property, PropertyOrder.Direction direction) { return PropertyOrder.newBuilder() .setProperty(makePropertyReference(property)) .setDirection(direction); }
class class_name[name] begin[{] method[makeOrder, return_type[type[PropertyOrder]], modifier[public static], parameter[property, direction]] begin[{] return[call[PropertyOrder.newBuilder, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[PropertyOrder] operator[SEP] identifier[Builder] identifier[makeOrder] operator[SEP] identifier[String] identifier[property] , identifier[PropertyOrder] operator[SEP] identifier[Direction] identifier[direction] operator[SEP] { Keyword[return] identifier[PropertyOrder] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setProperty] operator[SEP] identifier[makePropertyReference] operator[SEP] identifier[property] operator[SEP] operator[SEP] operator[SEP] identifier[setDirection] operator[SEP] identifier[direction] operator[SEP] operator[SEP] }
public List<ProjectHook> getHooks(Object projectIdOrPath, int page, int perPage) throws GitLabApiException { Response response = get(Response.Status.OK, getPageQueryParams(page, perPage), "projects", getProjectIdOrPath(projectIdOrPath), "hooks"); return (response.readEntity(new GenericType<List<ProjectHook>>() {})); }
class class_name[name] begin[{] method[getHooks, return_type[type[List]], modifier[public], parameter[projectIdOrPath, page, perPage]] begin[{] local_variable[type[Response], response] return[call[response.readEntity, parameter[ClassCreator(arguments=[], body=[], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ProjectHook, sub_type=None))], dimensions=[], name=List, sub_type=None))], dimensions=None, name=GenericType, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[ProjectHook] operator[>] identifier[getHooks] operator[SEP] identifier[Object] identifier[projectIdOrPath] , Keyword[int] identifier[page] , Keyword[int] identifier[perPage] operator[SEP] Keyword[throws] identifier[GitLabApiException] { identifier[Response] identifier[response] operator[=] identifier[get] operator[SEP] identifier[Response] operator[SEP] identifier[Status] operator[SEP] identifier[OK] , identifier[getPageQueryParams] operator[SEP] identifier[page] , identifier[perPage] operator[SEP] , literal[String] , identifier[getProjectIdOrPath] operator[SEP] identifier[projectIdOrPath] operator[SEP] , literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[response] operator[SEP] identifier[readEntity] operator[SEP] Keyword[new] identifier[GenericType] operator[<] identifier[List] operator[<] identifier[ProjectHook] operator[>] operator[>] operator[SEP] operator[SEP] { } operator[SEP] operator[SEP] operator[SEP] }
public String html() { StringBuilder sb = StringUtil.borrowBuilder(); try { html(sb, (new Document("")).outputSettings()); // output settings a bit funky, but this html() seldom used } catch (IOException e) { // ought never happen throw new SerializationException(e); } return StringUtil.releaseBuilder(sb); }
class class_name[name] begin[{] method[html, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[StringBuilder], sb] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sb, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=outputSettings, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Document, sub_type=None))], member=html, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SerializationException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) return[call[StringUtil.releaseBuilder, parameter[member[.sb]]]] end[}] END[}]
Keyword[public] identifier[String] identifier[html] operator[SEP] operator[SEP] { identifier[StringBuilder] identifier[sb] operator[=] identifier[StringUtil] operator[SEP] identifier[borrowBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[html] operator[SEP] identifier[sb] , operator[SEP] Keyword[new] identifier[Document] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[outputSettings] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SerializationException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[return] identifier[StringUtil] operator[SEP] identifier[releaseBuilder] operator[SEP] identifier[sb] operator[SEP] operator[SEP] }
public JSONResult get(String key) { if (value instanceof JSONObject) { JSONObject obj = (JSONObject) value; Object result = obj.get(key); return new JSONResult(result); } else if (value instanceof JSONArray) { try { int index = Integer.parseInt(key); return get(index); } catch(NumberFormatException e) { throw createException("Excpected JSONObject " + key + ":"); } } return new JSONResult(null); }
class class_name[name] begin[{] method[get, return_type[type[JSONResult]], modifier[public], parameter[key]] begin[{] if[binary_operation[member[.value], instanceof, type[JSONObject]]] begin[{] local_variable[type[JSONObject], obj] local_variable[type[Object], result] return[ClassCreator(arguments=[MemberReference(member=result, 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=JSONResult, sub_type=None))] else begin[{] if[binary_operation[member[.value], instanceof, type[JSONArray]]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), name=index)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Excpected JSONObject "), operandr=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=":"), operator=+)], member=createException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['NumberFormatException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] end[}] return[ClassCreator(arguments=[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=JSONResult, sub_type=None))] end[}] END[}]
Keyword[public] identifier[JSONResult] identifier[get] operator[SEP] identifier[String] identifier[key] operator[SEP] { Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[JSONObject] operator[SEP] { identifier[JSONObject] identifier[obj] operator[=] operator[SEP] identifier[JSONObject] operator[SEP] identifier[value] operator[SEP] identifier[Object] identifier[result] operator[=] identifier[obj] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[JSONResult] operator[SEP] identifier[result] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[JSONArray] operator[SEP] { Keyword[try] { Keyword[int] identifier[index] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[return] identifier[get] operator[SEP] identifier[index] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NumberFormatException] identifier[e] operator[SEP] { Keyword[throw] identifier[createException] operator[SEP] literal[String] operator[+] identifier[key] operator[+] literal[String] operator[SEP] operator[SEP] } } Keyword[return] Keyword[new] identifier[JSONResult] operator[SEP] Other[null] operator[SEP] operator[SEP] }
public static <U> CompletableFuture<U> failedFuture(Throwable ex) { return new CompletableFuture<U>(new AltResult(Objects.requireNonNull(ex))); }
class class_name[name] begin[{] method[failedFuture, return_type[type[CompletableFuture]], modifier[public static], parameter[ex]] begin[{] return[ClassCreator(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=requireNonNull, postfix_operators=[], prefix_operators=[], qualifier=Objects, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AltResult, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=U, sub_type=None))], dimensions=None, name=CompletableFuture, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[U] operator[>] identifier[CompletableFuture] operator[<] identifier[U] operator[>] identifier[failedFuture] operator[SEP] identifier[Throwable] identifier[ex] operator[SEP] { Keyword[return] Keyword[new] identifier[CompletableFuture] operator[<] identifier[U] operator[>] operator[SEP] Keyword[new] identifier[AltResult] operator[SEP] identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[ex] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
protected DatasetBuilder readDataset(DatasetBuilder parent, Element dsElem) { DatasetBuilder dataset = new DatasetBuilder(parent); readDatasetInfo(dataset, dsElem); // look for access elements java.util.List<Element> aList = dsElem.getChildren("access", Catalog.defNS); for (Element e : aList) { dataset.addAccess(readAccess(dataset, e)); } // look for nested dataset and catalogRefs elements (keep them in order) java.util.List<Element> allChildren = dsElem.getChildren(); for (Element e : allChildren) { if (e.getName().equals("dataset")) { dataset.addDataset(readDataset(dataset, e)); } else if (e.getName().equals("catalogRef")) { dataset.addDataset(readCatalogRef(dataset, e)); } else { dataset.addDataset( buildOtherDataset(dataset, e)); } } return dataset; }
class class_name[name] begin[{] method[readDataset, return_type[type[DatasetBuilder]], modifier[protected], parameter[parent, dsElem]] begin[{] local_variable[type[DatasetBuilder], dataset] call[.readDatasetInfo, parameter[member[.dataset], member[.dsElem]]] local_variable[type[java], aList] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=dataset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readAccess, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=addAccess, postfix_operators=[], prefix_operators=[], qualifier=dataset, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=aList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None))), label=None) local_variable[type[java], allChildren] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="dataset")], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="catalogRef")], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=dataset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=buildOtherDataset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=addDataset, postfix_operators=[], prefix_operators=[], qualifier=dataset, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=dataset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readCatalogRef, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=addDataset, postfix_operators=[], prefix_operators=[], qualifier=dataset, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=dataset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readDataset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=addDataset, postfix_operators=[], prefix_operators=[], qualifier=dataset, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=allChildren, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None))), label=None) return[member[.dataset]] end[}] END[}]
Keyword[protected] identifier[DatasetBuilder] identifier[readDataset] operator[SEP] identifier[DatasetBuilder] identifier[parent] , identifier[Element] identifier[dsElem] operator[SEP] { identifier[DatasetBuilder] identifier[dataset] operator[=] Keyword[new] identifier[DatasetBuilder] operator[SEP] identifier[parent] operator[SEP] operator[SEP] identifier[readDatasetInfo] operator[SEP] identifier[dataset] , identifier[dsElem] operator[SEP] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[Element] operator[>] identifier[aList] operator[=] identifier[dsElem] operator[SEP] identifier[getChildren] operator[SEP] literal[String] , identifier[Catalog] operator[SEP] identifier[defNS] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Element] identifier[e] operator[:] identifier[aList] operator[SEP] { identifier[dataset] operator[SEP] identifier[addAccess] operator[SEP] identifier[readAccess] operator[SEP] identifier[dataset] , identifier[e] operator[SEP] operator[SEP] operator[SEP] } identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[Element] operator[>] identifier[allChildren] operator[=] identifier[dsElem] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Element] identifier[e] operator[:] identifier[allChildren] operator[SEP] { Keyword[if] operator[SEP] identifier[e] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[dataset] operator[SEP] identifier[addDataset] operator[SEP] identifier[readDataset] operator[SEP] identifier[dataset] , identifier[e] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[e] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[dataset] operator[SEP] identifier[addDataset] operator[SEP] identifier[readCatalogRef] operator[SEP] identifier[dataset] , identifier[e] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[dataset] operator[SEP] identifier[addDataset] operator[SEP] identifier[buildOtherDataset] operator[SEP] identifier[dataset] , identifier[e] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[dataset] operator[SEP] }
@XmlElementDecl(namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", name = "extension", scope = CheckOutResponse.class) public JAXBElement<CmisExtensionType> createCheckOutResponseExtension( CmisExtensionType value) { return new JAXBElement<CmisExtensionType>( _GetPropertiesExtension_QNAME, CmisExtensionType.class, CheckOutResponse.class, value); }
class class_name[name] begin[{] method[createCheckOutResponseExtension, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=_GetPropertiesExtension_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CmisExtensionType, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CheckOutResponse, sub_type=None)), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=CmisExtensionType, sub_type=None))], dimensions=None, name=JAXBElement, sub_type=None))] end[}] END[}]
annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] , identifier[scope] operator[=] identifier[CheckOutResponse] operator[SEP] Keyword[class] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[CmisExtensionType] operator[>] identifier[createCheckOutResponseExtension] operator[SEP] identifier[CmisExtensionType] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[CmisExtensionType] operator[>] operator[SEP] identifier[_GetPropertiesExtension_QNAME] , identifier[CmisExtensionType] operator[SEP] Keyword[class] , identifier[CheckOutResponse] operator[SEP] Keyword[class] , identifier[value] operator[SEP] operator[SEP] }
@Override public DBCluster restoreDBClusterFromSnapshot(RestoreDBClusterFromSnapshotRequest request) { request = beforeClientExecution(request); return executeRestoreDBClusterFromSnapshot(request); }
class class_name[name] begin[{] method[restoreDBClusterFromSnapshot, return_type[type[DBCluster]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeRestoreDBClusterFromSnapshot, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[DBCluster] identifier[restoreDBClusterFromSnapshot] operator[SEP] identifier[RestoreDBClusterFromSnapshotRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeRestoreDBClusterFromSnapshot] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
@Override public IShSessionData getAppSessionData(Class<? extends AppSession> clazz, String sessionId) { if (clazz.equals(ClientShSession.class)) { ShClientSessionDataReplicatedImpl data = new ShClientSessionDataReplicatedImpl(sessionId, this.mobicentsCluster); return data; } else if (clazz.equals(ServerShSession.class)) { ShServerSessionDataReplicatedImpl data = new ShServerSessionDataReplicatedImpl(sessionId, this.mobicentsCluster); return data; } throw new IllegalArgumentException(); }
class class_name[name] begin[{] method[getAppSessionData, return_type[type[IShSessionData]], modifier[public], parameter[clazz, sessionId]] begin[{] if[call[clazz.equals, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ClientShSession, sub_type=None))]]] begin[{] local_variable[type[ShClientSessionDataReplicatedImpl], data] return[member[.data]] else begin[{] if[call[clazz.equals, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServerShSession, sub_type=None))]]] begin[{] local_variable[type[ShServerSessionDataReplicatedImpl], data] return[member[.data]] else begin[{] None end[}] end[}] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[IShSessionData] identifier[getAppSessionData] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[AppSession] operator[>] identifier[clazz] , identifier[String] identifier[sessionId] operator[SEP] { Keyword[if] operator[SEP] identifier[clazz] operator[SEP] identifier[equals] operator[SEP] identifier[ClientShSession] operator[SEP] Keyword[class] operator[SEP] operator[SEP] { identifier[ShClientSessionDataReplicatedImpl] identifier[data] operator[=] Keyword[new] identifier[ShClientSessionDataReplicatedImpl] operator[SEP] identifier[sessionId] , Keyword[this] operator[SEP] identifier[mobicentsCluster] operator[SEP] operator[SEP] Keyword[return] identifier[data] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[clazz] operator[SEP] identifier[equals] operator[SEP] identifier[ServerShSession] operator[SEP] Keyword[class] operator[SEP] operator[SEP] { identifier[ShServerSessionDataReplicatedImpl] identifier[data] operator[=] Keyword[new] identifier[ShServerSessionDataReplicatedImpl] operator[SEP] identifier[sessionId] , Keyword[this] operator[SEP] identifier[mobicentsCluster] operator[SEP] operator[SEP] Keyword[return] identifier[data] operator[SEP] } Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] operator[SEP] operator[SEP] }
private void addTriggerAfterAndExitTxn(CodeBuilder b, String opType, LocalVariable forTryVar, boolean forTry, LocalVariable triggerVar, LocalVariable txnVar, LocalVariable stateVar) { // if (trigger != null) { b.loadLocal(triggerVar); Label cont = b.createLabel(); b.ifNullBranch(cont, true); // if (forTry) { // trigger.afterTryXxx(this, state); // } else { // trigger.afterXxx(this, state); // } b.loadLocal(triggerVar); b.loadThis(); b.loadLocal(stateVar); if (forTryVar == null) { if (forTry) { b.invokeVirtual(TypeDesc.forClass(Trigger.class), "afterTry" + opType, null, new TypeDesc[] {TypeDesc.OBJECT, TypeDesc.OBJECT}); } else { b.invokeVirtual(TypeDesc.forClass(Trigger.class), "after" + opType, null, new TypeDesc[] {TypeDesc.OBJECT, TypeDesc.OBJECT}); } } else { b.loadLocal(forTryVar); Label isForTry = b.createLabel(); b.ifZeroComparisonBranch(isForTry, "!="); b.invokeVirtual(TypeDesc.forClass(Trigger.class), "after" + opType, null, new TypeDesc[] {TypeDesc.OBJECT, TypeDesc.OBJECT}); Label commitAndExit = b.createLabel(); b.branch(commitAndExit); isForTry.setLocation(); b.invokeVirtual(TypeDesc.forClass(Trigger.class), "afterTry" + opType, null, new TypeDesc[] {TypeDesc.OBJECT, TypeDesc.OBJECT}); commitAndExit.setLocation(); } // txn.commit(); // txn.exit(); TypeDesc transactionType = TypeDesc.forClass(Transaction.class); b.loadLocal(txnVar); b.invokeInterface(transactionType, COMMIT_METHOD_NAME, null, null); b.loadLocal(txnVar); b.invokeInterface(transactionType, EXIT_METHOD_NAME, null, null); cont.setLocation(); }
class class_name[name] begin[{] method[addTriggerAfterAndExitTxn, return_type[void], modifier[private], parameter[b, opType, forTryVar, forTry, triggerVar, txnVar, stateVar]] begin[{] call[b.loadLocal, parameter[member[.triggerVar]]] local_variable[type[Label], cont] call[b.ifNullBranch, parameter[member[.cont], literal[true]]] call[b.loadLocal, parameter[member[.triggerVar]]] call[b.loadThis, parameter[]] call[b.loadLocal, parameter[member[.stateVar]]] if[binary_operation[member[.forTryVar], ==, literal[null]]] begin[{] if[member[.forTry]] begin[{] call[b.invokeVirtual, parameter[call[TypeDesc.forClass, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Trigger, sub_type=None))]], binary_operation[literal["afterTry"], +, member[.opType]], literal[null], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=OBJECT, postfix_operators=[], prefix_operators=[], qualifier=TypeDesc, selectors=[]), MemberReference(member=OBJECT, postfix_operators=[], prefix_operators=[], qualifier=TypeDesc, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TypeDesc, sub_type=None))]] else begin[{] call[b.invokeVirtual, parameter[call[TypeDesc.forClass, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Trigger, sub_type=None))]], binary_operation[literal["after"], +, member[.opType]], literal[null], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=OBJECT, postfix_operators=[], prefix_operators=[], qualifier=TypeDesc, selectors=[]), MemberReference(member=OBJECT, postfix_operators=[], prefix_operators=[], qualifier=TypeDesc, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TypeDesc, sub_type=None))]] end[}] else begin[{] call[b.loadLocal, parameter[member[.forTryVar]]] local_variable[type[Label], isForTry] call[b.ifZeroComparisonBranch, parameter[member[.isForTry], literal["!="]]] call[b.invokeVirtual, parameter[call[TypeDesc.forClass, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Trigger, sub_type=None))]], binary_operation[literal["after"], +, member[.opType]], literal[null], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=OBJECT, postfix_operators=[], prefix_operators=[], qualifier=TypeDesc, selectors=[]), MemberReference(member=OBJECT, postfix_operators=[], prefix_operators=[], qualifier=TypeDesc, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TypeDesc, sub_type=None))]] local_variable[type[Label], commitAndExit] call[b.branch, parameter[member[.commitAndExit]]] call[isForTry.setLocation, parameter[]] call[b.invokeVirtual, parameter[call[TypeDesc.forClass, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Trigger, sub_type=None))]], binary_operation[literal["afterTry"], +, member[.opType]], literal[null], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=OBJECT, postfix_operators=[], prefix_operators=[], qualifier=TypeDesc, selectors=[]), MemberReference(member=OBJECT, postfix_operators=[], prefix_operators=[], qualifier=TypeDesc, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TypeDesc, sub_type=None))]] call[commitAndExit.setLocation, parameter[]] end[}] local_variable[type[TypeDesc], transactionType] call[b.loadLocal, parameter[member[.txnVar]]] call[b.invokeInterface, parameter[member[.transactionType], member[.COMMIT_METHOD_NAME], literal[null], literal[null]]] call[b.loadLocal, parameter[member[.txnVar]]] call[b.invokeInterface, parameter[member[.transactionType], member[.EXIT_METHOD_NAME], literal[null], literal[null]]] call[cont.setLocation, parameter[]] end[}] END[}]
Keyword[private] Keyword[void] identifier[addTriggerAfterAndExitTxn] operator[SEP] identifier[CodeBuilder] identifier[b] , identifier[String] identifier[opType] , identifier[LocalVariable] identifier[forTryVar] , Keyword[boolean] identifier[forTry] , identifier[LocalVariable] identifier[triggerVar] , identifier[LocalVariable] identifier[txnVar] , identifier[LocalVariable] identifier[stateVar] operator[SEP] { identifier[b] operator[SEP] identifier[loadLocal] operator[SEP] identifier[triggerVar] operator[SEP] operator[SEP] identifier[Label] identifier[cont] operator[=] identifier[b] operator[SEP] identifier[createLabel] operator[SEP] operator[SEP] operator[SEP] identifier[b] operator[SEP] identifier[ifNullBranch] operator[SEP] identifier[cont] , literal[boolean] operator[SEP] operator[SEP] identifier[b] operator[SEP] identifier[loadLocal] operator[SEP] identifier[triggerVar] operator[SEP] operator[SEP] identifier[b] operator[SEP] identifier[loadThis] operator[SEP] operator[SEP] operator[SEP] identifier[b] operator[SEP] identifier[loadLocal] operator[SEP] identifier[stateVar] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[forTryVar] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[forTry] operator[SEP] { identifier[b] operator[SEP] identifier[invokeVirtual] operator[SEP] identifier[TypeDesc] operator[SEP] identifier[forClass] operator[SEP] identifier[Trigger] operator[SEP] Keyword[class] operator[SEP] , literal[String] operator[+] identifier[opType] , Other[null] , Keyword[new] identifier[TypeDesc] operator[SEP] operator[SEP] { identifier[TypeDesc] operator[SEP] identifier[OBJECT] , identifier[TypeDesc] operator[SEP] identifier[OBJECT] } operator[SEP] operator[SEP] } Keyword[else] { identifier[b] operator[SEP] identifier[invokeVirtual] operator[SEP] identifier[TypeDesc] operator[SEP] identifier[forClass] operator[SEP] identifier[Trigger] operator[SEP] Keyword[class] operator[SEP] , literal[String] operator[+] identifier[opType] , Other[null] , Keyword[new] identifier[TypeDesc] operator[SEP] operator[SEP] { identifier[TypeDesc] operator[SEP] identifier[OBJECT] , identifier[TypeDesc] operator[SEP] identifier[OBJECT] } operator[SEP] operator[SEP] } } Keyword[else] { identifier[b] operator[SEP] identifier[loadLocal] operator[SEP] identifier[forTryVar] operator[SEP] operator[SEP] identifier[Label] identifier[isForTry] operator[=] identifier[b] operator[SEP] identifier[createLabel] operator[SEP] operator[SEP] operator[SEP] identifier[b] operator[SEP] identifier[ifZeroComparisonBranch] operator[SEP] identifier[isForTry] , literal[String] operator[SEP] operator[SEP] identifier[b] operator[SEP] identifier[invokeVirtual] operator[SEP] identifier[TypeDesc] operator[SEP] identifier[forClass] operator[SEP] identifier[Trigger] operator[SEP] Keyword[class] operator[SEP] , literal[String] operator[+] identifier[opType] , Other[null] , Keyword[new] identifier[TypeDesc] operator[SEP] operator[SEP] { identifier[TypeDesc] operator[SEP] identifier[OBJECT] , identifier[TypeDesc] operator[SEP] identifier[OBJECT] } operator[SEP] operator[SEP] identifier[Label] identifier[commitAndExit] operator[=] identifier[b] operator[SEP] identifier[createLabel] operator[SEP] operator[SEP] operator[SEP] identifier[b] operator[SEP] identifier[branch] operator[SEP] identifier[commitAndExit] operator[SEP] operator[SEP] identifier[isForTry] operator[SEP] identifier[setLocation] operator[SEP] operator[SEP] operator[SEP] identifier[b] operator[SEP] identifier[invokeVirtual] operator[SEP] identifier[TypeDesc] operator[SEP] identifier[forClass] operator[SEP] identifier[Trigger] operator[SEP] Keyword[class] operator[SEP] , literal[String] operator[+] identifier[opType] , Other[null] , Keyword[new] identifier[TypeDesc] operator[SEP] operator[SEP] { identifier[TypeDesc] operator[SEP] identifier[OBJECT] , identifier[TypeDesc] operator[SEP] identifier[OBJECT] } operator[SEP] operator[SEP] identifier[commitAndExit] operator[SEP] identifier[setLocation] operator[SEP] operator[SEP] operator[SEP] } identifier[TypeDesc] identifier[transactionType] operator[=] identifier[TypeDesc] operator[SEP] identifier[forClass] operator[SEP] identifier[Transaction] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[b] operator[SEP] identifier[loadLocal] operator[SEP] identifier[txnVar] operator[SEP] operator[SEP] identifier[b] operator[SEP] identifier[invokeInterface] operator[SEP] identifier[transactionType] , identifier[COMMIT_METHOD_NAME] , Other[null] , Other[null] operator[SEP] operator[SEP] identifier[b] operator[SEP] identifier[loadLocal] operator[SEP] identifier[txnVar] operator[SEP] operator[SEP] identifier[b] operator[SEP] identifier[invokeInterface] operator[SEP] identifier[transactionType] , identifier[EXIT_METHOD_NAME] , Other[null] , Other[null] operator[SEP] operator[SEP] identifier[cont] operator[SEP] identifier[setLocation] operator[SEP] operator[SEP] operator[SEP] }
public String transform(ReplayParseContext context, String input) { // Ex. <META HTTP-EQUIV="Refresh" CONTENT="0; URL=/ics/default.asp"> // input receives the value of the "CONTENT" attribute. // So, we need to search for the "URL=", take everything to the right of // that, trim it, contextualize it, and return that. Matcher m = refreshURLPattern.matcher(input); if (m.matches()) { if (m.groupCount() == 1) { String url = m.group(1); String replayUrl = context.contextualizeUrl(url); if (replayUrl != url) { input = input.substring(0, m.start(1)) + replayUrl + input.substring(m.end(1)); } } } return input; }
class class_name[name] begin[{] method[transform, return_type[type[String]], modifier[public], parameter[context, input]] begin[{] local_variable[type[Matcher], m] if[call[m.matches, parameter[]]] begin[{] if[binary_operation[call[m.groupCount, parameter[]], ==, literal[1]]] begin[{] local_variable[type[String], url] local_variable[type[String], replayUrl] if[binary_operation[member[.replayUrl], !=, member[.url]]] begin[{] assign[member[.input], binary_operation[binary_operation[call[input.substring, parameter[literal[0], call[m.start, parameter[literal[1]]]]], +, member[.replayUrl]], +, call[input.substring, parameter[call[m.end, parameter[literal[1]]]]]]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] return[member[.input]] end[}] END[}]
Keyword[public] identifier[String] identifier[transform] operator[SEP] identifier[ReplayParseContext] identifier[context] , identifier[String] identifier[input] operator[SEP] { identifier[Matcher] identifier[m] operator[=] identifier[refreshURLPattern] operator[SEP] identifier[matcher] operator[SEP] identifier[input] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[m] operator[SEP] identifier[groupCount] operator[SEP] operator[SEP] operator[==] Other[1] operator[SEP] { identifier[String] identifier[url] operator[=] identifier[m] operator[SEP] identifier[group] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[String] identifier[replayUrl] operator[=] identifier[context] operator[SEP] identifier[contextualizeUrl] operator[SEP] identifier[url] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[replayUrl] operator[!=] identifier[url] operator[SEP] { identifier[input] operator[=] identifier[input] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[m] operator[SEP] identifier[start] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[+] identifier[replayUrl] operator[+] identifier[input] operator[SEP] identifier[substring] operator[SEP] identifier[m] operator[SEP] identifier[end] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[return] identifier[input] operator[SEP] }
private static Optional<ICondition> asContainsAny( JsonObject json) { return json.containsKey( HAS_ANY_KEY) ? Optional.of( new ContainsAny( toIdentifiers( json.getJsonArray( HAS_ANY_KEY)))) : Optional.empty(); }
class class_name[name] begin[{] method[asContainsAny, return_type[type[Optional]], modifier[private static], parameter[json]] begin[{] return[TernaryExpression(condition=MethodInvocation(arguments=[MemberReference(member=HAS_ANY_KEY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=json, selectors=[], type_arguments=None), if_false=MethodInvocation(arguments=[], member=empty, postfix_operators=[], prefix_operators=[], qualifier=Optional, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=HAS_ANY_KEY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getJsonArray, postfix_operators=[], prefix_operators=[], qualifier=json, selectors=[], type_arguments=None)], member=toIdentifiers, 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=ContainsAny, sub_type=None))], member=of, postfix_operators=[], prefix_operators=[], qualifier=Optional, selectors=[], type_arguments=None))] end[}] END[}]
Keyword[private] Keyword[static] identifier[Optional] operator[<] identifier[ICondition] operator[>] identifier[asContainsAny] operator[SEP] identifier[JsonObject] identifier[json] operator[SEP] { Keyword[return] identifier[json] operator[SEP] identifier[containsKey] operator[SEP] identifier[HAS_ANY_KEY] operator[SEP] operator[?] identifier[Optional] operator[SEP] identifier[of] operator[SEP] Keyword[new] identifier[ContainsAny] operator[SEP] identifier[toIdentifiers] operator[SEP] identifier[json] operator[SEP] identifier[getJsonArray] operator[SEP] identifier[HAS_ANY_KEY] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[:] identifier[Optional] operator[SEP] identifier[empty] operator[SEP] operator[SEP] operator[SEP] }
@XmlElementDecl(namespace = "http://www.immobilienscout24.de/immobilientransfer", name = "Kauf", scope = VermarktungGewerbeTyp2 .class) public JAXBElement<Object> createVermarktungGewerbeTyp2Kauf(Object value) { return new JAXBElement<Object>(_VermarktungGewerbeTyp2Kauf_QNAME, Object.class, VermarktungGewerbeTyp2 .class, value); }
class class_name[name] begin[{] method[createVermarktungGewerbeTyp2Kauf, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=_VermarktungGewerbeTyp2Kauf_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=VermarktungGewerbeTyp2, sub_type=None)), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=None, name=JAXBElement, sub_type=None))] end[}] END[}]
annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] , identifier[scope] operator[=] identifier[VermarktungGewerbeTyp2] operator[SEP] Keyword[class] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[Object] operator[>] identifier[createVermarktungGewerbeTyp2Kauf] operator[SEP] identifier[Object] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[Object] operator[>] operator[SEP] identifier[_VermarktungGewerbeTyp2Kauf_QNAME] , identifier[Object] operator[SEP] Keyword[class] , identifier[VermarktungGewerbeTyp2] operator[SEP] Keyword[class] , identifier[value] operator[SEP] operator[SEP] }
private static long computeMsgIdHelper( ImmutableList<SoyMsgPart> msgParts, boolean doUseBracedPhs, @Nullable String meaning, @Nullable String contentType) { // Important: Do not change this algorithm. Doing so will break backwards compatibility. String msgContentStrForMsgIdComputation = buildMsgContentStrForMsgIdComputation(msgParts, doUseBracedPhs); long fp = fingerprint(msgContentStrForMsgIdComputation); // If there is a meaning, incorporate its fingerprint. if (meaning != null) { fp = (fp << 1) + (fp < 0 ? 1 : 0) + fingerprint(meaning); } // If there is a content type other than "text/html", incorporate its fingerprint. if (contentType != null && !contentType.equals("text/html")) { fp = (fp << 1) + (fp < 0 ? 1 : 0) + fingerprint(contentType); } // To avoid negative ids we strip the high-order bit. return fp & 0x7fffffffffffffffL; }
class class_name[name] begin[{] method[computeMsgIdHelper, return_type[type[long]], modifier[private static], parameter[msgParts, doUseBracedPhs, meaning, contentType]] begin[{] local_variable[type[String], msgContentStrForMsgIdComputation] local_variable[type[long], fp] if[binary_operation[member[.meaning], !=, literal[null]]] begin[{] assign[member[.fp], binary_operation[binary_operation[binary_operation[member[.fp], <<, literal[1]], +, TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=fp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))], +, call[.fingerprint, parameter[member[.meaning]]]]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.contentType], !=, literal[null]], &&, call[contentType.equals, parameter[literal["text/html"]]]]] begin[{] assign[member[.fp], binary_operation[binary_operation[binary_operation[member[.fp], <<, literal[1]], +, TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=fp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))], +, call[.fingerprint, parameter[member[.contentType]]]]] else begin[{] None end[}] return[binary_operation[member[.fp], &, literal[0x7fffffffffffffffL]]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[long] identifier[computeMsgIdHelper] operator[SEP] identifier[ImmutableList] operator[<] identifier[SoyMsgPart] operator[>] identifier[msgParts] , Keyword[boolean] identifier[doUseBracedPhs] , annotation[@] identifier[Nullable] identifier[String] identifier[meaning] , annotation[@] identifier[Nullable] identifier[String] identifier[contentType] operator[SEP] { identifier[String] identifier[msgContentStrForMsgIdComputation] operator[=] identifier[buildMsgContentStrForMsgIdComputation] operator[SEP] identifier[msgParts] , identifier[doUseBracedPhs] operator[SEP] operator[SEP] Keyword[long] identifier[fp] operator[=] identifier[fingerprint] operator[SEP] identifier[msgContentStrForMsgIdComputation] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[meaning] operator[!=] Other[null] operator[SEP] { identifier[fp] operator[=] operator[SEP] identifier[fp] operator[<<] Other[1] operator[SEP] operator[+] operator[SEP] identifier[fp] operator[<] Other[0] operator[?] Other[1] operator[:] Other[0] operator[SEP] operator[+] identifier[fingerprint] operator[SEP] identifier[meaning] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[contentType] operator[!=] Other[null] operator[&&] operator[!] identifier[contentType] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[fp] operator[=] operator[SEP] identifier[fp] operator[<<] Other[1] operator[SEP] operator[+] operator[SEP] identifier[fp] operator[<] Other[0] operator[?] Other[1] operator[:] Other[0] operator[SEP] operator[+] identifier[fingerprint] operator[SEP] identifier[contentType] operator[SEP] operator[SEP] } Keyword[return] identifier[fp] operator[&] literal[Integer] operator[SEP] }
public void executeJob() { AbstractApplicationContext springContext = SpringContext.getContext(springConfigurationClass); CinchJob cinchJob = springContext.getBean(CinchJob.class); cinchJob.execute(this); }
class class_name[name] begin[{] method[executeJob, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[AbstractApplicationContext], springContext] local_variable[type[CinchJob], cinchJob] call[cinchJob.execute, parameter[THIS[]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[executeJob] operator[SEP] operator[SEP] { identifier[AbstractApplicationContext] identifier[springContext] operator[=] identifier[SpringContext] operator[SEP] identifier[getContext] operator[SEP] identifier[springConfigurationClass] operator[SEP] operator[SEP] identifier[CinchJob] identifier[cinchJob] operator[=] identifier[springContext] operator[SEP] identifier[getBean] operator[SEP] identifier[CinchJob] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[cinchJob] operator[SEP] identifier[execute] operator[SEP] Keyword[this] operator[SEP] operator[SEP] }
public static FieldAnnotation isRead(Instruction ins, ConstantPoolGen cpg) { if (ins instanceof GETFIELD || ins instanceof GETSTATIC) { FieldInstruction fins = (FieldInstruction) ins; String className = fins.getClassName(cpg); return new FieldAnnotation(className, fins.getName(cpg), fins.getSignature(cpg), fins instanceof GETSTATIC); } else { return null; } }
class class_name[name] begin[{] method[isRead, return_type[type[FieldAnnotation]], modifier[public static], parameter[ins, cpg]] begin[{] if[binary_operation[binary_operation[member[.ins], instanceof, type[GETFIELD]], ||, binary_operation[member[.ins], instanceof, type[GETSTATIC]]]] begin[{] local_variable[type[FieldInstruction], fins] local_variable[type[String], className] return[ClassCreator(arguments=[MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=cpg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getName, postfix_operators=[], prefix_operators=[], qualifier=fins, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=cpg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getSignature, postfix_operators=[], prefix_operators=[], qualifier=fins, selectors=[], type_arguments=None), BinaryOperation(operandl=MemberReference(member=fins, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=GETSTATIC, sub_type=None), operator=instanceof)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FieldAnnotation, sub_type=None))] else begin[{] return[literal[null]] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[FieldAnnotation] identifier[isRead] operator[SEP] identifier[Instruction] identifier[ins] , identifier[ConstantPoolGen] identifier[cpg] operator[SEP] { Keyword[if] operator[SEP] identifier[ins] Keyword[instanceof] identifier[GETFIELD] operator[||] identifier[ins] Keyword[instanceof] identifier[GETSTATIC] operator[SEP] { identifier[FieldInstruction] identifier[fins] operator[=] operator[SEP] identifier[FieldInstruction] operator[SEP] identifier[ins] operator[SEP] identifier[String] identifier[className] operator[=] identifier[fins] operator[SEP] identifier[getClassName] operator[SEP] identifier[cpg] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[FieldAnnotation] operator[SEP] identifier[className] , identifier[fins] operator[SEP] identifier[getName] operator[SEP] identifier[cpg] operator[SEP] , identifier[fins] operator[SEP] identifier[getSignature] operator[SEP] identifier[cpg] operator[SEP] , identifier[fins] Keyword[instanceof] identifier[GETSTATIC] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Other[null] operator[SEP] } }
public ApiResponse<ApiSuccessResponse> attachMediaUserDataWithHttpInfo(String mediatype, String id, UserDataOperationId userData) throws ApiException { com.squareup.okhttp.Call call = attachMediaUserDataValidateBeforeCall(mediatype, id, userData, null, null); Type localVarReturnType = new TypeToken<ApiSuccessResponse>(){}.getType(); return apiClient.execute(call, localVarReturnType); }
class class_name[name] begin[{] method[attachMediaUserDataWithHttpInfo, return_type[type[ApiResponse]], modifier[public], parameter[mediatype, id, userData]] begin[{] local_variable[type[com], call] local_variable[type[Type], localVarReturnType] return[call[apiClient.execute, parameter[member[.call], member[.localVarReturnType]]]] end[}] END[}]
Keyword[public] identifier[ApiResponse] operator[<] identifier[ApiSuccessResponse] operator[>] identifier[attachMediaUserDataWithHttpInfo] operator[SEP] identifier[String] identifier[mediatype] , identifier[String] identifier[id] , identifier[UserDataOperationId] identifier[userData] operator[SEP] Keyword[throws] identifier[ApiException] { identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Call] identifier[call] operator[=] identifier[attachMediaUserDataValidateBeforeCall] operator[SEP] identifier[mediatype] , identifier[id] , identifier[userData] , Other[null] , Other[null] operator[SEP] operator[SEP] identifier[Type] identifier[localVarReturnType] operator[=] Keyword[new] identifier[TypeToken] operator[<] identifier[ApiSuccessResponse] operator[>] operator[SEP] operator[SEP] { } operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[apiClient] operator[SEP] identifier[execute] operator[SEP] identifier[call] , identifier[localVarReturnType] operator[SEP] operator[SEP] }
private void replaceImpl(final int startIndex, final int endIndex, final int removeLen, final String insertStr, final int insertLen) { final int newSize = size - removeLen + insertLen; if (insertLen != removeLen) { ensureCapacity(newSize); System.arraycopy(buffer, endIndex, buffer, startIndex + insertLen, size - endIndex); size = newSize; } if (insertLen > 0) { insertStr.getChars(0, insertLen, buffer, startIndex); } }
class class_name[name] begin[{] method[replaceImpl, return_type[void], modifier[private], parameter[startIndex, endIndex, removeLen, insertStr, insertLen]] begin[{] local_variable[type[int], newSize] if[binary_operation[member[.insertLen], !=, member[.removeLen]]] begin[{] call[.ensureCapacity, parameter[member[.newSize]]] call[System.arraycopy, parameter[member[.buffer], member[.endIndex], member[.buffer], binary_operation[member[.startIndex], +, member[.insertLen]], binary_operation[member[.size], -, member[.endIndex]]]] assign[member[.size], member[.newSize]] else begin[{] None end[}] if[binary_operation[member[.insertLen], >, literal[0]]] begin[{] call[insertStr.getChars, parameter[literal[0], member[.insertLen], member[.buffer], member[.startIndex]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[replaceImpl] operator[SEP] Keyword[final] Keyword[int] identifier[startIndex] , Keyword[final] Keyword[int] identifier[endIndex] , Keyword[final] Keyword[int] identifier[removeLen] , Keyword[final] identifier[String] identifier[insertStr] , Keyword[final] Keyword[int] identifier[insertLen] operator[SEP] { Keyword[final] Keyword[int] identifier[newSize] operator[=] identifier[size] operator[-] identifier[removeLen] operator[+] identifier[insertLen] operator[SEP] Keyword[if] operator[SEP] identifier[insertLen] operator[!=] identifier[removeLen] operator[SEP] { identifier[ensureCapacity] operator[SEP] identifier[newSize] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[buffer] , identifier[endIndex] , identifier[buffer] , identifier[startIndex] operator[+] identifier[insertLen] , identifier[size] operator[-] identifier[endIndex] operator[SEP] operator[SEP] identifier[size] operator[=] identifier[newSize] operator[SEP] } Keyword[if] operator[SEP] identifier[insertLen] operator[>] Other[0] operator[SEP] { identifier[insertStr] operator[SEP] identifier[getChars] operator[SEP] Other[0] , identifier[insertLen] , identifier[buffer] , identifier[startIndex] operator[SEP] operator[SEP] } }
@Override public CommerceNotificationAttachment fetchByCommerceNotificationQueueEntryId_Last( long commerceNotificationQueueEntryId, OrderByComparator<CommerceNotificationAttachment> orderByComparator) { int count = countByCommerceNotificationQueueEntryId(commerceNotificationQueueEntryId); if (count == 0) { return null; } List<CommerceNotificationAttachment> list = findByCommerceNotificationQueueEntryId(commerceNotificationQueueEntryId, count - 1, count, orderByComparator); if (!list.isEmpty()) { return list.get(0); } return null; }
class class_name[name] begin[{] method[fetchByCommerceNotificationQueueEntryId_Last, return_type[type[CommerceNotificationAttachment]], modifier[public], parameter[commerceNotificationQueueEntryId, orderByComparator]] begin[{] local_variable[type[int], count] if[binary_operation[member[.count], ==, literal[0]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[List], list] if[call[list.isEmpty, parameter[]]] begin[{] return[call[list.get, parameter[literal[0]]]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CommerceNotificationAttachment] identifier[fetchByCommerceNotificationQueueEntryId_Last] operator[SEP] Keyword[long] identifier[commerceNotificationQueueEntryId] , identifier[OrderByComparator] operator[<] identifier[CommerceNotificationAttachment] operator[>] identifier[orderByComparator] operator[SEP] { Keyword[int] identifier[count] operator[=] identifier[countByCommerceNotificationQueueEntryId] operator[SEP] identifier[commerceNotificationQueueEntryId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[count] operator[==] Other[0] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[List] operator[<] identifier[CommerceNotificationAttachment] operator[>] identifier[list] operator[=] identifier[findByCommerceNotificationQueueEntryId] operator[SEP] identifier[commerceNotificationQueueEntryId] , identifier[count] operator[-] Other[1] , identifier[count] , identifier[orderByComparator] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[list] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[list] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public byte[] toByteArray() { byte[] data = new byte[getSize()]; int off = 0; for (MessageBuffer buffer : list) { buffer.getBytes(0, data, off, buffer.size()); off += buffer.size(); } return data; }
class class_name[name] begin[{] method[toByteArray, return_type[type[byte]], modifier[public], parameter[]] begin[{] local_variable[type[byte], data] local_variable[type[int], off] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=off, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=buffer, selectors=[], type_arguments=None)], member=getBytes, postfix_operators=[], prefix_operators=[], qualifier=buffer, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=off, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=buffer, selectors=[], type_arguments=None)), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=buffer)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MessageBuffer, sub_type=None))), label=None) return[member[.data]] end[}] END[}]
Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[data] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[getSize] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[off] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[MessageBuffer] identifier[buffer] operator[:] identifier[list] operator[SEP] { identifier[buffer] operator[SEP] identifier[getBytes] operator[SEP] Other[0] , identifier[data] , identifier[off] , identifier[buffer] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[off] operator[+=] identifier[buffer] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[data] operator[SEP] }
public FlightInfoExtendedBuilder setArrivalAirport(String airportCode, String city, String gate, String terminal) { Airport arrivalAirport = new Airport(airportCode, city, gate, terminal); this.flightInfo.setArrivalAirport(arrivalAirport); return this; }
class class_name[name] begin[{] method[setArrivalAirport, return_type[type[FlightInfoExtendedBuilder]], modifier[public], parameter[airportCode, city, gate, terminal]] begin[{] local_variable[type[Airport], arrivalAirport] THIS[member[None.flightInfo]call[None.setArrivalAirport, parameter[member[.arrivalAirport]]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[FlightInfoExtendedBuilder] identifier[setArrivalAirport] operator[SEP] identifier[String] identifier[airportCode] , identifier[String] identifier[city] , identifier[String] identifier[gate] , identifier[String] identifier[terminal] operator[SEP] { identifier[Airport] identifier[arrivalAirport] operator[=] Keyword[new] identifier[Airport] operator[SEP] identifier[airportCode] , identifier[city] , identifier[gate] , identifier[terminal] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[flightInfo] operator[SEP] identifier[setArrivalAirport] operator[SEP] identifier[arrivalAirport] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
@Override public int checkAbleToAcceptMessage(JsDestinationAddress routingDestinationAddr) throws SIException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "checkAbleToAcceptMessage", routingDestinationAddr); // Anything that isn't a link is let through as we would expect WLM to prevent // incoming messages once we're blocked (give or take a little latency) // Set the reason to OUTPUT_HANDLER_FOUND int blockingReason = DestinationHandler.OUTPUT_HANDLER_FOUND; //first we try to check if there is room on the actual destination //at the end of the link if (_isLink) { blockingReason = DestinationHandler.OUTPUT_HANDLER_NOT_FOUND; if (routingDestinationAddr != null) { String destName = routingDestinationAddr.getDestinationName(); //always allow system or temporary destinations through if (destName.startsWith(SIMPConstants.TEMPORARY_QUEUE_DESTINATION_PREFIX) || destName.startsWith(SIMPConstants.TEMPORARY_PUBSUB_DESTINATION_PREFIX) || destName.startsWith(SIMPConstants.SYSTEM_DESTINATION_PREFIX)) { blockingReason = DestinationHandler.OUTPUT_HANDLER_FOUND; } //we need to look at the routing (target) destination first, to see if it's blocked else { boolean checkedTarget = false; try { // Can the routing destination or its exception destination accept a message blockingReason = checkTargetAbleToAcceptOrExceptionMessage(routingDestinationAddr); // We've checked the target and have a return code checkedTarget = true; } catch (SIMPNotPossibleInCurrentConfigurationException e) { // No FFDC code needed // There's a problem with the configuration of the target destination - so set checkedTarget to // true, retain the OUTPUT_HANDLER_NOT_FOUND return code and continue processing. If we find that // the link exception destination is also unable to accept the message then we want to report // the target blocking reason rather than the link blocking reason, which may be different. checkedTarget = true; // Log the exception if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.exception(tc, e); } catch (SIException e) { FFDCFilter.processException( e, "com.ibm.ws.sib.processor.impl.PtoPInputHandler.checkAbleToAcceptMessage", "1:3527:1.323", this); //There are many reasons why this destination lookup might have failed //e.g. destination is not local. Therefore we log this exception and //continue processing. if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { SibTr.exception(tc, e); } } // If we are not able to put messages to the target or its exception destination then // we want to go on & see if we can put to the link's exception destination. Once more, // the intent is to keep the link open for as long as possible if (blockingReason != DestinationHandler.OUTPUT_HANDLER_FOUND) { int linkBlockingReason = checkLinkAbleToExceptionMessage(); // If we can exception the message then reset the blockingReason return code if (linkBlockingReason == DestinationHandler.OUTPUT_HANDLER_FOUND) blockingReason = DestinationHandler.OUTPUT_HANDLER_FOUND; // If we didn't get a reason code from checking the target or its exception destination // then use the link's. else if (!checkedTarget) blockingReason = linkBlockingReason; } // If the link is blocked we keep track of the target destination because it is // responsible for blocking the link. We'll use this to support the freeing up of the // link at a later stage. if (blockingReason != DestinationHandler.OUTPUT_HANDLER_FOUND) { _linkBlockingDestination = routingDestinationAddr; } } // eof else if (! system | temp) } // end null routing addr } // eof _isLink if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "checkAbleToAcceptMessage", Integer.valueOf(blockingReason)); return blockingReason; }
class class_name[name] begin[{] method[checkAbleToAcceptMessage, return_type[type[int]], modifier[public], parameter[routingDestinationAddr]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["checkAbleToAcceptMessage"], member[.routingDestinationAddr]]] else begin[{] None end[}] local_variable[type[int], blockingReason] if[member[._isLink]] begin[{] assign[member[.blockingReason], member[DestinationHandler.OUTPUT_HANDLER_NOT_FOUND]] if[binary_operation[member[.routingDestinationAddr], !=, literal[null]]] begin[{] local_variable[type[String], destName] if[binary_operation[binary_operation[call[destName.startsWith, parameter[member[SIMPConstants.TEMPORARY_QUEUE_DESTINATION_PREFIX]]], ||, call[destName.startsWith, parameter[member[SIMPConstants.TEMPORARY_PUBSUB_DESTINATION_PREFIX]]]], ||, call[destName.startsWith, parameter[member[SIMPConstants.SYSTEM_DESTINATION_PREFIX]]]]] begin[{] assign[member[.blockingReason], member[DestinationHandler.OUTPUT_HANDLER_FOUND]] else begin[{] local_variable[type[boolean], checkedTarget] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=blockingReason, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=routingDestinationAddr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkTargetAbleToAcceptOrExceptionMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=checkedTarget, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=checkedTarget, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=exception, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SIMPNotPossibleInCurrentConfigurationException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ws.sib.processor.impl.PtoPInputHandler.checkAbleToAcceptMessage"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1:3527:1.323"), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=exception, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SIException']))], finally_block=None, label=None, resources=None) if[binary_operation[member[.blockingReason], !=, member[DestinationHandler.OUTPUT_HANDLER_FOUND]]] begin[{] local_variable[type[int], linkBlockingReason] if[binary_operation[member[.linkBlockingReason], ==, member[DestinationHandler.OUTPUT_HANDLER_FOUND]]] begin[{] assign[member[.blockingReason], member[DestinationHandler.OUTPUT_HANDLER_FOUND]] else begin[{] if[member[.checkedTarget]] begin[{] assign[member[.blockingReason], member[.linkBlockingReason]] else begin[{] None end[}] end[}] else begin[{] None end[}] if[binary_operation[member[.blockingReason], !=, member[DestinationHandler.OUTPUT_HANDLER_FOUND]]] begin[{] assign[member[._linkBlockingDestination], member[.routingDestinationAddr]] else begin[{] None end[}] end[}] else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["checkAbleToAcceptMessage"], call[Integer.valueOf, parameter[member[.blockingReason]]]]] else begin[{] None end[}] return[member[.blockingReason]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[checkAbleToAcceptMessage] operator[SEP] identifier[JsDestinationAddress] identifier[routingDestinationAddr] operator[SEP] Keyword[throws] identifier[SIException] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] , identifier[routingDestinationAddr] operator[SEP] operator[SEP] Keyword[int] identifier[blockingReason] operator[=] identifier[DestinationHandler] operator[SEP] identifier[OUTPUT_HANDLER_FOUND] operator[SEP] Keyword[if] operator[SEP] identifier[_isLink] operator[SEP] { identifier[blockingReason] operator[=] identifier[DestinationHandler] operator[SEP] identifier[OUTPUT_HANDLER_NOT_FOUND] operator[SEP] Keyword[if] operator[SEP] identifier[routingDestinationAddr] operator[!=] Other[null] operator[SEP] { identifier[String] identifier[destName] operator[=] identifier[routingDestinationAddr] operator[SEP] identifier[getDestinationName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[destName] operator[SEP] identifier[startsWith] operator[SEP] identifier[SIMPConstants] operator[SEP] identifier[TEMPORARY_QUEUE_DESTINATION_PREFIX] operator[SEP] operator[||] identifier[destName] operator[SEP] identifier[startsWith] operator[SEP] identifier[SIMPConstants] operator[SEP] identifier[TEMPORARY_PUBSUB_DESTINATION_PREFIX] operator[SEP] operator[||] identifier[destName] operator[SEP] identifier[startsWith] operator[SEP] identifier[SIMPConstants] operator[SEP] identifier[SYSTEM_DESTINATION_PREFIX] operator[SEP] operator[SEP] { identifier[blockingReason] operator[=] identifier[DestinationHandler] operator[SEP] identifier[OUTPUT_HANDLER_FOUND] operator[SEP] } Keyword[else] { Keyword[boolean] identifier[checkedTarget] operator[=] literal[boolean] operator[SEP] Keyword[try] { identifier[blockingReason] operator[=] identifier[checkTargetAbleToAcceptOrExceptionMessage] operator[SEP] identifier[routingDestinationAddr] operator[SEP] operator[SEP] identifier[checkedTarget] operator[=] literal[boolean] operator[SEP] } Keyword[catch] operator[SEP] identifier[SIMPNotPossibleInCurrentConfigurationException] identifier[e] operator[SEP] { identifier[checkedTarget] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exception] operator[SEP] identifier[tc] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SIException] identifier[e] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[e] , literal[String] , literal[String] , Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[SibTr] operator[SEP] identifier[exception] operator[SEP] identifier[tc] , identifier[e] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[blockingReason] operator[!=] identifier[DestinationHandler] operator[SEP] identifier[OUTPUT_HANDLER_FOUND] operator[SEP] { Keyword[int] identifier[linkBlockingReason] operator[=] identifier[checkLinkAbleToExceptionMessage] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[linkBlockingReason] operator[==] identifier[DestinationHandler] operator[SEP] identifier[OUTPUT_HANDLER_FOUND] operator[SEP] identifier[blockingReason] operator[=] identifier[DestinationHandler] operator[SEP] identifier[OUTPUT_HANDLER_FOUND] operator[SEP] Keyword[else] Keyword[if] operator[SEP] operator[!] identifier[checkedTarget] operator[SEP] identifier[blockingReason] operator[=] identifier[linkBlockingReason] operator[SEP] } Keyword[if] operator[SEP] identifier[blockingReason] operator[!=] identifier[DestinationHandler] operator[SEP] identifier[OUTPUT_HANDLER_FOUND] operator[SEP] { identifier[_linkBlockingDestination] operator[=] identifier[routingDestinationAddr] operator[SEP] } } } } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[blockingReason] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[blockingReason] operator[SEP] }
private boolean checkMisroutedIv2IntiateTaskMessage(Iv2InitiateTaskMessage message) { if (message.isForReplica()) { return false; } if (m_scheduler.isLeader() && m_migratePartitionLeaderStatus != MigratePartitionLeaderStatus.TXN_RESTART) { //At this point, the message is sent to partition leader return false; } //At this point, the message is misrouted. //(1) If a site has been demoted via @MigratePartitionLeader, the messages which are sent to the leader will be restarted. //(2) If a site becomes new leader via @MigratePartitionLeader. Transactions will be restarted before it gets notification from old // leader that transactions on older leader have been drained. InitiateResponseMessage response = new InitiateResponseMessage(message); response.setMisrouted(message.getStoredProcedureInvocation()); response.m_sourceHSId = getHSId(); deliver(response); if (tmLog.isDebugEnabled()) { tmLog.debug("Sending message back on:" + CoreUtils.hsIdToString(m_hsId) + " isLeader:" + m_scheduler.isLeader() + " status:" + m_migratePartitionLeaderStatus + "\n" + message); } //notify the new partition leader that the old leader has completed the Txns if needed. notifyNewLeaderOfTxnDoneIfNeeded(); return true; }
class class_name[name] begin[{] method[checkMisroutedIv2IntiateTaskMessage, return_type[type[boolean]], modifier[private], parameter[message]] begin[{] if[call[message.isForReplica, parameter[]]] begin[{] return[literal[false]] else begin[{] None end[}] if[binary_operation[call[m_scheduler.isLeader, parameter[]], &&, binary_operation[member[.m_migratePartitionLeaderStatus], !=, member[MigratePartitionLeaderStatus.TXN_RESTART]]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[InitiateResponseMessage], response] call[response.setMisrouted, parameter[call[message.getStoredProcedureInvocation, parameter[]]]] assign[member[response.m_sourceHSId], call[.getHSId, parameter[]]] call[.deliver, parameter[member[.response]]] if[call[tmLog.isDebugEnabled, parameter[]]] begin[{] call[tmLog.debug, parameter[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["Sending message back on:"], +, call[CoreUtils.hsIdToString, parameter[member[.m_hsId]]]], +, literal[" isLeader:"]], +, call[m_scheduler.isLeader, parameter[]]], +, literal[" status:"]], +, member[.m_migratePartitionLeaderStatus]], +, literal["\n"]], +, member[.message]]]] else begin[{] None end[}] call[.notifyNewLeaderOfTxnDoneIfNeeded, parameter[]] return[literal[true]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[checkMisroutedIv2IntiateTaskMessage] operator[SEP] identifier[Iv2InitiateTaskMessage] identifier[message] operator[SEP] { Keyword[if] operator[SEP] identifier[message] operator[SEP] identifier[isForReplica] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[m_scheduler] operator[SEP] identifier[isLeader] operator[SEP] operator[SEP] operator[&&] identifier[m_migratePartitionLeaderStatus] operator[!=] identifier[MigratePartitionLeaderStatus] operator[SEP] identifier[TXN_RESTART] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[InitiateResponseMessage] identifier[response] operator[=] Keyword[new] identifier[InitiateResponseMessage] operator[SEP] identifier[message] operator[SEP] operator[SEP] identifier[response] operator[SEP] identifier[setMisrouted] operator[SEP] identifier[message] operator[SEP] identifier[getStoredProcedureInvocation] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[response] operator[SEP] identifier[m_sourceHSId] operator[=] identifier[getHSId] operator[SEP] operator[SEP] operator[SEP] identifier[deliver] operator[SEP] identifier[response] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tmLog] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[tmLog] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[CoreUtils] operator[SEP] identifier[hsIdToString] operator[SEP] identifier[m_hsId] operator[SEP] operator[+] literal[String] operator[+] identifier[m_scheduler] operator[SEP] identifier[isLeader] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[m_migratePartitionLeaderStatus] operator[+] literal[String] operator[+] identifier[message] operator[SEP] operator[SEP] } identifier[notifyNewLeaderOfTxnDoneIfNeeded] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
public Collection<String> getServerFeaturesToInstall(Set<ServerAsset> servers, boolean offlineOnly) throws InstallException, IOException { Set<String> features = new TreeSet<String>(); Set<String> serverNames = new HashSet<String>(servers.size()); Set<String> allServerNames = new HashSet<String>(servers.size()); for (ServerAsset sa : servers) { Collection<String> requiredFeatures = sa.getRequiredFeatures(); if (!requiredFeatures.isEmpty()) { logger.log(Level.FINEST, Messages.INSTALL_KERNEL_MESSAGES.getLogMessage("LOG_DEPLOY_SERVER_FEATURES", sa.getServerName(), InstallUtils.getFeatureListOutput(requiredFeatures))); features.addAll(requiredFeatures); serverNames.add(sa.getServerName()); } allServerNames.add(sa.getServerName()); } Collection<String> featuresToInstall = getFeaturesToInstall(features, offlineOnly); if (!featuresToInstall.isEmpty()) { logger.log(Level.FINE, Messages.INSTALL_KERNEL_MESSAGES.getLogMessage("LOG_DEPLOY_ADDITIONAL_FEATURES_REQUIRED", serverNames, featuresToInstall)); } else { logger.log(Level.FINE, Messages.INSTALL_KERNEL_MESSAGES.getLogMessage("LOG_DEPLOY_NO_ADDITIONAL_FEATURES_REQUIRED", allServerNames)); } return featuresToInstall; }
class class_name[name] begin[{] method[getServerFeaturesToInstall, return_type[type[Collection]], modifier[public], parameter[servers, offlineOnly]] begin[{] local_variable[type[Set], features] local_variable[type[Set], serverNames] local_variable[type[Set], allServerNames] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getRequiredFeatures, postfix_operators=[], prefix_operators=[], qualifier=sa, selectors=[], type_arguments=None), name=requiredFeatures)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=Collection, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=requiredFeatures, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FINEST, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[]), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="LOG_DEPLOY_SERVER_FEATURES"), MethodInvocation(arguments=[], member=getServerName, postfix_operators=[], prefix_operators=[], qualifier=sa, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=requiredFeatures, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getFeatureListOutput, postfix_operators=[], prefix_operators=[], qualifier=InstallUtils, selectors=[], type_arguments=None)], member=getLogMessage, postfix_operators=[], prefix_operators=[], qualifier=Messages.INSTALL_KERNEL_MESSAGES, selectors=[], type_arguments=None)], member=log, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=requiredFeatures, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=features, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getServerName, postfix_operators=[], prefix_operators=[], qualifier=sa, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=serverNames, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getServerName, postfix_operators=[], prefix_operators=[], qualifier=sa, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=allServerNames, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=servers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=sa)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ServerAsset, sub_type=None))), label=None) local_variable[type[Collection], featuresToInstall] if[call[featuresToInstall.isEmpty, parameter[]]] begin[{] call[logger.log, parameter[member[Level.FINE], call[Messages.INSTALL_KERNEL_MESSAGES.getLogMessage, parameter[literal["LOG_DEPLOY_ADDITIONAL_FEATURES_REQUIRED"], member[.serverNames], member[.featuresToInstall]]]]] else begin[{] call[logger.log, parameter[member[Level.FINE], call[Messages.INSTALL_KERNEL_MESSAGES.getLogMessage, parameter[literal["LOG_DEPLOY_NO_ADDITIONAL_FEATURES_REQUIRED"], member[.allServerNames]]]]] end[}] return[member[.featuresToInstall]] end[}] END[}]
Keyword[public] identifier[Collection] operator[<] identifier[String] operator[>] identifier[getServerFeaturesToInstall] operator[SEP] identifier[Set] operator[<] identifier[ServerAsset] operator[>] identifier[servers] , Keyword[boolean] identifier[offlineOnly] operator[SEP] Keyword[throws] identifier[InstallException] , identifier[IOException] { identifier[Set] operator[<] identifier[String] operator[>] identifier[features] operator[=] Keyword[new] identifier[TreeSet] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[serverNames] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[String] operator[>] operator[SEP] identifier[servers] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[allServerNames] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[String] operator[>] operator[SEP] identifier[servers] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ServerAsset] identifier[sa] operator[:] identifier[servers] operator[SEP] { identifier[Collection] operator[<] identifier[String] operator[>] identifier[requiredFeatures] operator[=] identifier[sa] operator[SEP] identifier[getRequiredFeatures] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[requiredFeatures] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[FINEST] , identifier[Messages] operator[SEP] identifier[INSTALL_KERNEL_MESSAGES] operator[SEP] identifier[getLogMessage] operator[SEP] literal[String] , identifier[sa] operator[SEP] identifier[getServerName] operator[SEP] operator[SEP] , identifier[InstallUtils] operator[SEP] identifier[getFeatureListOutput] operator[SEP] identifier[requiredFeatures] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[features] operator[SEP] identifier[addAll] operator[SEP] identifier[requiredFeatures] operator[SEP] operator[SEP] identifier[serverNames] operator[SEP] identifier[add] operator[SEP] identifier[sa] operator[SEP] identifier[getServerName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[allServerNames] operator[SEP] identifier[add] operator[SEP] identifier[sa] operator[SEP] identifier[getServerName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[Collection] operator[<] identifier[String] operator[>] identifier[featuresToInstall] operator[=] identifier[getFeaturesToInstall] operator[SEP] identifier[features] , identifier[offlineOnly] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[featuresToInstall] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[FINE] , identifier[Messages] operator[SEP] identifier[INSTALL_KERNEL_MESSAGES] operator[SEP] identifier[getLogMessage] operator[SEP] literal[String] , identifier[serverNames] , identifier[featuresToInstall] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[logger] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[FINE] , identifier[Messages] operator[SEP] identifier[INSTALL_KERNEL_MESSAGES] operator[SEP] identifier[getLogMessage] operator[SEP] literal[String] , identifier[allServerNames] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[featuresToInstall] operator[SEP] }
public List<DateGroup> parseSyntax(String language) { language = words2numbers(language); List<DateGroup> result = new ArrayList<DateGroup>(); List<com.joestelmach.natty.DateGroup> groups = parser.parse(language); Date now = new Date(); for (com.joestelmach.natty.DateGroup group : groups) { result.add(new DateGroupImpl(now, group)); } return result; }
class class_name[name] begin[{] method[parseSyntax, return_type[type[List]], modifier[public], parameter[language]] begin[{] assign[member[.language], call[.words2numbers, parameter[member[.language]]]] local_variable[type[List], result] local_variable[type[List], groups] local_variable[type[Date], now] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=now, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=group, 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=DateGroupImpl, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=groups, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=group)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=joestelmach, sub_type=ReferenceType(arguments=None, dimensions=None, name=natty, sub_type=ReferenceType(arguments=None, dimensions=None, name=DateGroup, sub_type=None)))))), label=None) return[member[.result]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[DateGroup] operator[>] identifier[parseSyntax] operator[SEP] identifier[String] identifier[language] operator[SEP] { identifier[language] operator[=] identifier[words2numbers] operator[SEP] identifier[language] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[DateGroup] operator[>] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[DateGroup] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[com] operator[SEP] identifier[joestelmach] operator[SEP] identifier[natty] operator[SEP] identifier[DateGroup] operator[>] identifier[groups] operator[=] identifier[parser] operator[SEP] identifier[parse] operator[SEP] identifier[language] operator[SEP] operator[SEP] identifier[Date] identifier[now] operator[=] Keyword[new] identifier[Date] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[com] operator[SEP] identifier[joestelmach] operator[SEP] identifier[natty] operator[SEP] identifier[DateGroup] identifier[group] operator[:] identifier[groups] operator[SEP] { identifier[result] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[DateGroupImpl] operator[SEP] identifier[now] , identifier[group] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public final List<OSProcess> getChildren() { List<OSProcess> r = new ArrayList<OSProcess>(); for (OSProcess p : ProcessTree.this) if(p.getParent()==this) r.add(p); return r; }
class class_name[name] begin[{] method[getChildren, return_type[type[List]], modifier[final public], parameter[]] begin[{] local_variable[type[List], r] ForStatement(body=IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getParent, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), operator===), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=r, selectors=[], type_arguments=None), label=None)), control=EnhancedForControl(iterable=This(postfix_operators=[], prefix_operators=[], qualifier=ProcessTree, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=p)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=OSProcess, sub_type=None))), label=None) return[member[.r]] end[}] END[}]
Keyword[public] Keyword[final] identifier[List] operator[<] identifier[OSProcess] operator[>] identifier[getChildren] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[OSProcess] operator[>] identifier[r] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[OSProcess] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[OSProcess] identifier[p] operator[:] identifier[ProcessTree] operator[SEP] Keyword[this] operator[SEP] Keyword[if] operator[SEP] identifier[p] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[==] Keyword[this] operator[SEP] identifier[r] operator[SEP] identifier[add] operator[SEP] identifier[p] operator[SEP] operator[SEP] Keyword[return] identifier[r] operator[SEP] }
public ArrayList<String> serviceName_database_databaseName_extension_GET(String serviceName, String databaseName, String extensionName, OvhStatus status) throws IOException { String qPath = "/hosting/privateDatabase/{serviceName}/database/{databaseName}/extension"; StringBuilder sb = path(qPath, serviceName, databaseName); query(sb, "extensionName", extensionName); query(sb, "status", status); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, t1); }
class class_name[name] begin[{] method[serviceName_database_databaseName_extension_GET, return_type[type[ArrayList]], modifier[public], parameter[serviceName, databaseName, extensionName, status]] begin[{] local_variable[type[String], qPath] local_variable[type[StringBuilder], sb] call[.query, parameter[member[.sb], literal["extensionName"], member[.extensionName]]] call[.query, parameter[member[.sb], literal["status"], member[.status]]] local_variable[type[String], resp] return[call[.convertTo, parameter[member[.resp], member[.t1]]]] end[}] END[}]
Keyword[public] identifier[ArrayList] operator[<] identifier[String] operator[>] identifier[serviceName_database_databaseName_extension_GET] operator[SEP] identifier[String] identifier[serviceName] , identifier[String] identifier[databaseName] , identifier[String] identifier[extensionName] , identifier[OvhStatus] identifier[status] 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[databaseName] operator[SEP] operator[SEP] identifier[query] operator[SEP] identifier[sb] , literal[String] , identifier[extensionName] operator[SEP] operator[SEP] identifier[query] operator[SEP] identifier[sb] , literal[String] , identifier[status] 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[t1] operator[SEP] operator[SEP] }
public static String decodeBcd(byte[] data, int offset, int len) { StringBuilder result = new StringBuilder(); // loop through byte array until we get to the end or an F for (int i = offset; i < (offset + len); i++) { // get buffer StringBuilder x = new StringBuilder(encodeHex(data[i])); // reverse it x.reverse(); // add it to the data if (x.charAt(1) == 'F' || x.charAt(1) == 'f') { result.append(x.substring(0, 1)); } else { result.append(x.toString()); } } return result.toString(); }
class class_name[name] begin[{] method[decodeBcd, return_type[type[String]], modifier[public static], parameter[data, offset, len]] begin[{] local_variable[type[StringBuilder], result] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=encodeHex, 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=StringBuilder, sub_type=None)), name=x)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuilder, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=reverse, postfix_operators=[], prefix_operators=[], qualifier=x, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=x, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='F'), operator===), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=x, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='f'), operator===), operator=||), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=x, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=x, selectors=[], type_arguments=None)], member=append, 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=BinaryOperation(operandl=MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=offset, 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[call[result.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[decodeBcd] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[data] , Keyword[int] identifier[offset] , Keyword[int] identifier[len] operator[SEP] { identifier[StringBuilder] identifier[result] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[offset] operator[SEP] identifier[i] operator[<] operator[SEP] identifier[offset] operator[+] identifier[len] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[StringBuilder] identifier[x] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[encodeHex] operator[SEP] identifier[data] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[x] operator[SEP] identifier[reverse] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[x] operator[SEP] identifier[charAt] operator[SEP] Other[1] operator[SEP] operator[==] literal[String] operator[||] identifier[x] operator[SEP] identifier[charAt] operator[SEP] Other[1] operator[SEP] operator[==] literal[String] operator[SEP] { identifier[result] operator[SEP] identifier[append] operator[SEP] identifier[x] operator[SEP] identifier[substring] operator[SEP] Other[0] , Other[1] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[result] operator[SEP] identifier[append] operator[SEP] identifier[x] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[result] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public String getTreeSite(String type) { String result = m_treeSite.get(type); return result; }
class class_name[name] begin[{] method[getTreeSite, return_type[type[String]], modifier[public], parameter[type]] begin[{] local_variable[type[String], result] return[member[.result]] end[}] END[}]
Keyword[public] identifier[String] identifier[getTreeSite] operator[SEP] identifier[String] identifier[type] operator[SEP] { identifier[String] identifier[result] operator[=] identifier[m_treeSite] operator[SEP] identifier[get] operator[SEP] identifier[type] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
public static Observable<String> getPathFromUriForImageDocument(final Context context, final String mediaDocumentId) { return Observable.fromCallable(new Func0<String>() { @Override public String call() { String pathFound = null; Cursor cursor = context.getContentResolver() .query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, null, Constants.ID_COLUMN_VALUE + " =?", new String[] { mediaDocumentId }, null); if (cursor != null) { if (cursor.moveToFirst()) { pathFound = cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.MediaColumns.DATA)); } cursor.close(); logDebug("Path found:" + pathFound); } return pathFound; } }); }
class class_name[name] begin[{] method[getPathFromUriForImageDocument, return_type[type[Observable]], modifier[public static], parameter[context, mediaDocumentId]] begin[{] return[call[Observable.fromCallable, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=pathFound)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getContentResolver, postfix_operators=[], prefix_operators=[], qualifier=context, selectors=[MethodInvocation(arguments=[MemberReference(member=EXTERNAL_CONTENT_URI, postfix_operators=[], prefix_operators=[], qualifier=MediaStore.Images.Media, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), BinaryOperation(operandl=MemberReference(member=ID_COLUMN_VALUE, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" =?"), operator=+), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=mediaDocumentId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=query, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=cursor)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Cursor, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=cursor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=moveToFirst, postfix_operators=[], prefix_operators=[], qualifier=cursor, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=pathFound, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=DATA, postfix_operators=[], prefix_operators=[], qualifier=MediaStore.MediaColumns, selectors=[])], member=getColumnIndexOrThrow, postfix_operators=[], prefix_operators=[], qualifier=cursor, selectors=[], type_arguments=None)], member=getString, postfix_operators=[], prefix_operators=[], qualifier=cursor, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=cursor, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Path found:"), operandr=MemberReference(member=pathFound, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=logDebug, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), ReturnStatement(expression=MemberReference(member=pathFound, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], documentation=None, modifiers={'public'}, name=call, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=String, 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=String, sub_type=None))], dimensions=None, name=Func0, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Observable] operator[<] identifier[String] operator[>] identifier[getPathFromUriForImageDocument] operator[SEP] Keyword[final] identifier[Context] identifier[context] , Keyword[final] identifier[String] identifier[mediaDocumentId] operator[SEP] { Keyword[return] identifier[Observable] operator[SEP] identifier[fromCallable] operator[SEP] Keyword[new] identifier[Func0] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[call] operator[SEP] operator[SEP] { identifier[String] identifier[pathFound] operator[=] Other[null] operator[SEP] identifier[Cursor] identifier[cursor] operator[=] identifier[context] operator[SEP] identifier[getContentResolver] operator[SEP] operator[SEP] operator[SEP] identifier[query] operator[SEP] identifier[MediaStore] operator[SEP] identifier[Images] operator[SEP] identifier[Media] operator[SEP] identifier[EXTERNAL_CONTENT_URI] , Other[null] , identifier[Constants] operator[SEP] identifier[ID_COLUMN_VALUE] operator[+] literal[String] , Keyword[new] identifier[String] operator[SEP] operator[SEP] { identifier[mediaDocumentId] } , Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cursor] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[cursor] operator[SEP] identifier[moveToFirst] operator[SEP] operator[SEP] operator[SEP] { identifier[pathFound] operator[=] identifier[cursor] operator[SEP] identifier[getString] operator[SEP] identifier[cursor] operator[SEP] identifier[getColumnIndexOrThrow] operator[SEP] identifier[MediaStore] operator[SEP] identifier[MediaColumns] operator[SEP] identifier[DATA] operator[SEP] operator[SEP] operator[SEP] } identifier[cursor] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[logDebug] operator[SEP] literal[String] operator[+] identifier[pathFound] operator[SEP] operator[SEP] } Keyword[return] identifier[pathFound] operator[SEP] } } operator[SEP] operator[SEP] }
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1) public void setCompoundDrawablesRelative (Drawable start, Drawable top, Drawable end, Drawable bottom){ if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) mInputView.setCompoundDrawablesRelative(start, top, end, bottom); else mInputView.setCompoundDrawables(start, top, end, bottom); }
class class_name[name] begin[{] method[setCompoundDrawablesRelative, return_type[void], modifier[public], parameter[start, top, end, bottom]] begin[{] if[binary_operation[member[Build.VERSION.SDK_INT], >=, member[Build.VERSION_CODES.JELLY_BEAN_MR1]]] begin[{] call[mInputView.setCompoundDrawablesRelative, parameter[member[.start], member[.top], member[.end], member[.bottom]]] else begin[{] call[mInputView.setCompoundDrawables, parameter[member[.start], member[.top], member[.end], member[.bottom]]] end[}] end[}] END[}]
annotation[@] identifier[TargetApi] operator[SEP] identifier[Build] operator[SEP] identifier[VERSION_CODES] operator[SEP] identifier[JELLY_BEAN_MR1] operator[SEP] Keyword[public] Keyword[void] identifier[setCompoundDrawablesRelative] operator[SEP] identifier[Drawable] identifier[start] , identifier[Drawable] identifier[top] , identifier[Drawable] identifier[end] , identifier[Drawable] identifier[bottom] operator[SEP] { Keyword[if] operator[SEP] identifier[Build] operator[SEP] identifier[VERSION] operator[SEP] identifier[SDK_INT] operator[>=] identifier[Build] operator[SEP] identifier[VERSION_CODES] operator[SEP] identifier[JELLY_BEAN_MR1] operator[SEP] identifier[mInputView] operator[SEP] identifier[setCompoundDrawablesRelative] operator[SEP] identifier[start] , identifier[top] , identifier[end] , identifier[bottom] operator[SEP] operator[SEP] Keyword[else] identifier[mInputView] operator[SEP] identifier[setCompoundDrawables] operator[SEP] identifier[start] , identifier[top] , identifier[end] , identifier[bottom] operator[SEP] operator[SEP] }
@Then("^a Mongo dataBase '(.+?)' contains a table '(.+?)' with values:") public void assertValuesOfTableMongo(String dataBase, String tableName, DataTable data) { commonspec.getMongoDBClient().connectToMongoDBDataBase(dataBase); ArrayList<DBObject> result = (ArrayList<DBObject>) commonspec.getMongoDBClient().readFromMongoDBCollection( tableName, data); DBObjectsAssert.assertThat(result).containedInMongoDBResult(data); }
class class_name[name] begin[{] method[assertValuesOfTableMongo, return_type[void], modifier[public], parameter[dataBase, tableName, data]] begin[{] call[commonspec.getMongoDBClient, parameter[]] local_variable[type[ArrayList], result] call[DBObjectsAssert.assertThat, parameter[member[.result]]] end[}] END[}]
annotation[@] identifier[Then] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[assertValuesOfTableMongo] operator[SEP] identifier[String] identifier[dataBase] , identifier[String] identifier[tableName] , identifier[DataTable] identifier[data] operator[SEP] { identifier[commonspec] operator[SEP] identifier[getMongoDBClient] operator[SEP] operator[SEP] operator[SEP] identifier[connectToMongoDBDataBase] operator[SEP] identifier[dataBase] operator[SEP] operator[SEP] identifier[ArrayList] operator[<] identifier[DBObject] operator[>] identifier[result] operator[=] operator[SEP] identifier[ArrayList] operator[<] identifier[DBObject] operator[>] operator[SEP] identifier[commonspec] operator[SEP] identifier[getMongoDBClient] operator[SEP] operator[SEP] operator[SEP] identifier[readFromMongoDBCollection] operator[SEP] identifier[tableName] , identifier[data] operator[SEP] operator[SEP] identifier[DBObjectsAssert] operator[SEP] identifier[assertThat] operator[SEP] identifier[result] operator[SEP] operator[SEP] identifier[containedInMongoDBResult] operator[SEP] identifier[data] operator[SEP] operator[SEP] }
private void processMarkdown(List<MarkdownDTO> markdownDTOs, int options, final Map<String, Attributes> attributesMap) throws MojoExecutionException { getLog().debug("Process Markdown"); getLog().debug("inputEncoding: '" + getInputEncoding() + "', outputEncoding: '" + getOutputEncoding() + "'"); //getLog().debug("parsingTimeout: " + getParsingTimeoutInMillis() + " ms"); getLog().debug("applyFiltering: " + applyFiltering); MutableDataHolder flexmarkOptions = PegdownOptionsAdapter.flexmarkOptions(options).toMutable(); ArrayList<Extension> extensions = new ArrayList<Extension>(); for (Extension extension : flexmarkOptions.get(Parser.EXTENSIONS)) { extensions.add(extension); } if (transformRelativeMarkdownLinks) { flexmarkOptions.set(PageGeneratorExtension.INPUT_FILE_EXTENSIONS, inputFileExtensions); extensions.add(PageGeneratorExtension.create()); } if (!attributesMap.isEmpty()) { flexmarkOptions.set(AttributesExtension.ATTRIBUTE_MAP, attributesMap); extensions.add(AttributesExtension.create()); } flexmarkOptions.set(Parser.EXTENSIONS, extensions); Parser parser = Parser.builder(flexmarkOptions).build(); HtmlRenderer renderer = HtmlRenderer.builder(flexmarkOptions).build(); for (MarkdownDTO dto : markdownDTOs) { getLog().debug("dto: " + dto); try { String headerHtml = ""; String footerHtml = ""; try { if (StringUtils.isNotEmpty(headerHtmlFile)) { headerHtml = FileUtils.readFileToString(new File(headerHtmlFile), getInputEncoding()); headerHtml = addTitleToHtmlFile(headerHtml, dto.title); headerHtml = replaceVariables(headerHtml, dto.substitutes); headerHtml = updateRelativePaths(headerHtml, dto.folderDepth); } if (StringUtils.isNotEmpty(footerHtmlFile)) { footerHtml = FileUtils.readFileToString(new File(footerHtmlFile), getInputEncoding()); footerHtml = replaceVariables(footerHtml, dto.substitutes); footerHtml = updateRelativePaths(footerHtml, dto.folderDepth); } } catch (FileNotFoundException e) { if (failIfFilesAreMissing) { throw e; } else { getLog().warn("header and/or footer file is missing."); headerHtml = ""; footerHtml = ""; } } catch (Exception e) { throw new MojoExecutionException("Error while processing header/footer: " + e.getMessage(), e); } String markdown = FileUtils.readFileToString(dto.markdownFile, getInputEncoding()); markdown = replaceVariables(markdown, dto.substitutes); // getLog().debug(markdown); String markdownAsHtml; Node document = parser.parse(markdown); markdownAsHtml = renderer.render(document); String data = headerHtml + markdownAsHtml + footerHtml; FileUtils.writeStringToFile(dto.htmlFile, data, getOutputEncoding()); } catch (MojoExecutionException e) { throw e; } catch (IOException e) { getLog().error("Error : " + e.getMessage(), e); throw new MojoExecutionException("Unable to write file " + e.getMessage(), e); } } }
class class_name[name] begin[{] method[processMarkdown, return_type[void], modifier[private], parameter[markdownDTOs, options, attributesMap]] begin[{] call[.getLog, parameter[]] call[.getLog, parameter[]] call[.getLog, parameter[]] local_variable[type[MutableDataHolder], flexmarkOptions] local_variable[type[ArrayList], extensions] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=extension, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=extensions, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=EXTENSIONS, postfix_operators=[], prefix_operators=[], qualifier=Parser, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=flexmarkOptions, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=extension)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Extension, sub_type=None))), label=None) if[member[.transformRelativeMarkdownLinks]] begin[{] call[flexmarkOptions.set, parameter[member[PageGeneratorExtension.INPUT_FILE_EXTENSIONS], member[.inputFileExtensions]]] call[extensions.add, parameter[call[PageGeneratorExtension.create, parameter[]]]] else begin[{] None end[}] if[call[attributesMap.isEmpty, parameter[]]] begin[{] call[flexmarkOptions.set, parameter[member[AttributesExtension.ATTRIBUTE_MAP], member[.attributesMap]]] call[extensions.add, parameter[call[AttributesExtension.create, parameter[]]]] else begin[{] None end[}] call[flexmarkOptions.set, parameter[member[Parser.EXTENSIONS], member[.extensions]]] local_variable[type[Parser], parser] local_variable[type[HtmlRenderer], renderer] 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="dto: "), operandr=MemberReference(member=dto, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), name=headerHtml)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), name=footerHtml)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=headerHtmlFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isNotEmpty, postfix_operators=[], prefix_operators=[], qualifier=StringUtils, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=headerHtml, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=headerHtmlFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None)), MethodInvocation(arguments=[], member=getInputEncoding, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=readFileToString, postfix_operators=[], prefix_operators=[], qualifier=FileUtils, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=headerHtml, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=headerHtml, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=title, postfix_operators=[], prefix_operators=[], qualifier=dto, selectors=[])], member=addTitleToHtmlFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=headerHtml, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=headerHtml, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=substitutes, postfix_operators=[], prefix_operators=[], qualifier=dto, selectors=[])], member=replaceVariables, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=headerHtml, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=headerHtml, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=folderDepth, postfix_operators=[], prefix_operators=[], qualifier=dto, selectors=[])], member=updateRelativePaths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=footerHtmlFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isNotEmpty, postfix_operators=[], prefix_operators=[], qualifier=StringUtils, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=footerHtml, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=footerHtmlFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None)), MethodInvocation(arguments=[], member=getInputEncoding, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=readFileToString, postfix_operators=[], prefix_operators=[], qualifier=FileUtils, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=footerHtml, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=footerHtml, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=substitutes, postfix_operators=[], prefix_operators=[], qualifier=dto, selectors=[])], member=replaceVariables, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=footerHtml, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=footerHtml, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=folderDepth, postfix_operators=[], prefix_operators=[], qualifier=dto, selectors=[])], member=updateRelativePaths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]))], catches=[CatchClause(block=[IfStatement(condition=MemberReference(member=failIfFilesAreMissing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getLog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="header and/or footer file is missing.")], member=warn, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=headerHtml, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=footerHtml, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['FileNotFoundException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error while processing header/footer: "), 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=MojoExecutionException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=markdownFile, postfix_operators=[], prefix_operators=[], qualifier=dto, selectors=[]), MethodInvocation(arguments=[], member=getInputEncoding, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=readFileToString, postfix_operators=[], prefix_operators=[], qualifier=FileUtils, selectors=[], type_arguments=None), name=markdown)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=markdown, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=markdown, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=substitutes, postfix_operators=[], prefix_operators=[], qualifier=dto, selectors=[])], member=replaceVariables, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=markdownAsHtml)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=markdown, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parse, postfix_operators=[], prefix_operators=[], qualifier=parser, selectors=[], type_arguments=None), name=document)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=markdownAsHtml, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=document, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=render, postfix_operators=[], prefix_operators=[], qualifier=renderer, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=headerHtml, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=markdownAsHtml, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=footerHtml, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), name=data)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=htmlFile, postfix_operators=[], prefix_operators=[], qualifier=dto, selectors=[]), MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getOutputEncoding, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=writeStringToFile, postfix_operators=[], prefix_operators=[], qualifier=FileUtils, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['MojoExecutionException'])), CatchClause(block=[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="Error : "), 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=[])], member=error, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to write file "), 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=MojoExecutionException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None)]), control=EnhancedForControl(iterable=MemberReference(member=markdownDTOs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=dto)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MarkdownDTO, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[processMarkdown] operator[SEP] identifier[List] operator[<] identifier[MarkdownDTO] operator[>] identifier[markdownDTOs] , Keyword[int] identifier[options] , Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Attributes] operator[>] identifier[attributesMap] operator[SEP] Keyword[throws] identifier[MojoExecutionException] { identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[getInputEncoding] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[getOutputEncoding] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[applyFiltering] operator[SEP] operator[SEP] identifier[MutableDataHolder] identifier[flexmarkOptions] operator[=] identifier[PegdownOptionsAdapter] operator[SEP] identifier[flexmarkOptions] operator[SEP] identifier[options] operator[SEP] operator[SEP] identifier[toMutable] operator[SEP] operator[SEP] operator[SEP] identifier[ArrayList] operator[<] identifier[Extension] operator[>] identifier[extensions] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Extension] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Extension] identifier[extension] operator[:] identifier[flexmarkOptions] operator[SEP] identifier[get] operator[SEP] identifier[Parser] operator[SEP] identifier[EXTENSIONS] operator[SEP] operator[SEP] { identifier[extensions] operator[SEP] identifier[add] operator[SEP] identifier[extension] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[transformRelativeMarkdownLinks] operator[SEP] { identifier[flexmarkOptions] operator[SEP] identifier[set] operator[SEP] identifier[PageGeneratorExtension] operator[SEP] identifier[INPUT_FILE_EXTENSIONS] , identifier[inputFileExtensions] operator[SEP] operator[SEP] identifier[extensions] operator[SEP] identifier[add] operator[SEP] identifier[PageGeneratorExtension] operator[SEP] identifier[create] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[attributesMap] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[flexmarkOptions] operator[SEP] identifier[set] operator[SEP] identifier[AttributesExtension] operator[SEP] identifier[ATTRIBUTE_MAP] , identifier[attributesMap] operator[SEP] operator[SEP] identifier[extensions] operator[SEP] identifier[add] operator[SEP] identifier[AttributesExtension] operator[SEP] identifier[create] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[flexmarkOptions] operator[SEP] identifier[set] operator[SEP] identifier[Parser] operator[SEP] identifier[EXTENSIONS] , identifier[extensions] operator[SEP] operator[SEP] identifier[Parser] identifier[parser] operator[=] identifier[Parser] operator[SEP] identifier[builder] operator[SEP] identifier[flexmarkOptions] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[HtmlRenderer] identifier[renderer] operator[=] identifier[HtmlRenderer] operator[SEP] identifier[builder] operator[SEP] identifier[flexmarkOptions] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[MarkdownDTO] identifier[dto] operator[:] identifier[markdownDTOs] operator[SEP] { identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[dto] operator[SEP] operator[SEP] Keyword[try] { identifier[String] identifier[headerHtml] operator[=] literal[String] operator[SEP] identifier[String] identifier[footerHtml] operator[=] literal[String] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isNotEmpty] operator[SEP] identifier[headerHtmlFile] operator[SEP] operator[SEP] { identifier[headerHtml] operator[=] identifier[FileUtils] operator[SEP] identifier[readFileToString] operator[SEP] Keyword[new] identifier[File] operator[SEP] identifier[headerHtmlFile] operator[SEP] , identifier[getInputEncoding] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[headerHtml] operator[=] identifier[addTitleToHtmlFile] operator[SEP] identifier[headerHtml] , identifier[dto] operator[SEP] identifier[title] operator[SEP] operator[SEP] identifier[headerHtml] operator[=] identifier[replaceVariables] operator[SEP] identifier[headerHtml] , identifier[dto] operator[SEP] identifier[substitutes] operator[SEP] operator[SEP] identifier[headerHtml] operator[=] identifier[updateRelativePaths] operator[SEP] identifier[headerHtml] , identifier[dto] operator[SEP] identifier[folderDepth] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isNotEmpty] operator[SEP] identifier[footerHtmlFile] operator[SEP] operator[SEP] { identifier[footerHtml] operator[=] identifier[FileUtils] operator[SEP] identifier[readFileToString] operator[SEP] Keyword[new] identifier[File] operator[SEP] identifier[footerHtmlFile] operator[SEP] , identifier[getInputEncoding] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[footerHtml] operator[=] identifier[replaceVariables] operator[SEP] identifier[footerHtml] , identifier[dto] operator[SEP] identifier[substitutes] operator[SEP] operator[SEP] identifier[footerHtml] operator[=] identifier[updateRelativePaths] operator[SEP] identifier[footerHtml] , identifier[dto] operator[SEP] identifier[folderDepth] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[FileNotFoundException] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[failIfFilesAreMissing] operator[SEP] { Keyword[throw] identifier[e] operator[SEP] } Keyword[else] { identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[headerHtml] operator[=] literal[String] operator[SEP] identifier[footerHtml] operator[=] literal[String] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[MojoExecutionException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } identifier[String] identifier[markdown] operator[=] identifier[FileUtils] operator[SEP] identifier[readFileToString] operator[SEP] identifier[dto] operator[SEP] identifier[markdownFile] , identifier[getInputEncoding] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[markdown] operator[=] identifier[replaceVariables] operator[SEP] identifier[markdown] , identifier[dto] operator[SEP] identifier[substitutes] operator[SEP] operator[SEP] identifier[String] identifier[markdownAsHtml] operator[SEP] identifier[Node] identifier[document] operator[=] identifier[parser] operator[SEP] identifier[parse] operator[SEP] identifier[markdown] operator[SEP] operator[SEP] identifier[markdownAsHtml] operator[=] identifier[renderer] operator[SEP] identifier[render] operator[SEP] identifier[document] operator[SEP] operator[SEP] identifier[String] identifier[data] operator[=] identifier[headerHtml] operator[+] identifier[markdownAsHtml] operator[+] identifier[footerHtml] operator[SEP] identifier[FileUtils] operator[SEP] identifier[writeStringToFile] operator[SEP] identifier[dto] operator[SEP] identifier[htmlFile] , identifier[data] , identifier[getOutputEncoding] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[MojoExecutionException] identifier[e] operator[SEP] { Keyword[throw] identifier[e] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[MojoExecutionException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } } }
public Boolean getCondition(FacesContext context) { if (conditionExpr == null && condition != null) { ExpressionFactory factory = context.getApplication().getExpressionFactory(); conditionExpr = factory.createValueExpression(context.getELContext(), condition, Boolean.class); } return ((conditionExpr != null) ? (Boolean) conditionExpr.getValue(context.getELContext()) : null); }
class class_name[name] begin[{] method[getCondition, return_type[type[Boolean]], modifier[public], parameter[context]] begin[{] if[binary_operation[binary_operation[member[.conditionExpr], ==, literal[null]], &&, binary_operation[member[.condition], !=, literal[null]]]] begin[{] local_variable[type[ExpressionFactory], factory] assign[member[.conditionExpr], call[factory.createValueExpression, parameter[call[context.getELContext, parameter[]], member[.condition], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Boolean, sub_type=None))]]] else begin[{] None end[}] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=conditionExpr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getELContext, postfix_operators=[], prefix_operators=[], qualifier=context, selectors=[], type_arguments=None)], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=conditionExpr, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Boolean, sub_type=None)))] end[}] END[}]
Keyword[public] identifier[Boolean] identifier[getCondition] operator[SEP] identifier[FacesContext] identifier[context] operator[SEP] { Keyword[if] operator[SEP] identifier[conditionExpr] operator[==] Other[null] operator[&&] identifier[condition] operator[!=] Other[null] operator[SEP] { identifier[ExpressionFactory] identifier[factory] operator[=] identifier[context] operator[SEP] identifier[getApplication] operator[SEP] operator[SEP] operator[SEP] identifier[getExpressionFactory] operator[SEP] operator[SEP] operator[SEP] identifier[conditionExpr] operator[=] identifier[factory] operator[SEP] identifier[createValueExpression] operator[SEP] identifier[context] operator[SEP] identifier[getELContext] operator[SEP] operator[SEP] , identifier[condition] , identifier[Boolean] operator[SEP] Keyword[class] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] operator[SEP] identifier[conditionExpr] operator[!=] Other[null] operator[SEP] operator[?] operator[SEP] identifier[Boolean] operator[SEP] identifier[conditionExpr] operator[SEP] identifier[getValue] operator[SEP] identifier[context] operator[SEP] identifier[getELContext] operator[SEP] operator[SEP] operator[SEP] operator[:] Other[null] operator[SEP] operator[SEP] }
public static BufferedImage pressText(Image srcImage, String pressText, Color color, Font font, int x, int y, float alpha) { return Img.from(srcImage).pressText(pressText, color, font, x, y, alpha).getImg(); }
class class_name[name] begin[{] method[pressText, return_type[type[BufferedImage]], modifier[public static], parameter[srcImage, pressText, color, font, x, y, alpha]] begin[{] return[call[Img.from, parameter[member[.srcImage]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[BufferedImage] identifier[pressText] operator[SEP] identifier[Image] identifier[srcImage] , identifier[String] identifier[pressText] , identifier[Color] identifier[color] , identifier[Font] identifier[font] , Keyword[int] identifier[x] , Keyword[int] identifier[y] , Keyword[float] identifier[alpha] operator[SEP] { Keyword[return] identifier[Img] operator[SEP] identifier[from] operator[SEP] identifier[srcImage] operator[SEP] operator[SEP] identifier[pressText] operator[SEP] identifier[pressText] , identifier[color] , identifier[font] , identifier[x] , identifier[y] , identifier[alpha] operator[SEP] operator[SEP] identifier[getImg] operator[SEP] operator[SEP] operator[SEP] }
public static MKVType getParent(MKVType t){ for(Entry<MKVType, Set<MKVType>> ent : children.entrySet()){ if (ent.getValue().contains(t)) return ent.getKey(); } return null; }
class class_name[name] begin[{] method[getParent, return_type[type[MKVType]], modifier[public static], parameter[t]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=ent, selectors=[MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=ReturnStatement(expression=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=ent, selectors=[], type_arguments=None), label=None))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=children, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ent)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=MKVType, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=MKVType, sub_type=None))], dimensions=[], name=Set, sub_type=None))], dimensions=[], name=Entry, sub_type=None))), label=None) return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] identifier[MKVType] identifier[getParent] operator[SEP] identifier[MKVType] identifier[t] operator[SEP] { Keyword[for] operator[SEP] identifier[Entry] operator[<] identifier[MKVType] , identifier[Set] operator[<] identifier[MKVType] operator[>] operator[>] identifier[ent] operator[:] identifier[children] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ent] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[contains] operator[SEP] identifier[t] operator[SEP] operator[SEP] Keyword[return] identifier[ent] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
@Override public void clientDestroyed(Client client) { if (AGENT_PORT_TYPE.equals(getEndpointName(client.getEndpoint()))) { return; } processStop(client.getEndpoint(), EventTypeEnum.CLIENT_DESTROY); }
class class_name[name] begin[{] method[clientDestroyed, return_type[void], modifier[public], parameter[client]] begin[{] if[call[AGENT_PORT_TYPE.equals, parameter[call[.getEndpointName, parameter[call[client.getEndpoint, parameter[]]]]]]] begin[{] return[None] else begin[{] None end[}] call[.processStop, parameter[call[client.getEndpoint, parameter[]], member[EventTypeEnum.CLIENT_DESTROY]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[clientDestroyed] operator[SEP] identifier[Client] identifier[client] operator[SEP] { Keyword[if] operator[SEP] identifier[AGENT_PORT_TYPE] operator[SEP] identifier[equals] operator[SEP] identifier[getEndpointName] operator[SEP] identifier[client] operator[SEP] identifier[getEndpoint] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } identifier[processStop] operator[SEP] identifier[client] operator[SEP] identifier[getEndpoint] operator[SEP] operator[SEP] , identifier[EventTypeEnum] operator[SEP] identifier[CLIENT_DESTROY] operator[SEP] operator[SEP] }
@Override public void writeFragmentTo(MwsWriter w) { w.write("ASIN", asin); w.write("SellerSKU", sellerSKU); w.write("OrderItemId", orderItemId); w.write("Title", title); w.write("QuantityOrdered", quantityOrdered); w.write("QuantityShipped", quantityShipped); w.write("ItemPrice", itemPrice); w.write("ShippingPrice", shippingPrice); w.write("GiftWrapPrice", giftWrapPrice); w.write("ItemTax", itemTax); w.write("ShippingTax", shippingTax); w.write("GiftWrapTax", giftWrapTax); w.write("ShippingDiscount", shippingDiscount); w.write("PromotionDiscount", promotionDiscount); w.writeList("PromotionIds", "PromotionId", promotionIds); w.write("CODFee", codFee); w.write("CODFeeDiscount", codFeeDiscount); w.write("GiftMessageText", giftMessageText); w.write("GiftWrapLevel", giftWrapLevel); w.write("InvoiceData", invoiceData); w.write("ConditionNote", conditionNote); w.write("ConditionId", conditionId); w.write("ConditionSubtypeId", conditionSubtypeId); w.write("ScheduledDeliveryStartDate", scheduledDeliveryStartDate); w.write("ScheduledDeliveryEndDate", scheduledDeliveryEndDate); }
class class_name[name] begin[{] method[writeFragmentTo, return_type[void], modifier[public], parameter[w]] begin[{] call[w.write, parameter[literal["ASIN"], member[.asin]]] call[w.write, parameter[literal["SellerSKU"], member[.sellerSKU]]] call[w.write, parameter[literal["OrderItemId"], member[.orderItemId]]] call[w.write, parameter[literal["Title"], member[.title]]] call[w.write, parameter[literal["QuantityOrdered"], member[.quantityOrdered]]] call[w.write, parameter[literal["QuantityShipped"], member[.quantityShipped]]] call[w.write, parameter[literal["ItemPrice"], member[.itemPrice]]] call[w.write, parameter[literal["ShippingPrice"], member[.shippingPrice]]] call[w.write, parameter[literal["GiftWrapPrice"], member[.giftWrapPrice]]] call[w.write, parameter[literal["ItemTax"], member[.itemTax]]] call[w.write, parameter[literal["ShippingTax"], member[.shippingTax]]] call[w.write, parameter[literal["GiftWrapTax"], member[.giftWrapTax]]] call[w.write, parameter[literal["ShippingDiscount"], member[.shippingDiscount]]] call[w.write, parameter[literal["PromotionDiscount"], member[.promotionDiscount]]] call[w.writeList, parameter[literal["PromotionIds"], literal["PromotionId"], member[.promotionIds]]] call[w.write, parameter[literal["CODFee"], member[.codFee]]] call[w.write, parameter[literal["CODFeeDiscount"], member[.codFeeDiscount]]] call[w.write, parameter[literal["GiftMessageText"], member[.giftMessageText]]] call[w.write, parameter[literal["GiftWrapLevel"], member[.giftWrapLevel]]] call[w.write, parameter[literal["InvoiceData"], member[.invoiceData]]] call[w.write, parameter[literal["ConditionNote"], member[.conditionNote]]] call[w.write, parameter[literal["ConditionId"], member[.conditionId]]] call[w.write, parameter[literal["ConditionSubtypeId"], member[.conditionSubtypeId]]] call[w.write, parameter[literal["ScheduledDeliveryStartDate"], member[.scheduledDeliveryStartDate]]] call[w.write, parameter[literal["ScheduledDeliveryEndDate"], member[.scheduledDeliveryEndDate]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[writeFragmentTo] operator[SEP] identifier[MwsWriter] identifier[w] operator[SEP] { identifier[w] operator[SEP] identifier[write] operator[SEP] literal[String] , identifier[asin] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[write] operator[SEP] literal[String] , identifier[sellerSKU] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[write] operator[SEP] literal[String] , identifier[orderItemId] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[write] operator[SEP] literal[String] , identifier[title] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[write] operator[SEP] literal[String] , identifier[quantityOrdered] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[write] operator[SEP] literal[String] , identifier[quantityShipped] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[write] operator[SEP] literal[String] , identifier[itemPrice] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[write] operator[SEP] literal[String] , identifier[shippingPrice] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[write] operator[SEP] literal[String] , identifier[giftWrapPrice] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[write] operator[SEP] literal[String] , identifier[itemTax] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[write] operator[SEP] literal[String] , identifier[shippingTax] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[write] operator[SEP] literal[String] , identifier[giftWrapTax] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[write] operator[SEP] literal[String] , identifier[shippingDiscount] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[write] operator[SEP] literal[String] , identifier[promotionDiscount] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[writeList] operator[SEP] literal[String] , literal[String] , identifier[promotionIds] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[write] operator[SEP] literal[String] , identifier[codFee] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[write] operator[SEP] literal[String] , identifier[codFeeDiscount] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[write] operator[SEP] literal[String] , identifier[giftMessageText] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[write] operator[SEP] literal[String] , identifier[giftWrapLevel] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[write] operator[SEP] literal[String] , identifier[invoiceData] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[write] operator[SEP] literal[String] , identifier[conditionNote] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[write] operator[SEP] literal[String] , identifier[conditionId] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[write] operator[SEP] literal[String] , identifier[conditionSubtypeId] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[write] operator[SEP] literal[String] , identifier[scheduledDeliveryStartDate] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[write] operator[SEP] literal[String] , identifier[scheduledDeliveryEndDate] operator[SEP] operator[SEP] }
public static CollectorConfiguration getConfiguration(String type) { return loadConfig(PropertyUtil.getProperty(HAWKULAR_APM_CONFIG, DEFAULT_URI), type); }
class class_name[name] begin[{] method[getConfiguration, return_type[type[CollectorConfiguration]], modifier[public static], parameter[type]] begin[{] return[call[.loadConfig, parameter[call[PropertyUtil.getProperty, parameter[member[.HAWKULAR_APM_CONFIG], member[.DEFAULT_URI]]], member[.type]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[CollectorConfiguration] identifier[getConfiguration] operator[SEP] identifier[String] identifier[type] operator[SEP] { Keyword[return] identifier[loadConfig] operator[SEP] identifier[PropertyUtil] operator[SEP] identifier[getProperty] operator[SEP] identifier[HAWKULAR_APM_CONFIG] , identifier[DEFAULT_URI] operator[SEP] , identifier[type] operator[SEP] operator[SEP] }