code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
private void checkName(Set<SQLProperty> listEntity, SQLProperty p) { for (SQLProperty item : listEntity) { AssertKripton.assertTrueOrInvalidPropertyName(item.columnName.equals(p.columnName), item, p); } }
class class_name[name] begin[{] method[checkName, return_type[void], modifier[private], parameter[listEntity, p]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=columnName, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=item.columnName, selectors=[], type_arguments=None), MemberReference(member=item, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=assertTrueOrInvalidPropertyName, postfix_operators=[], prefix_operators=[], qualifier=AssertKripton, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=listEntity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=item)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SQLProperty, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[checkName] operator[SEP] identifier[Set] operator[<] identifier[SQLProperty] operator[>] identifier[listEntity] , identifier[SQLProperty] identifier[p] operator[SEP] { Keyword[for] operator[SEP] identifier[SQLProperty] identifier[item] operator[:] identifier[listEntity] operator[SEP] { identifier[AssertKripton] operator[SEP] identifier[assertTrueOrInvalidPropertyName] operator[SEP] identifier[item] operator[SEP] identifier[columnName] operator[SEP] identifier[equals] operator[SEP] identifier[p] operator[SEP] identifier[columnName] operator[SEP] , identifier[item] , identifier[p] operator[SEP] operator[SEP] } }
public static void init() { if (container != null) { return; } setupScriptEngine(); setupSmartDeployMode(); container = createContainer(); setupExternalContext(); container.init(); showBoot(); }
class class_name[name] begin[{] method[init, return_type[void], modifier[public static], parameter[]] begin[{] if[binary_operation[member[.container], !=, literal[null]]] begin[{] return[None] else begin[{] None end[}] call[.setupScriptEngine, parameter[]] call[.setupSmartDeployMode, parameter[]] assign[member[.container], call[.createContainer, parameter[]]] call[.setupExternalContext, parameter[]] call[container.init, parameter[]] call[.showBoot, parameter[]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[init] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[container] operator[!=] Other[null] operator[SEP] { Keyword[return] operator[SEP] } identifier[setupScriptEngine] operator[SEP] operator[SEP] operator[SEP] identifier[setupSmartDeployMode] operator[SEP] operator[SEP] operator[SEP] identifier[container] operator[=] identifier[createContainer] operator[SEP] operator[SEP] operator[SEP] identifier[setupExternalContext] operator[SEP] operator[SEP] operator[SEP] identifier[container] operator[SEP] identifier[init] operator[SEP] operator[SEP] operator[SEP] identifier[showBoot] operator[SEP] operator[SEP] operator[SEP] }
private void getRandomly(final int fetchSize, final StringBuilder sql) { sql.append(JdbcFactory.getInstance().getRandomlySql(getName(), fetchSize)); }
class class_name[name] begin[{] method[getRandomly, return_type[void], modifier[private], parameter[fetchSize, sql]] begin[{] call[sql.append, parameter[call[JdbcFactory.getInstance, parameter[]]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[getRandomly] operator[SEP] Keyword[final] Keyword[int] identifier[fetchSize] , Keyword[final] identifier[StringBuilder] identifier[sql] operator[SEP] { identifier[sql] operator[SEP] identifier[append] operator[SEP] identifier[JdbcFactory] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[getRandomlySql] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[fetchSize] operator[SEP] operator[SEP] operator[SEP] }
public long getFractionLost() { // long expected = this.lastSequenceNumber - this.lastSrSequenceNumber; // if (expected < 0) { // expected = RTP_SEQ_MOD + expected; // } // // long fraction = 256 * (expected - this.receivedSinceSR); // fraction = expected > 0 ? (fraction / expected) : 0; // // return fraction; long expected = getPacketsExpected(); long expectedInterval = expected - this.expectedPrior; this.expectedPrior = expected; long receivedInterval = this.receivedPackets - this.receivedPrior; this.receivedPrior = this.receivedPackets; long lostInterval = expectedInterval - receivedInterval; if(expectedInterval == 0 || lostInterval <= 0) { return 0; } return (lostInterval << 8) / expectedInterval; }
class class_name[name] begin[{] method[getFractionLost, return_type[type[long]], modifier[public], parameter[]] begin[{] local_variable[type[long], expected] local_variable[type[long], expectedInterval] assign[THIS[member[None.expectedPrior]], member[.expected]] local_variable[type[long], receivedInterval] assign[THIS[member[None.receivedPrior]], THIS[member[None.receivedPackets]]] local_variable[type[long], lostInterval] if[binary_operation[binary_operation[member[.expectedInterval], ==, literal[0]], ||, binary_operation[member[.lostInterval], <=, literal[0]]]] begin[{] return[literal[0]] else begin[{] None end[}] return[binary_operation[binary_operation[member[.lostInterval], <<, literal[8]], /, member[.expectedInterval]]] end[}] END[}]
Keyword[public] Keyword[long] identifier[getFractionLost] operator[SEP] operator[SEP] { Keyword[long] identifier[expected] operator[=] identifier[getPacketsExpected] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[expectedInterval] operator[=] identifier[expected] operator[-] Keyword[this] operator[SEP] identifier[expectedPrior] operator[SEP] Keyword[this] operator[SEP] identifier[expectedPrior] operator[=] identifier[expected] operator[SEP] Keyword[long] identifier[receivedInterval] operator[=] Keyword[this] operator[SEP] identifier[receivedPackets] operator[-] Keyword[this] operator[SEP] identifier[receivedPrior] operator[SEP] Keyword[this] operator[SEP] identifier[receivedPrior] operator[=] Keyword[this] operator[SEP] identifier[receivedPackets] operator[SEP] Keyword[long] identifier[lostInterval] operator[=] identifier[expectedInterval] operator[-] identifier[receivedInterval] operator[SEP] Keyword[if] operator[SEP] identifier[expectedInterval] operator[==] Other[0] operator[||] identifier[lostInterval] operator[<=] Other[0] operator[SEP] { Keyword[return] Other[0] operator[SEP] } Keyword[return] operator[SEP] identifier[lostInterval] operator[<<] Other[8] operator[SEP] operator[/] identifier[expectedInterval] operator[SEP] }
public GSMTMCPT createGSMTMCPTFromString(EDataType eDataType, String initialValue) { GSMTMCPT result = GSMTMCPT.get(initialValue); if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); return result; }
class class_name[name] begin[{] method[createGSMTMCPTFromString, return_type[type[GSMTMCPT]], modifier[public], parameter[eDataType, initialValue]] begin[{] local_variable[type[GSMTMCPT], result] if[binary_operation[member[.result], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The value '"), operandr=MemberReference(member=initialValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' is not a valid enumerator of '"), operator=+), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=eDataType, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] identifier[GSMTMCPT] identifier[createGSMTMCPTFromString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[String] identifier[initialValue] operator[SEP] { identifier[GSMTMCPT] identifier[result] operator[=] identifier[GSMTMCPT] operator[SEP] identifier[get] operator[SEP] identifier[initialValue] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[initialValue] operator[+] literal[String] operator[+] identifier[eDataType] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
public Observable<VirtualNetworkTapInner> beginUpdateTagsAsync(String resourceGroupName, String tapName) { return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, tapName).map(new Func1<ServiceResponse<VirtualNetworkTapInner>, VirtualNetworkTapInner>() { @Override public VirtualNetworkTapInner call(ServiceResponse<VirtualNetworkTapInner> response) { return response.body(); } }); }
class class_name[name] begin[{] method[beginUpdateTagsAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, tapName]] begin[{] return[call[.beginUpdateTagsWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.tapName]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[VirtualNetworkTapInner] operator[>] identifier[beginUpdateTagsAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[tapName] operator[SEP] { Keyword[return] identifier[beginUpdateTagsWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[tapName] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[VirtualNetworkTapInner] operator[>] , identifier[VirtualNetworkTapInner] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[VirtualNetworkTapInner] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[VirtualNetworkTapInner] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public void setMapEntries(java.util.Collection<ParameterMapEntry> mapEntries) { if (mapEntries == null) { this.mapEntries = null; return; } this.mapEntries = new java.util.ArrayList<ParameterMapEntry>(mapEntries); }
class class_name[name] begin[{] method[setMapEntries, return_type[void], modifier[public], parameter[mapEntries]] begin[{] if[binary_operation[member[.mapEntries], ==, literal[null]]] begin[{] assign[THIS[member[None.mapEntries]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.mapEntries]], ClassCreator(arguments=[MemberReference(member=mapEntries, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ParameterMapEntry, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setMapEntries] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[ParameterMapEntry] operator[>] identifier[mapEntries] operator[SEP] { Keyword[if] operator[SEP] identifier[mapEntries] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[mapEntries] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[mapEntries] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[ParameterMapEntry] operator[>] operator[SEP] identifier[mapEntries] operator[SEP] operator[SEP] }
public static Credential getCredential(final RequestContext context) { val cFromRequest = (Credential) context.getRequestScope().get(PARAMETER_CREDENTIAL); val cFromFlow = (Credential) context.getFlowScope().get(PARAMETER_CREDENTIAL); val cFromConversation = (Credential) context.getConversationScope().get(PARAMETER_CREDENTIAL); var credential = cFromRequest; if (credential == null || StringUtils.isBlank(credential.getId())) { credential = cFromFlow; } if (credential == null || StringUtils.isBlank(credential.getId())) { credential = cFromConversation; if (credential != null && !StringUtils.isBlank(credential.getId())) { context.getFlowScope().put(PARAMETER_CREDENTIAL, credential); } } if (credential == null) { val session = context.getFlowExecutionContext().getActiveSession(); credential = session.getScope().get(PARAMETER_CREDENTIAL, Credential.class); } if (credential != null && StringUtils.isBlank(credential.getId())) { return null; } return credential; }
class class_name[name] begin[{] method[getCredential, return_type[type[Credential]], modifier[public static], parameter[context]] begin[{] local_variable[type[val], cFromRequest] local_variable[type[val], cFromFlow] local_variable[type[val], cFromConversation] local_variable[type[var], credential] if[binary_operation[binary_operation[member[.credential], ==, literal[null]], ||, call[StringUtils.isBlank, parameter[call[credential.getId, parameter[]]]]]] begin[{] assign[member[.credential], member[.cFromFlow]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.credential], ==, literal[null]], ||, call[StringUtils.isBlank, parameter[call[credential.getId, parameter[]]]]]] begin[{] assign[member[.credential], member[.cFromConversation]] if[binary_operation[binary_operation[member[.credential], !=, literal[null]], &&, call[StringUtils.isBlank, parameter[call[credential.getId, parameter[]]]]]] begin[{] call[context.getFlowScope, parameter[]] else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[member[.credential], ==, literal[null]]] begin[{] local_variable[type[val], session] assign[member[.credential], call[session.getScope, parameter[]]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.credential], !=, literal[null]], &&, call[StringUtils.isBlank, parameter[call[credential.getId, parameter[]]]]]] begin[{] return[literal[null]] else begin[{] None end[}] return[member[.credential]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Credential] identifier[getCredential] operator[SEP] Keyword[final] identifier[RequestContext] identifier[context] operator[SEP] { identifier[val] identifier[cFromRequest] operator[=] operator[SEP] identifier[Credential] operator[SEP] identifier[context] operator[SEP] identifier[getRequestScope] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[PARAMETER_CREDENTIAL] operator[SEP] operator[SEP] identifier[val] identifier[cFromFlow] operator[=] operator[SEP] identifier[Credential] operator[SEP] identifier[context] operator[SEP] identifier[getFlowScope] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[PARAMETER_CREDENTIAL] operator[SEP] operator[SEP] identifier[val] identifier[cFromConversation] operator[=] operator[SEP] identifier[Credential] operator[SEP] identifier[context] operator[SEP] identifier[getConversationScope] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[PARAMETER_CREDENTIAL] operator[SEP] operator[SEP] identifier[var] identifier[credential] operator[=] identifier[cFromRequest] operator[SEP] Keyword[if] operator[SEP] identifier[credential] operator[==] Other[null] operator[||] identifier[StringUtils] operator[SEP] identifier[isBlank] operator[SEP] identifier[credential] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[credential] operator[=] identifier[cFromFlow] operator[SEP] } Keyword[if] operator[SEP] identifier[credential] operator[==] Other[null] operator[||] identifier[StringUtils] operator[SEP] identifier[isBlank] operator[SEP] identifier[credential] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[credential] operator[=] identifier[cFromConversation] operator[SEP] Keyword[if] operator[SEP] identifier[credential] operator[!=] Other[null] operator[&&] operator[!] identifier[StringUtils] operator[SEP] identifier[isBlank] operator[SEP] identifier[credential] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[context] operator[SEP] identifier[getFlowScope] operator[SEP] operator[SEP] operator[SEP] identifier[put] operator[SEP] identifier[PARAMETER_CREDENTIAL] , identifier[credential] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[credential] operator[==] Other[null] operator[SEP] { identifier[val] identifier[session] operator[=] identifier[context] operator[SEP] identifier[getFlowExecutionContext] operator[SEP] operator[SEP] operator[SEP] identifier[getActiveSession] operator[SEP] operator[SEP] operator[SEP] identifier[credential] operator[=] identifier[session] operator[SEP] identifier[getScope] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[PARAMETER_CREDENTIAL] , identifier[Credential] operator[SEP] Keyword[class] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[credential] operator[!=] Other[null] operator[&&] identifier[StringUtils] operator[SEP] identifier[isBlank] operator[SEP] identifier[credential] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[return] identifier[credential] operator[SEP] }
public SDVariable oneHot(String name, SDVariable indices, int depth, int axis, double on, double off) { return oneHot(name, indices, depth, axis, on, off, OneHot.DEFAULT_DTYPE); }
class class_name[name] begin[{] method[oneHot, return_type[type[SDVariable]], modifier[public], parameter[name, indices, depth, axis, on, off]] begin[{] return[call[.oneHot, parameter[member[.name], member[.indices], member[.depth], member[.axis], member[.on], member[.off], member[OneHot.DEFAULT_DTYPE]]]] end[}] END[}]
Keyword[public] identifier[SDVariable] identifier[oneHot] operator[SEP] identifier[String] identifier[name] , identifier[SDVariable] identifier[indices] , Keyword[int] identifier[depth] , Keyword[int] identifier[axis] , Keyword[double] identifier[on] , Keyword[double] identifier[off] operator[SEP] { Keyword[return] identifier[oneHot] operator[SEP] identifier[name] , identifier[indices] , identifier[depth] , identifier[axis] , identifier[on] , identifier[off] , identifier[OneHot] operator[SEP] identifier[DEFAULT_DTYPE] operator[SEP] operator[SEP] }
public final void ruleJvmTypeReference() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalXtype.g:71:2: ( ( ( rule__JvmTypeReference__Alternatives ) ) ) // InternalXtype.g:72:2: ( ( rule__JvmTypeReference__Alternatives ) ) { // InternalXtype.g:72:2: ( ( rule__JvmTypeReference__Alternatives ) ) // InternalXtype.g:73:3: ( rule__JvmTypeReference__Alternatives ) { if ( state.backtracking==0 ) { before(grammarAccess.getJvmTypeReferenceAccess().getAlternatives()); } // InternalXtype.g:74:3: ( rule__JvmTypeReference__Alternatives ) // InternalXtype.g:74:4: rule__JvmTypeReference__Alternatives { pushFollow(FOLLOW_2); rule__JvmTypeReference__Alternatives(); state._fsp--; if (state.failed) return ; } if ( state.backtracking==0 ) { after(grammarAccess.getJvmTypeReferenceAccess().getAlternatives()); } } } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
class class_name[name] begin[{] method[ruleJvmTypeReference, return_type[void], modifier[final public], parameter[]] begin[{] local_variable[type[int], stackSize] TryStatement(block=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getJvmTypeReferenceAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getAlternatives, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=before, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=rule__JvmTypeReference__Alternatives, 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), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getJvmTypeReferenceAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getAlternatives, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=after, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))])])], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=reportError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), 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)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=stackSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=restoreStackSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, resources=None) return[None] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[ruleJvmTypeReference] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { Keyword[int] identifier[stackSize] operator[=] identifier[keepStackSize] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[before] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getJvmTypeReferenceAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getAlternatives] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } { identifier[pushFollow] operator[SEP] identifier[FOLLOW_2] operator[SEP] operator[SEP] identifier[rule__JvmTypeReference__Alternatives] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[after] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getJvmTypeReferenceAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getAlternatives] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } } Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[re] operator[SEP] { identifier[reportError] operator[SEP] identifier[re] operator[SEP] operator[SEP] identifier[recover] operator[SEP] identifier[input] , identifier[re] operator[SEP] operator[SEP] } Keyword[finally] { identifier[restoreStackSize] operator[SEP] identifier[stackSize] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] }
public static EmailAddress[] of(final Address... addresses) { if (addresses == null) { return EmailAddress.EMPTY_ARRAY; } if (addresses.length == 0) { return EmailAddress.EMPTY_ARRAY; } final EmailAddress[] res = new EmailAddress[addresses.length]; for (int i = 0; i < addresses.length; i++) { res[i] = EmailAddress.of(addresses[i]); } return res; }
class class_name[name] begin[{] method[of, return_type[type[EmailAddress]], modifier[public static], parameter[addresses]] begin[{] if[binary_operation[member[.addresses], ==, literal[null]]] begin[{] return[member[EmailAddress.EMPTY_ARRAY]] else begin[{] None end[}] if[binary_operation[member[addresses.length], ==, literal[0]]] begin[{] return[member[EmailAddress.EMPTY_ARRAY]] else begin[{] None end[}] local_variable[type[EmailAddress], res] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=res, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[MemberReference(member=addresses, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=of, postfix_operators=[], prefix_operators=[], qualifier=EmailAddress, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=addresses, 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[member[.res]] end[}] END[}]
Keyword[public] Keyword[static] identifier[EmailAddress] operator[SEP] operator[SEP] identifier[of] operator[SEP] Keyword[final] identifier[Address] operator[...] identifier[addresses] operator[SEP] { Keyword[if] operator[SEP] identifier[addresses] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[EmailAddress] operator[SEP] identifier[EMPTY_ARRAY] operator[SEP] } Keyword[if] operator[SEP] identifier[addresses] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { Keyword[return] identifier[EmailAddress] operator[SEP] identifier[EMPTY_ARRAY] operator[SEP] } Keyword[final] identifier[EmailAddress] operator[SEP] operator[SEP] identifier[res] operator[=] Keyword[new] identifier[EmailAddress] operator[SEP] identifier[addresses] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[addresses] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[res] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[EmailAddress] operator[SEP] identifier[of] operator[SEP] identifier[addresses] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[res] operator[SEP] }
public void setOutputDescriptions(java.util.Collection<OutputDescription> outputDescriptions) { if (outputDescriptions == null) { this.outputDescriptions = null; return; } this.outputDescriptions = new java.util.ArrayList<OutputDescription>(outputDescriptions); }
class class_name[name] begin[{] method[setOutputDescriptions, return_type[void], modifier[public], parameter[outputDescriptions]] begin[{] if[binary_operation[member[.outputDescriptions], ==, literal[null]]] begin[{] assign[THIS[member[None.outputDescriptions]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.outputDescriptions]], ClassCreator(arguments=[MemberReference(member=outputDescriptions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=OutputDescription, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setOutputDescriptions] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[OutputDescription] operator[>] identifier[outputDescriptions] operator[SEP] { Keyword[if] operator[SEP] identifier[outputDescriptions] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[outputDescriptions] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[outputDescriptions] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[OutputDescription] operator[>] operator[SEP] identifier[outputDescriptions] operator[SEP] operator[SEP] }
public Table getTable(){ final Table table = new Table("Name", "Long Name", "URL", "Comment"); // Create row(s) per dependency for(final License license: licenses){ table.addRow(license.getName(), license.getLongName(), license.getUrl(), license.getComments()); } return table; }
class class_name[name] begin[{] method[getTable, return_type[type[Table]], modifier[public], parameter[]] begin[{] local_variable[type[Table], table] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=license, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getLongName, postfix_operators=[], prefix_operators=[], qualifier=license, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getUrl, postfix_operators=[], prefix_operators=[], qualifier=license, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getComments, postfix_operators=[], prefix_operators=[], qualifier=license, selectors=[], type_arguments=None)], member=addRow, postfix_operators=[], prefix_operators=[], qualifier=table, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=licenses, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=license)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=License, sub_type=None))), label=None) return[member[.table]] end[}] END[}]
Keyword[public] identifier[Table] identifier[getTable] operator[SEP] operator[SEP] { Keyword[final] identifier[Table] identifier[table] operator[=] Keyword[new] identifier[Table] operator[SEP] literal[String] , literal[String] , literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[License] identifier[license] operator[:] identifier[licenses] operator[SEP] { identifier[table] operator[SEP] identifier[addRow] operator[SEP] identifier[license] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[license] operator[SEP] identifier[getLongName] operator[SEP] operator[SEP] , identifier[license] operator[SEP] identifier[getUrl] operator[SEP] operator[SEP] , identifier[license] operator[SEP] identifier[getComments] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[table] operator[SEP] }
public void truncate(int size) { ensureCapacity(size); int minSize = Math.min(size, m_size); int maxSize = Math.max(size, m_size); Arrays.fill(m_buffer, minSize, maxSize, (byte)0); m_size = size; }
class class_name[name] begin[{] method[truncate, return_type[void], modifier[public], parameter[size]] begin[{] call[.ensureCapacity, parameter[member[.size]]] local_variable[type[int], minSize] local_variable[type[int], maxSize] call[Arrays.fill, parameter[member[.m_buffer], member[.minSize], member[.maxSize], Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), type=BasicType(dimensions=[], name=byte))]] assign[member[.m_size], member[.size]] end[}] END[}]
Keyword[public] Keyword[void] identifier[truncate] operator[SEP] Keyword[int] identifier[size] operator[SEP] { identifier[ensureCapacity] operator[SEP] identifier[size] operator[SEP] operator[SEP] Keyword[int] identifier[minSize] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[size] , identifier[m_size] operator[SEP] operator[SEP] Keyword[int] identifier[maxSize] operator[=] identifier[Math] operator[SEP] identifier[max] operator[SEP] identifier[size] , identifier[m_size] operator[SEP] operator[SEP] identifier[Arrays] operator[SEP] identifier[fill] operator[SEP] identifier[m_buffer] , identifier[minSize] , identifier[maxSize] , operator[SEP] Keyword[byte] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[m_size] operator[=] identifier[size] operator[SEP] }
public final Finding getFinding(String name) { GetFindingRequest request = GetFindingRequest.newBuilder().setName(name).build(); return getFinding(request); }
class class_name[name] begin[{] method[getFinding, return_type[type[Finding]], modifier[final public], parameter[name]] begin[{] local_variable[type[GetFindingRequest], request] return[call[.getFinding, parameter[member[.request]]]] end[}] END[}]
Keyword[public] Keyword[final] identifier[Finding] identifier[getFinding] operator[SEP] identifier[String] identifier[name] operator[SEP] { identifier[GetFindingRequest] identifier[request] operator[=] identifier[GetFindingRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setName] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[getFinding] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public RandomForest merge(RandomForest other) { if (this.importance.length != other.importance.length) { throw new IllegalArgumentException("RandomForest have different sizes of feature vectors"); } ArrayList<RegressionTree> mergedTrees = new ArrayList<>(); mergedTrees.addAll(this.trees); mergedTrees.addAll(other.trees); double weightedMergedError = ((this.error * this.trees.size()) + (other.error * other.trees.size())) / (this.trees.size() + other.trees.size()); double[] mergedImportance = calculateImportance(mergedTrees, this.importance.length); return new RandomForest(mergedTrees, weightedMergedError, mergedImportance); }
class class_name[name] begin[{] method[merge, return_type[type[RandomForest]], modifier[public], parameter[other]] begin[{] if[binary_operation[THIS[member[None.importance]member[None.length]], !=, member[other.importance.length]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="RandomForest have different sizes of feature vectors")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[ArrayList], mergedTrees] call[mergedTrees.addAll, parameter[THIS[member[None.trees]]]] call[mergedTrees.addAll, parameter[member[other.trees]]] local_variable[type[double], weightedMergedError] local_variable[type[double], mergedImportance] return[ClassCreator(arguments=[MemberReference(member=mergedTrees, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=weightedMergedError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=mergedImportance, 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=RandomForest, sub_type=None))] end[}] END[}]
Keyword[public] identifier[RandomForest] identifier[merge] operator[SEP] identifier[RandomForest] identifier[other] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[importance] operator[SEP] identifier[length] operator[!=] identifier[other] operator[SEP] identifier[importance] operator[SEP] identifier[length] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[ArrayList] operator[<] identifier[RegressionTree] operator[>] identifier[mergedTrees] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[mergedTrees] operator[SEP] identifier[addAll] operator[SEP] Keyword[this] operator[SEP] identifier[trees] operator[SEP] operator[SEP] identifier[mergedTrees] operator[SEP] identifier[addAll] operator[SEP] identifier[other] operator[SEP] identifier[trees] operator[SEP] operator[SEP] Keyword[double] identifier[weightedMergedError] operator[=] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[error] operator[*] Keyword[this] operator[SEP] identifier[trees] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[+] operator[SEP] identifier[other] operator[SEP] identifier[error] operator[*] identifier[other] operator[SEP] identifier[trees] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[/] operator[SEP] Keyword[this] operator[SEP] identifier[trees] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[+] identifier[other] operator[SEP] identifier[trees] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[mergedImportance] operator[=] identifier[calculateImportance] operator[SEP] identifier[mergedTrees] , Keyword[this] operator[SEP] identifier[importance] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[RandomForest] operator[SEP] identifier[mergedTrees] , identifier[weightedMergedError] , identifier[mergedImportance] operator[SEP] operator[SEP] }
public CharacterResponse getCharactersCharacterId(Integer characterId, String datasource, String ifNoneMatch) throws ApiException { ApiResponse<CharacterResponse> resp = getCharactersCharacterIdWithHttpInfo(characterId, datasource, ifNoneMatch); return resp.getData(); }
class class_name[name] begin[{] method[getCharactersCharacterId, return_type[type[CharacterResponse]], modifier[public], parameter[characterId, datasource, ifNoneMatch]] begin[{] local_variable[type[ApiResponse], resp] return[call[resp.getData, parameter[]]] end[}] END[}]
Keyword[public] identifier[CharacterResponse] identifier[getCharactersCharacterId] operator[SEP] identifier[Integer] identifier[characterId] , identifier[String] identifier[datasource] , identifier[String] identifier[ifNoneMatch] operator[SEP] Keyword[throws] identifier[ApiException] { identifier[ApiResponse] operator[<] identifier[CharacterResponse] operator[>] identifier[resp] operator[=] identifier[getCharactersCharacterIdWithHttpInfo] operator[SEP] identifier[characterId] , identifier[datasource] , identifier[ifNoneMatch] operator[SEP] operator[SEP] Keyword[return] identifier[resp] operator[SEP] identifier[getData] operator[SEP] operator[SEP] operator[SEP] }
@Override public CurrencyAmount add(final CurrencyAmount money) { if (!money.getCurrency().equals(currency)) { throw new IllegalArgumentException("You cannot add " + money.getCurrency() + " with " + currency); } return new Cash(currency, BigDecimalUtil.add(amount, money.getAmount())); }
class class_name[name] begin[{] method[add, return_type[type[CurrencyAmount]], modifier[public], parameter[money]] begin[{] if[call[money.getCurrency, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="You cannot add "), operandr=MethodInvocation(arguments=[], member=getCurrency, postfix_operators=[], prefix_operators=[], qualifier=money, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" with "), operator=+), operandr=MemberReference(member=currency, 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[ClassCreator(arguments=[MemberReference(member=currency, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=amount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getAmount, postfix_operators=[], prefix_operators=[], qualifier=money, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=BigDecimalUtil, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Cash, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CurrencyAmount] identifier[add] operator[SEP] Keyword[final] identifier[CurrencyAmount] identifier[money] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[money] operator[SEP] identifier[getCurrency] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[currency] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[money] operator[SEP] identifier[getCurrency] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[currency] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[Cash] operator[SEP] identifier[currency] , identifier[BigDecimalUtil] operator[SEP] identifier[add] operator[SEP] identifier[amount] , identifier[money] operator[SEP] identifier[getAmount] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private void pollUpstream() { if (!awaitingInner) { return; } boolean localDone = this.done; // Try to move the new item into the reframer InnerT newUpstreamItem = newItem.getAndSet(null); if (newUpstreamItem != null) { reframer.push(newUpstreamItem); // and reset the awaiting flag, if the item arrived or upstream closed awaitingInner = false; } else if (localDone) { awaitingInner = false; } }
class class_name[name] begin[{] method[pollUpstream, return_type[void], modifier[private], parameter[]] begin[{] if[member[.awaitingInner]] begin[{] return[None] else begin[{] None end[}] local_variable[type[boolean], localDone] local_variable[type[InnerT], newUpstreamItem] if[binary_operation[member[.newUpstreamItem], !=, literal[null]]] begin[{] call[reframer.push, parameter[member[.newUpstreamItem]]] assign[member[.awaitingInner], literal[false]] else begin[{] if[member[.localDone]] begin[{] assign[member[.awaitingInner], literal[false]] else begin[{] None end[}] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[pollUpstream] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[awaitingInner] operator[SEP] { Keyword[return] operator[SEP] } Keyword[boolean] identifier[localDone] operator[=] Keyword[this] operator[SEP] identifier[done] operator[SEP] identifier[InnerT] identifier[newUpstreamItem] operator[=] identifier[newItem] operator[SEP] identifier[getAndSet] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[newUpstreamItem] operator[!=] Other[null] operator[SEP] { identifier[reframer] operator[SEP] identifier[push] operator[SEP] identifier[newUpstreamItem] operator[SEP] operator[SEP] identifier[awaitingInner] operator[=] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[localDone] operator[SEP] { identifier[awaitingInner] operator[=] literal[boolean] operator[SEP] } }
private boolean match(Path.ID id, int idIndex, int myIndex, boolean submatch) { int mySize = depth + 1; if (myIndex == mySize && idIndex == id.size()) { return true; } else if(idIndex == id.size()) { return submatch; } else if (myIndex == mySize) { return false; } String myComponent = get(myIndex); if (myComponent.equals("*")) { return match(id, idIndex + 1, myIndex + 1, submatch); } else if (myComponent.equals("**")) { myIndex++; for (int i = idIndex; i <= id.size(); ++i) { if (match(id, i, myIndex, submatch)) { return true; } } return false; } else { return myComponent.equals(id.get(idIndex)) && match(id, idIndex + 1, myIndex + 1, submatch); } }
class class_name[name] begin[{] method[match, return_type[type[boolean]], modifier[private], parameter[id, idIndex, myIndex, submatch]] begin[{] local_variable[type[int], mySize] if[binary_operation[binary_operation[member[.myIndex], ==, member[.mySize]], &&, binary_operation[member[.idIndex], ==, call[id.size, parameter[]]]]] begin[{] return[literal[true]] else begin[{] if[binary_operation[member[.idIndex], ==, call[id.size, parameter[]]]] begin[{] return[member[.submatch]] else begin[{] if[binary_operation[member[.myIndex], ==, member[.mySize]]] begin[{] return[literal[false]] else begin[{] None end[}] end[}] end[}] local_variable[type[String], myComponent] if[call[myComponent.equals, parameter[literal["*"]]]] begin[{] return[call[.match, parameter[member[.id], binary_operation[member[.idIndex], +, literal[1]], binary_operation[member[.myIndex], +, literal[1]], member[.submatch]]]] else begin[{] if[call[myComponent.equals, parameter[literal["**"]]]] begin[{] member[.myIndex] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=myIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=submatch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=id, selectors=[], type_arguments=None), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=idIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None) return[literal[false]] else begin[{] return[binary_operation[call[myComponent.equals, parameter[call[id.get, parameter[member[.idIndex]]]]], &&, call[.match, parameter[member[.id], binary_operation[member[.idIndex], +, literal[1]], binary_operation[member[.myIndex], +, literal[1]], member[.submatch]]]]] end[}] end[}] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[match] operator[SEP] identifier[Path] operator[SEP] identifier[ID] identifier[id] , Keyword[int] identifier[idIndex] , Keyword[int] identifier[myIndex] , Keyword[boolean] identifier[submatch] operator[SEP] { Keyword[int] identifier[mySize] operator[=] identifier[depth] operator[+] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[myIndex] operator[==] identifier[mySize] operator[&&] identifier[idIndex] operator[==] identifier[id] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[idIndex] operator[==] identifier[id] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[submatch] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[myIndex] operator[==] identifier[mySize] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[String] identifier[myComponent] operator[=] identifier[get] operator[SEP] identifier[myIndex] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[myComponent] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] identifier[match] operator[SEP] identifier[id] , identifier[idIndex] operator[+] Other[1] , identifier[myIndex] operator[+] Other[1] , identifier[submatch] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[myComponent] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[myIndex] operator[++] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[idIndex] operator[SEP] identifier[i] operator[<=] identifier[id] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[++] identifier[i] operator[SEP] { Keyword[if] operator[SEP] identifier[match] operator[SEP] identifier[id] , identifier[i] , identifier[myIndex] , identifier[submatch] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { Keyword[return] identifier[myComponent] operator[SEP] identifier[equals] operator[SEP] identifier[id] operator[SEP] identifier[get] operator[SEP] identifier[idIndex] operator[SEP] operator[SEP] operator[&&] identifier[match] operator[SEP] identifier[id] , identifier[idIndex] operator[+] Other[1] , identifier[myIndex] operator[+] Other[1] , identifier[submatch] operator[SEP] operator[SEP] } }
@Override public final void sessionOpened(final IoSession session) throws Exception { session.write(this.welcome); session.write(ENDLINE); session.write("> "); super.sessionOpened(session); }
class class_name[name] begin[{] method[sessionOpened, return_type[void], modifier[final public], parameter[session]] begin[{] call[session.write, parameter[THIS[member[None.welcome]]]] call[session.write, parameter[member[.ENDLINE]]] call[session.write, parameter[literal["> "]]] SuperMethodInvocation(arguments=[MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sessionOpened, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[sessionOpened] operator[SEP] Keyword[final] identifier[IoSession] identifier[session] operator[SEP] Keyword[throws] identifier[Exception] { identifier[session] operator[SEP] identifier[write] operator[SEP] Keyword[this] operator[SEP] identifier[welcome] operator[SEP] operator[SEP] identifier[session] operator[SEP] identifier[write] operator[SEP] identifier[ENDLINE] operator[SEP] operator[SEP] identifier[session] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[super] operator[SEP] identifier[sessionOpened] operator[SEP] identifier[session] operator[SEP] operator[SEP] }
public RefundQuery refundQueryByTradeNumber(String tradeNumber) { RefundQueryRequestWrapper refundQueryRequestWrapper = new RefundQueryRequestWrapper(); refundQueryRequestWrapper.setTradeNumber(tradeNumber); return refundQuery(refundQueryRequestWrapper); }
class class_name[name] begin[{] method[refundQueryByTradeNumber, return_type[type[RefundQuery]], modifier[public], parameter[tradeNumber]] begin[{] local_variable[type[RefundQueryRequestWrapper], refundQueryRequestWrapper] call[refundQueryRequestWrapper.setTradeNumber, parameter[member[.tradeNumber]]] return[call[.refundQuery, parameter[member[.refundQueryRequestWrapper]]]] end[}] END[}]
Keyword[public] identifier[RefundQuery] identifier[refundQueryByTradeNumber] operator[SEP] identifier[String] identifier[tradeNumber] operator[SEP] { identifier[RefundQueryRequestWrapper] identifier[refundQueryRequestWrapper] operator[=] Keyword[new] identifier[RefundQueryRequestWrapper] operator[SEP] operator[SEP] operator[SEP] identifier[refundQueryRequestWrapper] operator[SEP] identifier[setTradeNumber] operator[SEP] identifier[tradeNumber] operator[SEP] operator[SEP] Keyword[return] identifier[refundQuery] operator[SEP] identifier[refundQueryRequestWrapper] operator[SEP] operator[SEP] }
private Duration getDuration(Double duration) { Duration result = null; if (duration != null) { result = Duration.getInstance(NumberHelper.getDouble(duration), TimeUnit.HOURS); } return result; }
class class_name[name] begin[{] method[getDuration, return_type[type[Duration]], modifier[private], parameter[duration]] begin[{] local_variable[type[Duration], result] if[binary_operation[member[.duration], !=, literal[null]]] begin[{] assign[member[.result], call[Duration.getInstance, parameter[call[NumberHelper.getDouble, parameter[member[.duration]]], member[TimeUnit.HOURS]]]] else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[private] identifier[Duration] identifier[getDuration] operator[SEP] identifier[Double] identifier[duration] operator[SEP] { identifier[Duration] identifier[result] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[duration] operator[!=] Other[null] operator[SEP] { identifier[result] operator[=] identifier[Duration] operator[SEP] identifier[getInstance] operator[SEP] identifier[NumberHelper] operator[SEP] identifier[getDouble] operator[SEP] identifier[duration] operator[SEP] , identifier[TimeUnit] operator[SEP] identifier[HOURS] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public static boolean replaceEntry(final File zip, final ZipEntrySource entry) { return operateInPlace(zip, new InPlaceAction() { public boolean act(File tmpFile) { return replaceEntry(zip, entry, tmpFile); } }); }
class class_name[name] begin[{] method[replaceEntry, return_type[type[boolean]], modifier[public static], parameter[zip, entry]] begin[{] return[call[.operateInPlace, parameter[member[.zip], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=zip, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=entry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tmpFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=replaceEntry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=act, parameters=[FormalParameter(annotations=[], modifiers=set(), name=tmpFile, type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None), varargs=False)], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InPlaceAction, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[replaceEntry] operator[SEP] Keyword[final] identifier[File] identifier[zip] , Keyword[final] identifier[ZipEntrySource] identifier[entry] operator[SEP] { Keyword[return] identifier[operateInPlace] operator[SEP] identifier[zip] , Keyword[new] identifier[InPlaceAction] operator[SEP] operator[SEP] { Keyword[public] Keyword[boolean] identifier[act] operator[SEP] identifier[File] identifier[tmpFile] operator[SEP] { Keyword[return] identifier[replaceEntry] operator[SEP] identifier[zip] , identifier[entry] , identifier[tmpFile] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
static ByteBufferRange decode(String string) { int prefix = string.indexOf(':'); int sep = string.indexOf('-', prefix + 1); checkArgument(prefix >= 0 && sep >= 0, "Invalid split string: %s", string); char[] start = new char[prefix + sep - (prefix + 1)]; string.getChars(0, prefix, start, 0); string.getChars(prefix + 1, sep, start, prefix); char[] end = new char[prefix + string.length() - (sep + 1)]; string.getChars(0, prefix, end, 0); string.getChars(sep + 1, string.length(), end, prefix); byte[] startBytes, endBytes; try { startBytes = Hex.decodeHex(start); endBytes = Hex.decodeHex(end); } catch (DecoderException e) { throw new IllegalArgumentException(format("Invalid split string: %s", string)); } return new ByteBufferRangeImpl(ByteBuffer.wrap(startBytes), ByteBuffer.wrap(endBytes), -1, false); }
class class_name[name] begin[{] method[decode, return_type[type[ByteBufferRange]], modifier[static], parameter[string]] begin[{] local_variable[type[int], prefix] local_variable[type[int], sep] call[.checkArgument, parameter[binary_operation[binary_operation[member[.prefix], >=, literal[0]], &&, binary_operation[member[.sep], >=, literal[0]]], literal["Invalid split string: %s"], member[.string]]] local_variable[type[char], start] call[string.getChars, parameter[literal[0], member[.prefix], member[.start], literal[0]]] call[string.getChars, parameter[binary_operation[member[.prefix], +, literal[1]], member[.sep], member[.start], member[.prefix]]] local_variable[type[char], end] call[string.getChars, parameter[literal[0], member[.prefix], member[.end], literal[0]]] call[string.getChars, parameter[binary_operation[member[.sep], +, literal[1]], call[string.length, parameter[]], member[.end], member[.prefix]]] local_variable[type[byte], startBytes] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=startBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=decodeHex, postfix_operators=[], prefix_operators=[], qualifier=Hex, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=endBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=decodeHex, postfix_operators=[], prefix_operators=[], qualifier=Hex, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid split string: %s"), MemberReference(member=string, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['DecoderException']))], finally_block=None, label=None, resources=None) return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=startBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=wrap, postfix_operators=[], prefix_operators=[], qualifier=ByteBuffer, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=endBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=wrap, postfix_operators=[], prefix_operators=[], qualifier=ByteBuffer, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ByteBufferRangeImpl, sub_type=None))] end[}] END[}]
Keyword[static] identifier[ByteBufferRange] identifier[decode] operator[SEP] identifier[String] identifier[string] operator[SEP] { Keyword[int] identifier[prefix] operator[=] identifier[string] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[int] identifier[sep] operator[=] identifier[string] operator[SEP] identifier[indexOf] operator[SEP] literal[String] , identifier[prefix] operator[+] Other[1] operator[SEP] operator[SEP] identifier[checkArgument] operator[SEP] identifier[prefix] operator[>=] Other[0] operator[&&] identifier[sep] operator[>=] Other[0] , literal[String] , identifier[string] operator[SEP] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[start] operator[=] Keyword[new] Keyword[char] operator[SEP] identifier[prefix] operator[+] identifier[sep] operator[-] operator[SEP] identifier[prefix] operator[+] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[string] operator[SEP] identifier[getChars] operator[SEP] Other[0] , identifier[prefix] , identifier[start] , Other[0] operator[SEP] operator[SEP] identifier[string] operator[SEP] identifier[getChars] operator[SEP] identifier[prefix] operator[+] Other[1] , identifier[sep] , identifier[start] , identifier[prefix] operator[SEP] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[end] operator[=] Keyword[new] Keyword[char] operator[SEP] identifier[prefix] operator[+] identifier[string] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] operator[SEP] identifier[sep] operator[+] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[string] operator[SEP] identifier[getChars] operator[SEP] Other[0] , identifier[prefix] , identifier[end] , Other[0] operator[SEP] operator[SEP] identifier[string] operator[SEP] identifier[getChars] operator[SEP] identifier[sep] operator[+] Other[1] , identifier[string] operator[SEP] identifier[length] operator[SEP] operator[SEP] , identifier[end] , identifier[prefix] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[startBytes] , identifier[endBytes] operator[SEP] Keyword[try] { identifier[startBytes] operator[=] identifier[Hex] operator[SEP] identifier[decodeHex] operator[SEP] identifier[start] operator[SEP] operator[SEP] identifier[endBytes] operator[=] identifier[Hex] operator[SEP] identifier[decodeHex] operator[SEP] identifier[end] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[DecoderException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[string] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[ByteBufferRangeImpl] operator[SEP] identifier[ByteBuffer] operator[SEP] identifier[wrap] operator[SEP] identifier[startBytes] operator[SEP] , identifier[ByteBuffer] operator[SEP] identifier[wrap] operator[SEP] identifier[endBytes] operator[SEP] , operator[-] Other[1] , literal[boolean] operator[SEP] operator[SEP] }
public long getDurationInFrames(boolean allowDropFrameRemoval) { final long totalFrames = getFrameNumber(hours + (days * 24), minutes, seconds, frames, dropFrame && allowDropFrameRemoval, timebase.getSamplesPerSecond()); // Flip the sign if negative if (negative) return totalFrames * -1; else return totalFrames; }
class class_name[name] begin[{] method[getDurationInFrames, return_type[type[long]], modifier[public], parameter[allowDropFrameRemoval]] begin[{] local_variable[type[long], totalFrames] if[member[.negative]] begin[{] return[binary_operation[member[.totalFrames], *, literal[1]]] else begin[{] return[member[.totalFrames]] end[}] end[}] END[}]
Keyword[public] Keyword[long] identifier[getDurationInFrames] operator[SEP] Keyword[boolean] identifier[allowDropFrameRemoval] operator[SEP] { Keyword[final] Keyword[long] identifier[totalFrames] operator[=] identifier[getFrameNumber] operator[SEP] identifier[hours] operator[+] operator[SEP] identifier[days] operator[*] Other[24] operator[SEP] , identifier[minutes] , identifier[seconds] , identifier[frames] , identifier[dropFrame] operator[&&] identifier[allowDropFrameRemoval] , identifier[timebase] operator[SEP] identifier[getSamplesPerSecond] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[negative] operator[SEP] Keyword[return] identifier[totalFrames] operator[*] operator[-] Other[1] operator[SEP] Keyword[else] Keyword[return] identifier[totalFrames] operator[SEP] }
public static boolean isSorted(int[] nums) { boolean desc = nums[0] - nums[nums.length - 1] >= 0; for (int i = 0; i < nums.length - 1; i++) { if (!desc && nums[i] > nums[i + 1]) { return false; } if (desc && nums[i] < nums[i + 1]) { return false; } } return true; }
class class_name[name] begin[{] method[isSorted, return_type[type[boolean]], modifier[public static], parameter[nums]] begin[{] local_variable[type[boolean], desc] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=desc, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=nums, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=nums, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), operator=>), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=desc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=nums, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=nums, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), operator=<), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=nums, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[literal[true]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isSorted] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[nums] operator[SEP] { Keyword[boolean] identifier[desc] operator[=] identifier[nums] operator[SEP] Other[0] operator[SEP] operator[-] identifier[nums] operator[SEP] identifier[nums] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] operator[>=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[nums] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[desc] operator[&&] identifier[nums] operator[SEP] identifier[i] operator[SEP] operator[>] identifier[nums] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[desc] operator[&&] identifier[nums] operator[SEP] identifier[i] operator[SEP] operator[<] identifier[nums] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
@Override public com.liferay.commerce.tax.model.CommerceTaxMethod addCommerceTaxMethod( com.liferay.commerce.tax.model.CommerceTaxMethod commerceTaxMethod) { return _commerceTaxMethodLocalService.addCommerceTaxMethod(commerceTaxMethod); }
class class_name[name] begin[{] method[addCommerceTaxMethod, return_type[type[com]], modifier[public], parameter[commerceTaxMethod]] begin[{] return[call[_commerceTaxMethodLocalService.addCommerceTaxMethod, parameter[member[.commerceTaxMethod]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[tax] operator[SEP] identifier[model] operator[SEP] identifier[CommerceTaxMethod] identifier[addCommerceTaxMethod] operator[SEP] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[tax] operator[SEP] identifier[model] operator[SEP] identifier[CommerceTaxMethod] identifier[commerceTaxMethod] operator[SEP] { Keyword[return] identifier[_commerceTaxMethodLocalService] operator[SEP] identifier[addCommerceTaxMethod] operator[SEP] identifier[commerceTaxMethod] operator[SEP] operator[SEP] }
public static final byte[] cloneSubArray(byte[] data, int offset, int size) { byte[] newData = new byte[size]; System.arraycopy(data, offset, newData, 0, size); return (newData); }
class class_name[name] begin[{] method[cloneSubArray, return_type[type[byte]], modifier[final public static], parameter[data, offset, size]] begin[{] local_variable[type[byte], newData] call[System.arraycopy, parameter[member[.data], member[.offset], member[.newData], literal[0], member[.size]]] return[member[.newData]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[cloneSubArray] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[data] , Keyword[int] identifier[offset] , Keyword[int] identifier[size] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[newData] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[size] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[data] , identifier[offset] , identifier[newData] , Other[0] , identifier[size] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[newData] operator[SEP] operator[SEP] }
public final Table getSystemTable(Session session, String name) { Table t; int tableIndex; // must come first...many methods depend on this being set properly this.session = session; if (!isSystemTable(name)) { return null; } tableIndex = getSysTableID(name); t = sysTables[tableIndex]; // fredt - any system table that is not supported will be null here if (t == null) { return t; } // At the time of opening the database, no content is needed // at present. However, table structure is required at this // point to allow processing logged View defn's against system // tables. Returning tables without content speeds the database // open phase under such cases. if (!withContent) { return t; } if (isDirty) { cacheClear(); } HsqlName oldUser = sysTableSessions[tableIndex]; boolean tableValid = oldUser != null; // user has changed and table is user-dependent if (session.getGrantee().getName() != oldUser && sysTableSessionDependent[tableIndex]) { tableValid = false; } if (nonCachedTablesSet.contains(name)) { tableValid = false; } // any valid cached table will be returned here if (tableValid) { return t; } // fredt - clear the contents of table and set new User t.clearAllData(session); sysTableSessions[tableIndex] = session.getGrantee().getName(); // match and if found, generate. t = generateTable(tableIndex); // t will be null at this point if the implementation // does not support the particular table. // // send back what we found or generated return t; }
class class_name[name] begin[{] method[getSystemTable, return_type[type[Table]], modifier[final public], parameter[session, name]] begin[{] local_variable[type[Table], t] local_variable[type[int], tableIndex] assign[THIS[member[None.session]], member[.session]] if[call[.isSystemTable, parameter[member[.name]]]] begin[{] return[literal[null]] else begin[{] None end[}] assign[member[.tableIndex], call[.getSysTableID, parameter[member[.name]]]] assign[member[.t], member[.sysTables]] if[binary_operation[member[.t], ==, literal[null]]] begin[{] return[member[.t]] else begin[{] None end[}] if[member[.withContent]] begin[{] return[member[.t]] else begin[{] None end[}] if[member[.isDirty]] begin[{] call[.cacheClear, parameter[]] else begin[{] None end[}] local_variable[type[HsqlName], oldUser] local_variable[type[boolean], tableValid] if[binary_operation[binary_operation[call[session.getGrantee, parameter[]], !=, member[.oldUser]], &&, member[.sysTableSessionDependent]]] begin[{] assign[member[.tableValid], literal[false]] else begin[{] None end[}] if[call[nonCachedTablesSet.contains, parameter[member[.name]]]] begin[{] assign[member[.tableValid], literal[false]] else begin[{] None end[}] if[member[.tableValid]] begin[{] return[member[.t]] else begin[{] None end[}] call[t.clearAllData, parameter[member[.session]]] assign[member[.sysTableSessions], call[session.getGrantee, parameter[]]] assign[member[.t], call[.generateTable, parameter[member[.tableIndex]]]] return[member[.t]] end[}] END[}]
Keyword[public] Keyword[final] identifier[Table] identifier[getSystemTable] operator[SEP] identifier[Session] identifier[session] , identifier[String] identifier[name] operator[SEP] { identifier[Table] identifier[t] operator[SEP] Keyword[int] identifier[tableIndex] operator[SEP] Keyword[this] operator[SEP] identifier[session] operator[=] identifier[session] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isSystemTable] operator[SEP] identifier[name] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[tableIndex] operator[=] identifier[getSysTableID] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[t] operator[=] identifier[sysTables] operator[SEP] identifier[tableIndex] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[t] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[t] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[withContent] operator[SEP] { Keyword[return] identifier[t] operator[SEP] } Keyword[if] operator[SEP] identifier[isDirty] operator[SEP] { identifier[cacheClear] operator[SEP] operator[SEP] operator[SEP] } identifier[HsqlName] identifier[oldUser] operator[=] identifier[sysTableSessions] operator[SEP] identifier[tableIndex] operator[SEP] operator[SEP] Keyword[boolean] identifier[tableValid] operator[=] identifier[oldUser] operator[!=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[session] operator[SEP] identifier[getGrantee] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[!=] identifier[oldUser] operator[&&] identifier[sysTableSessionDependent] operator[SEP] identifier[tableIndex] operator[SEP] operator[SEP] { identifier[tableValid] operator[=] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[nonCachedTablesSet] operator[SEP] identifier[contains] operator[SEP] identifier[name] operator[SEP] operator[SEP] { identifier[tableValid] operator[=] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[tableValid] operator[SEP] { Keyword[return] identifier[t] operator[SEP] } identifier[t] operator[SEP] identifier[clearAllData] operator[SEP] identifier[session] operator[SEP] operator[SEP] identifier[sysTableSessions] operator[SEP] identifier[tableIndex] operator[SEP] operator[=] identifier[session] operator[SEP] identifier[getGrantee] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[t] operator[=] identifier[generateTable] operator[SEP] identifier[tableIndex] operator[SEP] operator[SEP] Keyword[return] identifier[t] operator[SEP] }
@Mode(TestMode.LITE) @Test public void MPJwtBadMPConfigAsSystemProperties_GoodMpJwtConfigSpecifiedInServerXml() throws Exception { resourceServer.reconfigureServerUsingExpandedConfiguration(_testName, "rs_server_AltConfigNotInApp_goodServerXmlConfig.xml"); standardTestFlow(resourceServer, MpJwtFatConstants.NO_MP_CONFIG_IN_APP_ROOT_CONTEXT, MpJwtFatConstants.NO_MP_CONFIG_IN_APP_APP, MpJwtFatConstants.MPJWT_APP_CLASS_NO_MP_CONFIG_IN_APP); }
class class_name[name] begin[{] method[MPJwtBadMPConfigAsSystemProperties_GoodMpJwtConfigSpecifiedInServerXml, return_type[void], modifier[public], parameter[]] begin[{] call[resourceServer.reconfigureServerUsingExpandedConfiguration, parameter[member[._testName], literal["rs_server_AltConfigNotInApp_goodServerXmlConfig.xml"]]] call[.standardTestFlow, parameter[member[.resourceServer], member[MpJwtFatConstants.NO_MP_CONFIG_IN_APP_ROOT_CONTEXT], member[MpJwtFatConstants.NO_MP_CONFIG_IN_APP_APP], member[MpJwtFatConstants.MPJWT_APP_CLASS_NO_MP_CONFIG_IN_APP]]] end[}] END[}]
annotation[@] identifier[Mode] operator[SEP] identifier[TestMode] operator[SEP] identifier[LITE] operator[SEP] annotation[@] identifier[Test] Keyword[public] Keyword[void] identifier[MPJwtBadMPConfigAsSystemProperties_GoodMpJwtConfigSpecifiedInServerXml] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { identifier[resourceServer] operator[SEP] identifier[reconfigureServerUsingExpandedConfiguration] operator[SEP] identifier[_testName] , literal[String] operator[SEP] operator[SEP] identifier[standardTestFlow] operator[SEP] identifier[resourceServer] , identifier[MpJwtFatConstants] operator[SEP] identifier[NO_MP_CONFIG_IN_APP_ROOT_CONTEXT] , identifier[MpJwtFatConstants] operator[SEP] identifier[NO_MP_CONFIG_IN_APP_APP] , identifier[MpJwtFatConstants] operator[SEP] identifier[MPJWT_APP_CLASS_NO_MP_CONFIG_IN_APP] operator[SEP] operator[SEP] }
public Collection<String> getLoadBalancerGroups() { final String requestUri = String.format(LOAD_BALANCER_FORMAT, getBaseUrl()); return getCollection(requestUri, "load balancer groups", STRING_COLLECTION); }
class class_name[name] begin[{] method[getLoadBalancerGroups, return_type[type[Collection]], modifier[public], parameter[]] begin[{] local_variable[type[String], requestUri] return[call[.getCollection, parameter[member[.requestUri], literal["load balancer groups"], member[.STRING_COLLECTION]]]] end[}] END[}]
Keyword[public] identifier[Collection] operator[<] identifier[String] operator[>] identifier[getLoadBalancerGroups] operator[SEP] operator[SEP] { Keyword[final] identifier[String] identifier[requestUri] operator[=] identifier[String] operator[SEP] identifier[format] operator[SEP] identifier[LOAD_BALANCER_FORMAT] , identifier[getBaseUrl] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[getCollection] operator[SEP] identifier[requestUri] , literal[String] , identifier[STRING_COLLECTION] operator[SEP] operator[SEP] }
public static Map<Character, Long> charsCount(String input) { if (isNullOrEmpty(input)) { return Collections.emptyMap(); } return input.chars().mapToObj(c -> (char) c).collect(groupingBy(identity(), counting())); }
class class_name[name] begin[{] method[charsCount, return_type[type[Map]], modifier[public static], parameter[input]] begin[{] if[call[.isNullOrEmpty, parameter[member[.input]]]] begin[{] return[call[Collections.emptyMap, parameter[]]] else begin[{] None end[}] return[call[input.chars, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Map] operator[<] identifier[Character] , identifier[Long] operator[>] identifier[charsCount] operator[SEP] identifier[String] identifier[input] operator[SEP] { Keyword[if] operator[SEP] identifier[isNullOrEmpty] operator[SEP] identifier[input] operator[SEP] operator[SEP] { Keyword[return] identifier[Collections] operator[SEP] identifier[emptyMap] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[input] operator[SEP] identifier[chars] operator[SEP] operator[SEP] operator[SEP] identifier[mapToObj] operator[SEP] identifier[c] operator[->] operator[SEP] Keyword[char] operator[SEP] identifier[c] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[groupingBy] operator[SEP] identifier[identity] operator[SEP] operator[SEP] , identifier[counting] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Nonnull public final UnifiedResponse setContent (@Nonnull final byte [] aContent) { ValueEnforcer.notNull (aContent, "Content"); return setContent (aContent, 0, aContent.length); }
class class_name[name] begin[{] method[setContent, return_type[type[UnifiedResponse]], modifier[final public], parameter[aContent]] begin[{] call[ValueEnforcer.notNull, parameter[member[.aContent], literal["Content"]]] return[call[.setContent, parameter[member[.aContent], literal[0], member[aContent.length]]]] end[}] END[}]
annotation[@] identifier[Nonnull] Keyword[public] Keyword[final] identifier[UnifiedResponse] identifier[setContent] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[aContent] operator[SEP] { identifier[ValueEnforcer] operator[SEP] identifier[notNull] operator[SEP] identifier[aContent] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[setContent] operator[SEP] identifier[aContent] , Other[0] , identifier[aContent] operator[SEP] identifier[length] operator[SEP] operator[SEP] }
public void setPublicKeyList(java.util.Collection<PublicKey> publicKeyList) { if (publicKeyList == null) { this.publicKeyList = null; return; } this.publicKeyList = new com.amazonaws.internal.SdkInternalList<PublicKey>(publicKeyList); }
class class_name[name] begin[{] method[setPublicKeyList, return_type[void], modifier[public], parameter[publicKeyList]] begin[{] if[binary_operation[member[.publicKeyList], ==, literal[null]]] begin[{] assign[THIS[member[None.publicKeyList]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.publicKeyList]], ClassCreator(arguments=[MemberReference(member=publicKeyList, 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=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=amazonaws, sub_type=ReferenceType(arguments=None, dimensions=None, name=internal, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=PublicKey, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setPublicKeyList] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[PublicKey] operator[>] identifier[publicKeyList] operator[SEP] { Keyword[if] operator[SEP] identifier[publicKeyList] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[publicKeyList] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[publicKeyList] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[PublicKey] operator[>] operator[SEP] identifier[publicKeyList] operator[SEP] operator[SEP] }
@PreDestroy public void close() { synchronized (operationOnConnectionMonitor) { if (state == State.CLOSED) { LOGGER.warn("Attempt to close connection factory which is already closed"); return; } LOGGER.info("Closing connection factory"); if (connection != null) { try { connection.close(); connection = null; } catch (IOException e) { if (! connection.isOpen()) { LOGGER.warn("Attempt to close an already closed connection"); } else { LOGGER.error("Unable to close current connection", e); } } } changeState(State.CLOSED); LOGGER.info("Closed connection factory"); } }
class class_name[name] begin[{] method[close, return_type[void], modifier[public], parameter[]] begin[{] SYNCHRONIZED[member[.operationOnConnectionMonitor]] BEGIN[{] if[binary_operation[member[.state], ==, member[State.CLOSED]]] begin[{] call[LOGGER.warn, parameter[literal["Attempt to close connection factory which is already closed"]]] return[None] else begin[{] None end[}] call[LOGGER.info, parameter[literal["Closing connection factory"]]] if[binary_operation[member[.connection], !=, literal[null]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=connection, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=connection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None)], catches=[CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isOpen, postfix_operators=[], prefix_operators=['!'], qualifier=connection, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to close current connection"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Attempt to close an already closed connection")], member=warn, 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) else begin[{] None end[}] call[.changeState, parameter[member[State.CLOSED]]] call[LOGGER.info, parameter[literal["Closed connection factory"]]] END[}] end[}] END[}]
annotation[@] identifier[PreDestroy] Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[operationOnConnectionMonitor] operator[SEP] { Keyword[if] operator[SEP] identifier[state] operator[==] identifier[State] operator[SEP] identifier[CLOSED] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[connection] operator[!=] Other[null] operator[SEP] { Keyword[try] { identifier[connection] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[connection] operator[=] Other[null] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[connection] operator[SEP] identifier[isOpen] operator[SEP] operator[SEP] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[LOGGER] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } } } identifier[changeState] operator[SEP] identifier[State] operator[SEP] identifier[CLOSED] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] } }
private ValidationResult checkContigLocation(Entry entry) { List<Location> locations = entry.getSequence().getContigs(); Long contigSequenceCoverLength = 0L; Long sequenceLength = entry.getSequence().getLength(); for (Location location : locations) { contigSequenceCoverLength += location.getLength(); } if (!sequenceLength.equals(contigSequenceCoverLength)) { result.append(EntryValidations.createMessage(entry.getSequence().getContigs() .get(0).getOrigin(), Severity.ERROR, MESSAGE_ID_INVALID_CONTIG_LOCATIONS, contigSequenceCoverLength, sequenceLength)); } return result; }
class class_name[name] begin[{] method[checkContigLocation, return_type[type[ValidationResult]], modifier[private], parameter[entry]] begin[{] local_variable[type[List], locations] local_variable[type[Long], contigSequenceCoverLength] local_variable[type[Long], sequenceLength] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=contigSequenceCoverLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[], member=getLength, postfix_operators=[], prefix_operators=[], qualifier=location, selectors=[], type_arguments=None)), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=locations, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=location)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Location, sub_type=None))), label=None) if[call[sequenceLength.equals, parameter[member[.contigSequenceCoverLength]]]] begin[{] call[result.append, parameter[call[EntryValidations.createMessage, parameter[call[entry.getSequence, parameter[]], member[Severity.ERROR], member[.MESSAGE_ID_INVALID_CONTIG_LOCATIONS], member[.contigSequenceCoverLength], member[.sequenceLength]]]]] else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[private] identifier[ValidationResult] identifier[checkContigLocation] operator[SEP] identifier[Entry] identifier[entry] operator[SEP] { identifier[List] operator[<] identifier[Location] operator[>] identifier[locations] operator[=] identifier[entry] operator[SEP] identifier[getSequence] operator[SEP] operator[SEP] operator[SEP] identifier[getContigs] operator[SEP] operator[SEP] operator[SEP] identifier[Long] identifier[contigSequenceCoverLength] operator[=] Other[0L] operator[SEP] identifier[Long] identifier[sequenceLength] operator[=] identifier[entry] operator[SEP] identifier[getSequence] operator[SEP] operator[SEP] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Location] identifier[location] operator[:] identifier[locations] operator[SEP] { identifier[contigSequenceCoverLength] operator[+=] identifier[location] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[sequenceLength] operator[SEP] identifier[equals] operator[SEP] identifier[contigSequenceCoverLength] operator[SEP] operator[SEP] { identifier[result] operator[SEP] identifier[append] operator[SEP] identifier[EntryValidations] operator[SEP] identifier[createMessage] operator[SEP] identifier[entry] operator[SEP] identifier[getSequence] operator[SEP] operator[SEP] operator[SEP] identifier[getContigs] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getOrigin] operator[SEP] operator[SEP] , identifier[Severity] operator[SEP] identifier[ERROR] , identifier[MESSAGE_ID_INVALID_CONTIG_LOCATIONS] , identifier[contigSequenceCoverLength] , identifier[sequenceLength] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public static void initAllRuntimeParameterValues(Connection conn, QueryParameter param, Map<String,QueryParameter> map, Map<String, Object> parameterValues) throws QueryException { List<IdName> allValues = new ArrayList<IdName>(); if ((param.getSource() != null) && (!param.getSource().trim().equals(""))) { try { allValues = ParameterUtil.getRuntimeParameterValues(conn, param, map, parameterValues); } catch (Exception e) { throw new QueryException(e); } } initAllRuntimeParameterValues(param, allValues, parameterValues); }
class class_name[name] begin[{] method[initAllRuntimeParameterValues, return_type[void], modifier[public static], parameter[conn, param, map, parameterValues]] begin[{] local_variable[type[List], allValues] if[binary_operation[binary_operation[call[param.getSource, parameter[]], !=, literal[null]], &&, call[param.getSource, parameter[]]]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=allValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=param, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=map, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=parameterValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getRuntimeParameterValues, postfix_operators=[], prefix_operators=[], qualifier=ParameterUtil, 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=QueryException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] call[.initAllRuntimeParameterValues, parameter[member[.param], member[.allValues], member[.parameterValues]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[initAllRuntimeParameterValues] operator[SEP] identifier[Connection] identifier[conn] , identifier[QueryParameter] identifier[param] , identifier[Map] operator[<] identifier[String] , identifier[QueryParameter] operator[>] identifier[map] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[parameterValues] operator[SEP] Keyword[throws] identifier[QueryException] { identifier[List] operator[<] identifier[IdName] operator[>] identifier[allValues] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[IdName] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[param] operator[SEP] identifier[getSource] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] operator[!] identifier[param] operator[SEP] identifier[getSource] operator[SEP] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { identifier[allValues] operator[=] identifier[ParameterUtil] operator[SEP] identifier[getRuntimeParameterValues] operator[SEP] identifier[conn] , identifier[param] , identifier[map] , identifier[parameterValues] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[QueryException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } identifier[initAllRuntimeParameterValues] operator[SEP] identifier[param] , identifier[allValues] , identifier[parameterValues] operator[SEP] operator[SEP] }
@XmlElementDecl(namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", name = "includeRelationships", scope = GetChildren.class) public JAXBElement<EnumIncludeRelationships> createGetChildrenIncludeRelationships( EnumIncludeRelationships value) { return new JAXBElement<EnumIncludeRelationships>( _GetObjectOfLatestVersionIncludeRelationships_QNAME, EnumIncludeRelationships.class, GetChildren.class, value); }
class class_name[name] begin[{] method[createGetChildrenIncludeRelationships, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=_GetObjectOfLatestVersionIncludeRelationships_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=EnumIncludeRelationships, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GetChildren, sub_type=None)), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=EnumIncludeRelationships, sub_type=None))], dimensions=None, name=JAXBElement, sub_type=None))] end[}] END[}]
annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] , identifier[scope] operator[=] identifier[GetChildren] operator[SEP] Keyword[class] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[EnumIncludeRelationships] operator[>] identifier[createGetChildrenIncludeRelationships] operator[SEP] identifier[EnumIncludeRelationships] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[EnumIncludeRelationships] operator[>] operator[SEP] identifier[_GetObjectOfLatestVersionIncludeRelationships_QNAME] , identifier[EnumIncludeRelationships] operator[SEP] Keyword[class] , identifier[GetChildren] operator[SEP] Keyword[class] , identifier[value] operator[SEP] operator[SEP] }
public EEnum getIfcConstraintEnum() { if (ifcConstraintEnumEEnum == null) { ifcConstraintEnumEEnum = (EEnum) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(799); } return ifcConstraintEnumEEnum; }
class class_name[name] begin[{] method[getIfcConstraintEnum, return_type[type[EEnum]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcConstraintEnumEEnum], ==, literal[null]]] begin[{] assign[member[.ifcConstraintEnumEEnum], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=Ifc2x3tc1Package, 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=799)], 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[.ifcConstraintEnumEEnum]] end[}] END[}]
Keyword[public] identifier[EEnum] identifier[getIfcConstraintEnum] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcConstraintEnumEEnum] operator[==] Other[null] operator[SEP] { identifier[ifcConstraintEnumEEnum] operator[=] operator[SEP] identifier[EEnum] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[Ifc2x3tc1Package] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[799] operator[SEP] operator[SEP] } Keyword[return] identifier[ifcConstraintEnumEEnum] operator[SEP] }
protected String getUserSegmentName(String segment){ Matcher m = USER_SEGMENT_PATTERN.matcher(segment); if(m.find()){ String value = m.group(0); return value.substring(1, value.length() - 1); //I wish I knew regexp better! } return null; }
class class_name[name] begin[{] method[getUserSegmentName, return_type[type[String]], modifier[protected], parameter[segment]] begin[{] local_variable[type[Matcher], m] if[call[m.find, parameter[]]] begin[{] local_variable[type[String], value] return[call[value.substring, parameter[literal[1], binary_operation[call[value.length, parameter[]], -, literal[1]]]]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[protected] identifier[String] identifier[getUserSegmentName] operator[SEP] identifier[String] identifier[segment] operator[SEP] { identifier[Matcher] identifier[m] operator[=] identifier[USER_SEGMENT_PATTERN] operator[SEP] identifier[matcher] operator[SEP] identifier[segment] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m] operator[SEP] identifier[find] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[value] operator[=] identifier[m] operator[SEP] identifier[group] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[return] identifier[value] operator[SEP] identifier[substring] operator[SEP] Other[1] , identifier[value] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public static <A extends Annotation> List<A> getMethodParameterAnnotations(Method method, int index, Class<A> annotationClass, boolean inherits) { List<A> annotations = getMethodParameterAnnotations(method, index, annotationClass); if (inherits && annotationClass.getAnnotation(Inherited.class) != null) { Class<?>[] ifaces = method.getDeclaringClass().getInterfaces(); for (Class<?> iface : ifaces) { Method interfaceMethod; try { interfaceMethod = iface.getMethod(method.getName(), method.getParameterTypes()); if (interfaceMethod != null) { annotations .addAll(getMethodParameterAnnotations(interfaceMethod, index, annotationClass, true)); } } catch (Exception e) { // Ignore it } } Class<?> superClass = method.getDeclaringClass().getSuperclass(); if (superClass != null) { try { Method superMethod = superClass.getMethod(method.getName(), method.getParameterTypes()); if (superMethod != null) { annotations.addAll(getMethodParameterAnnotations(superMethod, index, annotationClass, true)); } } catch (Exception e) { // Ignore it } } } return annotations; }
class class_name[name] begin[{] method[getMethodParameterAnnotations, return_type[type[List]], modifier[public static], parameter[method, index, annotationClass, inherits]] begin[{] local_variable[type[List], annotations] if[binary_operation[member[.inherits], &&, binary_operation[call[annotationClass.getAnnotation, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Inherited, sub_type=None))]], !=, literal[null]]]] begin[{] local_variable[type[Class], ifaces] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=interfaceMethod)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=interfaceMethod, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getParameterTypes, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None)], member=getMethod, postfix_operators=[], prefix_operators=[], qualifier=iface, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=interfaceMethod, 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=[MethodInvocation(arguments=[MemberReference(member=interfaceMethod, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=annotationClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=getMethodParameterAnnotations, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=annotations, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None)]), control=EnhancedForControl(iterable=MemberReference(member=ifaces, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=iface)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None))), label=None) local_variable[type[Class], superClass] if[binary_operation[member[.superClass], !=, literal[null]]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getParameterTypes, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None)], member=getMethod, postfix_operators=[], prefix_operators=[], qualifier=superClass, selectors=[], type_arguments=None), name=superMethod)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=superMethod, 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=[MethodInvocation(arguments=[MemberReference(member=superMethod, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=annotationClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=getMethodParameterAnnotations, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=annotations, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] else begin[{] None end[}] return[member[.annotations]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[A] Keyword[extends] identifier[Annotation] operator[>] identifier[List] operator[<] identifier[A] operator[>] identifier[getMethodParameterAnnotations] operator[SEP] identifier[Method] identifier[method] , Keyword[int] identifier[index] , identifier[Class] operator[<] identifier[A] operator[>] identifier[annotationClass] , Keyword[boolean] identifier[inherits] operator[SEP] { identifier[List] operator[<] identifier[A] operator[>] identifier[annotations] operator[=] identifier[getMethodParameterAnnotations] operator[SEP] identifier[method] , identifier[index] , identifier[annotationClass] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[inherits] operator[&&] identifier[annotationClass] operator[SEP] identifier[getAnnotation] operator[SEP] identifier[Inherited] operator[SEP] Keyword[class] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[Class] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[ifaces] operator[=] identifier[method] operator[SEP] identifier[getDeclaringClass] operator[SEP] operator[SEP] operator[SEP] identifier[getInterfaces] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[iface] operator[:] identifier[ifaces] operator[SEP] { identifier[Method] identifier[interfaceMethod] operator[SEP] Keyword[try] { identifier[interfaceMethod] operator[=] identifier[iface] operator[SEP] identifier[getMethod] operator[SEP] identifier[method] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[method] operator[SEP] identifier[getParameterTypes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[interfaceMethod] operator[!=] Other[null] operator[SEP] { identifier[annotations] operator[SEP] identifier[addAll] operator[SEP] identifier[getMethodParameterAnnotations] operator[SEP] identifier[interfaceMethod] , identifier[index] , identifier[annotationClass] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { } } identifier[Class] operator[<] operator[?] operator[>] identifier[superClass] operator[=] identifier[method] operator[SEP] identifier[getDeclaringClass] operator[SEP] operator[SEP] operator[SEP] identifier[getSuperclass] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[superClass] operator[!=] Other[null] operator[SEP] { Keyword[try] { identifier[Method] identifier[superMethod] operator[=] identifier[superClass] operator[SEP] identifier[getMethod] operator[SEP] identifier[method] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[method] operator[SEP] identifier[getParameterTypes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[superMethod] operator[!=] Other[null] operator[SEP] { identifier[annotations] operator[SEP] identifier[addAll] operator[SEP] identifier[getMethodParameterAnnotations] operator[SEP] identifier[superMethod] , identifier[index] , identifier[annotationClass] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { } } } Keyword[return] identifier[annotations] operator[SEP] }
public static String[] segmentTags(String qualifiedSegmentName) { Preconditions.checkNotNull(qualifiedSegmentName); String[] tags = {TAG_SCOPE, null, TAG_STREAM, null, TAG_SEGMENT, null, TAG_EPOCH, null}; if (qualifiedSegmentName.contains(TABLE_SEGMENT_DELIMITER)) { String[] tokens = qualifiedSegmentName.split(TABLE_SEGMENT_DELIMITER); tags[1] = tokens[0]; tags[3] = TABLES; tags[5] = tokens[1]; tags[7] = "0"; return tags; } String segmentBaseName = getSegmentBaseName(qualifiedSegmentName); String[] tokens = segmentBaseName.split("[/]"); int segmentIdIndex = tokens.length == 2 ? 1 : 2; if (tokens[segmentIdIndex].contains(EPOCH_DELIMITER)) { String[] segmentIdTokens = tokens[segmentIdIndex].split(EPOCH_DELIMITER); tags[5] = segmentIdTokens[0]; tags[7] = segmentIdTokens[1]; } else { tags[5] = tokens[segmentIdIndex]; tags[7] = "0"; } if (tokens.length == 3) { tags[1] = tokens[0]; tags[3] = tokens[1]; } else { tags[1] = "default"; tags[3] = tokens[0]; } return tags; }
class class_name[name] begin[{] method[segmentTags, return_type[type[String]], modifier[public static], parameter[qualifiedSegmentName]] begin[{] call[Preconditions.checkNotNull, parameter[member[.qualifiedSegmentName]]] local_variable[type[String], tags] if[call[qualifiedSegmentName.contains, parameter[member[.TABLE_SEGMENT_DELIMITER]]]] begin[{] local_variable[type[String], tokens] assign[member[.tags], member[.tokens]] assign[member[.tags], member[.TABLES]] assign[member[.tags], member[.tokens]] assign[member[.tags], literal["0"]] return[member[.tags]] else begin[{] None end[}] local_variable[type[String], segmentBaseName] local_variable[type[String], tokens] local_variable[type[int], segmentIdIndex] if[member[.tokens]] begin[{] local_variable[type[String], segmentIdTokens] assign[member[.tags], member[.segmentIdTokens]] assign[member[.tags], member[.segmentIdTokens]] else begin[{] assign[member[.tags], member[.tokens]] assign[member[.tags], literal["0"]] end[}] if[binary_operation[member[tokens.length], ==, literal[3]]] begin[{] assign[member[.tags], member[.tokens]] assign[member[.tags], member[.tokens]] else begin[{] assign[member[.tags], literal["default"]] assign[member[.tags], member[.tokens]] end[}] return[member[.tags]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] operator[SEP] operator[SEP] identifier[segmentTags] operator[SEP] identifier[String] identifier[qualifiedSegmentName] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[qualifiedSegmentName] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[tags] operator[=] { identifier[TAG_SCOPE] , Other[null] , identifier[TAG_STREAM] , Other[null] , identifier[TAG_SEGMENT] , Other[null] , identifier[TAG_EPOCH] , Other[null] } operator[SEP] Keyword[if] operator[SEP] identifier[qualifiedSegmentName] operator[SEP] identifier[contains] operator[SEP] identifier[TABLE_SEGMENT_DELIMITER] operator[SEP] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[tokens] operator[=] identifier[qualifiedSegmentName] operator[SEP] identifier[split] operator[SEP] identifier[TABLE_SEGMENT_DELIMITER] operator[SEP] operator[SEP] identifier[tags] operator[SEP] Other[1] operator[SEP] operator[=] identifier[tokens] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[tags] operator[SEP] Other[3] operator[SEP] operator[=] identifier[TABLES] operator[SEP] identifier[tags] operator[SEP] Other[5] operator[SEP] operator[=] identifier[tokens] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[tags] operator[SEP] Other[7] operator[SEP] operator[=] literal[String] operator[SEP] Keyword[return] identifier[tags] operator[SEP] } identifier[String] identifier[segmentBaseName] operator[=] identifier[getSegmentBaseName] operator[SEP] identifier[qualifiedSegmentName] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[tokens] operator[=] identifier[segmentBaseName] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[int] identifier[segmentIdIndex] operator[=] identifier[tokens] operator[SEP] identifier[length] operator[==] Other[2] operator[?] Other[1] operator[:] Other[2] operator[SEP] Keyword[if] operator[SEP] identifier[tokens] operator[SEP] identifier[segmentIdIndex] operator[SEP] operator[SEP] identifier[contains] operator[SEP] identifier[EPOCH_DELIMITER] operator[SEP] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[segmentIdTokens] operator[=] identifier[tokens] operator[SEP] identifier[segmentIdIndex] operator[SEP] operator[SEP] identifier[split] operator[SEP] identifier[EPOCH_DELIMITER] operator[SEP] operator[SEP] identifier[tags] operator[SEP] Other[5] operator[SEP] operator[=] identifier[segmentIdTokens] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[tags] operator[SEP] Other[7] operator[SEP] operator[=] identifier[segmentIdTokens] operator[SEP] Other[1] operator[SEP] operator[SEP] } Keyword[else] { identifier[tags] operator[SEP] Other[5] operator[SEP] operator[=] identifier[tokens] operator[SEP] identifier[segmentIdIndex] operator[SEP] operator[SEP] identifier[tags] operator[SEP] Other[7] operator[SEP] operator[=] literal[String] operator[SEP] } Keyword[if] operator[SEP] identifier[tokens] operator[SEP] identifier[length] operator[==] Other[3] operator[SEP] { identifier[tags] operator[SEP] Other[1] operator[SEP] operator[=] identifier[tokens] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[tags] operator[SEP] Other[3] operator[SEP] operator[=] identifier[tokens] operator[SEP] Other[1] operator[SEP] operator[SEP] } Keyword[else] { identifier[tags] operator[SEP] Other[1] operator[SEP] operator[=] literal[String] operator[SEP] identifier[tags] operator[SEP] Other[3] operator[SEP] operator[=] identifier[tokens] operator[SEP] Other[0] operator[SEP] operator[SEP] } Keyword[return] identifier[tags] operator[SEP] }
public int entryExistsFor(String userUID) { String selection = RelationshipEntry.COLUMN_USER_UUID + " = ?"; String[] selectionArgs = { userUID }; String[] columns = { RelationshipEntry.COLUMN_REQUEST_STATUS }; SQLiteDatabase db = getReadableDatabase(); Cursor cursor = db.query(RelationshipEntry.TABLE_PERSON_AUTH, columns, selection, selectionArgs, /* groupBy */null, /* having */null, /* orderBy */ null); if (cursor.moveToNext()) { return cursor.getInt(cursor.getColumnIndex(RelationshipEntry.COLUMN_REQUEST_STATUS)); } cursor.close(); return REQUEST_NOT_EXIST; }
class class_name[name] begin[{] method[entryExistsFor, return_type[type[int]], modifier[public], parameter[userUID]] begin[{] local_variable[type[String], selection] local_variable[type[String], selectionArgs] local_variable[type[String], columns] local_variable[type[SQLiteDatabase], db] local_variable[type[Cursor], cursor] if[call[cursor.moveToNext, parameter[]]] begin[{] return[call[cursor.getInt, parameter[call[cursor.getColumnIndex, parameter[member[RelationshipEntry.COLUMN_REQUEST_STATUS]]]]]] else begin[{] None end[}] call[cursor.close, parameter[]] return[member[.REQUEST_NOT_EXIST]] end[}] END[}]
Keyword[public] Keyword[int] identifier[entryExistsFor] operator[SEP] identifier[String] identifier[userUID] operator[SEP] { identifier[String] identifier[selection] operator[=] identifier[RelationshipEntry] operator[SEP] identifier[COLUMN_USER_UUID] operator[+] literal[String] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[selectionArgs] operator[=] { identifier[userUID] } operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[columns] operator[=] { identifier[RelationshipEntry] operator[SEP] identifier[COLUMN_REQUEST_STATUS] } operator[SEP] identifier[SQLiteDatabase] identifier[db] operator[=] identifier[getReadableDatabase] operator[SEP] operator[SEP] operator[SEP] identifier[Cursor] identifier[cursor] operator[=] identifier[db] operator[SEP] identifier[query] operator[SEP] identifier[RelationshipEntry] operator[SEP] identifier[TABLE_PERSON_AUTH] , identifier[columns] , identifier[selection] , identifier[selectionArgs] , Other[null] , Other[null] , Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cursor] operator[SEP] identifier[moveToNext] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[cursor] operator[SEP] identifier[getInt] operator[SEP] identifier[cursor] operator[SEP] identifier[getColumnIndex] operator[SEP] identifier[RelationshipEntry] operator[SEP] identifier[COLUMN_REQUEST_STATUS] operator[SEP] operator[SEP] operator[SEP] } identifier[cursor] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[REQUEST_NOT_EXIST] operator[SEP] }
protected boolean runAllTasks(long timeoutNanos) { fetchFromScheduledTaskQueue(); Runnable task = pollTask(); if (task == null) { afterRunningAllTasks(); return false; } final long deadline = ScheduledFutureTask.nanoTime() + timeoutNanos; long runTasks = 0; long lastExecutionTime; for (;;) { safeExecute(task); runTasks ++; // Check timeout every 64 tasks because nanoTime() is relatively expensive. // XXX: Hard-coded value - will make it configurable if it is really a problem. if ((runTasks & 0x3F) == 0) { lastExecutionTime = ScheduledFutureTask.nanoTime(); if (lastExecutionTime >= deadline) { break; } } task = pollTask(); if (task == null) { lastExecutionTime = ScheduledFutureTask.nanoTime(); break; } } afterRunningAllTasks(); this.lastExecutionTime = lastExecutionTime; return true; }
class class_name[name] begin[{] method[runAllTasks, return_type[type[boolean]], modifier[protected], parameter[timeoutNanos]] begin[{] call[.fetchFromScheduledTaskQueue, parameter[]] local_variable[type[Runnable], task] if[binary_operation[member[.task], ==, literal[null]]] begin[{] call[.afterRunningAllTasks, parameter[]] return[literal[false]] else begin[{] None end[}] local_variable[type[long], deadline] local_variable[type[long], runTasks] local_variable[type[long], lastExecutionTime] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=task, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=safeExecute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=runTasks, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=runTasks, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x3F), operator=&), 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=lastExecutionTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=nanoTime, postfix_operators=[], prefix_operators=[], qualifier=ScheduledFutureTask, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=lastExecutionTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=deadline, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)]))])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=task, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=pollTask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=task, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastExecutionTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=nanoTime, postfix_operators=[], prefix_operators=[], qualifier=ScheduledFutureTask, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]))]), control=ForControl(condition=None, init=None, update=None), label=None) call[.afterRunningAllTasks, parameter[]] assign[THIS[member[None.lastExecutionTime]], member[.lastExecutionTime]] return[literal[true]] end[}] END[}]
Keyword[protected] Keyword[boolean] identifier[runAllTasks] operator[SEP] Keyword[long] identifier[timeoutNanos] operator[SEP] { identifier[fetchFromScheduledTaskQueue] operator[SEP] operator[SEP] operator[SEP] identifier[Runnable] identifier[task] operator[=] identifier[pollTask] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[task] operator[==] Other[null] operator[SEP] { identifier[afterRunningAllTasks] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[final] Keyword[long] identifier[deadline] operator[=] identifier[ScheduledFutureTask] operator[SEP] identifier[nanoTime] operator[SEP] operator[SEP] operator[+] identifier[timeoutNanos] operator[SEP] Keyword[long] identifier[runTasks] operator[=] Other[0] operator[SEP] Keyword[long] identifier[lastExecutionTime] operator[SEP] Keyword[for] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[safeExecute] operator[SEP] identifier[task] operator[SEP] operator[SEP] identifier[runTasks] operator[++] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[runTasks] operator[&] literal[Integer] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[lastExecutionTime] operator[=] identifier[ScheduledFutureTask] operator[SEP] identifier[nanoTime] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[lastExecutionTime] operator[>=] identifier[deadline] operator[SEP] { Keyword[break] operator[SEP] } } identifier[task] operator[=] identifier[pollTask] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[task] operator[==] Other[null] operator[SEP] { identifier[lastExecutionTime] operator[=] identifier[ScheduledFutureTask] operator[SEP] identifier[nanoTime] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } } identifier[afterRunningAllTasks] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[lastExecutionTime] operator[=] identifier[lastExecutionTime] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
public static Map<String, Object> resourceRule(String type, Map<String, Object> meta) { HashMap<String, Object> authResource = new HashMap<String, Object>(); if (null != meta) { authResource.putAll(meta); } authResource.put(TYPE_FIELD, type); return authResource; }
class class_name[name] begin[{] method[resourceRule, return_type[type[Map]], modifier[public static], parameter[type, meta]] begin[{] local_variable[type[HashMap], authResource] if[binary_operation[literal[null], !=, member[.meta]]] begin[{] call[authResource.putAll, parameter[member[.meta]]] else begin[{] None end[}] call[authResource.put, parameter[member[.TYPE_FIELD], member[.type]]] return[member[.authResource]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[resourceRule] operator[SEP] identifier[String] identifier[type] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[meta] operator[SEP] { identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] identifier[authResource] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[meta] operator[SEP] { identifier[authResource] operator[SEP] identifier[putAll] operator[SEP] identifier[meta] operator[SEP] operator[SEP] } identifier[authResource] operator[SEP] identifier[put] operator[SEP] identifier[TYPE_FIELD] , identifier[type] operator[SEP] operator[SEP] Keyword[return] identifier[authResource] operator[SEP] }
public AbstractPrediction predict(RowData data, ModelCategory mc) throws PredictException { switch (mc) { case AutoEncoder: return predictAutoEncoder(data); case Binomial: return predictBinomial(data); case Multinomial: return predictMultinomial(data); case Ordinal: return predictOrdinal(data); case Clustering: return predictClustering(data); case Regression: return predictRegression(data); case DimReduction: return predictDimReduction(data); case WordEmbedding: return predictWord2Vec(data); case AnomalyDetection: return predictAnomalyDetection(data); case Unknown: throw new PredictException("Unknown model category"); default: throw new PredictException("Unhandled model category (" + m.getModelCategory() + ") in switch statement"); } }
class class_name[name] begin[{] method[predict, return_type[type[AbstractPrediction]], modifier[public], parameter[data, mc]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['AutoEncoder'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=predictAutoEncoder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=['Binomial'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=predictBinomial, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=['Multinomial'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=predictMultinomial, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=['Ordinal'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=predictOrdinal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=['Clustering'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=predictClustering, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=['Regression'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=predictRegression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=['DimReduction'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=predictDimReduction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=['WordEmbedding'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=predictWord2Vec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=['AnomalyDetection'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=predictAnomalyDetection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=['Unknown'], statements=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unknown model category")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PredictException, sub_type=None)), label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unhandled model category ("), operandr=MethodInvocation(arguments=[], member=getModelCategory, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=") in switch statement"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PredictException, sub_type=None)), label=None)])], expression=MemberReference(member=mc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
Keyword[public] identifier[AbstractPrediction] identifier[predict] operator[SEP] identifier[RowData] identifier[data] , identifier[ModelCategory] identifier[mc] operator[SEP] Keyword[throws] identifier[PredictException] { Keyword[switch] operator[SEP] identifier[mc] operator[SEP] { Keyword[case] identifier[AutoEncoder] operator[:] Keyword[return] identifier[predictAutoEncoder] operator[SEP] identifier[data] operator[SEP] operator[SEP] Keyword[case] identifier[Binomial] operator[:] Keyword[return] identifier[predictBinomial] operator[SEP] identifier[data] operator[SEP] operator[SEP] Keyword[case] identifier[Multinomial] operator[:] Keyword[return] identifier[predictMultinomial] operator[SEP] identifier[data] operator[SEP] operator[SEP] Keyword[case] identifier[Ordinal] operator[:] Keyword[return] identifier[predictOrdinal] operator[SEP] identifier[data] operator[SEP] operator[SEP] Keyword[case] identifier[Clustering] operator[:] Keyword[return] identifier[predictClustering] operator[SEP] identifier[data] operator[SEP] operator[SEP] Keyword[case] identifier[Regression] operator[:] Keyword[return] identifier[predictRegression] operator[SEP] identifier[data] operator[SEP] operator[SEP] Keyword[case] identifier[DimReduction] operator[:] Keyword[return] identifier[predictDimReduction] operator[SEP] identifier[data] operator[SEP] operator[SEP] Keyword[case] identifier[WordEmbedding] operator[:] Keyword[return] identifier[predictWord2Vec] operator[SEP] identifier[data] operator[SEP] operator[SEP] Keyword[case] identifier[AnomalyDetection] operator[:] Keyword[return] identifier[predictAnomalyDetection] operator[SEP] identifier[data] operator[SEP] operator[SEP] Keyword[case] identifier[Unknown] operator[:] Keyword[throw] Keyword[new] identifier[PredictException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[PredictException] operator[SEP] literal[String] operator[+] identifier[m] operator[SEP] identifier[getModelCategory] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } }
public static <D> SipAssembler<D> forPdiAndContentWithContentHashing(PackagingInformation prototype, Assembler<HashedContents<D>> pdiAssembler, DigitalObjectsExtraction<D> contentsExtraction, HashAssembler contentHashAssembler) { return forPdiAndContentWithHashing(prototype, pdiAssembler, new NoHashAssembler(), contentsExtraction, contentHashAssembler); }
class class_name[name] begin[{] method[forPdiAndContentWithContentHashing, return_type[type[SipAssembler]], modifier[public static], parameter[prototype, pdiAssembler, contentsExtraction, contentHashAssembler]] begin[{] return[call[.forPdiAndContentWithHashing, parameter[member[.prototype], member[.pdiAssembler], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NoHashAssembler, sub_type=None)), member[.contentsExtraction], member[.contentHashAssembler]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[D] operator[>] identifier[SipAssembler] operator[<] identifier[D] operator[>] identifier[forPdiAndContentWithContentHashing] operator[SEP] identifier[PackagingInformation] identifier[prototype] , identifier[Assembler] operator[<] identifier[HashedContents] operator[<] identifier[D] operator[>] operator[>] identifier[pdiAssembler] , identifier[DigitalObjectsExtraction] operator[<] identifier[D] operator[>] identifier[contentsExtraction] , identifier[HashAssembler] identifier[contentHashAssembler] operator[SEP] { Keyword[return] identifier[forPdiAndContentWithHashing] operator[SEP] identifier[prototype] , identifier[pdiAssembler] , Keyword[new] identifier[NoHashAssembler] operator[SEP] operator[SEP] , identifier[contentsExtraction] , identifier[contentHashAssembler] operator[SEP] operator[SEP] }
protected EventDefinition getEventDefintion(IPortletWindow portletWindow, QName name) { PortletApplicationDefinition appDD = portletWindow.getPlutoPortletWindow().getPortletDefinition().getApplication(); for (EventDefinition def : appDD.getEventDefinitions()) { if (def.getQName() != null) { if (def.getQName().equals(name)) return def; } else { QName tmp = new QName(appDD.getDefaultNamespace(), def.getName()); if (tmp.equals(name)) return def; } } throw new IllegalStateException(); }
class class_name[name] begin[{] method[getEventDefintion, return_type[type[EventDefinition]], modifier[protected], parameter[portletWindow, name]] begin[{] local_variable[type[PortletApplicationDefinition], appDD] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getQName, postfix_operators=[], prefix_operators=[], qualifier=def, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getDefaultNamespace, postfix_operators=[], prefix_operators=[], qualifier=appDD, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=def, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=QName, sub_type=None)), name=tmp)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=QName, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=tmp, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=def, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None))]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getQName, postfix_operators=[], prefix_operators=[], qualifier=def, selectors=[MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=def, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None))]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getEventDefinitions, postfix_operators=[], prefix_operators=[], qualifier=appDD, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=def)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=EventDefinition, sub_type=None))), label=None) ThrowStatement(expression=ClassCreator(arguments=[], 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) end[}] END[}]
Keyword[protected] identifier[EventDefinition] identifier[getEventDefintion] operator[SEP] identifier[IPortletWindow] identifier[portletWindow] , identifier[QName] identifier[name] operator[SEP] { identifier[PortletApplicationDefinition] identifier[appDD] operator[=] identifier[portletWindow] operator[SEP] identifier[getPlutoPortletWindow] operator[SEP] operator[SEP] operator[SEP] identifier[getPortletDefinition] operator[SEP] operator[SEP] operator[SEP] identifier[getApplication] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[EventDefinition] identifier[def] operator[:] identifier[appDD] operator[SEP] identifier[getEventDefinitions] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[def] operator[SEP] identifier[getQName] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[def] operator[SEP] identifier[getQName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[return] identifier[def] operator[SEP] } Keyword[else] { identifier[QName] identifier[tmp] operator[=] Keyword[new] identifier[QName] operator[SEP] identifier[appDD] operator[SEP] identifier[getDefaultNamespace] operator[SEP] operator[SEP] , identifier[def] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tmp] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[return] identifier[def] operator[SEP] } } Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] operator[SEP] operator[SEP] }
private final String bufferToString(byte[] str) { String string = null; if (str != null) { string = AMF.CHARSET.decode(ByteBuffer.wrap(str)).toString(); log.debug("String: {}", string); } else { log.warn("ByteBuffer was null attempting to read String"); } return string; }
class class_name[name] begin[{] method[bufferToString, return_type[type[String]], modifier[final private], parameter[str]] begin[{] local_variable[type[String], string] if[binary_operation[member[.str], !=, literal[null]]] begin[{] assign[member[.string], call[AMF.CHARSET.decode, parameter[call[ByteBuffer.wrap, parameter[member[.str]]]]]] call[log.debug, parameter[literal["String: {}"], member[.string]]] else begin[{] call[log.warn, parameter[literal["ByteBuffer was null attempting to read String"]]] end[}] return[member[.string]] end[}] END[}]
Keyword[private] Keyword[final] identifier[String] identifier[bufferToString] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[str] operator[SEP] { identifier[String] identifier[string] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[str] operator[!=] Other[null] operator[SEP] { identifier[string] operator[=] identifier[AMF] operator[SEP] identifier[CHARSET] operator[SEP] identifier[decode] operator[SEP] identifier[ByteBuffer] operator[SEP] identifier[wrap] operator[SEP] identifier[str] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[string] operator[SEP] operator[SEP] } Keyword[else] { identifier[log] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[string] operator[SEP] }
public static void putValue(String key, Object newValue) { Object oldValue = CFG.get(key); if (changed(oldValue, newValue)) { CFG.put(key, newValue); List<RpcConfigListener> rpcConfigListeners = CFG_LISTENER.get(key); if (CommonUtils.isNotEmpty(rpcConfigListeners)) { for (RpcConfigListener rpcConfigListener : rpcConfigListeners) { rpcConfigListener.onChange(oldValue, newValue); } } } }
class class_name[name] begin[{] method[putValue, return_type[void], modifier[public static], parameter[key, newValue]] begin[{] local_variable[type[Object], oldValue] if[call[.changed, parameter[member[.oldValue], member[.newValue]]]] begin[{] call[CFG.put, parameter[member[.key], member[.newValue]]] local_variable[type[List], rpcConfigListeners] if[call[CommonUtils.isNotEmpty, parameter[member[.rpcConfigListeners]]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=oldValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=newValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onChange, postfix_operators=[], prefix_operators=[], qualifier=rpcConfigListener, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=rpcConfigListeners, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=rpcConfigListener)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=RpcConfigListener, sub_type=None))), label=None) else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[putValue] operator[SEP] identifier[String] identifier[key] , identifier[Object] identifier[newValue] operator[SEP] { identifier[Object] identifier[oldValue] operator[=] identifier[CFG] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[changed] operator[SEP] identifier[oldValue] , identifier[newValue] operator[SEP] operator[SEP] { identifier[CFG] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[newValue] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[RpcConfigListener] operator[>] identifier[rpcConfigListeners] operator[=] identifier[CFG_LISTENER] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[CommonUtils] operator[SEP] identifier[isNotEmpty] operator[SEP] identifier[rpcConfigListeners] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[RpcConfigListener] identifier[rpcConfigListener] operator[:] identifier[rpcConfigListeners] operator[SEP] { identifier[rpcConfigListener] operator[SEP] identifier[onChange] operator[SEP] identifier[oldValue] , identifier[newValue] operator[SEP] operator[SEP] } } } }
public char[] toArray(final char[] array) { final char[] a = array.length >= length() ? array : new char[length()]; for (int i = length(); --i >= 0;) { a[i] = charAt(i); } return a; }
class class_name[name] begin[{] method[toArray, return_type[type[char]], modifier[public], parameter[array]] begin[{] local_variable[type[char], a] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=['--'], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=None), label=None) return[member[.a]] end[}] END[}]
Keyword[public] Keyword[char] operator[SEP] operator[SEP] identifier[toArray] operator[SEP] Keyword[final] Keyword[char] operator[SEP] operator[SEP] identifier[array] operator[SEP] { Keyword[final] Keyword[char] operator[SEP] operator[SEP] identifier[a] operator[=] identifier[array] operator[SEP] identifier[length] operator[>=] identifier[length] operator[SEP] operator[SEP] operator[?] identifier[array] operator[:] Keyword[new] Keyword[char] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[--] identifier[i] operator[>=] Other[0] operator[SEP] operator[SEP] { identifier[a] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] } Keyword[return] identifier[a] operator[SEP] }
public static void export(OutputStream os, List<JobDef> jobDefList, DbConn cnx) throws JqmXmlException { // Argument tests if (os == null) { throw new IllegalArgumentException("output stream cannot be null"); } if (jobDefList == null || jobDefList.isEmpty()) { throw new IllegalArgumentException("job def list cannot be null or empty"); } if (cnx == null) { throw new IllegalArgumentException("database connection cannot be null"); } Collections.sort(jobDefList, new Comparator<JobDef>() { @Override public int compare(JobDef o1, JobDef o2) { return o1.getJarPath().compareTo(o2.getJarPath()); } }); // Create XML document Element root = new Element("jqm"); Document document = new Document(root); Element jobDefinitions = null; String currentJarPath = null; Set<Cl> cls = new HashSet<>(); for (JobDef j : jobDefList) { if (currentJarPath == null || !j.getJarPath().equals(currentJarPath)) { currentJarPath = j.getJarPath(); Element jar = new Element("jar"); addTextElementToParentElement(jar, "path", currentJarPath); addTextElementToParentElement(jar, "pathType", j.getPathType().toString()); jobDefinitions = new Element("jobdefinitions"); jar.addContent(jobDefinitions); root.addContent(jar); } Element jobDefinition = getJobDefinitionElement(j, cnx); jobDefinitions.addContent(jobDefinition); if (j.getClassLoader(cnx) != null) { cls.add(j.getClassLoader()); } } for (Cl cl : cls) { root.addContent(getClElement(cl)); } // Done: output XML to stream. try { XMLOutputter out = new XMLOutputter(Format.getPrettyFormat()); out.output(document, os); } catch (java.io.IOException e) { throw new JqmXmlException("Could not output XML to stream", e); } }
class class_name[name] begin[{] method[export, return_type[void], modifier[public static], parameter[os, jobDefList, cnx]] begin[{] if[binary_operation[member[.os], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="output stream cannot be null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[binary_operation[member[.jobDefList], ==, literal[null]], ||, call[jobDefList.isEmpty, parameter[]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="job def list cannot be null or empty")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.cnx], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="database connection cannot be null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] call[Collections.sort, parameter[member[.jobDefList], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getJarPath, postfix_operators=[], prefix_operators=[], qualifier=o1, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getJarPath, postfix_operators=[], prefix_operators=[], qualifier=o2, selectors=[], type_arguments=None)], member=compareTo, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=compare, parameters=[FormalParameter(annotations=[], modifiers=set(), name=o1, type=ReferenceType(arguments=None, dimensions=[], name=JobDef, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=o2, type=ReferenceType(arguments=None, dimensions=[], name=JobDef, sub_type=None), varargs=False)], return_type=BasicType(dimensions=[], name=int), 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=JobDef, sub_type=None))], dimensions=None, name=Comparator, sub_type=None))]] local_variable[type[Element], root] local_variable[type[Document], document] local_variable[type[Element], jobDefinitions] local_variable[type[String], currentJarPath] local_variable[type[Set], cls] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=currentJarPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[], member=getJarPath, postfix_operators=[], prefix_operators=['!'], qualifier=j, selectors=[MethodInvocation(arguments=[MemberReference(member=currentJarPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=currentJarPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getJarPath, postfix_operators=[], prefix_operators=[], qualifier=j, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="jar")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Element, sub_type=None)), name=jar)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=jar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="path"), MemberReference(member=currentJarPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addTextElementToParentElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=jar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="pathType"), MethodInvocation(arguments=[], member=getPathType, postfix_operators=[], prefix_operators=[], qualifier=j, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=addTextElementToParentElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=jobDefinitions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="jobdefinitions")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Element, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=jobDefinitions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addContent, postfix_operators=[], prefix_operators=[], qualifier=jar, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=jar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addContent, postfix_operators=[], prefix_operators=[], qualifier=root, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cnx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getJobDefinitionElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=jobDefinition)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=jobDefinition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addContent, postfix_operators=[], prefix_operators=[], qualifier=jobDefinitions, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=cnx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getClassLoader, postfix_operators=[], prefix_operators=[], qualifier=j, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getClassLoader, postfix_operators=[], prefix_operators=[], qualifier=j, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=cls, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=jobDefList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=j)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JobDef, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=cl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getClElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=addContent, postfix_operators=[], prefix_operators=[], qualifier=root, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=cls, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=cl)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Cl, sub_type=None))), label=None) TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getPrettyFormat, postfix_operators=[], prefix_operators=[], qualifier=Format, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=XMLOutputter, sub_type=None)), name=out)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=XMLOutputter, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=document, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=os, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=output, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not output XML to stream"), 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=JqmXmlException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['java.io.IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[export] operator[SEP] identifier[OutputStream] identifier[os] , identifier[List] operator[<] identifier[JobDef] operator[>] identifier[jobDefList] , identifier[DbConn] identifier[cnx] operator[SEP] Keyword[throws] identifier[JqmXmlException] { Keyword[if] operator[SEP] identifier[os] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[jobDefList] operator[==] Other[null] operator[||] identifier[jobDefList] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[cnx] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[Collections] operator[SEP] identifier[sort] operator[SEP] identifier[jobDefList] , Keyword[new] identifier[Comparator] operator[<] identifier[JobDef] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[compare] operator[SEP] identifier[JobDef] identifier[o1] , identifier[JobDef] identifier[o2] operator[SEP] { Keyword[return] identifier[o1] operator[SEP] identifier[getJarPath] operator[SEP] operator[SEP] operator[SEP] identifier[compareTo] operator[SEP] identifier[o2] operator[SEP] identifier[getJarPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[Element] identifier[root] operator[=] Keyword[new] identifier[Element] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Document] identifier[document] operator[=] Keyword[new] identifier[Document] operator[SEP] identifier[root] operator[SEP] operator[SEP] identifier[Element] identifier[jobDefinitions] operator[=] Other[null] operator[SEP] identifier[String] identifier[currentJarPath] operator[=] Other[null] operator[SEP] identifier[Set] operator[<] identifier[Cl] operator[>] identifier[cls] operator[=] Keyword[new] identifier[HashSet] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[JobDef] identifier[j] operator[:] identifier[jobDefList] operator[SEP] { Keyword[if] operator[SEP] identifier[currentJarPath] operator[==] Other[null] operator[||] operator[!] identifier[j] operator[SEP] identifier[getJarPath] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[currentJarPath] operator[SEP] operator[SEP] { identifier[currentJarPath] operator[=] identifier[j] operator[SEP] identifier[getJarPath] operator[SEP] operator[SEP] operator[SEP] identifier[Element] identifier[jar] operator[=] Keyword[new] identifier[Element] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[addTextElementToParentElement] operator[SEP] identifier[jar] , literal[String] , identifier[currentJarPath] operator[SEP] operator[SEP] identifier[addTextElementToParentElement] operator[SEP] identifier[jar] , literal[String] , identifier[j] operator[SEP] identifier[getPathType] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[jobDefinitions] operator[=] Keyword[new] identifier[Element] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[jar] operator[SEP] identifier[addContent] operator[SEP] identifier[jobDefinitions] operator[SEP] operator[SEP] identifier[root] operator[SEP] identifier[addContent] operator[SEP] identifier[jar] operator[SEP] operator[SEP] } identifier[Element] identifier[jobDefinition] operator[=] identifier[getJobDefinitionElement] operator[SEP] identifier[j] , identifier[cnx] operator[SEP] operator[SEP] identifier[jobDefinitions] operator[SEP] identifier[addContent] operator[SEP] identifier[jobDefinition] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[j] operator[SEP] identifier[getClassLoader] operator[SEP] identifier[cnx] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[cls] operator[SEP] identifier[add] operator[SEP] identifier[j] operator[SEP] identifier[getClassLoader] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] identifier[Cl] identifier[cl] operator[:] identifier[cls] operator[SEP] { identifier[root] operator[SEP] identifier[addContent] operator[SEP] identifier[getClElement] operator[SEP] identifier[cl] operator[SEP] operator[SEP] operator[SEP] } Keyword[try] { identifier[XMLOutputter] identifier[out] operator[=] Keyword[new] identifier[XMLOutputter] operator[SEP] identifier[Format] operator[SEP] identifier[getPrettyFormat] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[output] operator[SEP] identifier[document] , identifier[os] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[JqmXmlException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } }
protected static List<EndpointInfo> compressEndpointInfo(List<EndpointInfo> endpoints) { List<EndpointInfo> others = new ArrayList<EndpointInfo>(); EndpointPart rootPart = new EndpointPart(); for (int i = 0; i < endpoints.size(); i++) { EndpointInfo endpoint = endpoints.get(i); if (endpoint.getEndpoint() != null && endpoint.getEndpoint().length() > 1 && endpoint.getEndpoint().charAt(0) == '/') { String[] parts = endpoint.getEndpoint().split("/"); buildTree(rootPart, parts, 1, endpoint.getType()); } else { others.add(new EndpointInfo(endpoint)); } } // Construct new list List<EndpointInfo> info = null; if (endpoints.size() != others.size()) { rootPart.collapse(); info = extractEndpointInfo(rootPart); info.addAll(others); } else { info = others; } // Initialise the endpoint info initEndpointInfo(info); return info; }
class class_name[name] begin[{] method[compressEndpointInfo, return_type[type[List]], modifier[static protected], parameter[endpoints]] begin[{] local_variable[type[List], others] local_variable[type[EndpointPart], rootPart] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=endpoints, selectors=[], type_arguments=None), name=endpoint)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=EndpointInfo, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getEndpoint, postfix_operators=[], prefix_operators=[], qualifier=endpoint, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getEndpoint, postfix_operators=[], prefix_operators=[], qualifier=endpoint, selectors=[MethodInvocation(arguments=[], member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>), operator=&&), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getEndpoint, postfix_operators=[], prefix_operators=[], qualifier=endpoint, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=charAt, 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===), operator=&&), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=endpoint, 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=EndpointInfo, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=others, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getEndpoint, postfix_operators=[], prefix_operators=[], qualifier=endpoint, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/")], member=split, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=parts)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=rootPart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=parts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=endpoint, selectors=[], type_arguments=None)], member=buildTree, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=endpoints, 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) local_variable[type[List], info] if[binary_operation[call[endpoints.size, parameter[]], !=, call[others.size, parameter[]]]] begin[{] call[rootPart.collapse, parameter[]] assign[member[.info], call[.extractEndpointInfo, parameter[member[.rootPart]]]] call[info.addAll, parameter[member[.others]]] else begin[{] assign[member[.info], member[.others]] end[}] call[.initEndpointInfo, parameter[member[.info]]] return[member[.info]] end[}] END[}]
Keyword[protected] Keyword[static] identifier[List] operator[<] identifier[EndpointInfo] operator[>] identifier[compressEndpointInfo] operator[SEP] identifier[List] operator[<] identifier[EndpointInfo] operator[>] identifier[endpoints] operator[SEP] { identifier[List] operator[<] identifier[EndpointInfo] operator[>] identifier[others] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[EndpointInfo] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[EndpointPart] identifier[rootPart] operator[=] Keyword[new] identifier[EndpointPart] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[endpoints] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[EndpointInfo] identifier[endpoint] operator[=] identifier[endpoints] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[endpoint] operator[SEP] identifier[getEndpoint] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[endpoint] operator[SEP] identifier[getEndpoint] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[1] operator[&&] identifier[endpoint] operator[SEP] identifier[getEndpoint] operator[SEP] operator[SEP] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[==] literal[String] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[parts] operator[=] identifier[endpoint] operator[SEP] identifier[getEndpoint] operator[SEP] operator[SEP] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[buildTree] operator[SEP] identifier[rootPart] , identifier[parts] , Other[1] , identifier[endpoint] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[others] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[EndpointInfo] operator[SEP] identifier[endpoint] operator[SEP] operator[SEP] operator[SEP] } } identifier[List] operator[<] identifier[EndpointInfo] operator[>] identifier[info] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[endpoints] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[!=] identifier[others] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] { identifier[rootPart] operator[SEP] identifier[collapse] operator[SEP] operator[SEP] operator[SEP] identifier[info] operator[=] identifier[extractEndpointInfo] operator[SEP] identifier[rootPart] operator[SEP] operator[SEP] identifier[info] operator[SEP] identifier[addAll] operator[SEP] identifier[others] operator[SEP] operator[SEP] } Keyword[else] { identifier[info] operator[=] identifier[others] operator[SEP] } identifier[initEndpointInfo] operator[SEP] identifier[info] operator[SEP] operator[SEP] Keyword[return] identifier[info] operator[SEP] }
public DocumentFragment<Lookup> execute(long timeout, TimeUnit timeUnit) { return this.async.execute(timeout, timeUnit).toBlocking().single(); }
class class_name[name] begin[{] method[execute, return_type[type[DocumentFragment]], modifier[public], parameter[timeout, timeUnit]] begin[{] return[THIS[member[None.async]call[None.execute, parameter[member[.timeout], member[.timeUnit]]]call[None.toBlocking, parameter[]]call[None.single, parameter[]]]] end[}] END[}]
Keyword[public] identifier[DocumentFragment] operator[<] identifier[Lookup] operator[>] identifier[execute] operator[SEP] Keyword[long] identifier[timeout] , identifier[TimeUnit] identifier[timeUnit] operator[SEP] { Keyword[return] Keyword[this] operator[SEP] identifier[async] operator[SEP] identifier[execute] operator[SEP] identifier[timeout] , identifier[timeUnit] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[single] operator[SEP] operator[SEP] operator[SEP] }
public static com.liferay.commerce.product.type.virtual.order.model.CommerceVirtualOrderItem createCommerceVirtualOrderItem( long commerceVirtualOrderItemId) { return getService() .createCommerceVirtualOrderItem(commerceVirtualOrderItemId); }
class class_name[name] begin[{] method[createCommerceVirtualOrderItem, return_type[type[com]], modifier[public static], parameter[commerceVirtualOrderItemId]] begin[{] return[call[.getService, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[product] operator[SEP] identifier[type] operator[SEP] identifier[virtual] operator[SEP] identifier[order] operator[SEP] identifier[model] operator[SEP] identifier[CommerceVirtualOrderItem] identifier[createCommerceVirtualOrderItem] operator[SEP] Keyword[long] identifier[commerceVirtualOrderItemId] operator[SEP] { Keyword[return] identifier[getService] operator[SEP] operator[SEP] operator[SEP] identifier[createCommerceVirtualOrderItem] operator[SEP] identifier[commerceVirtualOrderItemId] operator[SEP] operator[SEP] }
@Override public boolean visitTree(VisitContext visitContext, VisitCallback callback) { // First check to see whether we are visitable. If not // short-circuit out of this subtree, though allow the // visit to proceed through to other subtrees. if (!isVisitable(visitContext)) { return false; } // Clear out the row index is one is set so that // we start from a clean slate. FacesContext facesContext = visitContext.getFacesContext(); // NOTE: that the visitRows local will be obsolete once the // appropriate visit hints have been added to the API boolean visitRows = requiresRowIteration(visitContext); Integer oldRowKey = null; if (visitRows) { oldRowKey = getRowKey(); setRowKey(facesContext, null); } // Push ourselves to EL pushComponentToEL(facesContext, null); try { // Visit ourselves. Note that we delegate to the // VisitContext to actually perform the visit. VisitResult result = visitContext.invokeVisitCallback(this, callback); // If the visit is complete, short-circuit out and end the visit if (result == VisitResult.COMPLETE) { return true; } // Visit children, short-circuiting as necessary if ((result == VisitResult.ACCEPT)) { if (visitDataChildren(visitContext, callback, visitRows)) { return true; } } } catch (IOException e) { // TODO handle exception LOG.log(Level.SEVERE, e.getMessage(), e); } finally { // Clean up - pop EL and restore old row index popComponentFromEL(facesContext); if (visitRows) { try { setRowKey(facesContext, oldRowKey); restoreOrigValue(facesContext); } catch (Exception e) { // TODO: handle exception LOG.log(Level.SEVERE, e.getMessage(), e); } } } // Return false to allow the visit to continue return false; }
class class_name[name] begin[{] method[visitTree, return_type[type[boolean]], modifier[public], parameter[visitContext, callback]] begin[{] if[call[.isVisitable, parameter[member[.visitContext]]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[FacesContext], facesContext] local_variable[type[boolean], visitRows] local_variable[type[Integer], oldRowKey] if[member[.visitRows]] begin[{] assign[member[.oldRowKey], call[.getRowKey, parameter[]]] call[.setRowKey, parameter[member[.facesContext], literal[null]]] else begin[{] None end[}] call[.pushComponentToEL, parameter[member[.facesContext], literal[null]]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=callback, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=invokeVisitCallback, postfix_operators=[], prefix_operators=[], qualifier=visitContext, selectors=[], type_arguments=None), name=result)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=VisitResult, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=COMPLETE, postfix_operators=[], prefix_operators=[], qualifier=VisitResult, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=ACCEPT, postfix_operators=[], prefix_operators=[], qualifier=VisitResult, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=visitContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=callback, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=visitRows, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=visitDataChildren, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]))]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SEVERE, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[]), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=log, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=facesContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=popComponentFromEL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=visitRows, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=facesContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=oldRowKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setRowKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=facesContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=restoreOrigValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SEVERE, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[]), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=log, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None)]))], label=None, resources=None) return[literal[false]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[visitTree] operator[SEP] identifier[VisitContext] identifier[visitContext] , identifier[VisitCallback] identifier[callback] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[isVisitable] operator[SEP] identifier[visitContext] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[FacesContext] identifier[facesContext] operator[=] identifier[visitContext] operator[SEP] identifier[getFacesContext] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[visitRows] operator[=] identifier[requiresRowIteration] operator[SEP] identifier[visitContext] operator[SEP] operator[SEP] identifier[Integer] identifier[oldRowKey] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[visitRows] operator[SEP] { identifier[oldRowKey] operator[=] identifier[getRowKey] operator[SEP] operator[SEP] operator[SEP] identifier[setRowKey] operator[SEP] identifier[facesContext] , Other[null] operator[SEP] operator[SEP] } identifier[pushComponentToEL] operator[SEP] identifier[facesContext] , Other[null] operator[SEP] operator[SEP] Keyword[try] { identifier[VisitResult] identifier[result] operator[=] identifier[visitContext] operator[SEP] identifier[invokeVisitCallback] operator[SEP] Keyword[this] , identifier[callback] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[==] identifier[VisitResult] operator[SEP] identifier[COMPLETE] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] operator[SEP] identifier[result] operator[==] identifier[VisitResult] operator[SEP] identifier[ACCEPT] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[visitDataChildren] operator[SEP] identifier[visitContext] , identifier[callback] , identifier[visitRows] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[SEVERE] , identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } Keyword[finally] { identifier[popComponentFromEL] operator[SEP] identifier[facesContext] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[visitRows] operator[SEP] { Keyword[try] { identifier[setRowKey] operator[SEP] identifier[facesContext] , identifier[oldRowKey] operator[SEP] operator[SEP] identifier[restoreOrigValue] operator[SEP] identifier[facesContext] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[SEVERE] , identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } } } Keyword[return] literal[boolean] operator[SEP] }
public void setScriptFormat(String newScriptFormat) { String oldScriptFormat = scriptFormat; scriptFormat = newScriptFormat; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, DroolsPackage.ON_ENTRY_SCRIPT_TYPE__SCRIPT_FORMAT, oldScriptFormat, scriptFormat)); }
class class_name[name] begin[{] method[setScriptFormat, return_type[void], modifier[public], parameter[newScriptFormat]] begin[{] local_variable[type[String], oldScriptFormat] assign[member[.scriptFormat], member[.newScriptFormat]] if[call[.eNotificationRequired, parameter[]]] begin[{] call[.eNotify, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=SET, postfix_operators=[], prefix_operators=[], qualifier=Notification, selectors=[]), MemberReference(member=ON_ENTRY_SCRIPT_TYPE__SCRIPT_FORMAT, postfix_operators=[], prefix_operators=[], qualifier=DroolsPackage, selectors=[]), MemberReference(member=oldScriptFormat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=scriptFormat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ENotificationImpl, sub_type=None))]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setScriptFormat] operator[SEP] identifier[String] identifier[newScriptFormat] operator[SEP] { identifier[String] identifier[oldScriptFormat] operator[=] identifier[scriptFormat] operator[SEP] identifier[scriptFormat] operator[=] identifier[newScriptFormat] operator[SEP] Keyword[if] operator[SEP] identifier[eNotificationRequired] operator[SEP] operator[SEP] operator[SEP] identifier[eNotify] operator[SEP] Keyword[new] identifier[ENotificationImpl] operator[SEP] Keyword[this] , identifier[Notification] operator[SEP] identifier[SET] , identifier[DroolsPackage] operator[SEP] identifier[ON_ENTRY_SCRIPT_TYPE__SCRIPT_FORMAT] , identifier[oldScriptFormat] , identifier[scriptFormat] operator[SEP] operator[SEP] operator[SEP] }
public void readDwgLayerV15(int[] data, int offset) throws Exception { int bitPos = offset; Vector v = DwgUtil.getBitLong(data, bitPos); bitPos = ((Integer)v.get(0)).intValue(); int numReactors = ((Integer)v.get(1)).intValue(); setNumReactors(numReactors); v = DwgUtil.getTextString(data, bitPos); bitPos = ((Integer)v.get(0)).intValue(); String name = (String)v.get(1); this.name = name; v = DwgUtil.testBit(data, bitPos); bitPos = ((Integer)v.get(0)).intValue(); boolean flag = ((Boolean)v.get(1)).booleanValue(); flag64 = flag; v = DwgUtil.getBitShort(data, bitPos); bitPos = ((Integer)v.get(0)).intValue(); int xrefplus1 = ((Integer)v.get(1)).intValue(); xRefPlus = xrefplus1; v = DwgUtil.testBit(data, bitPos); bitPos = ((Integer)v.get(0)).intValue(); boolean xdep = ((Boolean)v.get(1)).booleanValue(); this.xdep = xdep; v = DwgUtil.getBitShort(data, bitPos); bitPos = ((Integer)v.get(0)).intValue(); int flags = ((Integer)v.get(1)).intValue(); this.flags = flags; v = DwgUtil.getBitShort(data, bitPos); bitPos = ((Integer)v.get(0)).intValue(); int color = ((Integer)v.get(1)).intValue(); this.color = color; v = DwgUtil.getHandle(data, bitPos); bitPos = ((Integer)v.get(0)).intValue(); int[] handle = new int[v.size()-1]; for (int j=1;j<v.size();j++) { handle[j-1] = ((Integer)v.get(j)).intValue(); } Vector handleVect = new Vector(); for (int i=0;i<handle.length;i++) { handleVect.add(new Integer(handle[i])); } layerControlHandle = DwgUtil.handleBinToHandleInt(handleVect); for (int i=0;i<numReactors;i++) { v = DwgUtil.getHandle(data, bitPos); bitPos = ((Integer)v.get(0)).intValue(); handle = new int[v.size()-1]; for (int j=1;j<v.size();j++) { handle[j-1] = ((Integer)v.get(j)).intValue(); } } v = DwgUtil.getHandle(data, bitPos); bitPos = ((Integer)v.get(0)).intValue(); handle = new int[v.size()-1]; for (int j=1;j<v.size();j++) { handle[j-1] = ((Integer)v.get(j)).intValue(); } v = DwgUtil.getHandle(data, bitPos); bitPos = ((Integer)v.get(0)).intValue(); handle = new int[v.size()-1]; for (int j=1;j<v.size();j++) { handle[j-1] = ((Integer)v.get(j)).intValue(); } handleVect = new Vector(); for (int i=0;i<handle.length;i++) { handleVect.add(new Integer(handle[i])); } nullHandle = DwgUtil.handleBinToHandleInt(handleVect); v = DwgUtil.getHandle(data, bitPos); bitPos = ((Integer)v.get(0)).intValue(); handle = new int[v.size()-1]; for (int j=1;j<v.size();j++) { handle[j-1] = ((Integer)v.get(j)).intValue(); } handleVect = new Vector(); for (int i=0;i<handle.length;i++) { handleVect.add(new Integer(handle[i])); } plotstyleHandle = DwgUtil.handleBinToHandleInt(handleVect); v = DwgUtil.getHandle(data, bitPos); bitPos = ((Integer)v.get(0)).intValue(); handle = new int[v.size()-1]; for (int j=1;j<v.size();j++) { handle[j-1] = ((Integer)v.get(j)).intValue(); } handleVect = new Vector(); for (int i=0;i<handle.length;i++) { handleVect.add(new Integer(handle[i])); } linetypeHandle = DwgUtil.handleBinToHandleInt(handleVect); }
class class_name[name] begin[{] method[readDwgLayerV15, return_type[void], modifier[public], parameter[data, offset]] begin[{] local_variable[type[int], bitPos] local_variable[type[Vector], v] assign[member[.bitPos], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))] local_variable[type[int], numReactors] call[.setNumReactors, parameter[member[.numReactors]]] assign[member[.v], call[DwgUtil.getTextString, parameter[member[.data], member[.bitPos]]]] assign[member[.bitPos], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))] local_variable[type[String], name] assign[THIS[member[None.name]], member[.name]] assign[member[.v], call[DwgUtil.testBit, parameter[member[.data], member[.bitPos]]]] assign[member[.bitPos], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))] local_variable[type[boolean], flag] assign[member[.flag64], member[.flag]] assign[member[.v], call[DwgUtil.getBitShort, parameter[member[.data], member[.bitPos]]]] assign[member[.bitPos], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))] local_variable[type[int], xrefplus1] assign[member[.xRefPlus], member[.xrefplus1]] assign[member[.v], call[DwgUtil.testBit, parameter[member[.data], member[.bitPos]]]] assign[member[.bitPos], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))] local_variable[type[boolean], xdep] assign[THIS[member[None.xdep]], member[.xdep]] assign[member[.v], call[DwgUtil.getBitShort, parameter[member[.data], member[.bitPos]]]] assign[member[.bitPos], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))] local_variable[type[int], flags] assign[THIS[member[None.flags]], member[.flags]] assign[member[.v], call[DwgUtil.getBitShort, parameter[member[.data], member[.bitPos]]]] assign[member[.bitPos], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))] local_variable[type[int], color] assign[THIS[member[None.color]], member[.color]] assign[member[.v], call[DwgUtil.getHandle, parameter[member[.data], member[.bitPos]]]] assign[member[.bitPos], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))] local_variable[type[int], handle] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=handle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) local_variable[type[Vector], handleVect] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=handle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, 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=Integer, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=handleVect, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=handle, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) assign[member[.layerControlHandle], call[DwgUtil.handleBinToHandleInt, parameter[member[.handleVect]]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=bitPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getHandle, postfix_operators=[], prefix_operators=[], qualifier=DwgUtil, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=bitPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=handle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ArrayCreator(dimensions=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int))), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=handle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=numReactors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) assign[member[.v], call[DwgUtil.getHandle, parameter[member[.data], member[.bitPos]]]] assign[member[.bitPos], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))] assign[member[.handle], ArrayCreator(dimensions=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int))] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=handle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) assign[member[.v], call[DwgUtil.getHandle, parameter[member[.data], member[.bitPos]]]] assign[member[.bitPos], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))] assign[member[.handle], ArrayCreator(dimensions=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int))] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=handle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) assign[member[.handleVect], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Vector, sub_type=None))] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=handle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, 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=Integer, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=handleVect, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=handle, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) assign[member[.nullHandle], call[DwgUtil.handleBinToHandleInt, parameter[member[.handleVect]]]] assign[member[.v], call[DwgUtil.getHandle, parameter[member[.data], member[.bitPos]]]] assign[member[.bitPos], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))] assign[member[.handle], ArrayCreator(dimensions=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int))] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=handle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) assign[member[.handleVect], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Vector, sub_type=None))] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=handle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, 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=Integer, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=handleVect, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=handle, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) assign[member[.plotstyleHandle], call[DwgUtil.handleBinToHandleInt, parameter[member[.handleVect]]]] assign[member[.v], call[DwgUtil.getHandle, parameter[member[.data], member[.bitPos]]]] assign[member[.bitPos], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))] assign[member[.handle], ArrayCreator(dimensions=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int))] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=handle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) assign[member[.handleVect], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Vector, sub_type=None))] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=handle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, 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=Integer, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=handleVect, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=handle, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) assign[member[.linetypeHandle], call[DwgUtil.handleBinToHandleInt, parameter[member[.handleVect]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[readDwgLayerV15] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[data] , Keyword[int] identifier[offset] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[int] identifier[bitPos] operator[=] identifier[offset] operator[SEP] identifier[Vector] identifier[v] operator[=] identifier[DwgUtil] operator[SEP] identifier[getBitLong] operator[SEP] identifier[data] , identifier[bitPos] operator[SEP] operator[SEP] identifier[bitPos] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[numReactors] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] identifier[setNumReactors] operator[SEP] identifier[numReactors] operator[SEP] operator[SEP] identifier[v] operator[=] identifier[DwgUtil] operator[SEP] identifier[getTextString] operator[SEP] identifier[data] , identifier[bitPos] operator[SEP] operator[SEP] identifier[bitPos] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[name] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[name] operator[=] identifier[name] operator[SEP] identifier[v] operator[=] identifier[DwgUtil] operator[SEP] identifier[testBit] operator[SEP] identifier[data] , identifier[bitPos] operator[SEP] operator[SEP] identifier[bitPos] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[flag] operator[=] operator[SEP] operator[SEP] identifier[Boolean] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[booleanValue] operator[SEP] operator[SEP] operator[SEP] identifier[flag64] operator[=] identifier[flag] operator[SEP] identifier[v] operator[=] identifier[DwgUtil] operator[SEP] identifier[getBitShort] operator[SEP] identifier[data] , identifier[bitPos] operator[SEP] operator[SEP] identifier[bitPos] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[xrefplus1] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] identifier[xRefPlus] operator[=] identifier[xrefplus1] operator[SEP] identifier[v] operator[=] identifier[DwgUtil] operator[SEP] identifier[testBit] operator[SEP] identifier[data] , identifier[bitPos] operator[SEP] operator[SEP] identifier[bitPos] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[xdep] operator[=] operator[SEP] operator[SEP] identifier[Boolean] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[booleanValue] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[xdep] operator[=] identifier[xdep] operator[SEP] identifier[v] operator[=] identifier[DwgUtil] operator[SEP] identifier[getBitShort] operator[SEP] identifier[data] , identifier[bitPos] operator[SEP] operator[SEP] identifier[bitPos] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[flags] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[flags] operator[=] identifier[flags] operator[SEP] identifier[v] operator[=] identifier[DwgUtil] operator[SEP] identifier[getBitShort] operator[SEP] identifier[data] , identifier[bitPos] operator[SEP] operator[SEP] identifier[bitPos] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[color] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[color] operator[=] identifier[color] operator[SEP] identifier[v] operator[=] identifier[DwgUtil] operator[SEP] identifier[getHandle] operator[SEP] identifier[data] , identifier[bitPos] operator[SEP] operator[SEP] identifier[bitPos] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[handle] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[v] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[1] operator[SEP] identifier[j] operator[<] identifier[v] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[handle] operator[SEP] identifier[j] operator[-] Other[1] operator[SEP] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] } identifier[Vector] identifier[handleVect] operator[=] Keyword[new] identifier[Vector] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[handle] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[handleVect] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Integer] operator[SEP] identifier[handle] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[layerControlHandle] operator[=] identifier[DwgUtil] operator[SEP] identifier[handleBinToHandleInt] operator[SEP] identifier[handleVect] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[numReactors] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[v] operator[=] identifier[DwgUtil] operator[SEP] identifier[getHandle] operator[SEP] identifier[data] , identifier[bitPos] operator[SEP] operator[SEP] identifier[bitPos] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] identifier[handle] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[v] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[1] operator[SEP] identifier[j] operator[<] identifier[v] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[handle] operator[SEP] identifier[j] operator[-] Other[1] operator[SEP] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] } } identifier[v] operator[=] identifier[DwgUtil] operator[SEP] identifier[getHandle] operator[SEP] identifier[data] , identifier[bitPos] operator[SEP] operator[SEP] identifier[bitPos] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] identifier[handle] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[v] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[1] operator[SEP] identifier[j] operator[<] identifier[v] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[handle] operator[SEP] identifier[j] operator[-] Other[1] operator[SEP] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] } identifier[v] operator[=] identifier[DwgUtil] operator[SEP] identifier[getHandle] operator[SEP] identifier[data] , identifier[bitPos] operator[SEP] operator[SEP] identifier[bitPos] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] identifier[handle] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[v] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[1] operator[SEP] identifier[j] operator[<] identifier[v] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[handle] operator[SEP] identifier[j] operator[-] Other[1] operator[SEP] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] } identifier[handleVect] operator[=] Keyword[new] identifier[Vector] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[handle] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[handleVect] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Integer] operator[SEP] identifier[handle] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[nullHandle] operator[=] identifier[DwgUtil] operator[SEP] identifier[handleBinToHandleInt] operator[SEP] identifier[handleVect] operator[SEP] operator[SEP] identifier[v] operator[=] identifier[DwgUtil] operator[SEP] identifier[getHandle] operator[SEP] identifier[data] , identifier[bitPos] operator[SEP] operator[SEP] identifier[bitPos] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] identifier[handle] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[v] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[1] operator[SEP] identifier[j] operator[<] identifier[v] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[handle] operator[SEP] identifier[j] operator[-] Other[1] operator[SEP] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] } identifier[handleVect] operator[=] Keyword[new] identifier[Vector] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[handle] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[handleVect] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Integer] operator[SEP] identifier[handle] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[plotstyleHandle] operator[=] identifier[DwgUtil] operator[SEP] identifier[handleBinToHandleInt] operator[SEP] identifier[handleVect] operator[SEP] operator[SEP] identifier[v] operator[=] identifier[DwgUtil] operator[SEP] identifier[getHandle] operator[SEP] identifier[data] , identifier[bitPos] operator[SEP] operator[SEP] identifier[bitPos] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] identifier[handle] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[v] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[1] operator[SEP] identifier[j] operator[<] identifier[v] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[handle] operator[SEP] identifier[j] operator[-] Other[1] operator[SEP] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] } identifier[handleVect] operator[=] Keyword[new] identifier[Vector] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[handle] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[handleVect] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Integer] operator[SEP] identifier[handle] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[linetypeHandle] operator[=] identifier[DwgUtil] operator[SEP] identifier[handleBinToHandleInt] operator[SEP] identifier[handleVect] operator[SEP] operator[SEP] }
@Override public void sawOpcode(int seen) { Integer sawALOADReg = null; try { stack.precomputation(this); int pc = getPC(); nullGuards.remove(Integer.valueOf(pc)); clearEndOfLifeRegisters(); switch (seen) { case Const.IFNULL: { if (stack.getStackDepth() > 0) { OpcodeStack.Item itm = stack.getStackItem(0); int reg = itm.getRegisterNumber(); Integer target = Integer.valueOf(getBranchTarget()); if (reg >= 0) { int eol = Integer.MAX_VALUE; LocalVariableTable lvt = getMethod().getLocalVariableTable(); if (lvt != null) { LocalVariable lv = lvt.getLocalVariable(reg, pc); if (lv != null) { eol = pc + lv.getLength(); } } nullGuards.put(target, new NullGuard(reg, pc, eol, itm.getSignature())); } else { XField xf = itm.getXField(); Integer sourceFieldReg = (Integer) itm.getUserValue(); if ((xf != null) && (sourceFieldReg != null)) { nullGuards.put(target, new NullGuard(xf, sourceFieldReg.intValue(), pc, itm.getSignature())); } } } } break; case Const.ASTORE: case Const.ASTORE_0: case Const.ASTORE_1: case Const.ASTORE_2: case Const.ASTORE_3: { if (stack.getStackDepth() > 0) { OpcodeStack.Item itm = stack.getStackItem(0); if (!itm.isNull()) { NullGuard guard = findNullGuardWithRegister(RegisterUtils.getAStoreReg(this, seen)); if (guard != null) { bugReporter.reportBug(new BugInstance(this, BugType.SNG_SUSPICIOUS_NULL_LOCAL_GUARD.name(), NORMAL_PRIORITY).addClass(this) .addMethod(this).addSourceLine(this)); removeNullGuard(guard); } } } } break; case Const.ALOAD: case Const.ALOAD_0: case Const.ALOAD_1: case Const.ALOAD_2: case Const.ALOAD_3: { NullGuard guard = findNullGuardWithRegister(RegisterUtils.getALoadReg(this, seen)); if (guard != null) { removeNullGuard(guard); } sawALOADReg = Integer.valueOf(RegisterUtils.getALoadReg(this, seen)); } break; case Const.PUTFIELD: { if (stack.getStackDepth() <= 1) { break; } OpcodeStack.Item itm = stack.getStackItem(0); if (itm.isNull()) { break; } XField xf = getXFieldOperand(); itm = stack.getStackItem(1); Integer fieldSourceReg = (Integer) itm.getUserValue(); if ((xf != null) && (fieldSourceReg != null)) { NullGuard guard = findNullGuardWithField(xf, fieldSourceReg.intValue()); if (guard != null) { bugReporter.reportBug(new BugInstance(this, BugType.SNG_SUSPICIOUS_NULL_FIELD_GUARD.name(), NORMAL_PRIORITY).addClass(this) .addMethod(this).addSourceLine(this)); removeNullGuard(guard); } } } break; case Const.GETFIELD: { if (stack.getStackDepth() > 0) { XField xf = getXFieldOperand(); OpcodeStack.Item itm = stack.getStackItem(0); Integer fieldSourceReg = (Integer) itm.getUserValue(); if ((xf != null) && (fieldSourceReg != null)) { NullGuard guard = findNullGuardWithField(xf, fieldSourceReg.intValue()); if (guard != null) { removeNullGuard(guard); } else { sawALOADReg = (Integer) itm.getUserValue(); } } } } break; case Const.IFEQ: case Const.IFNE: case Const.IFLT: case Const.IFGE: case Const.IFGT: case Const.IFLE: case Const.IF_ICMPEQ: case Const.IF_ICMPNE: case Const.IF_ICMPLT: case Const.IF_ICMPGE: case Const.IF_ICMPGT: case Const.IF_ICMPLE: case Const.IF_ACMPEQ: case Const.IF_ACMPNE: case Const.GOTO: case Const.GOTO_W: case Const.IFNONNULL: nullGuards.clear(); break; default: break; } } finally { stack.sawOpcode(this, seen); if ((sawALOADReg != null) && (stack.getStackDepth() > 0)) { OpcodeStack.Item itm = stack.getStackItem(0); itm.setUserValue(sawALOADReg); } } }
class class_name[name] begin[{] method[sawOpcode, return_type[void], modifier[public], parameter[seen]] begin[{] local_variable[type[Integer], sawALOADReg] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=precomputation, postfix_operators=[], prefix_operators=[], qualifier=stack, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getPC, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=pc)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=pc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None)], member=remove, postfix_operators=[], prefix_operators=[], qualifier=nullGuards, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=clearEndOfLifeRegisters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=IFNULL, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[])], statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getStackDepth, postfix_operators=[], prefix_operators=[], qualifier=stack, 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=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=getStackItem, postfix_operators=[], prefix_operators=[], qualifier=stack, selectors=[], type_arguments=None), name=itm)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=OpcodeStack, sub_type=ReferenceType(arguments=None, dimensions=None, name=Item, sub_type=None))), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getRegisterNumber, postfix_operators=[], prefix_operators=[], qualifier=itm, selectors=[], type_arguments=None), name=reg)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getBranchTarget, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), name=target)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=reg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getXField, postfix_operators=[], prefix_operators=[], qualifier=itm, selectors=[], type_arguments=None), name=xf)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=XField, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=getUserValue, postfix_operators=[], prefix_operators=[], qualifier=itm, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None)), name=sourceFieldReg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=xf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MemberReference(member=sourceFieldReg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=target, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MemberReference(member=xf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=intValue, postfix_operators=[], prefix_operators=[], qualifier=sourceFieldReg, selectors=[], type_arguments=None), MemberReference(member=pc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getSignature, postfix_operators=[], prefix_operators=[], qualifier=itm, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NullGuard, sub_type=None))], member=put, postfix_operators=[], prefix_operators=[], qualifier=nullGuards, selectors=[], type_arguments=None), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=MAX_VALUE, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[]), name=eol)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getMethod, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getLocalVariableTable, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=lvt)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=LocalVariableTable, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=lvt, 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=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=reg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getLocalVariable, postfix_operators=[], prefix_operators=[], qualifier=lvt, selectors=[], type_arguments=None), name=lv)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=LocalVariable, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=lv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=eol, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=pc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getLength, postfix_operators=[], prefix_operators=[], qualifier=lv, selectors=[], type_arguments=None), operator=+)), label=None)]))])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=target, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MemberReference(member=reg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=eol, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getSignature, postfix_operators=[], prefix_operators=[], qualifier=itm, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NullGuard, sub_type=None))], member=put, postfix_operators=[], prefix_operators=[], qualifier=nullGuards, selectors=[], type_arguments=None), label=None)]))]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=ASTORE, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[]), MemberReference(member=ASTORE_0, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[]), MemberReference(member=ASTORE_1, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[]), MemberReference(member=ASTORE_2, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[]), MemberReference(member=ASTORE_3, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[])], statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getStackDepth, postfix_operators=[], prefix_operators=[], qualifier=stack, 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=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=getStackItem, postfix_operators=[], prefix_operators=[], qualifier=stack, selectors=[], type_arguments=None), name=itm)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=OpcodeStack, sub_type=ReferenceType(arguments=None, dimensions=None, name=Item, sub_type=None))), IfStatement(condition=MethodInvocation(arguments=[], member=isNull, postfix_operators=[], prefix_operators=['!'], qualifier=itm, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=seen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAStoreReg, postfix_operators=[], prefix_operators=[], qualifier=RegisterUtils, selectors=[], type_arguments=None)], member=findNullGuardWithRegister, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=guard)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NullGuard, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=guard, 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=[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MethodInvocation(arguments=[], member=name, postfix_operators=[], prefix_operators=[], qualifier=BugType.SNG_SUSPICIOUS_NULL_LOCAL_GUARD, selectors=[], type_arguments=None), MemberReference(member=NORMAL_PRIORITY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=addClass, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=addMethod, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=addSourceLine, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=BugInstance, sub_type=None))], member=reportBug, postfix_operators=[], prefix_operators=[], qualifier=bugReporter, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=guard, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeNullGuard, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]))]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=ALOAD, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[]), MemberReference(member=ALOAD_0, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[]), MemberReference(member=ALOAD_1, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[]), MemberReference(member=ALOAD_2, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[]), MemberReference(member=ALOAD_3, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[])], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=seen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getALoadReg, postfix_operators=[], prefix_operators=[], qualifier=RegisterUtils, selectors=[], type_arguments=None)], member=findNullGuardWithRegister, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=guard)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NullGuard, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=guard, 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=guard, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeNullGuard, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=sawALOADReg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=seen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getALoadReg, postfix_operators=[], prefix_operators=[], qualifier=RegisterUtils, selectors=[], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None)), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=PUTFIELD, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[])], statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getStackDepth, postfix_operators=[], prefix_operators=[], qualifier=stack, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=<=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=getStackItem, postfix_operators=[], prefix_operators=[], qualifier=stack, selectors=[], type_arguments=None), name=itm)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=OpcodeStack, sub_type=ReferenceType(arguments=None, dimensions=None, name=Item, sub_type=None))), IfStatement(condition=MethodInvocation(arguments=[], member=isNull, postfix_operators=[], prefix_operators=[], qualifier=itm, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getXFieldOperand, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=xf)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=XField, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=itm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=getStackItem, postfix_operators=[], prefix_operators=[], qualifier=stack, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=getUserValue, postfix_operators=[], prefix_operators=[], qualifier=itm, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None)), name=fieldSourceReg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=xf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MemberReference(member=fieldSourceReg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=xf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=intValue, postfix_operators=[], prefix_operators=[], qualifier=fieldSourceReg, selectors=[], type_arguments=None)], member=findNullGuardWithField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=guard)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NullGuard, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=guard, 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=[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MethodInvocation(arguments=[], member=name, postfix_operators=[], prefix_operators=[], qualifier=BugType.SNG_SUSPICIOUS_NULL_FIELD_GUARD, selectors=[], type_arguments=None), MemberReference(member=NORMAL_PRIORITY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=addClass, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=addMethod, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=addSourceLine, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=BugInstance, sub_type=None))], member=reportBug, postfix_operators=[], prefix_operators=[], qualifier=bugReporter, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=guard, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeNullGuard, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=GETFIELD, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[])], statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getStackDepth, postfix_operators=[], prefix_operators=[], qualifier=stack, 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=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getXFieldOperand, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=xf)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=XField, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=getStackItem, postfix_operators=[], prefix_operators=[], qualifier=stack, selectors=[], type_arguments=None), name=itm)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=OpcodeStack, sub_type=ReferenceType(arguments=None, dimensions=None, name=Item, sub_type=None))), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=getUserValue, postfix_operators=[], prefix_operators=[], qualifier=itm, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None)), name=fieldSourceReg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=xf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MemberReference(member=fieldSourceReg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=xf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=intValue, postfix_operators=[], prefix_operators=[], qualifier=fieldSourceReg, selectors=[], type_arguments=None)], member=findNullGuardWithField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=guard)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NullGuard, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=guard, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=sawALOADReg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[], member=getUserValue, postfix_operators=[], prefix_operators=[], qualifier=itm, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=guard, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeNullGuard, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]))]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=IFEQ, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[]), MemberReference(member=IFNE, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[]), MemberReference(member=IFLT, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[]), MemberReference(member=IFGE, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[]), MemberReference(member=IFGT, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[]), MemberReference(member=IFLE, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[]), MemberReference(member=IF_ICMPEQ, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[]), MemberReference(member=IF_ICMPNE, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[]), MemberReference(member=IF_ICMPLT, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[]), MemberReference(member=IF_ICMPGE, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[]), MemberReference(member=IF_ICMPGT, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[]), MemberReference(member=IF_ICMPLE, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[]), MemberReference(member=IF_ACMPEQ, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[]), MemberReference(member=IF_ACMPNE, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[]), MemberReference(member=GOTO, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[]), MemberReference(member=GOTO_W, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[]), MemberReference(member=IFNONNULL, postfix_operators=[], prefix_operators=[], qualifier=Const, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=clear, postfix_operators=[], prefix_operators=[], qualifier=nullGuards, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=None, label=None)])], expression=MemberReference(member=seen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=seen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sawOpcode, postfix_operators=[], prefix_operators=[], qualifier=stack, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=sawALOADReg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getStackDepth, postfix_operators=[], prefix_operators=[], qualifier=stack, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), operator=&&), else_statement=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=0)], member=getStackItem, postfix_operators=[], prefix_operators=[], qualifier=stack, selectors=[], type_arguments=None), name=itm)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=OpcodeStack, sub_type=ReferenceType(arguments=None, dimensions=None, name=Item, sub_type=None))), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sawALOADReg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setUserValue, postfix_operators=[], prefix_operators=[], qualifier=itm, selectors=[], type_arguments=None), label=None)]))], label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[sawOpcode] operator[SEP] Keyword[int] identifier[seen] operator[SEP] { identifier[Integer] identifier[sawALOADReg] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[stack] operator[SEP] identifier[precomputation] operator[SEP] Keyword[this] operator[SEP] operator[SEP] Keyword[int] identifier[pc] operator[=] identifier[getPC] operator[SEP] operator[SEP] operator[SEP] identifier[nullGuards] operator[SEP] identifier[remove] operator[SEP] identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[pc] operator[SEP] operator[SEP] operator[SEP] identifier[clearEndOfLifeRegisters] operator[SEP] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[seen] operator[SEP] { Keyword[case] identifier[Const] operator[SEP] identifier[IFNULL] operator[:] { Keyword[if] operator[SEP] identifier[stack] operator[SEP] identifier[getStackDepth] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[OpcodeStack] operator[SEP] identifier[Item] identifier[itm] operator[=] identifier[stack] operator[SEP] identifier[getStackItem] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[int] identifier[reg] operator[=] identifier[itm] operator[SEP] identifier[getRegisterNumber] operator[SEP] operator[SEP] operator[SEP] identifier[Integer] identifier[target] operator[=] identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[getBranchTarget] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[reg] operator[>=] Other[0] operator[SEP] { Keyword[int] identifier[eol] operator[=] identifier[Integer] operator[SEP] identifier[MAX_VALUE] operator[SEP] identifier[LocalVariableTable] identifier[lvt] operator[=] identifier[getMethod] operator[SEP] operator[SEP] operator[SEP] identifier[getLocalVariableTable] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[lvt] operator[!=] Other[null] operator[SEP] { identifier[LocalVariable] identifier[lv] operator[=] identifier[lvt] operator[SEP] identifier[getLocalVariable] operator[SEP] identifier[reg] , identifier[pc] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[lv] operator[!=] Other[null] operator[SEP] { identifier[eol] operator[=] identifier[pc] operator[+] identifier[lv] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[SEP] } } identifier[nullGuards] operator[SEP] identifier[put] operator[SEP] identifier[target] , Keyword[new] identifier[NullGuard] operator[SEP] identifier[reg] , identifier[pc] , identifier[eol] , identifier[itm] operator[SEP] identifier[getSignature] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[XField] identifier[xf] operator[=] identifier[itm] operator[SEP] identifier[getXField] operator[SEP] operator[SEP] operator[SEP] identifier[Integer] identifier[sourceFieldReg] operator[=] operator[SEP] identifier[Integer] operator[SEP] identifier[itm] operator[SEP] identifier[getUserValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[xf] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[sourceFieldReg] operator[!=] Other[null] operator[SEP] operator[SEP] { identifier[nullGuards] operator[SEP] identifier[put] operator[SEP] identifier[target] , Keyword[new] identifier[NullGuard] operator[SEP] identifier[xf] , identifier[sourceFieldReg] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] , identifier[pc] , identifier[itm] operator[SEP] identifier[getSignature] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } } Keyword[break] operator[SEP] Keyword[case] identifier[Const] operator[SEP] identifier[ASTORE] operator[:] Keyword[case] identifier[Const] operator[SEP] identifier[ASTORE_0] operator[:] Keyword[case] identifier[Const] operator[SEP] identifier[ASTORE_1] operator[:] Keyword[case] identifier[Const] operator[SEP] identifier[ASTORE_2] operator[:] Keyword[case] identifier[Const] operator[SEP] identifier[ASTORE_3] operator[:] { Keyword[if] operator[SEP] identifier[stack] operator[SEP] identifier[getStackDepth] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[OpcodeStack] operator[SEP] identifier[Item] identifier[itm] operator[=] identifier[stack] operator[SEP] identifier[getStackItem] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[itm] operator[SEP] identifier[isNull] operator[SEP] operator[SEP] operator[SEP] { identifier[NullGuard] identifier[guard] operator[=] identifier[findNullGuardWithRegister] operator[SEP] identifier[RegisterUtils] operator[SEP] identifier[getAStoreReg] operator[SEP] Keyword[this] , identifier[seen] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[guard] operator[!=] Other[null] operator[SEP] { identifier[bugReporter] operator[SEP] identifier[reportBug] operator[SEP] Keyword[new] identifier[BugInstance] operator[SEP] Keyword[this] , identifier[BugType] operator[SEP] identifier[SNG_SUSPICIOUS_NULL_LOCAL_GUARD] operator[SEP] identifier[name] operator[SEP] operator[SEP] , identifier[NORMAL_PRIORITY] operator[SEP] operator[SEP] identifier[addClass] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[addMethod] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[addSourceLine] operator[SEP] Keyword[this] operator[SEP] operator[SEP] operator[SEP] identifier[removeNullGuard] operator[SEP] identifier[guard] operator[SEP] operator[SEP] } } } } Keyword[break] operator[SEP] Keyword[case] identifier[Const] operator[SEP] identifier[ALOAD] operator[:] Keyword[case] identifier[Const] operator[SEP] identifier[ALOAD_0] operator[:] Keyword[case] identifier[Const] operator[SEP] identifier[ALOAD_1] operator[:] Keyword[case] identifier[Const] operator[SEP] identifier[ALOAD_2] operator[:] Keyword[case] identifier[Const] operator[SEP] identifier[ALOAD_3] operator[:] { identifier[NullGuard] identifier[guard] operator[=] identifier[findNullGuardWithRegister] operator[SEP] identifier[RegisterUtils] operator[SEP] identifier[getALoadReg] operator[SEP] Keyword[this] , identifier[seen] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[guard] operator[!=] Other[null] operator[SEP] { identifier[removeNullGuard] operator[SEP] identifier[guard] operator[SEP] operator[SEP] } identifier[sawALOADReg] operator[=] identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[RegisterUtils] operator[SEP] identifier[getALoadReg] operator[SEP] Keyword[this] , identifier[seen] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[Const] operator[SEP] identifier[PUTFIELD] operator[:] { Keyword[if] operator[SEP] identifier[stack] operator[SEP] identifier[getStackDepth] operator[SEP] operator[SEP] operator[<=] Other[1] operator[SEP] { Keyword[break] operator[SEP] } identifier[OpcodeStack] operator[SEP] identifier[Item] identifier[itm] operator[=] identifier[stack] operator[SEP] identifier[getStackItem] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[itm] operator[SEP] identifier[isNull] operator[SEP] operator[SEP] operator[SEP] { Keyword[break] operator[SEP] } identifier[XField] identifier[xf] operator[=] identifier[getXFieldOperand] operator[SEP] operator[SEP] operator[SEP] identifier[itm] operator[=] identifier[stack] operator[SEP] identifier[getStackItem] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[Integer] identifier[fieldSourceReg] operator[=] operator[SEP] identifier[Integer] operator[SEP] identifier[itm] operator[SEP] identifier[getUserValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[xf] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[fieldSourceReg] operator[!=] Other[null] operator[SEP] operator[SEP] { identifier[NullGuard] identifier[guard] operator[=] identifier[findNullGuardWithField] operator[SEP] identifier[xf] , identifier[fieldSourceReg] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[guard] operator[!=] Other[null] operator[SEP] { identifier[bugReporter] operator[SEP] identifier[reportBug] operator[SEP] Keyword[new] identifier[BugInstance] operator[SEP] Keyword[this] , identifier[BugType] operator[SEP] identifier[SNG_SUSPICIOUS_NULL_FIELD_GUARD] operator[SEP] identifier[name] operator[SEP] operator[SEP] , identifier[NORMAL_PRIORITY] operator[SEP] operator[SEP] identifier[addClass] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[addMethod] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[addSourceLine] operator[SEP] Keyword[this] operator[SEP] operator[SEP] operator[SEP] identifier[removeNullGuard] operator[SEP] identifier[guard] operator[SEP] operator[SEP] } } } Keyword[break] operator[SEP] Keyword[case] identifier[Const] operator[SEP] identifier[GETFIELD] operator[:] { Keyword[if] operator[SEP] identifier[stack] operator[SEP] identifier[getStackDepth] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[XField] identifier[xf] operator[=] identifier[getXFieldOperand] operator[SEP] operator[SEP] operator[SEP] identifier[OpcodeStack] operator[SEP] identifier[Item] identifier[itm] operator[=] identifier[stack] operator[SEP] identifier[getStackItem] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[Integer] identifier[fieldSourceReg] operator[=] operator[SEP] identifier[Integer] operator[SEP] identifier[itm] operator[SEP] identifier[getUserValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[xf] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[fieldSourceReg] operator[!=] Other[null] operator[SEP] operator[SEP] { identifier[NullGuard] identifier[guard] operator[=] identifier[findNullGuardWithField] operator[SEP] identifier[xf] , identifier[fieldSourceReg] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[guard] operator[!=] Other[null] operator[SEP] { identifier[removeNullGuard] operator[SEP] identifier[guard] operator[SEP] operator[SEP] } Keyword[else] { identifier[sawALOADReg] operator[=] operator[SEP] identifier[Integer] operator[SEP] identifier[itm] operator[SEP] identifier[getUserValue] operator[SEP] operator[SEP] operator[SEP] } } } } Keyword[break] operator[SEP] Keyword[case] identifier[Const] operator[SEP] identifier[IFEQ] operator[:] Keyword[case] identifier[Const] operator[SEP] identifier[IFNE] operator[:] Keyword[case] identifier[Const] operator[SEP] identifier[IFLT] operator[:] Keyword[case] identifier[Const] operator[SEP] identifier[IFGE] operator[:] Keyword[case] identifier[Const] operator[SEP] identifier[IFGT] operator[:] Keyword[case] identifier[Const] operator[SEP] identifier[IFLE] operator[:] Keyword[case] identifier[Const] operator[SEP] identifier[IF_ICMPEQ] operator[:] Keyword[case] identifier[Const] operator[SEP] identifier[IF_ICMPNE] operator[:] Keyword[case] identifier[Const] operator[SEP] identifier[IF_ICMPLT] operator[:] Keyword[case] identifier[Const] operator[SEP] identifier[IF_ICMPGE] operator[:] Keyword[case] identifier[Const] operator[SEP] identifier[IF_ICMPGT] operator[:] Keyword[case] identifier[Const] operator[SEP] identifier[IF_ICMPLE] operator[:] Keyword[case] identifier[Const] operator[SEP] identifier[IF_ACMPEQ] operator[:] Keyword[case] identifier[Const] operator[SEP] identifier[IF_ACMPNE] operator[:] Keyword[case] identifier[Const] operator[SEP] identifier[GOTO] operator[:] Keyword[case] identifier[Const] operator[SEP] identifier[GOTO_W] operator[:] Keyword[case] identifier[Const] operator[SEP] identifier[IFNONNULL] operator[:] identifier[nullGuards] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[break] operator[SEP] } } Keyword[finally] { identifier[stack] operator[SEP] identifier[sawOpcode] operator[SEP] Keyword[this] , identifier[seen] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[sawALOADReg] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[stack] operator[SEP] identifier[getStackDepth] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] operator[SEP] { identifier[OpcodeStack] operator[SEP] identifier[Item] identifier[itm] operator[=] identifier[stack] operator[SEP] identifier[getStackItem] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[itm] operator[SEP] identifier[setUserValue] operator[SEP] identifier[sawALOADReg] operator[SEP] operator[SEP] } } }
public int ENgetnodeindex( String id ) throws EpanetException { int[] index = new int[1]; int error = epanet.ENgetnodeindex(id, index); checkError(error); return index[0]; }
class class_name[name] begin[{] method[ENgetnodeindex, return_type[type[int]], modifier[public], parameter[id]] begin[{] local_variable[type[int], index] local_variable[type[int], error] call[.checkError, parameter[member[.error]]] return[member[.index]] end[}] END[}]
Keyword[public] Keyword[int] identifier[ENgetnodeindex] operator[SEP] identifier[String] identifier[id] operator[SEP] Keyword[throws] identifier[EpanetException] { Keyword[int] operator[SEP] operator[SEP] identifier[index] operator[=] Keyword[new] Keyword[int] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[int] identifier[error] operator[=] identifier[epanet] operator[SEP] identifier[ENgetnodeindex] operator[SEP] identifier[id] , identifier[index] operator[SEP] operator[SEP] identifier[checkError] operator[SEP] identifier[error] operator[SEP] operator[SEP] Keyword[return] identifier[index] operator[SEP] Other[0] operator[SEP] operator[SEP] }
public Criteria near(Point location, @Nullable Distance distance) { Assert.notNull(location, "Location must not be 'null' for near criteria."); assertPositiveDistanceValue(distance); predicates.add( new Predicate(OperationKey.NEAR, new Object[] { location, distance != null ? distance : new Distance(0) })); return this; }
class class_name[name] begin[{] method[near, return_type[type[Criteria]], modifier[public], parameter[location, distance]] begin[{] call[Assert.notNull, parameter[member[.location], literal["Location must not be 'null' for near criteria."]]] call[.assertPositiveDistanceValue, parameter[member[.distance]]] call[predicates.add, parameter[ClassCreator(arguments=[MemberReference(member=NEAR, postfix_operators=[], prefix_operators=[], qualifier=OperationKey, selectors=[]), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=location, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=distance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Distance, sub_type=None)), if_true=MemberReference(member=distance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Predicate, sub_type=None))]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[Criteria] identifier[near] operator[SEP] identifier[Point] identifier[location] , annotation[@] identifier[Nullable] identifier[Distance] identifier[distance] operator[SEP] { identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] identifier[location] , literal[String] operator[SEP] operator[SEP] identifier[assertPositiveDistanceValue] operator[SEP] identifier[distance] operator[SEP] operator[SEP] identifier[predicates] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Predicate] operator[SEP] identifier[OperationKey] operator[SEP] identifier[NEAR] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[location] , identifier[distance] operator[!=] Other[null] operator[?] identifier[distance] operator[:] Keyword[new] identifier[Distance] operator[SEP] Other[0] operator[SEP] } operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public CreateTableRequest addFamily(String familyId, GCRule gcRule) { Preconditions.checkNotNull(familyId); tableRequest.putColumnFamilies( familyId, ColumnFamily.newBuilder().setGcRule(gcRule.toProto()).build()); return this; }
class class_name[name] begin[{] method[addFamily, return_type[type[CreateTableRequest]], modifier[public], parameter[familyId, gcRule]] begin[{] call[Preconditions.checkNotNull, parameter[member[.familyId]]] call[tableRequest.putColumnFamilies, parameter[member[.familyId], call[ColumnFamily.newBuilder, parameter[]]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[CreateTableRequest] identifier[addFamily] operator[SEP] identifier[String] identifier[familyId] , identifier[GCRule] identifier[gcRule] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[familyId] operator[SEP] operator[SEP] identifier[tableRequest] operator[SEP] identifier[putColumnFamilies] operator[SEP] identifier[familyId] , identifier[ColumnFamily] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setGcRule] operator[SEP] identifier[gcRule] operator[SEP] identifier[toProto] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
protected void handleGreedyEntityProblem(WstxInputSource input) throws XMLStreamException { String top = mElementStack.isEmpty() ? "[ROOT]" : mElementStack.getTopElementDesc(); throwParseError("Improper GE/element nesting: entity &" +input.getEntityId()+" contains closing tag for <"+top+">"); }
class class_name[name] begin[{] method[handleGreedyEntityProblem, return_type[void], modifier[protected], parameter[input]] begin[{] local_variable[type[String], top] call[.throwParseError, parameter[binary_operation[binary_operation[binary_operation[binary_operation[literal["Improper GE/element nesting: entity &"], +, call[input.getEntityId, parameter[]]], +, literal[" contains closing tag for <"]], +, member[.top]], +, literal[">"]]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[handleGreedyEntityProblem] operator[SEP] identifier[WstxInputSource] identifier[input] operator[SEP] Keyword[throws] identifier[XMLStreamException] { identifier[String] identifier[top] operator[=] identifier[mElementStack] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[?] literal[String] operator[:] identifier[mElementStack] operator[SEP] identifier[getTopElementDesc] operator[SEP] operator[SEP] operator[SEP] identifier[throwParseError] operator[SEP] literal[String] operator[+] identifier[input] operator[SEP] identifier[getEntityId] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[top] operator[+] literal[String] operator[SEP] operator[SEP] }
private static <MessageType extends MessageLite> boolean parseUnknownField( FieldSet<ExtensionDescriptor> extensions, MessageType defaultInstance, CodedInputStream input, ExtensionRegistryLite extensionRegistry, int tag) throws IOException { int wireType = WireFormat.getTagWireType(tag); int fieldNumber = WireFormat.getTagFieldNumber(tag); GeneratedExtension<MessageType, ?> extension = extensionRegistry.findLiteExtensionByNumber( defaultInstance, fieldNumber); boolean unknown = false; boolean packed = false; if (extension == null) { unknown = true; // Unknown field. } else if (wireType == FieldSet.getWireFormatForFieldType( extension.descriptor.getLiteType(), false /* isPacked */)) { packed = false; // Normal, unpacked value. } else if (extension.descriptor.isRepeated && extension.descriptor.type.isPackable() && wireType == FieldSet.getWireFormatForFieldType( extension.descriptor.getLiteType(), true /* isPacked */)) { packed = true; // Packed value. } else { unknown = true; // Wrong wire type. } if (unknown) { // Unknown field or wrong wire type. Skip. return input.skipField(tag); } if (packed) { int length = input.readRawVarint32(); int limit = input.pushLimit(length); if (extension.descriptor.getLiteType() == WireFormat.FieldType.ENUM) { while (input.getBytesUntilLimit() > 0) { int rawValue = input.readEnum(); Object value = extension.descriptor.getEnumType().findValueByNumber(rawValue); if (value == null) { // If the number isn't recognized as a valid value for this // enum, drop it (don't even add it to unknownFields). return true; } extensions.addRepeatedField(extension.descriptor, value); } } else { while (input.getBytesUntilLimit() > 0) { Object value = FieldSet.readPrimitiveField(input, extension.descriptor.getLiteType()); extensions.addRepeatedField(extension.descriptor, value); } } input.popLimit(limit); } else { Object value; switch (extension.descriptor.getLiteJavaType()) { case MESSAGE: { MessageLite.Builder subBuilder = null; if (!extension.descriptor.isRepeated()) { MessageLite existingValue = (MessageLite) extensions.getField(extension.descriptor); if (existingValue != null) { subBuilder = existingValue.toBuilder(); } } if (subBuilder == null) { subBuilder = extension.messageDefaultInstance.newBuilderForType(); } if (extension.descriptor.getLiteType() == WireFormat.FieldType.GROUP) { input.readGroup(extension.getNumber(), subBuilder, extensionRegistry); } else { input.readMessage(subBuilder, extensionRegistry); } value = subBuilder.build(); break; } case ENUM: int rawValue = input.readEnum(); value = extension.descriptor.getEnumType() .findValueByNumber(rawValue); // If the number isn't recognized as a valid value for this enum, // drop it. if (value == null) { return true; } break; default: value = FieldSet.readPrimitiveField(input, extension.descriptor.getLiteType()); break; } if (extension.descriptor.isRepeated()) { extensions.addRepeatedField(extension.descriptor, value); } else { extensions.setField(extension.descriptor, value); } } return true; }
class class_name[name] begin[{] method[parseUnknownField, return_type[type[boolean]], modifier[private static], parameter[extensions, defaultInstance, input, extensionRegistry, tag]] begin[{] local_variable[type[int], wireType] local_variable[type[int], fieldNumber] local_variable[type[GeneratedExtension], extension] local_variable[type[boolean], unknown] local_variable[type[boolean], packed] if[binary_operation[member[.extension], ==, literal[null]]] begin[{] assign[member[.unknown], literal[true]] else begin[{] if[binary_operation[member[.wireType], ==, call[FieldSet.getWireFormatForFieldType, parameter[call[extension.descriptor.getLiteType, parameter[]], literal[false]]]]] begin[{] assign[member[.packed], literal[false]] else begin[{] if[binary_operation[binary_operation[member[extension.descriptor.isRepeated], &&, call[extension.descriptor.type.isPackable, parameter[]]], &&, binary_operation[member[.wireType], ==, call[FieldSet.getWireFormatForFieldType, parameter[call[extension.descriptor.getLiteType, parameter[]], literal[true]]]]]] begin[{] assign[member[.packed], literal[true]] else begin[{] assign[member[.unknown], literal[true]] end[}] end[}] end[}] if[member[.unknown]] begin[{] return[call[input.skipField, parameter[member[.tag]]]] else begin[{] None end[}] if[member[.packed]] begin[{] local_variable[type[int], length] local_variable[type[int], limit] if[binary_operation[call[extension.descriptor.getLiteType, parameter[]], ==, member[WireFormat.FieldType.ENUM]]] begin[{] while[binary_operation[call[input.getBytesUntilLimit, parameter[]], >, literal[0]]] begin[{] local_variable[type[int], rawValue] local_variable[type[Object], value] if[binary_operation[member[.value], ==, literal[null]]] begin[{] return[literal[true]] else begin[{] None end[}] call[extensions.addRepeatedField, parameter[member[extension.descriptor], member[.value]]] end[}] else begin[{] while[binary_operation[call[input.getBytesUntilLimit, parameter[]], >, literal[0]]] begin[{] local_variable[type[Object], value] call[extensions.addRepeatedField, parameter[member[extension.descriptor], member[.value]]] end[}] end[}] call[input.popLimit, parameter[member[.limit]]] else begin[{] local_variable[type[Object], value] SwitchStatement(cases=[SwitchStatementCase(case=['MESSAGE'], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=subBuilder)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MessageLite, sub_type=ReferenceType(arguments=None, dimensions=None, name=Builder, sub_type=None))), IfStatement(condition=MethodInvocation(arguments=[], member=isRepeated, postfix_operators=[], prefix_operators=['!'], qualifier=extension.descriptor, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=descriptor, postfix_operators=[], prefix_operators=[], qualifier=extension, selectors=[])], member=getField, postfix_operators=[], prefix_operators=[], qualifier=extensions, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=MessageLite, sub_type=None)), name=existingValue)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MessageLite, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=existingValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=subBuilder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=toBuilder, postfix_operators=[], prefix_operators=[], qualifier=existingValue, selectors=[], type_arguments=None)), label=None)]))])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=subBuilder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=subBuilder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=newBuilderForType, postfix_operators=[], prefix_operators=[], qualifier=extension.messageDefaultInstance, selectors=[], type_arguments=None)), label=None)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getLiteType, postfix_operators=[], prefix_operators=[], qualifier=extension.descriptor, selectors=[], type_arguments=None), operandr=MemberReference(member=GROUP, postfix_operators=[], prefix_operators=[], qualifier=WireFormat.FieldType, selectors=[]), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=subBuilder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=extensionRegistry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readMessage, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNumber, postfix_operators=[], prefix_operators=[], qualifier=extension, selectors=[], type_arguments=None), MemberReference(member=subBuilder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=extensionRegistry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readGroup, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=build, postfix_operators=[], prefix_operators=[], qualifier=subBuilder, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=['ENUM'], statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=readEnum, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=rawValue)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getEnumType, postfix_operators=[], prefix_operators=[], qualifier=extension.descriptor, selectors=[MethodInvocation(arguments=[MemberReference(member=rawValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=findValueByNumber, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=value, 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=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getLiteType, postfix_operators=[], prefix_operators=[], qualifier=extension.descriptor, selectors=[], type_arguments=None)], member=readPrimitiveField, postfix_operators=[], prefix_operators=[], qualifier=FieldSet, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)])], expression=MethodInvocation(arguments=[], member=getLiteJavaType, postfix_operators=[], prefix_operators=[], qualifier=extension.descriptor, selectors=[], type_arguments=None), label=None) if[call[extension.descriptor.isRepeated, parameter[]]] begin[{] call[extensions.addRepeatedField, parameter[member[extension.descriptor], member[.value]]] else begin[{] call[extensions.setField, parameter[member[extension.descriptor], member[.value]]] end[}] end[}] return[literal[true]] end[}] END[}]
Keyword[private] Keyword[static] operator[<] identifier[MessageType] Keyword[extends] identifier[MessageLite] operator[>] Keyword[boolean] identifier[parseUnknownField] operator[SEP] identifier[FieldSet] operator[<] identifier[ExtensionDescriptor] operator[>] identifier[extensions] , identifier[MessageType] identifier[defaultInstance] , identifier[CodedInputStream] identifier[input] , identifier[ExtensionRegistryLite] identifier[extensionRegistry] , Keyword[int] identifier[tag] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[int] identifier[wireType] operator[=] identifier[WireFormat] operator[SEP] identifier[getTagWireType] operator[SEP] identifier[tag] operator[SEP] operator[SEP] Keyword[int] identifier[fieldNumber] operator[=] identifier[WireFormat] operator[SEP] identifier[getTagFieldNumber] operator[SEP] identifier[tag] operator[SEP] operator[SEP] identifier[GeneratedExtension] operator[<] identifier[MessageType] , operator[?] operator[>] identifier[extension] operator[=] identifier[extensionRegistry] operator[SEP] identifier[findLiteExtensionByNumber] operator[SEP] identifier[defaultInstance] , identifier[fieldNumber] operator[SEP] operator[SEP] Keyword[boolean] identifier[unknown] operator[=] literal[boolean] operator[SEP] Keyword[boolean] identifier[packed] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[extension] operator[==] Other[null] operator[SEP] { identifier[unknown] operator[=] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[wireType] operator[==] identifier[FieldSet] operator[SEP] identifier[getWireFormatForFieldType] operator[SEP] identifier[extension] operator[SEP] identifier[descriptor] operator[SEP] identifier[getLiteType] operator[SEP] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] { identifier[packed] operator[=] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[extension] operator[SEP] identifier[descriptor] operator[SEP] identifier[isRepeated] operator[&&] identifier[extension] operator[SEP] identifier[descriptor] operator[SEP] identifier[type] operator[SEP] identifier[isPackable] operator[SEP] operator[SEP] operator[&&] identifier[wireType] operator[==] identifier[FieldSet] operator[SEP] identifier[getWireFormatForFieldType] operator[SEP] identifier[extension] operator[SEP] identifier[descriptor] operator[SEP] identifier[getLiteType] operator[SEP] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] { identifier[packed] operator[=] literal[boolean] operator[SEP] } Keyword[else] { identifier[unknown] operator[=] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[unknown] operator[SEP] { Keyword[return] identifier[input] operator[SEP] identifier[skipField] operator[SEP] identifier[tag] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[packed] operator[SEP] { Keyword[int] identifier[length] operator[=] identifier[input] operator[SEP] identifier[readRawVarint32] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[limit] operator[=] identifier[input] operator[SEP] identifier[pushLimit] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[extension] operator[SEP] identifier[descriptor] operator[SEP] identifier[getLiteType] operator[SEP] operator[SEP] operator[==] identifier[WireFormat] operator[SEP] identifier[FieldType] operator[SEP] identifier[ENUM] operator[SEP] { Keyword[while] operator[SEP] identifier[input] operator[SEP] identifier[getBytesUntilLimit] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { Keyword[int] identifier[rawValue] operator[=] identifier[input] operator[SEP] identifier[readEnum] operator[SEP] operator[SEP] operator[SEP] identifier[Object] identifier[value] operator[=] identifier[extension] operator[SEP] identifier[descriptor] operator[SEP] identifier[getEnumType] operator[SEP] operator[SEP] operator[SEP] identifier[findValueByNumber] operator[SEP] identifier[rawValue] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[extensions] operator[SEP] identifier[addRepeatedField] operator[SEP] identifier[extension] operator[SEP] identifier[descriptor] , identifier[value] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[while] operator[SEP] identifier[input] operator[SEP] identifier[getBytesUntilLimit] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[Object] identifier[value] operator[=] identifier[FieldSet] operator[SEP] identifier[readPrimitiveField] operator[SEP] identifier[input] , identifier[extension] operator[SEP] identifier[descriptor] operator[SEP] identifier[getLiteType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[extensions] operator[SEP] identifier[addRepeatedField] operator[SEP] identifier[extension] operator[SEP] identifier[descriptor] , identifier[value] operator[SEP] operator[SEP] } } identifier[input] operator[SEP] identifier[popLimit] operator[SEP] identifier[limit] operator[SEP] operator[SEP] } Keyword[else] { identifier[Object] identifier[value] operator[SEP] Keyword[switch] operator[SEP] identifier[extension] operator[SEP] identifier[descriptor] operator[SEP] identifier[getLiteJavaType] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] identifier[MESSAGE] operator[:] { identifier[MessageLite] operator[SEP] identifier[Builder] identifier[subBuilder] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[extension] operator[SEP] identifier[descriptor] operator[SEP] identifier[isRepeated] operator[SEP] operator[SEP] operator[SEP] { identifier[MessageLite] identifier[existingValue] operator[=] operator[SEP] identifier[MessageLite] operator[SEP] identifier[extensions] operator[SEP] identifier[getField] operator[SEP] identifier[extension] operator[SEP] identifier[descriptor] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[existingValue] operator[!=] Other[null] operator[SEP] { identifier[subBuilder] operator[=] identifier[existingValue] operator[SEP] identifier[toBuilder] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[subBuilder] operator[==] Other[null] operator[SEP] { identifier[subBuilder] operator[=] identifier[extension] operator[SEP] identifier[messageDefaultInstance] operator[SEP] identifier[newBuilderForType] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[extension] operator[SEP] identifier[descriptor] operator[SEP] identifier[getLiteType] operator[SEP] operator[SEP] operator[==] identifier[WireFormat] operator[SEP] identifier[FieldType] operator[SEP] identifier[GROUP] operator[SEP] { identifier[input] operator[SEP] identifier[readGroup] operator[SEP] identifier[extension] operator[SEP] identifier[getNumber] operator[SEP] operator[SEP] , identifier[subBuilder] , identifier[extensionRegistry] operator[SEP] operator[SEP] } Keyword[else] { identifier[input] operator[SEP] identifier[readMessage] operator[SEP] identifier[subBuilder] , identifier[extensionRegistry] operator[SEP] operator[SEP] } identifier[value] operator[=] identifier[subBuilder] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } Keyword[case] identifier[ENUM] operator[:] Keyword[int] identifier[rawValue] operator[=] identifier[input] operator[SEP] identifier[readEnum] operator[SEP] operator[SEP] operator[SEP] identifier[value] operator[=] identifier[extension] operator[SEP] identifier[descriptor] operator[SEP] identifier[getEnumType] operator[SEP] operator[SEP] operator[SEP] identifier[findValueByNumber] operator[SEP] identifier[rawValue] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[break] operator[SEP] Keyword[default] operator[:] identifier[value] operator[=] identifier[FieldSet] operator[SEP] identifier[readPrimitiveField] operator[SEP] identifier[input] , identifier[extension] operator[SEP] identifier[descriptor] operator[SEP] identifier[getLiteType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } Keyword[if] operator[SEP] identifier[extension] operator[SEP] identifier[descriptor] operator[SEP] identifier[isRepeated] operator[SEP] operator[SEP] operator[SEP] { identifier[extensions] operator[SEP] identifier[addRepeatedField] operator[SEP] identifier[extension] operator[SEP] identifier[descriptor] , identifier[value] operator[SEP] operator[SEP] } Keyword[else] { identifier[extensions] operator[SEP] identifier[setField] operator[SEP] identifier[extension] operator[SEP] identifier[descriptor] , identifier[value] operator[SEP] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
@Override protected void perform(final Wave wave) { // The old node is the one that exists into the parent container (or null if none) Node oldNode = waveBean(wave).hideModel() == null ? null : waveBean(wave).hideModel().node(); if (oldNode == null) { final ObservableList<Node> parentContainer = waveBean(wave).childrenPlaceHolder(); oldNode = parentContainer.size() > 1 ? parentContainer.get(waveBean(wave).childrenPlaceHolder().size() - 1) : null; } // The new node is the one create by PrepareModelCommand final Node newNode = waveBean(wave).showModel() == null ? null : waveBean(wave).showModel().node(); if (oldNode != null || newNode != null) { final ParallelTransition animation = new ParallelTransition(); if (oldNode != null) { final FadeTransition ft = new FadeTransition(); ft.setDuration(Duration.millis(600)); ft.setNode(oldNode); ft.setFromValue(1.0); ft.setToValue(0.0); animation.getChildren().add(ft); } if (newNode != null) { final FadeTransition ft = new FadeTransition(); ft.setDuration(Duration.millis(600)); ft.setNode(newNode); ft.setFromValue(0.0); ft.setToValue(1.0); animation.getChildren().add(ft); } final Node oldNodeLink = oldNode; // When animation is finished remove the hidden node from the stack to let only one node at the same time animation.setOnFinished(event -> { if (oldNodeLink != null) { // remove the old nod from the stack to hide it waveBean(wave).childrenPlaceHolder().remove(oldNodeLink); LOGGER.info("Remove " + oldNodeLink.toString() + " from stack container"); } // FIXME do it in the right way waveBean(wave).showModel().doShowView(wave); }); animation.playFromStart(); } }
class class_name[name] begin[{] method[perform, return_type[void], modifier[protected], parameter[wave]] begin[{] local_variable[type[Node], oldNode] if[binary_operation[member[.oldNode], ==, literal[null]]] begin[{] local_variable[type[ObservableList], parentContainer] assign[member[.oldNode], TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=parentContainer, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=wave, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=waveBean, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=childrenPlaceHolder, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=size, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=get, postfix_operators=[], prefix_operators=[], qualifier=parentContainer, selectors=[], type_arguments=None))] else begin[{] None end[}] local_variable[type[Node], newNode] if[binary_operation[binary_operation[member[.oldNode], !=, literal[null]], ||, binary_operation[member[.newNode], !=, literal[null]]]] begin[{] local_variable[type[ParallelTransition], animation] if[binary_operation[member[.oldNode], !=, literal[null]]] begin[{] local_variable[type[FadeTransition], ft] call[ft.setDuration, parameter[call[Duration.millis, parameter[literal[600]]]]] call[ft.setNode, parameter[member[.oldNode]]] call[ft.setFromValue, parameter[literal[1.0]]] call[ft.setToValue, parameter[literal[0.0]]] call[animation.getChildren, parameter[]] else begin[{] None end[}] if[binary_operation[member[.newNode], !=, literal[null]]] begin[{] local_variable[type[FadeTransition], ft] call[ft.setDuration, parameter[call[Duration.millis, parameter[literal[600]]]]] call[ft.setNode, parameter[member[.newNode]]] call[ft.setFromValue, parameter[literal[0.0]]] call[ft.setToValue, parameter[literal[1.0]]] call[animation.getChildren, parameter[]] else begin[{] None end[}] local_variable[type[Node], oldNodeLink] call[animation.setOnFinished, parameter[LambdaExpression(body=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=oldNodeLink, 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=wave, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=waveBean, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=childrenPlaceHolder, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=oldNodeLink, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Remove "), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=oldNodeLink, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" from stack container"), operator=+)], member=info, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=wave, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=waveBean, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=showModel, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=wave, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=doShowView, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], parameters=[MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]] call[animation.playFromStart, parameter[]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[perform] operator[SEP] Keyword[final] identifier[Wave] identifier[wave] operator[SEP] { identifier[Node] identifier[oldNode] operator[=] identifier[waveBean] operator[SEP] identifier[wave] operator[SEP] operator[SEP] identifier[hideModel] operator[SEP] operator[SEP] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[waveBean] operator[SEP] identifier[wave] operator[SEP] operator[SEP] identifier[hideModel] operator[SEP] operator[SEP] operator[SEP] identifier[node] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[oldNode] operator[==] Other[null] operator[SEP] { Keyword[final] identifier[ObservableList] operator[<] identifier[Node] operator[>] identifier[parentContainer] operator[=] identifier[waveBean] operator[SEP] identifier[wave] operator[SEP] operator[SEP] identifier[childrenPlaceHolder] operator[SEP] operator[SEP] operator[SEP] identifier[oldNode] operator[=] identifier[parentContainer] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[1] operator[?] identifier[parentContainer] operator[SEP] identifier[get] operator[SEP] identifier[waveBean] operator[SEP] identifier[wave] operator[SEP] operator[SEP] identifier[childrenPlaceHolder] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[:] Other[null] operator[SEP] } Keyword[final] identifier[Node] identifier[newNode] operator[=] identifier[waveBean] operator[SEP] identifier[wave] operator[SEP] operator[SEP] identifier[showModel] operator[SEP] operator[SEP] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[waveBean] operator[SEP] identifier[wave] operator[SEP] operator[SEP] identifier[showModel] operator[SEP] operator[SEP] operator[SEP] identifier[node] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[oldNode] operator[!=] Other[null] operator[||] identifier[newNode] operator[!=] Other[null] operator[SEP] { Keyword[final] identifier[ParallelTransition] identifier[animation] operator[=] Keyword[new] identifier[ParallelTransition] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[oldNode] operator[!=] Other[null] operator[SEP] { Keyword[final] identifier[FadeTransition] identifier[ft] operator[=] Keyword[new] identifier[FadeTransition] operator[SEP] operator[SEP] operator[SEP] identifier[ft] operator[SEP] identifier[setDuration] operator[SEP] identifier[Duration] operator[SEP] identifier[millis] operator[SEP] Other[600] operator[SEP] operator[SEP] operator[SEP] identifier[ft] operator[SEP] identifier[setNode] operator[SEP] identifier[oldNode] operator[SEP] operator[SEP] identifier[ft] operator[SEP] identifier[setFromValue] operator[SEP] literal[Float] operator[SEP] operator[SEP] identifier[ft] operator[SEP] identifier[setToValue] operator[SEP] literal[Float] operator[SEP] operator[SEP] identifier[animation] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[ft] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[newNode] operator[!=] Other[null] operator[SEP] { Keyword[final] identifier[FadeTransition] identifier[ft] operator[=] Keyword[new] identifier[FadeTransition] operator[SEP] operator[SEP] operator[SEP] identifier[ft] operator[SEP] identifier[setDuration] operator[SEP] identifier[Duration] operator[SEP] identifier[millis] operator[SEP] Other[600] operator[SEP] operator[SEP] operator[SEP] identifier[ft] operator[SEP] identifier[setNode] operator[SEP] identifier[newNode] operator[SEP] operator[SEP] identifier[ft] operator[SEP] identifier[setFromValue] operator[SEP] literal[Float] operator[SEP] operator[SEP] identifier[ft] operator[SEP] identifier[setToValue] operator[SEP] literal[Float] operator[SEP] operator[SEP] identifier[animation] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[ft] operator[SEP] operator[SEP] } Keyword[final] identifier[Node] identifier[oldNodeLink] operator[=] identifier[oldNode] operator[SEP] identifier[animation] operator[SEP] identifier[setOnFinished] operator[SEP] identifier[event] operator[->] { Keyword[if] operator[SEP] identifier[oldNodeLink] operator[!=] Other[null] operator[SEP] { identifier[waveBean] operator[SEP] identifier[wave] operator[SEP] operator[SEP] identifier[childrenPlaceHolder] operator[SEP] operator[SEP] operator[SEP] identifier[remove] operator[SEP] identifier[oldNodeLink] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[oldNodeLink] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[waveBean] operator[SEP] identifier[wave] operator[SEP] operator[SEP] identifier[showModel] operator[SEP] operator[SEP] operator[SEP] identifier[doShowView] operator[SEP] identifier[wave] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] identifier[animation] operator[SEP] identifier[playFromStart] operator[SEP] operator[SEP] operator[SEP] } }
public static Date evenMinuteDate (final Date date) { final Calendar c = PDTFactory.createCalendar (); c.setTime (date != null ? date : new Date ()); c.setLenient (true); c.set (Calendar.MINUTE, c.get (Calendar.MINUTE) + 1); c.set (Calendar.SECOND, 0); c.set (Calendar.MILLISECOND, 0); return c.getTime (); }
class class_name[name] begin[{] method[evenMinuteDate, return_type[type[Date]], modifier[public static], parameter[date]] begin[{] local_variable[type[Calendar], c] call[c.setTime, parameter[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=date, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=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)), if_true=MemberReference(member=date, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]] call[c.setLenient, parameter[literal[true]]] call[c.set, parameter[member[Calendar.MINUTE], binary_operation[call[c.get, parameter[member[Calendar.MINUTE]]], +, literal[1]]]] call[c.set, parameter[member[Calendar.SECOND], literal[0]]] call[c.set, parameter[member[Calendar.MILLISECOND], literal[0]]] return[call[c.getTime, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Date] identifier[evenMinuteDate] operator[SEP] Keyword[final] identifier[Date] identifier[date] operator[SEP] { Keyword[final] identifier[Calendar] identifier[c] operator[=] identifier[PDTFactory] operator[SEP] identifier[createCalendar] operator[SEP] operator[SEP] operator[SEP] identifier[c] operator[SEP] identifier[setTime] operator[SEP] identifier[date] operator[!=] Other[null] operator[?] identifier[date] operator[:] Keyword[new] identifier[Date] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[c] operator[SEP] identifier[setLenient] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[c] operator[SEP] identifier[set] operator[SEP] identifier[Calendar] operator[SEP] identifier[MINUTE] , identifier[c] operator[SEP] identifier[get] operator[SEP] identifier[Calendar] operator[SEP] identifier[MINUTE] operator[SEP] operator[+] Other[1] operator[SEP] operator[SEP] identifier[c] operator[SEP] identifier[set] operator[SEP] identifier[Calendar] operator[SEP] identifier[SECOND] , Other[0] operator[SEP] operator[SEP] identifier[c] operator[SEP] identifier[set] operator[SEP] identifier[Calendar] operator[SEP] identifier[MILLISECOND] , Other[0] operator[SEP] operator[SEP] Keyword[return] identifier[c] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[SEP] }
public static void normalizeColumns(final double[][] m1) { final int columndimension = getColumnDimensionality(m1); for(int col = 0; col < columndimension; col++) { double norm = 0.0; for(int row = 0; row < m1.length; row++) { final double v = m1[row][col]; norm += v * v; } if(norm > 0) { norm = FastMath.sqrt(norm); for(int row = 0; row < m1.length; row++) { m1[row][col] /= norm; } } } }
class class_name[name] begin[{] method[normalizeColumns, return_type[void], modifier[public static], parameter[m1]] begin[{] local_variable[type[int], columndimension] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.0), name=norm)], modifiers=set(), type=BasicType(dimensions=[], name=double)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=m1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=row, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=col, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=v)], modifiers={'final'}, type=BasicType(dimensions=[], name=double)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=norm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=row, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=m1, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=row)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=row, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=norm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=norm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=norm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sqrt, postfix_operators=[], prefix_operators=[], qualifier=FastMath, selectors=[], type_arguments=None)), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=m1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=row, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=col, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=/=, value=MemberReference(member=norm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=row, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=m1, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=row)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=row, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=col, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=columndimension, 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=col)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=col, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[normalizeColumns] operator[SEP] Keyword[final] Keyword[double] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[m1] operator[SEP] { Keyword[final] Keyword[int] identifier[columndimension] operator[=] identifier[getColumnDimensionality] operator[SEP] identifier[m1] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[col] operator[=] Other[0] operator[SEP] identifier[col] operator[<] identifier[columndimension] operator[SEP] identifier[col] operator[++] operator[SEP] { Keyword[double] identifier[norm] operator[=] literal[Float] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[row] operator[=] Other[0] operator[SEP] identifier[row] operator[<] identifier[m1] operator[SEP] identifier[length] operator[SEP] identifier[row] operator[++] operator[SEP] { Keyword[final] Keyword[double] identifier[v] operator[=] identifier[m1] operator[SEP] identifier[row] operator[SEP] operator[SEP] identifier[col] operator[SEP] operator[SEP] identifier[norm] operator[+=] identifier[v] operator[*] identifier[v] operator[SEP] } Keyword[if] operator[SEP] identifier[norm] operator[>] Other[0] operator[SEP] { identifier[norm] operator[=] identifier[FastMath] operator[SEP] identifier[sqrt] operator[SEP] identifier[norm] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[row] operator[=] Other[0] operator[SEP] identifier[row] operator[<] identifier[m1] operator[SEP] identifier[length] operator[SEP] identifier[row] operator[++] operator[SEP] { identifier[m1] operator[SEP] identifier[row] operator[SEP] operator[SEP] identifier[col] operator[SEP] operator[/=] identifier[norm] operator[SEP] } } } }
private static void createGridCellFilter(final String[] columnOrder, final Grid grid, final Class dataType) { if (columnOrder != null) { final GridCellFilter filter = new GridCellFilter(grid, dataType); for (final String column : columnOrder) { if (grid.getColumn(column) != null) { filter.setTextFilter(column, true, true); } } } }
class class_name[name] begin[{] method[createGridCellFilter, return_type[void], modifier[private static], parameter[columnOrder, grid, dataType]] begin[{] if[binary_operation[member[.columnOrder], !=, literal[null]]] begin[{] local_variable[type[GridCellFilter], filter] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=column, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getColumn, postfix_operators=[], prefix_operators=[], qualifier=grid, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=column, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setTextFilter, postfix_operators=[], prefix_operators=[], qualifier=filter, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=columnOrder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=column)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[createGridCellFilter] operator[SEP] Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[columnOrder] , Keyword[final] identifier[Grid] identifier[grid] , Keyword[final] identifier[Class] identifier[dataType] operator[SEP] { Keyword[if] operator[SEP] identifier[columnOrder] operator[!=] Other[null] operator[SEP] { Keyword[final] identifier[GridCellFilter] identifier[filter] operator[=] Keyword[new] identifier[GridCellFilter] operator[SEP] identifier[grid] , identifier[dataType] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[column] operator[:] identifier[columnOrder] operator[SEP] { Keyword[if] operator[SEP] identifier[grid] operator[SEP] identifier[getColumn] operator[SEP] identifier[column] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[filter] operator[SEP] identifier[setTextFilter] operator[SEP] identifier[column] , literal[boolean] , literal[boolean] operator[SEP] operator[SEP] } } } }
private void visitActionFieldList(ActionInsertFact afl) { String factType = afl.getFactType(); for (ActionFieldValue afv : afl.getFieldValues()) { InterpolationVariable var = new InterpolationVariable(afv.getValue(), afv.getType(), factType, afv.getField()); if (afv.getNature() == FieldNatureType.TYPE_TEMPLATE && !vars.containsKey(var)) { vars.put(var, vars.size()); } } }
class class_name[name] begin[{] method[visitActionFieldList, return_type[void], modifier[private], parameter[afl]] begin[{] local_variable[type[String], factType] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=afv, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=afv, selectors=[], type_arguments=None), MemberReference(member=factType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getField, postfix_operators=[], prefix_operators=[], qualifier=afv, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InterpolationVariable, sub_type=None)), name=var)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InterpolationVariable, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getNature, postfix_operators=[], prefix_operators=[], qualifier=afv, selectors=[], type_arguments=None), operandr=MemberReference(member=TYPE_TEMPLATE, postfix_operators=[], prefix_operators=[], qualifier=FieldNatureType, selectors=[]), operator===), operandr=MethodInvocation(arguments=[MemberReference(member=var, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=['!'], qualifier=vars, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=var, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=vars, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=vars, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getFieldValues, postfix_operators=[], prefix_operators=[], qualifier=afl, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=afv)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ActionFieldValue, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[visitActionFieldList] operator[SEP] identifier[ActionInsertFact] identifier[afl] operator[SEP] { identifier[String] identifier[factType] operator[=] identifier[afl] operator[SEP] identifier[getFactType] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ActionFieldValue] identifier[afv] operator[:] identifier[afl] operator[SEP] identifier[getFieldValues] operator[SEP] operator[SEP] operator[SEP] { identifier[InterpolationVariable] identifier[var] operator[=] Keyword[new] identifier[InterpolationVariable] operator[SEP] identifier[afv] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] , identifier[afv] operator[SEP] identifier[getType] operator[SEP] operator[SEP] , identifier[factType] , identifier[afv] operator[SEP] identifier[getField] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[afv] operator[SEP] identifier[getNature] operator[SEP] operator[SEP] operator[==] identifier[FieldNatureType] operator[SEP] identifier[TYPE_TEMPLATE] operator[&&] operator[!] identifier[vars] operator[SEP] identifier[containsKey] operator[SEP] identifier[var] operator[SEP] operator[SEP] { identifier[vars] operator[SEP] identifier[put] operator[SEP] identifier[var] , identifier[vars] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } }
@BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<Empty, ClusterOperationMetadata> deleteClusterAsync( DeleteClusterRequest request) { return deleteClusterOperationCallable().futureCall(request); }
class class_name[name] begin[{] method[deleteClusterAsync, return_type[type[OperationFuture]], modifier[final public], parameter[request]] begin[{] return[call[.deleteClusterOperationCallable, parameter[]]] end[}] END[}]
annotation[@] identifier[BetaApi] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[final] identifier[OperationFuture] operator[<] identifier[Empty] , identifier[ClusterOperationMetadata] operator[>] identifier[deleteClusterAsync] operator[SEP] identifier[DeleteClusterRequest] identifier[request] operator[SEP] { Keyword[return] identifier[deleteClusterOperationCallable] operator[SEP] operator[SEP] operator[SEP] identifier[futureCall] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public boolean isValidFile(RandomAccessFile raf) throws IOException { raf.seek(0); String test = raf.readString(MAGIC.length()); return test.equals(MAGIC); }
class class_name[name] begin[{] method[isValidFile, return_type[type[boolean]], modifier[public], parameter[raf]] begin[{] call[raf.seek, parameter[literal[0]]] local_variable[type[String], test] return[call[test.equals, parameter[member[.MAGIC]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isValidFile] operator[SEP] identifier[RandomAccessFile] identifier[raf] operator[SEP] Keyword[throws] identifier[IOException] { identifier[raf] operator[SEP] identifier[seek] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[String] identifier[test] operator[=] identifier[raf] operator[SEP] identifier[readString] operator[SEP] identifier[MAGIC] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[test] operator[SEP] identifier[equals] operator[SEP] identifier[MAGIC] operator[SEP] operator[SEP] }
@Override public GetTableResult getTable(GetTableRequest request) { request = beforeClientExecution(request); return executeGetTable(request); }
class class_name[name] begin[{] method[getTable, return_type[type[GetTableResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeGetTable, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[GetTableResult] identifier[getTable] operator[SEP] identifier[GetTableRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeGetTable] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
static Type fixTypeInJava6(Type type) { if (type instanceof GenericArrayType) { GenericArrayType gat = (GenericArrayType) type; Type componentType = gat.getGenericComponentType(); if (componentType instanceof Class) { return Array.newInstance((Class) componentType, 0).getClass(); } } return type; }
class class_name[name] begin[{] method[fixTypeInJava6, return_type[type[Type]], modifier[static], parameter[type]] begin[{] if[binary_operation[member[.type], instanceof, type[GenericArrayType]]] begin[{] local_variable[type[GenericArrayType], gat] local_variable[type[Type], componentType] if[binary_operation[member[.componentType], instanceof, type[Class]]] begin[{] return[call[Array.newInstance, parameter[Cast(expression=MemberReference(member=componentType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Class, sub_type=None)), literal[0]]]] else begin[{] None end[}] else begin[{] None end[}] return[member[.type]] end[}] END[}]
Keyword[static] identifier[Type] identifier[fixTypeInJava6] operator[SEP] identifier[Type] identifier[type] operator[SEP] { Keyword[if] operator[SEP] identifier[type] Keyword[instanceof] identifier[GenericArrayType] operator[SEP] { identifier[GenericArrayType] identifier[gat] operator[=] operator[SEP] identifier[GenericArrayType] operator[SEP] identifier[type] operator[SEP] identifier[Type] identifier[componentType] operator[=] identifier[gat] operator[SEP] identifier[getGenericComponentType] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[componentType] Keyword[instanceof] identifier[Class] operator[SEP] { Keyword[return] identifier[Array] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] identifier[Class] operator[SEP] identifier[componentType] , Other[0] operator[SEP] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[type] operator[SEP] }
public static AnimatedLabel createClassicSpinningLine(int speed) { AnimatedLabel animatedLabel = new AnimatedLabel("-"); animatedLabel.addFrame("\\"); animatedLabel.addFrame("|"); animatedLabel.addFrame("/"); animatedLabel.startAnimation(speed); return animatedLabel; }
class class_name[name] begin[{] method[createClassicSpinningLine, return_type[type[AnimatedLabel]], modifier[public static], parameter[speed]] begin[{] local_variable[type[AnimatedLabel], animatedLabel] call[animatedLabel.addFrame, parameter[literal["\\"]]] call[animatedLabel.addFrame, parameter[literal["|"]]] call[animatedLabel.addFrame, parameter[literal["/"]]] call[animatedLabel.startAnimation, parameter[member[.speed]]] return[member[.animatedLabel]] end[}] END[}]
Keyword[public] Keyword[static] identifier[AnimatedLabel] identifier[createClassicSpinningLine] operator[SEP] Keyword[int] identifier[speed] operator[SEP] { identifier[AnimatedLabel] identifier[animatedLabel] operator[=] Keyword[new] identifier[AnimatedLabel] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[animatedLabel] operator[SEP] identifier[addFrame] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[animatedLabel] operator[SEP] identifier[addFrame] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[animatedLabel] operator[SEP] identifier[addFrame] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[animatedLabel] operator[SEP] identifier[startAnimation] operator[SEP] identifier[speed] operator[SEP] operator[SEP] Keyword[return] identifier[animatedLabel] operator[SEP] }
public static String cloneContent(String source, GitService service, String comment) throws Exception { String rev = GitService.moveContentToBranch(source, service, service.getBranchName(), comment); service.push(false); return rev; }
class class_name[name] begin[{] method[cloneContent, return_type[type[String]], modifier[public static], parameter[source, service, comment]] begin[{] local_variable[type[String], rev] call[service.push, parameter[literal[false]]] return[member[.rev]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[cloneContent] operator[SEP] identifier[String] identifier[source] , identifier[GitService] identifier[service] , identifier[String] identifier[comment] operator[SEP] Keyword[throws] identifier[Exception] { identifier[String] identifier[rev] operator[=] identifier[GitService] operator[SEP] identifier[moveContentToBranch] operator[SEP] identifier[source] , identifier[service] , identifier[service] operator[SEP] identifier[getBranchName] operator[SEP] operator[SEP] , identifier[comment] operator[SEP] operator[SEP] identifier[service] operator[SEP] identifier[push] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[return] identifier[rev] operator[SEP] }
public static int getOrientation(InputStream is) { try { int length = moveToAPP1EXIF(is); if (length == 0) { return ExifInterface.ORIENTATION_UNDEFINED; } return TiffUtil.readOrientationFromTIFF(is, length); } catch (IOException ioe) { return ExifInterface.ORIENTATION_UNDEFINED; } }
class class_name[name] begin[{] method[getOrientation, return_type[type[int]], modifier[public static], parameter[is]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=moveToAPP1EXIF, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=length)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=ORIENTATION_UNDEFINED, postfix_operators=[], prefix_operators=[], qualifier=ExifInterface, selectors=[]), label=None)])), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readOrientationFromTIFF, postfix_operators=[], prefix_operators=[], qualifier=TiffUtil, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=MemberReference(member=ORIENTATION_UNDEFINED, postfix_operators=[], prefix_operators=[], qualifier=ExifInterface, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ioe, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[getOrientation] operator[SEP] identifier[InputStream] identifier[is] operator[SEP] { Keyword[try] { Keyword[int] identifier[length] operator[=] identifier[moveToAPP1EXIF] operator[SEP] identifier[is] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { Keyword[return] identifier[ExifInterface] operator[SEP] identifier[ORIENTATION_UNDEFINED] operator[SEP] } Keyword[return] identifier[TiffUtil] operator[SEP] identifier[readOrientationFromTIFF] operator[SEP] identifier[is] , identifier[length] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[ioe] operator[SEP] { Keyword[return] identifier[ExifInterface] operator[SEP] identifier[ORIENTATION_UNDEFINED] operator[SEP] } }
public DescribeEgressOnlyInternetGatewaysRequest withEgressOnlyInternetGatewayIds(String... egressOnlyInternetGatewayIds) { if (this.egressOnlyInternetGatewayIds == null) { setEgressOnlyInternetGatewayIds(new com.amazonaws.internal.SdkInternalList<String>(egressOnlyInternetGatewayIds.length)); } for (String ele : egressOnlyInternetGatewayIds) { this.egressOnlyInternetGatewayIds.add(ele); } return this; }
class class_name[name] begin[{] method[withEgressOnlyInternetGatewayIds, return_type[type[DescribeEgressOnlyInternetGatewaysRequest]], modifier[public], parameter[egressOnlyInternetGatewayIds]] begin[{] if[binary_operation[THIS[member[None.egressOnlyInternetGatewayIds]], ==, literal[null]]] begin[{] call[.setEgressOnlyInternetGatewayIds, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=egressOnlyInternetGatewayIds, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=amazonaws, sub_type=ReferenceType(arguments=None, dimensions=None, name=internal, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=egressOnlyInternetGatewayIds, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=egressOnlyInternetGatewayIds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ele)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[DescribeEgressOnlyInternetGatewaysRequest] identifier[withEgressOnlyInternetGatewayIds] operator[SEP] identifier[String] operator[...] identifier[egressOnlyInternetGatewayIds] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[egressOnlyInternetGatewayIds] operator[==] Other[null] operator[SEP] { identifier[setEgressOnlyInternetGatewayIds] operator[SEP] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[String] operator[>] operator[SEP] identifier[egressOnlyInternetGatewayIds] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[String] identifier[ele] operator[:] identifier[egressOnlyInternetGatewayIds] operator[SEP] { Keyword[this] operator[SEP] identifier[egressOnlyInternetGatewayIds] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public static byte[] copyToBytes(MemorySegment[] segments, int offset, int numBytes) { return copyToBytes(segments, offset, new byte[numBytes], 0, numBytes); }
class class_name[name] begin[{] method[copyToBytes, return_type[type[byte]], modifier[public static], parameter[segments, offset, numBytes]] begin[{] return[call[.copyToBytes, parameter[member[.segments], member[.offset], ArrayCreator(dimensions=[MemberReference(member=numBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte)), literal[0], member[.numBytes]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[copyToBytes] operator[SEP] identifier[MemorySegment] operator[SEP] operator[SEP] identifier[segments] , Keyword[int] identifier[offset] , Keyword[int] identifier[numBytes] operator[SEP] { Keyword[return] identifier[copyToBytes] operator[SEP] identifier[segments] , identifier[offset] , Keyword[new] Keyword[byte] operator[SEP] identifier[numBytes] operator[SEP] , Other[0] , identifier[numBytes] operator[SEP] operator[SEP] }
private void registerDirectory(Path dir) throws IOException { Files.walkFileTree(dir, new SimpleFileVisitor<Path>() { @Override public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException { WatchKey key = dir.register(watchService, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY); watchKeyToDirectory.put(key, dir); return FileVisitResult.CONTINUE; } }); }
class class_name[name] begin[{] method[registerDirectory, return_type[void], modifier[private], parameter[dir]] begin[{] call[Files.walkFileTree, parameter[member[.dir], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=watchService, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ENTRY_CREATE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ENTRY_DELETE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ENTRY_MODIFY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=register, postfix_operators=[], prefix_operators=[], qualifier=dir, selectors=[], type_arguments=None), name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=WatchKey, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=dir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=watchKeyToDirectory, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=CONTINUE, postfix_operators=[], prefix_operators=[], qualifier=FileVisitResult, selectors=[]), label=None)], documentation=None, modifiers={'public'}, name=preVisitDirectory, parameters=[FormalParameter(annotations=[], modifiers=set(), name=dir, type=ReferenceType(arguments=None, dimensions=[], name=Path, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=attrs, type=ReferenceType(arguments=None, dimensions=[], name=BasicFileAttributes, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=FileVisitResult, sub_type=None), throws=['IOException'], 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=Path, sub_type=None))], dimensions=None, name=SimpleFileVisitor, sub_type=None))]] end[}] END[}]
Keyword[private] Keyword[void] identifier[registerDirectory] operator[SEP] identifier[Path] identifier[dir] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Files] operator[SEP] identifier[walkFileTree] operator[SEP] identifier[dir] , Keyword[new] identifier[SimpleFileVisitor] operator[<] identifier[Path] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[FileVisitResult] identifier[preVisitDirectory] operator[SEP] identifier[Path] identifier[dir] , identifier[BasicFileAttributes] identifier[attrs] operator[SEP] Keyword[throws] identifier[IOException] { identifier[WatchKey] identifier[key] operator[=] identifier[dir] operator[SEP] identifier[register] operator[SEP] identifier[watchService] , identifier[ENTRY_CREATE] , identifier[ENTRY_DELETE] , identifier[ENTRY_MODIFY] operator[SEP] operator[SEP] identifier[watchKeyToDirectory] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[dir] operator[SEP] operator[SEP] Keyword[return] identifier[FileVisitResult] operator[SEP] identifier[CONTINUE] operator[SEP] } } operator[SEP] operator[SEP] }
@Override public Temporal addTo(Temporal temporal) { return temporal.plus(Period.of(0, months, days)).plus(Duration.ofNanos(nanoseconds)); }
class class_name[name] begin[{] method[addTo, return_type[type[Temporal]], modifier[public], parameter[temporal]] begin[{] return[call[temporal.plus, parameter[call[Period.of, parameter[literal[0], member[.months], member[.days]]]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Temporal] identifier[addTo] operator[SEP] identifier[Temporal] identifier[temporal] operator[SEP] { Keyword[return] identifier[temporal] operator[SEP] identifier[plus] operator[SEP] identifier[Period] operator[SEP] identifier[of] operator[SEP] Other[0] , identifier[months] , identifier[days] operator[SEP] operator[SEP] operator[SEP] identifier[plus] operator[SEP] identifier[Duration] operator[SEP] identifier[ofNanos] operator[SEP] identifier[nanoseconds] operator[SEP] operator[SEP] operator[SEP] }
public static List<InstanceStateChange> startInstances(final List<String> instanceIDs) { // pass any credentials as aws-mock does not authenticate them at all AWSCredentials credentials = new BasicAWSCredentials("foo", "bar"); AmazonEC2Client amazonEC2Client = new AmazonEC2Client(credentials); // the mock endpoint for ec2 which runs on your computer String ec2Endpoint = "http://localhost:8000/aws-mock/ec2-endpoint/"; amazonEC2Client.setEndpoint(ec2Endpoint); // send the start request with args as instance IDs to start existing instances StartInstancesRequest request = new StartInstancesRequest(); request.withInstanceIds(instanceIDs); StartInstancesResult result = amazonEC2Client.startInstances(request); return result.getStartingInstances(); }
class class_name[name] begin[{] method[startInstances, return_type[type[List]], modifier[public static], parameter[instanceIDs]] begin[{] local_variable[type[AWSCredentials], credentials] local_variable[type[AmazonEC2Client], amazonEC2Client] local_variable[type[String], ec2Endpoint] call[amazonEC2Client.setEndpoint, parameter[member[.ec2Endpoint]]] local_variable[type[StartInstancesRequest], request] call[request.withInstanceIds, parameter[member[.instanceIDs]]] local_variable[type[StartInstancesResult], result] return[call[result.getStartingInstances, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[InstanceStateChange] operator[>] identifier[startInstances] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[instanceIDs] operator[SEP] { identifier[AWSCredentials] identifier[credentials] operator[=] Keyword[new] identifier[BasicAWSCredentials] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[AmazonEC2Client] identifier[amazonEC2Client] operator[=] Keyword[new] identifier[AmazonEC2Client] operator[SEP] identifier[credentials] operator[SEP] operator[SEP] identifier[String] identifier[ec2Endpoint] operator[=] literal[String] operator[SEP] identifier[amazonEC2Client] operator[SEP] identifier[setEndpoint] operator[SEP] identifier[ec2Endpoint] operator[SEP] operator[SEP] identifier[StartInstancesRequest] identifier[request] operator[=] Keyword[new] identifier[StartInstancesRequest] operator[SEP] operator[SEP] operator[SEP] identifier[request] operator[SEP] identifier[withInstanceIds] operator[SEP] identifier[instanceIDs] operator[SEP] operator[SEP] identifier[StartInstancesResult] identifier[result] operator[=] identifier[amazonEC2Client] operator[SEP] identifier[startInstances] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] identifier[getStartingInstances] operator[SEP] operator[SEP] operator[SEP] }
private String stringId() throws RecognitionException { if ( input.LA( 1 ) == DRL5Lexer.ID ) { Token id = match( input, DRL5Lexer.ID, null, null, DroolsEditorType.IDENTIFIER ); if ( state.failed ) return null; return id.getText(); } else if ( input.LA( 1 ) == DRL5Lexer.STRING ) { Token id = match( input, DRL5Lexer.STRING, null, null, DroolsEditorType.IDENTIFIER ); if ( state.failed ) return null; return StringUtils.unescapeJava( safeStripStringDelimiters( id.getText() ) ); } else { throw new MismatchedTokenException( DRL5Lexer.ID, input ); } }
class class_name[name] begin[{] method[stringId, return_type[type[String]], modifier[private], parameter[]] begin[{] if[binary_operation[call[input.LA, parameter[literal[1]]], ==, member[DRL5Lexer.ID]]] begin[{] local_variable[type[Token], id] if[member[state.failed]] begin[{] return[literal[null]] else begin[{] None end[}] return[call[id.getText, parameter[]]] else begin[{] if[binary_operation[call[input.LA, parameter[literal[1]]], ==, member[DRL5Lexer.STRING]]] begin[{] local_variable[type[Token], id] if[member[state.failed]] begin[{] return[literal[null]] else begin[{] None end[}] return[call[StringUtils.unescapeJava, parameter[call[.safeStripStringDelimiters, parameter[call[id.getText, parameter[]]]]]]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=ID, postfix_operators=[], prefix_operators=[], qualifier=DRL5Lexer, selectors=[]), MemberReference(member=input, 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=MismatchedTokenException, sub_type=None)), label=None) end[}] end[}] end[}] END[}]
Keyword[private] identifier[String] identifier[stringId] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { Keyword[if] operator[SEP] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[==] identifier[DRL5Lexer] operator[SEP] identifier[ID] operator[SEP] { identifier[Token] identifier[id] operator[=] identifier[match] operator[SEP] identifier[input] , identifier[DRL5Lexer] operator[SEP] identifier[ID] , Other[null] , Other[null] , identifier[DroolsEditorType] operator[SEP] identifier[IDENTIFIER] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[return] identifier[id] operator[SEP] identifier[getText] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[==] identifier[DRL5Lexer] operator[SEP] identifier[STRING] operator[SEP] { identifier[Token] identifier[id] operator[=] identifier[match] operator[SEP] identifier[input] , identifier[DRL5Lexer] operator[SEP] identifier[STRING] , Other[null] , Other[null] , identifier[DroolsEditorType] operator[SEP] identifier[IDENTIFIER] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[return] identifier[StringUtils] operator[SEP] identifier[unescapeJava] operator[SEP] identifier[safeStripStringDelimiters] operator[SEP] identifier[id] operator[SEP] identifier[getText] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[MismatchedTokenException] operator[SEP] identifier[DRL5Lexer] operator[SEP] identifier[ID] , identifier[input] operator[SEP] operator[SEP] } }
private MethodSpec buildNewSerializerMethod( JClassType mappedTypeClass ) throws UnableToCompleteException { JSerializerType type; try { type = getJsonSerializerFromType( mappedTypeClass ); } catch ( UnsupportedTypeException e ) { logger.log( Type.ERROR, "Cannot generate mapper due to previous errors : " + e.getMessage() ); throw new UnableToCompleteException(); } return MethodSpec.methodBuilder( "newSerializer" ) .addModifiers( Modifier.PROTECTED ) .addAnnotation( Override.class ) .returns( ParameterizedTypeName.get( ClassName.get( JsonSerializer.class ), DEFAULT_WILDCARD ) ) .addStatement( "return $L", type.getInstance() ) .build(); }
class class_name[name] begin[{] method[buildNewSerializerMethod, return_type[type[MethodSpec]], modifier[private], parameter[mappedTypeClass]] begin[{] local_variable[type[JSerializerType], type] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=mappedTypeClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getJsonSerializerFromType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ERROR, postfix_operators=[], prefix_operators=[], qualifier=Type, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot generate mapper due to previous errors : "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+)], member=log, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UnableToCompleteException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['UnsupportedTypeException']))], finally_block=None, label=None, resources=None) return[call[MethodSpec.methodBuilder, parameter[literal["newSerializer"]]]] end[}] END[}]
Keyword[private] identifier[MethodSpec] identifier[buildNewSerializerMethod] operator[SEP] identifier[JClassType] identifier[mappedTypeClass] operator[SEP] Keyword[throws] identifier[UnableToCompleteException] { identifier[JSerializerType] identifier[type] operator[SEP] Keyword[try] { identifier[type] operator[=] identifier[getJsonSerializerFromType] operator[SEP] identifier[mappedTypeClass] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[UnsupportedTypeException] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[log] operator[SEP] identifier[Type] operator[SEP] identifier[ERROR] , literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[UnableToCompleteException] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[MethodSpec] operator[SEP] identifier[methodBuilder] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[addModifiers] operator[SEP] identifier[Modifier] operator[SEP] identifier[PROTECTED] operator[SEP] operator[SEP] identifier[addAnnotation] operator[SEP] identifier[Override] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[returns] operator[SEP] identifier[ParameterizedTypeName] operator[SEP] identifier[get] operator[SEP] identifier[ClassName] operator[SEP] identifier[get] operator[SEP] identifier[JsonSerializer] operator[SEP] Keyword[class] operator[SEP] , identifier[DEFAULT_WILDCARD] operator[SEP] operator[SEP] operator[SEP] identifier[addStatement] operator[SEP] literal[String] , identifier[type] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] }
public static String buildQueryString( boolean distinct, String tables, String[] columns, String where, String groupBy, String having, String orderBy, String limit) { if (TextUtils.isEmpty(groupBy) && !TextUtils.isEmpty(having)) { throw new IllegalArgumentException( "HAVING clauses are only permitted when using a groupBy clause"); } if (!TextUtils.isEmpty(limit) && !sLimitPattern.matcher(limit).matches()) { throw new IllegalArgumentException("invalid LIMIT clauses:" + limit); } StringBuilder query = new StringBuilder(120); query.append("SELECT "); if (distinct) { query.append("DISTINCT "); } if (columns != null && columns.length != 0) { appendColumns(query, columns); } else { query.append("* "); } query.append("FROM "); query.append(tables); appendClause(query, " WHERE ", where); appendClause(query, " GROUP BY ", groupBy); appendClause(query, " HAVING ", having); appendClause(query, " ORDER BY ", orderBy); appendClause(query, " LIMIT ", limit); return query.toString(); }
class class_name[name] begin[{] method[buildQueryString, return_type[type[String]], modifier[public static], parameter[distinct, tables, columns, where, groupBy, having, orderBy, limit]] begin[{] if[binary_operation[call[TextUtils.isEmpty, parameter[member[.groupBy]]], &&, call[TextUtils.isEmpty, parameter[member[.having]]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="HAVING clauses are only permitted when using a groupBy clause")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[call[TextUtils.isEmpty, parameter[member[.limit]]], &&, call[sLimitPattern.matcher, parameter[member[.limit]]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="invalid LIMIT clauses:"), operandr=MemberReference(member=limit, 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[}] local_variable[type[StringBuilder], query] call[query.append, parameter[literal["SELECT "]]] if[member[.distinct]] begin[{] call[query.append, parameter[literal["DISTINCT "]]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.columns], !=, literal[null]], &&, binary_operation[member[columns.length], !=, literal[0]]]] begin[{] call[.appendColumns, parameter[member[.query], member[.columns]]] else begin[{] call[query.append, parameter[literal["* "]]] end[}] call[query.append, parameter[literal["FROM "]]] call[query.append, parameter[member[.tables]]] call[.appendClause, parameter[member[.query], literal[" WHERE "], member[.where]]] call[.appendClause, parameter[member[.query], literal[" GROUP BY "], member[.groupBy]]] call[.appendClause, parameter[member[.query], literal[" HAVING "], member[.having]]] call[.appendClause, parameter[member[.query], literal[" ORDER BY "], member[.orderBy]]] call[.appendClause, parameter[member[.query], literal[" LIMIT "], member[.limit]]] return[call[query.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[buildQueryString] operator[SEP] Keyword[boolean] identifier[distinct] , identifier[String] identifier[tables] , identifier[String] operator[SEP] operator[SEP] identifier[columns] , identifier[String] identifier[where] , identifier[String] identifier[groupBy] , identifier[String] identifier[having] , identifier[String] identifier[orderBy] , identifier[String] identifier[limit] operator[SEP] { Keyword[if] operator[SEP] identifier[TextUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[groupBy] operator[SEP] operator[&&] operator[!] identifier[TextUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[having] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[TextUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[limit] operator[SEP] operator[&&] operator[!] identifier[sLimitPattern] operator[SEP] identifier[matcher] operator[SEP] identifier[limit] operator[SEP] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[limit] operator[SEP] operator[SEP] } identifier[StringBuilder] identifier[query] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] Other[120] operator[SEP] operator[SEP] identifier[query] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[distinct] operator[SEP] { identifier[query] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[columns] operator[!=] Other[null] operator[&&] identifier[columns] operator[SEP] identifier[length] operator[!=] Other[0] operator[SEP] { identifier[appendColumns] operator[SEP] identifier[query] , identifier[columns] operator[SEP] operator[SEP] } Keyword[else] { identifier[query] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[query] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[query] operator[SEP] identifier[append] operator[SEP] identifier[tables] operator[SEP] operator[SEP] identifier[appendClause] operator[SEP] identifier[query] , literal[String] , identifier[where] operator[SEP] operator[SEP] identifier[appendClause] operator[SEP] identifier[query] , literal[String] , identifier[groupBy] operator[SEP] operator[SEP] identifier[appendClause] operator[SEP] identifier[query] , literal[String] , identifier[having] operator[SEP] operator[SEP] identifier[appendClause] operator[SEP] identifier[query] , literal[String] , identifier[orderBy] operator[SEP] operator[SEP] identifier[appendClause] operator[SEP] identifier[query] , literal[String] , identifier[limit] operator[SEP] operator[SEP] Keyword[return] identifier[query] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public List<Candidate> getRevisionHistory() { List<Candidate> candidates = restAdapter.getCandidateHistory(getId()); for (Candidate candidate : candidates) { candidate.setAdapter(restAdapter); } return Collections.unmodifiableList(candidates); }
class class_name[name] begin[{] method[getRevisionHistory, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[List], candidates] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=restAdapter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setAdapter, postfix_operators=[], prefix_operators=[], qualifier=candidate, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=candidates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=candidate)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Candidate, sub_type=None))), label=None) return[call[Collections.unmodifiableList, parameter[member[.candidates]]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[Candidate] operator[>] identifier[getRevisionHistory] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[Candidate] operator[>] identifier[candidates] operator[=] identifier[restAdapter] operator[SEP] identifier[getCandidateHistory] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Candidate] identifier[candidate] operator[:] identifier[candidates] operator[SEP] { identifier[candidate] operator[SEP] identifier[setAdapter] operator[SEP] identifier[restAdapter] operator[SEP] operator[SEP] } Keyword[return] identifier[Collections] operator[SEP] identifier[unmodifiableList] operator[SEP] identifier[candidates] operator[SEP] operator[SEP] }
private static synchronized void initDEVTESTPROD() { if (IS_DEV != null) return; IS_DEV = false; IS_TEST = false; IS_PROD = false; final List<String> envs = singletonInstance.getSearchEnvironments(); for (final String env : envs) { if (env.equalsIgnoreCase("DEV")) { IS_DEV = true; } } for (final String env : envs) { if (env.equalsIgnoreCase("TEST")) { IS_DEV = false; IS_TEST = true; } } for (final String env : envs) { if (env.equalsIgnoreCase("PROD")) { IS_DEV = false; IS_TEST = false; IS_PROD = true; } } }
class class_name[name] begin[{] method[initDEVTESTPROD, return_type[void], modifier[synchronized private static], parameter[]] begin[{] if[binary_operation[member[.IS_DEV], !=, literal[null]]] begin[{] return[None] else begin[{] None end[}] assign[member[.IS_DEV], literal[false]] assign[member[.IS_TEST], literal[false]] assign[member[.IS_PROD], literal[false]] local_variable[type[List], envs] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DEV")], member=equalsIgnoreCase, postfix_operators=[], prefix_operators=[], qualifier=env, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=IS_DEV, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=envs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=env)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TEST")], member=equalsIgnoreCase, postfix_operators=[], prefix_operators=[], qualifier=env, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=IS_DEV, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=IS_TEST, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=envs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=env)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="PROD")], member=equalsIgnoreCase, postfix_operators=[], prefix_operators=[], qualifier=env, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=IS_DEV, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=IS_TEST, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=IS_PROD, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=envs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=env)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[static] Keyword[synchronized] Keyword[void] identifier[initDEVTESTPROD] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[IS_DEV] operator[!=] Other[null] operator[SEP] Keyword[return] operator[SEP] identifier[IS_DEV] operator[=] literal[boolean] operator[SEP] identifier[IS_TEST] operator[=] literal[boolean] operator[SEP] identifier[IS_PROD] operator[=] literal[boolean] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[envs] operator[=] identifier[singletonInstance] operator[SEP] identifier[getSearchEnvironments] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[env] operator[:] identifier[envs] operator[SEP] { Keyword[if] operator[SEP] identifier[env] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[IS_DEV] operator[=] literal[boolean] operator[SEP] } } Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[env] operator[:] identifier[envs] operator[SEP] { Keyword[if] operator[SEP] identifier[env] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[IS_DEV] operator[=] literal[boolean] operator[SEP] identifier[IS_TEST] operator[=] literal[boolean] operator[SEP] } } Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[env] operator[:] identifier[envs] operator[SEP] { Keyword[if] operator[SEP] identifier[env] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[IS_DEV] operator[=] literal[boolean] operator[SEP] identifier[IS_TEST] operator[=] literal[boolean] operator[SEP] identifier[IS_PROD] operator[=] literal[boolean] operator[SEP] } } }
@Override public Module parse(final Element element, final Locale locale) { final SleEntryImpl sle = new SleEntryImpl(); ArrayList<EntryValue> values = new ArrayList<EntryValue>(); final List<Element> groups = element.getChildren("group", ModuleParser.TEMP); for (final Element group : groups) { final StringValue value = new StringValue(); value.setElement(group.getAttributeValue("element")); value.setLabel(group.getAttributeValue("label")); value.setValue(group.getAttributeValue("value")); if (group.getAttributeValue("ns") != null) { value.setNamespace(Namespace.getNamespace(group.getAttributeValue("ns"))); } else { value.setNamespace(element.getDocument().getRootElement().getNamespace()); } values.add(value); element.removeContent(group); } sle.setGroupValues(values.toArray(new EntryValue[values.size()])); values = values.size() == 0 ? values : new ArrayList<EntryValue>(); final List<Element> sorts = new ArrayList<Element>(element.getChildren("sort", ModuleParser.TEMP)); // LOG.debug("]]] sorts on element"+sorts.size()); for (final Element sort : sorts) { final String dataType = sort.getAttributeValue("data-type"); // LOG.debug("Doing datatype "+dataType +" :: "+sorts.size()); if (dataType == null || dataType.equals(Sort.TEXT_TYPE)) { final StringValue value = new StringValue(); value.setElement(sort.getAttributeValue("element")); value.setLabel(sort.getAttributeValue("label")); value.setValue(sort.getAttributeValue("value")); if (sort.getAttributeValue("ns") != null) { value.setNamespace(Namespace.getNamespace(sort.getAttributeValue("ns"))); } else { value.setNamespace(element.getDocument().getRootElement().getNamespace()); } values.add(value); element.removeContent(sort); } else if (dataType.equals(Sort.DATE_TYPE)) { final DateValue value = new DateValue(); value.setElement(sort.getAttributeValue("element")); value.setLabel(sort.getAttributeValue("label")); if (sort.getAttributeValue("ns") != null) { value.setNamespace(Namespace.getNamespace(sort.getAttributeValue("ns"))); } else { value.setNamespace(element.getDocument().getRootElement().getNamespace()); } Date dateValue = null; try { dateValue = DateParser.parseRFC822(sort.getAttributeValue("value"), locale); if (dateValue == null) { dateValue = DateParser.parseW3CDateTime(sort.getAttributeValue("value"), locale); } } catch (final Exception e) { ; // ignore parse exceptions } value.setValue(dateValue); values.add(value); element.removeContent(sort); } else if (dataType.equals(Sort.NUMBER_TYPE)) { final NumberValue value = new NumberValue(); value.setElement(sort.getAttributeValue("element")); value.setLabel(sort.getAttributeValue("label")); if (sort.getAttributeValue("ns") != null) { value.setNamespace(Namespace.getNamespace(sort.getAttributeValue("ns"))); } else { value.setNamespace(element.getDocument().getRootElement().getNamespace()); } try { value.setValue(new BigDecimal(sort.getAttributeValue("value"))); } catch (final NumberFormatException nfe) { ; // ignore values.add(value); element.removeContent(sort); } } else { throw new RuntimeException("Unknown datatype"); } } // LOG.debug("Values created "+values.size()+" from sorts" +sorts.size()); sle.setSortValues(values.toArray(new EntryValue[values.size()])); return sle; }
class class_name[name] begin[{] method[parse, return_type[type[Module]], modifier[public], parameter[element, locale]] begin[{] local_variable[type[SleEntryImpl], sle] local_variable[type[ArrayList], values] local_variable[type[List], groups] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringValue, sub_type=None)), name=value)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=StringValue, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="element")], member=getAttributeValue, postfix_operators=[], prefix_operators=[], qualifier=group, selectors=[], type_arguments=None)], member=setElement, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="label")], member=getAttributeValue, postfix_operators=[], prefix_operators=[], qualifier=group, selectors=[], type_arguments=None)], member=setLabel, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="value")], member=getAttributeValue, postfix_operators=[], prefix_operators=[], qualifier=group, selectors=[], type_arguments=None)], member=setValue, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ns")], member=getAttributeValue, postfix_operators=[], prefix_operators=[], qualifier=group, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDocument, postfix_operators=[], prefix_operators=[], qualifier=element, selectors=[MethodInvocation(arguments=[], member=getRootElement, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getNamespace, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=setNamespace, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ns")], member=getAttributeValue, postfix_operators=[], prefix_operators=[], qualifier=group, selectors=[], type_arguments=None)], member=getNamespace, postfix_operators=[], prefix_operators=[], qualifier=Namespace, selectors=[], type_arguments=None)], member=setNamespace, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=values, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=group, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeContent, postfix_operators=[], prefix_operators=[], qualifier=element, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=groups, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=group)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None))), label=None) call[sle.setGroupValues, parameter[call[values.toArray, parameter[ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=values, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=EntryValue, sub_type=None))]]]] assign[member[.values], TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=values, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), if_false=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=EntryValue, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None)), if_true=MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] local_variable[type[List], sorts] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="data-type")], member=getAttributeValue, postfix_operators=[], prefix_operators=[], qualifier=sort, selectors=[], type_arguments=None), name=dataType)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=dataType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[MemberReference(member=TEXT_TYPE, postfix_operators=[], prefix_operators=[], qualifier=Sort, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=dataType, selectors=[], type_arguments=None), operator=||), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=DATE_TYPE, postfix_operators=[], prefix_operators=[], qualifier=Sort, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=dataType, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=NUMBER_TYPE, postfix_operators=[], prefix_operators=[], qualifier=Sort, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=dataType, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unknown datatype")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)]), label=None, 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=None, dimensions=None, name=NumberValue, sub_type=None)), name=value)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=NumberValue, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="element")], member=getAttributeValue, postfix_operators=[], prefix_operators=[], qualifier=sort, selectors=[], type_arguments=None)], member=setElement, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="label")], member=getAttributeValue, postfix_operators=[], prefix_operators=[], qualifier=sort, selectors=[], type_arguments=None)], member=setLabel, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ns")], member=getAttributeValue, postfix_operators=[], prefix_operators=[], qualifier=sort, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDocument, postfix_operators=[], prefix_operators=[], qualifier=element, selectors=[MethodInvocation(arguments=[], member=getRootElement, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getNamespace, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=setNamespace, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ns")], member=getAttributeValue, postfix_operators=[], prefix_operators=[], qualifier=sort, selectors=[], type_arguments=None)], member=getNamespace, postfix_operators=[], prefix_operators=[], qualifier=Namespace, selectors=[], type_arguments=None)], member=setNamespace, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), label=None)])), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="value")], member=getAttributeValue, postfix_operators=[], prefix_operators=[], qualifier=sort, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BigDecimal, sub_type=None))], member=setValue, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[Statement(label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=values, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sort, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeContent, postfix_operators=[], prefix_operators=[], qualifier=element, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=nfe, types=['NumberFormatException']))], finally_block=None, label=None, resources=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=None, dimensions=None, name=DateValue, sub_type=None)), name=value)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=DateValue, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="element")], member=getAttributeValue, postfix_operators=[], prefix_operators=[], qualifier=sort, selectors=[], type_arguments=None)], member=setElement, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="label")], member=getAttributeValue, postfix_operators=[], prefix_operators=[], qualifier=sort, selectors=[], type_arguments=None)], member=setLabel, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ns")], member=getAttributeValue, postfix_operators=[], prefix_operators=[], qualifier=sort, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDocument, postfix_operators=[], prefix_operators=[], qualifier=element, selectors=[MethodInvocation(arguments=[], member=getRootElement, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getNamespace, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=setNamespace, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ns")], member=getAttributeValue, postfix_operators=[], prefix_operators=[], qualifier=sort, selectors=[], type_arguments=None)], member=getNamespace, postfix_operators=[], prefix_operators=[], qualifier=Namespace, selectors=[], type_arguments=None)], member=setNamespace, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=dateValue)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Date, sub_type=None)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dateValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="value")], member=getAttributeValue, postfix_operators=[], prefix_operators=[], qualifier=sort, selectors=[], type_arguments=None), MemberReference(member=locale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseRFC822, postfix_operators=[], prefix_operators=[], qualifier=DateParser, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=dateValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dateValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="value")], member=getAttributeValue, postfix_operators=[], prefix_operators=[], qualifier=sort, selectors=[], type_arguments=None), MemberReference(member=locale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseW3CDateTime, postfix_operators=[], prefix_operators=[], qualifier=DateParser, selectors=[], type_arguments=None)), label=None)]))], catches=[CatchClause(block=[Statement(label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=dateValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setValue, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=values, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sort, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeContent, postfix_operators=[], prefix_operators=[], qualifier=element, selectors=[], type_arguments=None), label=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=None, dimensions=None, name=StringValue, sub_type=None)), name=value)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=StringValue, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="element")], member=getAttributeValue, postfix_operators=[], prefix_operators=[], qualifier=sort, selectors=[], type_arguments=None)], member=setElement, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="label")], member=getAttributeValue, postfix_operators=[], prefix_operators=[], qualifier=sort, selectors=[], type_arguments=None)], member=setLabel, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="value")], member=getAttributeValue, postfix_operators=[], prefix_operators=[], qualifier=sort, selectors=[], type_arguments=None)], member=setValue, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ns")], member=getAttributeValue, postfix_operators=[], prefix_operators=[], qualifier=sort, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDocument, postfix_operators=[], prefix_operators=[], qualifier=element, selectors=[MethodInvocation(arguments=[], member=getRootElement, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getNamespace, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=setNamespace, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ns")], member=getAttributeValue, postfix_operators=[], prefix_operators=[], qualifier=sort, selectors=[], type_arguments=None)], member=getNamespace, postfix_operators=[], prefix_operators=[], qualifier=Namespace, selectors=[], type_arguments=None)], member=setNamespace, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=values, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sort, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeContent, postfix_operators=[], prefix_operators=[], qualifier=element, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=sorts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=sort)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None))), label=None) call[sle.setSortValues, parameter[call[values.toArray, parameter[ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=values, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=EntryValue, sub_type=None))]]]] return[member[.sle]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Module] identifier[parse] operator[SEP] Keyword[final] identifier[Element] identifier[element] , Keyword[final] identifier[Locale] identifier[locale] operator[SEP] { Keyword[final] identifier[SleEntryImpl] identifier[sle] operator[=] Keyword[new] identifier[SleEntryImpl] operator[SEP] operator[SEP] operator[SEP] identifier[ArrayList] operator[<] identifier[EntryValue] operator[>] identifier[values] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[EntryValue] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[Element] operator[>] identifier[groups] operator[=] identifier[element] operator[SEP] identifier[getChildren] operator[SEP] literal[String] , identifier[ModuleParser] operator[SEP] identifier[TEMP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[Element] identifier[group] operator[:] identifier[groups] operator[SEP] { Keyword[final] identifier[StringValue] identifier[value] operator[=] Keyword[new] identifier[StringValue] operator[SEP] operator[SEP] operator[SEP] identifier[value] operator[SEP] identifier[setElement] operator[SEP] identifier[group] operator[SEP] identifier[getAttributeValue] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[value] operator[SEP] identifier[setLabel] operator[SEP] identifier[group] operator[SEP] identifier[getAttributeValue] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[value] operator[SEP] identifier[setValue] operator[SEP] identifier[group] operator[SEP] identifier[getAttributeValue] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[group] operator[SEP] identifier[getAttributeValue] operator[SEP] literal[String] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[value] operator[SEP] identifier[setNamespace] operator[SEP] identifier[Namespace] operator[SEP] identifier[getNamespace] operator[SEP] identifier[group] operator[SEP] identifier[getAttributeValue] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[value] operator[SEP] identifier[setNamespace] operator[SEP] identifier[element] operator[SEP] identifier[getDocument] operator[SEP] operator[SEP] operator[SEP] identifier[getRootElement] operator[SEP] operator[SEP] operator[SEP] identifier[getNamespace] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[values] operator[SEP] identifier[add] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[element] operator[SEP] identifier[removeContent] operator[SEP] identifier[group] operator[SEP] operator[SEP] } identifier[sle] operator[SEP] identifier[setGroupValues] operator[SEP] identifier[values] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[EntryValue] operator[SEP] identifier[values] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[values] operator[=] identifier[values] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[?] identifier[values] operator[:] Keyword[new] identifier[ArrayList] operator[<] identifier[EntryValue] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[Element] operator[>] identifier[sorts] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Element] operator[>] operator[SEP] identifier[element] operator[SEP] identifier[getChildren] operator[SEP] literal[String] , identifier[ModuleParser] operator[SEP] identifier[TEMP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[Element] identifier[sort] operator[:] identifier[sorts] operator[SEP] { Keyword[final] identifier[String] identifier[dataType] operator[=] identifier[sort] operator[SEP] identifier[getAttributeValue] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dataType] operator[==] Other[null] operator[||] identifier[dataType] operator[SEP] identifier[equals] operator[SEP] identifier[Sort] operator[SEP] identifier[TEXT_TYPE] operator[SEP] operator[SEP] { Keyword[final] identifier[StringValue] identifier[value] operator[=] Keyword[new] identifier[StringValue] operator[SEP] operator[SEP] operator[SEP] identifier[value] operator[SEP] identifier[setElement] operator[SEP] identifier[sort] operator[SEP] identifier[getAttributeValue] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[value] operator[SEP] identifier[setLabel] operator[SEP] identifier[sort] operator[SEP] identifier[getAttributeValue] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[value] operator[SEP] identifier[setValue] operator[SEP] identifier[sort] operator[SEP] identifier[getAttributeValue] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sort] operator[SEP] identifier[getAttributeValue] operator[SEP] literal[String] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[value] operator[SEP] identifier[setNamespace] operator[SEP] identifier[Namespace] operator[SEP] identifier[getNamespace] operator[SEP] identifier[sort] operator[SEP] identifier[getAttributeValue] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[value] operator[SEP] identifier[setNamespace] operator[SEP] identifier[element] operator[SEP] identifier[getDocument] operator[SEP] operator[SEP] operator[SEP] identifier[getRootElement] operator[SEP] operator[SEP] operator[SEP] identifier[getNamespace] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[values] operator[SEP] identifier[add] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[element] operator[SEP] identifier[removeContent] operator[SEP] identifier[sort] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[dataType] operator[SEP] identifier[equals] operator[SEP] identifier[Sort] operator[SEP] identifier[DATE_TYPE] operator[SEP] operator[SEP] { Keyword[final] identifier[DateValue] identifier[value] operator[=] Keyword[new] identifier[DateValue] operator[SEP] operator[SEP] operator[SEP] identifier[value] operator[SEP] identifier[setElement] operator[SEP] identifier[sort] operator[SEP] identifier[getAttributeValue] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[value] operator[SEP] identifier[setLabel] operator[SEP] identifier[sort] operator[SEP] identifier[getAttributeValue] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sort] operator[SEP] identifier[getAttributeValue] operator[SEP] literal[String] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[value] operator[SEP] identifier[setNamespace] operator[SEP] identifier[Namespace] operator[SEP] identifier[getNamespace] operator[SEP] identifier[sort] operator[SEP] identifier[getAttributeValue] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[value] operator[SEP] identifier[setNamespace] operator[SEP] identifier[element] operator[SEP] identifier[getDocument] operator[SEP] operator[SEP] operator[SEP] identifier[getRootElement] operator[SEP] operator[SEP] operator[SEP] identifier[getNamespace] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[Date] identifier[dateValue] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[dateValue] operator[=] identifier[DateParser] operator[SEP] identifier[parseRFC822] operator[SEP] identifier[sort] operator[SEP] identifier[getAttributeValue] operator[SEP] literal[String] operator[SEP] , identifier[locale] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dateValue] operator[==] Other[null] operator[SEP] { identifier[dateValue] operator[=] identifier[DateParser] operator[SEP] identifier[parseW3CDateTime] operator[SEP] identifier[sort] operator[SEP] identifier[getAttributeValue] operator[SEP] literal[String] operator[SEP] , identifier[locale] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] Keyword[final] identifier[Exception] identifier[e] operator[SEP] { operator[SEP] } identifier[value] operator[SEP] identifier[setValue] operator[SEP] identifier[dateValue] operator[SEP] operator[SEP] identifier[values] operator[SEP] identifier[add] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[element] operator[SEP] identifier[removeContent] operator[SEP] identifier[sort] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[dataType] operator[SEP] identifier[equals] operator[SEP] identifier[Sort] operator[SEP] identifier[NUMBER_TYPE] operator[SEP] operator[SEP] { Keyword[final] identifier[NumberValue] identifier[value] operator[=] Keyword[new] identifier[NumberValue] operator[SEP] operator[SEP] operator[SEP] identifier[value] operator[SEP] identifier[setElement] operator[SEP] identifier[sort] operator[SEP] identifier[getAttributeValue] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[value] operator[SEP] identifier[setLabel] operator[SEP] identifier[sort] operator[SEP] identifier[getAttributeValue] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sort] operator[SEP] identifier[getAttributeValue] operator[SEP] literal[String] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[value] operator[SEP] identifier[setNamespace] operator[SEP] identifier[Namespace] operator[SEP] identifier[getNamespace] operator[SEP] identifier[sort] operator[SEP] identifier[getAttributeValue] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[value] operator[SEP] identifier[setNamespace] operator[SEP] identifier[element] operator[SEP] identifier[getDocument] operator[SEP] operator[SEP] operator[SEP] identifier[getRootElement] operator[SEP] operator[SEP] operator[SEP] identifier[getNamespace] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[try] { identifier[value] operator[SEP] identifier[setValue] operator[SEP] Keyword[new] identifier[BigDecimal] operator[SEP] identifier[sort] operator[SEP] identifier[getAttributeValue] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[NumberFormatException] identifier[nfe] operator[SEP] { operator[SEP] identifier[values] operator[SEP] identifier[add] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[element] operator[SEP] identifier[removeContent] operator[SEP] identifier[sort] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP] } } identifier[sle] operator[SEP] identifier[setSortValues] operator[SEP] identifier[values] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[EntryValue] operator[SEP] identifier[values] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[sle] operator[SEP] }
public ListLicenseConfigurationsResult withLicenseConfigurations(LicenseConfiguration... licenseConfigurations) { if (this.licenseConfigurations == null) { setLicenseConfigurations(new java.util.ArrayList<LicenseConfiguration>(licenseConfigurations.length)); } for (LicenseConfiguration ele : licenseConfigurations) { this.licenseConfigurations.add(ele); } return this; }
class class_name[name] begin[{] method[withLicenseConfigurations, return_type[type[ListLicenseConfigurationsResult]], modifier[public], parameter[licenseConfigurations]] begin[{] if[binary_operation[THIS[member[None.licenseConfigurations]], ==, literal[null]]] begin[{] call[.setLicenseConfigurations, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=licenseConfigurations, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=LicenseConfiguration, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=licenseConfigurations, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=licenseConfigurations, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ele)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=LicenseConfiguration, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[ListLicenseConfigurationsResult] identifier[withLicenseConfigurations] operator[SEP] identifier[LicenseConfiguration] operator[...] identifier[licenseConfigurations] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[licenseConfigurations] operator[==] Other[null] operator[SEP] { identifier[setLicenseConfigurations] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[LicenseConfiguration] operator[>] operator[SEP] identifier[licenseConfigurations] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[LicenseConfiguration] identifier[ele] operator[:] identifier[licenseConfigurations] operator[SEP] { Keyword[this] operator[SEP] identifier[licenseConfigurations] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public void printStackTrace(java.io.PrintWriter s) { if (s == null) { s = new java.io.PrintWriter(System.err, true); } try { String locInfo = getLocationAsString(); if (null != locInfo) { s.println(locInfo); } super.printStackTrace(s); } catch (Throwable e) {} boolean isJdk14OrHigher = false; try { Throwable.class.getMethod("getCause", (Class<?>) null); isJdk14OrHigher = true; } catch (NoSuchMethodException nsme) { // do nothing } // The printStackTrace method of the Throwable class in jdk 1.4 // and higher will include the cause when printing the backtrace. // The following code is only required when using jdk 1.3 or lower if (!isJdk14OrHigher) { Throwable exception = getException(); for (int i = 0; (i < 10) && (null != exception); i++) { s.println("---------"); try { if (exception instanceof DTMException) { String locInfo = ((DTMException) exception) .getLocationAsString(); if (null != locInfo) { s.println(locInfo); } } exception.printStackTrace(s); } catch (Throwable e) { s.println("Could not print stack trace..."); } try { Method meth = ((Object) exception).getClass().getMethod("getException", (Class<?>) null); if (null != meth) { Throwable prev = exception; exception = (Throwable) meth.invoke(exception, (Class<?>) null); if (prev == exception) { break; } } else { exception = null; } } catch (InvocationTargetException ite) { exception = null; } catch (IllegalAccessException iae) { exception = null; } catch (NoSuchMethodException nsme) { exception = null; } } } }
class class_name[name] begin[{] method[printStackTrace, return_type[void], modifier[public], parameter[s]] begin[{] if[binary_operation[member[.s], ==, literal[null]]] begin[{] assign[member[.s], ClassCreator(arguments=[MemberReference(member=err, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=io, sub_type=ReferenceType(arguments=None, dimensions=None, name=PrintWriter, sub_type=None))))] else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getLocationAsString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=locInfo)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=locInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=locInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=println, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=SuperMethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Throwable']))], finally_block=None, label=None, resources=None) local_variable[type[boolean], isJdk14OrHigher] TryStatement(block=[StatementExpression(expression=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="getCause"), Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None))], member=getMethod, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Throwable, sub_type=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=isJdk14OrHigher, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=nsme, types=['NoSuchMethodException']))], finally_block=None, label=None, resources=None) if[member[.isJdk14OrHigher]] begin[{] local_variable[type[Throwable], exception] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="---------")], member=println, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[], type_arguments=None), label=None), TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=DTMException, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=DTMException, sub_type=None)), name=locInfo)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=locInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=locInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=println, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[], type_arguments=None), label=None)]))])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=exception, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not print stack trace...")], member=println, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Throwable']))], finally_block=None, label=None, resources=None), TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), name=meth)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=meth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=prev)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Throwable, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None))], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=meth, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Throwable, sub_type=None))), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=prev, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)]))]))], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ite, types=['InvocationTargetException'])), CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=iae, types=['IllegalAccessException'])), CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=nsme, types=['NoSuchMethodException']))], finally_block=None, label=None, resources=None)]), control=ForControl(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10), operator=<), operandr=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), operator=&&), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[printStackTrace] operator[SEP] identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[PrintWriter] identifier[s] operator[SEP] { Keyword[if] operator[SEP] identifier[s] operator[==] Other[null] operator[SEP] { identifier[s] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[PrintWriter] operator[SEP] identifier[System] operator[SEP] identifier[err] , literal[boolean] operator[SEP] operator[SEP] } Keyword[try] { identifier[String] identifier[locInfo] operator[=] identifier[getLocationAsString] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[locInfo] operator[SEP] { identifier[s] operator[SEP] identifier[println] operator[SEP] identifier[locInfo] operator[SEP] operator[SEP] } Keyword[super] operator[SEP] identifier[printStackTrace] operator[SEP] identifier[s] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[e] operator[SEP] { } Keyword[boolean] identifier[isJdk14OrHigher] operator[=] literal[boolean] operator[SEP] Keyword[try] { identifier[Throwable] operator[SEP] Keyword[class] operator[SEP] identifier[getMethod] operator[SEP] literal[String] , operator[SEP] identifier[Class] operator[<] operator[?] operator[>] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[isJdk14OrHigher] operator[=] literal[boolean] operator[SEP] } Keyword[catch] operator[SEP] identifier[NoSuchMethodException] identifier[nsme] operator[SEP] { } Keyword[if] operator[SEP] operator[!] identifier[isJdk14OrHigher] operator[SEP] { identifier[Throwable] identifier[exception] operator[=] identifier[getException] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] operator[SEP] identifier[i] operator[<] Other[10] operator[SEP] operator[&&] operator[SEP] Other[null] operator[!=] identifier[exception] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[s] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[exception] Keyword[instanceof] identifier[DTMException] operator[SEP] { identifier[String] identifier[locInfo] operator[=] operator[SEP] operator[SEP] identifier[DTMException] operator[SEP] identifier[exception] operator[SEP] operator[SEP] identifier[getLocationAsString] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[locInfo] operator[SEP] { identifier[s] operator[SEP] identifier[println] operator[SEP] identifier[locInfo] operator[SEP] operator[SEP] } } identifier[exception] operator[SEP] identifier[printStackTrace] operator[SEP] identifier[s] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[e] operator[SEP] { identifier[s] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[Method] identifier[meth] operator[=] operator[SEP] operator[SEP] identifier[Object] operator[SEP] identifier[exception] operator[SEP] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getMethod] operator[SEP] literal[String] , operator[SEP] identifier[Class] operator[<] operator[?] operator[>] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[meth] operator[SEP] { identifier[Throwable] identifier[prev] operator[=] identifier[exception] operator[SEP] identifier[exception] operator[=] operator[SEP] identifier[Throwable] operator[SEP] identifier[meth] operator[SEP] identifier[invoke] operator[SEP] identifier[exception] , operator[SEP] identifier[Class] operator[<] operator[?] operator[>] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[prev] operator[==] identifier[exception] operator[SEP] { Keyword[break] operator[SEP] } } Keyword[else] { identifier[exception] operator[=] Other[null] operator[SEP] } } Keyword[catch] operator[SEP] identifier[InvocationTargetException] identifier[ite] operator[SEP] { identifier[exception] operator[=] Other[null] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalAccessException] identifier[iae] operator[SEP] { identifier[exception] operator[=] Other[null] operator[SEP] } Keyword[catch] operator[SEP] identifier[NoSuchMethodException] identifier[nsme] operator[SEP] { identifier[exception] operator[=] Other[null] operator[SEP] } } } }
public E getLast() { final Node<E> l = last; if (l == null) throw new NoSuchElementException(); return l.item; }
class class_name[name] begin[{] method[getLast, return_type[type[E]], modifier[public], parameter[]] begin[{] local_variable[type[Node], l] if[binary_operation[member[.l], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NoSuchElementException, sub_type=None)), label=None) else begin[{] None end[}] return[member[l.item]] end[}] END[}]
Keyword[public] identifier[E] identifier[getLast] operator[SEP] operator[SEP] { Keyword[final] identifier[Node] operator[<] identifier[E] operator[>] identifier[l] operator[=] identifier[last] operator[SEP] Keyword[if] operator[SEP] identifier[l] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[NoSuchElementException] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[l] operator[SEP] identifier[item] operator[SEP] }
public static CommerceCountry fetchByG_Tw(long groupId, String twoLettersISOCode, boolean retrieveFromCache) { return getPersistence() .fetchByG_Tw(groupId, twoLettersISOCode, retrieveFromCache); }
class class_name[name] begin[{] method[fetchByG_Tw, return_type[type[CommerceCountry]], modifier[public static], parameter[groupId, twoLettersISOCode, retrieveFromCache]] begin[{] return[call[.getPersistence, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[CommerceCountry] identifier[fetchByG_Tw] operator[SEP] Keyword[long] identifier[groupId] , identifier[String] identifier[twoLettersISOCode] , Keyword[boolean] identifier[retrieveFromCache] operator[SEP] { Keyword[return] identifier[getPersistence] operator[SEP] operator[SEP] operator[SEP] identifier[fetchByG_Tw] operator[SEP] identifier[groupId] , identifier[twoLettersISOCode] , identifier[retrieveFromCache] operator[SEP] operator[SEP] }
public static boolean isBoolean(TypeRef type) { if (type instanceof PrimitiveRef) { return Constants.PRIMITIVE_BOOLEAN_REF.equals(type); } else if (!(type instanceof ClassRef)) { return false; } else { return Constants.BOOLEAN_REF.equals(type); } }
class class_name[name] begin[{] method[isBoolean, return_type[type[boolean]], modifier[public static], parameter[type]] begin[{] if[binary_operation[member[.type], instanceof, type[PrimitiveRef]]] begin[{] return[call[Constants.PRIMITIVE_BOOLEAN_REF.equals, parameter[member[.type]]]] else begin[{] if[binary_operation[member[.type], instanceof, type[ClassRef]]] begin[{] return[literal[false]] else begin[{] return[call[Constants.BOOLEAN_REF.equals, parameter[member[.type]]]] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isBoolean] operator[SEP] identifier[TypeRef] identifier[type] operator[SEP] { Keyword[if] operator[SEP] identifier[type] Keyword[instanceof] identifier[PrimitiveRef] operator[SEP] { Keyword[return] identifier[Constants] operator[SEP] identifier[PRIMITIVE_BOOLEAN_REF] operator[SEP] identifier[equals] operator[SEP] identifier[type] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[type] Keyword[instanceof] identifier[ClassRef] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { Keyword[return] identifier[Constants] operator[SEP] identifier[BOOLEAN_REF] operator[SEP] identifier[equals] operator[SEP] identifier[type] operator[SEP] operator[SEP] } }
private void checkTransitives(Tile neighbor, String group, GroupTransition current, TileRef ref) { if (!group.equals(current.getOut()) && TransitionType.CENTER == mapTransition.getTransition(ref, current.getOut()).getType()) { map.setTile(map.createTile(ref.getSheet(), ref.getNumber(), neighbor.getX(), neighbor.getY())); } }
class class_name[name] begin[{] method[checkTransitives, return_type[void], modifier[private], parameter[neighbor, group, current, ref]] begin[{] if[binary_operation[call[group.equals, parameter[call[current.getOut, parameter[]]]], &&, binary_operation[member[TransitionType.CENTER], ==, call[mapTransition.getTransition, parameter[member[.ref], call[current.getOut, parameter[]]]]]]] begin[{] call[map.setTile, parameter[call[map.createTile, parameter[call[ref.getSheet, parameter[]], call[ref.getNumber, parameter[]], call[neighbor.getX, parameter[]], call[neighbor.getY, parameter[]]]]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[checkTransitives] operator[SEP] identifier[Tile] identifier[neighbor] , identifier[String] identifier[group] , identifier[GroupTransition] identifier[current] , identifier[TileRef] identifier[ref] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[group] operator[SEP] identifier[equals] operator[SEP] identifier[current] operator[SEP] identifier[getOut] operator[SEP] operator[SEP] operator[SEP] operator[&&] identifier[TransitionType] operator[SEP] identifier[CENTER] operator[==] identifier[mapTransition] operator[SEP] identifier[getTransition] operator[SEP] identifier[ref] , identifier[current] operator[SEP] identifier[getOut] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] { identifier[map] operator[SEP] identifier[setTile] operator[SEP] identifier[map] operator[SEP] identifier[createTile] operator[SEP] identifier[ref] operator[SEP] identifier[getSheet] operator[SEP] operator[SEP] , identifier[ref] operator[SEP] identifier[getNumber] operator[SEP] operator[SEP] , identifier[neighbor] operator[SEP] identifier[getX] operator[SEP] operator[SEP] , identifier[neighbor] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
@Override public GetFunctionResult getFunction(GetFunctionRequest request) { request = beforeClientExecution(request); return executeGetFunction(request); }
class class_name[name] begin[{] method[getFunction, return_type[type[GetFunctionResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeGetFunction, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[GetFunctionResult] identifier[getFunction] operator[SEP] identifier[GetFunctionRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeGetFunction] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public static Diff compareXML(InputSource control, InputSource test) throws SAXException, IOException { return new Diff(control, test); }
class class_name[name] begin[{] method[compareXML, return_type[type[Diff]], modifier[public static], parameter[control, test]] begin[{] return[ClassCreator(arguments=[MemberReference(member=control, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=test, 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=Diff, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Diff] identifier[compareXML] operator[SEP] identifier[InputSource] identifier[control] , identifier[InputSource] identifier[test] operator[SEP] Keyword[throws] identifier[SAXException] , identifier[IOException] { Keyword[return] Keyword[new] identifier[Diff] operator[SEP] identifier[control] , identifier[test] operator[SEP] operator[SEP] }
private OnSeekBarChangeListener createSeekBarListener() { return new OnSeekBarChangeListener() { @Override public void onProgressChanged(final SeekBar seekBar, final int progress, final boolean fromUser) { adaptElevation(progress, parallelLightCheckBox.isChecked()); } @Override public void onStartTrackingTouch(final SeekBar seekBar) { } @Override public void onStopTrackingTouch(final SeekBar seekBar) { } }; }
class class_name[name] begin[{] method[createSeekBarListener, return_type[type[OnSeekBarChangeListener]], modifier[private], parameter[]] begin[{] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=progress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=isChecked, postfix_operators=[], prefix_operators=[], qualifier=parallelLightCheckBox, selectors=[], type_arguments=None)], member=adaptElevation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=onProgressChanged, parameters=[FormalParameter(annotations=[], modifiers={'final'}, name=seekBar, type=ReferenceType(arguments=None, dimensions=[], name=SeekBar, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers={'final'}, name=progress, type=BasicType(dimensions=[], name=int), varargs=False), FormalParameter(annotations=[], modifiers={'final'}, name=fromUser, type=BasicType(dimensions=[], name=boolean), varargs=False)], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[], documentation=None, modifiers={'public'}, name=onStartTrackingTouch, parameters=[FormalParameter(annotations=[], modifiers={'final'}, name=seekBar, type=ReferenceType(arguments=None, dimensions=[], name=SeekBar, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[], documentation=None, modifiers={'public'}, name=onStopTrackingTouch, parameters=[FormalParameter(annotations=[], modifiers={'final'}, name=seekBar, type=ReferenceType(arguments=None, dimensions=[], name=SeekBar, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OnSeekBarChangeListener, sub_type=None))] end[}] END[}]
Keyword[private] identifier[OnSeekBarChangeListener] identifier[createSeekBarListener] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[OnSeekBarChangeListener] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onProgressChanged] operator[SEP] Keyword[final] identifier[SeekBar] identifier[seekBar] , Keyword[final] Keyword[int] identifier[progress] , Keyword[final] Keyword[boolean] identifier[fromUser] operator[SEP] { identifier[adaptElevation] operator[SEP] identifier[progress] , identifier[parallelLightCheckBox] operator[SEP] identifier[isChecked] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onStartTrackingTouch] operator[SEP] Keyword[final] identifier[SeekBar] identifier[seekBar] operator[SEP] { } annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onStopTrackingTouch] operator[SEP] Keyword[final] identifier[SeekBar] identifier[seekBar] operator[SEP] { } } operator[SEP] }
private StringBuilder sourceControl(StringBuilder mapping){ if(getMts() == ALL_FIELDS && !sourceType().isPrimitive()){ StringBuilder write = write(" if(",getSource(),"!=null){",newLine, sharedCode(mapping) ,newLine, " }"); if(!destinationType().isPrimitive() && !avoidSet) write.append(write("else{" ,newLine, setDestination("null") ,newLine, " }" ,newLine)); else write.append(newLine); return write; } else return write(sharedCode(mapping),newLine); }
class class_name[name] begin[{] method[sourceControl, return_type[type[StringBuilder]], modifier[private], parameter[mapping]] begin[{] if[binary_operation[binary_operation[call[.getMts, parameter[]], ==, member[.ALL_FIELDS]], &&, call[.sourceType, parameter[]]]] begin[{] local_variable[type[StringBuilder], write] if[binary_operation[call[.destinationType, parameter[]], &&, member[.avoidSet]]] begin[{] call[write.append, parameter[call[.write, parameter[literal["else{"], member[.newLine], call[.setDestination, parameter[literal["null"]]], member[.newLine], literal[" }"], member[.newLine]]]]] else begin[{] call[write.append, parameter[member[.newLine]]] end[}] return[member[.write]] else begin[{] return[call[.write, parameter[call[.sharedCode, parameter[member[.mapping]]], member[.newLine]]]] end[}] end[}] END[}]
Keyword[private] identifier[StringBuilder] identifier[sourceControl] operator[SEP] identifier[StringBuilder] identifier[mapping] operator[SEP] { Keyword[if] operator[SEP] identifier[getMts] operator[SEP] operator[SEP] operator[==] identifier[ALL_FIELDS] operator[&&] operator[!] identifier[sourceType] operator[SEP] operator[SEP] operator[SEP] identifier[isPrimitive] operator[SEP] operator[SEP] operator[SEP] { identifier[StringBuilder] identifier[write] operator[=] identifier[write] operator[SEP] literal[String] , identifier[getSource] operator[SEP] operator[SEP] , literal[String] , identifier[newLine] , identifier[sharedCode] operator[SEP] identifier[mapping] operator[SEP] , identifier[newLine] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[destinationType] operator[SEP] operator[SEP] operator[SEP] identifier[isPrimitive] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[avoidSet] operator[SEP] identifier[write] operator[SEP] identifier[append] operator[SEP] identifier[write] operator[SEP] literal[String] , identifier[newLine] , identifier[setDestination] operator[SEP] literal[String] operator[SEP] , identifier[newLine] , literal[String] , identifier[newLine] operator[SEP] operator[SEP] operator[SEP] Keyword[else] identifier[write] operator[SEP] identifier[append] operator[SEP] identifier[newLine] operator[SEP] operator[SEP] Keyword[return] identifier[write] operator[SEP] } Keyword[else] Keyword[return] identifier[write] operator[SEP] identifier[sharedCode] operator[SEP] identifier[mapping] operator[SEP] , identifier[newLine] operator[SEP] operator[SEP] }
@Override public MongodbQueryResult build(String query) throws IOException, ParserNotFoundException { DBObject result = (DBObject) super.parse(query); return new MongodbQueryResult(query, result); }
class class_name[name] begin[{] method[build, return_type[type[MongodbQueryResult]], modifier[public], parameter[query]] begin[{] local_variable[type[DBObject], result] return[ClassCreator(arguments=[MemberReference(member=query, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MongodbQueryResult, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[MongodbQueryResult] identifier[build] operator[SEP] identifier[String] identifier[query] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ParserNotFoundException] { identifier[DBObject] identifier[result] operator[=] operator[SEP] identifier[DBObject] operator[SEP] Keyword[super] operator[SEP] identifier[parse] operator[SEP] identifier[query] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[MongodbQueryResult] operator[SEP] identifier[query] , identifier[result] operator[SEP] operator[SEP] }
public void warning(String format, Object... args) { if (isLoggable(WARNING)) { logIt(WARNING, String.format(format, args)); } }
class class_name[name] begin[{] method[warning, return_type[void], modifier[public], parameter[format, args]] begin[{] if[call[.isLoggable, parameter[member[.WARNING]]]] begin[{] call[.logIt, parameter[member[.WARNING], call[String.format, parameter[member[.format], member[.args]]]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[warning] operator[SEP] identifier[String] identifier[format] , identifier[Object] operator[...] identifier[args] operator[SEP] { Keyword[if] operator[SEP] identifier[isLoggable] operator[SEP] identifier[WARNING] operator[SEP] operator[SEP] { identifier[logIt] operator[SEP] identifier[WARNING] , identifier[String] operator[SEP] identifier[format] operator[SEP] identifier[format] , identifier[args] operator[SEP] operator[SEP] operator[SEP] } }