code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
private static void addProperty ( final Map<String, String> props, final String key, final String value ) { if ( value == null ) { return; } props.put ( key, value ); }
class class_name[name] begin[{] method[addProperty, return_type[void], modifier[private static], parameter[props, key, value]] begin[{] if[binary_operation[member[.value], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] call[props.put, parameter[member[.key], member[.value]]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[addProperty] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[props] , Keyword[final] identifier[String] identifier[key] , Keyword[final] identifier[String] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } identifier[props] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[value] operator[SEP] operator[SEP] }
protected Paint createHorizontalGradient(Shape s, FourColors colors) { Rectangle2D bounds = s.getBounds2D(); float x = (float) bounds.getX(); float y = (float) bounds.getY(); float w = (float) bounds.getWidth(); float h = (float) bounds.getHeight(); return createGradient(x, (0.5f * h) + y, x + w, (0.5f * h) + y, new float[] { 0f, 0.45f, 0.62f, 1f }, new Color[] { colors.top, colors.upperMid, colors.lowerMid, colors.bottom }); }
class class_name[name] begin[{] method[createHorizontalGradient, return_type[type[Paint]], modifier[protected], parameter[s, colors]] begin[{] local_variable[type[Rectangle2D], bounds] local_variable[type[float], x] local_variable[type[float], y] local_variable[type[float], w] local_variable[type[float], h] return[call[.createGradient, parameter[member[.x], binary_operation[binary_operation[literal[0.5f], *, member[.h]], +, member[.y]], binary_operation[member[.x], +, member[.w]], binary_operation[binary_operation[literal[0.5f], *, member[.h]], +, member[.y]], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0f), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.45f), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.62f), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1f)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=float)), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=top, postfix_operators=[], prefix_operators=[], qualifier=colors, selectors=[]), MemberReference(member=upperMid, postfix_operators=[], prefix_operators=[], qualifier=colors, selectors=[]), MemberReference(member=lowerMid, postfix_operators=[], prefix_operators=[], qualifier=colors, selectors=[]), MemberReference(member=bottom, postfix_operators=[], prefix_operators=[], qualifier=colors, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Color, sub_type=None))]]] end[}] END[}]
Keyword[protected] identifier[Paint] identifier[createHorizontalGradient] operator[SEP] identifier[Shape] identifier[s] , identifier[FourColors] identifier[colors] operator[SEP] { identifier[Rectangle2D] identifier[bounds] operator[=] identifier[s] operator[SEP] identifier[getBounds2D] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[x] operator[=] operator[SEP] Keyword[float] operator[SEP] identifier[bounds] operator[SEP] identifier[getX] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[y] operator[=] operator[SEP] Keyword[float] operator[SEP] identifier[bounds] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[w] operator[=] operator[SEP] Keyword[float] operator[SEP] identifier[bounds] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[h] operator[=] operator[SEP] Keyword[float] operator[SEP] identifier[bounds] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[createGradient] operator[SEP] identifier[x] , operator[SEP] literal[Float] operator[*] identifier[h] operator[SEP] operator[+] identifier[y] , identifier[x] operator[+] identifier[w] , operator[SEP] literal[Float] operator[*] identifier[h] operator[SEP] operator[+] identifier[y] , Keyword[new] Keyword[float] operator[SEP] operator[SEP] { literal[Float] , literal[Float] , literal[Float] , literal[Float] } , Keyword[new] identifier[Color] operator[SEP] operator[SEP] { identifier[colors] operator[SEP] identifier[top] , identifier[colors] operator[SEP] identifier[upperMid] , identifier[colors] operator[SEP] identifier[lowerMid] , identifier[colors] operator[SEP] identifier[bottom] } operator[SEP] operator[SEP] }
@Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case AfplibPackage.MGORG__RG_LENGTH: return getRGLength(); case AfplibPackage.MGORG__TRIPLETS: return getTriplets(); } return super.eGet(featureID, resolve, coreType); }
class class_name[name] begin[{] method[eGet, return_type[type[Object]], modifier[public], parameter[featureID, resolve, coreType]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=MGORG__RG_LENGTH, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getRGLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=[MemberReference(member=MGORG__TRIPLETS, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getTriplets, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])], expression=MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) return[SuperMethodInvocation(arguments=[MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=resolve, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=coreType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=eGet, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[eGet] operator[SEP] Keyword[int] identifier[featureID] , Keyword[boolean] identifier[resolve] , Keyword[boolean] identifier[coreType] operator[SEP] { Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] { Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[MGORG__RG_LENGTH] operator[:] Keyword[return] identifier[getRGLength] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[MGORG__TRIPLETS] operator[:] Keyword[return] identifier[getTriplets] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[super] operator[SEP] identifier[eGet] operator[SEP] identifier[featureID] , identifier[resolve] , identifier[coreType] operator[SEP] operator[SEP] }
@WillCloseWhenClosed public static void sleepFor(long timeout, TimeUnit unit) { try { unit.sleep(timeout); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } }
class class_name[name] begin[{] method[sleepFor, return_type[void], modifier[public static], parameter[timeout, unit]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=timeout, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sleep, postfix_operators=[], prefix_operators=[], qualifier=unit, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=currentThread, postfix_operators=[], prefix_operators=[], qualifier=Thread, selectors=[MethodInvocation(arguments=[], member=interrupt, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InterruptedException']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[WillCloseWhenClosed] Keyword[public] Keyword[static] Keyword[void] identifier[sleepFor] operator[SEP] Keyword[long] identifier[timeout] , identifier[TimeUnit] identifier[unit] operator[SEP] { Keyword[try] { identifier[unit] operator[SEP] identifier[sleep] operator[SEP] identifier[timeout] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InterruptedException] identifier[e] operator[SEP] { identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] identifier[interrupt] operator[SEP] operator[SEP] operator[SEP] } }
public static PublicKey deserializePublicKey(byte[] keyData, String algorithm) { LOGGER.trace("deserialize public key from data using algorithm \"{}\"", algorithm); X509EncodedKeySpec pubSpec = new X509EncodedKeySpec(keyData); try { KeyFactory keyFactory = KeyFactory.getInstance(algorithm); return keyFactory.generatePublic(pubSpec); } catch (GeneralSecurityException e) { throw new IllegalArgumentException("provided data could not be converted to a PublicKey for algorithm " + algorithm, e); } }
class class_name[name] begin[{] method[deserializePublicKey, return_type[type[PublicKey]], modifier[public static], parameter[keyData, algorithm]] begin[{] call[LOGGER.trace, parameter[literal["deserialize public key from data using algorithm \"{}\""], member[.algorithm]]] local_variable[type[X509EncodedKeySpec], pubSpec] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=algorithm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=KeyFactory, selectors=[], type_arguments=None), name=keyFactory)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=KeyFactory, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=pubSpec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=generatePublic, postfix_operators=[], prefix_operators=[], qualifier=keyFactory, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="provided data could not be converted to a PublicKey for algorithm "), operandr=MemberReference(member=algorithm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['GeneralSecurityException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[PublicKey] identifier[deserializePublicKey] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[keyData] , identifier[String] identifier[algorithm] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[trace] operator[SEP] literal[String] , identifier[algorithm] operator[SEP] operator[SEP] identifier[X509EncodedKeySpec] identifier[pubSpec] operator[=] Keyword[new] identifier[X509EncodedKeySpec] operator[SEP] identifier[keyData] operator[SEP] operator[SEP] Keyword[try] { identifier[KeyFactory] identifier[keyFactory] operator[=] identifier[KeyFactory] operator[SEP] identifier[getInstance] operator[SEP] identifier[algorithm] operator[SEP] operator[SEP] Keyword[return] identifier[keyFactory] operator[SEP] identifier[generatePublic] operator[SEP] identifier[pubSpec] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[GeneralSecurityException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[algorithm] , identifier[e] operator[SEP] operator[SEP] } }
public CharSequence format(Monetary monetary) { // preparation int maxDecimals = minDecimals; if (decimalGroups != null) for (int group : decimalGroups) maxDecimals += group; int smallestUnitExponent = monetary.smallestUnitExponent(); checkState(maxDecimals <= smallestUnitExponent, "The maximum possible number of decimals (%s) cannot exceed %s.", maxDecimals, smallestUnitExponent); // rounding long satoshis = Math.abs(monetary.getValue()); long precisionDivisor = checkedPow(10, smallestUnitExponent - shift - maxDecimals); satoshis = checkedMultiply(divide(satoshis, precisionDivisor, roundingMode), precisionDivisor); // shifting long shiftDivisor = checkedPow(10, smallestUnitExponent - shift); long numbers = satoshis / shiftDivisor; long decimals = satoshis % shiftDivisor; // formatting String decimalsStr = String.format(Locale.US, "%0" + (smallestUnitExponent - shift) + "d", decimals); StringBuilder str = new StringBuilder(decimalsStr); while (str.length() > minDecimals && str.charAt(str.length() - 1) == '0') str.setLength(str.length() - 1); // trim trailing zero int i = minDecimals; if (decimalGroups != null) { for (int group : decimalGroups) { if (str.length() > i && str.length() < i + group) { while (str.length() < i + group) str.append('0'); break; } i += group; } } if (str.length() > 0) str.insert(0, decimalMark); str.insert(0, numbers); if (monetary.getValue() < 0) str.insert(0, negativeSign); else if (positiveSign != 0) str.insert(0, positiveSign); if (codes != null) { if (codePrefixed) { str.insert(0, codeSeparator); str.insert(0, code()); } else { str.append(codeSeparator); str.append(code()); } } // Convert to non-arabic digits. if (zeroDigit != '0') { int offset = zeroDigit - '0'; for (int d = 0; d < str.length(); d++) { char c = str.charAt(d); if (Character.isDigit(c)) str.setCharAt(d, (char) (c + offset)); } } return str; }
class class_name[name] begin[{] method[format, return_type[type[CharSequence]], modifier[public], parameter[monetary]] begin[{] local_variable[type[int], maxDecimals] if[binary_operation[member[.decimalGroups], !=, literal[null]]] begin[{] ForStatement(body=StatementExpression(expression=Assignment(expressionl=MemberReference(member=maxDecimals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=group, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), control=EnhancedForControl(iterable=MemberReference(member=decimalGroups, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=group)], modifiers=set(), type=BasicType(dimensions=[], name=int))), label=None) else begin[{] None end[}] local_variable[type[int], smallestUnitExponent] call[.checkState, parameter[binary_operation[member[.maxDecimals], <=, member[.smallestUnitExponent]], literal["The maximum possible number of decimals (%s) cannot exceed %s."], member[.maxDecimals], member[.smallestUnitExponent]]] local_variable[type[long], satoshis] local_variable[type[long], precisionDivisor] assign[member[.satoshis], call[.checkedMultiply, parameter[call[.divide, parameter[member[.satoshis], member[.precisionDivisor], member[.roundingMode]]], member[.precisionDivisor]]]] local_variable[type[long], shiftDivisor] local_variable[type[long], numbers] local_variable[type[long], decimals] local_variable[type[String], decimalsStr] local_variable[type[StringBuilder], str] while[binary_operation[binary_operation[call[str.length, parameter[]], >, member[.minDecimals]], &&, binary_operation[call[str.charAt, parameter[binary_operation[call[str.length, parameter[]], -, literal[1]]]], ==, literal['0']]]] begin[{] call[str.setLength, parameter[binary_operation[call[str.length, parameter[]], -, literal[1]]]] end[}] local_variable[type[int], i] if[binary_operation[member[.decimalGroups], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=group, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operator=<), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[WhileStatement(body=StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='0')], member=append, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), label=None), condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=group, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operator=<), label=None), BreakStatement(goto=None, label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=group, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=decimalGroups, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=group)], modifiers=set(), type=BasicType(dimensions=[], name=int))), label=None) else begin[{] None end[}] if[binary_operation[call[str.length, parameter[]], >, literal[0]]] begin[{] call[str.insert, parameter[literal[0], member[.decimalMark]]] else begin[{] None end[}] call[str.insert, parameter[literal[0], member[.numbers]]] if[binary_operation[call[monetary.getValue, parameter[]], <, literal[0]]] begin[{] call[str.insert, parameter[literal[0], member[.negativeSign]]] else begin[{] if[binary_operation[member[.positiveSign], !=, literal[0]]] begin[{] call[str.insert, parameter[literal[0], member[.positiveSign]]] else begin[{] None end[}] end[}] if[binary_operation[member[.codes], !=, literal[null]]] begin[{] if[member[.codePrefixed]] begin[{] call[str.insert, parameter[literal[0], member[.codeSeparator]]] call[str.insert, parameter[literal[0], call[.code, parameter[]]]] else begin[{] call[str.append, parameter[member[.codeSeparator]]] call[str.append, parameter[call[.code, parameter[]]]] end[}] else begin[{] None end[}] if[binary_operation[member[.zeroDigit], !=, literal['0']]] begin[{] local_variable[type[int], offset] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), name=c)], modifiers=set(), type=BasicType(dimensions=[], name=char)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isDigit, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), type=BasicType(dimensions=[], name=char))], member=setCharAt, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), label=None))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=d)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=d, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) else begin[{] None end[}] return[member[.str]] end[}] END[}]
Keyword[public] identifier[CharSequence] identifier[format] operator[SEP] identifier[Monetary] identifier[monetary] operator[SEP] { Keyword[int] identifier[maxDecimals] operator[=] identifier[minDecimals] operator[SEP] Keyword[if] operator[SEP] identifier[decimalGroups] operator[!=] Other[null] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[group] operator[:] identifier[decimalGroups] operator[SEP] identifier[maxDecimals] operator[+=] identifier[group] operator[SEP] Keyword[int] identifier[smallestUnitExponent] operator[=] identifier[monetary] operator[SEP] identifier[smallestUnitExponent] operator[SEP] operator[SEP] operator[SEP] identifier[checkState] operator[SEP] identifier[maxDecimals] operator[<=] identifier[smallestUnitExponent] , literal[String] , identifier[maxDecimals] , identifier[smallestUnitExponent] operator[SEP] operator[SEP] Keyword[long] identifier[satoshis] operator[=] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[monetary] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[precisionDivisor] operator[=] identifier[checkedPow] operator[SEP] Other[10] , identifier[smallestUnitExponent] operator[-] identifier[shift] operator[-] identifier[maxDecimals] operator[SEP] operator[SEP] identifier[satoshis] operator[=] identifier[checkedMultiply] operator[SEP] identifier[divide] operator[SEP] identifier[satoshis] , identifier[precisionDivisor] , identifier[roundingMode] operator[SEP] , identifier[precisionDivisor] operator[SEP] operator[SEP] Keyword[long] identifier[shiftDivisor] operator[=] identifier[checkedPow] operator[SEP] Other[10] , identifier[smallestUnitExponent] operator[-] identifier[shift] operator[SEP] operator[SEP] Keyword[long] identifier[numbers] operator[=] identifier[satoshis] operator[/] identifier[shiftDivisor] operator[SEP] Keyword[long] identifier[decimals] operator[=] identifier[satoshis] operator[%] identifier[shiftDivisor] operator[SEP] identifier[String] identifier[decimalsStr] operator[=] identifier[String] operator[SEP] identifier[format] operator[SEP] identifier[Locale] operator[SEP] identifier[US] , literal[String] operator[+] operator[SEP] identifier[smallestUnitExponent] operator[-] identifier[shift] operator[SEP] operator[+] literal[String] , identifier[decimals] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[str] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[decimalsStr] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[str] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] identifier[minDecimals] operator[&&] identifier[str] operator[SEP] identifier[charAt] operator[SEP] identifier[str] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[==] literal[String] operator[SEP] identifier[str] operator[SEP] identifier[setLength] operator[SEP] identifier[str] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[minDecimals] operator[SEP] Keyword[if] operator[SEP] identifier[decimalGroups] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[group] operator[:] identifier[decimalGroups] operator[SEP] { Keyword[if] operator[SEP] identifier[str] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] identifier[i] operator[&&] identifier[str] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[<] identifier[i] operator[+] identifier[group] operator[SEP] { Keyword[while] operator[SEP] identifier[str] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[<] identifier[i] operator[+] identifier[group] operator[SEP] identifier[str] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } identifier[i] operator[+=] identifier[group] operator[SEP] } } Keyword[if] operator[SEP] identifier[str] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] identifier[str] operator[SEP] identifier[insert] operator[SEP] Other[0] , identifier[decimalMark] operator[SEP] operator[SEP] identifier[str] operator[SEP] identifier[insert] operator[SEP] Other[0] , identifier[numbers] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[monetary] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[<] Other[0] operator[SEP] identifier[str] operator[SEP] identifier[insert] operator[SEP] Other[0] , identifier[negativeSign] operator[SEP] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[positiveSign] operator[!=] Other[0] operator[SEP] identifier[str] operator[SEP] identifier[insert] operator[SEP] Other[0] , identifier[positiveSign] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[codes] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[codePrefixed] operator[SEP] { identifier[str] operator[SEP] identifier[insert] operator[SEP] Other[0] , identifier[codeSeparator] operator[SEP] operator[SEP] identifier[str] operator[SEP] identifier[insert] operator[SEP] Other[0] , identifier[code] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[str] operator[SEP] identifier[append] operator[SEP] identifier[codeSeparator] operator[SEP] operator[SEP] identifier[str] operator[SEP] identifier[append] operator[SEP] identifier[code] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[zeroDigit] operator[!=] literal[String] operator[SEP] { Keyword[int] identifier[offset] operator[=] identifier[zeroDigit] operator[-] literal[String] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[d] operator[=] Other[0] operator[SEP] identifier[d] operator[<] identifier[str] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[d] operator[++] operator[SEP] { Keyword[char] identifier[c] operator[=] identifier[str] operator[SEP] identifier[charAt] operator[SEP] identifier[d] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Character] operator[SEP] identifier[isDigit] operator[SEP] identifier[c] operator[SEP] operator[SEP] identifier[str] operator[SEP] identifier[setCharAt] operator[SEP] identifier[d] , operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[c] operator[+] identifier[offset] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[str] operator[SEP] }
static void initializeExtension(ExtensionRegistry extensionRegistry, String module, ManagementResourceRegistration rootRegistration, ExtensionRegistryType extensionRegistryType) { try { boolean unknownModule = false; boolean initialized = false; for (Extension extension : Module.loadServiceFromCallerModuleLoader(module, Extension.class)) { ClassLoader oldTccl = WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(extension.getClass()); try { if (unknownModule || !extensionRegistry.getExtensionModuleNames().contains(module)) { // This extension wasn't handled by the standalone.xml or domain.xml parsing logic, so we // need to initialize its parsers so we can display what XML namespaces it supports extensionRegistry.initializeParsers(extension, module, null); // AS7-6190 - ensure we initialize parsers for other extensions from this module // now that we know the registry was unaware of the module unknownModule = true; } extension.initialize(extensionRegistry.getExtensionContext(module, rootRegistration, extensionRegistryType)); } finally { WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(oldTccl); } initialized = true; } if (!initialized) { throw ControllerLogger.ROOT_LOGGER.notFound("META-INF/services/", Extension.class.getName(), module); } } catch (ModuleNotFoundException e) { // Treat this as a user mistake, e.g. incorrect module name. // Throw OFE so post-boot it only gets logged at DEBUG. throw ControllerLogger.ROOT_LOGGER.extensionModuleNotFound(e, module); } catch (ModuleLoadException e) { // The module is there but can't be loaded. Treat this as an internal problem. // Throw a runtime exception so it always gets logged at ERROR in the server log with stack trace details. throw ControllerLogger.ROOT_LOGGER.extensionModuleLoadingFailure(e, module); } }
class class_name[name] begin[{] method[initializeExtension, return_type[void], modifier[static], parameter[extensionRegistry, module, rootRegistration, extensionRegistryType]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=unknownModule)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=initialized)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=extension, selectors=[], type_arguments=None)], member=setCurrentContextClassLoaderPrivileged, postfix_operators=[], prefix_operators=[], qualifier=WildFlySecurityManager, selectors=[], type_arguments=None), name=oldTccl)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ClassLoader, sub_type=None)), TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=unknownModule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getExtensionModuleNames, postfix_operators=[], prefix_operators=['!'], qualifier=extensionRegistry, selectors=[MethodInvocation(arguments=[MemberReference(member=module, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=extension, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=module, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=initializeParsers, postfix_operators=[], prefix_operators=[], qualifier=extensionRegistry, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=unknownModule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=module, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rootRegistration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=extensionRegistryType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getExtensionContext, postfix_operators=[], prefix_operators=[], qualifier=extensionRegistry, selectors=[], type_arguments=None)], member=initialize, postfix_operators=[], prefix_operators=[], qualifier=extension, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=oldTccl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setCurrentContextClassLoaderPrivileged, postfix_operators=[], prefix_operators=[], qualifier=WildFlySecurityManager, selectors=[], type_arguments=None), label=None)], label=None, resources=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=initialized, 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=[MemberReference(member=module, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Extension, sub_type=None))], member=loadServiceFromCallerModuleLoader, postfix_operators=[], prefix_operators=[], qualifier=Module, 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), IfStatement(condition=MemberReference(member=initialized, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="META-INF/services/"), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Extension, sub_type=None)), MemberReference(member=module, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=notFound, postfix_operators=[], prefix_operators=[], qualifier=ControllerLogger.ROOT_LOGGER, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=module, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=extensionModuleNotFound, postfix_operators=[], prefix_operators=[], qualifier=ControllerLogger.ROOT_LOGGER, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ModuleNotFoundException'])), CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=module, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=extensionModuleLoadingFailure, postfix_operators=[], prefix_operators=[], qualifier=ControllerLogger.ROOT_LOGGER, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ModuleLoadException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[static] Keyword[void] identifier[initializeExtension] operator[SEP] identifier[ExtensionRegistry] identifier[extensionRegistry] , identifier[String] identifier[module] , identifier[ManagementResourceRegistration] identifier[rootRegistration] , identifier[ExtensionRegistryType] identifier[extensionRegistryType] operator[SEP] { Keyword[try] { Keyword[boolean] identifier[unknownModule] operator[=] literal[boolean] operator[SEP] Keyword[boolean] identifier[initialized] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[Extension] identifier[extension] operator[:] identifier[Module] operator[SEP] identifier[loadServiceFromCallerModuleLoader] operator[SEP] identifier[module] , identifier[Extension] operator[SEP] Keyword[class] operator[SEP] operator[SEP] { identifier[ClassLoader] identifier[oldTccl] operator[=] identifier[WildFlySecurityManager] operator[SEP] identifier[setCurrentContextClassLoaderPrivileged] operator[SEP] identifier[extension] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[unknownModule] operator[||] operator[!] identifier[extensionRegistry] operator[SEP] identifier[getExtensionModuleNames] operator[SEP] operator[SEP] operator[SEP] identifier[contains] operator[SEP] identifier[module] operator[SEP] operator[SEP] { identifier[extensionRegistry] operator[SEP] identifier[initializeParsers] operator[SEP] identifier[extension] , identifier[module] , Other[null] operator[SEP] operator[SEP] identifier[unknownModule] operator[=] literal[boolean] operator[SEP] } identifier[extension] operator[SEP] identifier[initialize] operator[SEP] identifier[extensionRegistry] operator[SEP] identifier[getExtensionContext] operator[SEP] identifier[module] , identifier[rootRegistration] , identifier[extensionRegistryType] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { identifier[WildFlySecurityManager] operator[SEP] identifier[setCurrentContextClassLoaderPrivileged] operator[SEP] identifier[oldTccl] operator[SEP] operator[SEP] } identifier[initialized] operator[=] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[initialized] operator[SEP] { Keyword[throw] identifier[ControllerLogger] operator[SEP] identifier[ROOT_LOGGER] operator[SEP] identifier[notFound] operator[SEP] literal[String] , identifier[Extension] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[module] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[ModuleNotFoundException] identifier[e] operator[SEP] { Keyword[throw] identifier[ControllerLogger] operator[SEP] identifier[ROOT_LOGGER] operator[SEP] identifier[extensionModuleNotFound] operator[SEP] identifier[e] , identifier[module] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ModuleLoadException] identifier[e] operator[SEP] { Keyword[throw] identifier[ControllerLogger] operator[SEP] identifier[ROOT_LOGGER] operator[SEP] identifier[extensionModuleLoadingFailure] operator[SEP] identifier[e] , identifier[module] operator[SEP] operator[SEP] } }
public Object instantiate(String className, ObjectName loaderName) throws ReflectionException, MBeanException, InstanceNotFoundException { return delegate.instantiate(className, loaderName); }
class class_name[name] begin[{] method[instantiate, return_type[type[Object]], modifier[public], parameter[className, loaderName]] begin[{] return[call[delegate.instantiate, parameter[member[.className], member[.loaderName]]]] end[}] END[}]
Keyword[public] identifier[Object] identifier[instantiate] operator[SEP] identifier[String] identifier[className] , identifier[ObjectName] identifier[loaderName] operator[SEP] Keyword[throws] identifier[ReflectionException] , identifier[MBeanException] , identifier[InstanceNotFoundException] { Keyword[return] identifier[delegate] operator[SEP] identifier[instantiate] operator[SEP] identifier[className] , identifier[loaderName] operator[SEP] operator[SEP] }
@Override public void registerNoTtl(final String name) { logger.info("HealthService::register() {} ", name); final NodeHealthStat nodeHealthStat = new NodeHealthStat(name); nodeHealthStat.setStatus(HealthStatus.PASS); serviceHealthStatMap.put(name, nodeHealthStat); super.incrementCount("nodes"); super.recordLevel("nodes", serviceHealthStatMap.size()); }
class class_name[name] begin[{] method[registerNoTtl, return_type[void], modifier[public], parameter[name]] begin[{] call[logger.info, parameter[literal["HealthService::register() {} "], member[.name]]] local_variable[type[NodeHealthStat], nodeHealthStat] call[nodeHealthStat.setStatus, parameter[member[HealthStatus.PASS]]] call[serviceHealthStatMap.put, parameter[member[.name], member[.nodeHealthStat]]] SuperMethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="nodes")], member=incrementCount, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) SuperMethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="nodes"), MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=serviceHealthStatMap, selectors=[], type_arguments=None)], member=recordLevel, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[registerNoTtl] operator[SEP] Keyword[final] identifier[String] identifier[name] operator[SEP] { identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[name] operator[SEP] operator[SEP] Keyword[final] identifier[NodeHealthStat] identifier[nodeHealthStat] operator[=] Keyword[new] identifier[NodeHealthStat] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[nodeHealthStat] operator[SEP] identifier[setStatus] operator[SEP] identifier[HealthStatus] operator[SEP] identifier[PASS] operator[SEP] operator[SEP] identifier[serviceHealthStatMap] operator[SEP] identifier[put] operator[SEP] identifier[name] , identifier[nodeHealthStat] operator[SEP] operator[SEP] Keyword[super] operator[SEP] identifier[incrementCount] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[super] operator[SEP] identifier[recordLevel] operator[SEP] literal[String] , identifier[serviceHealthStatMap] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private MaccsKey[] keys(final IChemObjectBuilder builder) throws CDKException { MaccsKey[] result = keys; if (result == null) { synchronized (lock) { result = keys; if (result == null) { try { keys = result = readKeyDef(builder); } catch (IOException e) { throw new CDKException("could not read MACCS definitions", e); } } } } return result; }
class class_name[name] begin[{] method[keys, return_type[type[MaccsKey]], modifier[private], parameter[builder]] begin[{] local_variable[type[MaccsKey], result] if[binary_operation[member[.result], ==, literal[null]]] begin[{] SYNCHRONIZED[member[.lock]] BEGIN[{] assign[member[.result], member[.keys]] if[binary_operation[member[.result], ==, literal[null]]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=keys, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=builder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readKeyDef, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None))), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="could not read MACCS definitions"), 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=CDKException, 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[}] END[}] else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[private] identifier[MaccsKey] operator[SEP] operator[SEP] identifier[keys] operator[SEP] Keyword[final] identifier[IChemObjectBuilder] identifier[builder] operator[SEP] Keyword[throws] identifier[CDKException] { identifier[MaccsKey] operator[SEP] operator[SEP] identifier[result] operator[=] identifier[keys] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[==] Other[null] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[lock] operator[SEP] { identifier[result] operator[=] identifier[keys] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[==] Other[null] operator[SEP] { Keyword[try] { identifier[keys] operator[=] identifier[result] operator[=] identifier[readKeyDef] operator[SEP] identifier[builder] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[CDKException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } } } } Keyword[return] identifier[result] operator[SEP] }
public SizeableLinkedList<WAMInstruction> compileBodyCall(Functor expression, boolean isFirstBody, boolean isLastBody, boolean chainRule, int permVarsRemaining) { // Used to build up the results in. SizeableLinkedList<WAMInstruction> instructions = new SizeableLinkedList<WAMInstruction>(); // Generate the call or tail-call instructions, followed by the call address, which is f_n of the // called program. if (isLastBody) { // Deallocate the stack frame at the end of the clause, but prior to calling the last // body predicate. // This is not required for chain rules, as they do not need a stack frame. if (!chainRule) { instructions.add(new WAMInstruction(WAMInstruction.WAMInstructionSet.Deallocate)); } instructions.add(new WAMInstruction(WAMInstruction.WAMInstructionSet.Execute, interner.getFunctorFunctorName(expression))); } else { instructions.add(new WAMInstruction(WAMInstruction.WAMInstructionSet.Call, (byte) (permVarsRemaining & 0xff), interner.getFunctorFunctorName(expression))); } return instructions; }
class class_name[name] begin[{] method[compileBodyCall, return_type[type[SizeableLinkedList]], modifier[public], parameter[expression, isFirstBody, isLastBody, chainRule, permVarsRemaining]] begin[{] local_variable[type[SizeableLinkedList], instructions] if[member[.isLastBody]] begin[{] if[member[.chainRule]] begin[{] call[instructions.add, parameter[ClassCreator(arguments=[MemberReference(member=Deallocate, postfix_operators=[], prefix_operators=[], qualifier=WAMInstruction.WAMInstructionSet, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WAMInstruction, sub_type=None))]] else begin[{] None end[}] call[instructions.add, parameter[ClassCreator(arguments=[MemberReference(member=Execute, postfix_operators=[], prefix_operators=[], qualifier=WAMInstruction.WAMInstructionSet, selectors=[]), MethodInvocation(arguments=[MemberReference(member=expression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getFunctorFunctorName, postfix_operators=[], prefix_operators=[], qualifier=interner, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WAMInstruction, sub_type=None))]] else begin[{] call[instructions.add, parameter[ClassCreator(arguments=[MemberReference(member=Call, postfix_operators=[], prefix_operators=[], qualifier=WAMInstruction.WAMInstructionSet, selectors=[]), Cast(expression=BinaryOperation(operandl=MemberReference(member=permVarsRemaining, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xff), operator=&), type=BasicType(dimensions=[], name=byte)), MethodInvocation(arguments=[MemberReference(member=expression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getFunctorFunctorName, postfix_operators=[], prefix_operators=[], qualifier=interner, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WAMInstruction, sub_type=None))]] end[}] return[member[.instructions]] end[}] END[}]
Keyword[public] identifier[SizeableLinkedList] operator[<] identifier[WAMInstruction] operator[>] identifier[compileBodyCall] operator[SEP] identifier[Functor] identifier[expression] , Keyword[boolean] identifier[isFirstBody] , Keyword[boolean] identifier[isLastBody] , Keyword[boolean] identifier[chainRule] , Keyword[int] identifier[permVarsRemaining] operator[SEP] { identifier[SizeableLinkedList] operator[<] identifier[WAMInstruction] operator[>] identifier[instructions] operator[=] Keyword[new] identifier[SizeableLinkedList] operator[<] identifier[WAMInstruction] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isLastBody] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[chainRule] operator[SEP] { identifier[instructions] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[WAMInstruction] operator[SEP] identifier[WAMInstruction] operator[SEP] identifier[WAMInstructionSet] operator[SEP] identifier[Deallocate] operator[SEP] operator[SEP] operator[SEP] } identifier[instructions] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[WAMInstruction] operator[SEP] identifier[WAMInstruction] operator[SEP] identifier[WAMInstructionSet] operator[SEP] identifier[Execute] , identifier[interner] operator[SEP] identifier[getFunctorFunctorName] operator[SEP] identifier[expression] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[instructions] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[WAMInstruction] operator[SEP] identifier[WAMInstruction] operator[SEP] identifier[WAMInstructionSet] operator[SEP] identifier[Call] , operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[permVarsRemaining] operator[&] literal[Integer] operator[SEP] , identifier[interner] operator[SEP] identifier[getFunctorFunctorName] operator[SEP] identifier[expression] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[instructions] operator[SEP] }
public synchronized boolean isRateLimited() { final double rate = TOKEN_BUCKET_RATE.get(); final double window = TOKEN_BUCKET_WINDOW.get(); final long current = System.currentTimeMillis(); final double timePassed = current - tkBktLastCheckTime; tkBktLastCheckTime = current; tkBktAllowance = tkBktAllowance + timePassed * (rate / window); if (tkBktAllowance > rate) { tkBktAllowance = rate; //cap max to rate } if (tkBktAllowance < 1.0) { return true; } tkBktAllowance = tkBktAllowance - 1.0; return false; }
class class_name[name] begin[{] method[isRateLimited, return_type[type[boolean]], modifier[synchronized public], parameter[]] begin[{] local_variable[type[double], rate] local_variable[type[double], window] local_variable[type[long], current] local_variable[type[double], timePassed] assign[member[.tkBktLastCheckTime], member[.current]] assign[member[.tkBktAllowance], binary_operation[member[.tkBktAllowance], +, binary_operation[member[.timePassed], *, binary_operation[member[.rate], /, member[.window]]]]] if[binary_operation[member[.tkBktAllowance], >, member[.rate]]] begin[{] assign[member[.tkBktAllowance], member[.rate]] else begin[{] None end[}] if[binary_operation[member[.tkBktAllowance], <, literal[1.0]]] begin[{] return[literal[true]] else begin[{] None end[}] assign[member[.tkBktAllowance], binary_operation[member[.tkBktAllowance], -, literal[1.0]]] return[literal[false]] end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[boolean] identifier[isRateLimited] operator[SEP] operator[SEP] { Keyword[final] Keyword[double] identifier[rate] operator[=] identifier[TOKEN_BUCKET_RATE] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[double] identifier[window] operator[=] identifier[TOKEN_BUCKET_WINDOW] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[long] identifier[current] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[double] identifier[timePassed] operator[=] identifier[current] operator[-] identifier[tkBktLastCheckTime] operator[SEP] identifier[tkBktLastCheckTime] operator[=] identifier[current] operator[SEP] identifier[tkBktAllowance] operator[=] identifier[tkBktAllowance] operator[+] identifier[timePassed] operator[*] operator[SEP] identifier[rate] operator[/] identifier[window] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tkBktAllowance] operator[>] identifier[rate] operator[SEP] { identifier[tkBktAllowance] operator[=] identifier[rate] operator[SEP] } Keyword[if] operator[SEP] identifier[tkBktAllowance] operator[<] literal[Float] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[tkBktAllowance] operator[=] identifier[tkBktAllowance] operator[-] literal[Float] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
public static int poolSize() { int poolSize = 0; for (ExecutorService pool : EXECUTORS) { if (pool instanceof ThreadPoolExecutor) { poolSize += ((ThreadPoolExecutor) pool).getPoolSize(); } } for (ExecutorService pool : EXPLICIT_EXECUTORS) { if (pool instanceof ThreadPoolExecutor) { poolSize += ((ThreadPoolExecutor) pool).getPoolSize(); } } return poolSize; }
class class_name[name] begin[{] method[poolSize, return_type[type[int]], modifier[public static], parameter[]] begin[{] local_variable[type[int], poolSize] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=pool, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=ThreadPoolExecutor, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=poolSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Cast(expression=MemberReference(member=pool, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ThreadPoolExecutor, sub_type=None))), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=EXECUTORS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=pool)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ExecutorService, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=pool, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=ThreadPoolExecutor, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=poolSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Cast(expression=MemberReference(member=pool, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ThreadPoolExecutor, sub_type=None))), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=EXPLICIT_EXECUTORS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=pool)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ExecutorService, sub_type=None))), label=None) return[member[.poolSize]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[poolSize] operator[SEP] operator[SEP] { Keyword[int] identifier[poolSize] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[ExecutorService] identifier[pool] operator[:] identifier[EXECUTORS] operator[SEP] { Keyword[if] operator[SEP] identifier[pool] Keyword[instanceof] identifier[ThreadPoolExecutor] operator[SEP] { identifier[poolSize] operator[+=] operator[SEP] operator[SEP] identifier[ThreadPoolExecutor] operator[SEP] identifier[pool] operator[SEP] operator[SEP] identifier[getPoolSize] operator[SEP] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] identifier[ExecutorService] identifier[pool] operator[:] identifier[EXPLICIT_EXECUTORS] operator[SEP] { Keyword[if] operator[SEP] identifier[pool] Keyword[instanceof] identifier[ThreadPoolExecutor] operator[SEP] { identifier[poolSize] operator[+=] operator[SEP] operator[SEP] identifier[ThreadPoolExecutor] operator[SEP] identifier[pool] operator[SEP] operator[SEP] identifier[getPoolSize] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[poolSize] operator[SEP] }
public static Method tryGetMethod(String id) { if (id.length() != NAME_LEN) { // we use it to fast discard the request without doing map lookup return null; } return idToMethod.get(id); }
class class_name[name] begin[{] method[tryGetMethod, return_type[type[Method]], modifier[public static], parameter[id]] begin[{] if[binary_operation[call[id.length, parameter[]], !=, member[.NAME_LEN]]] begin[{] return[literal[null]] else begin[{] None end[}] return[call[idToMethod.get, parameter[member[.id]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Method] identifier[tryGetMethod] operator[SEP] identifier[String] identifier[id] operator[SEP] { Keyword[if] operator[SEP] identifier[id] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[!=] identifier[NAME_LEN] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[return] identifier[idToMethod] operator[SEP] identifier[get] operator[SEP] identifier[id] operator[SEP] operator[SEP] }
@Override public EEnum getIfcProjectedOrTrueLengthEnum() { if (ifcProjectedOrTrueLengthEnumEEnum == null) { ifcProjectedOrTrueLengthEnumEEnum = (EEnum) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) .getEClassifiers().get(1039); } return ifcProjectedOrTrueLengthEnumEEnum; }
class class_name[name] begin[{] method[getIfcProjectedOrTrueLengthEnum, return_type[type[EEnum]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcProjectedOrTrueLengthEnumEEnum], ==, literal[null]]] begin[{] assign[member[.ifcProjectedOrTrueLengthEnumEEnum], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=Ifc4Package, selectors=[])], member=getEPackage, postfix_operators=[], prefix_operators=[], qualifier=EPackage.Registry.INSTANCE, selectors=[MethodInvocation(arguments=[], member=getEClassifiers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1039)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=EEnum, sub_type=None))] else begin[{] None end[}] return[member[.ifcProjectedOrTrueLengthEnumEEnum]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[EEnum] identifier[getIfcProjectedOrTrueLengthEnum] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcProjectedOrTrueLengthEnumEEnum] operator[==] Other[null] operator[SEP] { identifier[ifcProjectedOrTrueLengthEnumEEnum] operator[=] operator[SEP] identifier[EEnum] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[Ifc4Package] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[1039] operator[SEP] operator[SEP] } Keyword[return] identifier[ifcProjectedOrTrueLengthEnumEEnum] operator[SEP] }
public static Credential credential( AccessTokenProvider accessTokenProvider, Collection<String> scopes) throws IOException, GeneralSecurityException { return getCredentialFromAccessTokenProvider(accessTokenProvider, scopes); }
class class_name[name] begin[{] method[credential, return_type[type[Credential]], modifier[public static], parameter[accessTokenProvider, scopes]] begin[{] return[call[.getCredentialFromAccessTokenProvider, parameter[member[.accessTokenProvider], member[.scopes]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Credential] identifier[credential] operator[SEP] identifier[AccessTokenProvider] identifier[accessTokenProvider] , identifier[Collection] operator[<] identifier[String] operator[>] identifier[scopes] operator[SEP] Keyword[throws] identifier[IOException] , identifier[GeneralSecurityException] { Keyword[return] identifier[getCredentialFromAccessTokenProvider] operator[SEP] identifier[accessTokenProvider] , identifier[scopes] operator[SEP] operator[SEP] }
public ServiceRefHandlerChainType<ServiceRefHandlerChainsType<T>> getOrCreateHandlerChain() { List<Node> nodeList = childNode.get("handler-chain"); if (nodeList != null && nodeList.size() > 0) { return new ServiceRefHandlerChainTypeImpl<ServiceRefHandlerChainsType<T>>(this, "handler-chain", childNode, nodeList.get(0)); } return createHandlerChain(); }
class class_name[name] begin[{] method[getOrCreateHandlerChain, return_type[type[ServiceRefHandlerChainType]], modifier[public], parameter[]] begin[{] local_variable[type[List], nodeList] if[binary_operation[binary_operation[member[.nodeList], !=, literal[null]], &&, binary_operation[call[nodeList.size, parameter[]], >, literal[0]]]] begin[{] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="handler-chain"), MemberReference(member=childNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=nodeList, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=ServiceRefHandlerChainsType, sub_type=None))], dimensions=None, name=ServiceRefHandlerChainTypeImpl, sub_type=None))] else begin[{] None end[}] return[call[.createHandlerChain, parameter[]]] end[}] END[}]
Keyword[public] identifier[ServiceRefHandlerChainType] operator[<] identifier[ServiceRefHandlerChainsType] operator[<] identifier[T] operator[>] operator[>] identifier[getOrCreateHandlerChain] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[Node] operator[>] identifier[nodeList] operator[=] identifier[childNode] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nodeList] operator[!=] Other[null] operator[&&] identifier[nodeList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { Keyword[return] Keyword[new] identifier[ServiceRefHandlerChainTypeImpl] operator[<] identifier[ServiceRefHandlerChainsType] operator[<] identifier[T] operator[>] operator[>] operator[SEP] Keyword[this] , literal[String] , identifier[childNode] , identifier[nodeList] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[createHandlerChain] operator[SEP] operator[SEP] operator[SEP] }
private static String normalizePath(String path) { path = PathUtils.removeTrailingSlash(path); path = PathUtils.addLeadingSlash(path); return path; }
class class_name[name] begin[{] method[normalizePath, return_type[type[String]], modifier[private static], parameter[path]] begin[{] assign[member[.path], call[PathUtils.removeTrailingSlash, parameter[member[.path]]]] assign[member[.path], call[PathUtils.addLeadingSlash, parameter[member[.path]]]] return[member[.path]] end[}] END[}]
Keyword[private] Keyword[static] identifier[String] identifier[normalizePath] operator[SEP] identifier[String] identifier[path] operator[SEP] { identifier[path] operator[=] identifier[PathUtils] operator[SEP] identifier[removeTrailingSlash] operator[SEP] identifier[path] operator[SEP] operator[SEP] identifier[path] operator[=] identifier[PathUtils] operator[SEP] identifier[addLeadingSlash] operator[SEP] identifier[path] operator[SEP] operator[SEP] Keyword[return] identifier[path] operator[SEP] }
@Override public CommerceWarehouse findByG_P_First(long groupId, boolean primary, OrderByComparator<CommerceWarehouse> orderByComparator) throws NoSuchWarehouseException { CommerceWarehouse commerceWarehouse = fetchByG_P_First(groupId, primary, orderByComparator); if (commerceWarehouse != null) { return commerceWarehouse; } StringBundler msg = new StringBundler(6); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("groupId="); msg.append(groupId); msg.append(", primary="); msg.append(primary); msg.append("}"); throw new NoSuchWarehouseException(msg.toString()); }
class class_name[name] begin[{] method[findByG_P_First, return_type[type[CommerceWarehouse]], modifier[public], parameter[groupId, primary, orderByComparator]] begin[{] local_variable[type[CommerceWarehouse], commerceWarehouse] if[binary_operation[member[.commerceWarehouse], !=, literal[null]]] begin[{] return[member[.commerceWarehouse]] else begin[{] None end[}] local_variable[type[StringBundler], msg] call[msg.append, parameter[member[._NO_SUCH_ENTITY_WITH_KEY]]] call[msg.append, parameter[literal["groupId="]]] call[msg.append, parameter[member[.groupId]]] call[msg.append, parameter[literal[", primary="]]] call[msg.append, parameter[member[.primary]]] call[msg.append, parameter[literal["}"]]] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NoSuchWarehouseException, sub_type=None)), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CommerceWarehouse] identifier[findByG_P_First] operator[SEP] Keyword[long] identifier[groupId] , Keyword[boolean] identifier[primary] , identifier[OrderByComparator] operator[<] identifier[CommerceWarehouse] operator[>] identifier[orderByComparator] operator[SEP] Keyword[throws] identifier[NoSuchWarehouseException] { identifier[CommerceWarehouse] identifier[commerceWarehouse] operator[=] identifier[fetchByG_P_First] operator[SEP] identifier[groupId] , identifier[primary] , identifier[orderByComparator] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[commerceWarehouse] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[commerceWarehouse] operator[SEP] } identifier[StringBundler] identifier[msg] operator[=] Keyword[new] identifier[StringBundler] operator[SEP] Other[6] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] identifier[_NO_SUCH_ENTITY_WITH_KEY] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] identifier[groupId] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] identifier[primary] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[NoSuchWarehouseException] operator[SEP] identifier[msg] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static String getRpcUrl( String hostname, int port, String endpointName, HighAvailabilityServicesUtils.AddressResolution addressResolution, AkkaProtocol akkaProtocol) throws UnknownHostException { checkNotNull(hostname, "hostname is null"); checkNotNull(endpointName, "endpointName is null"); checkArgument(port > 0 && port <= 65535, "port must be in [1, 65535]"); final String protocolPrefix = akkaProtocol == AkkaProtocol.SSL_TCP ? AKKA_SSL_TCP : AKKA_TCP; if (addressResolution == AddressResolution.TRY_ADDRESS_RESOLUTION) { // Fail fast if the hostname cannot be resolved //noinspection ResultOfMethodCallIgnored InetAddress.getByName(hostname); } final String hostPort = NetUtils.unresolvedHostAndPortToNormalizedString(hostname, port); return String.format("%s://flink@%s/user/%s", protocolPrefix, hostPort, endpointName); }
class class_name[name] begin[{] method[getRpcUrl, return_type[type[String]], modifier[public static], parameter[hostname, port, endpointName, addressResolution, akkaProtocol]] begin[{] call[.checkNotNull, parameter[member[.hostname], literal["hostname is null"]]] call[.checkNotNull, parameter[member[.endpointName], literal["endpointName is null"]]] call[.checkArgument, parameter[binary_operation[binary_operation[member[.port], >, literal[0]], &&, binary_operation[member[.port], <=, literal[65535]]], literal["port must be in [1, 65535]"]]] local_variable[type[String], protocolPrefix] if[binary_operation[member[.addressResolution], ==, member[AddressResolution.TRY_ADDRESS_RESOLUTION]]] begin[{] call[InetAddress.getByName, parameter[member[.hostname]]] else begin[{] None end[}] local_variable[type[String], hostPort] return[call[String.format, parameter[literal["%s://flink@%s/user/%s"], member[.protocolPrefix], member[.hostPort], member[.endpointName]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getRpcUrl] operator[SEP] identifier[String] identifier[hostname] , Keyword[int] identifier[port] , identifier[String] identifier[endpointName] , identifier[HighAvailabilityServicesUtils] operator[SEP] identifier[AddressResolution] identifier[addressResolution] , identifier[AkkaProtocol] identifier[akkaProtocol] operator[SEP] Keyword[throws] identifier[UnknownHostException] { identifier[checkNotNull] operator[SEP] identifier[hostname] , literal[String] operator[SEP] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[endpointName] , literal[String] operator[SEP] operator[SEP] identifier[checkArgument] operator[SEP] identifier[port] operator[>] Other[0] operator[&&] identifier[port] operator[<=] Other[65535] , literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[protocolPrefix] operator[=] identifier[akkaProtocol] operator[==] identifier[AkkaProtocol] operator[SEP] identifier[SSL_TCP] operator[?] identifier[AKKA_SSL_TCP] operator[:] identifier[AKKA_TCP] operator[SEP] Keyword[if] operator[SEP] identifier[addressResolution] operator[==] identifier[AddressResolution] operator[SEP] identifier[TRY_ADDRESS_RESOLUTION] operator[SEP] { identifier[InetAddress] operator[SEP] identifier[getByName] operator[SEP] identifier[hostname] operator[SEP] operator[SEP] } Keyword[final] identifier[String] identifier[hostPort] operator[=] identifier[NetUtils] operator[SEP] identifier[unresolvedHostAndPortToNormalizedString] operator[SEP] identifier[hostname] , identifier[port] operator[SEP] operator[SEP] Keyword[return] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[protocolPrefix] , identifier[hostPort] , identifier[endpointName] operator[SEP] operator[SEP] }
public boolean isInSphere(Vector origin, double radius) { return (NumberConversions.square(origin.x - x) + NumberConversions.square(origin.y - y) + NumberConversions.square(origin.z - z)) <= NumberConversions.square(radius); }
class class_name[name] begin[{] method[isInSphere, return_type[type[boolean]], modifier[public], parameter[origin, radius]] begin[{] return[binary_operation[binary_operation[binary_operation[call[NumberConversions.square, parameter[binary_operation[member[origin.x], -, member[.x]]]], +, call[NumberConversions.square, parameter[binary_operation[member[origin.y], -, member[.y]]]]], +, call[NumberConversions.square, parameter[binary_operation[member[origin.z], -, member[.z]]]]], <=, call[NumberConversions.square, parameter[member[.radius]]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isInSphere] operator[SEP] identifier[Vector] identifier[origin] , Keyword[double] identifier[radius] operator[SEP] { Keyword[return] operator[SEP] identifier[NumberConversions] operator[SEP] identifier[square] operator[SEP] identifier[origin] operator[SEP] identifier[x] operator[-] identifier[x] operator[SEP] operator[+] identifier[NumberConversions] operator[SEP] identifier[square] operator[SEP] identifier[origin] operator[SEP] identifier[y] operator[-] identifier[y] operator[SEP] operator[+] identifier[NumberConversions] operator[SEP] identifier[square] operator[SEP] identifier[origin] operator[SEP] identifier[z] operator[-] identifier[z] operator[SEP] operator[SEP] operator[<=] identifier[NumberConversions] operator[SEP] identifier[square] operator[SEP] identifier[radius] operator[SEP] operator[SEP] }
public void addTangoDataReadyListener(ITangoDataReadyListener listener, String attrName, boolean stateless) throws DevFailed { addTangoDataReadyListener(listener, attrName, new String[0], stateless); }
class class_name[name] begin[{] method[addTangoDataReadyListener, return_type[void], modifier[public], parameter[listener, attrName, stateless]] begin[{] call[.addTangoDataReadyListener, parameter[member[.listener], member[.attrName], ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), member[.stateless]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addTangoDataReadyListener] operator[SEP] identifier[ITangoDataReadyListener] identifier[listener] , identifier[String] identifier[attrName] , Keyword[boolean] identifier[stateless] operator[SEP] Keyword[throws] identifier[DevFailed] { identifier[addTangoDataReadyListener] operator[SEP] identifier[listener] , identifier[attrName] , Keyword[new] identifier[String] operator[SEP] Other[0] operator[SEP] , identifier[stateless] operator[SEP] operator[SEP] }
public ApiResponse<List<BloodlinesResponse>> getUniverseBloodlinesWithHttpInfo(String acceptLanguage, String datasource, String ifNoneMatch, String language) throws ApiException { com.squareup.okhttp.Call call = getUniverseBloodlinesValidateBeforeCall(acceptLanguage, datasource, ifNoneMatch, language, null); Type localVarReturnType = new TypeToken<List<BloodlinesResponse>>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
class class_name[name] begin[{] method[getUniverseBloodlinesWithHttpInfo, return_type[type[ApiResponse]], modifier[public], parameter[acceptLanguage, datasource, ifNoneMatch, language]] 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[List] operator[<] identifier[BloodlinesResponse] operator[>] operator[>] identifier[getUniverseBloodlinesWithHttpInfo] operator[SEP] identifier[String] identifier[acceptLanguage] , identifier[String] identifier[datasource] , identifier[String] identifier[ifNoneMatch] , identifier[String] identifier[language] operator[SEP] Keyword[throws] identifier[ApiException] { identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Call] identifier[call] operator[=] identifier[getUniverseBloodlinesValidateBeforeCall] operator[SEP] identifier[acceptLanguage] , identifier[datasource] , identifier[ifNoneMatch] , identifier[language] , Other[null] operator[SEP] operator[SEP] identifier[Type] identifier[localVarReturnType] operator[=] Keyword[new] identifier[TypeToken] operator[<] identifier[List] operator[<] identifier[BloodlinesResponse] operator[>] 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] }
protected void _computeTypes(SarlBreakExpression object, ITypeComputationState state) { final LightweightTypeReference primitiveVoid = getPrimitiveVoid(state); state.acceptActualType(primitiveVoid); }
class class_name[name] begin[{] method[_computeTypes, return_type[void], modifier[protected], parameter[object, state]] begin[{] local_variable[type[LightweightTypeReference], primitiveVoid] call[state.acceptActualType, parameter[member[.primitiveVoid]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[_computeTypes] operator[SEP] identifier[SarlBreakExpression] identifier[object] , identifier[ITypeComputationState] identifier[state] operator[SEP] { Keyword[final] identifier[LightweightTypeReference] identifier[primitiveVoid] operator[=] identifier[getPrimitiveVoid] operator[SEP] identifier[state] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[acceptActualType] operator[SEP] identifier[primitiveVoid] operator[SEP] operator[SEP] }
@Reference(authors = "Erich Schubert, Arthur Zimek, Hans-Peter Kriegel", // title = "Geodetic Distance Queries on R-Trees for Indexing Geographic Data", // booktitle = "Int. Symp. Advances in Spatial and Temporal Databases (SSTD'2013)", // url = "https://doi.org/10.1007/978-3-642-40235-7_9", // bibkey = "DBLP:conf/ssd/SchubertZK13") public static double latlngMinDistDeg(double plat, double plng, double rminlat, double rminlng, double rmaxlat, double rmaxlng) { return latlngMinDistRad(deg2rad(plat), deg2rad(plng), deg2rad(rminlat), deg2rad(rminlng), deg2rad(rmaxlat), deg2rad(rmaxlng)); }
class class_name[name] begin[{] method[latlngMinDistDeg, return_type[type[double]], modifier[public static], parameter[plat, plng, rminlat, rminlng, rmaxlat, rmaxlng]] begin[{] return[call[.latlngMinDistRad, parameter[call[.deg2rad, parameter[member[.plat]]], call[.deg2rad, parameter[member[.plng]]], call[.deg2rad, parameter[member[.rminlat]]], call[.deg2rad, parameter[member[.rminlng]]], call[.deg2rad, parameter[member[.rmaxlat]]], call[.deg2rad, parameter[member[.rmaxlng]]]]]] end[}] END[}]
annotation[@] identifier[Reference] operator[SEP] identifier[authors] operator[=] literal[String] , identifier[title] operator[=] literal[String] , identifier[booktitle] operator[=] literal[String] , identifier[url] operator[=] literal[String] , identifier[bibkey] operator[=] literal[String] operator[SEP] Keyword[public] Keyword[static] Keyword[double] identifier[latlngMinDistDeg] operator[SEP] Keyword[double] identifier[plat] , Keyword[double] identifier[plng] , Keyword[double] identifier[rminlat] , Keyword[double] identifier[rminlng] , Keyword[double] identifier[rmaxlat] , Keyword[double] identifier[rmaxlng] operator[SEP] { Keyword[return] identifier[latlngMinDistRad] operator[SEP] identifier[deg2rad] operator[SEP] identifier[plat] operator[SEP] , identifier[deg2rad] operator[SEP] identifier[plng] operator[SEP] , identifier[deg2rad] operator[SEP] identifier[rminlat] operator[SEP] , identifier[deg2rad] operator[SEP] identifier[rminlng] operator[SEP] , identifier[deg2rad] operator[SEP] identifier[rmaxlat] operator[SEP] , identifier[deg2rad] operator[SEP] identifier[rmaxlng] operator[SEP] operator[SEP] operator[SEP] }
private static void queueTask(long threadId, Runnable toRun){ assert control.isHeldByCurrentThread(); assert threadId != currentThread; //(get queue) if(!threadedLogQueue.containsKey(threadId)){ threadedLogQueue.put(threadId, new LinkedList<Runnable>()); } Queue<Runnable> threadLogQueue = threadedLogQueue.get(threadId); //(add to queue) threadLogQueue.offer( toRun ); //(register this thread as waiting) if(!threadsWaiting.contains(threadId)){ threadsWaiting.offer(threadId); assert threadedLogQueue.get(threadId) != null && !threadedLogQueue.get(threadId).isEmpty(); } }
class class_name[name] begin[{] method[queueTask, return_type[void], modifier[private static], parameter[threadId, toRun]] begin[{] AssertStatement(condition=MethodInvocation(arguments=[], member=isHeldByCurrentThread, postfix_operators=[], prefix_operators=[], qualifier=control, selectors=[], type_arguments=None), label=None, value=None) AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=threadId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=currentThread, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), label=None, value=None) if[call[threadedLogQueue.containsKey, parameter[member[.threadId]]]] begin[{] call[threadedLogQueue.put, parameter[member[.threadId], 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=Runnable, sub_type=None))], dimensions=None, name=LinkedList, sub_type=None))]] else begin[{] None end[}] local_variable[type[Queue], threadLogQueue] call[threadLogQueue.offer, parameter[member[.toRun]]] if[call[threadsWaiting.contains, parameter[member[.threadId]]]] begin[{] call[threadsWaiting.offer, parameter[member[.threadId]]] AssertStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=threadId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=threadedLogQueue, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[MemberReference(member=threadId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=['!'], qualifier=threadedLogQueue, selectors=[MethodInvocation(arguments=[], member=isEmpty, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=&&), label=None, value=None) else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[queueTask] operator[SEP] Keyword[long] identifier[threadId] , identifier[Runnable] identifier[toRun] operator[SEP] { Keyword[assert] identifier[control] operator[SEP] identifier[isHeldByCurrentThread] operator[SEP] operator[SEP] operator[SEP] Keyword[assert] identifier[threadId] operator[!=] identifier[currentThread] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[threadedLogQueue] operator[SEP] identifier[containsKey] operator[SEP] identifier[threadId] operator[SEP] operator[SEP] { identifier[threadedLogQueue] operator[SEP] identifier[put] operator[SEP] identifier[threadId] , Keyword[new] identifier[LinkedList] operator[<] identifier[Runnable] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[Queue] operator[<] identifier[Runnable] operator[>] identifier[threadLogQueue] operator[=] identifier[threadedLogQueue] operator[SEP] identifier[get] operator[SEP] identifier[threadId] operator[SEP] operator[SEP] identifier[threadLogQueue] operator[SEP] identifier[offer] operator[SEP] identifier[toRun] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[threadsWaiting] operator[SEP] identifier[contains] operator[SEP] identifier[threadId] operator[SEP] operator[SEP] { identifier[threadsWaiting] operator[SEP] identifier[offer] operator[SEP] identifier[threadId] operator[SEP] operator[SEP] Keyword[assert] identifier[threadedLogQueue] operator[SEP] identifier[get] operator[SEP] identifier[threadId] operator[SEP] operator[!=] Other[null] operator[&&] operator[!] identifier[threadedLogQueue] operator[SEP] identifier[get] operator[SEP] identifier[threadId] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] } }
public static boolean[] removeAllOccurrences(final boolean[] a, final boolean element) { if (N.isNullOrEmpty(a)) { return N.EMPTY_BOOLEAN_ARRAY; } final boolean[] copy = a.clone(); int idx = 0; for (int i = 0, len = a.length; i < len; i++) { if (a[i] == element) { continue; } copy[idx++] = a[i]; } return idx == copy.length ? copy : N.copyOfRange(copy, 0, idx); }
class class_name[name] begin[{] method[removeAllOccurrences, return_type[type[boolean]], modifier[public static], parameter[a, element]] begin[{] if[call[N.isNullOrEmpty, parameter[member[.a]]]] begin[{] return[member[N.EMPTY_BOOLEAN_ARRAY]] else begin[{] None end[}] local_variable[type[boolean], copy] local_variable[type[int], idx] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=element, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=copy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=idx, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i), VariableDeclarator(dimensions=[], initializer=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=a, selectors=[]), name=len)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=copy, selectors=[]), operator===), if_false=MethodInvocation(arguments=[MemberReference(member=copy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=copyOfRange, postfix_operators=[], prefix_operators=[], qualifier=N, selectors=[], type_arguments=None), if_true=MemberReference(member=copy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] operator[SEP] operator[SEP] identifier[removeAllOccurrences] operator[SEP] Keyword[final] Keyword[boolean] operator[SEP] operator[SEP] identifier[a] , Keyword[final] Keyword[boolean] identifier[element] operator[SEP] { Keyword[if] operator[SEP] identifier[N] operator[SEP] identifier[isNullOrEmpty] operator[SEP] identifier[a] operator[SEP] operator[SEP] { Keyword[return] identifier[N] operator[SEP] identifier[EMPTY_BOOLEAN_ARRAY] operator[SEP] } Keyword[final] Keyword[boolean] operator[SEP] operator[SEP] identifier[copy] operator[=] identifier[a] operator[SEP] identifier[clone] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[idx] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] , identifier[len] operator[=] identifier[a] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[<] identifier[len] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[a] operator[SEP] identifier[i] operator[SEP] operator[==] identifier[element] operator[SEP] { Keyword[continue] operator[SEP] } identifier[copy] operator[SEP] identifier[idx] operator[++] operator[SEP] operator[=] identifier[a] operator[SEP] identifier[i] operator[SEP] operator[SEP] } Keyword[return] identifier[idx] operator[==] identifier[copy] operator[SEP] identifier[length] operator[?] identifier[copy] operator[:] identifier[N] operator[SEP] identifier[copyOfRange] operator[SEP] identifier[copy] , Other[0] , identifier[idx] operator[SEP] operator[SEP] }
private Map<String, Object> getContentForNav(Map<String, Object> document) { Map<String, Object> navDocument = new HashMap<>(); navDocument.put(Attributes.NO_EXTENSION_URI, document.get(Attributes.NO_EXTENSION_URI)); navDocument.put(Attributes.URI, document.get(Attributes.URI)); navDocument.put(Attributes.TITLE, document.get(Attributes.TITLE)); return navDocument; }
class class_name[name] begin[{] method[getContentForNav, return_type[type[Map]], modifier[private], parameter[document]] begin[{] local_variable[type[Map], navDocument] call[navDocument.put, parameter[member[Attributes.NO_EXTENSION_URI], call[document.get, parameter[member[Attributes.NO_EXTENSION_URI]]]]] call[navDocument.put, parameter[member[Attributes.URI], call[document.get, parameter[member[Attributes.URI]]]]] call[navDocument.put, parameter[member[Attributes.TITLE], call[document.get, parameter[member[Attributes.TITLE]]]]] return[member[.navDocument]] end[}] END[}]
Keyword[private] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[getContentForNav] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[document] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[navDocument] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[navDocument] operator[SEP] identifier[put] operator[SEP] identifier[Attributes] operator[SEP] identifier[NO_EXTENSION_URI] , identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[Attributes] operator[SEP] identifier[NO_EXTENSION_URI] operator[SEP] operator[SEP] operator[SEP] identifier[navDocument] operator[SEP] identifier[put] operator[SEP] identifier[Attributes] operator[SEP] identifier[URI] , identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[Attributes] operator[SEP] identifier[URI] operator[SEP] operator[SEP] operator[SEP] identifier[navDocument] operator[SEP] identifier[put] operator[SEP] identifier[Attributes] operator[SEP] identifier[TITLE] , identifier[document] operator[SEP] identifier[get] operator[SEP] identifier[Attributes] operator[SEP] identifier[TITLE] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[navDocument] operator[SEP] }
public <T> TypedStringConverter<T> findTypedConverter(final Class<T> cls) { TypedStringConverter<T> conv = findConverterQuiet(cls); if (conv == null) { throw new IllegalStateException("No registered converter found: " + cls); } return conv; }
class class_name[name] begin[{] method[findTypedConverter, return_type[type[TypedStringConverter]], modifier[public], parameter[cls]] begin[{] local_variable[type[TypedStringConverter], conv] if[binary_operation[member[.conv], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No registered converter found: "), operandr=MemberReference(member=cls, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.conv]] end[}] END[}]
Keyword[public] operator[<] identifier[T] operator[>] identifier[TypedStringConverter] operator[<] identifier[T] operator[>] identifier[findTypedConverter] operator[SEP] Keyword[final] identifier[Class] operator[<] identifier[T] operator[>] identifier[cls] operator[SEP] { identifier[TypedStringConverter] operator[<] identifier[T] operator[>] identifier[conv] operator[=] identifier[findConverterQuiet] operator[SEP] identifier[cls] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[conv] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[cls] operator[SEP] operator[SEP] } Keyword[return] identifier[conv] operator[SEP] }
public void copyProviderDataToBuilder(TemplateBuilder builder, TemplateBuilderDataProvider templateBuilderDataProvider) { PageSize size = templateBuilderDataProvider.getPageSize(); if (templateBuilderDataProvider.isLandscape()) { builder.setPageHeight(size.getWidth()); builder.setPageWidth(size.getHeight()); } else { builder.setPageHeight(size.getHeight()); builder.setPageWidth(size.getWidth()); } builder.setTitleText(templateBuilderDataProvider.getTitle()); builder.setWithArrow(templateBuilderDataProvider.isWithArrow()); builder.setWithScaleBar(templateBuilderDataProvider.isWithScaleBar()); builder.setRasterDpi(templateBuilderDataProvider.getRasterDpi()); builder.setDpi(templateBuilderDataProvider.getDpi()); }
class class_name[name] begin[{] method[copyProviderDataToBuilder, return_type[void], modifier[public], parameter[builder, templateBuilderDataProvider]] begin[{] local_variable[type[PageSize], size] if[call[templateBuilderDataProvider.isLandscape, parameter[]]] begin[{] call[builder.setPageHeight, parameter[call[size.getWidth, parameter[]]]] call[builder.setPageWidth, parameter[call[size.getHeight, parameter[]]]] else begin[{] call[builder.setPageHeight, parameter[call[size.getHeight, parameter[]]]] call[builder.setPageWidth, parameter[call[size.getWidth, parameter[]]]] end[}] call[builder.setTitleText, parameter[call[templateBuilderDataProvider.getTitle, parameter[]]]] call[builder.setWithArrow, parameter[call[templateBuilderDataProvider.isWithArrow, parameter[]]]] call[builder.setWithScaleBar, parameter[call[templateBuilderDataProvider.isWithScaleBar, parameter[]]]] call[builder.setRasterDpi, parameter[call[templateBuilderDataProvider.getRasterDpi, parameter[]]]] call[builder.setDpi, parameter[call[templateBuilderDataProvider.getDpi, parameter[]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[copyProviderDataToBuilder] operator[SEP] identifier[TemplateBuilder] identifier[builder] , identifier[TemplateBuilderDataProvider] identifier[templateBuilderDataProvider] operator[SEP] { identifier[PageSize] identifier[size] operator[=] identifier[templateBuilderDataProvider] operator[SEP] identifier[getPageSize] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[templateBuilderDataProvider] operator[SEP] identifier[isLandscape] operator[SEP] operator[SEP] operator[SEP] { identifier[builder] operator[SEP] identifier[setPageHeight] operator[SEP] identifier[size] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[setPageWidth] operator[SEP] identifier[size] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[builder] operator[SEP] identifier[setPageHeight] operator[SEP] identifier[size] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[setPageWidth] operator[SEP] identifier[size] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[builder] operator[SEP] identifier[setTitleText] operator[SEP] identifier[templateBuilderDataProvider] operator[SEP] identifier[getTitle] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[setWithArrow] operator[SEP] identifier[templateBuilderDataProvider] operator[SEP] identifier[isWithArrow] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[setWithScaleBar] operator[SEP] identifier[templateBuilderDataProvider] operator[SEP] identifier[isWithScaleBar] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[setRasterDpi] operator[SEP] identifier[templateBuilderDataProvider] operator[SEP] identifier[getRasterDpi] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[setDpi] operator[SEP] identifier[templateBuilderDataProvider] operator[SEP] identifier[getDpi] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public EmbedBuilder addField(MessageEmbed.Field field) { return field == null ? this : addField(field.getName(), field.getValue(), field.isInline()); }
class class_name[name] begin[{] method[addField, return_type[type[EmbedBuilder]], modifier[public], parameter[field]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=isInline, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None)], member=addField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), if_true=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]))] end[}] END[}]
Keyword[public] identifier[EmbedBuilder] identifier[addField] operator[SEP] identifier[MessageEmbed] operator[SEP] identifier[Field] identifier[field] operator[SEP] { Keyword[return] identifier[field] operator[==] Other[null] operator[?] Keyword[this] operator[:] identifier[addField] operator[SEP] identifier[field] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[field] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] , identifier[field] operator[SEP] identifier[isInline] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
protected ImageView getIcon(final String picturePath) { ImageView iv = null; if (picturePath == null) { iv = new ImageView(new Image(DEFAULT_ICON)); } else { iv = new ImageView(new Image(picturePath)); } iv.setPreserveRatio(true); iv.setFitHeight(20); return iv; }
class class_name[name] begin[{] method[getIcon, return_type[type[ImageView]], modifier[protected], parameter[picturePath]] begin[{] local_variable[type[ImageView], iv] if[binary_operation[member[.picturePath], ==, literal[null]]] begin[{] assign[member[.iv], ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=DEFAULT_ICON, 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=Image, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ImageView, sub_type=None))] else begin[{] assign[member[.iv], ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=picturePath, 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=Image, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ImageView, sub_type=None))] end[}] call[iv.setPreserveRatio, parameter[literal[true]]] call[iv.setFitHeight, parameter[literal[20]]] return[member[.iv]] end[}] END[}]
Keyword[protected] identifier[ImageView] identifier[getIcon] operator[SEP] Keyword[final] identifier[String] identifier[picturePath] operator[SEP] { identifier[ImageView] identifier[iv] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[picturePath] operator[==] Other[null] operator[SEP] { identifier[iv] operator[=] Keyword[new] identifier[ImageView] operator[SEP] Keyword[new] identifier[Image] operator[SEP] identifier[DEFAULT_ICON] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[iv] operator[=] Keyword[new] identifier[ImageView] operator[SEP] Keyword[new] identifier[Image] operator[SEP] identifier[picturePath] operator[SEP] operator[SEP] operator[SEP] } identifier[iv] operator[SEP] identifier[setPreserveRatio] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[iv] operator[SEP] identifier[setFitHeight] operator[SEP] Other[20] operator[SEP] operator[SEP] Keyword[return] identifier[iv] operator[SEP] }
public DerefQueryNode createDerefQueryNode(QueryNode parent, InternalQName nameTest, boolean descendants) { return new DerefQueryNode(parent, nameTest, descendants); }
class class_name[name] begin[{] method[createDerefQueryNode, return_type[type[DerefQueryNode]], modifier[public], parameter[parent, nameTest, descendants]] begin[{] return[ClassCreator(arguments=[MemberReference(member=parent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=nameTest, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=descendants, 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=DerefQueryNode, sub_type=None))] end[}] END[}]
Keyword[public] identifier[DerefQueryNode] identifier[createDerefQueryNode] operator[SEP] identifier[QueryNode] identifier[parent] , identifier[InternalQName] identifier[nameTest] , Keyword[boolean] identifier[descendants] operator[SEP] { Keyword[return] Keyword[new] identifier[DerefQueryNode] operator[SEP] identifier[parent] , identifier[nameTest] , identifier[descendants] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") private List<File> getI18nSourceFiles(File sourceDirectory) throws IOException { if (i18nSourceFiles == null) { if (!sourceDirectory.isDirectory()) { i18nSourceFiles = Collections.emptyList(); } else { // get list of source files String includes = StringUtils.join(SOURCE_FILES_INCLUDES, ","); String excludes = FileUtils.getDefaultExcludesAsString(); i18nSourceFiles = FileUtils.getFiles(sourceDirectory, includes, excludes); } } return i18nSourceFiles; }
class class_name[name] begin[{] method[getI18nSourceFiles, return_type[type[List]], modifier[private], parameter[sourceDirectory]] begin[{] if[binary_operation[member[.i18nSourceFiles], ==, literal[null]]] begin[{] if[call[sourceDirectory.isDirectory, parameter[]]] begin[{] assign[member[.i18nSourceFiles], call[Collections.emptyList, parameter[]]] else begin[{] local_variable[type[String], includes] local_variable[type[String], excludes] assign[member[.i18nSourceFiles], call[FileUtils.getFiles, parameter[member[.sourceDirectory], member[.includes], member[.excludes]]]] end[}] else begin[{] None end[}] return[member[.i18nSourceFiles]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] identifier[List] operator[<] identifier[File] operator[>] identifier[getI18nSourceFiles] operator[SEP] identifier[File] identifier[sourceDirectory] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[i18nSourceFiles] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[sourceDirectory] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] { identifier[i18nSourceFiles] operator[=] identifier[Collections] operator[SEP] identifier[emptyList] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[String] identifier[includes] operator[=] identifier[StringUtils] operator[SEP] identifier[join] operator[SEP] identifier[SOURCE_FILES_INCLUDES] , literal[String] operator[SEP] operator[SEP] identifier[String] identifier[excludes] operator[=] identifier[FileUtils] operator[SEP] identifier[getDefaultExcludesAsString] operator[SEP] operator[SEP] operator[SEP] identifier[i18nSourceFiles] operator[=] identifier[FileUtils] operator[SEP] identifier[getFiles] operator[SEP] identifier[sourceDirectory] , identifier[includes] , identifier[excludes] operator[SEP] operator[SEP] } } Keyword[return] identifier[i18nSourceFiles] operator[SEP] }
public void setStringIfNotEmpty(@NotNull final String key, @Nullable final String value) { if (null != value && !value.isEmpty()) { setString(key, value); } }
class class_name[name] begin[{] method[setStringIfNotEmpty, return_type[void], modifier[public], parameter[key, value]] begin[{] if[binary_operation[binary_operation[literal[null], !=, member[.value]], &&, call[value.isEmpty, parameter[]]]] begin[{] call[.setString, parameter[member[.key], member[.value]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setStringIfNotEmpty] operator[SEP] annotation[@] identifier[NotNull] Keyword[final] identifier[String] identifier[key] , annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[value] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[!=] identifier[value] operator[&&] operator[!] identifier[value] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[setString] operator[SEP] identifier[key] , identifier[value] operator[SEP] operator[SEP] } }
public Collection<FileAnnotation> parse(final File file, final String moduleName) throws InvocationTargetException { try { Collection<FileAnnotation> annotations = new ParserRegistry(parsers, defaultEncoding, includePattern, excludePattern).parse(file); for (FileAnnotation annotation : annotations) { annotation.setModuleName(moduleName); } return annotations; } catch (IOException exception) { throw new InvocationTargetException(exception, "Can't scan file for warnings: " + file.getAbsolutePath()); } }
class class_name[name] begin[{] method[parse, return_type[type[Collection]], modifier[public], parameter[file, moduleName]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=parsers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=defaultEncoding, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=includePattern, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=excludePattern, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parse, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=ParserRegistry, sub_type=None)), name=annotations)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=FileAnnotation, sub_type=None))], dimensions=[], name=Collection, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=moduleName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setModuleName, postfix_operators=[], prefix_operators=[], qualifier=annotation, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=annotations, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=annotation)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FileAnnotation, sub_type=None))), label=None), ReturnStatement(expression=MemberReference(member=annotations, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Can't scan file for warnings: "), operandr=MethodInvocation(arguments=[], member=getAbsolutePath, postfix_operators=[], prefix_operators=[], qualifier=file, 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=InvocationTargetException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=exception, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] identifier[Collection] operator[<] identifier[FileAnnotation] operator[>] identifier[parse] operator[SEP] Keyword[final] identifier[File] identifier[file] , Keyword[final] identifier[String] identifier[moduleName] operator[SEP] Keyword[throws] identifier[InvocationTargetException] { Keyword[try] { identifier[Collection] operator[<] identifier[FileAnnotation] operator[>] identifier[annotations] operator[=] Keyword[new] identifier[ParserRegistry] operator[SEP] identifier[parsers] , identifier[defaultEncoding] , identifier[includePattern] , identifier[excludePattern] operator[SEP] operator[SEP] identifier[parse] operator[SEP] identifier[file] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[FileAnnotation] identifier[annotation] operator[:] identifier[annotations] operator[SEP] { identifier[annotation] operator[SEP] identifier[setModuleName] operator[SEP] identifier[moduleName] operator[SEP] operator[SEP] } Keyword[return] identifier[annotations] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[exception] operator[SEP] { Keyword[throw] Keyword[new] identifier[InvocationTargetException] operator[SEP] identifier[exception] , literal[String] operator[+] identifier[file] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public static ServerEnvironmentWrapper determineEnvironment(String[] args, Properties systemProperties, Map<String, String> systemEnvironment, ServerEnvironment.LaunchType launchType, long startTime) { final int argsLength = args.length; String serverConfig = null; String gitRepository = null; String gitBranch = MASTER; String gitAuthConfiguration = null; RunningMode runningMode = RunningMode.NORMAL; ProductConfig productConfig; ConfigurationFile.InteractionPolicy configInteractionPolicy = ConfigurationFile.InteractionPolicy.STANDARD; boolean startSuspended = false; boolean removeConfig = false; boolean startModeSet = false; for (int i = 0; i < argsLength; i++) { final String arg = args[i]; try { if (CommandLineConstants.VERSION.equals(arg) || CommandLineConstants.SHORT_VERSION.equals(arg) || CommandLineConstants.OLD_VERSION.equals(arg) || CommandLineConstants.OLD_SHORT_VERSION.equals(arg)) { productConfig = ProductConfig.fromFilesystemSlot(Module.getBootModuleLoader(), WildFlySecurityManager.getPropertyPrivileged(ServerEnvironment.HOME_DIR, null), null); STDOUT.println(productConfig.getPrettyVersionString()); return new ServerEnvironmentWrapper (ServerEnvironmentWrapper.ServerEnvironmentStatus.NORMAL); } else if (CommandLineConstants.HELP.equals(arg) || CommandLineConstants.SHORT_HELP.equals(arg) || CommandLineConstants.OLD_HELP.equals(arg)) { usage(); return new ServerEnvironmentWrapper (ServerEnvironmentWrapper.ServerEnvironmentStatus.NORMAL); } else if (CommandLineConstants.SERVER_CONFIG.equals(arg) || CommandLineConstants.SHORT_SERVER_CONFIG.equals(arg) || CommandLineConstants.OLD_SERVER_CONFIG.equals(arg)) { assertSingleConfig(serverConfig); serverConfig = args[++i]; } else if (arg.startsWith(CommandLineConstants.SERVER_CONFIG)) { assertSingleConfig(serverConfig); serverConfig = parseValue(arg, CommandLineConstants.SERVER_CONFIG); if (serverConfig == null) { return new ServerEnvironmentWrapper (ServerEnvironmentWrapper.ServerEnvironmentStatus.ERROR); } } else if (arg.startsWith(CommandLineConstants.SHORT_SERVER_CONFIG)) { assertSingleConfig(serverConfig); serverConfig = parseValue(arg, CommandLineConstants.SHORT_SERVER_CONFIG); if (serverConfig == null) { return new ServerEnvironmentWrapper (ServerEnvironmentWrapper.ServerEnvironmentStatus.ERROR); } } else if (arg.startsWith(CommandLineConstants.READ_ONLY_SERVER_CONFIG)) { assertSingleConfig(serverConfig); serverConfig = parseValue(arg, CommandLineConstants.READ_ONLY_SERVER_CONFIG); if (serverConfig == null) { return new ServerEnvironmentWrapper (ServerEnvironmentWrapper.ServerEnvironmentStatus.ERROR); } configInteractionPolicy = ConfigurationFile.InteractionPolicy.READ_ONLY; } else if (arg.startsWith(CommandLineConstants.OLD_SERVER_CONFIG)) { serverConfig = parseValue(arg, CommandLineConstants.OLD_SERVER_CONFIG); if (serverConfig == null) { return new ServerEnvironmentWrapper (ServerEnvironmentWrapper.ServerEnvironmentStatus.ERROR); } } else if (arg.startsWith("--internal-empty-config")) { assert launchType == ServerEnvironment.LaunchType.EMBEDDED; configInteractionPolicy = removeConfig ? ConfigurationFile.InteractionPolicy.DISCARD : ConfigurationFile.InteractionPolicy.NEW; } else if (arg.startsWith("--internal-remove-config")) { assert launchType == ServerEnvironment.LaunchType.EMBEDDED; removeConfig = true; if (configInteractionPolicy == ConfigurationFile.InteractionPolicy.NEW) { configInteractionPolicy = ConfigurationFile.InteractionPolicy.DISCARD; } } else if (CommandLineConstants.PROPERTIES.equals(arg) || CommandLineConstants.OLD_PROPERTIES.equals(arg) || CommandLineConstants.SHORT_PROPERTIES.equals(arg)) { // Set system properties from url/file if (!processProperties(arg, args[++i],systemProperties)) { return new ServerEnvironmentWrapper (ServerEnvironmentWrapper.ServerEnvironmentStatus.ERROR); } } else if (arg.startsWith(CommandLineConstants.PROPERTIES)) { String urlSpec = parseValue(arg, CommandLineConstants.PROPERTIES); if (urlSpec == null || !processProperties(arg, urlSpec,systemProperties)) { return new ServerEnvironmentWrapper (ServerEnvironmentWrapper.ServerEnvironmentStatus.ERROR); } } else if (arg.startsWith(CommandLineConstants.SHORT_PROPERTIES)) { String urlSpec = parseValue(arg, CommandLineConstants.SHORT_PROPERTIES); if (urlSpec == null || !processProperties(arg, urlSpec,systemProperties)) { return new ServerEnvironmentWrapper (ServerEnvironmentWrapper.ServerEnvironmentStatus.ERROR); } } else if (arg.startsWith(CommandLineConstants.OLD_PROPERTIES)) { String urlSpec = parseValue(arg, CommandLineConstants.OLD_PROPERTIES); if (urlSpec == null || !processProperties(arg, urlSpec,systemProperties)) { return new ServerEnvironmentWrapper (ServerEnvironmentWrapper.ServerEnvironmentStatus.ERROR); } } else if (arg.startsWith(CommandLineConstants.SYS_PROP)) { // set a system property String name, value; int idx = arg.indexOf("="); if (idx == -1) { name = arg.substring(2); value = "true"; } else { name = arg.substring(2, idx); value = arg.substring(idx + 1, arg.length()); } systemProperties.setProperty(name, value); } else if (arg.startsWith(CommandLineConstants.PUBLIC_BIND_ADDRESS)) { int idx = arg.indexOf('='); if (idx == arg.length() - 1) { STDERR.println(ServerLogger.ROOT_LOGGER.noArgValue(arg)); usage(); return new ServerEnvironmentWrapper (ServerEnvironmentWrapper.ServerEnvironmentStatus.ERROR); } String value = idx > -1 ? arg.substring(idx + 1) : args[++i]; value = fixPossibleIPv6URL(value); String propertyName = null; if (idx < 0) { // -b xxx -bmanagement xxx propertyName = arg.length() == 2 ? ServerEnvironment.JBOSS_BIND_ADDRESS : ServerEnvironment.JBOSS_BIND_ADDRESS_PREFIX + arg.substring(2); } else if (idx == 2) { // -b=xxx propertyName = ServerEnvironment.JBOSS_BIND_ADDRESS; } else { // -bmanagement=xxx propertyName = ServerEnvironment.JBOSS_BIND_ADDRESS_PREFIX + arg.substring(2, idx); } systemProperties.setProperty(propertyName, value); } else if (arg.startsWith(CommandLineConstants.DEFAULT_MULTICAST_ADDRESS)) { int idx = arg.indexOf('='); if (idx == arg.length() - 1) { STDERR.println(ServerLogger.ROOT_LOGGER.valueExpectedForCommandLineOption(arg)); usage(); return new ServerEnvironmentWrapper (ServerEnvironmentWrapper.ServerEnvironmentStatus.ERROR); } String value = idx > -1 ? arg.substring(idx + 1) : args[++i]; value = fixPossibleIPv6URL(value); systemProperties.setProperty(ServerEnvironment.JBOSS_DEFAULT_MULTICAST_ADDRESS, value); } else if (CommandLineConstants.ADMIN_ONLY.equals(arg)) { if(startModeSet) { STDERR.println(ServerLogger.ROOT_LOGGER.cannotSetBothAdminOnlyAndStartMode()); usage(); return new ServerEnvironmentWrapper (ServerEnvironmentWrapper.ServerEnvironmentStatus.ERROR); } startModeSet = true; runningMode = RunningMode.ADMIN_ONLY; } else if (arg.startsWith(CommandLineConstants.SECURITY_PROP)) { //Value can be a comma separated key value pair //Drop the first 2 characters String token = arg.substring(2); processSecurityProperties(token,systemProperties); } else if (arg.startsWith(CommandLineConstants.START_MODE)) { if(startModeSet) { STDERR.println(ServerLogger.ROOT_LOGGER.cannotSetBothAdminOnlyAndStartMode()); usage(); return new ServerEnvironmentWrapper (ServerEnvironmentWrapper.ServerEnvironmentStatus.ERROR); } startModeSet = true; int idx = arg.indexOf('='); if (idx == arg.length() - 1) { STDERR.println(ServerLogger.ROOT_LOGGER.noArgValue(arg)); usage(); return new ServerEnvironmentWrapper (ServerEnvironmentWrapper.ServerEnvironmentStatus.ERROR); } String value = idx > -1 ? arg.substring(idx + 1) : args[++i]; value = value.toLowerCase(Locale.ENGLISH); switch (value) { case CommandLineConstants.ADMIN_ONLY_MODE: runningMode = RunningMode.ADMIN_ONLY; break; case CommandLineConstants.SUSPEND_MODE: startSuspended = true; break; case CommandLineConstants.NORMAL_MODE: break; default: STDERR.println(ServerLogger.ROOT_LOGGER.unknownStartMode(value)); usage(); return new ServerEnvironmentWrapper (ServerEnvironmentWrapper.ServerEnvironmentStatus.ERROR); } } else if (arg.equals(CommandLineConstants.DEBUG)) { // Need to process the debug options as they cannot be filtered out in Windows // The next option may or may not be a port. Assume if it's a number and doesn't start with a - it's the port final int next = i + 1; if (next < argsLength) { final String nextArg = args[next]; if (!nextArg.startsWith("-")) { try { Integer.parseInt(nextArg); i++; } catch (NumberFormatException ignore) { } } } } else if (arg.equals(CommandLineConstants.SECMGR)) { // do nothing, just need to filter out as Windows batch scripts cannot filter it out } else if(arg.startsWith(CommandLineConstants.GIT_REPO)) { int idx = arg.indexOf("="); if (idx == -1) { final int next = i + 1; if (next < argsLength) { gitRepository = args[next]; i++; } else { STDERR.println(ServerLogger.ROOT_LOGGER.valueExpectedForCommandLineOption(arg)); usage(); return null; } } else { gitRepository = arg.substring(idx + 1, arg.length()); } } else if(arg.startsWith(CommandLineConstants.GIT_AUTH)) { int idx = arg.indexOf("="); if (idx == -1) { final int next = i + 1; if (next < argsLength) { gitAuthConfiguration = args[next]; i++; } else { STDERR.println(ServerLogger.ROOT_LOGGER.valueExpectedForCommandLineOption(arg)); usage(); return null; } } else { gitAuthConfiguration = arg.substring(idx + 1, arg.length()); } } else if(arg.startsWith(CommandLineConstants.GIT_BRANCH)) { int idx = arg.indexOf("="); if (idx == -1) { final int next = i + 1; if (next < argsLength) { gitBranch = args[next]; i++; } else { STDERR.println(ServerLogger.ROOT_LOGGER.valueExpectedForCommandLineOption(arg)); usage(); return null; } } else { gitBranch = arg.substring(idx + 1, arg.length()); } }else { STDERR.println(ServerLogger.ROOT_LOGGER.invalidCommandLineOption(arg)); usage(); return new ServerEnvironmentWrapper (ServerEnvironmentWrapper.ServerEnvironmentStatus.ERROR); } } catch (IndexOutOfBoundsException e) { STDERR.println(ServerLogger.ROOT_LOGGER.valueExpectedForCommandLineOption(arg)); usage(); return new ServerEnvironmentWrapper(ServerEnvironmentWrapper.ServerEnvironmentStatus.ERROR); } } String hostControllerName = null; // No host controller unless in domain mode. productConfig = ProductConfig.fromFilesystemSlot(Module.getBootModuleLoader(), WildFlySecurityManager.getPropertyPrivileged(ServerEnvironment.HOME_DIR, null), systemProperties); return new ServerEnvironmentWrapper(new ServerEnvironment(hostControllerName, systemProperties, systemEnvironment, serverConfig, configInteractionPolicy, launchType, runningMode, productConfig, startTime, startSuspended, gitRepository, gitBranch, gitAuthConfiguration)); }
class class_name[name] begin[{] method[determineEnvironment, return_type[type[ServerEnvironmentWrapper]], modifier[public static], parameter[args, systemProperties, systemEnvironment, launchType, startTime]] begin[{] local_variable[type[int], argsLength] local_variable[type[String], serverConfig] local_variable[type[String], gitRepository] local_variable[type[String], gitBranch] local_variable[type[String], gitAuthConfiguration] local_variable[type[RunningMode], runningMode] local_variable[type[ProductConfig], productConfig] local_variable[type[ConfigurationFile], configInteractionPolicy] local_variable[type[boolean], startSuspended] local_variable[type[boolean], removeConfig] local_variable[type[boolean], startModeSet] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=arg)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants.VERSION, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants.SHORT_VERSION, selectors=[], type_arguments=None), operator=||), operandr=MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants.OLD_VERSION, selectors=[], type_arguments=None), operator=||), operandr=MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants.OLD_SHORT_VERSION, selectors=[], type_arguments=None), operator=||), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants.HELP, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants.SHORT_HELP, selectors=[], type_arguments=None), operator=||), operandr=MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants.OLD_HELP, selectors=[], type_arguments=None), operator=||), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants.SERVER_CONFIG, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants.SHORT_SERVER_CONFIG, selectors=[], type_arguments=None), operator=||), operandr=MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants.OLD_SERVER_CONFIG, selectors=[], type_arguments=None), operator=||), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=SERVER_CONFIG, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=SHORT_SERVER_CONFIG, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=READ_ONLY_SERVER_CONFIG, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=OLD_SERVER_CONFIG, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="--internal-empty-config")], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="--internal-remove-config")], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants.PROPERTIES, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants.OLD_PROPERTIES, selectors=[], type_arguments=None), operator=||), operandr=MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants.SHORT_PROPERTIES, selectors=[], type_arguments=None), operator=||), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=PROPERTIES, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=SHORT_PROPERTIES, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=OLD_PROPERTIES, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=SYS_PROP, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=PUBLIC_BIND_ADDRESS, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=DEFAULT_MULTICAST_ADDRESS, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants.ADMIN_ONLY, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=SECURITY_PROP, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=START_MODE, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=DEBUG, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=SECMGR, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=GIT_REPO, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=GIT_AUTH, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=GIT_BRANCH, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=invalidCommandLineOption, postfix_operators=[], prefix_operators=[], qualifier=ServerLogger.ROOT_LOGGER, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=STDERR, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=usage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=ERROR, postfix_operators=[], prefix_operators=[], qualifier=ServerEnvironmentWrapper.ServerEnvironmentStatus, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServerEnvironmentWrapper, sub_type=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="=")], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), name=idx)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=gitBranch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), name=next)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=argsLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueExpectedForCommandLineOption, postfix_operators=[], prefix_operators=[], qualifier=ServerLogger.ROOT_LOGGER, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=STDERR, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=usage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=gitBranch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None), StatementExpression(expression=MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]))])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="=")], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), name=idx)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=gitAuthConfiguration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), name=next)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=argsLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueExpectedForCommandLineOption, postfix_operators=[], prefix_operators=[], qualifier=ServerLogger.ROOT_LOGGER, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=STDERR, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=usage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=gitAuthConfiguration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None), StatementExpression(expression=MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]))])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="=")], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), name=idx)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=gitRepository, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), name=next)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=argsLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueExpectedForCommandLineOption, postfix_operators=[], prefix_operators=[], qualifier=ServerLogger.ROOT_LOGGER, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=STDERR, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=usage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=gitRepository, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None), StatementExpression(expression=MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]))])), label=None, then_statement=BlockStatement(label=None, statements=[])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), name=next)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=argsLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=nextArg)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="-")], member=startsWith, postfix_operators=[], prefix_operators=['!'], qualifier=nextArg, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=nextArg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ignore, types=['NumberFormatException']))], finally_block=None, label=None, resources=None)]))]))])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=startModeSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=cannotSetBothAdminOnlyAndStartMode, postfix_operators=[], prefix_operators=[], qualifier=ServerLogger.ROOT_LOGGER, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=STDERR, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=usage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=ERROR, postfix_operators=[], prefix_operators=[], qualifier=ServerEnvironmentWrapper.ServerEnvironmentStatus, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServerEnvironmentWrapper, sub_type=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=startModeSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='=')], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), name=idx)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=noArgValue, postfix_operators=[], prefix_operators=[], qualifier=ServerLogger.ROOT_LOGGER, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=STDERR, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=usage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=ERROR, postfix_operators=[], prefix_operators=[], qualifier=ServerEnvironmentWrapper.ServerEnvironmentStatus, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServerEnvironmentWrapper, sub_type=None)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator=>), if_false=MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]))]), if_true=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None)), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=ENGLISH, postfix_operators=[], prefix_operators=[], qualifier=Locale, selectors=[])], member=toLowerCase, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None)), label=None), SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=ADMIN_ONLY_MODE, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=runningMode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=ADMIN_ONLY, postfix_operators=[], prefix_operators=[], qualifier=RunningMode, selectors=[])), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=SUSPEND_MODE, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=startSuspended, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=NORMAL_MODE, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants, selectors=[])], statements=[BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=unknownStartMode, postfix_operators=[], prefix_operators=[], qualifier=ServerLogger.ROOT_LOGGER, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=STDERR, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=usage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=ERROR, postfix_operators=[], prefix_operators=[], qualifier=ServerEnvironmentWrapper.ServerEnvironmentStatus, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServerEnvironmentWrapper, sub_type=None)), label=None)])], expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), name=token)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=token, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=systemProperties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processSecurityProperties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=startModeSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=cannotSetBothAdminOnlyAndStartMode, postfix_operators=[], prefix_operators=[], qualifier=ServerLogger.ROOT_LOGGER, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=STDERR, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=usage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=ERROR, postfix_operators=[], prefix_operators=[], qualifier=ServerEnvironmentWrapper.ServerEnvironmentStatus, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServerEnvironmentWrapper, sub_type=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=startModeSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=runningMode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=ADMIN_ONLY, postfix_operators=[], prefix_operators=[], qualifier=RunningMode, selectors=[])), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='=')], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), name=idx)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueExpectedForCommandLineOption, postfix_operators=[], prefix_operators=[], qualifier=ServerLogger.ROOT_LOGGER, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=STDERR, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=usage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=ERROR, postfix_operators=[], prefix_operators=[], qualifier=ServerEnvironmentWrapper.ServerEnvironmentStatus, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServerEnvironmentWrapper, sub_type=None)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator=>), if_false=MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]))]), if_true=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None)), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fixPossibleIPv6URL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=JBOSS_DEFAULT_MULTICAST_ADDRESS, postfix_operators=[], prefix_operators=[], qualifier=ServerEnvironment, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setProperty, postfix_operators=[], prefix_operators=[], qualifier=systemProperties, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='=')], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), name=idx)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=noArgValue, postfix_operators=[], prefix_operators=[], qualifier=ServerLogger.ROOT_LOGGER, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=STDERR, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=usage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=ERROR, postfix_operators=[], prefix_operators=[], qualifier=ServerEnvironmentWrapper.ServerEnvironmentStatus, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServerEnvironmentWrapper, sub_type=None)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator=>), if_false=MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]))]), if_true=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None)), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fixPossibleIPv6URL, 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=propertyName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=propertyName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=JBOSS_BIND_ADDRESS_PREFIX, postfix_operators=[], prefix_operators=[], qualifier=ServerEnvironment, selectors=[]), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), operator=+)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=propertyName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=JBOSS_BIND_ADDRESS, postfix_operators=[], prefix_operators=[], qualifier=ServerEnvironment, selectors=[])), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=propertyName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator===), if_false=BinaryOperation(operandl=MemberReference(member=JBOSS_BIND_ADDRESS_PREFIX, postfix_operators=[], prefix_operators=[], qualifier=ServerEnvironment, selectors=[]), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), operator=+), if_true=MemberReference(member=JBOSS_BIND_ADDRESS, postfix_operators=[], prefix_operators=[], qualifier=ServerEnvironment, selectors=[]))), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=propertyName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setProperty, postfix_operators=[], prefix_operators=[], qualifier=systemProperties, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=name), VariableDeclarator(dimensions=[], initializer=None, name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="=")], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None), name=idx)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="true")), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setProperty, postfix_operators=[], prefix_operators=[], qualifier=systemProperties, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=OLD_PROPERTIES, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants, selectors=[])], member=parseValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=urlSpec)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=urlSpec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=urlSpec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=systemProperties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processProperties, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=ERROR, postfix_operators=[], prefix_operators=[], qualifier=ServerEnvironmentWrapper.ServerEnvironmentStatus, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServerEnvironmentWrapper, sub_type=None)), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=SHORT_PROPERTIES, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants, selectors=[])], member=parseValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=urlSpec)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=urlSpec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=urlSpec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=systemProperties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processProperties, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=ERROR, postfix_operators=[], prefix_operators=[], qualifier=ServerEnvironmentWrapper.ServerEnvironmentStatus, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServerEnvironmentWrapper, sub_type=None)), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=PROPERTIES, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants, selectors=[])], member=parseValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=urlSpec)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=urlSpec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=urlSpec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=systemProperties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processProperties, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=ERROR, postfix_operators=[], prefix_operators=[], qualifier=ServerEnvironmentWrapper.ServerEnvironmentStatus, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServerEnvironmentWrapper, sub_type=None)), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]))]), MemberReference(member=systemProperties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processProperties, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=ERROR, postfix_operators=[], prefix_operators=[], qualifier=ServerEnvironmentWrapper.ServerEnvironmentStatus, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServerEnvironmentWrapper, sub_type=None)), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=launchType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=EMBEDDED, postfix_operators=[], prefix_operators=[], qualifier=ServerEnvironment.LaunchType, selectors=[]), operator===), label=None, value=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=removeConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=configInteractionPolicy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=NEW, postfix_operators=[], prefix_operators=[], qualifier=ConfigurationFile.InteractionPolicy, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=configInteractionPolicy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=DISCARD, postfix_operators=[], prefix_operators=[], qualifier=ConfigurationFile.InteractionPolicy, selectors=[])), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=launchType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=EMBEDDED, postfix_operators=[], prefix_operators=[], qualifier=ServerEnvironment.LaunchType, selectors=[]), operator===), label=None, value=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=configInteractionPolicy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=TernaryExpression(condition=MemberReference(member=removeConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=MemberReference(member=NEW, postfix_operators=[], prefix_operators=[], qualifier=ConfigurationFile.InteractionPolicy, selectors=[]), if_true=MemberReference(member=DISCARD, postfix_operators=[], prefix_operators=[], qualifier=ConfigurationFile.InteractionPolicy, selectors=[]))), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=serverConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=OLD_SERVER_CONFIG, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants, selectors=[])], member=parseValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=serverConfig, 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=ClassCreator(arguments=[MemberReference(member=ERROR, postfix_operators=[], prefix_operators=[], qualifier=ServerEnvironmentWrapper.ServerEnvironmentStatus, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServerEnvironmentWrapper, sub_type=None)), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=serverConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=assertSingleConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=serverConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=READ_ONLY_SERVER_CONFIG, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants, selectors=[])], member=parseValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=serverConfig, 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=ClassCreator(arguments=[MemberReference(member=ERROR, postfix_operators=[], prefix_operators=[], qualifier=ServerEnvironmentWrapper.ServerEnvironmentStatus, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServerEnvironmentWrapper, sub_type=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=configInteractionPolicy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=READ_ONLY, postfix_operators=[], prefix_operators=[], qualifier=ConfigurationFile.InteractionPolicy, selectors=[])), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=serverConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=assertSingleConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=serverConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=SHORT_SERVER_CONFIG, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants, selectors=[])], member=parseValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=serverConfig, 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=ClassCreator(arguments=[MemberReference(member=ERROR, postfix_operators=[], prefix_operators=[], qualifier=ServerEnvironmentWrapper.ServerEnvironmentStatus, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServerEnvironmentWrapper, sub_type=None)), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=serverConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=assertSingleConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=serverConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=SERVER_CONFIG, postfix_operators=[], prefix_operators=[], qualifier=CommandLineConstants, selectors=[])], member=parseValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=serverConfig, 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=ClassCreator(arguments=[MemberReference(member=ERROR, postfix_operators=[], prefix_operators=[], qualifier=ServerEnvironmentWrapper.ServerEnvironmentStatus, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServerEnvironmentWrapper, sub_type=None)), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=serverConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=assertSingleConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=serverConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]))])), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=usage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=NORMAL, postfix_operators=[], prefix_operators=[], qualifier=ServerEnvironmentWrapper.ServerEnvironmentStatus, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServerEnvironmentWrapper, sub_type=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=productConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getBootModuleLoader, postfix_operators=[], prefix_operators=[], qualifier=Module, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=HOME_DIR, postfix_operators=[], prefix_operators=[], qualifier=ServerEnvironment, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=getPropertyPrivileged, postfix_operators=[], prefix_operators=[], qualifier=WildFlySecurityManager, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=fromFilesystemSlot, postfix_operators=[], prefix_operators=[], qualifier=ProductConfig, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getPrettyVersionString, postfix_operators=[], prefix_operators=[], qualifier=productConfig, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=STDOUT, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=NORMAL, postfix_operators=[], prefix_operators=[], qualifier=ServerEnvironmentWrapper.ServerEnvironmentStatus, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServerEnvironmentWrapper, sub_type=None)), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueExpectedForCommandLineOption, postfix_operators=[], prefix_operators=[], qualifier=ServerLogger.ROOT_LOGGER, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=STDERR, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=usage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=ERROR, postfix_operators=[], prefix_operators=[], qualifier=ServerEnvironmentWrapper.ServerEnvironmentStatus, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServerEnvironmentWrapper, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IndexOutOfBoundsException']))], finally_block=None, label=None, resources=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=argsLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) local_variable[type[String], hostControllerName] assign[member[.productConfig], call[ProductConfig.fromFilesystemSlot, parameter[call[Module.getBootModuleLoader, parameter[]], call[WildFlySecurityManager.getPropertyPrivileged, parameter[member[ServerEnvironment.HOME_DIR], literal[null]]], member[.systemProperties]]]] return[ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=hostControllerName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=systemProperties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=systemEnvironment, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=serverConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=configInteractionPolicy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=launchType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=runningMode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=productConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=startTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=startSuspended, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=gitRepository, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=gitBranch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=gitAuthConfiguration, 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=ServerEnvironment, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServerEnvironmentWrapper, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[ServerEnvironmentWrapper] identifier[determineEnvironment] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] , identifier[Properties] identifier[systemProperties] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[systemEnvironment] , identifier[ServerEnvironment] operator[SEP] identifier[LaunchType] identifier[launchType] , Keyword[long] identifier[startTime] operator[SEP] { Keyword[final] Keyword[int] identifier[argsLength] operator[=] identifier[args] operator[SEP] identifier[length] operator[SEP] identifier[String] identifier[serverConfig] operator[=] Other[null] operator[SEP] identifier[String] identifier[gitRepository] operator[=] Other[null] operator[SEP] identifier[String] identifier[gitBranch] operator[=] identifier[MASTER] operator[SEP] identifier[String] identifier[gitAuthConfiguration] operator[=] Other[null] operator[SEP] identifier[RunningMode] identifier[runningMode] operator[=] identifier[RunningMode] operator[SEP] identifier[NORMAL] operator[SEP] identifier[ProductConfig] identifier[productConfig] operator[SEP] identifier[ConfigurationFile] operator[SEP] identifier[InteractionPolicy] identifier[configInteractionPolicy] operator[=] identifier[ConfigurationFile] operator[SEP] identifier[InteractionPolicy] operator[SEP] identifier[STANDARD] operator[SEP] Keyword[boolean] identifier[startSuspended] operator[=] literal[boolean] operator[SEP] Keyword[boolean] identifier[removeConfig] operator[=] literal[boolean] operator[SEP] Keyword[boolean] identifier[startModeSet] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[argsLength] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[final] identifier[String] identifier[arg] operator[=] identifier[args] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[CommandLineConstants] operator[SEP] identifier[VERSION] operator[SEP] identifier[equals] operator[SEP] identifier[arg] operator[SEP] operator[||] identifier[CommandLineConstants] operator[SEP] identifier[SHORT_VERSION] operator[SEP] identifier[equals] operator[SEP] identifier[arg] operator[SEP] operator[||] identifier[CommandLineConstants] operator[SEP] identifier[OLD_VERSION] operator[SEP] identifier[equals] operator[SEP] identifier[arg] operator[SEP] operator[||] identifier[CommandLineConstants] operator[SEP] identifier[OLD_SHORT_VERSION] operator[SEP] identifier[equals] operator[SEP] identifier[arg] operator[SEP] operator[SEP] { identifier[productConfig] operator[=] identifier[ProductConfig] operator[SEP] identifier[fromFilesystemSlot] operator[SEP] identifier[Module] operator[SEP] identifier[getBootModuleLoader] operator[SEP] operator[SEP] , identifier[WildFlySecurityManager] operator[SEP] identifier[getPropertyPrivileged] operator[SEP] identifier[ServerEnvironment] operator[SEP] identifier[HOME_DIR] , Other[null] operator[SEP] , Other[null] operator[SEP] operator[SEP] identifier[STDOUT] operator[SEP] identifier[println] operator[SEP] identifier[productConfig] operator[SEP] identifier[getPrettyVersionString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentStatus] operator[SEP] identifier[NORMAL] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[CommandLineConstants] operator[SEP] identifier[HELP] operator[SEP] identifier[equals] operator[SEP] identifier[arg] operator[SEP] operator[||] identifier[CommandLineConstants] operator[SEP] identifier[SHORT_HELP] operator[SEP] identifier[equals] operator[SEP] identifier[arg] operator[SEP] operator[||] identifier[CommandLineConstants] operator[SEP] identifier[OLD_HELP] operator[SEP] identifier[equals] operator[SEP] identifier[arg] operator[SEP] operator[SEP] { identifier[usage] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentStatus] operator[SEP] identifier[NORMAL] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[CommandLineConstants] operator[SEP] identifier[SERVER_CONFIG] operator[SEP] identifier[equals] operator[SEP] identifier[arg] operator[SEP] operator[||] identifier[CommandLineConstants] operator[SEP] identifier[SHORT_SERVER_CONFIG] operator[SEP] identifier[equals] operator[SEP] identifier[arg] operator[SEP] operator[||] identifier[CommandLineConstants] operator[SEP] identifier[OLD_SERVER_CONFIG] operator[SEP] identifier[equals] operator[SEP] identifier[arg] operator[SEP] operator[SEP] { identifier[assertSingleConfig] operator[SEP] identifier[serverConfig] operator[SEP] operator[SEP] identifier[serverConfig] operator[=] identifier[args] operator[SEP] operator[++] identifier[i] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[arg] operator[SEP] identifier[startsWith] operator[SEP] identifier[CommandLineConstants] operator[SEP] identifier[SERVER_CONFIG] operator[SEP] operator[SEP] { identifier[assertSingleConfig] operator[SEP] identifier[serverConfig] operator[SEP] operator[SEP] identifier[serverConfig] operator[=] identifier[parseValue] operator[SEP] identifier[arg] , identifier[CommandLineConstants] operator[SEP] identifier[SERVER_CONFIG] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[serverConfig] operator[==] Other[null] operator[SEP] { Keyword[return] Keyword[new] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentStatus] operator[SEP] identifier[ERROR] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[arg] operator[SEP] identifier[startsWith] operator[SEP] identifier[CommandLineConstants] operator[SEP] identifier[SHORT_SERVER_CONFIG] operator[SEP] operator[SEP] { identifier[assertSingleConfig] operator[SEP] identifier[serverConfig] operator[SEP] operator[SEP] identifier[serverConfig] operator[=] identifier[parseValue] operator[SEP] identifier[arg] , identifier[CommandLineConstants] operator[SEP] identifier[SHORT_SERVER_CONFIG] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[serverConfig] operator[==] Other[null] operator[SEP] { Keyword[return] Keyword[new] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentStatus] operator[SEP] identifier[ERROR] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[arg] operator[SEP] identifier[startsWith] operator[SEP] identifier[CommandLineConstants] operator[SEP] identifier[READ_ONLY_SERVER_CONFIG] operator[SEP] operator[SEP] { identifier[assertSingleConfig] operator[SEP] identifier[serverConfig] operator[SEP] operator[SEP] identifier[serverConfig] operator[=] identifier[parseValue] operator[SEP] identifier[arg] , identifier[CommandLineConstants] operator[SEP] identifier[READ_ONLY_SERVER_CONFIG] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[serverConfig] operator[==] Other[null] operator[SEP] { Keyword[return] Keyword[new] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentStatus] operator[SEP] identifier[ERROR] operator[SEP] operator[SEP] } identifier[configInteractionPolicy] operator[=] identifier[ConfigurationFile] operator[SEP] identifier[InteractionPolicy] operator[SEP] identifier[READ_ONLY] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[arg] operator[SEP] identifier[startsWith] operator[SEP] identifier[CommandLineConstants] operator[SEP] identifier[OLD_SERVER_CONFIG] operator[SEP] operator[SEP] { identifier[serverConfig] operator[=] identifier[parseValue] operator[SEP] identifier[arg] , identifier[CommandLineConstants] operator[SEP] identifier[OLD_SERVER_CONFIG] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[serverConfig] operator[==] Other[null] operator[SEP] { Keyword[return] Keyword[new] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentStatus] operator[SEP] identifier[ERROR] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[arg] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[assert] identifier[launchType] operator[==] identifier[ServerEnvironment] operator[SEP] identifier[LaunchType] operator[SEP] identifier[EMBEDDED] operator[SEP] identifier[configInteractionPolicy] operator[=] identifier[removeConfig] operator[?] identifier[ConfigurationFile] operator[SEP] identifier[InteractionPolicy] operator[SEP] identifier[DISCARD] operator[:] identifier[ConfigurationFile] operator[SEP] identifier[InteractionPolicy] operator[SEP] identifier[NEW] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[arg] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[assert] identifier[launchType] operator[==] identifier[ServerEnvironment] operator[SEP] identifier[LaunchType] operator[SEP] identifier[EMBEDDED] operator[SEP] identifier[removeConfig] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[configInteractionPolicy] operator[==] identifier[ConfigurationFile] operator[SEP] identifier[InteractionPolicy] operator[SEP] identifier[NEW] operator[SEP] { identifier[configInteractionPolicy] operator[=] identifier[ConfigurationFile] operator[SEP] identifier[InteractionPolicy] operator[SEP] identifier[DISCARD] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[CommandLineConstants] operator[SEP] identifier[PROPERTIES] operator[SEP] identifier[equals] operator[SEP] identifier[arg] operator[SEP] operator[||] identifier[CommandLineConstants] operator[SEP] identifier[OLD_PROPERTIES] operator[SEP] identifier[equals] operator[SEP] identifier[arg] operator[SEP] operator[||] identifier[CommandLineConstants] operator[SEP] identifier[SHORT_PROPERTIES] operator[SEP] identifier[equals] operator[SEP] identifier[arg] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[processProperties] operator[SEP] identifier[arg] , identifier[args] operator[SEP] operator[++] identifier[i] operator[SEP] , identifier[systemProperties] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentStatus] operator[SEP] identifier[ERROR] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[arg] operator[SEP] identifier[startsWith] operator[SEP] identifier[CommandLineConstants] operator[SEP] identifier[PROPERTIES] operator[SEP] operator[SEP] { identifier[String] identifier[urlSpec] operator[=] identifier[parseValue] operator[SEP] identifier[arg] , identifier[CommandLineConstants] operator[SEP] identifier[PROPERTIES] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[urlSpec] operator[==] Other[null] operator[||] operator[!] identifier[processProperties] operator[SEP] identifier[arg] , identifier[urlSpec] , identifier[systemProperties] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentStatus] operator[SEP] identifier[ERROR] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[arg] operator[SEP] identifier[startsWith] operator[SEP] identifier[CommandLineConstants] operator[SEP] identifier[SHORT_PROPERTIES] operator[SEP] operator[SEP] { identifier[String] identifier[urlSpec] operator[=] identifier[parseValue] operator[SEP] identifier[arg] , identifier[CommandLineConstants] operator[SEP] identifier[SHORT_PROPERTIES] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[urlSpec] operator[==] Other[null] operator[||] operator[!] identifier[processProperties] operator[SEP] identifier[arg] , identifier[urlSpec] , identifier[systemProperties] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentStatus] operator[SEP] identifier[ERROR] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[arg] operator[SEP] identifier[startsWith] operator[SEP] identifier[CommandLineConstants] operator[SEP] identifier[OLD_PROPERTIES] operator[SEP] operator[SEP] { identifier[String] identifier[urlSpec] operator[=] identifier[parseValue] operator[SEP] identifier[arg] , identifier[CommandLineConstants] operator[SEP] identifier[OLD_PROPERTIES] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[urlSpec] operator[==] Other[null] operator[||] operator[!] identifier[processProperties] operator[SEP] identifier[arg] , identifier[urlSpec] , identifier[systemProperties] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentStatus] operator[SEP] identifier[ERROR] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[arg] operator[SEP] identifier[startsWith] operator[SEP] identifier[CommandLineConstants] operator[SEP] identifier[SYS_PROP] operator[SEP] operator[SEP] { identifier[String] identifier[name] , identifier[value] operator[SEP] Keyword[int] identifier[idx] operator[=] identifier[arg] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[idx] operator[==] operator[-] Other[1] operator[SEP] { identifier[name] operator[=] identifier[arg] operator[SEP] identifier[substring] operator[SEP] Other[2] operator[SEP] operator[SEP] identifier[value] operator[=] literal[String] operator[SEP] } Keyword[else] { identifier[name] operator[=] identifier[arg] operator[SEP] identifier[substring] operator[SEP] Other[2] , identifier[idx] operator[SEP] operator[SEP] identifier[value] operator[=] identifier[arg] operator[SEP] identifier[substring] operator[SEP] identifier[idx] operator[+] Other[1] , identifier[arg] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[systemProperties] operator[SEP] identifier[setProperty] operator[SEP] identifier[name] , identifier[value] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[arg] operator[SEP] identifier[startsWith] operator[SEP] identifier[CommandLineConstants] operator[SEP] identifier[PUBLIC_BIND_ADDRESS] operator[SEP] operator[SEP] { Keyword[int] identifier[idx] operator[=] identifier[arg] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[idx] operator[==] identifier[arg] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] { identifier[STDERR] operator[SEP] identifier[println] operator[SEP] identifier[ServerLogger] operator[SEP] identifier[ROOT_LOGGER] operator[SEP] identifier[noArgValue] operator[SEP] identifier[arg] operator[SEP] operator[SEP] operator[SEP] identifier[usage] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentStatus] operator[SEP] identifier[ERROR] operator[SEP] operator[SEP] } identifier[String] identifier[value] operator[=] identifier[idx] operator[>] operator[-] Other[1] operator[?] identifier[arg] operator[SEP] identifier[substring] operator[SEP] identifier[idx] operator[+] Other[1] operator[SEP] operator[:] identifier[args] operator[SEP] operator[++] identifier[i] operator[SEP] operator[SEP] identifier[value] operator[=] identifier[fixPossibleIPv6URL] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[String] identifier[propertyName] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[idx] operator[<] Other[0] operator[SEP] { identifier[propertyName] operator[=] identifier[arg] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[2] operator[?] identifier[ServerEnvironment] operator[SEP] identifier[JBOSS_BIND_ADDRESS] operator[:] identifier[ServerEnvironment] operator[SEP] identifier[JBOSS_BIND_ADDRESS_PREFIX] operator[+] identifier[arg] operator[SEP] identifier[substring] operator[SEP] Other[2] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[idx] operator[==] Other[2] operator[SEP] { identifier[propertyName] operator[=] identifier[ServerEnvironment] operator[SEP] identifier[JBOSS_BIND_ADDRESS] operator[SEP] } Keyword[else] { identifier[propertyName] operator[=] identifier[ServerEnvironment] operator[SEP] identifier[JBOSS_BIND_ADDRESS_PREFIX] operator[+] identifier[arg] operator[SEP] identifier[substring] operator[SEP] Other[2] , identifier[idx] operator[SEP] operator[SEP] } identifier[systemProperties] operator[SEP] identifier[setProperty] operator[SEP] identifier[propertyName] , identifier[value] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[arg] operator[SEP] identifier[startsWith] operator[SEP] identifier[CommandLineConstants] operator[SEP] identifier[DEFAULT_MULTICAST_ADDRESS] operator[SEP] operator[SEP] { Keyword[int] identifier[idx] operator[=] identifier[arg] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[idx] operator[==] identifier[arg] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] { identifier[STDERR] operator[SEP] identifier[println] operator[SEP] identifier[ServerLogger] operator[SEP] identifier[ROOT_LOGGER] operator[SEP] identifier[valueExpectedForCommandLineOption] operator[SEP] identifier[arg] operator[SEP] operator[SEP] operator[SEP] identifier[usage] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentStatus] operator[SEP] identifier[ERROR] operator[SEP] operator[SEP] } identifier[String] identifier[value] operator[=] identifier[idx] operator[>] operator[-] Other[1] operator[?] identifier[arg] operator[SEP] identifier[substring] operator[SEP] identifier[idx] operator[+] Other[1] operator[SEP] operator[:] identifier[args] operator[SEP] operator[++] identifier[i] operator[SEP] operator[SEP] identifier[value] operator[=] identifier[fixPossibleIPv6URL] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[systemProperties] operator[SEP] identifier[setProperty] operator[SEP] identifier[ServerEnvironment] operator[SEP] identifier[JBOSS_DEFAULT_MULTICAST_ADDRESS] , identifier[value] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[CommandLineConstants] operator[SEP] identifier[ADMIN_ONLY] operator[SEP] identifier[equals] operator[SEP] identifier[arg] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[startModeSet] operator[SEP] { identifier[STDERR] operator[SEP] identifier[println] operator[SEP] identifier[ServerLogger] operator[SEP] identifier[ROOT_LOGGER] operator[SEP] identifier[cannotSetBothAdminOnlyAndStartMode] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[usage] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentStatus] operator[SEP] identifier[ERROR] operator[SEP] operator[SEP] } identifier[startModeSet] operator[=] literal[boolean] operator[SEP] identifier[runningMode] operator[=] identifier[RunningMode] operator[SEP] identifier[ADMIN_ONLY] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[arg] operator[SEP] identifier[startsWith] operator[SEP] identifier[CommandLineConstants] operator[SEP] identifier[SECURITY_PROP] operator[SEP] operator[SEP] { identifier[String] identifier[token] operator[=] identifier[arg] operator[SEP] identifier[substring] operator[SEP] Other[2] operator[SEP] operator[SEP] identifier[processSecurityProperties] operator[SEP] identifier[token] , identifier[systemProperties] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[arg] operator[SEP] identifier[startsWith] operator[SEP] identifier[CommandLineConstants] operator[SEP] identifier[START_MODE] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[startModeSet] operator[SEP] { identifier[STDERR] operator[SEP] identifier[println] operator[SEP] identifier[ServerLogger] operator[SEP] identifier[ROOT_LOGGER] operator[SEP] identifier[cannotSetBothAdminOnlyAndStartMode] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[usage] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentStatus] operator[SEP] identifier[ERROR] operator[SEP] operator[SEP] } identifier[startModeSet] operator[=] literal[boolean] operator[SEP] Keyword[int] identifier[idx] operator[=] identifier[arg] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[idx] operator[==] identifier[arg] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] { identifier[STDERR] operator[SEP] identifier[println] operator[SEP] identifier[ServerLogger] operator[SEP] identifier[ROOT_LOGGER] operator[SEP] identifier[noArgValue] operator[SEP] identifier[arg] operator[SEP] operator[SEP] operator[SEP] identifier[usage] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentStatus] operator[SEP] identifier[ERROR] operator[SEP] operator[SEP] } identifier[String] identifier[value] operator[=] identifier[idx] operator[>] operator[-] Other[1] operator[?] identifier[arg] operator[SEP] identifier[substring] operator[SEP] identifier[idx] operator[+] Other[1] operator[SEP] operator[:] identifier[args] operator[SEP] operator[++] identifier[i] operator[SEP] operator[SEP] identifier[value] operator[=] identifier[value] operator[SEP] identifier[toLowerCase] operator[SEP] identifier[Locale] operator[SEP] identifier[ENGLISH] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[value] operator[SEP] { Keyword[case] identifier[CommandLineConstants] operator[SEP] identifier[ADMIN_ONLY_MODE] operator[:] identifier[runningMode] operator[=] identifier[RunningMode] operator[SEP] identifier[ADMIN_ONLY] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[CommandLineConstants] operator[SEP] identifier[SUSPEND_MODE] operator[:] identifier[startSuspended] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[CommandLineConstants] operator[SEP] identifier[NORMAL_MODE] operator[:] Keyword[break] operator[SEP] Keyword[default] operator[:] identifier[STDERR] operator[SEP] identifier[println] operator[SEP] identifier[ServerLogger] operator[SEP] identifier[ROOT_LOGGER] operator[SEP] identifier[unknownStartMode] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] identifier[usage] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentStatus] operator[SEP] identifier[ERROR] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[arg] operator[SEP] identifier[equals] operator[SEP] identifier[CommandLineConstants] operator[SEP] identifier[DEBUG] operator[SEP] operator[SEP] { Keyword[final] Keyword[int] identifier[next] operator[=] identifier[i] operator[+] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[next] operator[<] identifier[argsLength] operator[SEP] { Keyword[final] identifier[String] identifier[nextArg] operator[=] identifier[args] operator[SEP] identifier[next] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[nextArg] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[try] { identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[nextArg] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] } Keyword[catch] operator[SEP] identifier[NumberFormatException] identifier[ignore] operator[SEP] { } } } } Keyword[else] Keyword[if] operator[SEP] identifier[arg] operator[SEP] identifier[equals] operator[SEP] identifier[CommandLineConstants] operator[SEP] identifier[SECMGR] operator[SEP] operator[SEP] { } Keyword[else] Keyword[if] operator[SEP] identifier[arg] operator[SEP] identifier[startsWith] operator[SEP] identifier[CommandLineConstants] operator[SEP] identifier[GIT_REPO] operator[SEP] operator[SEP] { Keyword[int] identifier[idx] operator[=] identifier[arg] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[idx] operator[==] operator[-] Other[1] operator[SEP] { Keyword[final] Keyword[int] identifier[next] operator[=] identifier[i] operator[+] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[next] operator[<] identifier[argsLength] operator[SEP] { identifier[gitRepository] operator[=] identifier[args] operator[SEP] identifier[next] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] } Keyword[else] { identifier[STDERR] operator[SEP] identifier[println] operator[SEP] identifier[ServerLogger] operator[SEP] identifier[ROOT_LOGGER] operator[SEP] identifier[valueExpectedForCommandLineOption] operator[SEP] identifier[arg] operator[SEP] operator[SEP] operator[SEP] identifier[usage] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } } Keyword[else] { identifier[gitRepository] operator[=] identifier[arg] operator[SEP] identifier[substring] operator[SEP] identifier[idx] operator[+] Other[1] , identifier[arg] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[arg] operator[SEP] identifier[startsWith] operator[SEP] identifier[CommandLineConstants] operator[SEP] identifier[GIT_AUTH] operator[SEP] operator[SEP] { Keyword[int] identifier[idx] operator[=] identifier[arg] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[idx] operator[==] operator[-] Other[1] operator[SEP] { Keyword[final] Keyword[int] identifier[next] operator[=] identifier[i] operator[+] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[next] operator[<] identifier[argsLength] operator[SEP] { identifier[gitAuthConfiguration] operator[=] identifier[args] operator[SEP] identifier[next] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] } Keyword[else] { identifier[STDERR] operator[SEP] identifier[println] operator[SEP] identifier[ServerLogger] operator[SEP] identifier[ROOT_LOGGER] operator[SEP] identifier[valueExpectedForCommandLineOption] operator[SEP] identifier[arg] operator[SEP] operator[SEP] operator[SEP] identifier[usage] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } } Keyword[else] { identifier[gitAuthConfiguration] operator[=] identifier[arg] operator[SEP] identifier[substring] operator[SEP] identifier[idx] operator[+] Other[1] , identifier[arg] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[arg] operator[SEP] identifier[startsWith] operator[SEP] identifier[CommandLineConstants] operator[SEP] identifier[GIT_BRANCH] operator[SEP] operator[SEP] { Keyword[int] identifier[idx] operator[=] identifier[arg] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[idx] operator[==] operator[-] Other[1] operator[SEP] { Keyword[final] Keyword[int] identifier[next] operator[=] identifier[i] operator[+] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[next] operator[<] identifier[argsLength] operator[SEP] { identifier[gitBranch] operator[=] identifier[args] operator[SEP] identifier[next] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] } Keyword[else] { identifier[STDERR] operator[SEP] identifier[println] operator[SEP] identifier[ServerLogger] operator[SEP] identifier[ROOT_LOGGER] operator[SEP] identifier[valueExpectedForCommandLineOption] operator[SEP] identifier[arg] operator[SEP] operator[SEP] operator[SEP] identifier[usage] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } } Keyword[else] { identifier[gitBranch] operator[=] identifier[arg] operator[SEP] identifier[substring] operator[SEP] identifier[idx] operator[+] Other[1] , identifier[arg] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[STDERR] operator[SEP] identifier[println] operator[SEP] identifier[ServerLogger] operator[SEP] identifier[ROOT_LOGGER] operator[SEP] identifier[invalidCommandLineOption] operator[SEP] identifier[arg] operator[SEP] operator[SEP] operator[SEP] identifier[usage] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentStatus] operator[SEP] identifier[ERROR] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[IndexOutOfBoundsException] identifier[e] operator[SEP] { identifier[STDERR] operator[SEP] identifier[println] operator[SEP] identifier[ServerLogger] operator[SEP] identifier[ROOT_LOGGER] operator[SEP] identifier[valueExpectedForCommandLineOption] operator[SEP] identifier[arg] operator[SEP] operator[SEP] operator[SEP] identifier[usage] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentWrapper] operator[SEP] identifier[ServerEnvironmentStatus] operator[SEP] identifier[ERROR] operator[SEP] operator[SEP] } } identifier[String] identifier[hostControllerName] operator[=] Other[null] operator[SEP] identifier[productConfig] operator[=] identifier[ProductConfig] operator[SEP] identifier[fromFilesystemSlot] operator[SEP] identifier[Module] operator[SEP] identifier[getBootModuleLoader] operator[SEP] operator[SEP] , identifier[WildFlySecurityManager] operator[SEP] identifier[getPropertyPrivileged] operator[SEP] identifier[ServerEnvironment] operator[SEP] identifier[HOME_DIR] , Other[null] operator[SEP] , identifier[systemProperties] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ServerEnvironmentWrapper] operator[SEP] Keyword[new] identifier[ServerEnvironment] operator[SEP] identifier[hostControllerName] , identifier[systemProperties] , identifier[systemEnvironment] , identifier[serverConfig] , identifier[configInteractionPolicy] , identifier[launchType] , identifier[runningMode] , identifier[productConfig] , identifier[startTime] , identifier[startSuspended] , identifier[gitRepository] , identifier[gitBranch] , identifier[gitAuthConfiguration] operator[SEP] operator[SEP] operator[SEP] }
public static dnspolicy_binding get(nitro_service service, String name) throws Exception{ dnspolicy_binding obj = new dnspolicy_binding(); obj.set_name(name); dnspolicy_binding response = (dnspolicy_binding) obj.get_resource(service); return response; }
class class_name[name] begin[{] method[get, return_type[type[dnspolicy_binding]], modifier[public static], parameter[service, name]] begin[{] local_variable[type[dnspolicy_binding], obj] call[obj.set_name, parameter[member[.name]]] local_variable[type[dnspolicy_binding], response] return[member[.response]] end[}] END[}]
Keyword[public] Keyword[static] identifier[dnspolicy_binding] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[Exception] { identifier[dnspolicy_binding] identifier[obj] operator[=] Keyword[new] identifier[dnspolicy_binding] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[set_name] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[dnspolicy_binding] identifier[response] operator[=] operator[SEP] identifier[dnspolicy_binding] operator[SEP] identifier[obj] operator[SEP] identifier[get_resource] operator[SEP] identifier[service] operator[SEP] operator[SEP] Keyword[return] identifier[response] operator[SEP] }
public RatingValuesMap getAllRatings(Reference reference) { return getResourceFactory().getApiResource( "/rating/" + reference.toURLFragment()).get( RatingValuesMap.class); }
class class_name[name] begin[{] method[getAllRatings, return_type[type[RatingValuesMap]], modifier[public], parameter[reference]] begin[{] return[call[.getResourceFactory, parameter[]]] end[}] END[}]
Keyword[public] identifier[RatingValuesMap] identifier[getAllRatings] operator[SEP] identifier[Reference] identifier[reference] operator[SEP] { Keyword[return] identifier[getResourceFactory] operator[SEP] operator[SEP] operator[SEP] identifier[getApiResource] operator[SEP] literal[String] operator[+] identifier[reference] operator[SEP] identifier[toURLFragment] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[RatingValuesMap] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public static boolean isJsonRequest(ServletRequest request) { HttpServletRequest sr = (HttpServletRequest)request; return (sr.getQueryString() != null) && (sr.getQueryString().contains("__json=true")); }
class class_name[name] begin[{] method[isJsonRequest, return_type[type[boolean]], modifier[public static], parameter[request]] begin[{] local_variable[type[HttpServletRequest], sr] return[binary_operation[binary_operation[call[sr.getQueryString, parameter[]], !=, literal[null]], &&, call[sr.getQueryString, parameter[]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isJsonRequest] operator[SEP] identifier[ServletRequest] identifier[request] operator[SEP] { identifier[HttpServletRequest] identifier[sr] operator[=] operator[SEP] identifier[HttpServletRequest] operator[SEP] identifier[request] operator[SEP] Keyword[return] operator[SEP] identifier[sr] operator[SEP] identifier[getQueryString] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[sr] operator[SEP] identifier[getQueryString] operator[SEP] operator[SEP] operator[SEP] identifier[contains] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] }
public static void clearCaches() { synchronized (AbstractCache.CACHES) { for (final AbstractCache<?> cache : AbstractCache.CACHES) { cache.getCache4Id().clear(); cache.getCache4Name().clear(); cache.getCache4UUID().clear(); } } }
class class_name[name] begin[{] method[clearCaches, return_type[void], modifier[public static], parameter[]] begin[{] SYNCHRONIZED[member[AbstractCache.CACHES]] BEGIN[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getCache4Id, postfix_operators=[], prefix_operators=[], qualifier=cache, selectors=[MethodInvocation(arguments=[], member=clear, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getCache4Name, postfix_operators=[], prefix_operators=[], qualifier=cache, selectors=[MethodInvocation(arguments=[], member=clear, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getCache4UUID, postfix_operators=[], prefix_operators=[], qualifier=cache, selectors=[MethodInvocation(arguments=[], member=clear, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=CACHES, postfix_operators=[], prefix_operators=[], qualifier=AbstractCache, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=cache)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=AbstractCache, sub_type=None))), label=None) END[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[clearCaches] operator[SEP] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[AbstractCache] operator[SEP] identifier[CACHES] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] identifier[AbstractCache] operator[<] operator[?] operator[>] identifier[cache] operator[:] identifier[AbstractCache] operator[SEP] identifier[CACHES] operator[SEP] { identifier[cache] operator[SEP] identifier[getCache4Id] operator[SEP] operator[SEP] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[cache] operator[SEP] identifier[getCache4Name] operator[SEP] operator[SEP] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[cache] operator[SEP] identifier[getCache4UUID] operator[SEP] operator[SEP] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] } } }
public static Document parseDocument(DocumentBuilder builder, File file) throws IOException, SAXException { final DocumentBuilder docBuilder = builder; final File parsingFile = file; try { return (Document) AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws SAXException, IOException { Thread currThread = Thread.currentThread(); ClassLoader oldLoader = currThread.getContextClassLoader(); currThread.setContextClassLoader(ParserFactory.class.getClassLoader()); try { return docBuilder.parse(parsingFile); } finally { currThread.setContextClassLoader(oldLoader); } } }); } catch (PrivilegedActionException pae) { Throwable t = pae.getCause(); if (t instanceof SAXException) { throw (SAXException) t; } else if (t instanceof IOException) { throw (IOException) t; } } return null; }
class class_name[name] begin[{] method[parseDocument, return_type[type[Document]], modifier[public static], parameter[builder, file]] begin[{] local_variable[type[DocumentBuilder], docBuilder] local_variable[type[File], parsingFile] TryStatement(block=[ReturnStatement(expression=Cast(expression=MethodInvocation(arguments=[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=currentThread, postfix_operators=[], prefix_operators=[], qualifier=Thread, selectors=[], type_arguments=None), name=currThread)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Thread, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getContextClassLoader, postfix_operators=[], prefix_operators=[], qualifier=currThread, selectors=[], type_arguments=None), name=oldLoader)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ClassLoader, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getClassLoader, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=ParserFactory, sub_type=None))], member=setContextClassLoader, postfix_operators=[], prefix_operators=[], qualifier=currThread, selectors=[], type_arguments=None), label=None), TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=parsingFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parse, postfix_operators=[], prefix_operators=[], qualifier=docBuilder, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=oldLoader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setContextClassLoader, postfix_operators=[], prefix_operators=[], qualifier=currThread, selectors=[], type_arguments=None), label=None)], label=None, resources=None)], documentation=None, modifiers={'public'}, name=run, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None), throws=['SAXException', 'IOException'], type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PrivilegedExceptionAction, sub_type=None))], member=doPrivileged, postfix_operators=[], prefix_operators=[], qualifier=AccessController, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Document, sub_type=None)), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getCause, postfix_operators=[], prefix_operators=[], qualifier=pae, selectors=[], type_arguments=None), name=t)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Throwable, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=SAXException, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=IOException, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=Cast(expression=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=IOException, sub_type=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=Cast(expression=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=SAXException, sub_type=None)), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=pae, types=['PrivilegedActionException']))], finally_block=None, label=None, resources=None) return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Document] identifier[parseDocument] operator[SEP] identifier[DocumentBuilder] identifier[builder] , identifier[File] identifier[file] operator[SEP] Keyword[throws] identifier[IOException] , identifier[SAXException] { Keyword[final] identifier[DocumentBuilder] identifier[docBuilder] operator[=] identifier[builder] operator[SEP] Keyword[final] identifier[File] identifier[parsingFile] operator[=] identifier[file] operator[SEP] Keyword[try] { Keyword[return] operator[SEP] identifier[Document] operator[SEP] identifier[AccessController] operator[SEP] identifier[doPrivileged] operator[SEP] Keyword[new] identifier[PrivilegedExceptionAction] operator[SEP] operator[SEP] { Keyword[public] identifier[Object] identifier[run] operator[SEP] operator[SEP] Keyword[throws] identifier[SAXException] , identifier[IOException] { identifier[Thread] identifier[currThread] operator[=] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] identifier[ClassLoader] identifier[oldLoader] operator[=] identifier[currThread] operator[SEP] identifier[getContextClassLoader] operator[SEP] operator[SEP] operator[SEP] identifier[currThread] operator[SEP] identifier[setContextClassLoader] operator[SEP] identifier[ParserFactory] operator[SEP] Keyword[class] operator[SEP] identifier[getClassLoader] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[return] identifier[docBuilder] operator[SEP] identifier[parse] operator[SEP] identifier[parsingFile] operator[SEP] operator[SEP] } Keyword[finally] { identifier[currThread] operator[SEP] identifier[setContextClassLoader] operator[SEP] identifier[oldLoader] operator[SEP] operator[SEP] } } } operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[PrivilegedActionException] identifier[pae] operator[SEP] { identifier[Throwable] identifier[t] operator[=] identifier[pae] operator[SEP] identifier[getCause] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[t] Keyword[instanceof] identifier[SAXException] operator[SEP] { Keyword[throw] operator[SEP] identifier[SAXException] operator[SEP] identifier[t] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[t] Keyword[instanceof] identifier[IOException] operator[SEP] { Keyword[throw] operator[SEP] identifier[IOException] operator[SEP] identifier[t] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
private static long switchValue8(long currentHexValue, int digitCount) { long result = 0x7 & currentHexValue; int shift = 0; while(--digitCount > 0) { shift += 3; currentHexValue >>>= 4; result |= (0x7 & currentHexValue) << shift; } return result; }
class class_name[name] begin[{] method[switchValue8, return_type[type[long]], modifier[private static], parameter[currentHexValue, digitCount]] begin[{] local_variable[type[long], result] local_variable[type[int], shift] while[binary_operation[member[.digitCount], >, literal[0]]] begin[{] assign[member[.shift], literal[3]] assign[member[.currentHexValue], literal[4]] assign[member[.result], binary_operation[binary_operation[literal[0x7], &, member[.currentHexValue]], <<, member[.shift]]] end[}] return[member[.result]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[long] identifier[switchValue8] operator[SEP] Keyword[long] identifier[currentHexValue] , Keyword[int] identifier[digitCount] operator[SEP] { Keyword[long] identifier[result] operator[=] literal[Integer] operator[&] identifier[currentHexValue] operator[SEP] Keyword[int] identifier[shift] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] operator[--] identifier[digitCount] operator[>] Other[0] operator[SEP] { identifier[shift] operator[+=] Other[3] operator[SEP] identifier[currentHexValue] operator[>>>=] Other[4] operator[SEP] identifier[result] operator[|=] operator[SEP] literal[Integer] operator[&] identifier[currentHexValue] operator[SEP] operator[<<] identifier[shift] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public static double pixelXToLongitude(double pixelX, long mapSize) { if (pixelX < 0 || pixelX > mapSize) { throw new IllegalArgumentException("invalid pixelX coordinate " + mapSize + ": " + pixelX); } return 360 * ((pixelX / mapSize) - 0.5); }
class class_name[name] begin[{] method[pixelXToLongitude, return_type[type[double]], modifier[public static], parameter[pixelX, mapSize]] begin[{] if[binary_operation[binary_operation[member[.pixelX], <, literal[0]], ||, binary_operation[member[.pixelX], >, member[.mapSize]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="invalid pixelX coordinate "), operandr=MemberReference(member=mapSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=": "), operator=+), operandr=MemberReference(member=pixelX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] return[binary_operation[literal[360], *, binary_operation[binary_operation[member[.pixelX], /, member[.mapSize]], -, literal[0.5]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[pixelXToLongitude] operator[SEP] Keyword[double] identifier[pixelX] , Keyword[long] identifier[mapSize] operator[SEP] { Keyword[if] operator[SEP] identifier[pixelX] operator[<] Other[0] operator[||] identifier[pixelX] operator[>] identifier[mapSize] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[mapSize] operator[+] literal[String] operator[+] identifier[pixelX] operator[SEP] operator[SEP] } Keyword[return] Other[360] operator[*] operator[SEP] operator[SEP] identifier[pixelX] operator[/] identifier[mapSize] operator[SEP] operator[-] literal[Float] operator[SEP] operator[SEP] }
public static Optional<Path> createTempDirPathAsOpt(Path path) { debug(log, "createTempDirPathAsOpt", path); try { return Optional.of(Files.createTempDirectory(path.toString())) .filter(JMPath.ExistFilter) .map(JMPathOperation::deleteOnExit); } catch (Exception e) { return JMExceptionManager.handleExceptionAndReturnEmptyOptional(log, e, "createTempDirPathAsOpt", path); } }
class class_name[name] begin[{] method[createTempDirPathAsOpt, return_type[type[Optional]], modifier[public static], parameter[path]] begin[{] call[.debug, parameter[member[.log], literal["createTempDirPathAsOpt"], member[.path]]] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=path, selectors=[], type_arguments=None)], member=createTempDirectory, postfix_operators=[], prefix_operators=[], qualifier=Files, selectors=[], type_arguments=None)], member=of, postfix_operators=[], prefix_operators=[], qualifier=Optional, selectors=[MethodInvocation(arguments=[MemberReference(member=ExistFilter, postfix_operators=[], prefix_operators=[], qualifier=JMPath, selectors=[])], member=filter, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodReference(expression=MemberReference(member=JMPathOperation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), method=MemberReference(member=deleteOnExit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[])], member=map, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=log, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="createTempDirPathAsOpt"), MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=handleExceptionAndReturnEmptyOptional, postfix_operators=[], prefix_operators=[], qualifier=JMExceptionManager, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[Optional] operator[<] identifier[Path] operator[>] identifier[createTempDirPathAsOpt] operator[SEP] identifier[Path] identifier[path] operator[SEP] { identifier[debug] operator[SEP] identifier[log] , literal[String] , identifier[path] operator[SEP] operator[SEP] Keyword[try] { Keyword[return] identifier[Optional] operator[SEP] identifier[of] operator[SEP] identifier[Files] operator[SEP] identifier[createTempDirectory] operator[SEP] identifier[path] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[JMPath] operator[SEP] identifier[ExistFilter] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[JMPathOperation] operator[::] identifier[deleteOnExit] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[return] identifier[JMExceptionManager] operator[SEP] identifier[handleExceptionAndReturnEmptyOptional] operator[SEP] identifier[log] , identifier[e] , literal[String] , identifier[path] operator[SEP] operator[SEP] } }
private static IQ respondError(AdHocCommandData response, StanzaError.Builder error) { response.setType(IQ.Type.error); response.setError(error); return response; }
class class_name[name] begin[{] method[respondError, return_type[type[IQ]], modifier[private static], parameter[response, error]] begin[{] call[response.setType, parameter[member[IQ.Type.error]]] call[response.setError, parameter[member[.error]]] return[member[.response]] end[}] END[}]
Keyword[private] Keyword[static] identifier[IQ] identifier[respondError] operator[SEP] identifier[AdHocCommandData] identifier[response] , identifier[StanzaError] operator[SEP] identifier[Builder] identifier[error] operator[SEP] { identifier[response] operator[SEP] identifier[setType] operator[SEP] identifier[IQ] operator[SEP] identifier[Type] operator[SEP] identifier[error] operator[SEP] operator[SEP] identifier[response] operator[SEP] identifier[setError] operator[SEP] identifier[error] operator[SEP] operator[SEP] Keyword[return] identifier[response] operator[SEP] }
@Override public void onTaskFailure(Execution taskExecution, Throwable cause) { final ExecutionVertex ev = taskExecution.getVertex(); final FailoverRegion failoverRegion = vertexToRegion.get(ev); if (failoverRegion == null) { executionGraph.failGlobal(new FlinkException( "Can not find a failover region for the execution " + ev.getTaskNameWithSubtaskIndex(), cause)); } else { LOG.info("Recovering task failure for {} #{} ({}) via restart of failover region", taskExecution.getVertex().getTaskNameWithSubtaskIndex(), taskExecution.getAttemptNumber(), taskExecution.getAttemptId()); failoverRegion.onExecutionFail(taskExecution, cause); } }
class class_name[name] begin[{] method[onTaskFailure, return_type[void], modifier[public], parameter[taskExecution, cause]] begin[{] local_variable[type[ExecutionVertex], ev] local_variable[type[FailoverRegion], failoverRegion] if[binary_operation[member[.failoverRegion], ==, literal[null]]] begin[{] call[executionGraph.failGlobal, parameter[ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Can not find a failover region for the execution "), operandr=MethodInvocation(arguments=[], member=getTaskNameWithSubtaskIndex, postfix_operators=[], prefix_operators=[], qualifier=ev, selectors=[], type_arguments=None), operator=+), MemberReference(member=cause, 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=FlinkException, sub_type=None))]] else begin[{] call[LOG.info, parameter[literal["Recovering task failure for {} #{} ({}) via restart of failover region"], call[taskExecution.getVertex, parameter[]], call[taskExecution.getAttemptNumber, parameter[]], call[taskExecution.getAttemptId, parameter[]]]] call[failoverRegion.onExecutionFail, parameter[member[.taskExecution], member[.cause]]] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onTaskFailure] operator[SEP] identifier[Execution] identifier[taskExecution] , identifier[Throwable] identifier[cause] operator[SEP] { Keyword[final] identifier[ExecutionVertex] identifier[ev] operator[=] identifier[taskExecution] operator[SEP] identifier[getVertex] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[FailoverRegion] identifier[failoverRegion] operator[=] identifier[vertexToRegion] operator[SEP] identifier[get] operator[SEP] identifier[ev] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[failoverRegion] operator[==] Other[null] operator[SEP] { identifier[executionGraph] operator[SEP] identifier[failGlobal] operator[SEP] Keyword[new] identifier[FlinkException] operator[SEP] literal[String] operator[+] identifier[ev] operator[SEP] identifier[getTaskNameWithSubtaskIndex] operator[SEP] operator[SEP] , identifier[cause] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[taskExecution] operator[SEP] identifier[getVertex] operator[SEP] operator[SEP] operator[SEP] identifier[getTaskNameWithSubtaskIndex] operator[SEP] operator[SEP] , identifier[taskExecution] operator[SEP] identifier[getAttemptNumber] operator[SEP] operator[SEP] , identifier[taskExecution] operator[SEP] identifier[getAttemptId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[failoverRegion] operator[SEP] identifier[onExecutionFail] operator[SEP] identifier[taskExecution] , identifier[cause] operator[SEP] operator[SEP] } }
public static Properties readProperties( InputStream stream, Properties mappings, boolean closeStream ) throws IOException { try { Properties p = new Properties(); p.load( stream ); mappings.putAll( p ); boolean doAgain = true; while( doAgain ) { doAgain = false; for( Map.Entry<Object, Object> entry : p.entrySet() ) { String value = (String) entry.getValue(); if( value.indexOf( "${" ) >= 0 ) { value = resolveProperty( mappings, value ); entry.setValue( value ); doAgain = true; } } } return p; } finally { if( closeStream ) { stream.close(); } } }
class class_name[name] begin[{] method[readProperties, return_type[type[Properties]], modifier[public static], parameter[stream, mappings, closeStream]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Properties, sub_type=None)), name=p)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Properties, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=stream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=load, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=putAll, postfix_operators=[], prefix_operators=[], qualifier=mappings, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), name=doAgain)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=doAgain, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="${")], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=mappings, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=resolveProperty, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=doAgain, 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=entrySet, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None)]), condition=MemberReference(member=doAgain, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), ReturnStatement(expression=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=None, finally_block=[IfStatement(condition=MemberReference(member=closeStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=stream, selectors=[], type_arguments=None), label=None)]))], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[Properties] identifier[readProperties] operator[SEP] identifier[InputStream] identifier[stream] , identifier[Properties] identifier[mappings] , Keyword[boolean] identifier[closeStream] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[try] { identifier[Properties] identifier[p] operator[=] Keyword[new] identifier[Properties] operator[SEP] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[load] operator[SEP] identifier[stream] operator[SEP] operator[SEP] identifier[mappings] operator[SEP] identifier[putAll] operator[SEP] identifier[p] operator[SEP] operator[SEP] Keyword[boolean] identifier[doAgain] operator[=] literal[boolean] operator[SEP] Keyword[while] operator[SEP] identifier[doAgain] operator[SEP] { identifier[doAgain] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[Object] , identifier[Object] operator[>] identifier[entry] operator[:] identifier[p] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[value] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[>=] Other[0] operator[SEP] { identifier[value] operator[=] identifier[resolveProperty] operator[SEP] identifier[mappings] , identifier[value] operator[SEP] operator[SEP] identifier[entry] operator[SEP] identifier[setValue] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[doAgain] operator[=] literal[boolean] operator[SEP] } } } Keyword[return] identifier[p] operator[SEP] } Keyword[finally] { Keyword[if] operator[SEP] identifier[closeStream] operator[SEP] { identifier[stream] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } }
public <K> Stream<T> distinctBy(final Function<? super T, K> keyMapper, final Predicate<? super Long> occurrencesFilter) { final Supplier<? extends Map<Keyed<K, T>, Long>> supplier = isParallel() ? Suppliers.<Keyed<K, T>, Long> ofConcurrentHashMap() : Suppliers.<Keyed<K, T>, Long> ofLinkedHashMap(); return groupBy(Fn.<K, T> keyed(keyMapper), Collectors.counting(), supplier).filter(Fn.<Keyed<K, T>, Long> testByValue(occurrencesFilter)) .map(Fn.<T, K, Long> kk()); }
class class_name[name] begin[{] method[distinctBy, return_type[type[Stream]], modifier[public], parameter[keyMapper, occurrencesFilter]] begin[{] local_variable[type[Supplier], supplier] return[call[.groupBy, parameter[call[.Fn, parameter[member[.keyMapper]]], call[Collectors.counting, parameter[]], member[.supplier]]]] end[}] END[}]
Keyword[public] operator[<] identifier[K] operator[>] identifier[Stream] operator[<] identifier[T] operator[>] identifier[distinctBy] operator[SEP] Keyword[final] identifier[Function] operator[<] operator[?] Keyword[super] identifier[T] , identifier[K] operator[>] identifier[keyMapper] , Keyword[final] identifier[Predicate] operator[<] operator[?] Keyword[super] identifier[Long] operator[>] identifier[occurrencesFilter] operator[SEP] { Keyword[final] identifier[Supplier] operator[<] operator[?] Keyword[extends] identifier[Map] operator[<] identifier[Keyed] operator[<] identifier[K] , identifier[T] operator[>] , identifier[Long] operator[>] operator[>] identifier[supplier] operator[=] identifier[isParallel] operator[SEP] operator[SEP] operator[?] identifier[Suppliers] operator[SEP] operator[<] identifier[Keyed] operator[<] identifier[K] , identifier[T] operator[>] , identifier[Long] operator[>] identifier[ofConcurrentHashMap] operator[SEP] operator[SEP] operator[:] identifier[Suppliers] operator[SEP] operator[<] identifier[Keyed] operator[<] identifier[K] , identifier[T] operator[>] , identifier[Long] operator[>] identifier[ofLinkedHashMap] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[groupBy] operator[SEP] identifier[Fn] operator[SEP] operator[<] identifier[K] , identifier[T] operator[>] identifier[keyed] operator[SEP] identifier[keyMapper] operator[SEP] , identifier[Collectors] operator[SEP] identifier[counting] operator[SEP] operator[SEP] , identifier[supplier] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[Fn] operator[SEP] operator[<] identifier[Keyed] operator[<] identifier[K] , identifier[T] operator[>] , identifier[Long] operator[>] identifier[testByValue] operator[SEP] identifier[occurrencesFilter] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[Fn] operator[SEP] operator[<] identifier[T] , identifier[K] , identifier[Long] operator[>] identifier[kk] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Observable<T> debounce(long timeout, TimeUnit unit) { return debounce(timeout, unit, Schedulers.computation()); }
class class_name[name] begin[{] method[debounce, return_type[type[Observable]], modifier[final public], parameter[timeout, unit]] begin[{] return[call[.debounce, parameter[member[.timeout], member[.unit], call[Schedulers.computation, parameter[]]]]] end[}] END[}]
annotation[@] identifier[CheckReturnValue] annotation[@] identifier[SchedulerSupport] operator[SEP] identifier[SchedulerSupport] operator[SEP] identifier[COMPUTATION] operator[SEP] Keyword[public] Keyword[final] identifier[Observable] operator[<] identifier[T] operator[>] identifier[debounce] operator[SEP] Keyword[long] identifier[timeout] , identifier[TimeUnit] identifier[unit] operator[SEP] { Keyword[return] identifier[debounce] operator[SEP] identifier[timeout] , identifier[unit] , identifier[Schedulers] operator[SEP] identifier[computation] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static Builder newBuilder(TableId destinationTable, List<TableId> sourceTables) { return new Builder().setDestinationTable(destinationTable).setSourceTables(sourceTables); }
class class_name[name] begin[{] method[newBuilder, return_type[type[Builder]], modifier[public static], parameter[destinationTable, sourceTables]] begin[{] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=destinationTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setDestinationTable, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=sourceTables, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setSourceTables, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Builder, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Builder] identifier[newBuilder] operator[SEP] identifier[TableId] identifier[destinationTable] , identifier[List] operator[<] identifier[TableId] operator[>] identifier[sourceTables] operator[SEP] { Keyword[return] Keyword[new] identifier[Builder] operator[SEP] operator[SEP] operator[SEP] identifier[setDestinationTable] operator[SEP] identifier[destinationTable] operator[SEP] operator[SEP] identifier[setSourceTables] operator[SEP] identifier[sourceTables] operator[SEP] operator[SEP] }
public String getFirstHeaderStringValue(String name) { Object value = get(name.toLowerCase(Locale.US)); if (value == null) { return null; } Class<? extends Object> valueClass = value.getClass(); if (value instanceof Iterable<?> || valueClass.isArray()) { for (Object repeatedValue : Types.iterableOf(value)) { return toStringValue(repeatedValue); } } return toStringValue(value); }
class class_name[name] begin[{] method[getFirstHeaderStringValue, return_type[type[String]], modifier[public], parameter[name]] begin[{] local_variable[type[Object], value] if[binary_operation[member[.value], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[Class], valueClass] if[binary_operation[binary_operation[member[.value], instanceof, type[Iterable]], ||, call[valueClass.isArray, parameter[]]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=repeatedValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toStringValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=iterableOf, postfix_operators=[], prefix_operators=[], qualifier=Types, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=repeatedValue)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))), label=None) else begin[{] None end[}] return[call[.toStringValue, parameter[member[.value]]]] end[}] END[}]
Keyword[public] identifier[String] identifier[getFirstHeaderStringValue] operator[SEP] identifier[String] identifier[name] operator[SEP] { identifier[Object] identifier[value] operator[=] identifier[get] operator[SEP] identifier[name] operator[SEP] identifier[toLowerCase] operator[SEP] identifier[Locale] operator[SEP] identifier[US] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Object] operator[>] identifier[valueClass] operator[=] identifier[value] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[Iterable] operator[<] operator[?] operator[>] operator[||] identifier[valueClass] operator[SEP] identifier[isArray] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[Object] identifier[repeatedValue] operator[:] identifier[Types] operator[SEP] identifier[iterableOf] operator[SEP] identifier[value] operator[SEP] operator[SEP] { Keyword[return] identifier[toStringValue] operator[SEP] identifier[repeatedValue] operator[SEP] operator[SEP] } } Keyword[return] identifier[toStringValue] operator[SEP] identifier[value] operator[SEP] operator[SEP] }
@Override public Enumeration<String> getHeaderNames() { List<String> names = this.request.getHeaderNames(); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "getHeaderNames: " + names.size()); } return Collections.enumeration(names); }
class class_name[name] begin[{] method[getHeaderNames, return_type[type[Enumeration]], modifier[public], parameter[]] begin[{] local_variable[type[List], names] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[literal["getHeaderNames: "], +, call[names.size, parameter[]]]]] else begin[{] None end[}] return[call[Collections.enumeration, parameter[member[.names]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Enumeration] operator[<] identifier[String] operator[>] identifier[getHeaderNames] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[names] operator[=] Keyword[this] operator[SEP] identifier[request] operator[SEP] identifier[getHeaderNames] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[names] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[Collections] operator[SEP] identifier[enumeration] operator[SEP] identifier[names] operator[SEP] operator[SEP] }
public void setMonths(String[] newMonths, int context, int width) { switch (context) { case FORMAT : switch(width) { case WIDE : months = duplicate(newMonths); break; case ABBREVIATED : shortMonths = duplicate(newMonths); break; case NARROW : narrowMonths = duplicate(newMonths); break; default : // HANDLE SHORT, etc. break; } break; case STANDALONE : switch(width) { case WIDE : standaloneMonths = duplicate(newMonths); break; case ABBREVIATED : standaloneShortMonths = duplicate(newMonths); break; case NARROW : standaloneNarrowMonths = duplicate(newMonths); break; default : // HANDLE SHORT, etc. break; } break; } }
class class_name[name] begin[{] method[setMonths, return_type[void], modifier[public], parameter[newMonths, context, width]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['FORMAT'], statements=[SwitchStatement(cases=[SwitchStatementCase(case=['WIDE'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=months, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=newMonths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=duplicate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['ABBREVIATED'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=shortMonths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=newMonths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=duplicate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['NARROW'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=narrowMonths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=newMonths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=duplicate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=None, label=None)])], expression=MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['STANDALONE'], statements=[SwitchStatement(cases=[SwitchStatementCase(case=['WIDE'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=standaloneMonths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=newMonths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=duplicate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['ABBREVIATED'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=standaloneShortMonths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=newMonths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=duplicate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['NARROW'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=standaloneNarrowMonths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=newMonths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=duplicate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=None, label=None)])], expression=MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[setMonths] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[newMonths] , Keyword[int] identifier[context] , Keyword[int] identifier[width] operator[SEP] { Keyword[switch] operator[SEP] identifier[context] operator[SEP] { Keyword[case] identifier[FORMAT] operator[:] Keyword[switch] operator[SEP] identifier[width] operator[SEP] { Keyword[case] identifier[WIDE] operator[:] identifier[months] operator[=] identifier[duplicate] operator[SEP] identifier[newMonths] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[ABBREVIATED] operator[:] identifier[shortMonths] operator[=] identifier[duplicate] operator[SEP] identifier[newMonths] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[NARROW] operator[:] identifier[narrowMonths] operator[=] identifier[duplicate] operator[SEP] identifier[newMonths] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[break] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[STANDALONE] operator[:] Keyword[switch] operator[SEP] identifier[width] operator[SEP] { Keyword[case] identifier[WIDE] operator[:] identifier[standaloneMonths] operator[=] identifier[duplicate] operator[SEP] identifier[newMonths] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[ABBREVIATED] operator[:] identifier[standaloneShortMonths] operator[=] identifier[duplicate] operator[SEP] identifier[newMonths] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[NARROW] operator[:] identifier[standaloneNarrowMonths] operator[=] identifier[duplicate] operator[SEP] identifier[newMonths] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[break] operator[SEP] } Keyword[break] operator[SEP] } }
public int executeUpdate(String name, DataObject object) throws SQLException { ParametricStatement statement = _statements.get(name); if (statement != null) { return statement.executeUpdate(DataSourceUtils.getConnection(_dataSource), object); } else { throw new RuntimeException("ParametricStatement '" + name + "' not found"); } }
class class_name[name] begin[{] method[executeUpdate, return_type[type[int]], modifier[public], parameter[name, object]] begin[{] local_variable[type[ParametricStatement], statement] if[binary_operation[member[.statement], !=, literal[null]]] begin[{] return[call[statement.executeUpdate, parameter[call[DataSourceUtils.getConnection, parameter[member[._dataSource]]], member[.object]]]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ParametricStatement '"), operandr=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' not found"), 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) end[}] end[}] END[}]
Keyword[public] Keyword[int] identifier[executeUpdate] operator[SEP] identifier[String] identifier[name] , identifier[DataObject] identifier[object] operator[SEP] Keyword[throws] identifier[SQLException] { identifier[ParametricStatement] identifier[statement] operator[=] identifier[_statements] operator[SEP] identifier[get] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[statement] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[statement] operator[SEP] identifier[executeUpdate] operator[SEP] identifier[DataSourceUtils] operator[SEP] identifier[getConnection] operator[SEP] identifier[_dataSource] operator[SEP] , identifier[object] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[+] identifier[name] operator[+] literal[String] operator[SEP] operator[SEP] } }
public static MessageManager getMessageManager(App app) { return RemoteMessageManager.getMessageManager(app, null, null, true); }
class class_name[name] begin[{] method[getMessageManager, return_type[type[MessageManager]], modifier[public static], parameter[app]] begin[{] return[call[RemoteMessageManager.getMessageManager, parameter[member[.app], literal[null], literal[null], literal[true]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[MessageManager] identifier[getMessageManager] operator[SEP] identifier[App] identifier[app] operator[SEP] { Keyword[return] identifier[RemoteMessageManager] operator[SEP] identifier[getMessageManager] operator[SEP] identifier[app] , Other[null] , Other[null] , literal[boolean] operator[SEP] operator[SEP] }
public static Token[] optimize(Token[] tokens) { if (tokens == null) { return null; } String firstVal = null; String lastVal = null; if (tokens.length == 1) { if (tokens[0].getType() == TokenType.TEXT) { firstVal = tokens[0].getDefaultValue(); } } else if (tokens.length > 1) { if (tokens[0].getType() == TokenType.TEXT) { firstVal = tokens[0].getDefaultValue(); } if (tokens[tokens.length - 1].getType() == TokenType.TEXT) { lastVal = tokens[tokens.length - 1].getDefaultValue(); } } if (firstVal != null) { String text = trimLeadingWhitespace(firstVal); if (!Objects.equals(firstVal, text)) { tokens[0] = new Token(text); } } if (lastVal != null && !lastVal.isEmpty()) { String text = trimTrailingWhitespace(lastVal); if (!Objects.equals(lastVal, text)) { tokens[tokens.length - 1] = new Token(text); } } return tokens; }
class class_name[name] begin[{] method[optimize, return_type[type[Token]], modifier[public static], parameter[tokens]] begin[{] if[binary_operation[member[.tokens], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[String], firstVal] local_variable[type[String], lastVal] if[binary_operation[member[tokens.length], ==, literal[1]]] begin[{] if[binary_operation[member[.tokens], ==, member[TokenType.TEXT]]] begin[{] assign[member[.firstVal], member[.tokens]] else begin[{] None end[}] else begin[{] if[binary_operation[member[tokens.length], >, literal[1]]] begin[{] if[binary_operation[member[.tokens], ==, member[TokenType.TEXT]]] begin[{] assign[member[.firstVal], member[.tokens]] else begin[{] None end[}] if[binary_operation[member[.tokens], ==, member[TokenType.TEXT]]] begin[{] assign[member[.lastVal], member[.tokens]] else begin[{] None end[}] else begin[{] None end[}] end[}] if[binary_operation[member[.firstVal], !=, literal[null]]] begin[{] local_variable[type[String], text] if[call[Objects.equals, parameter[member[.firstVal], member[.text]]]] begin[{] assign[member[.tokens], ClassCreator(arguments=[MemberReference(member=text, 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=Token, sub_type=None))] else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[binary_operation[member[.lastVal], !=, literal[null]], &&, call[lastVal.isEmpty, parameter[]]]] begin[{] local_variable[type[String], text] if[call[Objects.equals, parameter[member[.lastVal], member[.text]]]] begin[{] assign[member[.tokens], ClassCreator(arguments=[MemberReference(member=text, 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=Token, sub_type=None))] else begin[{] None end[}] else begin[{] None end[}] return[member[.tokens]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Token] operator[SEP] operator[SEP] identifier[optimize] operator[SEP] identifier[Token] operator[SEP] operator[SEP] identifier[tokens] operator[SEP] { Keyword[if] operator[SEP] identifier[tokens] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[String] identifier[firstVal] operator[=] Other[null] operator[SEP] identifier[String] identifier[lastVal] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[tokens] operator[SEP] identifier[length] operator[==] Other[1] operator[SEP] { Keyword[if] operator[SEP] identifier[tokens] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[==] identifier[TokenType] operator[SEP] identifier[TEXT] operator[SEP] { identifier[firstVal] operator[=] identifier[tokens] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getDefaultValue] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[tokens] operator[SEP] identifier[length] operator[>] Other[1] operator[SEP] { Keyword[if] operator[SEP] identifier[tokens] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[==] identifier[TokenType] operator[SEP] identifier[TEXT] operator[SEP] { identifier[firstVal] operator[=] identifier[tokens] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getDefaultValue] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[tokens] operator[SEP] identifier[tokens] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[==] identifier[TokenType] operator[SEP] identifier[TEXT] operator[SEP] { identifier[lastVal] operator[=] identifier[tokens] operator[SEP] identifier[tokens] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] operator[SEP] identifier[getDefaultValue] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[firstVal] operator[!=] Other[null] operator[SEP] { identifier[String] identifier[text] operator[=] identifier[trimLeadingWhitespace] operator[SEP] identifier[firstVal] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[Objects] operator[SEP] identifier[equals] operator[SEP] identifier[firstVal] , identifier[text] operator[SEP] operator[SEP] { identifier[tokens] operator[SEP] Other[0] operator[SEP] operator[=] Keyword[new] identifier[Token] operator[SEP] identifier[text] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[lastVal] operator[!=] Other[null] operator[&&] operator[!] identifier[lastVal] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[text] operator[=] identifier[trimTrailingWhitespace] operator[SEP] identifier[lastVal] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[Objects] operator[SEP] identifier[equals] operator[SEP] identifier[lastVal] , identifier[text] operator[SEP] operator[SEP] { identifier[tokens] operator[SEP] identifier[tokens] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] operator[=] Keyword[new] identifier[Token] operator[SEP] identifier[text] operator[SEP] operator[SEP] } } Keyword[return] identifier[tokens] operator[SEP] }
@Deprecated public static ParquetMetadata mergeMetadataFiles(List<Path> files, Configuration conf) throws IOException { Preconditions.checkArgument(!files.isEmpty(), "Cannot merge an empty list of metadata"); GlobalMetaData globalMetaData = null; List<BlockMetaData> blocks = new ArrayList<BlockMetaData>(); for (Path p : files) { ParquetMetadata pmd = ParquetFileReader.readFooter(conf, p, ParquetMetadataConverter.NO_FILTER); FileMetaData fmd = pmd.getFileMetaData(); globalMetaData = mergeInto(fmd, globalMetaData, true); blocks.addAll(pmd.getBlocks()); } // collapse GlobalMetaData into a single FileMetaData, which will throw if they are not compatible return new ParquetMetadata(globalMetaData.merge(), blocks); }
class class_name[name] begin[{] method[mergeMetadataFiles, return_type[type[ParquetMetadata]], modifier[public static], parameter[files, conf]] begin[{] call[Preconditions.checkArgument, parameter[call[files.isEmpty, parameter[]], literal["Cannot merge an empty list of metadata"]]] local_variable[type[GlobalMetaData], globalMetaData] local_variable[type[List], blocks] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=conf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=NO_FILTER, postfix_operators=[], prefix_operators=[], qualifier=ParquetMetadataConverter, selectors=[])], member=readFooter, postfix_operators=[], prefix_operators=[], qualifier=ParquetFileReader, selectors=[], type_arguments=None), name=pmd)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ParquetMetadata, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getFileMetaData, postfix_operators=[], prefix_operators=[], qualifier=pmd, selectors=[], type_arguments=None), name=fmd)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FileMetaData, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=globalMetaData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=fmd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=globalMetaData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=mergeInto, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getBlocks, postfix_operators=[], prefix_operators=[], qualifier=pmd, selectors=[], type_arguments=None)], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=blocks, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=files, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=p)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Path, sub_type=None))), label=None) return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=merge, postfix_operators=[], prefix_operators=[], qualifier=globalMetaData, selectors=[], type_arguments=None), MemberReference(member=blocks, 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=ParquetMetadata, sub_type=None))] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[public] Keyword[static] identifier[ParquetMetadata] identifier[mergeMetadataFiles] operator[SEP] identifier[List] operator[<] identifier[Path] operator[>] identifier[files] , identifier[Configuration] identifier[conf] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] operator[!] identifier[files] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[GlobalMetaData] identifier[globalMetaData] operator[=] Other[null] operator[SEP] identifier[List] operator[<] identifier[BlockMetaData] operator[>] identifier[blocks] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[BlockMetaData] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Path] identifier[p] operator[:] identifier[files] operator[SEP] { identifier[ParquetMetadata] identifier[pmd] operator[=] identifier[ParquetFileReader] operator[SEP] identifier[readFooter] operator[SEP] identifier[conf] , identifier[p] , identifier[ParquetMetadataConverter] operator[SEP] identifier[NO_FILTER] operator[SEP] operator[SEP] identifier[FileMetaData] identifier[fmd] operator[=] identifier[pmd] operator[SEP] identifier[getFileMetaData] operator[SEP] operator[SEP] operator[SEP] identifier[globalMetaData] operator[=] identifier[mergeInto] operator[SEP] identifier[fmd] , identifier[globalMetaData] , literal[boolean] operator[SEP] operator[SEP] identifier[blocks] operator[SEP] identifier[addAll] operator[SEP] identifier[pmd] operator[SEP] identifier[getBlocks] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[ParquetMetadata] operator[SEP] identifier[globalMetaData] operator[SEP] identifier[merge] operator[SEP] operator[SEP] , identifier[blocks] operator[SEP] operator[SEP] }
private String parameterToString(Object param) { if (param == null) { return ""; } else if (param instanceof Date) { return formatDate((Date) param); } else if (param instanceof Collection) { StringBuilder b = new StringBuilder(); for (Object o : (Collection) param) { if (b.length() > 0) { b.append(","); } b.append(String.valueOf(o)); } return b.toString(); } else { return String.valueOf(param); } }
class class_name[name] begin[{] method[parameterToString, return_type[type[String]], modifier[private], parameter[param]] begin[{] if[binary_operation[member[.param], ==, literal[null]]] begin[{] return[literal[""]] else begin[{] if[binary_operation[member[.param], instanceof, type[Date]]] begin[{] return[call[.formatDate, parameter[Cast(expression=MemberReference(member=param, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Date, sub_type=None))]]] else begin[{] if[binary_operation[member[.param], instanceof, type[Collection]]] begin[{] local_variable[type[StringBuilder], b] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=b, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=",")], member=append, postfix_operators=[], prefix_operators=[], qualifier=b, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=b, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=Cast(expression=MemberReference(member=param, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Collection, sub_type=None)), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=o)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))), label=None) return[call[b.toString, parameter[]]] else begin[{] return[call[String.valueOf, parameter[member[.param]]]] end[}] end[}] end[}] end[}] END[}]
Keyword[private] identifier[String] identifier[parameterToString] operator[SEP] identifier[Object] identifier[param] operator[SEP] { Keyword[if] operator[SEP] identifier[param] operator[==] Other[null] operator[SEP] { Keyword[return] literal[String] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[param] Keyword[instanceof] identifier[Date] operator[SEP] { Keyword[return] identifier[formatDate] operator[SEP] operator[SEP] identifier[Date] operator[SEP] identifier[param] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[param] Keyword[instanceof] identifier[Collection] operator[SEP] { identifier[StringBuilder] identifier[b] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Object] identifier[o] operator[:] operator[SEP] identifier[Collection] operator[SEP] identifier[param] operator[SEP] { Keyword[if] operator[SEP] identifier[b] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[b] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[b] operator[SEP] identifier[append] operator[SEP] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[o] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[b] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[param] operator[SEP] operator[SEP] } }
public static UnixPath getPath(boolean permitEmptyComponents, String first, String... more) { if (more.length == 0) { return getPath(permitEmptyComponents, first); } StringBuilder builder = new StringBuilder(first); for (int i = 0; i < more.length; i++) { String part = more[i]; if (part.isEmpty()) { continue; } else if (isAbsoluteInternal(part)) { if (i == more.length - 1) { return new UnixPath(permitEmptyComponents, part); } else { builder.replace(0, builder.length(), part); } } else if (hasTrailingSeparatorInternal(builder)) { builder.append(part); } else { builder.append(SEPARATOR); builder.append(part); } } return new UnixPath(permitEmptyComponents, builder.toString()); }
class class_name[name] begin[{] method[getPath, return_type[type[UnixPath]], modifier[public static], parameter[permitEmptyComponents, first, more]] begin[{] if[binary_operation[member[more.length], ==, literal[0]]] begin[{] return[call[.getPath, parameter[member[.permitEmptyComponents], member[.first]]]] else begin[{] None end[}] local_variable[type[StringBuilder], builder] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=more, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=part)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=part, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=part, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isAbsoluteInternal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=builder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=hasTrailingSeparatorInternal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SEPARATOR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=part, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=part, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=more, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), MemberReference(member=part, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=replace, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=permitEmptyComponents, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=part, 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=UnixPath, sub_type=None)), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=more, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[ClassCreator(arguments=[MemberReference(member=permitEmptyComponents, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UnixPath, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[UnixPath] identifier[getPath] operator[SEP] Keyword[boolean] identifier[permitEmptyComponents] , identifier[String] identifier[first] , identifier[String] operator[...] identifier[more] operator[SEP] { Keyword[if] operator[SEP] identifier[more] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { Keyword[return] identifier[getPath] operator[SEP] identifier[permitEmptyComponents] , identifier[first] operator[SEP] operator[SEP] } identifier[StringBuilder] identifier[builder] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[first] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[more] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[String] identifier[part] operator[=] identifier[more] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[part] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[continue] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[isAbsoluteInternal] operator[SEP] identifier[part] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[i] operator[==] identifier[more] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] { Keyword[return] Keyword[new] identifier[UnixPath] operator[SEP] identifier[permitEmptyComponents] , identifier[part] operator[SEP] operator[SEP] } Keyword[else] { identifier[builder] operator[SEP] identifier[replace] operator[SEP] Other[0] , identifier[builder] operator[SEP] identifier[length] operator[SEP] operator[SEP] , identifier[part] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[hasTrailingSeparatorInternal] operator[SEP] identifier[builder] operator[SEP] operator[SEP] { identifier[builder] operator[SEP] identifier[append] operator[SEP] identifier[part] operator[SEP] operator[SEP] } Keyword[else] { identifier[builder] operator[SEP] identifier[append] operator[SEP] identifier[SEPARATOR] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[append] operator[SEP] identifier[part] operator[SEP] operator[SEP] } } Keyword[return] Keyword[new] identifier[UnixPath] operator[SEP] identifier[permitEmptyComponents] , identifier[builder] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static String param(HttpServletRequest request, String param, String defaultValue) { String value = request.getParameter(param); return (StringUtils.isEmpty(value)) ? defaultValue : value; }
class class_name[name] begin[{] method[param, return_type[type[String]], modifier[public static], parameter[request, param, defaultValue]] begin[{] local_variable[type[String], value] return[TernaryExpression(condition=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=StringUtils, selectors=[], type_arguments=None), if_false=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=defaultValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[param] operator[SEP] identifier[HttpServletRequest] identifier[request] , identifier[String] identifier[param] , identifier[String] identifier[defaultValue] operator[SEP] { identifier[String] identifier[value] operator[=] identifier[request] operator[SEP] identifier[getParameter] operator[SEP] identifier[param] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[?] identifier[defaultValue] operator[:] identifier[value] operator[SEP] }
public static String[] buildArrayWithDelimiter(String stringWithDelimiter, String delimiter) { return toArray(JMCollections .buildListWithDelimiter(stringWithDelimiter, delimiter)); }
class class_name[name] begin[{] method[buildArrayWithDelimiter, return_type[type[String]], modifier[public static], parameter[stringWithDelimiter, delimiter]] begin[{] return[call[.toArray, parameter[call[JMCollections.buildListWithDelimiter, parameter[member[.stringWithDelimiter], member[.delimiter]]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] operator[SEP] operator[SEP] identifier[buildArrayWithDelimiter] operator[SEP] identifier[String] identifier[stringWithDelimiter] , identifier[String] identifier[delimiter] operator[SEP] { Keyword[return] identifier[toArray] operator[SEP] identifier[JMCollections] operator[SEP] identifier[buildListWithDelimiter] operator[SEP] identifier[stringWithDelimiter] , identifier[delimiter] operator[SEP] operator[SEP] operator[SEP] }
protected boolean isBeanActionFormType(Type parameterType) { final String typeName = parameterType.getTypeName(); if (isJavaStandardClass(typeName)) { return false; } return determineBeanActionFormTypeName(typeName); }
class class_name[name] begin[{] method[isBeanActionFormType, return_type[type[boolean]], modifier[protected], parameter[parameterType]] begin[{] local_variable[type[String], typeName] if[call[.isJavaStandardClass, parameter[member[.typeName]]]] begin[{] return[literal[false]] else begin[{] None end[}] return[call[.determineBeanActionFormTypeName, parameter[member[.typeName]]]] end[}] END[}]
Keyword[protected] Keyword[boolean] identifier[isBeanActionFormType] operator[SEP] identifier[Type] identifier[parameterType] operator[SEP] { Keyword[final] identifier[String] identifier[typeName] operator[=] identifier[parameterType] operator[SEP] identifier[getTypeName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isJavaStandardClass] operator[SEP] identifier[typeName] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[return] identifier[determineBeanActionFormTypeName] operator[SEP] identifier[typeName] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") public static Object getClassInstance(String className, Class[] attrTypes, Object[] attrValues) throws DISIException { Constructor constr; try { Class cl = Class.forName(className); constr = cl.getConstructor(attrTypes); } catch (ClassNotFoundException e) { //yep, log and throw... final String errMessage = e.getClass().getSimpleName() + ": " + e.getMessage(); log.error(errMessage, e); throw new DISIException(errMessage, e); } catch (NoSuchMethodException e) { final String errMessage = e.getClass().getSimpleName() + ": " + e.getMessage(); log.error(errMessage, e); throw new DISIException(errMessage, e); } Object classInst; try { classInst = constr.newInstance(attrValues); } catch (InstantiationException e) { final String errMessage = e.getClass().getSimpleName() + ": " + e.getMessage(); log.error(errMessage, e); throw new DISIException(errMessage, e); } catch (IllegalAccessException e) { final String errMessage = e.getClass().getSimpleName() + ": " + e.getMessage(); log.error(errMessage, e); throw new DISIException(errMessage, e); } catch (InvocationTargetException e) { final String errMessage = e.getClass().getSimpleName() + ": " + e.getMessage(); log.error(errMessage, e); throw new DISIException(errMessage, e); } return classInst; }
class class_name[name] begin[{] method[getClassInstance, return_type[type[Object]], modifier[public static], parameter[className, attrTypes, attrValues]] begin[{] local_variable[type[Constructor], constr] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[], type_arguments=None), name=cl)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Class, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=constr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=attrTypes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getConstructor, postfix_operators=[], prefix_operators=[], qualifier=cl, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=": "), operator=+), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), name=errMessage)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=errMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=errMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DISIException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ClassNotFoundException'])), CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=": "), operator=+), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), name=errMessage)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=errMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=errMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DISIException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['NoSuchMethodException']))], finally_block=None, label=None, resources=None) local_variable[type[Object], classInst] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=classInst, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=attrValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=constr, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=": "), operator=+), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), name=errMessage)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=errMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=errMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DISIException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InstantiationException'])), CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=": "), operator=+), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), name=errMessage)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=errMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=errMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DISIException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IllegalAccessException'])), CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=": "), operator=+), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), name=errMessage)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=errMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=errMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DISIException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InvocationTargetException']))], finally_block=None, label=None, resources=None) return[member[.classInst]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] identifier[Object] identifier[getClassInstance] operator[SEP] identifier[String] identifier[className] , identifier[Class] operator[SEP] operator[SEP] identifier[attrTypes] , identifier[Object] operator[SEP] operator[SEP] identifier[attrValues] operator[SEP] Keyword[throws] identifier[DISIException] { identifier[Constructor] identifier[constr] operator[SEP] Keyword[try] { identifier[Class] identifier[cl] operator[=] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[className] operator[SEP] operator[SEP] identifier[constr] operator[=] identifier[cl] operator[SEP] identifier[getConstructor] operator[SEP] identifier[attrTypes] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ClassNotFoundException] identifier[e] operator[SEP] { Keyword[final] identifier[String] identifier[errMessage] operator[=] identifier[e] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[error] operator[SEP] identifier[errMessage] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[DISIException] operator[SEP] identifier[errMessage] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NoSuchMethodException] identifier[e] operator[SEP] { Keyword[final] identifier[String] identifier[errMessage] operator[=] identifier[e] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[error] operator[SEP] identifier[errMessage] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[DISIException] operator[SEP] identifier[errMessage] , identifier[e] operator[SEP] operator[SEP] } identifier[Object] identifier[classInst] operator[SEP] Keyword[try] { identifier[classInst] operator[=] identifier[constr] operator[SEP] identifier[newInstance] operator[SEP] identifier[attrValues] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InstantiationException] identifier[e] operator[SEP] { Keyword[final] identifier[String] identifier[errMessage] operator[=] identifier[e] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[error] operator[SEP] identifier[errMessage] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[DISIException] operator[SEP] identifier[errMessage] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalAccessException] identifier[e] operator[SEP] { Keyword[final] identifier[String] identifier[errMessage] operator[=] identifier[e] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[error] operator[SEP] identifier[errMessage] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[DISIException] operator[SEP] identifier[errMessage] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InvocationTargetException] identifier[e] operator[SEP] { Keyword[final] identifier[String] identifier[errMessage] operator[=] identifier[e] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[error] operator[SEP] identifier[errMessage] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[DISIException] operator[SEP] identifier[errMessage] , identifier[e] operator[SEP] operator[SEP] } Keyword[return] identifier[classInst] operator[SEP] }
public static FunctionVersionCreator creator(final String pathServiceSid, final String pathFunctionSid, final String path, final FunctionVersion.Visibility visibility) { return new FunctionVersionCreator(pathServiceSid, pathFunctionSid, path, visibility); }
class class_name[name] begin[{] method[creator, return_type[type[FunctionVersionCreator]], modifier[public static], parameter[pathServiceSid, pathFunctionSid, path, visibility]] begin[{] return[ClassCreator(arguments=[MemberReference(member=pathServiceSid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pathFunctionSid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=visibility, 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=FunctionVersionCreator, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[FunctionVersionCreator] identifier[creator] operator[SEP] Keyword[final] identifier[String] identifier[pathServiceSid] , Keyword[final] identifier[String] identifier[pathFunctionSid] , Keyword[final] identifier[String] identifier[path] , Keyword[final] identifier[FunctionVersion] operator[SEP] identifier[Visibility] identifier[visibility] operator[SEP] { Keyword[return] Keyword[new] identifier[FunctionVersionCreator] operator[SEP] identifier[pathServiceSid] , identifier[pathFunctionSid] , identifier[path] , identifier[visibility] operator[SEP] operator[SEP] }
private void readResourceExtendedAttributes(Project.Resources.Resource xml, Resource mpx) { for (Project.Resources.Resource.ExtendedAttribute attrib : xml.getExtendedAttribute()) { int xmlFieldID = Integer.parseInt(attrib.getFieldID()) & 0x0000FFFF; ResourceField mpxFieldID = MPPResourceField.getInstance(xmlFieldID); TimeUnit durationFormat = DatatypeConverter.parseDurationTimeUnits(attrib.getDurationFormat(), null); DatatypeConverter.parseExtendedAttribute(m_projectFile, mpx, attrib.getValue(), mpxFieldID, durationFormat); } }
class class_name[name] begin[{] method[readResourceExtendedAttributes, return_type[void], modifier[private], parameter[xml, mpx]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getFieldID, postfix_operators=[], prefix_operators=[], qualifier=attrib, selectors=[], type_arguments=None)], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x0000FFFF), operator=&), name=xmlFieldID)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=xmlFieldID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=MPPResourceField, selectors=[], type_arguments=None), name=mpxFieldID)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ResourceField, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDurationFormat, postfix_operators=[], prefix_operators=[], qualifier=attrib, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=parseDurationTimeUnits, postfix_operators=[], prefix_operators=[], qualifier=DatatypeConverter, selectors=[], type_arguments=None), name=durationFormat)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TimeUnit, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=m_projectFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=mpx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=attrib, selectors=[], type_arguments=None), MemberReference(member=mpxFieldID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=durationFormat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseExtendedAttribute, postfix_operators=[], prefix_operators=[], qualifier=DatatypeConverter, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getExtendedAttribute, postfix_operators=[], prefix_operators=[], qualifier=xml, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=attrib)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Project, sub_type=ReferenceType(arguments=None, dimensions=None, name=Resources, sub_type=ReferenceType(arguments=None, dimensions=None, name=Resource, sub_type=ReferenceType(arguments=None, dimensions=None, name=ExtendedAttribute, sub_type=None)))))), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[readResourceExtendedAttributes] operator[SEP] identifier[Project] operator[SEP] identifier[Resources] operator[SEP] identifier[Resource] identifier[xml] , identifier[Resource] identifier[mpx] operator[SEP] { Keyword[for] operator[SEP] identifier[Project] operator[SEP] identifier[Resources] operator[SEP] identifier[Resource] operator[SEP] identifier[ExtendedAttribute] identifier[attrib] operator[:] identifier[xml] operator[SEP] identifier[getExtendedAttribute] operator[SEP] operator[SEP] operator[SEP] { Keyword[int] identifier[xmlFieldID] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[attrib] operator[SEP] identifier[getFieldID] operator[SEP] operator[SEP] operator[SEP] operator[&] literal[Integer] operator[SEP] identifier[ResourceField] identifier[mpxFieldID] operator[=] identifier[MPPResourceField] operator[SEP] identifier[getInstance] operator[SEP] identifier[xmlFieldID] operator[SEP] operator[SEP] identifier[TimeUnit] identifier[durationFormat] operator[=] identifier[DatatypeConverter] operator[SEP] identifier[parseDurationTimeUnits] operator[SEP] identifier[attrib] operator[SEP] identifier[getDurationFormat] operator[SEP] operator[SEP] , Other[null] operator[SEP] operator[SEP] identifier[DatatypeConverter] operator[SEP] identifier[parseExtendedAttribute] operator[SEP] identifier[m_projectFile] , identifier[mpx] , identifier[attrib] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] , identifier[mpxFieldID] , identifier[durationFormat] operator[SEP] operator[SEP] } }
protected String statusMsg(final String queue, final Job job) throws IOException { final WorkerStatus status = new WorkerStatus(); status.setRunAt(new Date()); status.setQueue(queue); status.setPayload(job); return ObjectMapperFactory.get().writeValueAsString(status); }
class class_name[name] begin[{] method[statusMsg, return_type[type[String]], modifier[protected], parameter[queue, job]] begin[{] local_variable[type[WorkerStatus], status] call[status.setRunAt, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Date, sub_type=None))]] call[status.setQueue, parameter[member[.queue]]] call[status.setPayload, parameter[member[.job]]] return[call[ObjectMapperFactory.get, parameter[]]] end[}] END[}]
Keyword[protected] identifier[String] identifier[statusMsg] operator[SEP] Keyword[final] identifier[String] identifier[queue] , Keyword[final] identifier[Job] identifier[job] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[final] identifier[WorkerStatus] identifier[status] operator[=] Keyword[new] identifier[WorkerStatus] operator[SEP] operator[SEP] operator[SEP] identifier[status] operator[SEP] identifier[setRunAt] operator[SEP] Keyword[new] identifier[Date] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[status] operator[SEP] identifier[setQueue] operator[SEP] identifier[queue] operator[SEP] operator[SEP] identifier[status] operator[SEP] identifier[setPayload] operator[SEP] identifier[job] operator[SEP] operator[SEP] Keyword[return] identifier[ObjectMapperFactory] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[writeValueAsString] operator[SEP] identifier[status] operator[SEP] operator[SEP] }
public static <ViewType extends FxmlView<? extends ViewModelType>, ViewModelType extends ViewModel> FxmlViewStep<ViewType, ViewModelType> fxmlView( Class<? extends ViewType> viewType) { return new FxmlViewStep<>(viewType); }
class class_name[name] begin[{] method[fxmlView, return_type[type[FxmlViewStep]], modifier[public static], parameter[viewType]] begin[{] return[ClassCreator(arguments=[MemberReference(member=viewType, 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=FxmlViewStep, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[ViewType] Keyword[extends] identifier[FxmlView] operator[<] operator[?] Keyword[extends] identifier[ViewModelType] operator[>] , identifier[ViewModelType] Keyword[extends] identifier[ViewModel] operator[>] identifier[FxmlViewStep] operator[<] identifier[ViewType] , identifier[ViewModelType] operator[>] identifier[fxmlView] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[ViewType] operator[>] identifier[viewType] operator[SEP] { Keyword[return] Keyword[new] identifier[FxmlViewStep] operator[<] operator[>] operator[SEP] identifier[viewType] operator[SEP] operator[SEP] }
static private void encodeBytes(byte previous, byte current, int byteIndex, StringBuilder output) { int chunk; int offset = byteIndex % 5; switch (offset) { case 0: chunk = ((current & 0xF8) >>> 3); output.append(lookupTable.charAt(chunk)); break; case 1: chunk = (((previous & 0x07) << 2) | ((current & 0xC0) >>> 6)); output.append(lookupTable.charAt(chunk)); chunk = ((current & 0x3E) >>> 1); output.append(lookupTable.charAt(chunk)); break; case 2: chunk = (((previous & 0x01) << 4) | ((current & 0xF0) >>> 4)); output.append(lookupTable.charAt(chunk)); break; case 3: chunk = (((previous & 0x0F) << 1) | ((current & 0x80) >>> 7)); output.append(lookupTable.charAt(chunk)); chunk = ((current & 0x7C) >>> 2); output.append(lookupTable.charAt(chunk)); break; case 4: chunk = (((previous & 0x03) << 3) | ((current & 0xE0) >>> 5)); output.append(lookupTable.charAt(chunk)); chunk = (current & 0x1F); output.append(lookupTable.charAt(chunk)); break; } }
class class_name[name] begin[{] method[encodeBytes, return_type[void], modifier[private static], parameter[previous, current, byteIndex, output]] begin[{] local_variable[type[int], chunk] local_variable[type[int], offset] SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=chunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xF8), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=>>>)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=chunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=lookupTable, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=output, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=chunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=previous, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x07), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=<<), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xC0), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6), operator=>>>), operator=|)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=chunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=lookupTable, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=output, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=chunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x3E), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>>>)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=chunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=lookupTable, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=output, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=chunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=previous, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x01), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=<<), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xF0), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=>>>), operator=|)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=chunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=lookupTable, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=output, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=chunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=previous, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x0F), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=<<), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x80), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=7), operator=>>>), operator=|)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=chunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=lookupTable, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=output, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=chunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x7C), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=>>>)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=chunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=lookupTable, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=output, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=chunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=previous, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x03), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=<<), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xE0), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5), operator=>>>), operator=|)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=chunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=lookupTable, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=output, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=chunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x1F), operator=&)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=chunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=lookupTable, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=output, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
Keyword[static] Keyword[private] Keyword[void] identifier[encodeBytes] operator[SEP] Keyword[byte] identifier[previous] , Keyword[byte] identifier[current] , Keyword[int] identifier[byteIndex] , identifier[StringBuilder] identifier[output] operator[SEP] { Keyword[int] identifier[chunk] operator[SEP] Keyword[int] identifier[offset] operator[=] identifier[byteIndex] operator[%] Other[5] operator[SEP] Keyword[switch] operator[SEP] identifier[offset] operator[SEP] { Keyword[case] Other[0] operator[:] identifier[chunk] operator[=] operator[SEP] operator[SEP] identifier[current] operator[&] literal[Integer] operator[SEP] operator[>] operator[>] operator[>] Other[3] operator[SEP] operator[SEP] identifier[output] operator[SEP] identifier[append] operator[SEP] identifier[lookupTable] operator[SEP] identifier[charAt] operator[SEP] identifier[chunk] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] Other[1] operator[:] identifier[chunk] operator[=] operator[SEP] operator[SEP] operator[SEP] identifier[previous] operator[&] literal[Integer] operator[SEP] operator[<<] Other[2] operator[SEP] operator[|] operator[SEP] operator[SEP] identifier[current] operator[&] literal[Integer] operator[SEP] operator[>] operator[>] operator[>] Other[6] operator[SEP] operator[SEP] operator[SEP] identifier[output] operator[SEP] identifier[append] operator[SEP] identifier[lookupTable] operator[SEP] identifier[charAt] operator[SEP] identifier[chunk] operator[SEP] operator[SEP] operator[SEP] identifier[chunk] operator[=] operator[SEP] operator[SEP] identifier[current] operator[&] literal[Integer] operator[SEP] operator[>] operator[>] operator[>] Other[1] operator[SEP] operator[SEP] identifier[output] operator[SEP] identifier[append] operator[SEP] identifier[lookupTable] operator[SEP] identifier[charAt] operator[SEP] identifier[chunk] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] Other[2] operator[:] identifier[chunk] operator[=] operator[SEP] operator[SEP] operator[SEP] identifier[previous] operator[&] literal[Integer] operator[SEP] operator[<<] Other[4] operator[SEP] operator[|] operator[SEP] operator[SEP] identifier[current] operator[&] literal[Integer] operator[SEP] operator[>] operator[>] operator[>] Other[4] operator[SEP] operator[SEP] operator[SEP] identifier[output] operator[SEP] identifier[append] operator[SEP] identifier[lookupTable] operator[SEP] identifier[charAt] operator[SEP] identifier[chunk] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] Other[3] operator[:] identifier[chunk] operator[=] operator[SEP] operator[SEP] operator[SEP] identifier[previous] operator[&] literal[Integer] operator[SEP] operator[<<] Other[1] operator[SEP] operator[|] operator[SEP] operator[SEP] identifier[current] operator[&] literal[Integer] operator[SEP] operator[>] operator[>] operator[>] Other[7] operator[SEP] operator[SEP] operator[SEP] identifier[output] operator[SEP] identifier[append] operator[SEP] identifier[lookupTable] operator[SEP] identifier[charAt] operator[SEP] identifier[chunk] operator[SEP] operator[SEP] operator[SEP] identifier[chunk] operator[=] operator[SEP] operator[SEP] identifier[current] operator[&] literal[Integer] operator[SEP] operator[>] operator[>] operator[>] Other[2] operator[SEP] operator[SEP] identifier[output] operator[SEP] identifier[append] operator[SEP] identifier[lookupTable] operator[SEP] identifier[charAt] operator[SEP] identifier[chunk] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] Other[4] operator[:] identifier[chunk] operator[=] operator[SEP] operator[SEP] operator[SEP] identifier[previous] operator[&] literal[Integer] operator[SEP] operator[<<] Other[3] operator[SEP] operator[|] operator[SEP] operator[SEP] identifier[current] operator[&] literal[Integer] operator[SEP] operator[>] operator[>] operator[>] Other[5] operator[SEP] operator[SEP] operator[SEP] identifier[output] operator[SEP] identifier[append] operator[SEP] identifier[lookupTable] operator[SEP] identifier[charAt] operator[SEP] identifier[chunk] operator[SEP] operator[SEP] operator[SEP] identifier[chunk] operator[=] operator[SEP] identifier[current] operator[&] literal[Integer] operator[SEP] operator[SEP] identifier[output] operator[SEP] identifier[append] operator[SEP] identifier[lookupTable] operator[SEP] identifier[charAt] operator[SEP] identifier[chunk] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } }
public void currentSampleChanged(float [] leftSample, float [] rightSample) { getVULMeterPanel().setVUMeter(leftSample); getVURMeterPanel().setVUMeter(rightSample); getSALMeterPanel().setMeter(leftSample); getSARMeterPanel().setMeter(rightSample); }
class class_name[name] begin[{] method[currentSampleChanged, return_type[void], modifier[public], parameter[leftSample, rightSample]] begin[{] call[.getVULMeterPanel, parameter[]] call[.getVURMeterPanel, parameter[]] call[.getSALMeterPanel, parameter[]] call[.getSARMeterPanel, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[currentSampleChanged] operator[SEP] Keyword[float] operator[SEP] operator[SEP] identifier[leftSample] , Keyword[float] operator[SEP] operator[SEP] identifier[rightSample] operator[SEP] { identifier[getVULMeterPanel] operator[SEP] operator[SEP] operator[SEP] identifier[setVUMeter] operator[SEP] identifier[leftSample] operator[SEP] operator[SEP] identifier[getVURMeterPanel] operator[SEP] operator[SEP] operator[SEP] identifier[setVUMeter] operator[SEP] identifier[rightSample] operator[SEP] operator[SEP] identifier[getSALMeterPanel] operator[SEP] operator[SEP] operator[SEP] identifier[setMeter] operator[SEP] identifier[leftSample] operator[SEP] operator[SEP] identifier[getSARMeterPanel] operator[SEP] operator[SEP] operator[SEP] identifier[setMeter] operator[SEP] identifier[rightSample] operator[SEP] operator[SEP] }
public final NonLockingCursor newNonLockingItemStreamCursor(Filter filter) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "newNonLockingItemStreamCursor", filter); NonLockingCursor cursor = new UnprioritizedNonlockingCursor(_itemStreams, filter); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "newNonLockingItemStreamCursor", cursor); return cursor; }
class class_name[name] begin[{] method[newNonLockingItemStreamCursor, return_type[type[NonLockingCursor]], modifier[final public], parameter[filter]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[THIS[], member[.tc], literal["newNonLockingItemStreamCursor"], member[.filter]]] else begin[{] None end[}] local_variable[type[NonLockingCursor], cursor] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[THIS[], member[.tc], literal["newNonLockingItemStreamCursor"], member[.cursor]]] else begin[{] None end[}] return[member[.cursor]] end[}] END[}]
Keyword[public] Keyword[final] identifier[NonLockingCursor] identifier[newNonLockingItemStreamCursor] operator[SEP] identifier[Filter] identifier[filter] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] Keyword[this] , identifier[tc] , literal[String] , identifier[filter] operator[SEP] operator[SEP] identifier[NonLockingCursor] identifier[cursor] operator[=] Keyword[new] identifier[UnprioritizedNonlockingCursor] operator[SEP] identifier[_itemStreams] , identifier[filter] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[tc] , literal[String] , identifier[cursor] operator[SEP] operator[SEP] Keyword[return] identifier[cursor] operator[SEP] }
public IPAddressSeqRange[] subtract(IPAddressSeqRange other) { IPAddress otherLower = other.getLower(); IPAddress otherUpper = other.getUpper(); IPAddress lower = this.getLower(); IPAddress upper = this.getUpper(); if(compareLowValues(lower, otherLower) < 0) { if(compareLowValues(upper, otherUpper) > 0) { // l ol ou u return createPair(lower, otherLower.increment(-1), otherUpper.increment(1), upper); } else { int comp = compareLowValues(upper, otherLower); if(comp < 0) { // l u ol ou return createSingle(); } else if(comp == 0) { // l u == ol ou return createSingle(lower, upper.increment(-1)); } return createSingle(lower, otherLower.increment(-1)); // l ol u ou } } else if(compareLowValues(otherUpper, upper) >= 0) { // ol l u ou return createEmpty(); } else { int comp = compareLowValues(otherUpper, lower); if(comp < 0) { return createSingle(); // ol ou l u } else if(comp == 0) { return createSingle(lower.increment(1), upper); //ol ou == l u } return createSingle(otherUpper.increment(1), upper); // ol l ou u } }
class class_name[name] begin[{] method[subtract, return_type[type[IPAddressSeqRange]], modifier[public], parameter[other]] begin[{] local_variable[type[IPAddress], otherLower] local_variable[type[IPAddress], otherUpper] local_variable[type[IPAddress], lower] local_variable[type[IPAddress], upper] if[binary_operation[call[.compareLowValues, parameter[member[.lower], member[.otherLower]]], <, literal[0]]] begin[{] if[binary_operation[call[.compareLowValues, parameter[member[.upper], member[.otherUpper]]], >, literal[0]]] begin[{] return[call[.createPair, parameter[member[.lower], call[otherLower.increment, parameter[literal[1]]], call[otherUpper.increment, parameter[literal[1]]], member[.upper]]]] else begin[{] local_variable[type[int], comp] if[binary_operation[member[.comp], <, literal[0]]] begin[{] return[call[.createSingle, parameter[]]] else begin[{] if[binary_operation[member[.comp], ==, literal[0]]] begin[{] return[call[.createSingle, parameter[member[.lower], call[upper.increment, parameter[literal[1]]]]]] else begin[{] None end[}] end[}] return[call[.createSingle, parameter[member[.lower], call[otherLower.increment, parameter[literal[1]]]]]] end[}] else begin[{] if[binary_operation[call[.compareLowValues, parameter[member[.otherUpper], member[.upper]]], >=, literal[0]]] begin[{] return[call[.createEmpty, parameter[]]] else begin[{] local_variable[type[int], comp] if[binary_operation[member[.comp], <, literal[0]]] begin[{] return[call[.createSingle, parameter[]]] else begin[{] if[binary_operation[member[.comp], ==, literal[0]]] begin[{] return[call[.createSingle, parameter[call[lower.increment, parameter[literal[1]]], member[.upper]]]] else begin[{] None end[}] end[}] return[call[.createSingle, parameter[call[otherUpper.increment, parameter[literal[1]]], member[.upper]]]] end[}] end[}] end[}] END[}]
Keyword[public] identifier[IPAddressSeqRange] operator[SEP] operator[SEP] identifier[subtract] operator[SEP] identifier[IPAddressSeqRange] identifier[other] operator[SEP] { identifier[IPAddress] identifier[otherLower] operator[=] identifier[other] operator[SEP] identifier[getLower] operator[SEP] operator[SEP] operator[SEP] identifier[IPAddress] identifier[otherUpper] operator[=] identifier[other] operator[SEP] identifier[getUpper] operator[SEP] operator[SEP] operator[SEP] identifier[IPAddress] identifier[lower] operator[=] Keyword[this] operator[SEP] identifier[getLower] operator[SEP] operator[SEP] operator[SEP] identifier[IPAddress] identifier[upper] operator[=] Keyword[this] operator[SEP] identifier[getUpper] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[compareLowValues] operator[SEP] identifier[lower] , identifier[otherLower] operator[SEP] operator[<] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[compareLowValues] operator[SEP] identifier[upper] , identifier[otherUpper] operator[SEP] operator[>] Other[0] operator[SEP] { Keyword[return] identifier[createPair] operator[SEP] identifier[lower] , identifier[otherLower] operator[SEP] identifier[increment] operator[SEP] operator[-] Other[1] operator[SEP] , identifier[otherUpper] operator[SEP] identifier[increment] operator[SEP] Other[1] operator[SEP] , identifier[upper] operator[SEP] operator[SEP] } Keyword[else] { Keyword[int] identifier[comp] operator[=] identifier[compareLowValues] operator[SEP] identifier[upper] , identifier[otherLower] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[comp] operator[<] Other[0] operator[SEP] { Keyword[return] identifier[createSingle] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[comp] operator[==] Other[0] operator[SEP] { Keyword[return] identifier[createSingle] operator[SEP] identifier[lower] , identifier[upper] operator[SEP] identifier[increment] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[createSingle] operator[SEP] identifier[lower] , identifier[otherLower] operator[SEP] identifier[increment] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[compareLowValues] operator[SEP] identifier[otherUpper] , identifier[upper] operator[SEP] operator[>=] Other[0] operator[SEP] { Keyword[return] identifier[createEmpty] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[int] identifier[comp] operator[=] identifier[compareLowValues] operator[SEP] identifier[otherUpper] , identifier[lower] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[comp] operator[<] Other[0] operator[SEP] { Keyword[return] identifier[createSingle] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[comp] operator[==] Other[0] operator[SEP] { Keyword[return] identifier[createSingle] operator[SEP] identifier[lower] operator[SEP] identifier[increment] operator[SEP] Other[1] operator[SEP] , identifier[upper] operator[SEP] operator[SEP] } Keyword[return] identifier[createSingle] operator[SEP] identifier[otherUpper] operator[SEP] identifier[increment] operator[SEP] Other[1] operator[SEP] , identifier[upper] operator[SEP] operator[SEP] } }
public final EObject entryRuleCrossReference() throws RecognitionException { EObject current = null; EObject iv_ruleCrossReference = null; try { // InternalXtext.g:2627:55: (iv_ruleCrossReference= ruleCrossReference EOF ) // InternalXtext.g:2628:2: iv_ruleCrossReference= ruleCrossReference EOF { newCompositeNode(grammarAccess.getCrossReferenceRule()); pushFollow(FollowSets000.FOLLOW_1); iv_ruleCrossReference=ruleCrossReference(); state._fsp--; current =iv_ruleCrossReference; match(input,EOF,FollowSets000.FOLLOW_2); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; }
class class_name[name] begin[{] method[entryRuleCrossReference, return_type[type[EObject]], modifier[final public], parameter[]] begin[{] local_variable[type[EObject], current] local_variable[type[EObject], iv_ruleCrossReference] TryStatement(block=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getCrossReferenceRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_1, postfix_operators=[], prefix_operators=[], qualifier=FollowSets000, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=iv_ruleCrossReference, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=ruleCrossReference, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=iv_ruleCrossReference, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=EOF, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=FOLLOW_2, postfix_operators=[], prefix_operators=[], qualifier=FollowSets000, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=appendSkippedTokens, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=[], label=None, resources=None) return[member[.current]] end[}] END[}]
Keyword[public] Keyword[final] identifier[EObject] identifier[entryRuleCrossReference] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { identifier[EObject] identifier[current] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[iv_ruleCrossReference] operator[=] Other[null] operator[SEP] Keyword[try] { { identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getCrossReferenceRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[pushFollow] operator[SEP] identifier[FollowSets000] operator[SEP] identifier[FOLLOW_1] operator[SEP] operator[SEP] identifier[iv_ruleCrossReference] operator[=] identifier[ruleCrossReference] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] identifier[current] operator[=] identifier[iv_ruleCrossReference] operator[SEP] identifier[match] operator[SEP] identifier[input] , identifier[EOF] , identifier[FollowSets000] operator[SEP] identifier[FOLLOW_2] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[re] operator[SEP] { identifier[recover] operator[SEP] identifier[input] , identifier[re] operator[SEP] operator[SEP] identifier[appendSkippedTokens] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { } Keyword[return] identifier[current] operator[SEP] }
public static ChaincodeCollectionConfiguration fromYamlFile(File configFile) throws InvalidArgumentException, IOException, ChaincodeCollectionConfigurationException { return fromFile(configFile, false); }
class class_name[name] begin[{] method[fromYamlFile, return_type[type[ChaincodeCollectionConfiguration]], modifier[public static], parameter[configFile]] begin[{] return[call[.fromFile, parameter[member[.configFile], literal[false]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ChaincodeCollectionConfiguration] identifier[fromYamlFile] operator[SEP] identifier[File] identifier[configFile] operator[SEP] Keyword[throws] identifier[InvalidArgumentException] , identifier[IOException] , identifier[ChaincodeCollectionConfigurationException] { Keyword[return] identifier[fromFile] operator[SEP] identifier[configFile] , literal[boolean] operator[SEP] operator[SEP] }
private void failTimedOutMissingContentRequests() { if (isStopped()) return; if (requestsMissingContent.isEmpty()) return; final List<String> toRemove = new ArrayList<>(); // prevent ConcurrentModificationException for (final String id : requestsMissingContent.keySet()) { final RequestResponseHttpContext requestResponseHttpContext = requestsMissingContent.get(id); if (requestResponseHttpContext.requestResponseContext.hasConsumerData()) { final RequestParser parser = requestResponseHttpContext.requestResponseContext.consumerData(); if (parser.hasMissingContentTimeExpired(requestMissingContentTimeout)) { requestResponseHttpContext.requestResponseContext.consumerData(null); toRemove.add(id); requestResponseHttpContext.httpContext.completes.with(Response.of(Response.Status.BadRequest, "Missing content.")); requestResponseHttpContext.requestResponseContext.consumerData(null); } } else { toRemove.add(id); // already closed? } } for (final String id : toRemove) { requestsMissingContent.remove(id); } }
class class_name[name] begin[{] method[failTimedOutMissingContentRequests, return_type[void], modifier[private], parameter[]] begin[{] if[call[.isStopped, parameter[]]] begin[{] return[None] else begin[{] None end[}] if[call[requestsMissingContent.isEmpty, parameter[]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[List], toRemove] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=requestsMissingContent, selectors=[], type_arguments=None), name=requestResponseHttpContext)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=RequestResponseHttpContext, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=hasConsumerData, postfix_operators=[], prefix_operators=[], qualifier=requestResponseHttpContext.requestResponseContext, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=toRemove, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=consumerData, postfix_operators=[], prefix_operators=[], qualifier=requestResponseHttpContext.requestResponseContext, selectors=[], type_arguments=None), name=parser)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=RequestParser, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=requestMissingContentTimeout, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=hasMissingContentTimeExpired, postfix_operators=[], prefix_operators=[], qualifier=parser, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=consumerData, postfix_operators=[], prefix_operators=[], qualifier=requestResponseHttpContext.requestResponseContext, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=toRemove, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=BadRequest, postfix_operators=[], prefix_operators=[], qualifier=Response.Status, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Missing content.")], member=of, postfix_operators=[], prefix_operators=[], qualifier=Response, selectors=[], type_arguments=None)], member=with, postfix_operators=[], prefix_operators=[], qualifier=requestResponseHttpContext.httpContext.completes, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=consumerData, postfix_operators=[], prefix_operators=[], qualifier=requestResponseHttpContext.requestResponseContext, selectors=[], type_arguments=None), label=None)]))]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=requestsMissingContent, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=id)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=requestsMissingContent, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=toRemove, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=id)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[failTimedOutMissingContentRequests] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[isStopped] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[if] operator[SEP] identifier[requestsMissingContent] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[toRemove] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[id] operator[:] identifier[requestsMissingContent] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[RequestResponseHttpContext] identifier[requestResponseHttpContext] operator[=] identifier[requestsMissingContent] operator[SEP] identifier[get] operator[SEP] identifier[id] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[requestResponseHttpContext] operator[SEP] identifier[requestResponseContext] operator[SEP] identifier[hasConsumerData] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[RequestParser] identifier[parser] operator[=] identifier[requestResponseHttpContext] operator[SEP] identifier[requestResponseContext] operator[SEP] identifier[consumerData] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[parser] operator[SEP] identifier[hasMissingContentTimeExpired] operator[SEP] identifier[requestMissingContentTimeout] operator[SEP] operator[SEP] { identifier[requestResponseHttpContext] operator[SEP] identifier[requestResponseContext] operator[SEP] identifier[consumerData] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[toRemove] operator[SEP] identifier[add] operator[SEP] identifier[id] operator[SEP] operator[SEP] identifier[requestResponseHttpContext] operator[SEP] identifier[httpContext] operator[SEP] identifier[completes] operator[SEP] identifier[with] operator[SEP] identifier[Response] operator[SEP] identifier[of] operator[SEP] identifier[Response] operator[SEP] identifier[Status] operator[SEP] identifier[BadRequest] , literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[requestResponseHttpContext] operator[SEP] identifier[requestResponseContext] operator[SEP] identifier[consumerData] operator[SEP] Other[null] operator[SEP] operator[SEP] } } Keyword[else] { identifier[toRemove] operator[SEP] identifier[add] operator[SEP] identifier[id] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[id] operator[:] identifier[toRemove] operator[SEP] { identifier[requestsMissingContent] operator[SEP] identifier[remove] operator[SEP] identifier[id] operator[SEP] operator[SEP] } }
public void setMode(ArrayList<Long> tokens, String mode){ JSONObject jobj = new JSONObject(); try { // int a[] = {256265, 408065, 779521, 738561, 177665, 25601}; JSONArray list = new JSONArray(); JSONArray listMain = new JSONArray(); listMain.put(0, mode); for(int i=0; i< tokens.size(); i++){ list.put(i, tokens.get(i)); } listMain.put(1, list); jobj.put("a", mSetMode); jobj.put("v", listMain); for(int i = 0; i < tokens.size(); i++){ modeMap.put(tokens.get(i), mode); } } catch (JSONException e) { e.printStackTrace(); } if(ws != null) { ws.sendText(jobj.toString()); } }
class class_name[name] begin[{] method[setMode, return_type[void], modifier[public], parameter[tokens, mode]] begin[{] local_variable[type[JSONObject], jobj] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JSONArray, sub_type=None)), name=list)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JSONArray, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JSONArray, sub_type=None)), name=listMain)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JSONArray, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=mode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=listMain, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=tokens, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=tokens, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), MemberReference(member=list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=listMain, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="a"), MemberReference(member=mSetMode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=jobj, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="v"), MemberReference(member=listMain, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=jobj, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=tokens, selectors=[], type_arguments=None), MemberReference(member=mode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=modeMap, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=tokens, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)], 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) if[binary_operation[member[.ws], !=, literal[null]]] begin[{] call[ws.sendText, parameter[call[jobj.toString, parameter[]]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setMode] operator[SEP] identifier[ArrayList] operator[<] identifier[Long] operator[>] identifier[tokens] , identifier[String] identifier[mode] operator[SEP] { identifier[JSONObject] identifier[jobj] operator[=] Keyword[new] identifier[JSONObject] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[JSONArray] identifier[list] operator[=] Keyword[new] identifier[JSONArray] operator[SEP] operator[SEP] operator[SEP] identifier[JSONArray] identifier[listMain] operator[=] Keyword[new] identifier[JSONArray] operator[SEP] operator[SEP] operator[SEP] identifier[listMain] operator[SEP] identifier[put] operator[SEP] Other[0] , identifier[mode] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[tokens] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[list] operator[SEP] identifier[put] operator[SEP] identifier[i] , identifier[tokens] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } identifier[listMain] operator[SEP] identifier[put] operator[SEP] Other[1] , identifier[list] operator[SEP] operator[SEP] identifier[jobj] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[mSetMode] operator[SEP] operator[SEP] identifier[jobj] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[listMain] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[tokens] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[modeMap] operator[SEP] identifier[put] operator[SEP] identifier[tokens] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] , identifier[mode] 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[if] operator[SEP] identifier[ws] operator[!=] Other[null] operator[SEP] { identifier[ws] operator[SEP] identifier[sendText] operator[SEP] identifier[jobj] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public static final TimeUnit parseDurationTimeUnits(BigInteger value, TimeUnit defaultValue) { TimeUnit result = defaultValue; if (value != null) { switch (value.intValue()) { case 3: case 35: { result = TimeUnit.MINUTES; break; } case 4: case 36: { result = TimeUnit.ELAPSED_MINUTES; break; } case 5: case 37: { result = TimeUnit.HOURS; break; } case 6: case 38: { result = TimeUnit.ELAPSED_HOURS; break; } case 7: case 39: case 53: { result = TimeUnit.DAYS; break; } case 8: case 40: { result = TimeUnit.ELAPSED_DAYS; break; } case 9: case 41: { result = TimeUnit.WEEKS; break; } case 10: case 42: { result = TimeUnit.ELAPSED_WEEKS; break; } case 11: case 43: { result = TimeUnit.MONTHS; break; } case 12: case 44: { result = TimeUnit.ELAPSED_MONTHS; break; } case 19: case 51: { result = TimeUnit.PERCENT; break; } case 20: case 52: { result = TimeUnit.ELAPSED_PERCENT; break; } default: { result = PARENT_FILE.get().getProjectProperties().getDefaultDurationUnits(); break; } } } return (result); }
class class_name[name] begin[{] method[parseDurationTimeUnits, return_type[type[TimeUnit]], modifier[final public static], parameter[value, defaultValue]] begin[{] local_variable[type[TimeUnit], result] if[binary_operation[member[.value], !=, literal[null]]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=35)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=MINUTES, postfix_operators=[], prefix_operators=[], qualifier=TimeUnit, selectors=[])), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=36)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=ELAPSED_MINUTES, postfix_operators=[], prefix_operators=[], qualifier=TimeUnit, selectors=[])), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=37)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=HOURS, postfix_operators=[], prefix_operators=[], qualifier=TimeUnit, selectors=[])), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=38)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=ELAPSED_HOURS, postfix_operators=[], prefix_operators=[], qualifier=TimeUnit, selectors=[])), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=7), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=39), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=53)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=DAYS, postfix_operators=[], prefix_operators=[], qualifier=TimeUnit, selectors=[])), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=40)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=ELAPSED_DAYS, postfix_operators=[], prefix_operators=[], qualifier=TimeUnit, selectors=[])), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=9), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=41)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=WEEKS, postfix_operators=[], prefix_operators=[], qualifier=TimeUnit, selectors=[])), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=42)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=ELAPSED_WEEKS, postfix_operators=[], prefix_operators=[], qualifier=TimeUnit, selectors=[])), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=11), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=43)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=MONTHS, postfix_operators=[], prefix_operators=[], qualifier=TimeUnit, selectors=[])), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=12), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=44)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=ELAPSED_MONTHS, postfix_operators=[], prefix_operators=[], qualifier=TimeUnit, selectors=[])), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=19), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=51)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=PERCENT, postfix_operators=[], prefix_operators=[], qualifier=TimeUnit, selectors=[])), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=20), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=52)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=ELAPSED_PERCENT, postfix_operators=[], prefix_operators=[], qualifier=TimeUnit, selectors=[])), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=[], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=PARENT_FILE, selectors=[MethodInvocation(arguments=[], member=getProjectProperties, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getDefaultDurationUnits, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)])])], expression=MethodInvocation(arguments=[], member=intValue, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), label=None) else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[final] identifier[TimeUnit] identifier[parseDurationTimeUnits] operator[SEP] identifier[BigInteger] identifier[value] , identifier[TimeUnit] identifier[defaultValue] operator[SEP] { identifier[TimeUnit] identifier[result] operator[=] identifier[defaultValue] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[!=] Other[null] operator[SEP] { Keyword[switch] operator[SEP] identifier[value] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] Other[3] operator[:] Keyword[case] Other[35] operator[:] { identifier[result] operator[=] identifier[TimeUnit] operator[SEP] identifier[MINUTES] operator[SEP] Keyword[break] operator[SEP] } Keyword[case] Other[4] operator[:] Keyword[case] Other[36] operator[:] { identifier[result] operator[=] identifier[TimeUnit] operator[SEP] identifier[ELAPSED_MINUTES] operator[SEP] Keyword[break] operator[SEP] } Keyword[case] Other[5] operator[:] Keyword[case] Other[37] operator[:] { identifier[result] operator[=] identifier[TimeUnit] operator[SEP] identifier[HOURS] operator[SEP] Keyword[break] operator[SEP] } Keyword[case] Other[6] operator[:] Keyword[case] Other[38] operator[:] { identifier[result] operator[=] identifier[TimeUnit] operator[SEP] identifier[ELAPSED_HOURS] operator[SEP] Keyword[break] operator[SEP] } Keyword[case] Other[7] operator[:] Keyword[case] Other[39] operator[:] Keyword[case] Other[53] operator[:] { identifier[result] operator[=] identifier[TimeUnit] operator[SEP] identifier[DAYS] operator[SEP] Keyword[break] operator[SEP] } Keyword[case] Other[8] operator[:] Keyword[case] Other[40] operator[:] { identifier[result] operator[=] identifier[TimeUnit] operator[SEP] identifier[ELAPSED_DAYS] operator[SEP] Keyword[break] operator[SEP] } Keyword[case] Other[9] operator[:] Keyword[case] Other[41] operator[:] { identifier[result] operator[=] identifier[TimeUnit] operator[SEP] identifier[WEEKS] operator[SEP] Keyword[break] operator[SEP] } Keyword[case] Other[10] operator[:] Keyword[case] Other[42] operator[:] { identifier[result] operator[=] identifier[TimeUnit] operator[SEP] identifier[ELAPSED_WEEKS] operator[SEP] Keyword[break] operator[SEP] } Keyword[case] Other[11] operator[:] Keyword[case] Other[43] operator[:] { identifier[result] operator[=] identifier[TimeUnit] operator[SEP] identifier[MONTHS] operator[SEP] Keyword[break] operator[SEP] } Keyword[case] Other[12] operator[:] Keyword[case] Other[44] operator[:] { identifier[result] operator[=] identifier[TimeUnit] operator[SEP] identifier[ELAPSED_MONTHS] operator[SEP] Keyword[break] operator[SEP] } Keyword[case] Other[19] operator[:] Keyword[case] Other[51] operator[:] { identifier[result] operator[=] identifier[TimeUnit] operator[SEP] identifier[PERCENT] operator[SEP] Keyword[break] operator[SEP] } Keyword[case] Other[20] operator[:] Keyword[case] Other[52] operator[:] { identifier[result] operator[=] identifier[TimeUnit] operator[SEP] identifier[ELAPSED_PERCENT] operator[SEP] Keyword[break] operator[SEP] } Keyword[default] operator[:] { identifier[result] operator[=] identifier[PARENT_FILE] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[getProjectProperties] operator[SEP] operator[SEP] operator[SEP] identifier[getDefaultDurationUnits] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } } } Keyword[return] operator[SEP] identifier[result] operator[SEP] operator[SEP] }
@Override public void writeIntUnchecked(int v) throws IOException { outputStream.write(0xFF & v); outputStream.write(0xFF & (v >> 8)); outputStream.write(0xFF & (v >> 16)); outputStream.write(0xFF & (v >> 24)); bytesWritten += 4; }
class class_name[name] begin[{] method[writeIntUnchecked, return_type[void], modifier[public], parameter[v]] begin[{] call[outputStream.write, parameter[binary_operation[literal[0xFF], &, member[.v]]]] call[outputStream.write, parameter[binary_operation[literal[0xFF], &, binary_operation[member[.v], >>, literal[8]]]]] call[outputStream.write, parameter[binary_operation[literal[0xFF], &, binary_operation[member[.v], >>, literal[16]]]]] call[outputStream.write, parameter[binary_operation[literal[0xFF], &, binary_operation[member[.v], >>, literal[24]]]]] assign[member[.bytesWritten], literal[4]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[writeIntUnchecked] operator[SEP] Keyword[int] identifier[v] operator[SEP] Keyword[throws] identifier[IOException] { identifier[outputStream] operator[SEP] identifier[write] operator[SEP] literal[Integer] operator[&] identifier[v] operator[SEP] operator[SEP] identifier[outputStream] operator[SEP] identifier[write] operator[SEP] literal[Integer] operator[&] operator[SEP] identifier[v] operator[>] operator[>] Other[8] operator[SEP] operator[SEP] operator[SEP] identifier[outputStream] operator[SEP] identifier[write] operator[SEP] literal[Integer] operator[&] operator[SEP] identifier[v] operator[>] operator[>] Other[16] operator[SEP] operator[SEP] operator[SEP] identifier[outputStream] operator[SEP] identifier[write] operator[SEP] literal[Integer] operator[&] operator[SEP] identifier[v] operator[>] operator[>] Other[24] operator[SEP] operator[SEP] operator[SEP] identifier[bytesWritten] operator[+=] Other[4] operator[SEP] }
@Override public void setAttribute(String name, Object value) { if (name.startsWith(IPortletRenderer.RENDERER_ATTRIBUTE_PREFIX)) { throw new IllegalArgumentException( "Portlets cannot set attributes that start with: " + IPortletRenderer.RENDERER_ATTRIBUTE_PREFIX); } this.attributes.put(name, value); }
class class_name[name] begin[{] method[setAttribute, return_type[void], modifier[public], parameter[name, value]] begin[{] if[call[name.startsWith, parameter[member[IPortletRenderer.RENDERER_ATTRIBUTE_PREFIX]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Portlets cannot set attributes that start with: "), operandr=MemberReference(member=RENDERER_ATTRIBUTE_PREFIX, postfix_operators=[], prefix_operators=[], qualifier=IPortletRenderer, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] THIS[member[None.attributes]call[None.put, parameter[member[.name], member[.value]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setAttribute] operator[SEP] identifier[String] identifier[name] , identifier[Object] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[name] operator[SEP] identifier[startsWith] operator[SEP] identifier[IPortletRenderer] operator[SEP] identifier[RENDERER_ATTRIBUTE_PREFIX] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[IPortletRenderer] operator[SEP] identifier[RENDERER_ATTRIBUTE_PREFIX] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[attributes] operator[SEP] identifier[put] operator[SEP] identifier[name] , identifier[value] operator[SEP] operator[SEP] }
private JSONNavi<?> failure(String err, Object jPathPostfix) { failure = true; StringBuilder sb = new StringBuilder(); sb.append("Error: "); sb.append(err); sb.append(" at "); sb.append(getJPath()); if (jPathPostfix != null) if (jPathPostfix instanceof Integer) sb.append('[').append(jPathPostfix).append(']'); else sb.append('/').append(jPathPostfix); this.failureMessage = sb.toString(); return this; }
class class_name[name] begin[{] method[failure, return_type[type[JSONNavi]], modifier[private], parameter[err, jPathPostfix]] begin[{] assign[member[.failure], literal[true]] local_variable[type[StringBuilder], sb] call[sb.append, parameter[literal["Error: "]]] call[sb.append, parameter[member[.err]]] call[sb.append, parameter[literal[" at "]]] call[sb.append, parameter[call[.getJPath, parameter[]]]] if[binary_operation[member[.jPathPostfix], !=, literal[null]]] begin[{] if[binary_operation[member[.jPathPostfix], instanceof, type[Integer]]] begin[{] call[sb.append, parameter[literal['[']]] else begin[{] call[sb.append, parameter[literal['/']]] end[}] else begin[{] None end[}] assign[THIS[member[None.failureMessage]], call[sb.toString, parameter[]]] return[THIS[]] end[}] END[}]
Keyword[private] identifier[JSONNavi] operator[<] operator[?] operator[>] identifier[failure] operator[SEP] identifier[String] identifier[err] , identifier[Object] identifier[jPathPostfix] operator[SEP] { identifier[failure] operator[=] literal[boolean] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[err] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[getJPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[jPathPostfix] operator[!=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[jPathPostfix] Keyword[instanceof] identifier[Integer] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[jPathPostfix] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[else] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[jPathPostfix] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[failureMessage] operator[=] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
@Deprecated public final FluentIterable<T> postOrderTraversal(final T root) { checkNotNull(root); return new FluentIterable<T>() { @Override public UnmodifiableIterator<T> iterator() { return postOrderIterator(root); } }; }
class class_name[name] begin[{] method[postOrderTraversal, return_type[type[FluentIterable]], modifier[final public], parameter[root]] begin[{] call[.checkNotNull, parameter[member[.root]]] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=root, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=postOrderIterator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=iterator, parameters=[], return_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=UnmodifiableIterator, 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=T, sub_type=None))], dimensions=None, name=FluentIterable, sub_type=None))] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[public] Keyword[final] identifier[FluentIterable] operator[<] identifier[T] operator[>] identifier[postOrderTraversal] operator[SEP] Keyword[final] identifier[T] identifier[root] operator[SEP] { identifier[checkNotNull] operator[SEP] identifier[root] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[FluentIterable] operator[<] identifier[T] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[UnmodifiableIterator] operator[<] identifier[T] operator[>] identifier[iterator] operator[SEP] operator[SEP] { Keyword[return] identifier[postOrderIterator] operator[SEP] identifier[root] operator[SEP] operator[SEP] } } operator[SEP] }
private boolean stage2(final Document document) { beginStage(PHASE1_STAGE2_HDR, "2", NUM_PHASES); final StringBuilder bldr = new StringBuilder(); Collection<Namespace> namespaces = document.getNamespaceMap().values(); final int docNSCount = namespaces.size(); bldr.append("Compiling "); bldr.append(docNSCount); bldr.append(" namespace"); if (docNSCount > 1) { bldr.append("s"); } bldr.append(" for "); bldr.append(document.getName()); stageOutput(bldr.toString()); boolean success = true; long t1 = currentTimeMillis(); try { p1.stage2NamespaceCompilation(document); } catch (ResourceDownloadError e) { success = false; stageError(e.getUserFacingMessage()); } catch (IndexingFailure e) { success = false; stageError(e.getUserFacingMessage()); } long t2 = currentTimeMillis(); bldr.setLength(0); markTime(bldr, t1, t2); markEndStage(bldr); stageOutput(bldr.toString()); return success; }
class class_name[name] begin[{] method[stage2, return_type[type[boolean]], modifier[private], parameter[document]] begin[{] call[.beginStage, parameter[member[.PHASE1_STAGE2_HDR], literal["2"], member[.NUM_PHASES]]] local_variable[type[StringBuilder], bldr] local_variable[type[Collection], namespaces] local_variable[type[int], docNSCount] call[bldr.append, parameter[literal["Compiling "]]] call[bldr.append, parameter[member[.docNSCount]]] call[bldr.append, parameter[literal[" namespace"]]] if[binary_operation[member[.docNSCount], >, literal[1]]] begin[{] call[bldr.append, parameter[literal["s"]]] else begin[{] None end[}] call[bldr.append, parameter[literal[" for "]]] call[bldr.append, parameter[call[document.getName, parameter[]]]] call[.stageOutput, parameter[call[bldr.toString, parameter[]]]] local_variable[type[boolean], success] local_variable[type[long], t1] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=document, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=stage2NamespaceCompilation, postfix_operators=[], prefix_operators=[], qualifier=p1, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=success, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getUserFacingMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=stageError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ResourceDownloadError'])), CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=success, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getUserFacingMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=stageError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IndexingFailure']))], finally_block=None, label=None, resources=None) local_variable[type[long], t2] call[bldr.setLength, parameter[literal[0]]] call[.markTime, parameter[member[.bldr], member[.t1], member[.t2]]] call[.markEndStage, parameter[member[.bldr]]] call[.stageOutput, parameter[call[bldr.toString, parameter[]]]] return[member[.success]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[stage2] operator[SEP] Keyword[final] identifier[Document] identifier[document] operator[SEP] { identifier[beginStage] operator[SEP] identifier[PHASE1_STAGE2_HDR] , literal[String] , identifier[NUM_PHASES] operator[SEP] operator[SEP] Keyword[final] identifier[StringBuilder] identifier[bldr] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[Collection] operator[<] identifier[Namespace] operator[>] identifier[namespaces] operator[=] identifier[document] operator[SEP] identifier[getNamespaceMap] operator[SEP] operator[SEP] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[docNSCount] operator[=] identifier[namespaces] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[bldr] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[bldr] operator[SEP] identifier[append] operator[SEP] identifier[docNSCount] operator[SEP] operator[SEP] identifier[bldr] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[docNSCount] operator[>] Other[1] operator[SEP] { identifier[bldr] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[bldr] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[bldr] operator[SEP] identifier[append] operator[SEP] identifier[document] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[stageOutput] operator[SEP] identifier[bldr] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[success] operator[=] literal[boolean] operator[SEP] Keyword[long] identifier[t1] operator[=] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[p1] operator[SEP] identifier[stage2NamespaceCompilation] operator[SEP] identifier[document] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ResourceDownloadError] identifier[e] operator[SEP] { identifier[success] operator[=] literal[boolean] operator[SEP] identifier[stageError] operator[SEP] identifier[e] operator[SEP] identifier[getUserFacingMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IndexingFailure] identifier[e] operator[SEP] { identifier[success] operator[=] literal[boolean] operator[SEP] identifier[stageError] operator[SEP] identifier[e] operator[SEP] identifier[getUserFacingMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[long] identifier[t2] operator[=] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] identifier[bldr] operator[SEP] identifier[setLength] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[markTime] operator[SEP] identifier[bldr] , identifier[t1] , identifier[t2] operator[SEP] operator[SEP] identifier[markEndStage] operator[SEP] identifier[bldr] operator[SEP] operator[SEP] identifier[stageOutput] operator[SEP] identifier[bldr] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[success] operator[SEP] }
@JsonProperty("key_hsm") @JsonSerialize(using = Base64UrlJsonSerializer.class) @JsonDeserialize(using = Base64UrlJsonDeserializer.class) public byte[] t() { return ByteExtensions.clone(this.t); }
class class_name[name] begin[{] method[t, return_type[type[byte]], modifier[public], parameter[]] begin[{] return[call[ByteExtensions.clone, parameter[THIS[member[None.t]]]]] end[}] END[}]
annotation[@] identifier[JsonProperty] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[JsonSerialize] operator[SEP] identifier[using] operator[=] identifier[Base64UrlJsonSerializer] operator[SEP] Keyword[class] operator[SEP] annotation[@] identifier[JsonDeserialize] operator[SEP] identifier[using] operator[=] identifier[Base64UrlJsonDeserializer] operator[SEP] Keyword[class] operator[SEP] Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[t] operator[SEP] operator[SEP] { Keyword[return] identifier[ByteExtensions] operator[SEP] identifier[clone] operator[SEP] Keyword[this] operator[SEP] identifier[t] operator[SEP] operator[SEP] }
public BatchConfigurationInner get(String resourceGroupName, String integrationAccountName, String batchConfigurationName) { return getWithServiceResponseAsync(resourceGroupName, integrationAccountName, batchConfigurationName).toBlocking().single().body(); }
class class_name[name] begin[{] method[get, return_type[type[BatchConfigurationInner]], modifier[public], parameter[resourceGroupName, integrationAccountName, batchConfigurationName]] begin[{] return[call[.getWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.integrationAccountName], member[.batchConfigurationName]]]] end[}] END[}]
Keyword[public] identifier[BatchConfigurationInner] identifier[get] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[integrationAccountName] , identifier[String] identifier[batchConfigurationName] operator[SEP] { Keyword[return] identifier[getWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[integrationAccountName] , identifier[batchConfigurationName] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[single] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] }
private void await() { try { // Clean up all filter join leaf nodes that have been converted boolean nodeRemoved = this.removeConvertedNodes(root); // If some nodes were removed, it means that we converted in the previous iteration // at least one filter join into a field data terms query. We don't have to wait since // we might have new filter join leaf nodes. if (!nodeRemoved && root.hasChildren()) { logger.debug("Visitor thread block - blocking queue size: {}", blockingQueue.size()); this.blockingQueue.take(); // block until one async action is completed this.blockingQueue.offer(0); // add back the element to the queue, it will be removed after the node conversion logger.debug("Visitor thread unblock - blocking queue size: {}", blockingQueue.size()); } } catch (InterruptedException e) { logger.warn("Filter join visitor thread interrupted while waiting"); Thread.currentThread().interrupt(); } }
class class_name[name] begin[{] method[await, return_type[void], modifier[private], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=root, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeConvertedNodes, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=nodeRemoved)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=nodeRemoved, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=hasChildren, postfix_operators=[], prefix_operators=[], qualifier=root, selectors=[], type_arguments=None), 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="Visitor thread block - blocking queue size: {}"), MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=blockingQueue, selectors=[], type_arguments=None)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=blockingQueue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=take, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=blockingQueue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=offer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Visitor thread unblock - blocking queue size: {}"), MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=blockingQueue, selectors=[], type_arguments=None)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Filter join visitor thread interrupted while waiting")], member=warn, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=currentThread, postfix_operators=[], prefix_operators=[], qualifier=Thread, selectors=[MethodInvocation(arguments=[], member=interrupt, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InterruptedException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[await] operator[SEP] operator[SEP] { Keyword[try] { Keyword[boolean] identifier[nodeRemoved] operator[=] Keyword[this] operator[SEP] identifier[removeConvertedNodes] operator[SEP] identifier[root] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[nodeRemoved] operator[&&] identifier[root] operator[SEP] identifier[hasChildren] operator[SEP] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[blockingQueue] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[blockingQueue] operator[SEP] identifier[take] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[blockingQueue] operator[SEP] identifier[offer] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[blockingQueue] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[InterruptedException] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] identifier[interrupt] operator[SEP] operator[SEP] operator[SEP] } }
private void buildFileEntry() { final HashMap result = new HashMap(); Reader reader = null; boolean error1 = false; try { if (openLoginFileAction != null) { if (tc.isDebugEnabled()) { Tr.debug(tc, "JAAS login configuration file: " + _loginFile + " singleLogInFile: " + singleLogInFile); } reader = (Reader) AccessController.doPrivileged(openLoginFileAction); Map<String, List<AppConfigurationEntry>> mapresult = parse(reader); if (mapresult != null) { result.putAll(mapresult); } if (tc.isDebugEnabled()) { Tr.debug(tc, "JAAS login configuration file: " + _loginFile + " processed"); } } else { if (tc.isDebugEnabled()) { Tr.debug(tc, "No JAAS login configuration file specified as " + AUTHPROP + " property"); } } } catch (java.security.PrivilegedActionException pae) { Exception e = pae.getException(); if (e instanceof MalformedURLException) { Tr.error(tc, "security.jaas.open.URL", _loginFile, e); } else if (e instanceof IOException) { Tr.error(tc, "security.jaas.create.URL", _loginFile, e); } error1 = true; } catch (IOException ioe) { Tr.error(tc, "security.jaas.create.URL", _loginFile, ioe); error1 = true; } catch (ParserException pe) { Tr.error(tc, "security.jaas.parser.URL", _loginFile, pe); error1 = true; } finally { if (reader != null) { try { reader.close(); } catch (IOException e) { // It is OK to ignore this exception, since we are closing the reader } } } // Note that a login config file may be specified as // java.security.auth.login.config="=some file path". The second '=' // sign is signficant. It means only use the specified login file // and ingore others that may appear in java.security. Boolean error2 = Boolean.FALSE; if (!singleLogInFile) { // ckmason 5/9/02, the following doPrivilege is necessary because there may // be user code on the call stack that calls Configuration.refresh(). The only // permission required of the caller is javax.security.auth.AuthPermission("refreshLoginConfiguration"). // CTS opened defect 128889 because of an unexpected ACE, e.g.: // SVR-ERROR: Configuration.refresh() caught SecurityException. // access denied (java.security.SecurityPermission getProperty.login.url.1) // $A8: Use ibm AccessController.doPrivileged for performance reasons error2 = (Boolean) AccessController.doPrivileged(new java.security.PrivilegedAction() { @Override public Object run() { int i = 1; String iLoginFile2 = null; URL myUrl2 = null; Reader retrdr2 = null; boolean error = false; while ((iLoginFile2 = Security.getProperty("login.url." + i)) != null) { if (tc.isDebugEnabled()) { Tr.debug(tc, "JAAS login configuration file (" + i + "): " + iLoginFile2); } try { myUrl2 = new URL(iLoginFile2); retrdr2 = new BufferedReader(new InputStreamReader(myUrl2.openStream())); Map<String, List<AppConfigurationEntry>> tmpMap = parse(retrdr2); if (tmpMap != null) { result.putAll(tmpMap); } if (tc.isDebugEnabled()) { Tr.debug(tc, "JAAS login configuration file (" + i + "): " + iLoginFile2 + " processed"); } } catch (MalformedURLException mue) { Tr.error(tc, "security.jaas.open.URL", iLoginFile2, mue); error = true; } catch (IOException ioe) { Tr.error(tc, "security.jaas.create.URL", iLoginFile2, ioe); error = true; } catch (ParserException pe) { Tr.error(tc, "security.jaas.parser.URL", iLoginFile2, pe); error = true; } i += 1; } return Boolean.valueOf(error); // return new Boolean(error); } }); } if ((error1 == false) && (error2.booleanValue() == false)) { _fileMap = result; // only replace where there is no error } }
class class_name[name] begin[{] method[buildFileEntry, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[HashMap], result] local_variable[type[Reader], reader] local_variable[type[boolean], error1] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=openLoginFileAction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No JAAS login configuration file specified as "), operandr=MemberReference(member=AUTHPROP, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" property"), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="JAAS login configuration file: "), operandr=MemberReference(member=_loginFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" singleLogInFile: "), operator=+), operandr=MemberReference(member=singleLogInFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=openLoginFileAction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=doPrivileged, postfix_operators=[], prefix_operators=[], qualifier=AccessController, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Reader, sub_type=None))), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=mapresult)], 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=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=AppConfigurationEntry, sub_type=None))], dimensions=[], name=List, sub_type=None))], dimensions=[], name=Map, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=mapresult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=mapresult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=putAll, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="JAAS login configuration file: "), operandr=MemberReference(member=_loginFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" processed"), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)]))]))], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getException, postfix_operators=[], prefix_operators=[], qualifier=pae, selectors=[], type_arguments=None), name=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Exception, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=MalformedURLException, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=IOException, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="security.jaas.create.URL"), MemberReference(member=_loginFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="security.jaas.open.URL"), MemberReference(member=_loginFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=error1, 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=pae, types=['java.security.PrivilegedActionException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="security.jaas.create.URL"), MemberReference(member=_loginFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ioe, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=error1, 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=ioe, types=['IOException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="security.jaas.parser.URL"), MemberReference(member=_loginFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pe, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=error1, 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=pe, types=['ParserException']))], finally_block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None)]))], label=None, resources=None) local_variable[type[Boolean], error2] if[member[.singleLogInFile]] begin[{] assign[member[.error2], Cast(expression=MethodInvocation(arguments=[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=1), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=iLoginFile2)], 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=null), name=myUrl2)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=URL, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=retrdr2)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Reader, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=error)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), WhileStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="JAAS login configuration file ("), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="): "), operator=+), operandr=MemberReference(member=iLoginFile2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)])), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=myUrl2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=iLoginFile2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=URL, sub_type=None))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=retrdr2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=openStream, postfix_operators=[], prefix_operators=[], qualifier=myUrl2, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InputStreamReader, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BufferedReader, sub_type=None))), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=retrdr2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=tmpMap)], 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=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=AppConfigurationEntry, sub_type=None))], dimensions=[], name=List, sub_type=None))], dimensions=[], name=Map, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=tmpMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tmpMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=putAll, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="JAAS login configuration file ("), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="): "), operator=+), operandr=MemberReference(member=iLoginFile2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" processed"), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="security.jaas.open.URL"), MemberReference(member=iLoginFile2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=mue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=error, 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=mue, types=['MalformedURLException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="security.jaas.create.URL"), MemberReference(member=iLoginFile2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ioe, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=error, 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=ioe, types=['IOException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="security.jaas.parser.URL"), MemberReference(member=iLoginFile2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pe, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=error, 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=pe, types=['ParserException']))], finally_block=None, label=None, resources=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]), condition=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=iLoginFile2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="login.url."), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=getProperty, postfix_operators=[], prefix_operators=[], qualifier=Security, selectors=[], type_arguments=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=error, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Boolean, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=run, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=security, sub_type=ReferenceType(arguments=None, dimensions=None, name=PrivilegedAction, sub_type=None))))], member=doPrivileged, postfix_operators=[], prefix_operators=[], qualifier=AccessController, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Boolean, sub_type=None))] else begin[{] None end[}] if[binary_operation[binary_operation[member[.error1], ==, literal[false]], &&, binary_operation[call[error2.booleanValue, parameter[]], ==, literal[false]]]] begin[{] assign[member[._fileMap], member[.result]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[buildFileEntry] operator[SEP] operator[SEP] { Keyword[final] identifier[HashMap] identifier[result] operator[=] Keyword[new] identifier[HashMap] operator[SEP] operator[SEP] operator[SEP] identifier[Reader] identifier[reader] operator[=] Other[null] operator[SEP] Keyword[boolean] identifier[error1] operator[=] literal[boolean] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[openLoginFileAction] operator[!=] Other[null] 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] identifier[tc] , literal[String] operator[+] identifier[_loginFile] operator[+] literal[String] operator[+] identifier[singleLogInFile] operator[SEP] operator[SEP] } identifier[reader] operator[=] operator[SEP] identifier[Reader] operator[SEP] identifier[AccessController] operator[SEP] identifier[doPrivileged] operator[SEP] identifier[openLoginFileAction] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[AppConfigurationEntry] operator[>] operator[>] identifier[mapresult] operator[=] identifier[parse] operator[SEP] identifier[reader] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mapresult] operator[!=] Other[null] operator[SEP] { identifier[result] operator[SEP] identifier[putAll] operator[SEP] identifier[mapresult] 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] identifier[tc] , literal[String] operator[+] identifier[_loginFile] operator[+] literal[String] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[AUTHPROP] operator[+] literal[String] operator[SEP] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[java] operator[SEP] identifier[security] operator[SEP] identifier[PrivilegedActionException] identifier[pae] operator[SEP] { identifier[Exception] identifier[e] operator[=] identifier[pae] operator[SEP] identifier[getException] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[e] Keyword[instanceof] identifier[MalformedURLException] operator[SEP] { identifier[Tr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] , identifier[_loginFile] , identifier[e] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[e] Keyword[instanceof] identifier[IOException] operator[SEP] { identifier[Tr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] , identifier[_loginFile] , identifier[e] operator[SEP] operator[SEP] } identifier[error1] operator[=] literal[boolean] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[ioe] operator[SEP] { identifier[Tr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] , identifier[_loginFile] , identifier[ioe] operator[SEP] operator[SEP] identifier[error1] operator[=] literal[boolean] operator[SEP] } Keyword[catch] operator[SEP] identifier[ParserException] identifier[pe] operator[SEP] { identifier[Tr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] , identifier[_loginFile] , identifier[pe] operator[SEP] operator[SEP] identifier[error1] operator[=] literal[boolean] operator[SEP] } Keyword[finally] { Keyword[if] operator[SEP] identifier[reader] operator[!=] Other[null] operator[SEP] { Keyword[try] { identifier[reader] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { } } } identifier[Boolean] identifier[error2] operator[=] identifier[Boolean] operator[SEP] identifier[FALSE] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[singleLogInFile] operator[SEP] { identifier[error2] operator[=] operator[SEP] identifier[Boolean] operator[SEP] identifier[AccessController] operator[SEP] identifier[doPrivileged] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[security] operator[SEP] identifier[PrivilegedAction] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[run] operator[SEP] operator[SEP] { Keyword[int] identifier[i] operator[=] Other[1] operator[SEP] identifier[String] identifier[iLoginFile2] operator[=] Other[null] operator[SEP] identifier[URL] identifier[myUrl2] operator[=] Other[null] operator[SEP] identifier[Reader] identifier[retrdr2] operator[=] Other[null] operator[SEP] Keyword[boolean] identifier[error] operator[=] literal[boolean] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[iLoginFile2] operator[=] identifier[Security] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[+] identifier[i] operator[SEP] operator[SEP] operator[!=] Other[null] 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] identifier[tc] , literal[String] operator[+] identifier[i] operator[+] literal[String] operator[+] identifier[iLoginFile2] operator[SEP] operator[SEP] } Keyword[try] { identifier[myUrl2] operator[=] Keyword[new] identifier[URL] operator[SEP] identifier[iLoginFile2] operator[SEP] operator[SEP] identifier[retrdr2] operator[=] Keyword[new] identifier[BufferedReader] operator[SEP] Keyword[new] identifier[InputStreamReader] operator[SEP] identifier[myUrl2] operator[SEP] identifier[openStream] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[AppConfigurationEntry] operator[>] operator[>] identifier[tmpMap] operator[=] identifier[parse] operator[SEP] identifier[retrdr2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tmpMap] operator[!=] Other[null] operator[SEP] { identifier[result] operator[SEP] identifier[putAll] operator[SEP] identifier[tmpMap] 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] identifier[tc] , literal[String] operator[+] identifier[i] operator[+] literal[String] operator[+] identifier[iLoginFile2] operator[+] literal[String] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[MalformedURLException] identifier[mue] operator[SEP] { identifier[Tr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] , identifier[iLoginFile2] , identifier[mue] operator[SEP] operator[SEP] identifier[error] operator[=] literal[boolean] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[ioe] operator[SEP] { identifier[Tr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] , identifier[iLoginFile2] , identifier[ioe] operator[SEP] operator[SEP] identifier[error] operator[=] literal[boolean] operator[SEP] } Keyword[catch] operator[SEP] identifier[ParserException] identifier[pe] operator[SEP] { identifier[Tr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] , identifier[iLoginFile2] , identifier[pe] operator[SEP] operator[SEP] identifier[error] operator[=] literal[boolean] operator[SEP] } identifier[i] operator[+=] Other[1] operator[SEP] } Keyword[return] identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[error] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[SEP] identifier[error1] operator[==] literal[boolean] operator[SEP] operator[&&] operator[SEP] identifier[error2] operator[SEP] identifier[booleanValue] operator[SEP] operator[SEP] operator[==] literal[boolean] operator[SEP] operator[SEP] { identifier[_fileMap] operator[=] identifier[result] operator[SEP] } }
public DrawerProfile setRoundedAvatar(Context context, Bitmap image) { return setAvatar(new RoundedAvatarDrawable(new BitmapDrawable(context.getResources(), image).getBitmap())); }
class class_name[name] begin[{] method[setRoundedAvatar, return_type[type[DrawerProfile]], modifier[public], parameter[context, image]] begin[{] return[call[.setAvatar, parameter[ClassCreator(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getResources, postfix_operators=[], prefix_operators=[], qualifier=context, selectors=[], type_arguments=None), MemberReference(member=image, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getBitmap, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=BitmapDrawable, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RoundedAvatarDrawable, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[DrawerProfile] identifier[setRoundedAvatar] operator[SEP] identifier[Context] identifier[context] , identifier[Bitmap] identifier[image] operator[SEP] { Keyword[return] identifier[setAvatar] operator[SEP] Keyword[new] identifier[RoundedAvatarDrawable] operator[SEP] Keyword[new] identifier[BitmapDrawable] operator[SEP] identifier[context] operator[SEP] identifier[getResources] operator[SEP] operator[SEP] , identifier[image] operator[SEP] operator[SEP] identifier[getBitmap] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static int encode(byte[] value, int valueOffset, int valueLength, byte[] dst, int dstOffset) { if (value == null) { dst[dstOffset] = NULL_BYTE_HIGH; return 1; } // Write the value length first, in a variable amount of bytes. int amt = encodeUnsignedVarInt(valueLength, dst, dstOffset); // Now write the value. System.arraycopy(value, valueOffset, dst, dstOffset + amt, valueLength); return amt + valueLength; }
class class_name[name] begin[{] method[encode, return_type[type[int]], modifier[public static], parameter[value, valueOffset, valueLength, dst, dstOffset]] begin[{] if[binary_operation[member[.value], ==, literal[null]]] begin[{] assign[member[.dst], member[.NULL_BYTE_HIGH]] return[literal[1]] else begin[{] None end[}] local_variable[type[int], amt] call[System.arraycopy, parameter[member[.value], member[.valueOffset], member[.dst], binary_operation[member[.dstOffset], +, member[.amt]], member[.valueLength]]] return[binary_operation[member[.amt], +, member[.valueLength]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[encode] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[value] , Keyword[int] identifier[valueOffset] , Keyword[int] identifier[valueLength] , Keyword[byte] operator[SEP] operator[SEP] identifier[dst] , Keyword[int] identifier[dstOffset] operator[SEP] { Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] { identifier[dst] operator[SEP] identifier[dstOffset] operator[SEP] operator[=] identifier[NULL_BYTE_HIGH] operator[SEP] Keyword[return] Other[1] operator[SEP] } Keyword[int] identifier[amt] operator[=] identifier[encodeUnsignedVarInt] operator[SEP] identifier[valueLength] , identifier[dst] , identifier[dstOffset] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[value] , identifier[valueOffset] , identifier[dst] , identifier[dstOffset] operator[+] identifier[amt] , identifier[valueLength] operator[SEP] operator[SEP] Keyword[return] identifier[amt] operator[+] identifier[valueLength] operator[SEP] }
private void checkDestinationType(DestinationType expectedDestType, SIDestinationAddress destAddr, DestinationHandler destination, boolean system) throws SINotPossibleInCurrentConfigurationException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "checkDestinationType", new Object[] { expectedDestType, destAddr, destination, destination.getDestinationType(), system }); boolean correctType = true; // 178865 Check that the destination type is the expected type if (expectedDestType != null) { correctType = false; // If the destination is foreign or a foreign bus, then skip the check if (destination.isForeign() || destination.isForeignBus() || (destination.isAlias() && destination.getDestinationType() == DestinationType.UNKNOWN)) { correctType = true; if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "Correct Type as destination is Foreign"); } else { // For Remote Temporary topicspaces we send to the _PSIMP.TDRECEIVER queue. This means that // remote topicspaces drop through this code. if (expectedDestType == destination.getDestinationType()) correctType = true; // If we're sending to a remote temporary topic space then we // can't rely on the type of the destination (as it's the _PSIMP.TDRECEIVER queue) // so check the prefix on the original name instead else if ((expectedDestType == DestinationType.TOPICSPACE) && (destAddr.getDestinationName().startsWith(SIMPConstants.TEMPORARY_PUBSUB_DESTINATION_PREFIX))) correctType = true; } } // Irrespective of type checking, system queues can only be accessed // by system SPI users and vice versa. if (system ^ destination.isSystem()) { if (destination.isSystem()) { // The exception to this rule is when we use the TDRECEIVER queue to // send messages remotely (which is a system queue being used for // normal messages). SIBUuid8 encodedME = SIMPUtils.parseME(destAddr.getDestinationName()); if ((encodedME != null) && !(encodedME.equals(_messageProcessor.getMessagingEngineUuid()))) correctType = true; } } if (!correctType) { String type = "SYSTEM"; if (expectedDestType != null) { type = expectedDestType.toString(); } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit( tc, "checkDestinationType", "Destination is of wrong type " + type + ":" + destination.getDestinationType().toString()); // Get the string for the message inserts String msg = locateCorrectMessage(destination.getDestinationType(), expectedDestType); SIMPNotPossibleInCurrentConfigurationException e = null; if (!msg.equals("DELIVERY_ERROR_SIRC_14")) { e = new SIMPNotPossibleInCurrentConfigurationException( nls_cwsik.getFormattedMessage( msg, new Object[] { destination.getName(), _messageProcessor.getMessagingEngineName() }, null)); e.setExceptionReason(Integer.parseInt(msg.replaceFirst("DELIVERY_ERROR_SIRC_", ""))); e.setExceptionInserts(new String[] { destination.getName(), _messageProcessor.getMessagingEngineName() }); } else { e = new SIMPNotPossibleInCurrentConfigurationException( nls_cwsik.getFormattedMessage( msg, new Object[] { destination.getName(), _messageProcessor.getMessagingEngineName(), destination.getDestinationType().toString(), type }, null)); e.setExceptionReason(SIRCConstants.SIRC0014_INCORRECT_DESTINATION_USAGE_ERROR); e.setExceptionInserts(new String[] { destination.getName(), _messageProcessor.getMessagingEngineName(), destination.getDestinationType().toString(), type }); } throw e; } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "checkDestinationType"); }
class class_name[name] begin[{] method[checkDestinationType, return_type[void], modifier[private], parameter[expectedDestType, destAddr, destination, system]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["checkDestinationType"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=expectedDestType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=destAddr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=destination, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getDestinationType, postfix_operators=[], prefix_operators=[], qualifier=destination, selectors=[], type_arguments=None), MemberReference(member=system, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]] else begin[{] None end[}] local_variable[type[boolean], correctType] if[binary_operation[member[.expectedDestType], !=, literal[null]]] begin[{] assign[member[.correctType], literal[false]] if[binary_operation[binary_operation[call[destination.isForeign, parameter[]], ||, call[destination.isForeignBus, parameter[]]], ||, binary_operation[call[destination.isAlias, parameter[]], &&, binary_operation[call[destination.getDestinationType, parameter[]], ==, member[DestinationType.UNKNOWN]]]]] begin[{] assign[member[.correctType], literal[true]] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[SibTr.debug, parameter[member[.tc], literal["Correct Type as destination is Foreign"]]] else begin[{] None end[}] else begin[{] if[binary_operation[member[.expectedDestType], ==, call[destination.getDestinationType, parameter[]]]] begin[{] assign[member[.correctType], literal[true]] else begin[{] if[binary_operation[binary_operation[member[.expectedDestType], ==, member[DestinationType.TOPICSPACE]], &&, call[destAddr.getDestinationName, parameter[]]]] begin[{] assign[member[.correctType], literal[true]] else begin[{] None end[}] end[}] end[}] else begin[{] None end[}] if[binary_operation[member[.system], ^, call[destination.isSystem, parameter[]]]] begin[{] if[call[destination.isSystem, parameter[]]] begin[{] local_variable[type[SIBUuid8], encodedME] if[binary_operation[binary_operation[member[.encodedME], !=, literal[null]], &&, call[encodedME.equals, parameter[call[_messageProcessor.getMessagingEngineUuid, parameter[]]]]]] begin[{] assign[member[.correctType], literal[true]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] if[member[.correctType]] begin[{] local_variable[type[String], type] if[binary_operation[member[.expectedDestType], !=, literal[null]]] begin[{] assign[member[.type], call[expectedDestType.toString, parameter[]]] else begin[{] None end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["checkDestinationType"], binary_operation[binary_operation[binary_operation[literal["Destination is of wrong type "], +, member[.type]], +, literal[":"]], +, call[destination.getDestinationType, parameter[]]]]] else begin[{] None end[}] local_variable[type[String], msg] local_variable[type[SIMPNotPossibleInCurrentConfigurationException], e] if[call[msg.equals, parameter[literal["DELIVERY_ERROR_SIRC_14"]]]] begin[{] assign[member[.e], ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=destination, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getMessagingEngineName, postfix_operators=[], prefix_operators=[], qualifier=_messageProcessor, selectors=[], type_arguments=None)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=getFormattedMessage, postfix_operators=[], prefix_operators=[], qualifier=nls_cwsik, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SIMPNotPossibleInCurrentConfigurationException, sub_type=None))] call[e.setExceptionReason, parameter[call[Integer.parseInt, parameter[call[msg.replaceFirst, parameter[literal["DELIVERY_ERROR_SIRC_"], literal[""]]]]]]] call[e.setExceptionInserts, parameter[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=destination, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getMessagingEngineName, postfix_operators=[], prefix_operators=[], qualifier=_messageProcessor, selectors=[], type_arguments=None)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))]] else begin[{] assign[member[.e], ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=destination, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getMessagingEngineName, postfix_operators=[], prefix_operators=[], qualifier=_messageProcessor, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getDestinationType, postfix_operators=[], prefix_operators=[], qualifier=destination, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=getFormattedMessage, postfix_operators=[], prefix_operators=[], qualifier=nls_cwsik, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SIMPNotPossibleInCurrentConfigurationException, sub_type=None))] call[e.setExceptionReason, parameter[member[SIRCConstants.SIRC0014_INCORRECT_DESTINATION_USAGE_ERROR]]] call[e.setExceptionInserts, parameter[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=destination, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getMessagingEngineName, postfix_operators=[], prefix_operators=[], qualifier=_messageProcessor, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getDestinationType, postfix_operators=[], prefix_operators=[], qualifier=destination, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))]] end[}] ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) else begin[{] None end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["checkDestinationType"]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[checkDestinationType] operator[SEP] identifier[DestinationType] identifier[expectedDestType] , identifier[SIDestinationAddress] identifier[destAddr] , identifier[DestinationHandler] identifier[destination] , Keyword[boolean] identifier[system] operator[SEP] Keyword[throws] identifier[SINotPossibleInCurrentConfigurationException] { 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] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[expectedDestType] , identifier[destAddr] , identifier[destination] , identifier[destination] operator[SEP] identifier[getDestinationType] operator[SEP] operator[SEP] , identifier[system] } operator[SEP] operator[SEP] Keyword[boolean] identifier[correctType] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[expectedDestType] operator[!=] Other[null] operator[SEP] { identifier[correctType] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[destination] operator[SEP] identifier[isForeign] operator[SEP] operator[SEP] operator[||] identifier[destination] operator[SEP] identifier[isForeignBus] operator[SEP] operator[SEP] operator[||] operator[SEP] identifier[destination] operator[SEP] identifier[isAlias] operator[SEP] operator[SEP] operator[&&] identifier[destination] operator[SEP] identifier[getDestinationType] operator[SEP] operator[SEP] operator[==] identifier[DestinationType] operator[SEP] identifier[UNKNOWN] operator[SEP] operator[SEP] { identifier[correctType] 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[debug] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[expectedDestType] operator[==] identifier[destination] operator[SEP] identifier[getDestinationType] operator[SEP] operator[SEP] operator[SEP] identifier[correctType] operator[=] literal[boolean] operator[SEP] Keyword[else] Keyword[if] operator[SEP] operator[SEP] identifier[expectedDestType] operator[==] identifier[DestinationType] operator[SEP] identifier[TOPICSPACE] operator[SEP] operator[&&] operator[SEP] identifier[destAddr] operator[SEP] identifier[getDestinationName] operator[SEP] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] identifier[SIMPConstants] operator[SEP] identifier[TEMPORARY_PUBSUB_DESTINATION_PREFIX] operator[SEP] operator[SEP] operator[SEP] identifier[correctType] operator[=] literal[boolean] operator[SEP] } } Keyword[if] operator[SEP] identifier[system] operator[^] identifier[destination] operator[SEP] identifier[isSystem] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[destination] operator[SEP] identifier[isSystem] operator[SEP] operator[SEP] operator[SEP] { identifier[SIBUuid8] identifier[encodedME] operator[=] identifier[SIMPUtils] operator[SEP] identifier[parseME] operator[SEP] identifier[destAddr] operator[SEP] identifier[getDestinationName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[encodedME] operator[!=] Other[null] operator[SEP] operator[&&] operator[!] operator[SEP] identifier[encodedME] operator[SEP] identifier[equals] operator[SEP] identifier[_messageProcessor] operator[SEP] identifier[getMessagingEngineUuid] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[correctType] operator[=] literal[boolean] operator[SEP] } } Keyword[if] operator[SEP] operator[!] identifier[correctType] operator[SEP] { identifier[String] identifier[type] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[expectedDestType] operator[!=] Other[null] operator[SEP] { identifier[type] operator[=] identifier[expectedDestType] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , literal[String] operator[+] identifier[type] operator[+] literal[String] operator[+] identifier[destination] operator[SEP] identifier[getDestinationType] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[msg] operator[=] identifier[locateCorrectMessage] operator[SEP] identifier[destination] operator[SEP] identifier[getDestinationType] operator[SEP] operator[SEP] , identifier[expectedDestType] operator[SEP] operator[SEP] identifier[SIMPNotPossibleInCurrentConfigurationException] identifier[e] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[msg] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[e] operator[=] Keyword[new] identifier[SIMPNotPossibleInCurrentConfigurationException] operator[SEP] identifier[nls_cwsik] operator[SEP] identifier[getFormattedMessage] operator[SEP] identifier[msg] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[destination] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[_messageProcessor] operator[SEP] identifier[getMessagingEngineName] operator[SEP] operator[SEP] } , Other[null] operator[SEP] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[setExceptionReason] operator[SEP] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[msg] operator[SEP] identifier[replaceFirst] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[setExceptionInserts] operator[SEP] Keyword[new] identifier[String] operator[SEP] operator[SEP] { identifier[destination] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[_messageProcessor] operator[SEP] identifier[getMessagingEngineName] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] } Keyword[else] { identifier[e] operator[=] Keyword[new] identifier[SIMPNotPossibleInCurrentConfigurationException] operator[SEP] identifier[nls_cwsik] operator[SEP] identifier[getFormattedMessage] operator[SEP] identifier[msg] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[destination] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[_messageProcessor] operator[SEP] identifier[getMessagingEngineName] operator[SEP] operator[SEP] , identifier[destination] operator[SEP] identifier[getDestinationType] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[type] } , Other[null] operator[SEP] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[setExceptionReason] operator[SEP] identifier[SIRCConstants] operator[SEP] identifier[SIRC0014_INCORRECT_DESTINATION_USAGE_ERROR] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[setExceptionInserts] operator[SEP] Keyword[new] identifier[String] operator[SEP] operator[SEP] { identifier[destination] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[_messageProcessor] operator[SEP] identifier[getMessagingEngineName] operator[SEP] operator[SEP] , identifier[destination] operator[SEP] identifier[getDestinationType] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[type] } operator[SEP] operator[SEP] } Keyword[throw] identifier[e] operator[SEP] } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] }
private static FeedItemOperation createDsaUrlAddOperation( DSAFeedDetails feedDetails, String url, String labelName) { // Create the FeedItemAttributeValues for the URL and label. FeedItemAttributeValue urlAttributeValue = new FeedItemAttributeValue(); urlAttributeValue.setFeedAttributeId(feedDetails.urlAttributeId); // See https://support.google.com/adwords/answer/7166527 for page feed URL recommendations and // rules. urlAttributeValue.setStringValues(new String[] {url}); FeedItemAttributeValue labelAttributeValue = new FeedItemAttributeValue(); labelAttributeValue.setFeedAttributeId(feedDetails.labelAttributeId); labelAttributeValue.setStringValues(new String[] {labelName}); // Create the feed item and operation. FeedItem feedItem = new FeedItem(); feedItem.setFeedId(feedDetails.feedId); feedItem.setAttributeValues( new FeedItemAttributeValue[] {urlAttributeValue, labelAttributeValue}); FeedItemOperation operation = new FeedItemOperation(); operation.setOperand(feedItem); operation.setOperator(Operator.ADD); return operation; }
class class_name[name] begin[{] method[createDsaUrlAddOperation, return_type[type[FeedItemOperation]], modifier[private static], parameter[feedDetails, url, labelName]] begin[{] local_variable[type[FeedItemAttributeValue], urlAttributeValue] call[urlAttributeValue.setFeedAttributeId, parameter[member[feedDetails.urlAttributeId]]] call[urlAttributeValue.setStringValues, parameter[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))]] local_variable[type[FeedItemAttributeValue], labelAttributeValue] call[labelAttributeValue.setFeedAttributeId, parameter[member[feedDetails.labelAttributeId]]] call[labelAttributeValue.setStringValues, parameter[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=labelName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))]] local_variable[type[FeedItem], feedItem] call[feedItem.setFeedId, parameter[member[feedDetails.feedId]]] call[feedItem.setAttributeValues, parameter[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=urlAttributeValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=labelAttributeValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FeedItemAttributeValue, sub_type=None))]] local_variable[type[FeedItemOperation], operation] call[operation.setOperand, parameter[member[.feedItem]]] call[operation.setOperator, parameter[member[Operator.ADD]]] return[member[.operation]] end[}] END[}]
Keyword[private] Keyword[static] identifier[FeedItemOperation] identifier[createDsaUrlAddOperation] operator[SEP] identifier[DSAFeedDetails] identifier[feedDetails] , identifier[String] identifier[url] , identifier[String] identifier[labelName] operator[SEP] { identifier[FeedItemAttributeValue] identifier[urlAttributeValue] operator[=] Keyword[new] identifier[FeedItemAttributeValue] operator[SEP] operator[SEP] operator[SEP] identifier[urlAttributeValue] operator[SEP] identifier[setFeedAttributeId] operator[SEP] identifier[feedDetails] operator[SEP] identifier[urlAttributeId] operator[SEP] operator[SEP] identifier[urlAttributeValue] operator[SEP] identifier[setStringValues] operator[SEP] Keyword[new] identifier[String] operator[SEP] operator[SEP] { identifier[url] } operator[SEP] operator[SEP] identifier[FeedItemAttributeValue] identifier[labelAttributeValue] operator[=] Keyword[new] identifier[FeedItemAttributeValue] operator[SEP] operator[SEP] operator[SEP] identifier[labelAttributeValue] operator[SEP] identifier[setFeedAttributeId] operator[SEP] identifier[feedDetails] operator[SEP] identifier[labelAttributeId] operator[SEP] operator[SEP] identifier[labelAttributeValue] operator[SEP] identifier[setStringValues] operator[SEP] Keyword[new] identifier[String] operator[SEP] operator[SEP] { identifier[labelName] } operator[SEP] operator[SEP] identifier[FeedItem] identifier[feedItem] operator[=] Keyword[new] identifier[FeedItem] operator[SEP] operator[SEP] operator[SEP] identifier[feedItem] operator[SEP] identifier[setFeedId] operator[SEP] identifier[feedDetails] operator[SEP] identifier[feedId] operator[SEP] operator[SEP] identifier[feedItem] operator[SEP] identifier[setAttributeValues] operator[SEP] Keyword[new] identifier[FeedItemAttributeValue] operator[SEP] operator[SEP] { identifier[urlAttributeValue] , identifier[labelAttributeValue] } operator[SEP] operator[SEP] identifier[FeedItemOperation] identifier[operation] operator[=] Keyword[new] identifier[FeedItemOperation] operator[SEP] operator[SEP] operator[SEP] identifier[operation] operator[SEP] identifier[setOperand] operator[SEP] identifier[feedItem] operator[SEP] operator[SEP] identifier[operation] operator[SEP] identifier[setOperator] operator[SEP] identifier[Operator] operator[SEP] identifier[ADD] operator[SEP] operator[SEP] Keyword[return] identifier[operation] operator[SEP] }
@SuppressWarnings("unchecked") public static <T> Map<String, T> fromJsonAsMap(Class<T> eleType, Reader reader) { return (Map<String, T>) fromJson(NutType.mapStr(eleType), reader); }
class class_name[name] begin[{] method[fromJsonAsMap, return_type[type[Map]], modifier[public static], parameter[eleType, reader]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=eleType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=mapStr, postfix_operators=[], prefix_operators=[], qualifier=NutType, selectors=[], type_arguments=None), MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fromJson, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=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=T, sub_type=None))], dimensions=[], name=Map, sub_type=None))] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Map] operator[<] identifier[String] , identifier[T] operator[>] identifier[fromJsonAsMap] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[eleType] , identifier[Reader] identifier[reader] operator[SEP] { Keyword[return] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[T] operator[>] operator[SEP] identifier[fromJson] operator[SEP] identifier[NutType] operator[SEP] identifier[mapStr] operator[SEP] identifier[eleType] operator[SEP] , identifier[reader] operator[SEP] operator[SEP] }
protected PreparedStatement getPreparedStatement(String sql) throws SQLException { // Inject the schema name into the SQL String replacedSQL = injectSchema(sql); return getPreparedStatement(replacedSQL, replacedSQL); }
class class_name[name] begin[{] method[getPreparedStatement, return_type[type[PreparedStatement]], modifier[protected], parameter[sql]] begin[{] local_variable[type[String], replacedSQL] return[call[.getPreparedStatement, parameter[member[.replacedSQL], member[.replacedSQL]]]] end[}] END[}]
Keyword[protected] identifier[PreparedStatement] identifier[getPreparedStatement] operator[SEP] identifier[String] identifier[sql] operator[SEP] Keyword[throws] identifier[SQLException] { identifier[String] identifier[replacedSQL] operator[=] identifier[injectSchema] operator[SEP] identifier[sql] operator[SEP] operator[SEP] Keyword[return] identifier[getPreparedStatement] operator[SEP] identifier[replacedSQL] , identifier[replacedSQL] operator[SEP] operator[SEP] }
public static File findFile(File rootDir, FilenameFilter filter) { File[] files = rootDir.listFiles(filter); Arrays.sort(files); if (files.length > 0) { return files[0]; } files = rootDir.listFiles(directoryFilter); Arrays.sort(files); for (File subDir : files) { File found = findFile(subDir, filter); if (found != null) { return found; } } return null; }
class class_name[name] begin[{] method[findFile, return_type[type[File]], modifier[public static], parameter[rootDir, filter]] begin[{] local_variable[type[File], files] call[Arrays.sort, parameter[member[.files]]] if[binary_operation[member[files.length], >, literal[0]]] begin[{] return[member[.files]] else begin[{] None end[}] assign[member[.files], call[rootDir.listFiles, parameter[member[.directoryFilter]]]] call[Arrays.sort, parameter[member[.files]]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=subDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=filter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=findFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=found)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=found, 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=MemberReference(member=found, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=files, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=subDir)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))), label=None) return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] identifier[File] identifier[findFile] operator[SEP] identifier[File] identifier[rootDir] , identifier[FilenameFilter] identifier[filter] operator[SEP] { identifier[File] operator[SEP] operator[SEP] identifier[files] operator[=] identifier[rootDir] operator[SEP] identifier[listFiles] operator[SEP] identifier[filter] operator[SEP] operator[SEP] identifier[Arrays] operator[SEP] identifier[sort] operator[SEP] identifier[files] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[files] operator[SEP] identifier[length] operator[>] Other[0] operator[SEP] { Keyword[return] identifier[files] operator[SEP] Other[0] operator[SEP] operator[SEP] } identifier[files] operator[=] identifier[rootDir] operator[SEP] identifier[listFiles] operator[SEP] identifier[directoryFilter] operator[SEP] operator[SEP] identifier[Arrays] operator[SEP] identifier[sort] operator[SEP] identifier[files] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[File] identifier[subDir] operator[:] identifier[files] operator[SEP] { identifier[File] identifier[found] operator[=] identifier[findFile] operator[SEP] identifier[subDir] , identifier[filter] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[found] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[found] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
@Override public void sessionClosed(NextFilter nextFilter, IoSession session) throws SSLException { SslHandler handler = getSslSessionHandler(session); try { synchronized (handler) { // release resources handler.destroy(); } handler.flushScheduledEvents(); } finally { // notify closed session nextFilter.sessionClosed(session); } }
class class_name[name] begin[{] method[sessionClosed, return_type[void], modifier[public], parameter[nextFilter, session]] begin[{] local_variable[type[SslHandler], handler] TryStatement(block=[SynchronizedStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=destroy, postfix_operators=[], prefix_operators=[], qualifier=handler, selectors=[], type_arguments=None), label=None)], label=None, lock=MemberReference(member=handler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), StatementExpression(expression=MethodInvocation(arguments=[], member=flushScheduledEvents, postfix_operators=[], prefix_operators=[], qualifier=handler, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sessionClosed, postfix_operators=[], prefix_operators=[], qualifier=nextFilter, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[sessionClosed] operator[SEP] identifier[NextFilter] identifier[nextFilter] , identifier[IoSession] identifier[session] operator[SEP] Keyword[throws] identifier[SSLException] { identifier[SslHandler] identifier[handler] operator[=] identifier[getSslSessionHandler] operator[SEP] identifier[session] operator[SEP] operator[SEP] Keyword[try] { Keyword[synchronized] operator[SEP] identifier[handler] operator[SEP] { identifier[handler] operator[SEP] identifier[destroy] operator[SEP] operator[SEP] operator[SEP] } identifier[handler] operator[SEP] identifier[flushScheduledEvents] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { identifier[nextFilter] operator[SEP] identifier[sessionClosed] operator[SEP] identifier[session] operator[SEP] operator[SEP] } }
protected List<MetricDatum> latencyMetricOf(MetricType metricType, Request<?> req, Object response, boolean includesRequestType) { AWSRequestMetrics m = req.getAWSRequestMetrics(); TimingInfo root = m.getTimingInfo(); final String metricName = metricType.name(); List<TimingInfo> subMeasures = root.getAllSubMeasurements(metricName); if (subMeasures != null) { List<MetricDatum> result = new ArrayList<MetricDatum>(subMeasures.size()); for (TimingInfo sub : subMeasures) { if (sub.isEndTimeKnown()) { // being defensive List<Dimension> dims = new ArrayList<Dimension>(); dims.add(new Dimension() .withName(Dimensions.MetricType.name()) .withValue(metricName)); // Either a non request type specific datum is created per // sub-measurement, or a request type specific one is // created but not both if (includesRequestType) { dims.add(new Dimension() .withName(Dimensions.RequestType.name()) .withValue(requestType(req))); } MetricDatum datum = new MetricDatum() .withMetricName(req.getServiceName()) .withDimensions(dims) .withUnit(StandardUnit.Milliseconds) .withValue(sub.getTimeTakenMillisIfKnown()); result.add(datum); } } return result; } return Collections.emptyList(); }
class class_name[name] begin[{] method[latencyMetricOf, return_type[type[List]], modifier[protected], parameter[metricType, req, response, includesRequestType]] begin[{] local_variable[type[AWSRequestMetrics], m] local_variable[type[TimingInfo], root] local_variable[type[String], metricName] local_variable[type[List], subMeasures] if[binary_operation[member[.subMeasures], !=, literal[null]]] begin[{] local_variable[type[List], result] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isEndTimeKnown, postfix_operators=[], prefix_operators=[], qualifier=sub, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Dimension, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None)), name=dims)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Dimension, sub_type=None))], dimensions=[], name=List, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=name, postfix_operators=[], prefix_operators=[], qualifier=Dimensions.MetricType, selectors=[], type_arguments=None)], member=withName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=metricName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Dimension, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=dims, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=includesRequestType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=name, postfix_operators=[], prefix_operators=[], qualifier=Dimensions.RequestType, selectors=[], type_arguments=None)], member=withName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=req, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=requestType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=withValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Dimension, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=dims, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getServiceName, postfix_operators=[], prefix_operators=[], qualifier=req, selectors=[], type_arguments=None)], member=withMetricName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=dims, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withDimensions, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=Milliseconds, postfix_operators=[], prefix_operators=[], qualifier=StandardUnit, selectors=[])], member=withUnit, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTimeTakenMillisIfKnown, postfix_operators=[], prefix_operators=[], qualifier=sub, selectors=[], type_arguments=None)], member=withValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=MetricDatum, sub_type=None)), name=datum)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MetricDatum, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=datum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=subMeasures, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=sub)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TimingInfo, sub_type=None))), label=None) return[member[.result]] else begin[{] None end[}] return[call[Collections.emptyList, parameter[]]] end[}] END[}]
Keyword[protected] identifier[List] operator[<] identifier[MetricDatum] operator[>] identifier[latencyMetricOf] operator[SEP] identifier[MetricType] identifier[metricType] , identifier[Request] operator[<] operator[?] operator[>] identifier[req] , identifier[Object] identifier[response] , Keyword[boolean] identifier[includesRequestType] operator[SEP] { identifier[AWSRequestMetrics] identifier[m] operator[=] identifier[req] operator[SEP] identifier[getAWSRequestMetrics] operator[SEP] operator[SEP] operator[SEP] identifier[TimingInfo] identifier[root] operator[=] identifier[m] operator[SEP] identifier[getTimingInfo] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[metricName] operator[=] identifier[metricType] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[TimingInfo] operator[>] identifier[subMeasures] operator[=] identifier[root] operator[SEP] identifier[getAllSubMeasurements] operator[SEP] identifier[metricName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[subMeasures] operator[!=] Other[null] operator[SEP] { identifier[List] operator[<] identifier[MetricDatum] operator[>] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[MetricDatum] operator[>] operator[SEP] identifier[subMeasures] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[TimingInfo] identifier[sub] operator[:] identifier[subMeasures] operator[SEP] { Keyword[if] operator[SEP] identifier[sub] operator[SEP] identifier[isEndTimeKnown] operator[SEP] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[Dimension] operator[>] identifier[dims] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Dimension] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[dims] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Dimension] operator[SEP] operator[SEP] operator[SEP] identifier[withName] operator[SEP] identifier[Dimensions] operator[SEP] identifier[MetricType] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[withValue] operator[SEP] identifier[metricName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[includesRequestType] operator[SEP] { identifier[dims] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Dimension] operator[SEP] operator[SEP] operator[SEP] identifier[withName] operator[SEP] identifier[Dimensions] operator[SEP] identifier[RequestType] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[withValue] operator[SEP] identifier[requestType] operator[SEP] identifier[req] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[MetricDatum] identifier[datum] operator[=] Keyword[new] identifier[MetricDatum] operator[SEP] operator[SEP] operator[SEP] identifier[withMetricName] operator[SEP] identifier[req] operator[SEP] identifier[getServiceName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[withDimensions] operator[SEP] identifier[dims] operator[SEP] operator[SEP] identifier[withUnit] operator[SEP] identifier[StandardUnit] operator[SEP] identifier[Milliseconds] operator[SEP] operator[SEP] identifier[withValue] operator[SEP] identifier[sub] operator[SEP] identifier[getTimeTakenMillisIfKnown] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[add] operator[SEP] identifier[datum] operator[SEP] operator[SEP] } } Keyword[return] identifier[result] operator[SEP] } Keyword[return] identifier[Collections] operator[SEP] identifier[emptyList] operator[SEP] operator[SEP] operator[SEP] }
@Override protected void eval() { if (srcControl.get() instanceof TextInputControl) { evalTextInputField(); } if (srcControl.get() instanceof ComboBoxBase) { evalComboBoxField(); } }
class class_name[name] begin[{] method[eval, return_type[void], modifier[protected], parameter[]] begin[{] if[binary_operation[call[srcControl.get, parameter[]], instanceof, type[TextInputControl]]] begin[{] call[.evalTextInputField, parameter[]] else begin[{] None end[}] if[binary_operation[call[srcControl.get, parameter[]], instanceof, type[ComboBoxBase]]] begin[{] call[.evalComboBoxField, parameter[]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[eval] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[srcControl] operator[SEP] identifier[get] operator[SEP] operator[SEP] Keyword[instanceof] identifier[TextInputControl] operator[SEP] { identifier[evalTextInputField] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[srcControl] operator[SEP] identifier[get] operator[SEP] operator[SEP] Keyword[instanceof] identifier[ComboBoxBase] operator[SEP] { identifier[evalComboBoxField] operator[SEP] operator[SEP] operator[SEP] } }
@SuppressWarnings("unchecked") public static <T> Stream<T> concat(Stream<? extends T> a, Stream<? extends T> b) { return new Stream(Iterators.concat(a.iterator, b.iterator)); }
class class_name[name] begin[{] method[concat, return_type[type[Stream]], modifier[public static], parameter[a, b]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=iterator, postfix_operators=[], prefix_operators=[], qualifier=a, selectors=[]), MemberReference(member=iterator, postfix_operators=[], prefix_operators=[], qualifier=b, selectors=[])], member=concat, postfix_operators=[], prefix_operators=[], qualifier=Iterators, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Stream, sub_type=None))] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Stream] operator[<] identifier[T] operator[>] identifier[concat] operator[SEP] identifier[Stream] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] identifier[a] , identifier[Stream] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] identifier[b] operator[SEP] { Keyword[return] Keyword[new] identifier[Stream] operator[SEP] identifier[Iterators] operator[SEP] identifier[concat] operator[SEP] identifier[a] operator[SEP] identifier[iterator] , identifier[b] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] }
@Override @GraphTransaction public void deleteTrait(String guid, String traitNameToBeDeleted) throws TraitNotFoundException, EntityNotFoundException, RepositoryException { LOG.debug("Deleting trait={} from entity={}", traitNameToBeDeleted, guid); GraphTransactionInterceptor.lockObjectAndReleasePostCommit(guid); AtlasVertex instanceVertex = graphHelper.getVertexForGUID(guid); List<String> traitNames = GraphHelper.getTraitNames(instanceVertex); if (!traitNames.contains(traitNameToBeDeleted)) { throw new TraitNotFoundException( "Could not find trait=" + traitNameToBeDeleted + " in the repository for entity: " + guid); } try { final String entityTypeName = GraphHelper.getTypeName(instanceVertex); String relationshipLabel = GraphHelper.getTraitLabel(entityTypeName, traitNameToBeDeleted); AtlasEdge edge = graphHelper.getEdgeForLabel(instanceVertex, relationshipLabel); if(edge != null) { deleteHandler.deleteEdgeReference(edge, DataTypes.TypeCategory.TRAIT, false, true); } // update the traits in entity once trait removal is successful traitNames.remove(traitNameToBeDeleted); updateTraits(instanceVertex, traitNames); } catch (Exception e) { throw new RepositoryException(e); } }
class class_name[name] begin[{] method[deleteTrait, return_type[void], modifier[public], parameter[guid, traitNameToBeDeleted]] begin[{] call[LOG.debug, parameter[literal["Deleting trait={} from entity={}"], member[.traitNameToBeDeleted], member[.guid]]] call[GraphTransactionInterceptor.lockObjectAndReleasePostCommit, parameter[member[.guid]]] local_variable[type[AtlasVertex], instanceVertex] local_variable[type[List], traitNames] if[call[traitNames.contains, parameter[member[.traitNameToBeDeleted]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not find trait="), operandr=MemberReference(member=traitNameToBeDeleted, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" in the repository for entity: "), operator=+), operandr=MemberReference(member=guid, 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=TraitNotFoundException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=instanceVertex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getTypeName, postfix_operators=[], prefix_operators=[], qualifier=GraphHelper, selectors=[], type_arguments=None), name=entityTypeName)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=entityTypeName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=traitNameToBeDeleted, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getTraitLabel, postfix_operators=[], prefix_operators=[], qualifier=GraphHelper, selectors=[], type_arguments=None), name=relationshipLabel)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=instanceVertex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=relationshipLabel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getEdgeForLabel, postfix_operators=[], prefix_operators=[], qualifier=graphHelper, selectors=[], type_arguments=None), name=edge)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AtlasEdge, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=edge, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=edge, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=TRAIT, postfix_operators=[], prefix_operators=[], qualifier=DataTypes.TypeCategory, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=deleteEdgeReference, postfix_operators=[], prefix_operators=[], qualifier=deleteHandler, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=traitNameToBeDeleted, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=traitNames, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=instanceVertex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=traitNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=updateTraits, 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=RepositoryException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] annotation[@] identifier[GraphTransaction] Keyword[public] Keyword[void] identifier[deleteTrait] operator[SEP] identifier[String] identifier[guid] , identifier[String] identifier[traitNameToBeDeleted] operator[SEP] Keyword[throws] identifier[TraitNotFoundException] , identifier[EntityNotFoundException] , identifier[RepositoryException] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[traitNameToBeDeleted] , identifier[guid] operator[SEP] operator[SEP] identifier[GraphTransactionInterceptor] operator[SEP] identifier[lockObjectAndReleasePostCommit] operator[SEP] identifier[guid] operator[SEP] operator[SEP] identifier[AtlasVertex] identifier[instanceVertex] operator[=] identifier[graphHelper] operator[SEP] identifier[getVertexForGUID] operator[SEP] identifier[guid] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[traitNames] operator[=] identifier[GraphHelper] operator[SEP] identifier[getTraitNames] operator[SEP] identifier[instanceVertex] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[traitNames] operator[SEP] identifier[contains] operator[SEP] identifier[traitNameToBeDeleted] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[TraitNotFoundException] operator[SEP] literal[String] operator[+] identifier[traitNameToBeDeleted] operator[+] literal[String] operator[+] identifier[guid] operator[SEP] operator[SEP] } Keyword[try] { Keyword[final] identifier[String] identifier[entityTypeName] operator[=] identifier[GraphHelper] operator[SEP] identifier[getTypeName] operator[SEP] identifier[instanceVertex] operator[SEP] operator[SEP] identifier[String] identifier[relationshipLabel] operator[=] identifier[GraphHelper] operator[SEP] identifier[getTraitLabel] operator[SEP] identifier[entityTypeName] , identifier[traitNameToBeDeleted] operator[SEP] operator[SEP] identifier[AtlasEdge] identifier[edge] operator[=] identifier[graphHelper] operator[SEP] identifier[getEdgeForLabel] operator[SEP] identifier[instanceVertex] , identifier[relationshipLabel] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[edge] operator[!=] Other[null] operator[SEP] { identifier[deleteHandler] operator[SEP] identifier[deleteEdgeReference] operator[SEP] identifier[edge] , identifier[DataTypes] operator[SEP] identifier[TypeCategory] operator[SEP] identifier[TRAIT] , literal[boolean] , literal[boolean] operator[SEP] operator[SEP] } identifier[traitNames] operator[SEP] identifier[remove] operator[SEP] identifier[traitNameToBeDeleted] operator[SEP] operator[SEP] identifier[updateTraits] operator[SEP] identifier[instanceVertex] , identifier[traitNames] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RepositoryException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
public Object evaluate(String scriptName, Reader reader) { try { scriptEngine.put(ScriptEngine.FILENAME, scriptName); return scriptEngine.eval(reader); } catch (ScriptException e) { throw new BundlingProcessException("Error while evaluating script : " + scriptName, e); } }
class class_name[name] begin[{] method[evaluate, return_type[type[Object]], modifier[public], parameter[scriptName, reader]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FILENAME, postfix_operators=[], prefix_operators=[], qualifier=ScriptEngine, selectors=[]), MemberReference(member=scriptName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=scriptEngine, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=eval, postfix_operators=[], prefix_operators=[], qualifier=scriptEngine, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error while evaluating script : "), operandr=MemberReference(member=scriptName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BundlingProcessException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ScriptException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] identifier[Object] identifier[evaluate] operator[SEP] identifier[String] identifier[scriptName] , identifier[Reader] identifier[reader] operator[SEP] { Keyword[try] { identifier[scriptEngine] operator[SEP] identifier[put] operator[SEP] identifier[ScriptEngine] operator[SEP] identifier[FILENAME] , identifier[scriptName] operator[SEP] operator[SEP] Keyword[return] identifier[scriptEngine] operator[SEP] identifier[eval] operator[SEP] identifier[reader] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ScriptException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[BundlingProcessException] operator[SEP] literal[String] operator[+] identifier[scriptName] , identifier[e] operator[SEP] operator[SEP] } }
private void read() { // define the specification format final int key = 0; final int description = 1; final int offset = 2; final int length = 3; SpecificationFormat format = new SpecificationFormat(key, description, offset, length); // read the header data try { data = IOUtil.readHeaderEntries(COFFHeaderKey.class, format, COFF_SPEC_FILE, headerbytes, getOffset()); } catch (IOException e) { logger.error("unable to read coff specification: " + e.getMessage()); } }
class class_name[name] begin[{] method[read, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[int], key] local_variable[type[int], description] local_variable[type[int], offset] local_variable[type[int], length] local_variable[type[SpecificationFormat], format] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=COFFHeaderKey, sub_type=None)), MemberReference(member=format, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=COFF_SPEC_FILE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=headerbytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=readHeaderEntries, postfix_operators=[], prefix_operators=[], qualifier=IOUtil, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="unable to read coff specification: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+)], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[read] operator[SEP] operator[SEP] { Keyword[final] Keyword[int] identifier[key] operator[=] Other[0] operator[SEP] Keyword[final] Keyword[int] identifier[description] operator[=] Other[1] operator[SEP] Keyword[final] Keyword[int] identifier[offset] operator[=] Other[2] operator[SEP] Keyword[final] Keyword[int] identifier[length] operator[=] Other[3] operator[SEP] identifier[SpecificationFormat] identifier[format] operator[=] Keyword[new] identifier[SpecificationFormat] operator[SEP] identifier[key] , identifier[description] , identifier[offset] , identifier[length] operator[SEP] operator[SEP] Keyword[try] { identifier[data] operator[=] identifier[IOUtil] operator[SEP] identifier[readHeaderEntries] operator[SEP] identifier[COFFHeaderKey] operator[SEP] Keyword[class] , identifier[format] , identifier[COFF_SPEC_FILE] , identifier[headerbytes] , identifier[getOffset] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }