code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
private void addInternalHeaderFields(String name, String value) { String key = normalisedHeaderName(name); Vector<String> v = getHeaders(key); if (v == null) { v = new Vector<>(); mHeaderFields.put(key, v); } if (value != null) { v.add(value); } else { mHeaderFields.remove(key); } }
class class_name[name] begin[{] method[addInternalHeaderFields, return_type[void], modifier[private], parameter[name, value]] begin[{] local_variable[type[String], key] local_variable[type[Vector], v] if[binary_operation[member[.v], ==, literal[null]]] begin[{] assign[member[.v], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=Vector, sub_type=None))] call[mHeaderFields.put, parameter[member[.key], member[.v]]] else begin[{] None end[}] if[binary_operation[member[.value], !=, literal[null]]] begin[{] call[v.add, parameter[member[.value]]] else begin[{] call[mHeaderFields.remove, parameter[member[.key]]] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[addInternalHeaderFields] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[value] operator[SEP] { identifier[String] identifier[key] operator[=] identifier[normalisedHeaderName] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[Vector] operator[<] identifier[String] operator[>] identifier[v] operator[=] identifier[getHeaders] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[v] operator[==] Other[null] operator[SEP] { identifier[v] operator[=] Keyword[new] identifier[Vector] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[mHeaderFields] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[v] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[value] operator[!=] Other[null] operator[SEP] { identifier[v] operator[SEP] identifier[add] operator[SEP] identifier[value] operator[SEP] operator[SEP] } Keyword[else] { identifier[mHeaderFields] operator[SEP] identifier[remove] operator[SEP] identifier[key] operator[SEP] operator[SEP] } }
public void setTopContributors(java.util.Collection<Contributor> topContributors) { if (topContributors == null) { this.topContributors = null; return; } this.topContributors = new java.util.ArrayList<Contributor>(topContributors); }
class class_name[name] begin[{] method[setTopContributors, return_type[void], modifier[public], parameter[topContributors]] begin[{] if[binary_operation[member[.topContributors], ==, literal[null]]] begin[{] assign[THIS[member[None.topContributors]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.topContributors]], ClassCreator(arguments=[MemberReference(member=topContributors, 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=Contributor, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setTopContributors] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[Contributor] operator[>] identifier[topContributors] operator[SEP] { Keyword[if] operator[SEP] identifier[topContributors] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[topContributors] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[topContributors] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[Contributor] operator[>] operator[SEP] identifier[topContributors] operator[SEP] operator[SEP] }
public String convertIfcVibrationIsolatorTypeEnumToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); }
class class_name[name] begin[{] method[convertIfcVibrationIsolatorTypeEnumToString, return_type[type[String]], modifier[public], parameter[eDataType, instanceValue]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=instanceValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=instanceValue, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))] end[}] END[}]
Keyword[public] identifier[String] identifier[convertIfcVibrationIsolatorTypeEnumToString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[Object] identifier[instanceValue] operator[SEP] { Keyword[return] identifier[instanceValue] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[instanceValue] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
private static List<Validate> createActivationSpec(Connector cmd, List<Failure> failures, ResourceBundle rb, ClassLoader cl) { List<Validate> result = new ArrayList<Validate>(); if (cmd.getVersion() != Version.V_10 && cmd.getResourceadapter() != null && cmd.getResourceadapter().getInboundResourceadapter() != null && cmd.getResourceadapter().getInboundResourceadapter().getMessageadapter() != null && cmd.getResourceadapter().getInboundResourceadapter().getMessageadapter().getMessagelisteners() != null) { List<MessageListener> mlMetas = cmd.getResourceadapter() .getInboundResourceadapter().getMessageadapter() .getMessagelisteners(); if (!mlMetas.isEmpty()) { for (MessageListener mlMeta : mlMetas) { if (mlMeta.getActivationspec() != null && mlMeta.getActivationspec().getActivationspecClass() != null && !mlMeta.getActivationspec().getActivationspecClass().equals(XsdString.NULL_XSDSTRING)) { if (mlMeta.getActivationspec().getConfigProperties() != null && !mlMeta.getActivationspec().getConfigProperties().isEmpty()) { try { Class<?> clazz = Class.forName(mlMeta.getActivationspec().getActivationspecClass().getValue(), true, cl); List<ConfigProperty> configProperties = mlMeta.getActivationspec().getConfigProperties(); ValidateClass vc = new ValidateClass(Key.ACTIVATION_SPEC, clazz, configProperties); result.add(vc); } catch (ClassNotFoundException e) { Failure failure = new Failure(Severity.ERROR, rb.getString("uncategorized"), rb.getString("as.cnfe"), e.getMessage()); failures.add(failure); } } } } } } return result; }
class class_name[name] begin[{] method[createActivationSpec, return_type[type[List]], modifier[private static], parameter[cmd, failures, rb, cl]] begin[{] local_variable[type[List], result] if[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[call[cmd.getVersion, parameter[]], !=, member[Version.V_10]], &&, binary_operation[call[cmd.getResourceadapter, parameter[]], !=, literal[null]]], &&, binary_operation[call[cmd.getResourceadapter, parameter[]], !=, literal[null]]], &&, binary_operation[call[cmd.getResourceadapter, parameter[]], !=, literal[null]]], &&, binary_operation[call[cmd.getResourceadapter, parameter[]], !=, literal[null]]]] begin[{] local_variable[type[List], mlMetas] if[call[mlMetas.isEmpty, parameter[]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getActivationspec, postfix_operators=[], prefix_operators=[], qualifier=mlMeta, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getActivationspec, postfix_operators=[], prefix_operators=[], qualifier=mlMeta, selectors=[MethodInvocation(arguments=[], member=getActivationspecClass, 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=null), operator=!=), operator=&&), operandr=MethodInvocation(arguments=[], member=getActivationspec, postfix_operators=[], prefix_operators=['!'], qualifier=mlMeta, selectors=[MethodInvocation(arguments=[], member=getActivationspecClass, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=NULL_XSDSTRING, postfix_operators=[], prefix_operators=[], qualifier=XsdString, 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=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getActivationspec, postfix_operators=[], prefix_operators=[], qualifier=mlMeta, selectors=[MethodInvocation(arguments=[], member=getConfigProperties, 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=null), operator=!=), operandr=MethodInvocation(arguments=[], member=getActivationspec, postfix_operators=[], prefix_operators=['!'], qualifier=mlMeta, selectors=[MethodInvocation(arguments=[], member=getConfigProperties, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=isEmpty, 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=[TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getActivationspec, postfix_operators=[], prefix_operators=[], qualifier=mlMeta, selectors=[MethodInvocation(arguments=[], member=getActivationspecClass, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), MemberReference(member=cl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[], type_arguments=None), name=clazz)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getActivationspec, postfix_operators=[], prefix_operators=[], qualifier=mlMeta, selectors=[MethodInvocation(arguments=[], member=getConfigProperties, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=configProperties)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ConfigProperty, sub_type=None))], dimensions=[], name=List, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=ACTIVATION_SPEC, postfix_operators=[], prefix_operators=[], qualifier=Key, selectors=[]), MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=configProperties, 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=ValidateClass, sub_type=None)), name=vc)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ValidateClass, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=vc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=ERROR, postfix_operators=[], prefix_operators=[], qualifier=Severity, selectors=[]), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="uncategorized")], member=getString, postfix_operators=[], prefix_operators=[], qualifier=rb, selectors=[], type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="as.cnfe")], member=getString, postfix_operators=[], prefix_operators=[], qualifier=rb, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Failure, sub_type=None)), name=failure)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Failure, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=failure, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=failures, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ClassNotFoundException']))], finally_block=None, label=None, resources=None)]))]))]), control=EnhancedForControl(iterable=MemberReference(member=mlMetas, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=mlMeta)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MessageListener, sub_type=None))), label=None) else begin[{] None end[}] else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[private] Keyword[static] identifier[List] operator[<] identifier[Validate] operator[>] identifier[createActivationSpec] operator[SEP] identifier[Connector] identifier[cmd] , identifier[List] operator[<] identifier[Failure] operator[>] identifier[failures] , identifier[ResourceBundle] identifier[rb] , identifier[ClassLoader] identifier[cl] operator[SEP] { identifier[List] operator[<] identifier[Validate] operator[>] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Validate] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cmd] operator[SEP] identifier[getVersion] operator[SEP] operator[SEP] operator[!=] identifier[Version] operator[SEP] identifier[V_10] operator[&&] identifier[cmd] operator[SEP] identifier[getResourceadapter] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[cmd] operator[SEP] identifier[getResourceadapter] operator[SEP] operator[SEP] operator[SEP] identifier[getInboundResourceadapter] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[cmd] operator[SEP] identifier[getResourceadapter] operator[SEP] operator[SEP] operator[SEP] identifier[getInboundResourceadapter] operator[SEP] operator[SEP] operator[SEP] identifier[getMessageadapter] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[cmd] operator[SEP] identifier[getResourceadapter] operator[SEP] operator[SEP] operator[SEP] identifier[getInboundResourceadapter] operator[SEP] operator[SEP] operator[SEP] identifier[getMessageadapter] operator[SEP] operator[SEP] operator[SEP] identifier[getMessagelisteners] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[List] operator[<] identifier[MessageListener] operator[>] identifier[mlMetas] operator[=] identifier[cmd] operator[SEP] identifier[getResourceadapter] operator[SEP] operator[SEP] operator[SEP] identifier[getInboundResourceadapter] operator[SEP] operator[SEP] operator[SEP] identifier[getMessageadapter] operator[SEP] operator[SEP] operator[SEP] identifier[getMessagelisteners] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[mlMetas] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[MessageListener] identifier[mlMeta] operator[:] identifier[mlMetas] operator[SEP] { Keyword[if] operator[SEP] identifier[mlMeta] operator[SEP] identifier[getActivationspec] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[mlMeta] operator[SEP] identifier[getActivationspec] operator[SEP] operator[SEP] operator[SEP] identifier[getActivationspecClass] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] operator[!] identifier[mlMeta] operator[SEP] identifier[getActivationspec] operator[SEP] operator[SEP] operator[SEP] identifier[getActivationspecClass] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[XsdString] operator[SEP] identifier[NULL_XSDSTRING] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[mlMeta] operator[SEP] identifier[getActivationspec] operator[SEP] operator[SEP] operator[SEP] identifier[getConfigProperties] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] operator[!] identifier[mlMeta] operator[SEP] identifier[getActivationspec] operator[SEP] operator[SEP] operator[SEP] identifier[getConfigProperties] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[=] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[mlMeta] operator[SEP] identifier[getActivationspec] operator[SEP] operator[SEP] operator[SEP] identifier[getActivationspecClass] operator[SEP] operator[SEP] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] , literal[boolean] , identifier[cl] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[ConfigProperty] operator[>] identifier[configProperties] operator[=] identifier[mlMeta] operator[SEP] identifier[getActivationspec] operator[SEP] operator[SEP] operator[SEP] identifier[getConfigProperties] operator[SEP] operator[SEP] operator[SEP] identifier[ValidateClass] identifier[vc] operator[=] Keyword[new] identifier[ValidateClass] operator[SEP] identifier[Key] operator[SEP] identifier[ACTIVATION_SPEC] , identifier[clazz] , identifier[configProperties] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[add] operator[SEP] identifier[vc] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ClassNotFoundException] identifier[e] operator[SEP] { identifier[Failure] identifier[failure] operator[=] Keyword[new] identifier[Failure] operator[SEP] identifier[Severity] operator[SEP] identifier[ERROR] , identifier[rb] operator[SEP] identifier[getString] operator[SEP] literal[String] operator[SEP] , identifier[rb] operator[SEP] identifier[getString] operator[SEP] literal[String] operator[SEP] , identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[failures] operator[SEP] identifier[add] operator[SEP] identifier[failure] operator[SEP] operator[SEP] } } } } } } Keyword[return] identifier[result] operator[SEP] }
@ConditionalOnMissingBean @Lazy // Not needed for InProcessChannelFactories @Bean public NameResolver.Factory grpcNameResolverFactory(final GrpcChannelsProperties channelProperties) { return new ConfigMappedNameResolverFactory(channelProperties, NameResolverProvider.asFactory(), StaticNameResolverProvider.STATIC_DEFAULT_URI_MAPPER); }
class class_name[name] begin[{] method[grpcNameResolverFactory, return_type[type[NameResolver]], modifier[public], parameter[channelProperties]] begin[{] return[ClassCreator(arguments=[MemberReference(member=channelProperties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=asFactory, postfix_operators=[], prefix_operators=[], qualifier=NameResolverProvider, selectors=[], type_arguments=None), MemberReference(member=STATIC_DEFAULT_URI_MAPPER, postfix_operators=[], prefix_operators=[], qualifier=StaticNameResolverProvider, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ConfigMappedNameResolverFactory, sub_type=None))] end[}] END[}]
annotation[@] identifier[ConditionalOnMissingBean] annotation[@] identifier[Lazy] annotation[@] identifier[Bean] Keyword[public] identifier[NameResolver] operator[SEP] identifier[Factory] identifier[grpcNameResolverFactory] operator[SEP] Keyword[final] identifier[GrpcChannelsProperties] identifier[channelProperties] operator[SEP] { Keyword[return] Keyword[new] identifier[ConfigMappedNameResolverFactory] operator[SEP] identifier[channelProperties] , identifier[NameResolverProvider] operator[SEP] identifier[asFactory] operator[SEP] operator[SEP] , identifier[StaticNameResolverProvider] operator[SEP] identifier[STATIC_DEFAULT_URI_MAPPER] operator[SEP] operator[SEP] }
public List getChilds(String label) { if (label == null || label.equals("")) return new ArrayList(0); String[] generation = label.split("/"); String child = generation[0]; String grandchild = ""; if (generation.length > 1) { for (int i = 1; i < generation.length; i++) { grandchild += (grandchild.equals("") ? "" : "/"); grandchild += generation[i]; } } List ret = new ArrayList(childs.size()); Iterator it = childs.iterator(); while (it.hasNext()) { AbcNode abcn = (AbcNode) it.next(); if (abcn.getLabel().equals(child)) { if (grandchild.equals("")) ret.add(abcn); else ret.addAll(abcn.getChilds(grandchild)); } } return ret; }
class class_name[name] begin[{] method[getChilds, return_type[type[List]], modifier[public], parameter[label]] begin[{] if[binary_operation[binary_operation[member[.label], ==, literal[null]], ||, call[label.equals, parameter[literal[""]]]]] begin[{] return[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=ArrayList, sub_type=None))] else begin[{] None end[}] local_variable[type[String], generation] local_variable[type[String], child] local_variable[type[String], grandchild] if[binary_operation[member[generation.length], >, literal[1]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=grandchild, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=TernaryExpression(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=grandchild, selectors=[], type_arguments=None), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/"), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=grandchild, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=generation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=generation, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) else begin[{] None end[}] local_variable[type[List], ret] local_variable[type[Iterator], it] while[call[it.hasNext, parameter[]]] begin[{] local_variable[type[AbcNode], abcn] if[call[abcn.getLabel, parameter[]]] begin[{] if[call[grandchild.equals, parameter[literal[""]]]] begin[{] call[ret.add, parameter[member[.abcn]]] else begin[{] call[ret.addAll, parameter[call[abcn.getChilds, parameter[member[.grandchild]]]]] end[}] else begin[{] None end[}] end[}] return[member[.ret]] end[}] END[}]
Keyword[public] identifier[List] identifier[getChilds] operator[SEP] identifier[String] identifier[label] operator[SEP] { Keyword[if] operator[SEP] identifier[label] operator[==] Other[null] operator[||] identifier[label] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ArrayList] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[generation] operator[=] identifier[label] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[child] operator[=] identifier[generation] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[String] identifier[grandchild] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[generation] operator[SEP] identifier[length] operator[>] Other[1] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[1] operator[SEP] identifier[i] operator[<] identifier[generation] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[grandchild] operator[+=] operator[SEP] identifier[grandchild] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[?] literal[String] operator[:] literal[String] operator[SEP] operator[SEP] identifier[grandchild] operator[+=] identifier[generation] operator[SEP] identifier[i] operator[SEP] operator[SEP] } } identifier[List] identifier[ret] operator[=] Keyword[new] identifier[ArrayList] operator[SEP] identifier[childs] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Iterator] identifier[it] operator[=] identifier[childs] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[it] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[AbcNode] identifier[abcn] operator[=] operator[SEP] identifier[AbcNode] operator[SEP] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[abcn] operator[SEP] identifier[getLabel] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[child] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[grandchild] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[ret] operator[SEP] identifier[add] operator[SEP] identifier[abcn] operator[SEP] operator[SEP] Keyword[else] identifier[ret] operator[SEP] identifier[addAll] operator[SEP] identifier[abcn] operator[SEP] identifier[getChilds] operator[SEP] identifier[grandchild] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[ret] operator[SEP] }
public static QueryCreator creator(final String pathAssistantSid, final String language, final String query) { return new QueryCreator(pathAssistantSid, language, query); }
class class_name[name] begin[{] method[creator, return_type[type[QueryCreator]], modifier[public static], parameter[pathAssistantSid, language, query]] begin[{] return[ClassCreator(arguments=[MemberReference(member=pathAssistantSid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=language, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=query, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=QueryCreator, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[QueryCreator] identifier[creator] operator[SEP] Keyword[final] identifier[String] identifier[pathAssistantSid] , Keyword[final] identifier[String] identifier[language] , Keyword[final] identifier[String] identifier[query] operator[SEP] { Keyword[return] Keyword[new] identifier[QueryCreator] operator[SEP] identifier[pathAssistantSid] , identifier[language] , identifier[query] operator[SEP] operator[SEP] }
public Process exec(V1Pod pod, String[] command, boolean stdin) throws ApiException, IOException { return exec(pod, command, null, stdin, false); }
class class_name[name] begin[{] method[exec, return_type[type[Process]], modifier[public], parameter[pod, command, stdin]] begin[{] return[call[.exec, parameter[member[.pod], member[.command], literal[null], member[.stdin], literal[false]]]] end[}] END[}]
Keyword[public] identifier[Process] identifier[exec] operator[SEP] identifier[V1Pod] identifier[pod] , identifier[String] operator[SEP] operator[SEP] identifier[command] , Keyword[boolean] identifier[stdin] operator[SEP] Keyword[throws] identifier[ApiException] , identifier[IOException] { Keyword[return] identifier[exec] operator[SEP] identifier[pod] , identifier[command] , Other[null] , identifier[stdin] , literal[boolean] operator[SEP] operator[SEP] }
public void setCARevocationFile(Path caRevocationFile) { try { _caRevocationFile = caRevocationFile.toRealPath().toString(); } catch (IOException e) { throw new RuntimeException(e); } }
class class_name[name] begin[{] method[setCARevocationFile, return_type[void], modifier[public], parameter[caRevocationFile]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=_caRevocationFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=toRealPath, postfix_operators=[], prefix_operators=[], qualifier=caRevocationFile, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[setCARevocationFile] operator[SEP] identifier[Path] identifier[caRevocationFile] operator[SEP] { Keyword[try] { identifier[_caRevocationFile] operator[=] identifier[caRevocationFile] operator[SEP] identifier[toRealPath] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
public static Geometry convert(JGeometry geometry) { switch (geometry.getType()) { case GTYPE_COLLECTION: return convertCollection(geometry); case GTYPE_CURVE: return convertCurve(geometry); case GTYPE_MULTICURVE: return convertMultiCurve(geometry); case GTYPE_MULTIPOINT: return convertMultiPoint(geometry); case GTYPE_MULTIPOLYGON: return convertMultiPolygon(geometry); case GTYPE_POINT: return convertPoint(geometry); case GTYPE_POLYGON: return convertPolygon(geometry); default: throw new IllegalArgumentException(geometry.toString()); } }
class class_name[name] begin[{] method[convert, return_type[type[Geometry]], modifier[public static], parameter[geometry]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['GTYPE_COLLECTION'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=geometry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convertCollection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=['GTYPE_CURVE'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=geometry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convertCurve, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=['GTYPE_MULTICURVE'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=geometry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convertMultiCurve, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=['GTYPE_MULTIPOINT'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=geometry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convertMultiPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=['GTYPE_MULTIPOLYGON'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=geometry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convertMultiPolygon, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=['GTYPE_POINT'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=geometry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convertPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=['GTYPE_POLYGON'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=geometry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convertPolygon, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=geometry, 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)])], expression=MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=geometry, selectors=[], type_arguments=None), label=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[Geometry] identifier[convert] operator[SEP] identifier[JGeometry] identifier[geometry] operator[SEP] { Keyword[switch] operator[SEP] identifier[geometry] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] identifier[GTYPE_COLLECTION] operator[:] Keyword[return] identifier[convertCollection] operator[SEP] identifier[geometry] operator[SEP] operator[SEP] Keyword[case] identifier[GTYPE_CURVE] operator[:] Keyword[return] identifier[convertCurve] operator[SEP] identifier[geometry] operator[SEP] operator[SEP] Keyword[case] identifier[GTYPE_MULTICURVE] operator[:] Keyword[return] identifier[convertMultiCurve] operator[SEP] identifier[geometry] operator[SEP] operator[SEP] Keyword[case] identifier[GTYPE_MULTIPOINT] operator[:] Keyword[return] identifier[convertMultiPoint] operator[SEP] identifier[geometry] operator[SEP] operator[SEP] Keyword[case] identifier[GTYPE_MULTIPOLYGON] operator[:] Keyword[return] identifier[convertMultiPolygon] operator[SEP] identifier[geometry] operator[SEP] operator[SEP] Keyword[case] identifier[GTYPE_POINT] operator[:] Keyword[return] identifier[convertPoint] operator[SEP] identifier[geometry] operator[SEP] operator[SEP] Keyword[case] identifier[GTYPE_POLYGON] operator[:] Keyword[return] identifier[convertPolygon] operator[SEP] identifier[geometry] operator[SEP] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[geometry] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
private static void addStickyFooterDivider(Context ctx, ViewGroup footerView) { LinearLayout divider = new LinearLayout(ctx); LinearLayout.LayoutParams dividerParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); divider.setMinimumHeight((int) UIUtils.convertDpToPixel(1, ctx)); divider.setOrientation(LinearLayout.VERTICAL); divider.setBackgroundColor(UIUtils.getThemeColorFromAttrOrRes(ctx, R.attr.material_drawer_divider, R.color.material_drawer_divider)); footerView.addView(divider, dividerParams); }
class class_name[name] begin[{] method[addStickyFooterDivider, return_type[void], modifier[private static], parameter[ctx, footerView]] begin[{] local_variable[type[LinearLayout], divider] local_variable[type[LinearLayout], dividerParams] call[divider.setMinimumHeight, parameter[Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), MemberReference(member=ctx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convertDpToPixel, postfix_operators=[], prefix_operators=[], qualifier=UIUtils, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int))]] call[divider.setOrientation, parameter[member[LinearLayout.VERTICAL]]] call[divider.setBackgroundColor, parameter[call[UIUtils.getThemeColorFromAttrOrRes, parameter[member[.ctx], member[R.attr.material_drawer_divider], member[R.color.material_drawer_divider]]]]] call[footerView.addView, parameter[member[.divider], member[.dividerParams]]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[addStickyFooterDivider] operator[SEP] identifier[Context] identifier[ctx] , identifier[ViewGroup] identifier[footerView] operator[SEP] { identifier[LinearLayout] identifier[divider] operator[=] Keyword[new] identifier[LinearLayout] operator[SEP] identifier[ctx] operator[SEP] operator[SEP] identifier[LinearLayout] operator[SEP] identifier[LayoutParams] identifier[dividerParams] operator[=] Keyword[new] identifier[LinearLayout] operator[SEP] identifier[LayoutParams] operator[SEP] identifier[ViewGroup] operator[SEP] identifier[LayoutParams] operator[SEP] identifier[MATCH_PARENT] , identifier[ViewGroup] operator[SEP] identifier[LayoutParams] operator[SEP] identifier[WRAP_CONTENT] operator[SEP] operator[SEP] identifier[divider] operator[SEP] identifier[setMinimumHeight] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[UIUtils] operator[SEP] identifier[convertDpToPixel] operator[SEP] Other[1] , identifier[ctx] operator[SEP] operator[SEP] operator[SEP] identifier[divider] operator[SEP] identifier[setOrientation] operator[SEP] identifier[LinearLayout] operator[SEP] identifier[VERTICAL] operator[SEP] operator[SEP] identifier[divider] operator[SEP] identifier[setBackgroundColor] operator[SEP] identifier[UIUtils] operator[SEP] identifier[getThemeColorFromAttrOrRes] operator[SEP] identifier[ctx] , identifier[R] operator[SEP] identifier[attr] operator[SEP] identifier[material_drawer_divider] , identifier[R] operator[SEP] identifier[color] operator[SEP] identifier[material_drawer_divider] operator[SEP] operator[SEP] operator[SEP] identifier[footerView] operator[SEP] identifier[addView] operator[SEP] identifier[divider] , identifier[dividerParams] operator[SEP] operator[SEP] }
public synchronized void invalidateFile(WriterPoolMember f) throws IOException { try { destroyWriter(f); } catch (Exception e) { // Convert exception. throw new IOException(e.getMessage()); } // It'll have been closed. Rename with an '.invalid' suffix so it // gets attention. File file = f.getFile(); file.renameTo(new File(file.getAbsoluteFile() + WriterPoolMember.INVALID_SUFFIX)); }
class class_name[name] begin[{] method[invalidateFile, return_type[void], modifier[synchronized public], parameter[f]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=destroyWriter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) local_variable[type[File], file] call[file.renameTo, parameter[ClassCreator(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=getAbsoluteFile, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[], type_arguments=None), operandr=MemberReference(member=INVALID_SUFFIX, postfix_operators=[], prefix_operators=[], qualifier=WriterPoolMember, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[void] identifier[invalidateFile] operator[SEP] identifier[WriterPoolMember] identifier[f] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[try] { identifier[destroyWriter] operator[SEP] identifier[f] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[File] identifier[file] operator[=] identifier[f] operator[SEP] identifier[getFile] operator[SEP] operator[SEP] operator[SEP] identifier[file] operator[SEP] identifier[renameTo] operator[SEP] Keyword[new] identifier[File] operator[SEP] identifier[file] operator[SEP] identifier[getAbsoluteFile] operator[SEP] operator[SEP] operator[+] identifier[WriterPoolMember] operator[SEP] identifier[INVALID_SUFFIX] operator[SEP] operator[SEP] operator[SEP] }
public static int[] parseDestinationsString(String s) { if (!s.contains(",")) { return new int[]{Integer.valueOf(s.trim())}; } String[] array = s.split(","); int[] destinations = new int[array.length]; for (int i = 0; i < destinations.length; i++) { final String stringWithNoWhiteSpaces = array[i].replaceAll("\\s", ""); if (stringWithNoWhiteSpaces.isEmpty()) { throw new IllegalArgumentException("Empty destination. Too many commas?"); } destinations[i] = Integer.valueOf(stringWithNoWhiteSpaces); } return destinations; }
class class_name[name] begin[{] method[parseDestinationsString, return_type[type[int]], modifier[public static], parameter[s]] begin[{] if[call[s.contains, parameter[literal[","]]]] begin[{] return[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=trim, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int))] else begin[{] None end[}] local_variable[type[String], array] local_variable[type[int], destinations] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\\s"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=replaceAll, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=stringWithNoWhiteSpaces)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=stringWithNoWhiteSpaces, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Empty destination. Too many commas?")], 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)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=destinations, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[MemberReference(member=stringWithNoWhiteSpaces, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Integer, 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=destinations, 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[.destinations]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] operator[SEP] operator[SEP] identifier[parseDestinationsString] operator[SEP] identifier[String] identifier[s] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[s] operator[SEP] identifier[contains] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] Keyword[int] operator[SEP] operator[SEP] { identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[s] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] } operator[SEP] } identifier[String] operator[SEP] operator[SEP] identifier[array] operator[=] identifier[s] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[destinations] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[array] 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[destinations] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[final] identifier[String] identifier[stringWithNoWhiteSpaces] operator[=] identifier[array] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[replaceAll] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[stringWithNoWhiteSpaces] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[destinations] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[stringWithNoWhiteSpaces] operator[SEP] operator[SEP] } Keyword[return] identifier[destinations] operator[SEP] }
public final Flux<T> doOnSubscribe(Consumer<? super Subscription> onSubscribe) { Objects.requireNonNull(onSubscribe, "onSubscribe"); return doOnSignal(this, onSubscribe, null, null, null, null, null, null); }
class class_name[name] begin[{] method[doOnSubscribe, return_type[type[Flux]], modifier[final public], parameter[onSubscribe]] begin[{] call[Objects.requireNonNull, parameter[member[.onSubscribe], literal["onSubscribe"]]] return[call[.doOnSignal, parameter[THIS[], member[.onSubscribe], literal[null], literal[null], literal[null], literal[null], literal[null], literal[null]]]] end[}] END[}]
Keyword[public] Keyword[final] identifier[Flux] operator[<] identifier[T] operator[>] identifier[doOnSubscribe] operator[SEP] identifier[Consumer] operator[<] operator[?] Keyword[super] identifier[Subscription] operator[>] identifier[onSubscribe] operator[SEP] { identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[onSubscribe] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[doOnSignal] operator[SEP] Keyword[this] , identifier[onSubscribe] , Other[null] , Other[null] , Other[null] , Other[null] , Other[null] , Other[null] operator[SEP] operator[SEP] }
public final byte[] decode(byte[] source, int off, int len) { int len34 = len * 3 / 4; byte[] outBuff = new byte[len34]; // upper limit on size of output int outBuffPosn = 0; byte[] b4 = new byte[4]; int b4Posn = 0; int i = 0; byte sbiCrop = 0; byte sbiDecode = 0; for (i = off; i < off + len; i++) { sbiCrop = (byte)(source[i] & 0x7f); // only the low seven bits sbiDecode = DECODABET[sbiCrop]; if (sbiDecode >= WHITE_SPACE_ENC) { // white space, equals sign or better if (sbiDecode >= PADDING_CHAR_ENC) { b4[b4Posn++] = sbiCrop; if (b4Posn > 3) { outBuffPosn += decode4to3(b4, 0, outBuff, outBuffPosn); b4Posn = 0; // if that was the padding char, break out of 'for' loop if (sbiCrop == PADDING_CHAR) { break; } } // end if: quartet built } // end if: equals sign or better } // end if: white space, equals sign or better else { //discard } } // each input character byte[] out = new byte[outBuffPosn]; System.arraycopy(outBuff, 0, out, 0, outBuffPosn); return out; }
class class_name[name] begin[{] method[decode, return_type[type[byte]], modifier[final public], parameter[source, off, len]] begin[{] local_variable[type[int], len34] local_variable[type[byte], outBuff] local_variable[type[int], outBuffPosn] local_variable[type[byte], b4] local_variable[type[int], b4Posn] local_variable[type[int], i] local_variable[type[byte], sbiCrop] local_variable[type[byte], sbiDecode] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=sbiCrop, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=BinaryOperation(operandl=MemberReference(member=source, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x7f), operator=&), type=BasicType(dimensions=[], name=byte))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=sbiDecode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=DECODABET, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=sbiCrop, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=sbiDecode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=WHITE_SPACE_ENC, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), else_statement=BlockStatement(label=None, statements=[]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=sbiDecode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=PADDING_CHAR_ENC, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=b4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=b4Posn, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=sbiCrop, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=b4Posn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=outBuffPosn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[MemberReference(member=b4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=outBuff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=outBuffPosn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=decode4to3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=b4Posn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=sbiCrop, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=PADDING_CHAR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)]))]))]))]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=off, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operator=<), init=[Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=off, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))], update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) local_variable[type[byte], out] call[System.arraycopy, parameter[member[.outBuff], literal[0], member[.out], literal[0], member[.outBuffPosn]]] return[member[.out]] end[}] END[}]
Keyword[public] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[decode] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[source] , Keyword[int] identifier[off] , Keyword[int] identifier[len] operator[SEP] { Keyword[int] identifier[len34] operator[=] identifier[len] operator[*] Other[3] operator[/] Other[4] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[outBuff] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[len34] operator[SEP] operator[SEP] Keyword[int] identifier[outBuffPosn] operator[=] Other[0] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[b4] operator[=] Keyword[new] Keyword[byte] operator[SEP] Other[4] operator[SEP] operator[SEP] Keyword[int] identifier[b4Posn] operator[=] Other[0] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] Keyword[byte] identifier[sbiCrop] operator[=] Other[0] operator[SEP] Keyword[byte] identifier[sbiDecode] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[i] operator[=] identifier[off] operator[SEP] identifier[i] operator[<] identifier[off] operator[+] identifier[len] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[sbiCrop] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[source] operator[SEP] identifier[i] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[SEP] identifier[sbiDecode] operator[=] identifier[DECODABET] operator[SEP] identifier[sbiCrop] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sbiDecode] operator[>=] identifier[WHITE_SPACE_ENC] operator[SEP] { Keyword[if] operator[SEP] identifier[sbiDecode] operator[>=] identifier[PADDING_CHAR_ENC] operator[SEP] { identifier[b4] operator[SEP] identifier[b4Posn] operator[++] operator[SEP] operator[=] identifier[sbiCrop] operator[SEP] Keyword[if] operator[SEP] identifier[b4Posn] operator[>] Other[3] operator[SEP] { identifier[outBuffPosn] operator[+=] identifier[decode4to3] operator[SEP] identifier[b4] , Other[0] , identifier[outBuff] , identifier[outBuffPosn] operator[SEP] operator[SEP] identifier[b4Posn] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[sbiCrop] operator[==] identifier[PADDING_CHAR] operator[SEP] { Keyword[break] operator[SEP] } } } } Keyword[else] { } } Keyword[byte] operator[SEP] operator[SEP] identifier[out] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[outBuffPosn] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[outBuff] , Other[0] , identifier[out] , Other[0] , identifier[outBuffPosn] operator[SEP] operator[SEP] Keyword[return] identifier[out] operator[SEP] }
public void setupSFields() { this.getRecord(FieldData.FIELD_DATA_FILE).getField(FieldData.FIELD_NAME).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(FieldData.FIELD_DATA_FILE).getField(FieldData.FIELD_SEQ_NO).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(FieldData.FIELD_DATA_FILE).getField(FieldData.FIELD_CLASS).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(FieldData.FIELD_DATA_FILE).getField(FieldData.BASE_FIELD_NAME).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); ScreenLocation lastFieldPosition; Record query = this.getMainRecord(); for (int fieldSeq = query.getFieldSeq(FieldData.MINIMUM_LENGTH); fieldSeq <= query.getFieldSeq(FieldData.FIELD_TYPE); fieldSeq++) { lastFieldPosition = this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR); Converter converter = query.getField(fieldSeq); if (query.getFieldSeq(FieldData.DEFAULT_VALUE) == fieldSeq) converter = new CheckConverter((Converter)converter, "old", null, true); converter.setupDefaultView(lastFieldPosition, this, ScreenConstants.DISPLAY_DESC); // Add this view to the list } this.getRecord(FieldData.FIELD_DATA_FILE).getField(FieldData.FIELD_NOT_NULL).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(FieldData.FIELD_DATA_FILE).getField(FieldData.INCLUDE_SCOPE).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(FieldData.FIELD_DATA_FILE).getField(FieldData.HIDDEN).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); }
class class_name[name] begin[{] method[setupSFields, return_type[void], modifier[public], parameter[]] begin[{] THIS[call[None.getRecord, parameter[member[FieldData.FIELD_DATA_FILE]]]call[None.getField, parameter[member[FieldData.FIELD_NAME]]]call[None.setupDefaultView, parameter[THIS[call[None.getNextLocation, parameter[member[ScreenConstants.NEXT_LOGICAL], member[ScreenConstants.ANCHOR_DEFAULT]]]], THIS[], member[ScreenConstants.DEFAULT_DISPLAY]]]] THIS[call[None.getRecord, parameter[member[FieldData.FIELD_DATA_FILE]]]call[None.getField, parameter[member[FieldData.FIELD_SEQ_NO]]]call[None.setupDefaultView, parameter[THIS[call[None.getNextLocation, parameter[member[ScreenConstants.NEXT_LOGICAL], member[ScreenConstants.ANCHOR_DEFAULT]]]], THIS[], member[ScreenConstants.DEFAULT_DISPLAY]]]] THIS[call[None.getRecord, parameter[member[FieldData.FIELD_DATA_FILE]]]call[None.getField, parameter[member[FieldData.FIELD_CLASS]]]call[None.setupDefaultView, parameter[THIS[call[None.getNextLocation, parameter[member[ScreenConstants.NEXT_LOGICAL], member[ScreenConstants.ANCHOR_DEFAULT]]]], THIS[], member[ScreenConstants.DEFAULT_DISPLAY]]]] THIS[call[None.getRecord, parameter[member[FieldData.FIELD_DATA_FILE]]]call[None.getField, parameter[member[FieldData.BASE_FIELD_NAME]]]call[None.setupDefaultView, parameter[THIS[call[None.getNextLocation, parameter[member[ScreenConstants.NEXT_LOGICAL], member[ScreenConstants.ANCHOR_DEFAULT]]]], THIS[], member[ScreenConstants.DEFAULT_DISPLAY]]]] local_variable[type[ScreenLocation], lastFieldPosition] local_variable[type[Record], query] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastFieldPosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=NEXT_LOGICAL, postfix_operators=[], prefix_operators=[], qualifier=ScreenConstants, selectors=[]), MemberReference(member=SET_ANCHOR, postfix_operators=[], prefix_operators=[], qualifier=ScreenConstants, selectors=[])], member=getNextLocation, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=fieldSeq, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getField, postfix_operators=[], prefix_operators=[], qualifier=query, selectors=[], type_arguments=None), name=converter)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Converter, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=DEFAULT_VALUE, postfix_operators=[], prefix_operators=[], qualifier=FieldData, selectors=[])], member=getFieldSeq, postfix_operators=[], prefix_operators=[], qualifier=query, selectors=[], type_arguments=None), operandr=MemberReference(member=fieldSeq, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=converter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[Cast(expression=MemberReference(member=converter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Converter, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="old"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), 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=CheckConverter, sub_type=None))), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=lastFieldPosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=DISPLAY_DESC, postfix_operators=[], prefix_operators=[], qualifier=ScreenConstants, selectors=[])], member=setupDefaultView, postfix_operators=[], prefix_operators=[], qualifier=converter, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=fieldSeq, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[MemberReference(member=FIELD_TYPE, postfix_operators=[], prefix_operators=[], qualifier=FieldData, selectors=[])], member=getFieldSeq, postfix_operators=[], prefix_operators=[], qualifier=query, selectors=[], type_arguments=None), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[MemberReference(member=MINIMUM_LENGTH, postfix_operators=[], prefix_operators=[], qualifier=FieldData, selectors=[])], member=getFieldSeq, postfix_operators=[], prefix_operators=[], qualifier=query, selectors=[], type_arguments=None), name=fieldSeq)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=fieldSeq, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) THIS[call[None.getRecord, parameter[member[FieldData.FIELD_DATA_FILE]]]call[None.getField, parameter[member[FieldData.FIELD_NOT_NULL]]]call[None.setupDefaultView, parameter[THIS[call[None.getNextLocation, parameter[member[ScreenConstants.NEXT_LOGICAL], member[ScreenConstants.ANCHOR_DEFAULT]]]], THIS[], member[ScreenConstants.DEFAULT_DISPLAY]]]] THIS[call[None.getRecord, parameter[member[FieldData.FIELD_DATA_FILE]]]call[None.getField, parameter[member[FieldData.INCLUDE_SCOPE]]]call[None.setupDefaultView, parameter[THIS[call[None.getNextLocation, parameter[member[ScreenConstants.NEXT_LOGICAL], member[ScreenConstants.ANCHOR_DEFAULT]]]], THIS[], member[ScreenConstants.DEFAULT_DISPLAY]]]] THIS[call[None.getRecord, parameter[member[FieldData.FIELD_DATA_FILE]]]call[None.getField, parameter[member[FieldData.HIDDEN]]]call[None.setupDefaultView, parameter[THIS[call[None.getNextLocation, parameter[member[ScreenConstants.NEXT_LOGICAL], member[ScreenConstants.ANCHOR_DEFAULT]]]], THIS[], member[ScreenConstants.DEFAULT_DISPLAY]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setupSFields] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[getRecord] operator[SEP] identifier[FieldData] operator[SEP] identifier[FIELD_DATA_FILE] operator[SEP] operator[SEP] identifier[getField] operator[SEP] identifier[FieldData] operator[SEP] identifier[FIELD_NAME] operator[SEP] operator[SEP] identifier[setupDefaultView] operator[SEP] Keyword[this] operator[SEP] identifier[getNextLocation] operator[SEP] identifier[ScreenConstants] operator[SEP] identifier[NEXT_LOGICAL] , identifier[ScreenConstants] operator[SEP] identifier[ANCHOR_DEFAULT] operator[SEP] , Keyword[this] , identifier[ScreenConstants] operator[SEP] identifier[DEFAULT_DISPLAY] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[getRecord] operator[SEP] identifier[FieldData] operator[SEP] identifier[FIELD_DATA_FILE] operator[SEP] operator[SEP] identifier[getField] operator[SEP] identifier[FieldData] operator[SEP] identifier[FIELD_SEQ_NO] operator[SEP] operator[SEP] identifier[setupDefaultView] operator[SEP] Keyword[this] operator[SEP] identifier[getNextLocation] operator[SEP] identifier[ScreenConstants] operator[SEP] identifier[NEXT_LOGICAL] , identifier[ScreenConstants] operator[SEP] identifier[ANCHOR_DEFAULT] operator[SEP] , Keyword[this] , identifier[ScreenConstants] operator[SEP] identifier[DEFAULT_DISPLAY] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[getRecord] operator[SEP] identifier[FieldData] operator[SEP] identifier[FIELD_DATA_FILE] operator[SEP] operator[SEP] identifier[getField] operator[SEP] identifier[FieldData] operator[SEP] identifier[FIELD_CLASS] operator[SEP] operator[SEP] identifier[setupDefaultView] operator[SEP] Keyword[this] operator[SEP] identifier[getNextLocation] operator[SEP] identifier[ScreenConstants] operator[SEP] identifier[NEXT_LOGICAL] , identifier[ScreenConstants] operator[SEP] identifier[ANCHOR_DEFAULT] operator[SEP] , Keyword[this] , identifier[ScreenConstants] operator[SEP] identifier[DEFAULT_DISPLAY] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[getRecord] operator[SEP] identifier[FieldData] operator[SEP] identifier[FIELD_DATA_FILE] operator[SEP] operator[SEP] identifier[getField] operator[SEP] identifier[FieldData] operator[SEP] identifier[BASE_FIELD_NAME] operator[SEP] operator[SEP] identifier[setupDefaultView] operator[SEP] Keyword[this] operator[SEP] identifier[getNextLocation] operator[SEP] identifier[ScreenConstants] operator[SEP] identifier[NEXT_LOGICAL] , identifier[ScreenConstants] operator[SEP] identifier[ANCHOR_DEFAULT] operator[SEP] , Keyword[this] , identifier[ScreenConstants] operator[SEP] identifier[DEFAULT_DISPLAY] operator[SEP] operator[SEP] identifier[ScreenLocation] identifier[lastFieldPosition] operator[SEP] identifier[Record] identifier[query] operator[=] Keyword[this] operator[SEP] identifier[getMainRecord] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[fieldSeq] operator[=] identifier[query] operator[SEP] identifier[getFieldSeq] operator[SEP] identifier[FieldData] operator[SEP] identifier[MINIMUM_LENGTH] operator[SEP] operator[SEP] identifier[fieldSeq] operator[<=] identifier[query] operator[SEP] identifier[getFieldSeq] operator[SEP] identifier[FieldData] operator[SEP] identifier[FIELD_TYPE] operator[SEP] operator[SEP] identifier[fieldSeq] operator[++] operator[SEP] { identifier[lastFieldPosition] operator[=] Keyword[this] operator[SEP] identifier[getNextLocation] operator[SEP] identifier[ScreenConstants] operator[SEP] identifier[NEXT_LOGICAL] , identifier[ScreenConstants] operator[SEP] identifier[SET_ANCHOR] operator[SEP] operator[SEP] identifier[Converter] identifier[converter] operator[=] identifier[query] operator[SEP] identifier[getField] operator[SEP] identifier[fieldSeq] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[query] operator[SEP] identifier[getFieldSeq] operator[SEP] identifier[FieldData] operator[SEP] identifier[DEFAULT_VALUE] operator[SEP] operator[==] identifier[fieldSeq] operator[SEP] identifier[converter] operator[=] Keyword[new] identifier[CheckConverter] operator[SEP] operator[SEP] identifier[Converter] operator[SEP] identifier[converter] , literal[String] , Other[null] , literal[boolean] operator[SEP] operator[SEP] identifier[converter] operator[SEP] identifier[setupDefaultView] operator[SEP] identifier[lastFieldPosition] , Keyword[this] , identifier[ScreenConstants] operator[SEP] identifier[DISPLAY_DESC] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[getRecord] operator[SEP] identifier[FieldData] operator[SEP] identifier[FIELD_DATA_FILE] operator[SEP] operator[SEP] identifier[getField] operator[SEP] identifier[FieldData] operator[SEP] identifier[FIELD_NOT_NULL] operator[SEP] operator[SEP] identifier[setupDefaultView] operator[SEP] Keyword[this] operator[SEP] identifier[getNextLocation] operator[SEP] identifier[ScreenConstants] operator[SEP] identifier[NEXT_LOGICAL] , identifier[ScreenConstants] operator[SEP] identifier[ANCHOR_DEFAULT] operator[SEP] , Keyword[this] , identifier[ScreenConstants] operator[SEP] identifier[DEFAULT_DISPLAY] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[getRecord] operator[SEP] identifier[FieldData] operator[SEP] identifier[FIELD_DATA_FILE] operator[SEP] operator[SEP] identifier[getField] operator[SEP] identifier[FieldData] operator[SEP] identifier[INCLUDE_SCOPE] operator[SEP] operator[SEP] identifier[setupDefaultView] operator[SEP] Keyword[this] operator[SEP] identifier[getNextLocation] operator[SEP] identifier[ScreenConstants] operator[SEP] identifier[NEXT_LOGICAL] , identifier[ScreenConstants] operator[SEP] identifier[ANCHOR_DEFAULT] operator[SEP] , Keyword[this] , identifier[ScreenConstants] operator[SEP] identifier[DEFAULT_DISPLAY] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[getRecord] operator[SEP] identifier[FieldData] operator[SEP] identifier[FIELD_DATA_FILE] operator[SEP] operator[SEP] identifier[getField] operator[SEP] identifier[FieldData] operator[SEP] identifier[HIDDEN] operator[SEP] operator[SEP] identifier[setupDefaultView] operator[SEP] Keyword[this] operator[SEP] identifier[getNextLocation] operator[SEP] identifier[ScreenConstants] operator[SEP] identifier[NEXT_LOGICAL] , identifier[ScreenConstants] operator[SEP] identifier[ANCHOR_DEFAULT] operator[SEP] , Keyword[this] , identifier[ScreenConstants] operator[SEP] identifier[DEFAULT_DISPLAY] operator[SEP] operator[SEP] }
public static RuntimeException onRejectedExecution(Throwable original, Context context) { return onRejectedExecution(original, null, null, null, context); }
class class_name[name] begin[{] method[onRejectedExecution, return_type[type[RuntimeException]], modifier[public static], parameter[original, context]] begin[{] return[call[.onRejectedExecution, parameter[member[.original], literal[null], literal[null], literal[null], member[.context]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[RuntimeException] identifier[onRejectedExecution] operator[SEP] identifier[Throwable] identifier[original] , identifier[Context] identifier[context] operator[SEP] { Keyword[return] identifier[onRejectedExecution] operator[SEP] identifier[original] , Other[null] , Other[null] , Other[null] , identifier[context] operator[SEP] operator[SEP] }
public boolean recover() throws IOException { if (!input.isCached()) { throw new IllegalStateException("can't recover using input that isn't cached"); } synchronized (input) { // Seek a byte after last position input.seek(pos + 1); int tag = input.read(); while (tag != 28) { if (tag == -1) { // We've reached EOF, no more datasets to return close(); return false; } tag = input.read(); } pos = input.position() - 1; input.seek(pos); return true; } }
class class_name[name] begin[{] method[recover, return_type[type[boolean]], modifier[public], parameter[]] begin[{] if[call[input.isCached, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="can't recover using input that isn't cached")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] SYNCHRONIZED[member[.input]] BEGIN[{] call[input.seek, parameter[binary_operation[member[.pos], +, literal[1]]]] local_variable[type[int], tag] while[binary_operation[member[.tag], !=, literal[28]]] begin[{] if[binary_operation[member[.tag], ==, literal[1]]] begin[{] call[.close, parameter[]] return[literal[false]] else begin[{] None end[}] assign[member[.tag], call[input.read, parameter[]]] end[}] assign[member[.pos], binary_operation[call[input.position, parameter[]], -, literal[1]]] call[input.seek, parameter[member[.pos]]] return[literal[true]] END[}] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[recover] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] operator[!] identifier[input] operator[SEP] identifier[isCached] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[synchronized] operator[SEP] identifier[input] operator[SEP] { identifier[input] operator[SEP] identifier[seek] operator[SEP] identifier[pos] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[int] identifier[tag] operator[=] identifier[input] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[tag] operator[!=] Other[28] operator[SEP] { Keyword[if] operator[SEP] identifier[tag] operator[==] operator[-] Other[1] operator[SEP] { identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } identifier[tag] operator[=] identifier[input] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] } identifier[pos] operator[=] identifier[input] operator[SEP] identifier[position] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] identifier[input] operator[SEP] identifier[seek] operator[SEP] identifier[pos] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } }
public static XStream createXStream() { final Class<?>[] classes = new Class[] { Dependencies.class, Package.class, DependsOn.class, NotDependsOn.class, Dependency.class }; final XStream xstream = new XStream(); XStream.setupDefaultSecurity(xstream); xstream.allowTypes(classes); xstream.alias("dependencies", Dependencies.class); xstream.alias("package", Package.class); xstream.alias("dependsOn", DependsOn.class); xstream.alias("notDependsOn", NotDependsOn.class); xstream.aliasField("package", Dependency.class, "packageName"); xstream.useAttributeFor(Package.class, "name"); xstream.useAttributeFor(Package.class, "comment"); xstream.useAttributeFor(Dependency.class, "packageName"); xstream.useAttributeFor(Dependency.class, "includeSubPackages"); xstream.useAttributeFor(NotDependsOn.class, "comment"); xstream.addImplicitCollection(Package.class, "dependencies"); return xstream; }
class class_name[name] begin[{] method[createXStream, return_type[type[XStream]], modifier[public static], parameter[]] begin[{] local_variable[type[Class], classes] local_variable[type[XStream], xstream] call[XStream.setupDefaultSecurity, parameter[member[.xstream]]] call[xstream.allowTypes, parameter[member[.classes]]] call[xstream.alias, parameter[literal["dependencies"], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Dependencies, sub_type=None))]] call[xstream.alias, parameter[literal["package"], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Package, sub_type=None))]] call[xstream.alias, parameter[literal["dependsOn"], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DependsOn, sub_type=None))]] call[xstream.alias, parameter[literal["notDependsOn"], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NotDependsOn, sub_type=None))]] call[xstream.aliasField, parameter[literal["package"], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Dependency, sub_type=None)), literal["packageName"]]] call[xstream.useAttributeFor, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Package, sub_type=None)), literal["name"]]] call[xstream.useAttributeFor, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Package, sub_type=None)), literal["comment"]]] call[xstream.useAttributeFor, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Dependency, sub_type=None)), literal["packageName"]]] call[xstream.useAttributeFor, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Dependency, sub_type=None)), literal["includeSubPackages"]]] call[xstream.useAttributeFor, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NotDependsOn, sub_type=None)), literal["comment"]]] call[xstream.addImplicitCollection, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Package, sub_type=None)), literal["dependencies"]]] return[member[.xstream]] end[}] END[}]
Keyword[public] Keyword[static] identifier[XStream] identifier[createXStream] operator[SEP] operator[SEP] { Keyword[final] identifier[Class] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[classes] operator[=] Keyword[new] identifier[Class] operator[SEP] operator[SEP] { identifier[Dependencies] operator[SEP] Keyword[class] , identifier[Package] operator[SEP] Keyword[class] , identifier[DependsOn] operator[SEP] Keyword[class] , identifier[NotDependsOn] operator[SEP] Keyword[class] , identifier[Dependency] operator[SEP] Keyword[class] } operator[SEP] Keyword[final] identifier[XStream] identifier[xstream] operator[=] Keyword[new] identifier[XStream] operator[SEP] operator[SEP] operator[SEP] identifier[XStream] operator[SEP] identifier[setupDefaultSecurity] operator[SEP] identifier[xstream] operator[SEP] operator[SEP] identifier[xstream] operator[SEP] identifier[allowTypes] operator[SEP] identifier[classes] operator[SEP] operator[SEP] identifier[xstream] operator[SEP] identifier[alias] operator[SEP] literal[String] , identifier[Dependencies] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[xstream] operator[SEP] identifier[alias] operator[SEP] literal[String] , identifier[Package] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[xstream] operator[SEP] identifier[alias] operator[SEP] literal[String] , identifier[DependsOn] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[xstream] operator[SEP] identifier[alias] operator[SEP] literal[String] , identifier[NotDependsOn] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[xstream] operator[SEP] identifier[aliasField] operator[SEP] literal[String] , identifier[Dependency] operator[SEP] Keyword[class] , literal[String] operator[SEP] operator[SEP] identifier[xstream] operator[SEP] identifier[useAttributeFor] operator[SEP] identifier[Package] operator[SEP] Keyword[class] , literal[String] operator[SEP] operator[SEP] identifier[xstream] operator[SEP] identifier[useAttributeFor] operator[SEP] identifier[Package] operator[SEP] Keyword[class] , literal[String] operator[SEP] operator[SEP] identifier[xstream] operator[SEP] identifier[useAttributeFor] operator[SEP] identifier[Dependency] operator[SEP] Keyword[class] , literal[String] operator[SEP] operator[SEP] identifier[xstream] operator[SEP] identifier[useAttributeFor] operator[SEP] identifier[Dependency] operator[SEP] Keyword[class] , literal[String] operator[SEP] operator[SEP] identifier[xstream] operator[SEP] identifier[useAttributeFor] operator[SEP] identifier[NotDependsOn] operator[SEP] Keyword[class] , literal[String] operator[SEP] operator[SEP] identifier[xstream] operator[SEP] identifier[addImplicitCollection] operator[SEP] identifier[Package] operator[SEP] Keyword[class] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[xstream] operator[SEP] }
public final EObject ruleXAnnotationElementValueOrCommaList() throws RecognitionException { EObject current = null; Token otherlv_1=null; Token otherlv_2=null; Token otherlv_4=null; Token otherlv_6=null; Token otherlv_9=null; EObject lv_elements_3_0 = null; EObject lv_elements_5_0 = null; EObject this_XAnnotationOrExpression_7 = null; EObject lv_elements_10_0 = null; enterRule(); try { // InternalSARL.g:11740:2: ( ( ( ( ( ( () '#' '[' ) )=> ( () otherlv_1= '#' otherlv_2= '[' ) ) ( ( (lv_elements_3_0= ruleXAnnotationOrExpression ) ) (otherlv_4= ',' ( (lv_elements_5_0= ruleXAnnotationOrExpression ) ) )* )? otherlv_6= ']' ) | (this_XAnnotationOrExpression_7= ruleXAnnotationOrExpression ( () (otherlv_9= ',' ( (lv_elements_10_0= ruleXAnnotationOrExpression ) ) )+ )? ) ) ) // InternalSARL.g:11741:2: ( ( ( ( ( () '#' '[' ) )=> ( () otherlv_1= '#' otherlv_2= '[' ) ) ( ( (lv_elements_3_0= ruleXAnnotationOrExpression ) ) (otherlv_4= ',' ( (lv_elements_5_0= ruleXAnnotationOrExpression ) ) )* )? otherlv_6= ']' ) | (this_XAnnotationOrExpression_7= ruleXAnnotationOrExpression ( () (otherlv_9= ',' ( (lv_elements_10_0= ruleXAnnotationOrExpression ) ) )+ )? ) ) { // InternalSARL.g:11741:2: ( ( ( ( ( () '#' '[' ) )=> ( () otherlv_1= '#' otherlv_2= '[' ) ) ( ( (lv_elements_3_0= ruleXAnnotationOrExpression ) ) (otherlv_4= ',' ( (lv_elements_5_0= ruleXAnnotationOrExpression ) ) )* )? otherlv_6= ']' ) | (this_XAnnotationOrExpression_7= ruleXAnnotationOrExpression ( () (otherlv_9= ',' ( (lv_elements_10_0= ruleXAnnotationOrExpression ) ) )+ )? ) ) int alt293=2; alt293 = dfa293.predict(input); switch (alt293) { case 1 : // InternalSARL.g:11742:3: ( ( ( ( () '#' '[' ) )=> ( () otherlv_1= '#' otherlv_2= '[' ) ) ( ( (lv_elements_3_0= ruleXAnnotationOrExpression ) ) (otherlv_4= ',' ( (lv_elements_5_0= ruleXAnnotationOrExpression ) ) )* )? otherlv_6= ']' ) { // InternalSARL.g:11742:3: ( ( ( ( () '#' '[' ) )=> ( () otherlv_1= '#' otherlv_2= '[' ) ) ( ( (lv_elements_3_0= ruleXAnnotationOrExpression ) ) (otherlv_4= ',' ( (lv_elements_5_0= ruleXAnnotationOrExpression ) ) )* )? otherlv_6= ']' ) // InternalSARL.g:11743:4: ( ( ( () '#' '[' ) )=> ( () otherlv_1= '#' otherlv_2= '[' ) ) ( ( (lv_elements_3_0= ruleXAnnotationOrExpression ) ) (otherlv_4= ',' ( (lv_elements_5_0= ruleXAnnotationOrExpression ) ) )* )? otherlv_6= ']' { // InternalSARL.g:11743:4: ( ( ( () '#' '[' ) )=> ( () otherlv_1= '#' otherlv_2= '[' ) ) // InternalSARL.g:11744:5: ( ( () '#' '[' ) )=> ( () otherlv_1= '#' otherlv_2= '[' ) { // InternalSARL.g:11751:5: ( () otherlv_1= '#' otherlv_2= '[' ) // InternalSARL.g:11752:6: () otherlv_1= '#' otherlv_2= '[' { // InternalSARL.g:11752:6: () // InternalSARL.g:11753:7: { if ( state.backtracking==0 ) { current = forceCreateModelElement( grammarAccess.getXAnnotationElementValueOrCommaListAccess().getXListLiteralAction_0_0_0_0(), current); } } otherlv_1=(Token)match(input,106,FOLLOW_90); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_1, grammarAccess.getXAnnotationElementValueOrCommaListAccess().getNumberSignKeyword_0_0_0_1()); } otherlv_2=(Token)match(input,55,FOLLOW_110); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_2, grammarAccess.getXAnnotationElementValueOrCommaListAccess().getLeftSquareBracketKeyword_0_0_0_2()); } } } // InternalSARL.g:11769:4: ( ( (lv_elements_3_0= ruleXAnnotationOrExpression ) ) (otherlv_4= ',' ( (lv_elements_5_0= ruleXAnnotationOrExpression ) ) )* )? int alt290=2; int LA290_0 = input.LA(1); if ( ((LA290_0>=RULE_STRING && LA290_0<=RULE_RICH_TEXT_START)||(LA290_0>=RULE_HEX && LA290_0<=RULE_DECIMAL)||LA290_0==25||(LA290_0>=28 && LA290_0<=29)||LA290_0==36||(LA290_0>=39 && LA290_0<=40)||(LA290_0>=42 && LA290_0<=45)||(LA290_0>=48 && LA290_0<=49)||LA290_0==51||LA290_0==55||(LA290_0>=60 && LA290_0<=63)||(LA290_0>=67 && LA290_0<=68)||(LA290_0>=73 && LA290_0<=75)||(LA290_0>=78 && LA290_0<=96)||(LA290_0>=105 && LA290_0<=106)||LA290_0==129||(LA290_0>=131 && LA290_0<=140)) ) { alt290=1; } switch (alt290) { case 1 : // InternalSARL.g:11770:5: ( (lv_elements_3_0= ruleXAnnotationOrExpression ) ) (otherlv_4= ',' ( (lv_elements_5_0= ruleXAnnotationOrExpression ) ) )* { // InternalSARL.g:11770:5: ( (lv_elements_3_0= ruleXAnnotationOrExpression ) ) // InternalSARL.g:11771:6: (lv_elements_3_0= ruleXAnnotationOrExpression ) { // InternalSARL.g:11771:6: (lv_elements_3_0= ruleXAnnotationOrExpression ) // InternalSARL.g:11772:7: lv_elements_3_0= ruleXAnnotationOrExpression { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getXAnnotationElementValueOrCommaListAccess().getElementsXAnnotationOrExpressionParserRuleCall_0_1_0_0()); } pushFollow(FOLLOW_111); lv_elements_3_0=ruleXAnnotationOrExpression(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getXAnnotationElementValueOrCommaListRule()); } add( current, "elements", lv_elements_3_0, "org.eclipse.xtext.xbase.annotations.XbaseWithAnnotations.XAnnotationOrExpression"); afterParserOrEnumRuleCall(); } } } // InternalSARL.g:11789:5: (otherlv_4= ',' ( (lv_elements_5_0= ruleXAnnotationOrExpression ) ) )* loop289: do { int alt289=2; int LA289_0 = input.LA(1); if ( (LA289_0==32) ) { alt289=1; } switch (alt289) { case 1 : // InternalSARL.g:11790:6: otherlv_4= ',' ( (lv_elements_5_0= ruleXAnnotationOrExpression ) ) { otherlv_4=(Token)match(input,32,FOLLOW_69); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_4, grammarAccess.getXAnnotationElementValueOrCommaListAccess().getCommaKeyword_0_1_1_0()); } // InternalSARL.g:11794:6: ( (lv_elements_5_0= ruleXAnnotationOrExpression ) ) // InternalSARL.g:11795:7: (lv_elements_5_0= ruleXAnnotationOrExpression ) { // InternalSARL.g:11795:7: (lv_elements_5_0= ruleXAnnotationOrExpression ) // InternalSARL.g:11796:8: lv_elements_5_0= ruleXAnnotationOrExpression { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getXAnnotationElementValueOrCommaListAccess().getElementsXAnnotationOrExpressionParserRuleCall_0_1_1_1_0()); } pushFollow(FOLLOW_111); lv_elements_5_0=ruleXAnnotationOrExpression(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getXAnnotationElementValueOrCommaListRule()); } add( current, "elements", lv_elements_5_0, "org.eclipse.xtext.xbase.annotations.XbaseWithAnnotations.XAnnotationOrExpression"); afterParserOrEnumRuleCall(); } } } } break; default : break loop289; } } while (true); } break; } otherlv_6=(Token)match(input,56,FOLLOW_2); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_6, grammarAccess.getXAnnotationElementValueOrCommaListAccess().getRightSquareBracketKeyword_0_2()); } } } break; case 2 : // InternalSARL.g:11821:3: (this_XAnnotationOrExpression_7= ruleXAnnotationOrExpression ( () (otherlv_9= ',' ( (lv_elements_10_0= ruleXAnnotationOrExpression ) ) )+ )? ) { // InternalSARL.g:11821:3: (this_XAnnotationOrExpression_7= ruleXAnnotationOrExpression ( () (otherlv_9= ',' ( (lv_elements_10_0= ruleXAnnotationOrExpression ) ) )+ )? ) // InternalSARL.g:11822:4: this_XAnnotationOrExpression_7= ruleXAnnotationOrExpression ( () (otherlv_9= ',' ( (lv_elements_10_0= ruleXAnnotationOrExpression ) ) )+ )? { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getXAnnotationElementValueOrCommaListAccess().getXAnnotationOrExpressionParserRuleCall_1_0()); } pushFollow(FOLLOW_72); this_XAnnotationOrExpression_7=ruleXAnnotationOrExpression(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { current = this_XAnnotationOrExpression_7; afterParserOrEnumRuleCall(); } // InternalSARL.g:11830:4: ( () (otherlv_9= ',' ( (lv_elements_10_0= ruleXAnnotationOrExpression ) ) )+ )? int alt292=2; int LA292_0 = input.LA(1); if ( (LA292_0==32) ) { alt292=1; } switch (alt292) { case 1 : // InternalSARL.g:11831:5: () (otherlv_9= ',' ( (lv_elements_10_0= ruleXAnnotationOrExpression ) ) )+ { // InternalSARL.g:11831:5: () // InternalSARL.g:11832:6: { if ( state.backtracking==0 ) { current = forceCreateModelElementAndAdd( grammarAccess.getXAnnotationElementValueOrCommaListAccess().getXListLiteralElementsAction_1_1_0(), current); } } // InternalSARL.g:11838:5: (otherlv_9= ',' ( (lv_elements_10_0= ruleXAnnotationOrExpression ) ) )+ int cnt291=0; loop291: do { int alt291=2; int LA291_0 = input.LA(1); if ( (LA291_0==32) ) { alt291=1; } switch (alt291) { case 1 : // InternalSARL.g:11839:6: otherlv_9= ',' ( (lv_elements_10_0= ruleXAnnotationOrExpression ) ) { otherlv_9=(Token)match(input,32,FOLLOW_69); if (state.failed) return current; if ( state.backtracking==0 ) { newLeafNode(otherlv_9, grammarAccess.getXAnnotationElementValueOrCommaListAccess().getCommaKeyword_1_1_1_0()); } // InternalSARL.g:11843:6: ( (lv_elements_10_0= ruleXAnnotationOrExpression ) ) // InternalSARL.g:11844:7: (lv_elements_10_0= ruleXAnnotationOrExpression ) { // InternalSARL.g:11844:7: (lv_elements_10_0= ruleXAnnotationOrExpression ) // InternalSARL.g:11845:8: lv_elements_10_0= ruleXAnnotationOrExpression { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getXAnnotationElementValueOrCommaListAccess().getElementsXAnnotationOrExpressionParserRuleCall_1_1_1_1_0()); } pushFollow(FOLLOW_72); lv_elements_10_0=ruleXAnnotationOrExpression(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getXAnnotationElementValueOrCommaListRule()); } add( current, "elements", lv_elements_10_0, "org.eclipse.xtext.xbase.annotations.XbaseWithAnnotations.XAnnotationOrExpression"); afterParserOrEnumRuleCall(); } } } } break; default : if ( cnt291 >= 1 ) break loop291; if (state.backtracking>0) {state.failed=true; return current;} EarlyExitException eee = new EarlyExitException(291, input); throw eee; } cnt291++; } while (true); } break; } } } break; } } if ( state.backtracking==0 ) { leaveRule(); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; }
class class_name[name] begin[{] method[ruleXAnnotationElementValueOrCommaList, return_type[type[EObject]], modifier[final public], parameter[]] begin[{] local_variable[type[EObject], current] local_variable[type[Token], otherlv_1] local_variable[type[Token], otherlv_2] local_variable[type[Token], otherlv_4] local_variable[type[Token], otherlv_6] local_variable[type[Token], otherlv_9] local_variable[type[EObject], lv_elements_3_0] local_variable[type[EObject], lv_elements_5_0] local_variable[type[EObject], this_XAnnotationOrExpression_7] local_variable[type[EObject], lv_elements_10_0] call[.enterRule, parameter[]] TryStatement(block=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt293)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt293, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=predict, postfix_operators=[], prefix_operators=[], qualifier=dfa293, selectors=[], type_arguments=None)), label=None), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[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=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getXAnnotationElementValueOrCommaListAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getXListLiteralAction_0_0_0_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forceCreateModelElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]))]), StatementExpression(expression=Assignment(expressionl=MemberReference(member=otherlv_1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=106), MemberReference(member=FOLLOW_90, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Token, sub_type=None))), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=[MemberReference(member=otherlv_1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getXAnnotationElementValueOrCommaListAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getNumberSignKeyword_0_0_0_1, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newLeafNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=otherlv_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=55), MemberReference(member=FOLLOW_110, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Token, sub_type=None))), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=[MemberReference(member=otherlv_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getXAnnotationElementValueOrCommaListAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getLeftSquareBracketKeyword_0_0_0_2, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newLeafNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))])]), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt290)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA290_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA290_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=RULE_STRING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA290_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=RULE_RICH_TEXT_START, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA290_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=RULE_HEX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA290_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=RULE_DECIMAL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA290_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=25), operator===), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA290_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=28), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA290_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=29), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA290_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=36), operator===), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA290_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=39), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA290_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=40), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA290_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=42), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA290_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=45), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA290_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=48), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA290_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=49), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA290_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=51), operator===), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA290_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=55), operator===), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA290_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=60), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA290_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=63), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA290_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=67), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA290_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=68), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA290_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=73), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA290_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=75), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA290_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=78), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA290_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=96), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA290_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=105), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA290_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=106), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA290_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=129), operator===), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA290_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=131), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA290_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=140), operator=<=), operator=&&), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt290, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)])), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[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=getXAnnotationElementValueOrCommaListAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getElementsXAnnotationOrExpressionParserRuleCall_0_1_0_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_111, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=lv_elements_3_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=ruleXAnnotationOrExpression, 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=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=current, 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=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getXAnnotationElementValueOrCommaListRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=createModelElementForParent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="elements"), MemberReference(member=lv_elements_3_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="org.eclipse.xtext.xbase.annotations.XbaseWithAnnotations.XAnnotationOrExpression")], member=add, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=afterParserOrEnumRuleCall, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))])]), DoStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt289)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA289_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA289_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt289, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)])), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=otherlv_4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32), MemberReference(member=FOLLOW_69, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Token, sub_type=None))), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=[MemberReference(member=otherlv_4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getXAnnotationElementValueOrCommaListAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getCommaKeyword_0_1_1_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newLeafNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), 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=getXAnnotationElementValueOrCommaListAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getElementsXAnnotationOrExpressionParserRuleCall_0_1_1_1_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_111, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=lv_elements_5_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=ruleXAnnotationOrExpression, 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=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=current, 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=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getXAnnotationElementValueOrCommaListRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=createModelElementForParent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="elements"), MemberReference(member=lv_elements_5_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="org.eclipse.xtext.xbase.annotations.XbaseWithAnnotations.XAnnotationOrExpression")], member=add, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=afterParserOrEnumRuleCall, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))])])]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=loop289, label=None)])], expression=MemberReference(member=alt289, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=loop289)]), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=alt290, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=otherlv_6, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=56), MemberReference(member=FOLLOW_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Token, sub_type=None))), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=[MemberReference(member=otherlv_6, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getXAnnotationElementValueOrCommaListAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getRightSquareBracketKeyword_0_2, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newLeafNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))])]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], statements=[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=getXAnnotationElementValueOrCommaListAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getXAnnotationOrExpressionParserRuleCall_1_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_72, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=this_XAnnotationOrExpression_7, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=ruleXAnnotationOrExpression, 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=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=this_XAnnotationOrExpression_7, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=afterParserOrEnumRuleCall, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt292)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA292_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA292_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt292, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)])), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[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=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getXAnnotationElementValueOrCommaListAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getXListLiteralElementsAction_1_1_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forceCreateModelElementAndAdd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]))]), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=cnt291)], modifiers=set(), type=BasicType(dimensions=[], name=int)), DoStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt291)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA291_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA291_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt291, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)])), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=otherlv_9, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32), MemberReference(member=FOLLOW_69, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Token, sub_type=None))), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=[MemberReference(member=otherlv_9, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getXAnnotationElementValueOrCommaListAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getCommaKeyword_1_1_1_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newLeafNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), 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=getXAnnotationElementValueOrCommaListAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getElementsXAnnotationOrExpressionParserRuleCall_1_1_1_1_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_72, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=lv_elements_10_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=ruleXAnnotationOrExpression, 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=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=current, 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=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getXAnnotationElementValueOrCommaListRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=createModelElementForParent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="elements"), MemberReference(member=lv_elements_10_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="org.eclipse.xtext.xbase.annotations.XbaseWithAnnotations.XAnnotationOrExpression")], member=add, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=afterParserOrEnumRuleCall, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))])])]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=cnt291, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>=), else_statement=None, label=None, then_statement=BreakStatement(goto=loop291, 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=Assignment(expressionl=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=291), 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=EarlyExitException, sub_type=None)), name=eee)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=EarlyExitException, sub_type=None)), ThrowStatement(expression=MemberReference(member=eee, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])], expression=MemberReference(member=alt291, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=MemberReference(member=cnt291, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]), condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=loop291)]), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=alt292, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])]), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=alt293, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=[], member=leaveRule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=appendSkippedTokens, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=[], label=None, resources=None) return[member[.current]] end[}] END[}]
Keyword[public] Keyword[final] identifier[EObject] identifier[ruleXAnnotationElementValueOrCommaList] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { identifier[EObject] identifier[current] operator[=] Other[null] operator[SEP] identifier[Token] identifier[otherlv_1] operator[=] Other[null] operator[SEP] identifier[Token] identifier[otherlv_2] operator[=] Other[null] operator[SEP] identifier[Token] identifier[otherlv_4] operator[=] Other[null] operator[SEP] identifier[Token] identifier[otherlv_6] operator[=] Other[null] operator[SEP] identifier[Token] identifier[otherlv_9] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[lv_elements_3_0] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[lv_elements_5_0] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[this_XAnnotationOrExpression_7] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[lv_elements_10_0] operator[=] Other[null] operator[SEP] identifier[enterRule] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { { Keyword[int] identifier[alt293] operator[=] Other[2] operator[SEP] identifier[alt293] operator[=] identifier[dfa293] operator[SEP] identifier[predict] operator[SEP] identifier[input] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[alt293] operator[SEP] { Keyword[case] Other[1] operator[:] { { { { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[current] operator[=] identifier[forceCreateModelElement] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXAnnotationElementValueOrCommaListAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getXListLiteralAction_0_0_0_0] operator[SEP] operator[SEP] , identifier[current] operator[SEP] operator[SEP] } } identifier[otherlv_1] operator[=] operator[SEP] identifier[Token] operator[SEP] identifier[match] operator[SEP] identifier[input] , Other[106] , identifier[FOLLOW_90] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newLeafNode] operator[SEP] identifier[otherlv_1] , identifier[grammarAccess] operator[SEP] identifier[getXAnnotationElementValueOrCommaListAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getNumberSignKeyword_0_0_0_1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[otherlv_2] operator[=] operator[SEP] identifier[Token] operator[SEP] identifier[match] operator[SEP] identifier[input] , Other[55] , identifier[FOLLOW_110] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newLeafNode] operator[SEP] identifier[otherlv_2] , identifier[grammarAccess] operator[SEP] identifier[getXAnnotationElementValueOrCommaListAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getLeftSquareBracketKeyword_0_0_0_2] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[int] identifier[alt290] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA290_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] operator[SEP] identifier[LA290_0] operator[>=] identifier[RULE_STRING] operator[&&] identifier[LA290_0] operator[<=] identifier[RULE_RICH_TEXT_START] operator[SEP] operator[||] operator[SEP] identifier[LA290_0] operator[>=] identifier[RULE_HEX] operator[&&] identifier[LA290_0] operator[<=] identifier[RULE_DECIMAL] operator[SEP] operator[||] identifier[LA290_0] operator[==] Other[25] operator[||] operator[SEP] identifier[LA290_0] operator[>=] Other[28] operator[&&] identifier[LA290_0] operator[<=] Other[29] operator[SEP] operator[||] identifier[LA290_0] operator[==] Other[36] operator[||] operator[SEP] identifier[LA290_0] operator[>=] Other[39] operator[&&] identifier[LA290_0] operator[<=] Other[40] operator[SEP] operator[||] operator[SEP] identifier[LA290_0] operator[>=] Other[42] operator[&&] identifier[LA290_0] operator[<=] Other[45] operator[SEP] operator[||] operator[SEP] identifier[LA290_0] operator[>=] Other[48] operator[&&] identifier[LA290_0] operator[<=] Other[49] operator[SEP] operator[||] identifier[LA290_0] operator[==] Other[51] operator[||] identifier[LA290_0] operator[==] Other[55] operator[||] operator[SEP] identifier[LA290_0] operator[>=] Other[60] operator[&&] identifier[LA290_0] operator[<=] Other[63] operator[SEP] operator[||] operator[SEP] identifier[LA290_0] operator[>=] Other[67] operator[&&] identifier[LA290_0] operator[<=] Other[68] operator[SEP] operator[||] operator[SEP] identifier[LA290_0] operator[>=] Other[73] operator[&&] identifier[LA290_0] operator[<=] Other[75] operator[SEP] operator[||] operator[SEP] identifier[LA290_0] operator[>=] Other[78] operator[&&] identifier[LA290_0] operator[<=] Other[96] operator[SEP] operator[||] operator[SEP] identifier[LA290_0] operator[>=] Other[105] operator[&&] identifier[LA290_0] operator[<=] Other[106] operator[SEP] operator[||] identifier[LA290_0] operator[==] Other[129] operator[||] operator[SEP] identifier[LA290_0] operator[>=] Other[131] operator[&&] identifier[LA290_0] operator[<=] Other[140] operator[SEP] operator[SEP] operator[SEP] { identifier[alt290] operator[=] Other[1] operator[SEP] } Keyword[switch] operator[SEP] identifier[alt290] operator[SEP] { Keyword[case] Other[1] operator[:] { { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXAnnotationElementValueOrCommaListAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getElementsXAnnotationOrExpressionParserRuleCall_0_1_0_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_111] operator[SEP] operator[SEP] identifier[lv_elements_3_0] operator[=] identifier[ruleXAnnotationOrExpression] 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] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[current] operator[==] Other[null] operator[SEP] { identifier[current] operator[=] identifier[createModelElementForParent] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXAnnotationElementValueOrCommaListRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[add] operator[SEP] identifier[current] , literal[String] , identifier[lv_elements_3_0] , literal[String] operator[SEP] operator[SEP] identifier[afterParserOrEnumRuleCall] operator[SEP] operator[SEP] operator[SEP] } } } identifier[loop289] operator[:] Keyword[do] { Keyword[int] identifier[alt289] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA289_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA289_0] operator[==] Other[32] operator[SEP] operator[SEP] { identifier[alt289] operator[=] Other[1] operator[SEP] } Keyword[switch] operator[SEP] identifier[alt289] operator[SEP] { Keyword[case] Other[1] operator[:] { identifier[otherlv_4] operator[=] operator[SEP] identifier[Token] operator[SEP] identifier[match] operator[SEP] identifier[input] , Other[32] , identifier[FOLLOW_69] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newLeafNode] operator[SEP] identifier[otherlv_4] , identifier[grammarAccess] operator[SEP] identifier[getXAnnotationElementValueOrCommaListAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getCommaKeyword_0_1_1_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXAnnotationElementValueOrCommaListAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getElementsXAnnotationOrExpressionParserRuleCall_0_1_1_1_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_111] operator[SEP] operator[SEP] identifier[lv_elements_5_0] operator[=] identifier[ruleXAnnotationOrExpression] 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] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[current] operator[==] Other[null] operator[SEP] { identifier[current] operator[=] identifier[createModelElementForParent] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXAnnotationElementValueOrCommaListRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[add] operator[SEP] identifier[current] , literal[String] , identifier[lv_elements_5_0] , literal[String] operator[SEP] operator[SEP] identifier[afterParserOrEnumRuleCall] operator[SEP] operator[SEP] operator[SEP] } } } } Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[break] identifier[loop289] operator[SEP] } } Keyword[while] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] } identifier[otherlv_6] operator[=] operator[SEP] identifier[Token] operator[SEP] identifier[match] operator[SEP] identifier[input] , Other[56] , identifier[FOLLOW_2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newLeafNode] operator[SEP] identifier[otherlv_6] , identifier[grammarAccess] operator[SEP] identifier[getXAnnotationElementValueOrCommaListAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getRightSquareBracketKeyword_0_2] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[break] operator[SEP] Keyword[case] Other[2] operator[:] { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXAnnotationElementValueOrCommaListAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getXAnnotationOrExpressionParserRuleCall_1_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_72] operator[SEP] operator[SEP] identifier[this_XAnnotationOrExpression_7] operator[=] identifier[ruleXAnnotationOrExpression] 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] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[current] operator[=] identifier[this_XAnnotationOrExpression_7] operator[SEP] identifier[afterParserOrEnumRuleCall] operator[SEP] operator[SEP] operator[SEP] } Keyword[int] identifier[alt292] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA292_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA292_0] operator[==] Other[32] operator[SEP] operator[SEP] { identifier[alt292] operator[=] Other[1] operator[SEP] } Keyword[switch] operator[SEP] identifier[alt292] operator[SEP] { Keyword[case] Other[1] operator[:] { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[current] operator[=] identifier[forceCreateModelElementAndAdd] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXAnnotationElementValueOrCommaListAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getXListLiteralElementsAction_1_1_0] operator[SEP] operator[SEP] , identifier[current] operator[SEP] operator[SEP] } } Keyword[int] identifier[cnt291] operator[=] Other[0] operator[SEP] identifier[loop291] operator[:] Keyword[do] { Keyword[int] identifier[alt291] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA291_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA291_0] operator[==] Other[32] operator[SEP] operator[SEP] { identifier[alt291] operator[=] Other[1] operator[SEP] } Keyword[switch] operator[SEP] identifier[alt291] operator[SEP] { Keyword[case] Other[1] operator[:] { identifier[otherlv_9] operator[=] operator[SEP] identifier[Token] operator[SEP] identifier[match] operator[SEP] identifier[input] , Other[32] , identifier[FOLLOW_69] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newLeafNode] operator[SEP] identifier[otherlv_9] , identifier[grammarAccess] operator[SEP] identifier[getXAnnotationElementValueOrCommaListAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getCommaKeyword_1_1_1_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXAnnotationElementValueOrCommaListAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getElementsXAnnotationOrExpressionParserRuleCall_1_1_1_1_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_72] operator[SEP] operator[SEP] identifier[lv_elements_10_0] operator[=] identifier[ruleXAnnotationOrExpression] 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] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[current] operator[==] Other[null] operator[SEP] { identifier[current] operator[=] identifier[createModelElementForParent] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXAnnotationElementValueOrCommaListRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[add] operator[SEP] identifier[current] , literal[String] , identifier[lv_elements_10_0] , literal[String] operator[SEP] operator[SEP] identifier[afterParserOrEnumRuleCall] operator[SEP] operator[SEP] operator[SEP] } } } } Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[if] operator[SEP] identifier[cnt291] operator[>=] Other[1] operator[SEP] Keyword[break] identifier[loop291] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[>] Other[0] operator[SEP] { identifier[state] operator[SEP] identifier[failed] operator[=] literal[boolean] operator[SEP] Keyword[return] identifier[current] operator[SEP] } identifier[EarlyExitException] identifier[eee] operator[=] Keyword[new] identifier[EarlyExitException] operator[SEP] Other[291] , identifier[input] operator[SEP] operator[SEP] Keyword[throw] identifier[eee] operator[SEP] } identifier[cnt291] operator[++] operator[SEP] } Keyword[while] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] } } } Keyword[break] operator[SEP] } } Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[leaveRule] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[re] operator[SEP] { identifier[recover] operator[SEP] identifier[input] , identifier[re] operator[SEP] operator[SEP] identifier[appendSkippedTokens] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { } Keyword[return] identifier[current] operator[SEP] }
@Override public int append2SQLSelect(final Type _type, final SQLSelect _select, final int _tableIndex, final int _colIndex) { _select.column(_tableIndex, AbstractStoreResource.COLNAME_FILELENGTH); getColIndexs().add(_colIndex); return 1; }
class class_name[name] begin[{] method[append2SQLSelect, return_type[type[int]], modifier[public], parameter[_type, _select, _tableIndex, _colIndex]] begin[{] call[_select.column, parameter[member[._tableIndex], member[AbstractStoreResource.COLNAME_FILELENGTH]]] call[.getColIndexs, parameter[]] return[literal[1]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[append2SQLSelect] operator[SEP] Keyword[final] identifier[Type] identifier[_type] , Keyword[final] identifier[SQLSelect] identifier[_select] , Keyword[final] Keyword[int] identifier[_tableIndex] , Keyword[final] Keyword[int] identifier[_colIndex] operator[SEP] { identifier[_select] operator[SEP] identifier[column] operator[SEP] identifier[_tableIndex] , identifier[AbstractStoreResource] operator[SEP] identifier[COLNAME_FILELENGTH] operator[SEP] operator[SEP] identifier[getColIndexs] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[_colIndex] operator[SEP] operator[SEP] Keyword[return] Other[1] operator[SEP] }
public void marshall(PutDeliverabilityDashboardOptionRequest putDeliverabilityDashboardOptionRequest, ProtocolMarshaller protocolMarshaller) { if (putDeliverabilityDashboardOptionRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(putDeliverabilityDashboardOptionRequest.getDashboardEnabled(), DASHBOARDENABLED_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[putDeliverabilityDashboardOptionRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.putDeliverabilityDashboardOptionRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDashboardEnabled, postfix_operators=[], prefix_operators=[], qualifier=putDeliverabilityDashboardOptionRequest, selectors=[], type_arguments=None), MemberReference(member=DASHBOARDENABLED_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[PutDeliverabilityDashboardOptionRequest] identifier[putDeliverabilityDashboardOptionRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[putDeliverabilityDashboardOptionRequest] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[putDeliverabilityDashboardOptionRequest] operator[SEP] identifier[getDashboardEnabled] operator[SEP] operator[SEP] , identifier[DASHBOARDENABLED_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
@Override protected void onEvent(final GHSubscriberEvent event) { GHEventPayload.Push push; try { push = GitHub.offline().parseEventPayload(new StringReader(event.getPayload()), GHEventPayload.Push.class); } catch (IOException e) { LOGGER.warn("Received malformed PushEvent: " + event.getPayload(), e); return; } URL repoUrl = push.getRepository().getUrl(); final String pusherName = push.getPusher().getName(); LOGGER.info("Received PushEvent for {} from {}", repoUrl, event.getOrigin()); final GitHubRepositoryName changedRepository = GitHubRepositoryName.create(repoUrl.toExternalForm()); if (changedRepository != null) { // run in high privilege to see all the projects anonymous users don't see. // this is safe because when we actually schedule a build, it's a build that can // happen at some random time anyway. ACL.impersonate(ACL.SYSTEM, new Runnable() { @Override public void run() { for (Item job : Jenkins.getInstance().getAllItems(Item.class)) { GitHubPushTrigger trigger = triggerFrom(job, GitHubPushTrigger.class); if (trigger != null) { String fullDisplayName = job.getFullDisplayName(); LOGGER.debug("Considering to poke {}", fullDisplayName); if (GitHubRepositoryNameContributor.parseAssociatedNames(job) .contains(changedRepository)) { LOGGER.info("Poked {}", fullDisplayName); trigger.onPost(GitHubTriggerEvent.create() .withTimestamp(event.getTimestamp()) .withOrigin(event.getOrigin()) .withTriggeredByUser(pusherName) .build() ); } else { LOGGER.debug("Skipped {} because it doesn't have a matching repository.", fullDisplayName); } } } } }); for (GitHubWebHook.Listener listener : ExtensionList.lookup(GitHubWebHook.Listener.class)) { listener.onPushRepositoryChanged(pusherName, changedRepository); } } else { LOGGER.warn("Malformed repo url {}", repoUrl); } }
class class_name[name] begin[{] method[onEvent, return_type[void], modifier[protected], parameter[event]] begin[{] local_variable[type[GHEventPayload], push] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=push, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=offline, postfix_operators=[], prefix_operators=[], qualifier=GitHub, selectors=[MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getPayload, postfix_operators=[], prefix_operators=[], qualifier=event, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringReader, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=GHEventPayload, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Push, sub_type=None))], member=parseEventPayload, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Received malformed PushEvent: "), operandr=MethodInvocation(arguments=[], member=getPayload, postfix_operators=[], prefix_operators=[], qualifier=event, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) local_variable[type[URL], repoUrl] local_variable[type[String], pusherName] call[LOGGER.info, parameter[literal["Received PushEvent for {} from {}"], member[.repoUrl], call[event.getOrigin, parameter[]]]] local_variable[type[GitHubRepositoryName], changedRepository] if[binary_operation[member[.changedRepository], !=, literal[null]]] begin[{] call[ACL.impersonate, parameter[member[ACL.SYSTEM], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=job, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GitHubPushTrigger, sub_type=None))], member=triggerFrom, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=trigger)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=GitHubPushTrigger, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=trigger, 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=[], member=getFullDisplayName, postfix_operators=[], prefix_operators=[], qualifier=job, selectors=[], type_arguments=None), name=fullDisplayName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Considering to poke {}"), MemberReference(member=fullDisplayName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=job, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseAssociatedNames, postfix_operators=[], prefix_operators=[], qualifier=GitHubRepositoryNameContributor, selectors=[MethodInvocation(arguments=[MemberReference(member=changedRepository, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Skipped {} because it doesn't have a matching repository."), MemberReference(member=fullDisplayName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, 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="Poked {}"), MemberReference(member=fullDisplayName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=info, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=create, postfix_operators=[], prefix_operators=[], qualifier=GitHubTriggerEvent, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTimestamp, postfix_operators=[], prefix_operators=[], qualifier=event, selectors=[], type_arguments=None)], member=withTimestamp, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getOrigin, postfix_operators=[], prefix_operators=[], qualifier=event, selectors=[], type_arguments=None)], member=withOrigin, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=pusherName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withTriggeredByUser, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=onPost, postfix_operators=[], prefix_operators=[], qualifier=trigger, selectors=[], type_arguments=None), label=None)]))]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=Jenkins, selectors=[MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Item, sub_type=None))], member=getAllItems, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=job)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Item, sub_type=None))), label=None)], documentation=None, modifiers={'public'}, name=run, parameters=[], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Runnable, sub_type=None))]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=pusherName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=changedRepository, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onPushRepositoryChanged, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=GitHubWebHook, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Listener, sub_type=None))], member=lookup, postfix_operators=[], prefix_operators=[], qualifier=ExtensionList, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=listener)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=GitHubWebHook, sub_type=ReferenceType(arguments=None, dimensions=None, name=Listener, sub_type=None)))), label=None) else begin[{] call[LOGGER.warn, parameter[literal["Malformed repo url {}"], member[.repoUrl]]] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[onEvent] operator[SEP] Keyword[final] identifier[GHSubscriberEvent] identifier[event] operator[SEP] { identifier[GHEventPayload] operator[SEP] identifier[Push] identifier[push] operator[SEP] Keyword[try] { identifier[push] operator[=] identifier[GitHub] operator[SEP] identifier[offline] operator[SEP] operator[SEP] operator[SEP] identifier[parseEventPayload] operator[SEP] Keyword[new] identifier[StringReader] operator[SEP] identifier[event] operator[SEP] identifier[getPayload] operator[SEP] operator[SEP] operator[SEP] , identifier[GHEventPayload] operator[SEP] identifier[Push] operator[SEP] Keyword[class] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[event] operator[SEP] identifier[getPayload] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[URL] identifier[repoUrl] operator[=] identifier[push] operator[SEP] identifier[getRepository] operator[SEP] operator[SEP] operator[SEP] identifier[getUrl] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[pusherName] operator[=] identifier[push] operator[SEP] identifier[getPusher] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[repoUrl] , identifier[event] operator[SEP] identifier[getOrigin] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[GitHubRepositoryName] identifier[changedRepository] operator[=] identifier[GitHubRepositoryName] operator[SEP] identifier[create] operator[SEP] identifier[repoUrl] operator[SEP] identifier[toExternalForm] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[changedRepository] operator[!=] Other[null] operator[SEP] { identifier[ACL] operator[SEP] identifier[impersonate] operator[SEP] identifier[ACL] operator[SEP] identifier[SYSTEM] , Keyword[new] identifier[Runnable] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[Item] identifier[job] operator[:] identifier[Jenkins] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[getAllItems] operator[SEP] identifier[Item] operator[SEP] Keyword[class] operator[SEP] operator[SEP] { identifier[GitHubPushTrigger] identifier[trigger] operator[=] identifier[triggerFrom] operator[SEP] identifier[job] , identifier[GitHubPushTrigger] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[trigger] operator[!=] Other[null] operator[SEP] { identifier[String] identifier[fullDisplayName] operator[=] identifier[job] operator[SEP] identifier[getFullDisplayName] operator[SEP] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[fullDisplayName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[GitHubRepositoryNameContributor] operator[SEP] identifier[parseAssociatedNames] operator[SEP] identifier[job] operator[SEP] operator[SEP] identifier[contains] operator[SEP] identifier[changedRepository] operator[SEP] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[fullDisplayName] operator[SEP] operator[SEP] identifier[trigger] operator[SEP] identifier[onPost] operator[SEP] identifier[GitHubTriggerEvent] operator[SEP] identifier[create] operator[SEP] operator[SEP] operator[SEP] identifier[withTimestamp] operator[SEP] identifier[event] operator[SEP] identifier[getTimestamp] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[withOrigin] operator[SEP] identifier[event] operator[SEP] identifier[getOrigin] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[withTriggeredByUser] operator[SEP] identifier[pusherName] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[fullDisplayName] operator[SEP] operator[SEP] } } } } } operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[GitHubWebHook] operator[SEP] identifier[Listener] identifier[listener] operator[:] identifier[ExtensionList] operator[SEP] identifier[lookup] operator[SEP] identifier[GitHubWebHook] operator[SEP] identifier[Listener] operator[SEP] Keyword[class] operator[SEP] operator[SEP] { identifier[listener] operator[SEP] identifier[onPushRepositoryChanged] operator[SEP] identifier[pusherName] , identifier[changedRepository] operator[SEP] operator[SEP] } } Keyword[else] { identifier[LOGGER] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[repoUrl] operator[SEP] operator[SEP] } }
public static HTML createFlashContainer ( String ident, String movie, int width, int height, String flashVars) { return createContainer(new FlashObject(ident, movie, width, height, flashVars)); }
class class_name[name] begin[{] method[createFlashContainer, return_type[type[HTML]], modifier[public static], parameter[ident, movie, width, height, flashVars]] begin[{] return[call[.createContainer, parameter[ClassCreator(arguments=[MemberReference(member=ident, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=movie, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=height, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=flashVars, 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=FlashObject, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[HTML] identifier[createFlashContainer] operator[SEP] identifier[String] identifier[ident] , identifier[String] identifier[movie] , Keyword[int] identifier[width] , Keyword[int] identifier[height] , identifier[String] identifier[flashVars] operator[SEP] { Keyword[return] identifier[createContainer] operator[SEP] Keyword[new] identifier[FlashObject] operator[SEP] identifier[ident] , identifier[movie] , identifier[width] , identifier[height] , identifier[flashVars] operator[SEP] operator[SEP] operator[SEP] }
public static void copy(final File aFromFile, final File aToFile) throws IOException { if (aFromFile.isDirectory() && aToFile.isFile() || aFromFile.isFile() && aToFile.isDirectory()) { throw new IOException(LOGGER.getI18n(MessageCodes.UTIL_037, aFromFile, aToFile)); } if (aFromFile.isDirectory()) { if (!aToFile.exists() && !aToFile.mkdirs()) { throw new IOException(LOGGER.getI18n(MessageCodes.UTIL_035, aToFile.getAbsolutePath())); } for (final File file : aFromFile.listFiles()) { copy(file, new File(aToFile, file.getName())); } } else { copyFile(aFromFile, aToFile); } }
class class_name[name] begin[{] method[copy, return_type[void], modifier[public static], parameter[aFromFile, aToFile]] begin[{] if[binary_operation[binary_operation[call[aFromFile.isDirectory, parameter[]], &&, call[aToFile.isFile, parameter[]]], ||, binary_operation[call[aFromFile.isFile, parameter[]], &&, call[aToFile.isDirectory, parameter[]]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=UTIL_037, postfix_operators=[], prefix_operators=[], qualifier=MessageCodes, selectors=[]), MemberReference(member=aFromFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=aToFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getI18n, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None) else begin[{] None end[}] if[call[aFromFile.isDirectory, parameter[]]] begin[{] if[binary_operation[call[aToFile.exists, parameter[]], &&, call[aToFile.mkdirs, parameter[]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=UTIL_035, postfix_operators=[], prefix_operators=[], qualifier=MessageCodes, selectors=[]), MethodInvocation(arguments=[], member=getAbsolutePath, postfix_operators=[], prefix_operators=[], qualifier=aToFile, selectors=[], type_arguments=None)], member=getI18n, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None) else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MemberReference(member=aToFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))], member=copy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=listFiles, postfix_operators=[], prefix_operators=[], qualifier=aFromFile, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=file)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))), label=None) else begin[{] call[.copyFile, parameter[member[.aFromFile], member[.aToFile]]] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[copy] operator[SEP] Keyword[final] identifier[File] identifier[aFromFile] , Keyword[final] identifier[File] identifier[aToFile] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[aFromFile] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[&&] identifier[aToFile] operator[SEP] identifier[isFile] operator[SEP] operator[SEP] operator[||] identifier[aFromFile] operator[SEP] identifier[isFile] operator[SEP] operator[SEP] operator[&&] identifier[aToFile] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] identifier[LOGGER] operator[SEP] identifier[getI18n] operator[SEP] identifier[MessageCodes] operator[SEP] identifier[UTIL_037] , identifier[aFromFile] , identifier[aToFile] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[aFromFile] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[aToFile] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[aToFile] operator[SEP] identifier[mkdirs] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] identifier[LOGGER] operator[SEP] identifier[getI18n] operator[SEP] identifier[MessageCodes] operator[SEP] identifier[UTIL_035] , identifier[aToFile] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] Keyword[final] identifier[File] identifier[file] operator[:] identifier[aFromFile] operator[SEP] identifier[listFiles] operator[SEP] operator[SEP] operator[SEP] { identifier[copy] operator[SEP] identifier[file] , Keyword[new] identifier[File] operator[SEP] identifier[aToFile] , identifier[file] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[copyFile] operator[SEP] identifier[aFromFile] , identifier[aToFile] operator[SEP] operator[SEP] } }
@Override public void setTime(String parameterName, Time x) throws SQLException { checkClosed(); throw SQLError.noSupport(); }
class class_name[name] begin[{] method[setTime, return_type[void], modifier[public], parameter[parameterName, x]] begin[{] call[.checkClosed, parameter[]] ThrowStatement(expression=MethodInvocation(arguments=[], member=noSupport, postfix_operators=[], prefix_operators=[], qualifier=SQLError, selectors=[], type_arguments=None), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setTime] operator[SEP] identifier[String] identifier[parameterName] , identifier[Time] identifier[x] operator[SEP] Keyword[throws] identifier[SQLException] { identifier[checkClosed] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] identifier[SQLError] operator[SEP] identifier[noSupport] operator[SEP] operator[SEP] operator[SEP] }
public static void cublasDaxpy(int n, double alpha, Pointer x, int incx, Pointer y, int incy) { cublasDaxpyNative(n, alpha, x, incx, y, incy); checkResultBLAS(); }
class class_name[name] begin[{] method[cublasDaxpy, return_type[void], modifier[public static], parameter[n, alpha, x, incx, y, incy]] begin[{] call[.cublasDaxpyNative, parameter[member[.n], member[.alpha], member[.x], member[.incx], member[.y], member[.incy]]] call[.checkResultBLAS, parameter[]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[cublasDaxpy] operator[SEP] Keyword[int] identifier[n] , Keyword[double] identifier[alpha] , identifier[Pointer] identifier[x] , Keyword[int] identifier[incx] , identifier[Pointer] identifier[y] , Keyword[int] identifier[incy] operator[SEP] { identifier[cublasDaxpyNative] operator[SEP] identifier[n] , identifier[alpha] , identifier[x] , identifier[incx] , identifier[y] , identifier[incy] operator[SEP] operator[SEP] identifier[checkResultBLAS] operator[SEP] operator[SEP] operator[SEP] }
public static <T1, T2, T3, T4, T5, T6, T7> Sept<T1, T2, T3, T4, T5, T6, T7> next(final T1 t1 , final T2 t2 , final T3 t3 , final T4 t4 , final T5 t5 , final T6 t6 , final T7 t7) { return new Sept<>(t1 , t2 , t3 , t4 , t5 , t6 , t7); }
class class_name[name] begin[{] method[next, return_type[type[Sept]], modifier[public static], parameter[t1, t2, t3, t4, t5, t6, t7]] begin[{] return[ClassCreator(arguments=[MemberReference(member=t1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=t2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=t3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=t4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=t5, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=t6, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=t7, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=Sept, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T1] , identifier[T2] , identifier[T3] , identifier[T4] , identifier[T5] , identifier[T6] , identifier[T7] operator[>] identifier[Sept] operator[<] identifier[T1] , identifier[T2] , identifier[T3] , identifier[T4] , identifier[T5] , identifier[T6] , identifier[T7] operator[>] identifier[next] operator[SEP] Keyword[final] identifier[T1] identifier[t1] , Keyword[final] identifier[T2] identifier[t2] , Keyword[final] identifier[T3] identifier[t3] , Keyword[final] identifier[T4] identifier[t4] , Keyword[final] identifier[T5] identifier[t5] , Keyword[final] identifier[T6] identifier[t6] , Keyword[final] identifier[T7] identifier[t7] operator[SEP] { Keyword[return] Keyword[new] identifier[Sept] operator[<] operator[>] operator[SEP] identifier[t1] , identifier[t2] , identifier[t3] , identifier[t4] , identifier[t5] , identifier[t6] , identifier[t7] operator[SEP] operator[SEP] }
public static double root(DifferentiableFunction func, double x1, double x2, double tol) { return root(func, x1, x2, tol, 100); }
class class_name[name] begin[{] method[root, return_type[type[double]], modifier[public static], parameter[func, x1, x2, tol]] begin[{] return[call[.root, parameter[member[.func], member[.x1], member[.x2], member[.tol], literal[100]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[root] operator[SEP] identifier[DifferentiableFunction] identifier[func] , Keyword[double] identifier[x1] , Keyword[double] identifier[x2] , Keyword[double] identifier[tol] operator[SEP] { Keyword[return] identifier[root] operator[SEP] identifier[func] , identifier[x1] , identifier[x2] , identifier[tol] , Other[100] operator[SEP] operator[SEP] }
@Override public long getAllocatedHostObjects(Long bucketId) { if (zeroAllocations.containsKey(bucketId)) return zeroAllocations.get(bucketId).size(); else return 0L; }
class class_name[name] begin[{] method[getAllocatedHostObjects, return_type[type[long]], modifier[public], parameter[bucketId]] begin[{] if[call[zeroAllocations.containsKey, parameter[member[.bucketId]]]] begin[{] return[call[zeroAllocations.get, parameter[member[.bucketId]]]] else begin[{] return[literal[0L]] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[long] identifier[getAllocatedHostObjects] operator[SEP] identifier[Long] identifier[bucketId] operator[SEP] { Keyword[if] operator[SEP] identifier[zeroAllocations] operator[SEP] identifier[containsKey] operator[SEP] identifier[bucketId] operator[SEP] operator[SEP] Keyword[return] identifier[zeroAllocations] operator[SEP] identifier[get] operator[SEP] identifier[bucketId] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[else] Keyword[return] Other[0L] operator[SEP] }
@Override public void removeByGroupId(long groupId) { for (CommerceWishList commerceWishList : findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceWishList); } }
class class_name[name] begin[{] method[removeByGroupId, return_type[void], modifier[public], parameter[groupId]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=commerceWishList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=groupId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ALL_POS, postfix_operators=[], prefix_operators=[], qualifier=QueryUtil, selectors=[]), MemberReference(member=ALL_POS, postfix_operators=[], prefix_operators=[], qualifier=QueryUtil, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=findByGroupId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=commerceWishList)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CommerceWishList, sub_type=None))), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[removeByGroupId] operator[SEP] Keyword[long] identifier[groupId] operator[SEP] { Keyword[for] operator[SEP] identifier[CommerceWishList] identifier[commerceWishList] operator[:] identifier[findByGroupId] operator[SEP] identifier[groupId] , identifier[QueryUtil] operator[SEP] identifier[ALL_POS] , identifier[QueryUtil] operator[SEP] identifier[ALL_POS] , Other[null] operator[SEP] operator[SEP] { identifier[remove] operator[SEP] identifier[commerceWishList] operator[SEP] operator[SEP] } }
private void deliverMountUpdate(SlotReference slot, boolean mounted) { if (mounted) { logger.info("Reporting media mounted in " + slot); } else { logger.info("Reporting media removed from " + slot); } for (final MountListener listener : getMountListeners()) { try { if (mounted) { listener.mediaMounted(slot); } else { listener.mediaUnmounted(slot); } } catch (Throwable t) { logger.warn("Problem delivering mount update to listener", t); } } if (mounted) { MetadataCache.tryAutoAttaching(slot); } }
class class_name[name] begin[{] method[deliverMountUpdate, return_type[void], modifier[private], parameter[slot, mounted]] begin[{] if[member[.mounted]] begin[{] call[logger.info, parameter[binary_operation[literal["Reporting media mounted in "], +, member[.slot]]]] else begin[{] call[logger.info, parameter[binary_operation[literal["Reporting media removed from "], +, member[.slot]]]] end[}] ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[IfStatement(condition=MemberReference(member=mounted, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=slot, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=mediaUnmounted, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=slot, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=mediaMounted, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Problem delivering mount update to listener"), MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=None, label=None, resources=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getMountListeners, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=listener)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=MountListener, sub_type=None))), label=None) if[member[.mounted]] begin[{] call[MetadataCache.tryAutoAttaching, parameter[member[.slot]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[deliverMountUpdate] operator[SEP] identifier[SlotReference] identifier[slot] , Keyword[boolean] identifier[mounted] operator[SEP] { Keyword[if] operator[SEP] identifier[mounted] operator[SEP] { identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[slot] operator[SEP] operator[SEP] } Keyword[else] { identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[slot] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] Keyword[final] identifier[MountListener] identifier[listener] operator[:] identifier[getMountListeners] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { Keyword[if] operator[SEP] identifier[mounted] operator[SEP] { identifier[listener] operator[SEP] identifier[mediaMounted] operator[SEP] identifier[slot] operator[SEP] operator[SEP] } Keyword[else] { identifier[listener] operator[SEP] identifier[mediaUnmounted] operator[SEP] identifier[slot] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[t] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[mounted] operator[SEP] { identifier[MetadataCache] operator[SEP] identifier[tryAutoAttaching] operator[SEP] identifier[slot] operator[SEP] operator[SEP] } }
private List<MigrationResult> migratePersonality(final MetadataManager metadataManager, final String personalityName, final Integer targetVersion, final MigratoryOption [] options) { final Integer currentVersion = metadataManager.getCurrentVersion(personalityName); if (currentVersion == null && !migratoryConfig.isCreatePersonalities()) { throw new MigratoryException(Reason.NEW_PERSONALITIES_DENIED); } // Make sure that the current state of the personality is sane. final List<MetadataInfo> history = metadataManager.getPersonalityHistory(personalityName); final MigrationManager migrationManager = new MigrationManager(migratoryContext, personalityName); // if null, this is a new personality.Don't validate it. if (history != null && !history.isEmpty()) { // "No verify" option skips this step. if (!MigratoryOption.containsOption(MigratoryOption.NO_VERIFY, options)) { final DbValidator dbValidator = new DbValidator(migrationManager); final ValidationResult validationResult = dbValidator.validate(history); if (validationResult.getValidationStatus() != ValidationStatus.OK) { throw new MigratoryException(Reason.VALIDATION_FAILED, "Validation for Personality '%s' failed", personalityName); } } else { LOG.info("Skipped verification."); } } final MigrationPlanner migrationPlanner = new MigrationPlanner(migrationManager, currentVersion, targetVersion); migrationPlanner.plan(); LOG.info("{}", migrationPlanner.toString()); switch(migrationPlanner.getDirection()) { case FORWARD: if (!migratoryConfig.isAllowRollForward()) { throw new MigratoryException(Reason.ROLL_FORWARD_DENIED); } break; case BACK: if (!migratoryConfig.isAllowRollBack()) { throw new MigratoryException(Reason.ROLL_BACK_DENIED); } break; case DO_NOTHING: return null; default: LOG.warn("Encountered State {}. This should never happen!", migrationPlanner.getDirection()); return null; } final DbMigrator migrator = new DbMigrator(migratoryContext, migrationPlanner); final List<MigrationResult> results = migrator.migrate(options); LOG.info("Migration finished in '{}' steps, result is {}", results.size(), MigrationResult.determineMigrationState(results)); return results; }
class class_name[name] begin[{] method[migratePersonality, return_type[type[List]], modifier[private], parameter[metadataManager, personalityName, targetVersion, options]] begin[{] local_variable[type[Integer], currentVersion] if[binary_operation[binary_operation[member[.currentVersion], ==, literal[null]], &&, call[migratoryConfig.isCreatePersonalities, parameter[]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=NEW_PERSONALITIES_DENIED, postfix_operators=[], prefix_operators=[], qualifier=Reason, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MigratoryException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[List], history] local_variable[type[MigrationManager], migrationManager] if[binary_operation[binary_operation[member[.history], !=, literal[null]], &&, call[history.isEmpty, parameter[]]]] begin[{] if[call[MigratoryOption.containsOption, parameter[member[MigratoryOption.NO_VERIFY], member[.options]]]] begin[{] local_variable[type[DbValidator], dbValidator] local_variable[type[ValidationResult], validationResult] if[binary_operation[call[validationResult.getValidationStatus, parameter[]], !=, member[ValidationStatus.OK]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=VALIDATION_FAILED, postfix_operators=[], prefix_operators=[], qualifier=Reason, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Validation for Personality '%s' failed"), MemberReference(member=personalityName, 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=MigratoryException, sub_type=None)), label=None) else begin[{] None end[}] else begin[{] call[LOG.info, parameter[literal["Skipped verification."]]] end[}] else begin[{] None end[}] local_variable[type[MigrationPlanner], migrationPlanner] call[migrationPlanner.plan, parameter[]] call[LOG.info, parameter[literal["{}"], call[migrationPlanner.toString, parameter[]]]] SwitchStatement(cases=[SwitchStatementCase(case=['FORWARD'], statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isAllowRollForward, postfix_operators=[], prefix_operators=['!'], qualifier=migratoryConfig, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=ROLL_FORWARD_DENIED, postfix_operators=[], prefix_operators=[], qualifier=Reason, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MigratoryException, sub_type=None)), label=None)])), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['BACK'], statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isAllowRollBack, postfix_operators=[], prefix_operators=['!'], qualifier=migratoryConfig, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=ROLL_BACK_DENIED, postfix_operators=[], prefix_operators=[], qualifier=Reason, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MigratoryException, sub_type=None)), label=None)])), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['DO_NOTHING'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)]), SwitchStatementCase(case=[], statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Encountered State {}. This should never happen!"), MethodInvocation(arguments=[], member=getDirection, postfix_operators=[], prefix_operators=[], qualifier=migrationPlanner, selectors=[], type_arguments=None)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)])], expression=MethodInvocation(arguments=[], member=getDirection, postfix_operators=[], prefix_operators=[], qualifier=migrationPlanner, selectors=[], type_arguments=None), label=None) local_variable[type[DbMigrator], migrator] local_variable[type[List], results] call[LOG.info, parameter[literal["Migration finished in '{}' steps, result is {}"], call[results.size, parameter[]], call[MigrationResult.determineMigrationState, parameter[member[.results]]]]] return[member[.results]] end[}] END[}]
Keyword[private] identifier[List] operator[<] identifier[MigrationResult] operator[>] identifier[migratePersonality] operator[SEP] Keyword[final] identifier[MetadataManager] identifier[metadataManager] , Keyword[final] identifier[String] identifier[personalityName] , Keyword[final] identifier[Integer] identifier[targetVersion] , Keyword[final] identifier[MigratoryOption] operator[SEP] operator[SEP] identifier[options] operator[SEP] { Keyword[final] identifier[Integer] identifier[currentVersion] operator[=] identifier[metadataManager] operator[SEP] identifier[getCurrentVersion] operator[SEP] identifier[personalityName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[currentVersion] operator[==] Other[null] operator[&&] operator[!] identifier[migratoryConfig] operator[SEP] identifier[isCreatePersonalities] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[MigratoryException] operator[SEP] identifier[Reason] operator[SEP] identifier[NEW_PERSONALITIES_DENIED] operator[SEP] operator[SEP] } Keyword[final] identifier[List] operator[<] identifier[MetadataInfo] operator[>] identifier[history] operator[=] identifier[metadataManager] operator[SEP] identifier[getPersonalityHistory] operator[SEP] identifier[personalityName] operator[SEP] operator[SEP] Keyword[final] identifier[MigrationManager] identifier[migrationManager] operator[=] Keyword[new] identifier[MigrationManager] operator[SEP] identifier[migratoryContext] , identifier[personalityName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[history] operator[!=] Other[null] operator[&&] operator[!] identifier[history] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[MigratoryOption] operator[SEP] identifier[containsOption] operator[SEP] identifier[MigratoryOption] operator[SEP] identifier[NO_VERIFY] , identifier[options] operator[SEP] operator[SEP] { Keyword[final] identifier[DbValidator] identifier[dbValidator] operator[=] Keyword[new] identifier[DbValidator] operator[SEP] identifier[migrationManager] operator[SEP] operator[SEP] Keyword[final] identifier[ValidationResult] identifier[validationResult] operator[=] identifier[dbValidator] operator[SEP] identifier[validate] operator[SEP] identifier[history] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[validationResult] operator[SEP] identifier[getValidationStatus] operator[SEP] operator[SEP] operator[!=] identifier[ValidationStatus] operator[SEP] identifier[OK] operator[SEP] { Keyword[throw] Keyword[new] identifier[MigratoryException] operator[SEP] identifier[Reason] operator[SEP] identifier[VALIDATION_FAILED] , literal[String] , identifier[personalityName] operator[SEP] operator[SEP] } } Keyword[else] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] } } Keyword[final] identifier[MigrationPlanner] identifier[migrationPlanner] operator[=] Keyword[new] identifier[MigrationPlanner] operator[SEP] identifier[migrationManager] , identifier[currentVersion] , identifier[targetVersion] operator[SEP] operator[SEP] identifier[migrationPlanner] operator[SEP] identifier[plan] operator[SEP] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[migrationPlanner] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[migrationPlanner] operator[SEP] identifier[getDirection] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] identifier[FORWARD] operator[:] Keyword[if] operator[SEP] operator[!] identifier[migratoryConfig] operator[SEP] identifier[isAllowRollForward] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[MigratoryException] operator[SEP] identifier[Reason] operator[SEP] identifier[ROLL_FORWARD_DENIED] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[BACK] operator[:] Keyword[if] operator[SEP] operator[!] identifier[migratoryConfig] operator[SEP] identifier[isAllowRollBack] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[MigratoryException] operator[SEP] identifier[Reason] operator[SEP] identifier[ROLL_BACK_DENIED] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[DO_NOTHING] operator[:] Keyword[return] Other[null] operator[SEP] Keyword[default] operator[:] identifier[LOG] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[migrationPlanner] operator[SEP] identifier[getDirection] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } Keyword[final] identifier[DbMigrator] identifier[migrator] operator[=] Keyword[new] identifier[DbMigrator] operator[SEP] identifier[migratoryContext] , identifier[migrationPlanner] operator[SEP] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[MigrationResult] operator[>] identifier[results] operator[=] identifier[migrator] operator[SEP] identifier[migrate] operator[SEP] identifier[options] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[results] operator[SEP] identifier[size] operator[SEP] operator[SEP] , identifier[MigrationResult] operator[SEP] identifier[determineMigrationState] operator[SEP] identifier[results] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[results] operator[SEP] }
public Content simpleTagOutput(Element element, DocTree simpleTag, String header) { ContentBuilder result = new ContentBuilder(); result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.simpleTagLabel, new RawHtml(header)))); CommentHelper ch = utils.getCommentHelper(element); List<? extends DocTree> description = ch.getDescription(configuration, simpleTag); Content body = htmlWriter.commentTagsToContent(simpleTag, element, description, false); result.addContent(HtmlTree.DD(body)); return result; }
class class_name[name] begin[{] method[simpleTagOutput, return_type[type[Content]], modifier[public], parameter[element, simpleTag, header]] begin[{] local_variable[type[ContentBuilder], result] call[result.addContent, parameter[call[HtmlTree.DT, parameter[call[HtmlTree.SPAN, parameter[member[HtmlStyle.simpleTagLabel], ClassCreator(arguments=[MemberReference(member=header, 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=RawHtml, sub_type=None))]]]]]] local_variable[type[CommentHelper], ch] local_variable[type[List], description] local_variable[type[Content], body] call[result.addContent, parameter[call[HtmlTree.DD, parameter[member[.body]]]]] return[member[.result]] end[}] END[}]
Keyword[public] identifier[Content] identifier[simpleTagOutput] operator[SEP] identifier[Element] identifier[element] , identifier[DocTree] identifier[simpleTag] , identifier[String] identifier[header] operator[SEP] { identifier[ContentBuilder] identifier[result] operator[=] Keyword[new] identifier[ContentBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[addContent] operator[SEP] identifier[HtmlTree] operator[SEP] identifier[DT] operator[SEP] identifier[HtmlTree] operator[SEP] identifier[SPAN] operator[SEP] identifier[HtmlStyle] operator[SEP] identifier[simpleTagLabel] , Keyword[new] identifier[RawHtml] operator[SEP] identifier[header] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[CommentHelper] identifier[ch] operator[=] identifier[utils] operator[SEP] identifier[getCommentHelper] operator[SEP] identifier[element] operator[SEP] operator[SEP] identifier[List] operator[<] operator[?] Keyword[extends] identifier[DocTree] operator[>] identifier[description] operator[=] identifier[ch] operator[SEP] identifier[getDescription] operator[SEP] identifier[configuration] , identifier[simpleTag] operator[SEP] operator[SEP] identifier[Content] identifier[body] operator[=] identifier[htmlWriter] operator[SEP] identifier[commentTagsToContent] operator[SEP] identifier[simpleTag] , identifier[element] , identifier[description] , literal[boolean] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[addContent] operator[SEP] identifier[HtmlTree] operator[SEP] identifier[DD] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
@Override public void partialUpdate(INDArray arr, INDArray result, long idx, int... dimensions) { result.tensorAlongDimension((int) idx, dimensions).addi(arr); }
class class_name[name] begin[{] method[partialUpdate, return_type[void], modifier[public], parameter[arr, result, idx, dimensions]] begin[{] call[result.tensorAlongDimension, parameter[Cast(expression=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int)), member[.dimensions]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[partialUpdate] operator[SEP] identifier[INDArray] identifier[arr] , identifier[INDArray] identifier[result] , Keyword[long] identifier[idx] , Keyword[int] operator[...] identifier[dimensions] operator[SEP] { identifier[result] operator[SEP] identifier[tensorAlongDimension] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[idx] , identifier[dimensions] operator[SEP] operator[SEP] identifier[addi] operator[SEP] identifier[arr] operator[SEP] operator[SEP] }
public void setLocale(Locale locale) throws CmsException { CmsUserSettings settings = getSettings(); if (settings != null) { settings.setLocale(locale); settings.save(m_cms); m_messages = Messages.get().getBundle(locale); } }
class class_name[name] begin[{] method[setLocale, return_type[void], modifier[public], parameter[locale]] begin[{] local_variable[type[CmsUserSettings], settings] if[binary_operation[member[.settings], !=, literal[null]]] begin[{] call[settings.setLocale, parameter[member[.locale]]] call[settings.save, parameter[member[.m_cms]]] assign[member[.m_messages], call[Messages.get, parameter[]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setLocale] operator[SEP] identifier[Locale] identifier[locale] operator[SEP] Keyword[throws] identifier[CmsException] { identifier[CmsUserSettings] identifier[settings] operator[=] identifier[getSettings] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[settings] operator[!=] Other[null] operator[SEP] { identifier[settings] operator[SEP] identifier[setLocale] operator[SEP] identifier[locale] operator[SEP] operator[SEP] identifier[settings] operator[SEP] identifier[save] operator[SEP] identifier[m_cms] operator[SEP] operator[SEP] identifier[m_messages] operator[=] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[getBundle] operator[SEP] identifier[locale] operator[SEP] operator[SEP] } }
private boolean tryReplacingAliasingAssignment(Ref alias, Node aliasLhsNode) { // either VAR/CONST/LET or ASSIGN. Node assignment = aliasLhsNode.getParent(); if (!NodeUtil.isNameDeclaration(assignment) && NodeUtil.isExpressionResultUsed(assignment)) { // e.g. don't change "if (alias = someVariable)" to "if (alias = null)" // TODO(lharker): instead replace the entire assignment with the RHS - "alias = x" becomes "x" return false; } Node aliasParent = alias.getNode().getParent(); aliasParent.replaceChild(alias.getNode(), IR.nullNode()); alias.name.removeRef(alias); codeChanged = true; compiler.reportChangeToEnclosingScope(aliasParent); return true; }
class class_name[name] begin[{] method[tryReplacingAliasingAssignment, return_type[type[boolean]], modifier[private], parameter[alias, aliasLhsNode]] begin[{] local_variable[type[Node], assignment] if[binary_operation[call[NodeUtil.isNameDeclaration, parameter[member[.assignment]]], &&, call[NodeUtil.isExpressionResultUsed, parameter[member[.assignment]]]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[Node], aliasParent] call[aliasParent.replaceChild, parameter[call[alias.getNode, parameter[]], call[IR.nullNode, parameter[]]]] call[alias.name.removeRef, parameter[member[.alias]]] assign[member[.codeChanged], literal[true]] call[compiler.reportChangeToEnclosingScope, parameter[member[.aliasParent]]] return[literal[true]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[tryReplacingAliasingAssignment] operator[SEP] identifier[Ref] identifier[alias] , identifier[Node] identifier[aliasLhsNode] operator[SEP] { identifier[Node] identifier[assignment] operator[=] identifier[aliasLhsNode] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[NodeUtil] operator[SEP] identifier[isNameDeclaration] operator[SEP] identifier[assignment] operator[SEP] operator[&&] identifier[NodeUtil] operator[SEP] identifier[isExpressionResultUsed] operator[SEP] identifier[assignment] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[Node] identifier[aliasParent] operator[=] identifier[alias] operator[SEP] identifier[getNode] operator[SEP] operator[SEP] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[SEP] identifier[aliasParent] operator[SEP] identifier[replaceChild] operator[SEP] identifier[alias] operator[SEP] identifier[getNode] operator[SEP] operator[SEP] , identifier[IR] operator[SEP] identifier[nullNode] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[alias] operator[SEP] identifier[name] operator[SEP] identifier[removeRef] operator[SEP] identifier[alias] operator[SEP] operator[SEP] identifier[codeChanged] operator[=] literal[boolean] operator[SEP] identifier[compiler] operator[SEP] identifier[reportChangeToEnclosingScope] operator[SEP] identifier[aliasParent] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
protected void saveQueryParamValue(final int position, final Object obj) { final String strValue; if (obj instanceof String || obj instanceof Date) { strValue = "'" + obj + '\''; // if we have a String or Date, include '' in the saved value } else if (obj instanceof LocalDateTime || obj instanceof LocalDate || obj instanceof LocalTime) { strValue = "'" + Converter.get().toString(obj) + '\''; // time as string with ' } else if (obj == null) { strValue = "<null>"; // convert null to the string null } else { strValue = Converter.get().toString(obj); // all other objects (includes all Numbers, arrays, etc) } // if we are setting a position larger than current size of parameterValues, // first make it larger if (parameterValues == null) { parameterValues = new ArrayList<>(); } while (position >= parameterValues.size()) { parameterValues.add(null); } parameterValues.set(position, strValue); }
class class_name[name] begin[{] method[saveQueryParamValue, return_type[void], modifier[protected], parameter[position, obj]] begin[{] local_variable[type[String], strValue] if[binary_operation[binary_operation[member[.obj], instanceof, type[String]], ||, binary_operation[member[.obj], instanceof, type[Date]]]] begin[{] assign[member[.strValue], binary_operation[binary_operation[literal["'"], +, member[.obj]], +, literal['\'']]] else begin[{] if[binary_operation[binary_operation[binary_operation[member[.obj], instanceof, type[LocalDateTime]], ||, binary_operation[member[.obj], instanceof, type[LocalDate]]], ||, binary_operation[member[.obj], instanceof, type[LocalTime]]]] begin[{] assign[member[.strValue], binary_operation[binary_operation[literal["'"], +, call[Converter.get, parameter[]]], +, literal['\'']]] else begin[{] if[binary_operation[member[.obj], ==, literal[null]]] begin[{] assign[member[.strValue], literal["<null>"]] else begin[{] assign[member[.strValue], call[Converter.get, parameter[]]] end[}] end[}] end[}] if[binary_operation[member[.parameterValues], ==, literal[null]]] begin[{] assign[member[.parameterValues], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None))] else begin[{] None end[}] while[binary_operation[member[.position], >=, call[parameterValues.size, parameter[]]]] begin[{] call[parameterValues.add, parameter[literal[null]]] end[}] call[parameterValues.set, parameter[member[.position], member[.strValue]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[saveQueryParamValue] operator[SEP] Keyword[final] Keyword[int] identifier[position] , Keyword[final] identifier[Object] identifier[obj] operator[SEP] { Keyword[final] identifier[String] identifier[strValue] operator[SEP] Keyword[if] operator[SEP] identifier[obj] Keyword[instanceof] identifier[String] operator[||] identifier[obj] Keyword[instanceof] identifier[Date] operator[SEP] { identifier[strValue] operator[=] literal[String] operator[+] identifier[obj] operator[+] literal[String] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[obj] Keyword[instanceof] identifier[LocalDateTime] operator[||] identifier[obj] Keyword[instanceof] identifier[LocalDate] operator[||] identifier[obj] Keyword[instanceof] identifier[LocalTime] operator[SEP] { identifier[strValue] operator[=] literal[String] operator[+] identifier[Converter] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] identifier[obj] operator[SEP] operator[+] literal[String] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[obj] operator[==] Other[null] operator[SEP] { identifier[strValue] operator[=] literal[String] operator[SEP] } Keyword[else] { identifier[strValue] operator[=] identifier[Converter] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] identifier[obj] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[parameterValues] operator[==] Other[null] operator[SEP] { identifier[parameterValues] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] } Keyword[while] operator[SEP] identifier[position] operator[>=] identifier[parameterValues] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] { identifier[parameterValues] operator[SEP] identifier[add] operator[SEP] Other[null] operator[SEP] operator[SEP] } identifier[parameterValues] operator[SEP] identifier[set] operator[SEP] identifier[position] , identifier[strValue] operator[SEP] operator[SEP] }
public static boolean checkImplicitAppPermissions(App app, ParaObject object) { if (app != null && object != null) { return isNotAnApp(object.getType()) || app.getId().equals(object.getId()) || app.isRootApp(); } return false; }
class class_name[name] begin[{] method[checkImplicitAppPermissions, return_type[type[boolean]], modifier[public static], parameter[app, object]] begin[{] if[binary_operation[binary_operation[member[.app], !=, literal[null]], &&, binary_operation[member[.object], !=, literal[null]]]] begin[{] return[binary_operation[binary_operation[call[.isNotAnApp, parameter[call[object.getType, parameter[]]]], ||, call[app.getId, parameter[]]], ||, call[app.isRootApp, parameter[]]]] else begin[{] None end[}] return[literal[false]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[checkImplicitAppPermissions] operator[SEP] identifier[App] identifier[app] , identifier[ParaObject] identifier[object] operator[SEP] { Keyword[if] operator[SEP] identifier[app] operator[!=] Other[null] operator[&&] identifier[object] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[isNotAnApp] operator[SEP] identifier[object] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[||] identifier[app] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[object] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[||] identifier[app] operator[SEP] identifier[isRootApp] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
private void generateMorePlansForJoinTree(JoinNode joinTree) { assert(joinTree != null); // generate the access paths for all nodes generateAccessPaths(joinTree); List<JoinNode> nodes = joinTree.generateAllNodesJoinOrder(); generateSubPlanForJoinNodeRecursively(joinTree, 0, nodes); }
class class_name[name] begin[{] method[generateMorePlansForJoinTree, return_type[void], modifier[private], parameter[joinTree]] begin[{] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=joinTree, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=None) call[.generateAccessPaths, parameter[member[.joinTree]]] local_variable[type[List], nodes] call[.generateSubPlanForJoinNodeRecursively, parameter[member[.joinTree], literal[0], member[.nodes]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[generateMorePlansForJoinTree] operator[SEP] identifier[JoinNode] identifier[joinTree] operator[SEP] { Keyword[assert] operator[SEP] identifier[joinTree] operator[!=] Other[null] operator[SEP] operator[SEP] identifier[generateAccessPaths] operator[SEP] identifier[joinTree] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[JoinNode] operator[>] identifier[nodes] operator[=] identifier[joinTree] operator[SEP] identifier[generateAllNodesJoinOrder] operator[SEP] operator[SEP] operator[SEP] identifier[generateSubPlanForJoinNodeRecursively] operator[SEP] identifier[joinTree] , Other[0] , identifier[nodes] operator[SEP] operator[SEP] }
public void getBytes(int index, Slice dst, int dstIndex, int length) { getBytes(index, dst.data, dstIndex, length); }
class class_name[name] begin[{] method[getBytes, return_type[void], modifier[public], parameter[index, dst, dstIndex, length]] begin[{] call[.getBytes, parameter[member[.index], member[dst.data], member[.dstIndex], member[.length]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[getBytes] operator[SEP] Keyword[int] identifier[index] , identifier[Slice] identifier[dst] , Keyword[int] identifier[dstIndex] , Keyword[int] identifier[length] operator[SEP] { identifier[getBytes] operator[SEP] identifier[index] , identifier[dst] operator[SEP] identifier[data] , identifier[dstIndex] , identifier[length] operator[SEP] operator[SEP] }
public static Object plusOne(final Object o1) { requireNonNull(o1); switch (getTypeMark(o1)) { case INTEGER: case SHORT: case BYTE: return ((Number) o1).intValue() + 1; case CHAR: return ((Character) o1) + 1; case LONG: return ((Number) o1).longValue() + 1L; case DOUBLE: return ((Number) o1).doubleValue() + 1D; case FLOAT: return ((Number) o1).floatValue() + 1F; case BIG_INTEGER: return toBigInteger(o1).add(BigInteger.ONE); case BIG_DECIMAL: return toBigDecimal(o1).add(BigDecimal.ONE); default: } throw unsupportedTypeException(o1); }
class class_name[name] begin[{] method[plusOne, return_type[type[Object]], modifier[public static], parameter[o1]] begin[{] call[.requireNonNull, parameter[member[.o1]]] SwitchStatement(cases=[SwitchStatementCase(case=['INTEGER', 'SHORT', 'BYTE'], statements=[ReturnStatement(expression=BinaryOperation(operandl=Cast(expression=MemberReference(member=o1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Number, sub_type=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), label=None)]), SwitchStatementCase(case=['CHAR'], statements=[ReturnStatement(expression=BinaryOperation(operandl=Cast(expression=MemberReference(member=o1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Character, sub_type=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), label=None)]), SwitchStatementCase(case=['LONG'], statements=[ReturnStatement(expression=BinaryOperation(operandl=Cast(expression=MemberReference(member=o1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Number, sub_type=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1L), operator=+), label=None)]), SwitchStatementCase(case=['DOUBLE'], statements=[ReturnStatement(expression=BinaryOperation(operandl=Cast(expression=MemberReference(member=o1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Number, sub_type=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1D), operator=+), label=None)]), SwitchStatementCase(case=['FLOAT'], statements=[ReturnStatement(expression=BinaryOperation(operandl=Cast(expression=MemberReference(member=o1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Number, sub_type=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1F), operator=+), label=None)]), SwitchStatementCase(case=['BIG_INTEGER'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=o1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toBigInteger, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=ONE, postfix_operators=[], prefix_operators=[], qualifier=BigInteger, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), SwitchStatementCase(case=['BIG_DECIMAL'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=o1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toBigDecimal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=ONE, postfix_operators=[], prefix_operators=[], qualifier=BigDecimal, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), SwitchStatementCase(case=[], statements=[])], expression=MethodInvocation(arguments=[MemberReference(member=o1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getTypeMark, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None) ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=o1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=unsupportedTypeException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[Object] identifier[plusOne] operator[SEP] Keyword[final] identifier[Object] identifier[o1] operator[SEP] { identifier[requireNonNull] operator[SEP] identifier[o1] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[getTypeMark] operator[SEP] identifier[o1] operator[SEP] operator[SEP] { Keyword[case] identifier[INTEGER] operator[:] Keyword[case] identifier[SHORT] operator[:] Keyword[case] identifier[BYTE] operator[:] Keyword[return] operator[SEP] operator[SEP] identifier[Number] operator[SEP] identifier[o1] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[+] Other[1] operator[SEP] Keyword[case] identifier[CHAR] operator[:] Keyword[return] operator[SEP] operator[SEP] identifier[Character] operator[SEP] identifier[o1] operator[SEP] operator[+] Other[1] operator[SEP] Keyword[case] identifier[LONG] operator[:] Keyword[return] operator[SEP] operator[SEP] identifier[Number] operator[SEP] identifier[o1] operator[SEP] operator[SEP] identifier[longValue] operator[SEP] operator[SEP] operator[+] Other[1L] operator[SEP] Keyword[case] identifier[DOUBLE] operator[:] Keyword[return] operator[SEP] operator[SEP] identifier[Number] operator[SEP] identifier[o1] operator[SEP] operator[SEP] identifier[doubleValue] operator[SEP] operator[SEP] operator[+] literal[Float] operator[SEP] Keyword[case] identifier[FLOAT] operator[:] Keyword[return] operator[SEP] operator[SEP] identifier[Number] operator[SEP] identifier[o1] operator[SEP] operator[SEP] identifier[floatValue] operator[SEP] operator[SEP] operator[+] literal[Float] operator[SEP] Keyword[case] identifier[BIG_INTEGER] operator[:] Keyword[return] identifier[toBigInteger] operator[SEP] identifier[o1] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[BigInteger] operator[SEP] identifier[ONE] operator[SEP] operator[SEP] Keyword[case] identifier[BIG_DECIMAL] operator[:] Keyword[return] identifier[toBigDecimal] operator[SEP] identifier[o1] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[BigDecimal] operator[SEP] identifier[ONE] operator[SEP] operator[SEP] Keyword[default] operator[:] } Keyword[throw] identifier[unsupportedTypeException] operator[SEP] identifier[o1] operator[SEP] operator[SEP] }
public Observable<ServiceResponse<VnetRouteInner>> updateVnetRouteWithServiceResponseAsync(String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } if (vnetName == null) { throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); } if (routeName == null) { throw new IllegalArgumentException("Parameter routeName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (route == null) { throw new IllegalArgumentException("Parameter route is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } Validator.validate(route); return service.updateVnetRoute(resourceGroupName, name, vnetName, routeName, this.client.subscriptionId(), route, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<VnetRouteInner>>>() { @Override public Observable<ServiceResponse<VnetRouteInner>> call(Response<ResponseBody> response) { try { ServiceResponse<VnetRouteInner> clientResponse = updateVnetRouteDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
class class_name[name] begin[{] method[updateVnetRouteWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, name, vnetName, routeName, route]] begin[{] if[binary_operation[member[.resourceGroupName], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter resourceGroupName is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.name], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter name is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.vnetName], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter vnetName is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.routeName], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter routeName is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[THIS[member[None.client]call[None.subscriptionId, parameter[]]], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter this.client.subscriptionId() is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.route], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter route is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[THIS[member[None.client]call[None.apiVersion, parameter[]]], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter this.client.apiVersion() is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] call[Validator.validate, parameter[member[.route]]] return[call[service.updateVnetRoute, parameter[member[.resourceGroupName], member[.name], member[.vnetName], member[.routeName], THIS[member[None.client]call[None.subscriptionId, parameter[]]], member[.route], THIS[member[None.client]call[None.apiVersion, parameter[]]], THIS[member[None.client]call[None.acceptLanguage, parameter[]]], THIS[member[None.client]call[None.userAgent, parameter[]]]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[VnetRouteInner] operator[>] operator[>] identifier[updateVnetRouteWithServiceResponseAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[name] , identifier[String] identifier[vnetName] , identifier[String] identifier[routeName] , identifier[VnetRouteInner] identifier[route] operator[SEP] { Keyword[if] operator[SEP] identifier[resourceGroupName] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[name] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[vnetName] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[routeName] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[subscriptionId] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[route] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[apiVersion] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[Validator] operator[SEP] identifier[validate] operator[SEP] identifier[route] operator[SEP] operator[SEP] Keyword[return] identifier[service] operator[SEP] identifier[updateVnetRoute] operator[SEP] identifier[resourceGroupName] , identifier[name] , identifier[vnetName] , identifier[routeName] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[subscriptionId] operator[SEP] operator[SEP] , identifier[route] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[apiVersion] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[acceptLanguage] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[userAgent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[flatMap] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[Response] operator[<] identifier[ResponseBody] operator[>] , identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[VnetRouteInner] operator[>] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[VnetRouteInner] operator[>] operator[>] identifier[call] operator[SEP] identifier[Response] operator[<] identifier[ResponseBody] operator[>] identifier[response] operator[SEP] { Keyword[try] { identifier[ServiceResponse] operator[<] identifier[VnetRouteInner] operator[>] identifier[clientResponse] operator[=] identifier[updateVnetRouteDelegate] operator[SEP] identifier[response] operator[SEP] operator[SEP] Keyword[return] identifier[Observable] operator[SEP] identifier[just] operator[SEP] identifier[clientResponse] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { Keyword[return] identifier[Observable] operator[SEP] identifier[error] operator[SEP] identifier[t] operator[SEP] operator[SEP] } } } operator[SEP] operator[SEP] }
public String build(final InternalKnowledgePackage pkg, final FunctionDescr functionDescr, final TypeResolver typeResolver, final Map<String, LineMappings> lineMappings, final List<KnowledgeBuilderResult> errors) { final Map<String, Object> vars = new HashMap<String, Object>(); vars.put("package", pkg.getName()); vars.put("imports", pkg.getImports().keySet()); final List<String> staticImports = new LinkedList<String>(); for (String staticImport : pkg.getStaticImports()) { if (!staticImport.endsWith(functionDescr.getName())) { staticImports.add(staticImport); } } vars.put("staticImports", staticImports); vars.put("className", StringUtils.ucFirst(functionDescr.getName())); vars.put("methodName", functionDescr.getName()); vars.put("returnType", functionDescr.getReturnType()); vars.put("parameterTypes", functionDescr.getParameterTypes()); vars.put("parameterNames", functionDescr.getParameterNames()); vars.put("hashCode", functionDescr.getText().hashCode()); // Check that all the parameters are resolvable final List<String> names = functionDescr.getParameterNames(); final List<String> types = functionDescr.getParameterTypes(); for (int i = 0, size = names.size(); i < size; i++) { try { typeResolver.resolveType(types.get(i)); } catch (final ClassNotFoundException e) { errors.add(new FunctionError(functionDescr, e, "Unable to resolve type " + types.get(i) + " while building function.")); break; } } vars.put("text", functionDescr.getText()); final String text = String.valueOf(TemplateRuntime.eval(template, null, new MapVariableResolverFactory(vars))); final BufferedReader reader = new BufferedReader(new StringReader(text)); final String lineStartsWith = " public static " + functionDescr.getReturnType() + " " + functionDescr.getName(); try { String line; int offset = 0; while ((line = reader.readLine()) != null) { offset++; if (line.startsWith(lineStartsWith)) { break; } } functionDescr.setOffset(offset); } catch (final IOException e) { // won't ever happen, it's just reading over a string. throw new RuntimeException("Error determining start offset with function"); } final String name = pkg.getName() + "." + StringUtils.ucFirst(functionDescr.getName()); final LineMappings mapping = new LineMappings(name); mapping.setStartLine(functionDescr.getLine()); mapping.setOffset(functionDescr.getOffset()); lineMappings.put(name, mapping); return text; }
class class_name[name] begin[{] method[build, return_type[type[String]], modifier[public], parameter[pkg, functionDescr, typeResolver, lineMappings, errors]] begin[{] local_variable[type[Map], vars] call[vars.put, parameter[literal["package"], call[pkg.getName, parameter[]]]] call[vars.put, parameter[literal["imports"], call[pkg.getImports, parameter[]]]] local_variable[type[List], staticImports] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=functionDescr, selectors=[], type_arguments=None)], member=endsWith, postfix_operators=[], prefix_operators=['!'], qualifier=staticImport, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=staticImport, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=staticImports, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getStaticImports, postfix_operators=[], prefix_operators=[], qualifier=pkg, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=staticImport)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) call[vars.put, parameter[literal["staticImports"], member[.staticImports]]] call[vars.put, parameter[literal["className"], call[StringUtils.ucFirst, parameter[call[functionDescr.getName, parameter[]]]]]] call[vars.put, parameter[literal["methodName"], call[functionDescr.getName, parameter[]]]] call[vars.put, parameter[literal["returnType"], call[functionDescr.getReturnType, parameter[]]]] call[vars.put, parameter[literal["parameterTypes"], call[functionDescr.getParameterTypes, parameter[]]]] call[vars.put, parameter[literal["parameterNames"], call[functionDescr.getParameterNames, parameter[]]]] call[vars.put, parameter[literal["hashCode"], call[functionDescr.getText, parameter[]]]] local_variable[type[List], names] local_variable[type[List], types] ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=types, selectors=[], type_arguments=None)], member=resolveType, postfix_operators=[], prefix_operators=[], qualifier=typeResolver, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=functionDescr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to resolve type "), operandr=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=types, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" while building function."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FunctionError, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=errors, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ClassNotFoundException']))], finally_block=None, label=None, resources=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i), VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=names, selectors=[], type_arguments=None), name=size)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) call[vars.put, parameter[literal["text"], call[functionDescr.getText, parameter[]]]] local_variable[type[String], text] local_variable[type[BufferedReader], reader] local_variable[type[String], lineStartsWith] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=line)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=offset)], modifiers=set(), type=BasicType(dimensions=[], name=int)), WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=offset, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=lineStartsWith, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)]))]), condition=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=readLine, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setOffset, postfix_operators=[], prefix_operators=[], qualifier=functionDescr, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error determining start offset with function")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) local_variable[type[String], name] local_variable[type[LineMappings], mapping] call[mapping.setStartLine, parameter[call[functionDescr.getLine, parameter[]]]] call[mapping.setOffset, parameter[call[functionDescr.getOffset, parameter[]]]] call[lineMappings.put, parameter[member[.name], member[.mapping]]] return[member[.text]] end[}] END[}]
Keyword[public] identifier[String] identifier[build] operator[SEP] Keyword[final] identifier[InternalKnowledgePackage] identifier[pkg] , Keyword[final] identifier[FunctionDescr] identifier[functionDescr] , Keyword[final] identifier[TypeResolver] identifier[typeResolver] , Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[LineMappings] operator[>] identifier[lineMappings] , Keyword[final] identifier[List] operator[<] identifier[KnowledgeBuilderResult] operator[>] identifier[errors] operator[SEP] { Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[vars] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[vars] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[pkg] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[vars] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[pkg] operator[SEP] identifier[getImports] operator[SEP] operator[SEP] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[staticImports] operator[=] Keyword[new] identifier[LinkedList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[staticImport] operator[:] identifier[pkg] operator[SEP] identifier[getStaticImports] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[staticImport] operator[SEP] identifier[endsWith] operator[SEP] identifier[functionDescr] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[staticImports] operator[SEP] identifier[add] operator[SEP] identifier[staticImport] operator[SEP] operator[SEP] } } identifier[vars] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[staticImports] operator[SEP] operator[SEP] identifier[vars] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[StringUtils] operator[SEP] identifier[ucFirst] operator[SEP] identifier[functionDescr] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[vars] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[functionDescr] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[vars] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[functionDescr] operator[SEP] identifier[getReturnType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[vars] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[functionDescr] operator[SEP] identifier[getParameterTypes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[vars] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[functionDescr] operator[SEP] identifier[getParameterNames] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[vars] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[functionDescr] operator[SEP] identifier[getText] operator[SEP] operator[SEP] operator[SEP] identifier[hashCode] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[names] operator[=] identifier[functionDescr] operator[SEP] identifier[getParameterNames] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[types] operator[=] identifier[functionDescr] operator[SEP] identifier[getParameterTypes] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] , identifier[size] operator[=] identifier[names] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[<] identifier[size] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[try] { identifier[typeResolver] operator[SEP] identifier[resolveType] operator[SEP] identifier[types] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[ClassNotFoundException] identifier[e] operator[SEP] { identifier[errors] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[FunctionError] operator[SEP] identifier[functionDescr] , identifier[e] , literal[String] operator[+] identifier[types] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } } identifier[vars] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[functionDescr] operator[SEP] identifier[getText] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[text] operator[=] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[TemplateRuntime] operator[SEP] identifier[eval] operator[SEP] identifier[template] , Other[null] , Keyword[new] identifier[MapVariableResolverFactory] operator[SEP] identifier[vars] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[BufferedReader] identifier[reader] operator[=] Keyword[new] identifier[BufferedReader] operator[SEP] Keyword[new] identifier[StringReader] operator[SEP] identifier[text] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[lineStartsWith] operator[=] literal[String] operator[+] identifier[functionDescr] operator[SEP] identifier[getReturnType] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[functionDescr] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[String] identifier[line] operator[SEP] Keyword[int] identifier[offset] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[line] operator[=] identifier[reader] operator[SEP] identifier[readLine] operator[SEP] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[offset] operator[++] operator[SEP] Keyword[if] operator[SEP] identifier[line] operator[SEP] identifier[startsWith] operator[SEP] identifier[lineStartsWith] operator[SEP] operator[SEP] { Keyword[break] operator[SEP] } } identifier[functionDescr] operator[SEP] identifier[setOffset] operator[SEP] identifier[offset] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[final] identifier[String] identifier[name] operator[=] identifier[pkg] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[StringUtils] operator[SEP] identifier[ucFirst] operator[SEP] identifier[functionDescr] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[LineMappings] identifier[mapping] operator[=] Keyword[new] identifier[LineMappings] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[mapping] operator[SEP] identifier[setStartLine] operator[SEP] identifier[functionDescr] operator[SEP] identifier[getLine] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[mapping] operator[SEP] identifier[setOffset] operator[SEP] identifier[functionDescr] operator[SEP] identifier[getOffset] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[lineMappings] operator[SEP] identifier[put] operator[SEP] identifier[name] , identifier[mapping] operator[SEP] operator[SEP] Keyword[return] identifier[text] operator[SEP] }
public static AFPChain cpFastaToAfpChain(File fastaFile, Structure structure, int cpSite) throws IOException, StructureException { InputStream inStream = new FileInputStream(fastaFile); SequenceCreatorInterface<AminoAcidCompound> creator = new CasePreservingProteinSequenceCreator(AminoAcidCompoundSet.getAminoAcidCompoundSet()); SequenceHeaderParserInterface<ProteinSequence, AminoAcidCompound> headerParser = new GenericFastaHeaderParser<ProteinSequence, AminoAcidCompound>(); FastaReader<ProteinSequence, AminoAcidCompound> fastaReader = new FastaReader<ProteinSequence, AminoAcidCompound>(inStream, headerParser, creator); LinkedHashMap<String, ProteinSequence> sequences = fastaReader.process(); inStream.close(); Iterator<ProteinSequence> iter = sequences.values().iterator(); ProteinSequence first = iter.next(); ProteinSequence second = iter.next(); return cpFastaToAfpChain(first, second, structure, cpSite); }
class class_name[name] begin[{] method[cpFastaToAfpChain, return_type[type[AFPChain]], modifier[public static], parameter[fastaFile, structure, cpSite]] begin[{] local_variable[type[InputStream], inStream] local_variable[type[SequenceCreatorInterface], creator] local_variable[type[SequenceHeaderParserInterface], headerParser] local_variable[type[FastaReader], fastaReader] local_variable[type[LinkedHashMap], sequences] call[inStream.close, parameter[]] local_variable[type[Iterator], iter] local_variable[type[ProteinSequence], first] local_variable[type[ProteinSequence], second] return[call[.cpFastaToAfpChain, parameter[member[.first], member[.second], member[.structure], member[.cpSite]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[AFPChain] identifier[cpFastaToAfpChain] operator[SEP] identifier[File] identifier[fastaFile] , identifier[Structure] identifier[structure] , Keyword[int] identifier[cpSite] operator[SEP] Keyword[throws] identifier[IOException] , identifier[StructureException] { identifier[InputStream] identifier[inStream] operator[=] Keyword[new] identifier[FileInputStream] operator[SEP] identifier[fastaFile] operator[SEP] operator[SEP] identifier[SequenceCreatorInterface] operator[<] identifier[AminoAcidCompound] operator[>] identifier[creator] operator[=] Keyword[new] identifier[CasePreservingProteinSequenceCreator] operator[SEP] identifier[AminoAcidCompoundSet] operator[SEP] identifier[getAminoAcidCompoundSet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[SequenceHeaderParserInterface] operator[<] identifier[ProteinSequence] , identifier[AminoAcidCompound] operator[>] identifier[headerParser] operator[=] Keyword[new] identifier[GenericFastaHeaderParser] operator[<] identifier[ProteinSequence] , identifier[AminoAcidCompound] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[FastaReader] operator[<] identifier[ProteinSequence] , identifier[AminoAcidCompound] operator[>] identifier[fastaReader] operator[=] Keyword[new] identifier[FastaReader] operator[<] identifier[ProteinSequence] , identifier[AminoAcidCompound] operator[>] operator[SEP] identifier[inStream] , identifier[headerParser] , identifier[creator] operator[SEP] operator[SEP] identifier[LinkedHashMap] operator[<] identifier[String] , identifier[ProteinSequence] operator[>] identifier[sequences] operator[=] identifier[fastaReader] operator[SEP] identifier[process] operator[SEP] operator[SEP] operator[SEP] identifier[inStream] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[Iterator] operator[<] identifier[ProteinSequence] operator[>] identifier[iter] operator[=] identifier[sequences] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[ProteinSequence] identifier[first] operator[=] identifier[iter] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[ProteinSequence] identifier[second] operator[=] identifier[iter] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[cpFastaToAfpChain] operator[SEP] identifier[first] , identifier[second] , identifier[structure] , identifier[cpSite] operator[SEP] operator[SEP] }
public static void main(String[] args) throws Exception { final ParameterTool params = ParameterTool.fromArgs(args); // set up execution environment final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment(); final int iterations = params.getInt("iterations", 10); // make parameters available in the web interface env.getConfig().setGlobalJobParameters(params); // get input x data from elements DataSet<Data> data; if (params.has("input")) { // read data from CSV file data = env.readCsvFile(params.get("input")) .fieldDelimiter(" ") .includeFields(true, true) .pojoType(Data.class); } else { System.out.println("Executing LinearRegression example with default input data set."); System.out.println("Use --input to specify file input."); data = LinearRegressionData.getDefaultDataDataSet(env); } // get the parameters from elements DataSet<Params> parameters = LinearRegressionData.getDefaultParamsDataSet(env); // set number of bulk iterations for SGD linear Regression IterativeDataSet<Params> loop = parameters.iterate(iterations); DataSet<Params> newParameters = data // compute a single step using every sample .map(new SubUpdate()).withBroadcastSet(loop, "parameters") // sum up all the steps .reduce(new UpdateAccumulator()) // average the steps and update all parameters .map(new Update()); // feed new parameters back into next iteration DataSet<Params> result = loop.closeWith(newParameters); // emit result if (params.has("output")) { result.writeAsText(params.get("output")); // execute program env.execute("Linear Regression example"); } else { System.out.println("Printing result to stdout. Use --output to specify output path."); result.print(); } }
class class_name[name] begin[{] method[main, return_type[void], modifier[public static], parameter[args]] begin[{] local_variable[type[ParameterTool], params] local_variable[type[ExecutionEnvironment], env] local_variable[type[int], iterations] call[env.getConfig, parameter[]] local_variable[type[DataSet], data] if[call[params.has, parameter[literal["input"]]]] begin[{] assign[member[.data], call[env.readCsvFile, parameter[call[params.get, parameter[literal["input"]]]]]] else begin[{] call[System.out.println, parameter[literal["Executing LinearRegression example with default input data set."]]] call[System.out.println, parameter[literal["Use --input to specify file input."]]] assign[member[.data], call[LinearRegressionData.getDefaultDataDataSet, parameter[member[.env]]]] end[}] local_variable[type[DataSet], parameters] local_variable[type[IterativeDataSet], loop] local_variable[type[DataSet], newParameters] local_variable[type[DataSet], result] if[call[params.has, parameter[literal["output"]]]] begin[{] call[result.writeAsText, parameter[call[params.get, parameter[literal["output"]]]]] call[env.execute, parameter[literal["Linear Regression example"]]] else begin[{] call[System.out.println, parameter[literal["Printing result to stdout. Use --output to specify output path."]]] call[result.print, parameter[]] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[final] identifier[ParameterTool] identifier[params] operator[=] identifier[ParameterTool] operator[SEP] identifier[fromArgs] operator[SEP] identifier[args] operator[SEP] operator[SEP] Keyword[final] identifier[ExecutionEnvironment] identifier[env] operator[=] identifier[ExecutionEnvironment] operator[SEP] identifier[getExecutionEnvironment] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[iterations] operator[=] identifier[params] operator[SEP] identifier[getInt] operator[SEP] literal[String] , Other[10] operator[SEP] operator[SEP] identifier[env] operator[SEP] identifier[getConfig] operator[SEP] operator[SEP] operator[SEP] identifier[setGlobalJobParameters] operator[SEP] identifier[params] operator[SEP] operator[SEP] identifier[DataSet] operator[<] identifier[Data] operator[>] identifier[data] operator[SEP] Keyword[if] operator[SEP] identifier[params] operator[SEP] identifier[has] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[data] operator[=] identifier[env] operator[SEP] identifier[readCsvFile] operator[SEP] identifier[params] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[fieldDelimiter] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[includeFields] operator[SEP] literal[boolean] , literal[boolean] operator[SEP] operator[SEP] identifier[pojoType] operator[SEP] identifier[Data] operator[SEP] Keyword[class] operator[SEP] operator[SEP] } Keyword[else] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[data] operator[=] identifier[LinearRegressionData] operator[SEP] identifier[getDefaultDataDataSet] operator[SEP] identifier[env] operator[SEP] operator[SEP] } identifier[DataSet] operator[<] identifier[Params] operator[>] identifier[parameters] operator[=] identifier[LinearRegressionData] operator[SEP] identifier[getDefaultParamsDataSet] operator[SEP] identifier[env] operator[SEP] operator[SEP] identifier[IterativeDataSet] operator[<] identifier[Params] operator[>] identifier[loop] operator[=] identifier[parameters] operator[SEP] identifier[iterate] operator[SEP] identifier[iterations] operator[SEP] operator[SEP] identifier[DataSet] operator[<] identifier[Params] operator[>] identifier[newParameters] operator[=] identifier[data] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[SubUpdate] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[withBroadcastSet] operator[SEP] identifier[loop] , literal[String] operator[SEP] operator[SEP] identifier[reduce] operator[SEP] Keyword[new] identifier[UpdateAccumulator] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Update] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[DataSet] operator[<] identifier[Params] operator[>] identifier[result] operator[=] identifier[loop] operator[SEP] identifier[closeWith] operator[SEP] identifier[newParameters] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[params] operator[SEP] identifier[has] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[result] operator[SEP] identifier[writeAsText] operator[SEP] identifier[params] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[env] operator[SEP] identifier[execute] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[print] operator[SEP] operator[SEP] operator[SEP] } }
public static long searchMin(long[] longArray) { if(longArray.length == 0) { throw new IllegalArgumentException("The array you provided does not have any elements"); } long min = longArray[0]; for(int i = 1; i < longArray.length; i++) { if(longArray[i] < min) { min = longArray[i]; } } return min; }
class class_name[name] begin[{] method[searchMin, return_type[type[long]], modifier[public static], parameter[longArray]] begin[{] if[binary_operation[member[longArray.length], ==, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The array you provided does not have any elements")], 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[long], min] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=longArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=min, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=min, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=longArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=longArray, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.min]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[long] identifier[searchMin] operator[SEP] Keyword[long] operator[SEP] operator[SEP] identifier[longArray] operator[SEP] { Keyword[if] operator[SEP] identifier[longArray] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[long] identifier[min] operator[=] identifier[longArray] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[1] operator[SEP] identifier[i] operator[<] identifier[longArray] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[longArray] operator[SEP] identifier[i] operator[SEP] operator[<] identifier[min] operator[SEP] { identifier[min] operator[=] identifier[longArray] operator[SEP] identifier[i] operator[SEP] operator[SEP] } } Keyword[return] identifier[min] operator[SEP] }
protected ByteSource stream(final String resourceId) { return new ByteSource() { @Override public InputStream openStream() throws IOException { return loader.getResource(resourceId).getInputStream(); } }; }
class class_name[name] begin[{] method[stream, return_type[type[ByteSource]], modifier[protected], parameter[resourceId]] begin[{] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=resourceId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getResource, postfix_operators=[], prefix_operators=[], qualifier=loader, selectors=[MethodInvocation(arguments=[], member=getInputStream, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=openStream, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None), throws=['IOException'], type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ByteSource, sub_type=None))] end[}] END[}]
Keyword[protected] identifier[ByteSource] identifier[stream] operator[SEP] Keyword[final] identifier[String] identifier[resourceId] operator[SEP] { Keyword[return] Keyword[new] identifier[ByteSource] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[InputStream] identifier[openStream] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[return] identifier[loader] operator[SEP] identifier[getResource] operator[SEP] identifier[resourceId] operator[SEP] operator[SEP] identifier[getInputStream] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] }
public CompletableFuture<CloseSessionResponse> closeSession(CloseSessionRequest request) { CompletableFuture<CloseSessionResponse> future = new CompletableFuture<>(); if (context.isCurrentContext()) { sendRequest(request, protocol::closeSession, future); } else { context.execute(() -> sendRequest(request, protocol::closeSession, future)); } return future; }
class class_name[name] begin[{] method[closeSession, return_type[type[CompletableFuture]], modifier[public], parameter[request]] begin[{] local_variable[type[CompletableFuture], future] if[call[context.isCurrentContext, parameter[]]] begin[{] call[.sendRequest, parameter[member[.request], MethodReference(expression=MemberReference(member=protocol, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), method=MemberReference(member=closeSession, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[]), member[.future]]] else begin[{] call[context.execute, parameter[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=request, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodReference(expression=MemberReference(member=protocol, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), method=MemberReference(member=closeSession, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[]), MemberReference(member=future, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sendRequest, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), parameters=[])]] end[}] return[member[.future]] end[}] END[}]
Keyword[public] identifier[CompletableFuture] operator[<] identifier[CloseSessionResponse] operator[>] identifier[closeSession] operator[SEP] identifier[CloseSessionRequest] identifier[request] operator[SEP] { identifier[CompletableFuture] operator[<] identifier[CloseSessionResponse] operator[>] identifier[future] operator[=] Keyword[new] identifier[CompletableFuture] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[context] operator[SEP] identifier[isCurrentContext] operator[SEP] operator[SEP] operator[SEP] { identifier[sendRequest] operator[SEP] identifier[request] , identifier[protocol] operator[::] identifier[closeSession] , identifier[future] operator[SEP] operator[SEP] } Keyword[else] { identifier[context] operator[SEP] identifier[execute] operator[SEP] operator[SEP] operator[SEP] operator[->] identifier[sendRequest] operator[SEP] identifier[request] , identifier[protocol] operator[::] identifier[closeSession] , identifier[future] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[future] operator[SEP] }
public long unfilledDependencyToLong(UnfilledDependency dep) { long argNum = dep.getArgumentIndex(); long objectNum, objectWordInd, subjectNum, subjectWordInd, subjectSyntaxNum; if (dep.hasObject()) { IndexedPredicate obj = dep.getObject(); objectNum = dependencyHeadType.getValueIndex(obj.getHead()) + MAX_ARG_NUM; objectWordInd = obj.getHeadIndex(); } else { objectNum = dep.getObjectIndex(); objectWordInd = 0L; } if (dep.hasSubject()) { IndexedPredicate sbj = dep.getSubject(); subjectNum = dependencyHeadType.getValueIndex(sbj.getHead()) + MAX_ARG_NUM; subjectWordInd = sbj.getHeadIndex(); subjectSyntaxNum = dependencySyntaxType.getValueIndex(dep.getSubjectSyntax()); } else { subjectNum = dep.getSubjectIndex(); subjectSyntaxNum = 0L; subjectWordInd = 0L; } return marshalUnfilledDependency(objectNum, argNum, subjectNum, subjectSyntaxNum, objectWordInd, subjectWordInd); }
class class_name[name] begin[{] method[unfilledDependencyToLong, return_type[type[long]], modifier[public], parameter[dep]] begin[{] local_variable[type[long], argNum] local_variable[type[long], objectNum] if[call[dep.hasObject, parameter[]]] begin[{] local_variable[type[IndexedPredicate], obj] assign[member[.objectNum], binary_operation[call[dependencyHeadType.getValueIndex, parameter[call[obj.getHead, parameter[]]]], +, member[.MAX_ARG_NUM]]] assign[member[.objectWordInd], call[obj.getHeadIndex, parameter[]]] else begin[{] assign[member[.objectNum], call[dep.getObjectIndex, parameter[]]] assign[member[.objectWordInd], literal[0L]] end[}] if[call[dep.hasSubject, parameter[]]] begin[{] local_variable[type[IndexedPredicate], sbj] assign[member[.subjectNum], binary_operation[call[dependencyHeadType.getValueIndex, parameter[call[sbj.getHead, parameter[]]]], +, member[.MAX_ARG_NUM]]] assign[member[.subjectWordInd], call[sbj.getHeadIndex, parameter[]]] assign[member[.subjectSyntaxNum], call[dependencySyntaxType.getValueIndex, parameter[call[dep.getSubjectSyntax, parameter[]]]]] else begin[{] assign[member[.subjectNum], call[dep.getSubjectIndex, parameter[]]] assign[member[.subjectSyntaxNum], literal[0L]] assign[member[.subjectWordInd], literal[0L]] end[}] return[call[.marshalUnfilledDependency, parameter[member[.objectNum], member[.argNum], member[.subjectNum], member[.subjectSyntaxNum], member[.objectWordInd], member[.subjectWordInd]]]] end[}] END[}]
Keyword[public] Keyword[long] identifier[unfilledDependencyToLong] operator[SEP] identifier[UnfilledDependency] identifier[dep] operator[SEP] { Keyword[long] identifier[argNum] operator[=] identifier[dep] operator[SEP] identifier[getArgumentIndex] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[objectNum] , identifier[objectWordInd] , identifier[subjectNum] , identifier[subjectWordInd] , identifier[subjectSyntaxNum] operator[SEP] Keyword[if] operator[SEP] identifier[dep] operator[SEP] identifier[hasObject] operator[SEP] operator[SEP] operator[SEP] { identifier[IndexedPredicate] identifier[obj] operator[=] identifier[dep] operator[SEP] identifier[getObject] operator[SEP] operator[SEP] operator[SEP] identifier[objectNum] operator[=] identifier[dependencyHeadType] operator[SEP] identifier[getValueIndex] operator[SEP] identifier[obj] operator[SEP] identifier[getHead] operator[SEP] operator[SEP] operator[SEP] operator[+] identifier[MAX_ARG_NUM] operator[SEP] identifier[objectWordInd] operator[=] identifier[obj] operator[SEP] identifier[getHeadIndex] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[objectNum] operator[=] identifier[dep] operator[SEP] identifier[getObjectIndex] operator[SEP] operator[SEP] operator[SEP] identifier[objectWordInd] operator[=] Other[0L] operator[SEP] } Keyword[if] operator[SEP] identifier[dep] operator[SEP] identifier[hasSubject] operator[SEP] operator[SEP] operator[SEP] { identifier[IndexedPredicate] identifier[sbj] operator[=] identifier[dep] operator[SEP] identifier[getSubject] operator[SEP] operator[SEP] operator[SEP] identifier[subjectNum] operator[=] identifier[dependencyHeadType] operator[SEP] identifier[getValueIndex] operator[SEP] identifier[sbj] operator[SEP] identifier[getHead] operator[SEP] operator[SEP] operator[SEP] operator[+] identifier[MAX_ARG_NUM] operator[SEP] identifier[subjectWordInd] operator[=] identifier[sbj] operator[SEP] identifier[getHeadIndex] operator[SEP] operator[SEP] operator[SEP] identifier[subjectSyntaxNum] operator[=] identifier[dependencySyntaxType] operator[SEP] identifier[getValueIndex] operator[SEP] identifier[dep] operator[SEP] identifier[getSubjectSyntax] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[subjectNum] operator[=] identifier[dep] operator[SEP] identifier[getSubjectIndex] operator[SEP] operator[SEP] operator[SEP] identifier[subjectSyntaxNum] operator[=] Other[0L] operator[SEP] identifier[subjectWordInd] operator[=] Other[0L] operator[SEP] } Keyword[return] identifier[marshalUnfilledDependency] operator[SEP] identifier[objectNum] , identifier[argNum] , identifier[subjectNum] , identifier[subjectSyntaxNum] , identifier[objectWordInd] , identifier[subjectWordInd] operator[SEP] operator[SEP] }
static int getRightMostLeafUnderNode(int nodeOrder, int depth) { if (isLeaf(nodeOrder, depth)) { return nodeOrder; } int levelOfNode = getLevelOfNode(nodeOrder); int distanceFromLeafLevel = depth - levelOfNode - 1; int leftMostLeafUnderNode = getLeftMostLeafUnderNode(nodeOrder, depth); int leavesOfSubtreeUnderNode = getNodesOnLevel(distanceFromLeafLevel); return leftMostLeafUnderNode + leavesOfSubtreeUnderNode - 1; }
class class_name[name] begin[{] method[getRightMostLeafUnderNode, return_type[type[int]], modifier[static], parameter[nodeOrder, depth]] begin[{] if[call[.isLeaf, parameter[member[.nodeOrder], member[.depth]]]] begin[{] return[member[.nodeOrder]] else begin[{] None end[}] local_variable[type[int], levelOfNode] local_variable[type[int], distanceFromLeafLevel] local_variable[type[int], leftMostLeafUnderNode] local_variable[type[int], leavesOfSubtreeUnderNode] return[binary_operation[binary_operation[member[.leftMostLeafUnderNode], +, member[.leavesOfSubtreeUnderNode]], -, literal[1]]] end[}] END[}]
Keyword[static] Keyword[int] identifier[getRightMostLeafUnderNode] operator[SEP] Keyword[int] identifier[nodeOrder] , Keyword[int] identifier[depth] operator[SEP] { Keyword[if] operator[SEP] identifier[isLeaf] operator[SEP] identifier[nodeOrder] , identifier[depth] operator[SEP] operator[SEP] { Keyword[return] identifier[nodeOrder] operator[SEP] } Keyword[int] identifier[levelOfNode] operator[=] identifier[getLevelOfNode] operator[SEP] identifier[nodeOrder] operator[SEP] operator[SEP] Keyword[int] identifier[distanceFromLeafLevel] operator[=] identifier[depth] operator[-] identifier[levelOfNode] operator[-] Other[1] operator[SEP] Keyword[int] identifier[leftMostLeafUnderNode] operator[=] identifier[getLeftMostLeafUnderNode] operator[SEP] identifier[nodeOrder] , identifier[depth] operator[SEP] operator[SEP] Keyword[int] identifier[leavesOfSubtreeUnderNode] operator[=] identifier[getNodesOnLevel] operator[SEP] identifier[distanceFromLeafLevel] operator[SEP] operator[SEP] Keyword[return] identifier[leftMostLeafUnderNode] operator[+] identifier[leavesOfSubtreeUnderNode] operator[-] Other[1] operator[SEP] }
public static float[] unWrap(Float... values) { if (null == values) { return null; } final int length = values.length; if (0 == length) { return new float[0]; } final float[] array = new float[length]; for (int i = 0; i < length; i++) { array[i] = values[i].floatValue(); } return array; }
class class_name[name] begin[{] method[unWrap, return_type[type[float]], modifier[public static], parameter[values]] begin[{] if[binary_operation[literal[null], ==, member[.values]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[int], length] if[binary_operation[literal[0], ==, member[.length]]] begin[{] return[ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=float))] else begin[{] None end[}] local_variable[type[float], array] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=floatValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, 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=, 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[.array]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[float] operator[SEP] operator[SEP] identifier[unWrap] operator[SEP] identifier[Float] operator[...] identifier[values] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[values] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[final] Keyword[int] identifier[length] operator[=] identifier[values] operator[SEP] identifier[length] operator[SEP] Keyword[if] operator[SEP] Other[0] operator[==] identifier[length] operator[SEP] { Keyword[return] Keyword[new] Keyword[float] operator[SEP] Other[0] operator[SEP] operator[SEP] } Keyword[final] Keyword[float] operator[SEP] operator[SEP] identifier[array] operator[=] Keyword[new] Keyword[float] 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[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[array] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[values] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[floatValue] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[array] operator[SEP] }
public static base_response unset(nitro_service client, aaaradiusparams resource, String[] args) throws Exception{ aaaradiusparams unsetresource = new aaaradiusparams(); return unsetresource.unset_resource(client,args); }
class class_name[name] begin[{] method[unset, return_type[type[base_response]], modifier[public static], parameter[client, resource, args]] begin[{] local_variable[type[aaaradiusparams], unsetresource] return[call[unsetresource.unset_resource, parameter[member[.client], member[.args]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[base_response] identifier[unset] operator[SEP] identifier[nitro_service] identifier[client] , identifier[aaaradiusparams] identifier[resource] , identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[Exception] { identifier[aaaradiusparams] identifier[unsetresource] operator[=] Keyword[new] identifier[aaaradiusparams] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[unsetresource] operator[SEP] identifier[unset_resource] operator[SEP] identifier[client] , identifier[args] operator[SEP] operator[SEP] }
public Object createContext(Object param) throws Exception { Class<?>[] params = mConstr != null ? mConstr.getParameterTypes() : new Class[0]; if (params.length > 1 && MergedClass.InvocationEventObserver.class.equals(params[1])) { return mConstr.newInstance(new Object[] { new MergingContextFactory(param), new MergedClass.InvocationEventObserver() { public void invokedEvent(String caller, String callee, long elapsedTime) { } public long currentTime() { return 0L; } }}); } else { return mConstr.newInstance(new Object[] { new MergingContextFactory(param)}); } }
class class_name[name] begin[{] method[createContext, return_type[type[Object]], modifier[public], parameter[param]] begin[{] local_variable[type[Class], params] if[binary_operation[binary_operation[member[params.length], >, literal[1]], &&, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=MergedClass, selectors=[MethodInvocation(arguments=[MemberReference(member=params, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=InvocationEventObserver, sub_type=None))]] begin[{] return[call[mConstr.newInstance, parameter[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[ClassCreator(arguments=[MemberReference(member=param, 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=MergingContextFactory, sub_type=None)), ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[], documentation=None, modifiers={'public'}, name=invokedEvent, parameters=[FormalParameter(annotations=[], modifiers=set(), name=caller, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=callee, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=elapsedTime, type=BasicType(dimensions=[], name=long), varargs=False)], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[], body=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0L), label=None)], documentation=None, modifiers={'public'}, name=currentTime, parameters=[], return_type=BasicType(dimensions=[], name=long), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MergedClass, sub_type=ReferenceType(arguments=None, dimensions=None, name=InvocationEventObserver, sub_type=None)))]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]]] else begin[{] return[call[mConstr.newInstance, parameter[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[ClassCreator(arguments=[MemberReference(member=param, 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=MergingContextFactory, sub_type=None))]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]]] end[}] end[}] END[}]
Keyword[public] identifier[Object] identifier[createContext] operator[SEP] identifier[Object] identifier[param] operator[SEP] Keyword[throws] identifier[Exception] { identifier[Class] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[params] operator[=] identifier[mConstr] operator[!=] Other[null] operator[?] identifier[mConstr] operator[SEP] identifier[getParameterTypes] operator[SEP] operator[SEP] operator[:] Keyword[new] identifier[Class] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[params] operator[SEP] identifier[length] operator[>] Other[1] operator[&&] identifier[MergedClass] operator[SEP] identifier[InvocationEventObserver] operator[SEP] Keyword[class] operator[SEP] identifier[equals] operator[SEP] identifier[params] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[mConstr] operator[SEP] identifier[newInstance] operator[SEP] Keyword[new] identifier[Object] operator[SEP] operator[SEP] { Keyword[new] identifier[MergingContextFactory] operator[SEP] identifier[param] operator[SEP] , Keyword[new] identifier[MergedClass] operator[SEP] identifier[InvocationEventObserver] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[invokedEvent] operator[SEP] identifier[String] identifier[caller] , identifier[String] identifier[callee] , Keyword[long] identifier[elapsedTime] operator[SEP] { } Keyword[public] Keyword[long] identifier[currentTime] operator[SEP] operator[SEP] { Keyword[return] Other[0L] operator[SEP] } } } operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[mConstr] operator[SEP] identifier[newInstance] operator[SEP] Keyword[new] identifier[Object] operator[SEP] operator[SEP] { Keyword[new] identifier[MergingContextFactory] operator[SEP] identifier[param] operator[SEP] } operator[SEP] operator[SEP] } }
static public void scanRoot(File root, Set<String> suffixes, List<String> excludes, List<String> includes, List<String> excludeFiles, List<String> includeFiles, Map<String,Source> foundFiles, Map<String,Module> foundModules, Module currentModule, boolean permitSourcesWithoutPackage, boolean inGensrc, boolean inLinksrc) throws ProblemException { if (root == null) return; int root_prefix = root.getPath().length()+1; // This is the root source directory, it must not contain any Java sources files // because we do not allow Java source files without a package. // (Unless of course --permit-sources-without-package has been specified.) // It might contain other source files however, (for -tr and -copy) these will // always be included, since no package pattern can match the root directory. currentModule = addFilesInDir(root, root_prefix, root, suffixes, permitSourcesWithoutPackage, excludeFiles, includeFiles, false, foundFiles, foundModules, currentModule, inGensrc, inLinksrc); File[] dirfiles = root.listFiles(); for (File d : dirfiles) { if (d.isDirectory()) { // Descend into the directory structure. scanDirectory(d, root_prefix, root, suffixes, excludes, includes, excludeFiles, includeFiles, false, foundFiles, foundModules, currentModule, inGensrc, inLinksrc); } } }
class class_name[name] begin[{] method[scanRoot, return_type[void], modifier[public static], parameter[root, suffixes, excludes, includes, excludeFiles, includeFiles, foundFiles, foundModules, currentModule, permitSourcesWithoutPackage, inGensrc, inLinksrc]] begin[{] if[binary_operation[member[.root], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[int], root_prefix] assign[member[.currentModule], call[.addFilesInDir, parameter[member[.root], member[.root_prefix], member[.root], member[.suffixes], member[.permitSourcesWithoutPackage], member[.excludeFiles], member[.includeFiles], literal[false], member[.foundFiles], member[.foundModules], member[.currentModule], member[.inGensrc], member[.inLinksrc]]]] local_variable[type[File], dirfiles] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isDirectory, postfix_operators=[], prefix_operators=[], qualifier=d, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=root_prefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=root, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=suffixes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=excludes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=includes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=excludeFiles, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=includeFiles, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), MemberReference(member=foundFiles, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=foundModules, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=currentModule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=inGensrc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=inLinksrc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=scanDirectory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=dirfiles, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=d)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))), label=None) end[}] END[}]
Keyword[static] Keyword[public] Keyword[void] identifier[scanRoot] operator[SEP] identifier[File] identifier[root] , identifier[Set] operator[<] identifier[String] operator[>] identifier[suffixes] , identifier[List] operator[<] identifier[String] operator[>] identifier[excludes] , identifier[List] operator[<] identifier[String] operator[>] identifier[includes] , identifier[List] operator[<] identifier[String] operator[>] identifier[excludeFiles] , identifier[List] operator[<] identifier[String] operator[>] identifier[includeFiles] , identifier[Map] operator[<] identifier[String] , identifier[Source] operator[>] identifier[foundFiles] , identifier[Map] operator[<] identifier[String] , identifier[Module] operator[>] identifier[foundModules] , identifier[Module] identifier[currentModule] , Keyword[boolean] identifier[permitSourcesWithoutPackage] , Keyword[boolean] identifier[inGensrc] , Keyword[boolean] identifier[inLinksrc] operator[SEP] Keyword[throws] identifier[ProblemException] { Keyword[if] operator[SEP] identifier[root] operator[==] Other[null] operator[SEP] Keyword[return] operator[SEP] Keyword[int] identifier[root_prefix] operator[=] identifier[root] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[+] Other[1] operator[SEP] identifier[currentModule] operator[=] identifier[addFilesInDir] operator[SEP] identifier[root] , identifier[root_prefix] , identifier[root] , identifier[suffixes] , identifier[permitSourcesWithoutPackage] , identifier[excludeFiles] , identifier[includeFiles] , literal[boolean] , identifier[foundFiles] , identifier[foundModules] , identifier[currentModule] , identifier[inGensrc] , identifier[inLinksrc] operator[SEP] operator[SEP] identifier[File] operator[SEP] operator[SEP] identifier[dirfiles] operator[=] identifier[root] operator[SEP] identifier[listFiles] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[File] identifier[d] operator[:] identifier[dirfiles] operator[SEP] { Keyword[if] operator[SEP] identifier[d] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] { identifier[scanDirectory] operator[SEP] identifier[d] , identifier[root_prefix] , identifier[root] , identifier[suffixes] , identifier[excludes] , identifier[includes] , identifier[excludeFiles] , identifier[includeFiles] , literal[boolean] , identifier[foundFiles] , identifier[foundModules] , identifier[currentModule] , identifier[inGensrc] , identifier[inLinksrc] operator[SEP] operator[SEP] } } }
public void addToSms(final Sms sms) { if (null == getSms()) { setSms(new java.util.TreeSet<Sms>()); } getSms().add(sms); }
class class_name[name] begin[{] method[addToSms, return_type[void], modifier[public], parameter[sms]] begin[{] if[binary_operation[literal[null], ==, call[.getSms, parameter[]]]] begin[{] call[.setSms, parameter[ClassCreator(arguments=[], 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=Sms, sub_type=None))], dimensions=None, name=TreeSet, sub_type=None))))]] else begin[{] None end[}] call[.getSms, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addToSms] operator[SEP] Keyword[final] identifier[Sms] identifier[sms] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[getSms] operator[SEP] operator[SEP] operator[SEP] { identifier[setSms] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[TreeSet] operator[<] identifier[Sms] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[getSms] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[sms] operator[SEP] operator[SEP] }
private boolean startPartition(PartitionPlanConfig config) { if (isStoppingStoppedOrFailed()) { return false; } if (isMultiJvm) { startPartitionRemote(config); } else { startPartitionLocal(config); } // TODO: should this message be issued from the partition? (won't go to top-level log if so?) // should we have a separate message issued from here, "partition.submitted" ? JoblogUtil.logToJobLogAndTraceOnly(Level.FINER, "partition.started", new Object[] { config.getPartitionNumber(), getStepName(), config.getTopLevelInstanceId(), config.getTopLevelExecutionId() }, logger); return true; }
class class_name[name] begin[{] method[startPartition, return_type[type[boolean]], modifier[private], parameter[config]] begin[{] if[call[.isStoppingStoppedOrFailed, parameter[]]] begin[{] return[literal[false]] else begin[{] None end[}] if[member[.isMultiJvm]] begin[{] call[.startPartitionRemote, parameter[member[.config]]] else begin[{] call[.startPartitionLocal, parameter[member[.config]]] end[}] call[JoblogUtil.logToJobLogAndTraceOnly, parameter[member[Level.FINER], literal["partition.started"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[], member=getPartitionNumber, postfix_operators=[], prefix_operators=[], qualifier=config, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getStepName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getTopLevelInstanceId, postfix_operators=[], prefix_operators=[], qualifier=config, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getTopLevelExecutionId, postfix_operators=[], prefix_operators=[], qualifier=config, selectors=[], type_arguments=None)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None)), member[.logger]]] return[literal[true]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[startPartition] operator[SEP] identifier[PartitionPlanConfig] identifier[config] operator[SEP] { Keyword[if] operator[SEP] identifier[isStoppingStoppedOrFailed] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[isMultiJvm] operator[SEP] { identifier[startPartitionRemote] operator[SEP] identifier[config] operator[SEP] operator[SEP] } Keyword[else] { identifier[startPartitionLocal] operator[SEP] identifier[config] operator[SEP] operator[SEP] } identifier[JoblogUtil] operator[SEP] identifier[logToJobLogAndTraceOnly] operator[SEP] identifier[Level] operator[SEP] identifier[FINER] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[config] operator[SEP] identifier[getPartitionNumber] operator[SEP] operator[SEP] , identifier[getStepName] operator[SEP] operator[SEP] , identifier[config] operator[SEP] identifier[getTopLevelInstanceId] operator[SEP] operator[SEP] , identifier[config] operator[SEP] identifier[getTopLevelExecutionId] operator[SEP] operator[SEP] } , identifier[logger] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
private void sendDelayedMessage(SuperToast superToast, int messageId, long delay) { Message message = obtainMessage(messageId); message.obj = superToast; sendMessageDelayed(message, delay); }
class class_name[name] begin[{] method[sendDelayedMessage, return_type[void], modifier[private], parameter[superToast, messageId, delay]] begin[{] local_variable[type[Message], message] assign[member[message.obj], member[.superToast]] call[.sendMessageDelayed, parameter[member[.message], member[.delay]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[sendDelayedMessage] operator[SEP] identifier[SuperToast] identifier[superToast] , Keyword[int] identifier[messageId] , Keyword[long] identifier[delay] operator[SEP] { identifier[Message] identifier[message] operator[=] identifier[obtainMessage] operator[SEP] identifier[messageId] operator[SEP] operator[SEP] identifier[message] operator[SEP] identifier[obj] operator[=] identifier[superToast] operator[SEP] identifier[sendMessageDelayed] operator[SEP] identifier[message] , identifier[delay] operator[SEP] operator[SEP] }
@Override public void updateContext() { String newInstancePath = (this.parentInstancePath == null ? "" : this.parentInstancePath) + "/" + this.instanceName; this.context.instancePathToComponentName.put( newInstancePath, this.componentName ); }
class class_name[name] begin[{] method[updateContext, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[String], newInstancePath] THIS[member[None.context]member[None.instancePathToComponentName]call[None.put, parameter[member[.newInstancePath], THIS[member[None.componentName]]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[updateContext] operator[SEP] operator[SEP] { identifier[String] identifier[newInstancePath] operator[=] operator[SEP] Keyword[this] operator[SEP] identifier[parentInstancePath] operator[==] Other[null] operator[?] literal[String] operator[:] Keyword[this] operator[SEP] identifier[parentInstancePath] operator[SEP] operator[+] literal[String] operator[+] Keyword[this] operator[SEP] identifier[instanceName] operator[SEP] Keyword[this] operator[SEP] identifier[context] operator[SEP] identifier[instancePathToComponentName] operator[SEP] identifier[put] operator[SEP] identifier[newInstancePath] , Keyword[this] operator[SEP] identifier[componentName] operator[SEP] operator[SEP] }
protected boolean isMapJsonStenoEvent(@Nullable final Marker marker) { return marker != null && marker.contains(StenoMarker.MAP_JSON_MARKER); }
class class_name[name] begin[{] method[isMapJsonStenoEvent, return_type[type[boolean]], modifier[protected], parameter[marker]] begin[{] return[binary_operation[binary_operation[member[.marker], !=, literal[null]], &&, call[marker.contains, parameter[member[StenoMarker.MAP_JSON_MARKER]]]]] end[}] END[}]
Keyword[protected] Keyword[boolean] identifier[isMapJsonStenoEvent] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[Marker] identifier[marker] operator[SEP] { Keyword[return] identifier[marker] operator[!=] Other[null] operator[&&] identifier[marker] operator[SEP] identifier[contains] operator[SEP] identifier[StenoMarker] operator[SEP] identifier[MAP_JSON_MARKER] operator[SEP] operator[SEP] }
public static void addFileAsLocalResource(FileSystem fs, Path destFilePath, LocalResourceType resourceType, Map<String, LocalResource> resourceMap) throws IOException { LocalResource fileResource = Records.newRecord(LocalResource.class); FileStatus fileStatus = fs.getFileStatus(destFilePath); fileResource.setResource(ConverterUtils.getYarnUrlFromPath(destFilePath)); fileResource.setSize(fileStatus.getLen()); fileResource.setTimestamp(fileStatus.getModificationTime()); fileResource.setType(resourceType); fileResource.setVisibility(LocalResourceVisibility.APPLICATION); resourceMap.put(destFilePath.getName(), fileResource); }
class class_name[name] begin[{] method[addFileAsLocalResource, return_type[void], modifier[public static], parameter[fs, destFilePath, resourceType, resourceMap]] begin[{] local_variable[type[LocalResource], fileResource] local_variable[type[FileStatus], fileStatus] call[fileResource.setResource, parameter[call[ConverterUtils.getYarnUrlFromPath, parameter[member[.destFilePath]]]]] call[fileResource.setSize, parameter[call[fileStatus.getLen, parameter[]]]] call[fileResource.setTimestamp, parameter[call[fileStatus.getModificationTime, parameter[]]]] call[fileResource.setType, parameter[member[.resourceType]]] call[fileResource.setVisibility, parameter[member[LocalResourceVisibility.APPLICATION]]] call[resourceMap.put, parameter[call[destFilePath.getName, parameter[]], member[.fileResource]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[addFileAsLocalResource] operator[SEP] identifier[FileSystem] identifier[fs] , identifier[Path] identifier[destFilePath] , identifier[LocalResourceType] identifier[resourceType] , identifier[Map] operator[<] identifier[String] , identifier[LocalResource] operator[>] identifier[resourceMap] operator[SEP] Keyword[throws] identifier[IOException] { identifier[LocalResource] identifier[fileResource] operator[=] identifier[Records] operator[SEP] identifier[newRecord] operator[SEP] identifier[LocalResource] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[FileStatus] identifier[fileStatus] operator[=] identifier[fs] operator[SEP] identifier[getFileStatus] operator[SEP] identifier[destFilePath] operator[SEP] operator[SEP] identifier[fileResource] operator[SEP] identifier[setResource] operator[SEP] identifier[ConverterUtils] operator[SEP] identifier[getYarnUrlFromPath] operator[SEP] identifier[destFilePath] operator[SEP] operator[SEP] operator[SEP] identifier[fileResource] operator[SEP] identifier[setSize] operator[SEP] identifier[fileStatus] operator[SEP] identifier[getLen] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[fileResource] operator[SEP] identifier[setTimestamp] operator[SEP] identifier[fileStatus] operator[SEP] identifier[getModificationTime] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[fileResource] operator[SEP] identifier[setType] operator[SEP] identifier[resourceType] operator[SEP] operator[SEP] identifier[fileResource] operator[SEP] identifier[setVisibility] operator[SEP] identifier[LocalResourceVisibility] operator[SEP] identifier[APPLICATION] operator[SEP] operator[SEP] identifier[resourceMap] operator[SEP] identifier[put] operator[SEP] identifier[destFilePath] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[fileResource] operator[SEP] operator[SEP] }
public void clickOnView(View view) { if(config.commandLogging){ Log.d(config.commandLoggingTag, "clickOnView("+view+")"); } view = waiter.waitForView(view, Timeout.getSmallTimeout()); clicker.clickOnScreen(view); }
class class_name[name] begin[{] method[clickOnView, return_type[void], modifier[public], parameter[view]] begin[{] if[member[config.commandLogging]] begin[{] call[Log.d, parameter[member[config.commandLoggingTag], binary_operation[binary_operation[literal["clickOnView("], +, member[.view]], +, literal[")"]]]] else begin[{] None end[}] assign[member[.view], call[waiter.waitForView, parameter[member[.view], call[Timeout.getSmallTimeout, parameter[]]]]] call[clicker.clickOnScreen, parameter[member[.view]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[clickOnView] operator[SEP] identifier[View] identifier[view] operator[SEP] { Keyword[if] operator[SEP] identifier[config] operator[SEP] identifier[commandLogging] operator[SEP] { identifier[Log] operator[SEP] identifier[d] operator[SEP] identifier[config] operator[SEP] identifier[commandLoggingTag] , literal[String] operator[+] identifier[view] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[view] operator[=] identifier[waiter] operator[SEP] identifier[waitForView] operator[SEP] identifier[view] , identifier[Timeout] operator[SEP] identifier[getSmallTimeout] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[clicker] operator[SEP] identifier[clickOnScreen] operator[SEP] identifier[view] operator[SEP] operator[SEP] }
@Override public Result<Void> updAttribForNS(AuthzTrans trans, HttpServletResponse resp, String ns, String key, String value) { TimeTaken tt = trans.start(NS_UPDATE_ATTRIB + ' ' + ns + ':'+key+':'+value, Env.SUB|Env.ALWAYS); try { Result<?> rp = service.updateNsAttrib(trans,ns,key,value); switch(rp.status) { case OK: setContentType(resp, keysDF.getOutType()); resp.getOutputStream().println(); return Result.ok(); default: return Result.err(rp); } } catch (Exception e) { trans.error().log(e,IN,NS_UPDATE_ATTRIB); return Result.err(e); } finally { tt.done(); } }
class class_name[name] begin[{] method[updAttribForNS, return_type[type[Result]], modifier[public], parameter[trans, resp, ns, key, value]] begin[{] local_variable[type[TimeTaken], tt] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=trans, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=updateNsAttrib, postfix_operators=[], prefix_operators=[], qualifier=service, selectors=[], type_arguments=None), name=rp)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Result, sub_type=None)), SwitchStatement(cases=[SwitchStatementCase(case=['OK'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=resp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getOutType, postfix_operators=[], prefix_operators=[], qualifier=keysDF, selectors=[], type_arguments=None)], member=setContentType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getOutputStream, postfix_operators=[], prefix_operators=[], qualifier=resp, selectors=[MethodInvocation(arguments=[], member=println, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[], member=ok, postfix_operators=[], prefix_operators=[], qualifier=Result, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=[], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=rp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=err, postfix_operators=[], prefix_operators=[], qualifier=Result, selectors=[], type_arguments=None), label=None)])], expression=MemberReference(member=status, postfix_operators=[], prefix_operators=[], qualifier=rp, selectors=[]), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=error, postfix_operators=[], prefix_operators=[], qualifier=trans, selectors=[MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=IN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=NS_UPDATE_ATTRIB, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=log, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=err, postfix_operators=[], prefix_operators=[], qualifier=Result, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=done, postfix_operators=[], prefix_operators=[], qualifier=tt, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Result] operator[<] identifier[Void] operator[>] identifier[updAttribForNS] operator[SEP] identifier[AuthzTrans] identifier[trans] , identifier[HttpServletResponse] identifier[resp] , identifier[String] identifier[ns] , identifier[String] identifier[key] , identifier[String] identifier[value] operator[SEP] { identifier[TimeTaken] identifier[tt] operator[=] identifier[trans] operator[SEP] identifier[start] operator[SEP] identifier[NS_UPDATE_ATTRIB] operator[+] literal[String] operator[+] identifier[ns] operator[+] literal[String] operator[+] identifier[key] operator[+] literal[String] operator[+] identifier[value] , identifier[Env] operator[SEP] identifier[SUB] operator[|] identifier[Env] operator[SEP] identifier[ALWAYS] operator[SEP] operator[SEP] Keyword[try] { identifier[Result] operator[<] operator[?] operator[>] identifier[rp] operator[=] identifier[service] operator[SEP] identifier[updateNsAttrib] operator[SEP] identifier[trans] , identifier[ns] , identifier[key] , identifier[value] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[rp] operator[SEP] identifier[status] operator[SEP] { Keyword[case] identifier[OK] operator[:] identifier[setContentType] operator[SEP] identifier[resp] , identifier[keysDF] operator[SEP] identifier[getOutType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[resp] operator[SEP] identifier[getOutputStream] operator[SEP] operator[SEP] operator[SEP] identifier[println] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[Result] operator[SEP] identifier[ok] operator[SEP] operator[SEP] operator[SEP] Keyword[default] operator[:] Keyword[return] identifier[Result] operator[SEP] identifier[err] operator[SEP] identifier[rp] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[trans] operator[SEP] identifier[error] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[e] , identifier[IN] , identifier[NS_UPDATE_ATTRIB] operator[SEP] operator[SEP] Keyword[return] identifier[Result] operator[SEP] identifier[err] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[finally] { identifier[tt] operator[SEP] identifier[done] operator[SEP] operator[SEP] operator[SEP] } }
public static FastStr unsafeOf(String s) { int sz = s.length(); if (sz == 0) return EMPTY_STR; char[] buf = bufOf(s); return new FastStr(buf, 0, sz); }
class class_name[name] begin[{] method[unsafeOf, return_type[type[FastStr]], modifier[public static], parameter[s]] begin[{] local_variable[type[int], sz] if[binary_operation[member[.sz], ==, literal[0]]] begin[{] return[member[.EMPTY_STR]] else begin[{] None end[}] local_variable[type[char], buf] return[ClassCreator(arguments=[MemberReference(member=buf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=sz, 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=FastStr, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[FastStr] identifier[unsafeOf] operator[SEP] identifier[String] identifier[s] operator[SEP] { Keyword[int] identifier[sz] operator[=] identifier[s] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sz] operator[==] Other[0] operator[SEP] Keyword[return] identifier[EMPTY_STR] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[buf] operator[=] identifier[bufOf] operator[SEP] identifier[s] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[FastStr] operator[SEP] identifier[buf] , Other[0] , identifier[sz] operator[SEP] operator[SEP] }
public Vector3d set(Vector2dc v, double z) { return set(v.x(), v.y(), z); }
class class_name[name] begin[{] method[set, return_type[type[Vector3d]], modifier[public], parameter[v, z]] begin[{] return[call[.set, parameter[call[v.x, parameter[]], call[v.y, parameter[]], member[.z]]]] end[}] END[}]
Keyword[public] identifier[Vector3d] identifier[set] operator[SEP] identifier[Vector2dc] identifier[v] , Keyword[double] identifier[z] operator[SEP] { Keyword[return] identifier[set] operator[SEP] identifier[v] operator[SEP] identifier[x] operator[SEP] operator[SEP] , identifier[v] operator[SEP] identifier[y] operator[SEP] operator[SEP] , identifier[z] operator[SEP] operator[SEP] }
private void processTextNode(Segment textSegment) { context.setCurrentSegment(textSegment); String elementText = textSegment.toString(); Matcher matcher = VUE_MUSTACHE_PATTERN.matcher(elementText); int lastEnd = 0; StringBuilder newText = new StringBuilder(); while (matcher.find()) { int start = matcher.start(); int end = matcher.end(); if (start > 0) { newText.append(elementText, lastEnd, start); } currentExpressionReturnType = TypeName.get(String.class); String expressionString = elementText.substring(start + 2, end - 2).trim(); String processedExpression = processExpression(expressionString); newText.append("{{ ").append(processedExpression).append(" }}"); lastEnd = end; } if (lastEnd > 0) { newText.append(elementText.substring(lastEnd)); outputDocument.replace(textSegment, newText.toString()); } }
class class_name[name] begin[{] method[processTextNode, return_type[void], modifier[private], parameter[textSegment]] begin[{] call[context.setCurrentSegment, parameter[member[.textSegment]]] local_variable[type[String], elementText] local_variable[type[Matcher], matcher] local_variable[type[int], lastEnd] local_variable[type[StringBuilder], newText] while[call[matcher.find, parameter[]]] begin[{] local_variable[type[int], start] local_variable[type[int], end] if[binary_operation[member[.start], >, literal[0]]] begin[{] call[newText.append, parameter[member[.elementText], member[.lastEnd], member[.start]]] else begin[{] None end[}] assign[member[.currentExpressionReturnType], call[TypeName.get, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))]]] local_variable[type[String], expressionString] local_variable[type[String], processedExpression] call[newText.append, parameter[literal["{{ "]]] assign[member[.lastEnd], member[.end]] end[}] if[binary_operation[member[.lastEnd], >, literal[0]]] begin[{] call[newText.append, parameter[call[elementText.substring, parameter[member[.lastEnd]]]]] call[outputDocument.replace, parameter[member[.textSegment], call[newText.toString, parameter[]]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[processTextNode] operator[SEP] identifier[Segment] identifier[textSegment] operator[SEP] { identifier[context] operator[SEP] identifier[setCurrentSegment] operator[SEP] identifier[textSegment] operator[SEP] operator[SEP] identifier[String] identifier[elementText] operator[=] identifier[textSegment] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[Matcher] identifier[matcher] operator[=] identifier[VUE_MUSTACHE_PATTERN] operator[SEP] identifier[matcher] operator[SEP] identifier[elementText] operator[SEP] operator[SEP] Keyword[int] identifier[lastEnd] operator[=] Other[0] operator[SEP] identifier[StringBuilder] identifier[newText] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[matcher] operator[SEP] identifier[find] operator[SEP] operator[SEP] operator[SEP] { Keyword[int] identifier[start] operator[=] identifier[matcher] operator[SEP] identifier[start] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[end] operator[=] identifier[matcher] operator[SEP] identifier[end] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[start] operator[>] Other[0] operator[SEP] { identifier[newText] operator[SEP] identifier[append] operator[SEP] identifier[elementText] , identifier[lastEnd] , identifier[start] operator[SEP] operator[SEP] } identifier[currentExpressionReturnType] operator[=] identifier[TypeName] operator[SEP] identifier[get] operator[SEP] identifier[String] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[String] identifier[expressionString] operator[=] identifier[elementText] operator[SEP] identifier[substring] operator[SEP] identifier[start] operator[+] Other[2] , identifier[end] operator[-] Other[2] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[processedExpression] operator[=] identifier[processExpression] operator[SEP] identifier[expressionString] operator[SEP] operator[SEP] identifier[newText] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[processedExpression] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[lastEnd] operator[=] identifier[end] operator[SEP] } Keyword[if] operator[SEP] identifier[lastEnd] operator[>] Other[0] operator[SEP] { identifier[newText] operator[SEP] identifier[append] operator[SEP] identifier[elementText] operator[SEP] identifier[substring] operator[SEP] identifier[lastEnd] operator[SEP] operator[SEP] operator[SEP] identifier[outputDocument] operator[SEP] identifier[replace] operator[SEP] identifier[textSegment] , identifier[newText] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public void trace(Enum<?> key, Object... args) { if (!logger.isTraceEnabled()) { return; } String translatedMsg = imc.getMessage(key, args); MessageParameterObj mpo = new MessageParameterObj(key, args); if (instanceofLAL) { ((LocationAwareLogger) logger).log(LOCALIZED, FQCN, LocationAwareLogger.TRACE_INT, translatedMsg, args, null); } else { logger.trace(LOCALIZED, translatedMsg, mpo); } }
class class_name[name] begin[{] method[trace, return_type[void], modifier[public], parameter[key, args]] begin[{] if[call[logger.isTraceEnabled, parameter[]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[String], translatedMsg] local_variable[type[MessageParameterObj], mpo] if[member[.instanceofLAL]] begin[{] Cast(expression=MemberReference(member=logger, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=LocationAwareLogger, sub_type=None)) else begin[{] call[logger.trace, parameter[member[.LOCALIZED], member[.translatedMsg], member[.mpo]]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[trace] operator[SEP] identifier[Enum] operator[<] operator[?] operator[>] identifier[key] , identifier[Object] operator[...] identifier[args] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[logger] operator[SEP] identifier[isTraceEnabled] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } identifier[String] identifier[translatedMsg] operator[=] identifier[imc] operator[SEP] identifier[getMessage] operator[SEP] identifier[key] , identifier[args] operator[SEP] operator[SEP] identifier[MessageParameterObj] identifier[mpo] operator[=] Keyword[new] identifier[MessageParameterObj] operator[SEP] identifier[key] , identifier[args] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[instanceofLAL] operator[SEP] { operator[SEP] operator[SEP] identifier[LocationAwareLogger] operator[SEP] identifier[logger] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[LOCALIZED] , identifier[FQCN] , identifier[LocationAwareLogger] operator[SEP] identifier[TRACE_INT] , identifier[translatedMsg] , identifier[args] , Other[null] operator[SEP] operator[SEP] } Keyword[else] { identifier[logger] operator[SEP] identifier[trace] operator[SEP] identifier[LOCALIZED] , identifier[translatedMsg] , identifier[mpo] operator[SEP] operator[SEP] } }
public double calculateScore(double input) { this.pastData.addFirst(input); int dataLength = this.pastData.size(); // ############################################# // ## オンライン忘却アルゴリズムSDARを用いて1段階学習を行う。 // ############################################# // 最尤推定値「μ」を更新する。 this.estimatedMyu = (1 - this.forgetability) * this.estimatedMyu + this.forgetability * input; // 確率密度関数用の係数配列を更新する。 // 算出される個数は「過去データの数」「自己回帰モデルの次数 + 1」のうち小さい方 int pdfBaseNum = Math.min(dataLength, this.arDimensionNum + 1); for (int index = 0; index < pdfBaseNum; index++) { this.pdfBase[index] = (1 - this.forgetability) * this.pdfBase[index] + this.forgetability * (input - this.estimatedMyu) * Math.pow((this.pastData.get(index) - this.estimatedMyu), 1); } // パラメータ推定に用いる係数配列「ω」の算出を行う。 // 確率密度関数用の係数配列のインデックスと異なり1オリジンのため配列インデックスも1から使用している。 for (int yuleIndex = 1; yuleIndex < pdfBaseNum; yuleIndex++) { double nowPdfBase = this.pdfBase[yuleIndex]; for (int index = 1; index < yuleIndex; index++) { nowPdfBase = nowPdfBase - (this.pdfBase[yuleIndex - index] * this.yuleWalkerAns[index]); } double yuleResult = nowPdfBase / (this.pdfBase[0]); this.yuleWalkerAns[yuleIndex] = yuleResult; } // データの推測値を算出 double estimatedValue = this.estimatedMyu; for (int index = 1; index < pdfBaseNum; index++) { double dataResult = this.pastData.get(index); double dist = this.yuleWalkerAns[index] * (dataResult - this.estimatedMyu); estimatedValue = estimatedValue + dist; } if (this.pastData.size() > this.arDimensionNum) { this.pastData.pollLast(); } // Σの最尤推定値を算出 this.estimatedSigma = (1 - this.forgetability) * this.estimatedSigma + this.forgetability * Math.pow((input - estimatedValue), 2); // 1段階学習結果スコアを算出 double firstScore = calcFirstScore(estimatedValue, input, this.estimatedSigma, this.smoothingWindow); this.scores.add(firstScore); if (this.scores.size() > this.smoothingWindow) { this.scores.remove(0); } // ############################################# // ## 平滑化を行う。 // ############################################# double movingAverage = smoothing(this.scores, this.smoothingWindow); if (logger.isDebugEnabled() == true) { String logFormat = "CalculateResult. Input={0}, Myu={1}, Sigma={2}, Estimated={3}, Score={4}, MovingAverage={5}"; logger.debug(this.logHeader + MessageFormat.format(logFormat, input, this.estimatedMyu, this.estimatedSigma, estimatedValue, firstScore, movingAverage)); } // ############################################# // ## オンライン忘却アルゴリズムSDARを用いて2段階学習を行う。 // ## フィールド「secondFinder」が存在している場合、2段階学習結果をスコアとして返す。 // ## 存在していない場合は本インスタンス自身が2段階目のChangeFinderのため、平滑化の結果をそのまま返す。 // ############################################# if (this.secondChangeFinder == null) { return movingAverage; } double secondScore = this.secondChangeFinder.calculateScore(movingAverage); return secondScore; }
class class_name[name] begin[{] method[calculateScore, return_type[type[double]], modifier[public], parameter[input]] begin[{] THIS[member[None.pastData]call[None.addFirst, parameter[member[.input]]]] local_variable[type[int], dataLength] assign[THIS[member[None.estimatedMyu]], binary_operation[binary_operation[binary_operation[literal[1], -, THIS[member[None.forgetability]]], *, THIS[member[None.estimatedMyu]]], +, binary_operation[THIS[member[None.forgetability]], *, member[.input]]]] local_variable[type[int], pdfBaseNum] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=pdfBase, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), ArraySelector(index=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=forgetability, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=-), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=pdfBase, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), ArraySelector(index=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=*), operandr=BinaryOperation(operandl=BinaryOperation(operandl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=forgetability, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operandr=BinaryOperation(operandl=MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=estimatedMyu, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=-), operator=*), operandr=MethodInvocation(arguments=[BinaryOperation(operandl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=pastData, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=estimatedMyu, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=-), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=pow, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operator=*), operator=+)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=pdfBaseNum, 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=index)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=index, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=pdfBase, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), ArraySelector(index=MemberReference(member=yuleIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=nowPdfBase)], modifiers=set(), type=BasicType(dimensions=[], name=double)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=nowPdfBase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=nowPdfBase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=pdfBase, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), ArraySelector(index=BinaryOperation(operandl=MemberReference(member=yuleIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-))]), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=yuleWalkerAns, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), ArraySelector(index=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=*), operator=-)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=yuleIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=index)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=index, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=nowPdfBase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), operator=/), name=yuleResult)], modifiers=set(), type=BasicType(dimensions=[], name=double)), StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=yuleWalkerAns, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), ArraySelector(index=MemberReference(member=yuleIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=yuleResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=yuleIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=pdfBaseNum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=yuleIndex)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=yuleIndex, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) local_variable[type[double], estimatedValue] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=pastData, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=dataResult)], modifiers=set(), type=BasicType(dimensions=[], name=double)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=yuleWalkerAns, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), ArraySelector(index=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=BinaryOperation(operandl=MemberReference(member=dataResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=estimatedMyu, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=-), operator=*), name=dist)], modifiers=set(), type=BasicType(dimensions=[], name=double)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=estimatedValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=estimatedValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=pdfBaseNum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=index)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=index, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) if[binary_operation[THIS[member[None.pastData]call[None.size, parameter[]]], >, THIS[member[None.arDimensionNum]]]] begin[{] THIS[member[None.pastData]call[None.pollLast, parameter[]]] else begin[{] None end[}] assign[THIS[member[None.estimatedSigma]], binary_operation[binary_operation[binary_operation[literal[1], -, THIS[member[None.forgetability]]], *, THIS[member[None.estimatedSigma]]], +, binary_operation[THIS[member[None.forgetability]], *, call[Math.pow, parameter[binary_operation[member[.input], -, member[.estimatedValue]], literal[2]]]]]] local_variable[type[double], firstScore] THIS[member[None.scores]call[None.add, parameter[member[.firstScore]]]] if[binary_operation[THIS[member[None.scores]call[None.size, parameter[]]], >, THIS[member[None.smoothingWindow]]]] begin[{] THIS[member[None.scores]call[None.remove, parameter[literal[0]]]] else begin[{] None end[}] local_variable[type[double], movingAverage] if[binary_operation[call[logger.isDebugEnabled, parameter[]], ==, literal[true]]] begin[{] local_variable[type[String], logFormat] call[logger.debug, parameter[binary_operation[THIS[member[None.logHeader]], +, call[MessageFormat.format, parameter[member[.logFormat], member[.input], THIS[member[None.estimatedMyu]], THIS[member[None.estimatedSigma]], member[.estimatedValue], member[.firstScore], member[.movingAverage]]]]]] else begin[{] None end[}] if[binary_operation[THIS[member[None.secondChangeFinder]], ==, literal[null]]] begin[{] return[member[.movingAverage]] else begin[{] None end[}] local_variable[type[double], secondScore] return[member[.secondScore]] end[}] END[}]
Keyword[public] Keyword[double] identifier[calculateScore] operator[SEP] Keyword[double] identifier[input] operator[SEP] { Keyword[this] operator[SEP] identifier[pastData] operator[SEP] identifier[addFirst] operator[SEP] identifier[input] operator[SEP] operator[SEP] Keyword[int] identifier[dataLength] operator[=] Keyword[this] operator[SEP] identifier[pastData] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[estimatedMyu] operator[=] operator[SEP] Other[1] operator[-] Keyword[this] operator[SEP] identifier[forgetability] operator[SEP] operator[*] Keyword[this] operator[SEP] identifier[estimatedMyu] operator[+] Keyword[this] operator[SEP] identifier[forgetability] operator[*] identifier[input] operator[SEP] Keyword[int] identifier[pdfBaseNum] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[dataLength] , Keyword[this] operator[SEP] identifier[arDimensionNum] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[index] operator[=] Other[0] operator[SEP] identifier[index] operator[<] identifier[pdfBaseNum] operator[SEP] identifier[index] operator[++] operator[SEP] { Keyword[this] operator[SEP] identifier[pdfBase] operator[SEP] identifier[index] operator[SEP] operator[=] operator[SEP] Other[1] operator[-] Keyword[this] operator[SEP] identifier[forgetability] operator[SEP] operator[*] Keyword[this] operator[SEP] identifier[pdfBase] operator[SEP] identifier[index] operator[SEP] operator[+] Keyword[this] operator[SEP] identifier[forgetability] operator[*] operator[SEP] identifier[input] operator[-] Keyword[this] operator[SEP] identifier[estimatedMyu] operator[SEP] operator[*] identifier[Math] operator[SEP] identifier[pow] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[pastData] operator[SEP] identifier[get] operator[SEP] identifier[index] operator[SEP] operator[-] Keyword[this] operator[SEP] identifier[estimatedMyu] operator[SEP] , Other[1] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[yuleIndex] operator[=] Other[1] operator[SEP] identifier[yuleIndex] operator[<] identifier[pdfBaseNum] operator[SEP] identifier[yuleIndex] operator[++] operator[SEP] { Keyword[double] identifier[nowPdfBase] operator[=] Keyword[this] operator[SEP] identifier[pdfBase] operator[SEP] identifier[yuleIndex] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[index] operator[=] Other[1] operator[SEP] identifier[index] operator[<] identifier[yuleIndex] operator[SEP] identifier[index] operator[++] operator[SEP] { identifier[nowPdfBase] operator[=] identifier[nowPdfBase] operator[-] operator[SEP] Keyword[this] operator[SEP] identifier[pdfBase] operator[SEP] identifier[yuleIndex] operator[-] identifier[index] operator[SEP] operator[*] Keyword[this] operator[SEP] identifier[yuleWalkerAns] operator[SEP] identifier[index] operator[SEP] operator[SEP] operator[SEP] } Keyword[double] identifier[yuleResult] operator[=] identifier[nowPdfBase] operator[/] operator[SEP] Keyword[this] operator[SEP] identifier[pdfBase] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[yuleWalkerAns] operator[SEP] identifier[yuleIndex] operator[SEP] operator[=] identifier[yuleResult] operator[SEP] } Keyword[double] identifier[estimatedValue] operator[=] Keyword[this] operator[SEP] identifier[estimatedMyu] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[index] operator[=] Other[1] operator[SEP] identifier[index] operator[<] identifier[pdfBaseNum] operator[SEP] identifier[index] operator[++] operator[SEP] { Keyword[double] identifier[dataResult] operator[=] Keyword[this] operator[SEP] identifier[pastData] operator[SEP] identifier[get] operator[SEP] identifier[index] operator[SEP] operator[SEP] Keyword[double] identifier[dist] operator[=] Keyword[this] operator[SEP] identifier[yuleWalkerAns] operator[SEP] identifier[index] operator[SEP] operator[*] operator[SEP] identifier[dataResult] operator[-] Keyword[this] operator[SEP] identifier[estimatedMyu] operator[SEP] operator[SEP] identifier[estimatedValue] operator[=] identifier[estimatedValue] operator[+] identifier[dist] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[pastData] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Keyword[this] operator[SEP] identifier[arDimensionNum] operator[SEP] { Keyword[this] operator[SEP] identifier[pastData] operator[SEP] identifier[pollLast] operator[SEP] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[estimatedSigma] operator[=] operator[SEP] Other[1] operator[-] Keyword[this] operator[SEP] identifier[forgetability] operator[SEP] operator[*] Keyword[this] operator[SEP] identifier[estimatedSigma] operator[+] Keyword[this] operator[SEP] identifier[forgetability] operator[*] identifier[Math] operator[SEP] identifier[pow] operator[SEP] operator[SEP] identifier[input] operator[-] identifier[estimatedValue] operator[SEP] , Other[2] operator[SEP] operator[SEP] Keyword[double] identifier[firstScore] operator[=] identifier[calcFirstScore] operator[SEP] identifier[estimatedValue] , identifier[input] , Keyword[this] operator[SEP] identifier[estimatedSigma] , Keyword[this] operator[SEP] identifier[smoothingWindow] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[scores] operator[SEP] identifier[add] operator[SEP] identifier[firstScore] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[scores] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Keyword[this] operator[SEP] identifier[smoothingWindow] operator[SEP] { Keyword[this] operator[SEP] identifier[scores] operator[SEP] identifier[remove] operator[SEP] Other[0] operator[SEP] operator[SEP] } Keyword[double] identifier[movingAverage] operator[=] identifier[smoothing] operator[SEP] Keyword[this] operator[SEP] identifier[scores] , Keyword[this] operator[SEP] identifier[smoothingWindow] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[==] literal[boolean] operator[SEP] { identifier[String] identifier[logFormat] operator[=] literal[String] operator[SEP] identifier[logger] operator[SEP] identifier[debug] operator[SEP] Keyword[this] operator[SEP] identifier[logHeader] operator[+] identifier[MessageFormat] operator[SEP] identifier[format] operator[SEP] identifier[logFormat] , identifier[input] , Keyword[this] operator[SEP] identifier[estimatedMyu] , Keyword[this] operator[SEP] identifier[estimatedSigma] , identifier[estimatedValue] , identifier[firstScore] , identifier[movingAverage] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[secondChangeFinder] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[movingAverage] operator[SEP] } Keyword[double] identifier[secondScore] operator[=] Keyword[this] operator[SEP] identifier[secondChangeFinder] operator[SEP] identifier[calculateScore] operator[SEP] identifier[movingAverage] operator[SEP] operator[SEP] Keyword[return] identifier[secondScore] operator[SEP] }
private int[] makeNormalDeltas(float[] vertices, float[] normals, int[] indices, SortableVertex[] sortVertices) { // Calculate smooth normals (Note: aVertices and aIndices use the sorted // index space, so smoothNormals will too) float[] smoothNormals = calcSmoothNormals(vertices, indices); // Normal scaling factor float scale = 1.0f / normalPrecision; int vc = vertices.length / CTM_POSITION_ELEMENT_COUNT; int[] intNormals = new int[vc * CTM_NORMAL_ELEMENT_COUNT]; for (int i = 0; i < vc; ++i) { // Get old normal index (before vertex sorting) int oldIdx = sortVertices[i].originalIndex * Mesh.CTM_NORMAL_ELEMENT_COUNT; int newIdx = i * Mesh.CTM_NORMAL_ELEMENT_COUNT; // Calculate normal magnitude (should always be 1.0 for unit length normals) float magn = (float) sqrt(normals[oldIdx] * normals[oldIdx] + normals[oldIdx + 1] * normals[oldIdx + 1] + normals[oldIdx + 2] * normals[oldIdx + 2]); if (magn < 1e-10f) { magn = 1.0f; } // Invert magnitude if the normal is negative compared to the predicted // smooth normal if ((smoothNormals[newIdx] * normals[oldIdx] + smoothNormals[newIdx + 1] * normals[oldIdx + 1] + smoothNormals[newIdx + 2] * normals[oldIdx + 2]) < 0.0f) { magn = -magn; } // Store the magnitude in the first element of the three normal elements intNormals[newIdx] = (int) floor(scale * magn + 0.5f); // Normalize the normal (1 / magn) - and flip it if magn < 0 magn = 1.0f / magn; float[] n = new float[3]; for (int j = 0; j < 3; ++j) { n[j] = normals[oldIdx + j] * magn; } // Convert the normal to angular representation (phi, theta) in a coordinate // system where the nominal (smooth) normal is the Z-axis float[] basisAxes = makeNormalCoordSys(smoothNormals, newIdx); float[] n2 = new float[3]; for (int j = 0; j < 3; ++j) { int id = j * Mesh.CTM_NORMAL_ELEMENT_COUNT; n2[j] = basisAxes[id] * n[0] + basisAxes[id + 1] * n[1] + basisAxes[id + 2] * n[2]; } double phi, theta, thetaScale; if (n2[2] >= 1.0f) { phi = 0.0f; } else { phi = acos(n2[2]); } theta = atan2(n2[1], n2[0]); // Round phi and theta (spherical coordinates) to integers. Note: We let the // theta resolution vary with the x/y circumference (roughly phi). int intPhi = (int) floor(phi * (scale / (0.5 * PI)) + 0.5); if (intPhi == 0) { thetaScale = 0.0; } else if (intPhi <= 4) { thetaScale = 2.0 / PI; } else { thetaScale = intPhi / (2.0 * PI); } intNormals[newIdx + 1] = intPhi; intNormals[newIdx + 2] = (int) floor((theta + PI) * thetaScale + 0.5f); } return intNormals; }
class class_name[name] begin[{] method[makeNormalDeltas, return_type[type[int]], modifier[private], parameter[vertices, normals, indices, sortVertices]] begin[{] local_variable[type[float], smoothNormals] local_variable[type[float], scale] local_variable[type[int], vc] local_variable[type[int], intNormals] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=sortVertices, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=originalIndex, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operandr=MemberReference(member=CTM_NORMAL_ELEMENT_COUNT, postfix_operators=[], prefix_operators=[], qualifier=Mesh, selectors=[]), operator=*), name=oldIdx)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=CTM_NORMAL_ELEMENT_COUNT, postfix_operators=[], prefix_operators=[], qualifier=Mesh, selectors=[]), operator=*), name=newIdx)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=normals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=oldIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=normals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=oldIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=*), operandr=BinaryOperation(operandl=MemberReference(member=normals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=oldIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), operandr=MemberReference(member=normals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=oldIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), operator=*), operator=+), operandr=BinaryOperation(operandl=MemberReference(member=normals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=oldIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=+))]), operandr=MemberReference(member=normals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=oldIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=+))]), operator=*), operator=+)], member=sqrt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=float)), name=magn)], modifiers=set(), type=BasicType(dimensions=[], name=float)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=magn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1e-10f), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=magn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.0f)), label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=smoothNormals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=newIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=normals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=oldIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=*), operandr=BinaryOperation(operandl=MemberReference(member=smoothNormals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=newIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), operandr=MemberReference(member=normals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=oldIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), operator=*), operator=+), operandr=BinaryOperation(operandl=MemberReference(member=smoothNormals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=newIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=+))]), operandr=MemberReference(member=normals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=oldIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=+))]), operator=*), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.0f), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=magn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=magn, postfix_operators=[], prefix_operators=['-'], qualifier=, selectors=[])), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=intNormals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=newIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Cast(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=scale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=magn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.5f), operator=+)], member=floor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=magn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.0f), operandr=MemberReference(member=magn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=/)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=float)), name=n)], modifiers=set(), type=BasicType(dimensions=[None], name=float)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=BinaryOperation(operandl=MemberReference(member=normals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=oldIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+))]), operandr=MemberReference(member=magn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=smoothNormals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=newIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=makeNormalCoordSys, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=basisAxes)], modifiers=set(), type=BasicType(dimensions=[None], name=float)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=float)), name=n2)], modifiers=set(), type=BasicType(dimensions=[None], name=float)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=CTM_NORMAL_ELEMENT_COUNT, postfix_operators=[], prefix_operators=[], qualifier=Mesh, selectors=[]), operator=*), name=id)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=n2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=basisAxes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operator=*), operandr=BinaryOperation(operandl=MemberReference(member=basisAxes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), operandr=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), operator=*), operator=+), operandr=BinaryOperation(operandl=MemberReference(member=basisAxes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=+))]), operandr=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2))]), operator=*), operator=+)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=phi), VariableDeclarator(dimensions=[], initializer=None, name=theta), VariableDeclarator(dimensions=[], initializer=None, name=thetaScale)], modifiers=set(), type=BasicType(dimensions=[], name=double)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=n2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.0f), operator=>=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=phi, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=n2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2))])], member=acos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=phi, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.0f)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=theta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=n2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), MemberReference(member=n2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))])], member=atan2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=phi, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=scale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.5), operandr=MemberReference(member=PI, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operator=/), operator=*), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.5), operator=+)], member=floor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int)), name=intPhi)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=intPhi, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=intPhi, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=<=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=thetaScale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=intPhi, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.0), operandr=MemberReference(member=PI, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operator=/)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=thetaScale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.0), operandr=MemberReference(member=PI, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=/)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=thetaScale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.0)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=intNormals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=newIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), type==, value=MemberReference(member=intPhi, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=intNormals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=newIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=+))]), type==, value=Cast(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=theta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=PI, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=thetaScale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.5f), operator=+)], member=floor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int))), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=vc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None) return[member[.intNormals]] end[}] END[}]
Keyword[private] Keyword[int] operator[SEP] operator[SEP] identifier[makeNormalDeltas] operator[SEP] Keyword[float] operator[SEP] operator[SEP] identifier[vertices] , Keyword[float] operator[SEP] operator[SEP] identifier[normals] , Keyword[int] operator[SEP] operator[SEP] identifier[indices] , identifier[SortableVertex] operator[SEP] operator[SEP] identifier[sortVertices] operator[SEP] { Keyword[float] operator[SEP] operator[SEP] identifier[smoothNormals] operator[=] identifier[calcSmoothNormals] operator[SEP] identifier[vertices] , identifier[indices] operator[SEP] operator[SEP] Keyword[float] identifier[scale] operator[=] literal[Float] operator[/] identifier[normalPrecision] operator[SEP] Keyword[int] identifier[vc] operator[=] identifier[vertices] operator[SEP] identifier[length] operator[/] identifier[CTM_POSITION_ELEMENT_COUNT] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[intNormals] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[vc] operator[*] identifier[CTM_NORMAL_ELEMENT_COUNT] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[vc] operator[SEP] operator[++] identifier[i] operator[SEP] { Keyword[int] identifier[oldIdx] operator[=] identifier[sortVertices] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[originalIndex] operator[*] identifier[Mesh] operator[SEP] identifier[CTM_NORMAL_ELEMENT_COUNT] operator[SEP] Keyword[int] identifier[newIdx] operator[=] identifier[i] operator[*] identifier[Mesh] operator[SEP] identifier[CTM_NORMAL_ELEMENT_COUNT] operator[SEP] Keyword[float] identifier[magn] operator[=] operator[SEP] Keyword[float] operator[SEP] identifier[sqrt] operator[SEP] identifier[normals] operator[SEP] identifier[oldIdx] operator[SEP] operator[*] identifier[normals] operator[SEP] identifier[oldIdx] operator[SEP] operator[+] identifier[normals] operator[SEP] identifier[oldIdx] operator[+] Other[1] operator[SEP] operator[*] identifier[normals] operator[SEP] identifier[oldIdx] operator[+] Other[1] operator[SEP] operator[+] identifier[normals] operator[SEP] identifier[oldIdx] operator[+] Other[2] operator[SEP] operator[*] identifier[normals] operator[SEP] identifier[oldIdx] operator[+] Other[2] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[magn] operator[<] literal[Float] operator[SEP] { identifier[magn] operator[=] literal[Float] operator[SEP] } Keyword[if] operator[SEP] operator[SEP] identifier[smoothNormals] operator[SEP] identifier[newIdx] operator[SEP] operator[*] identifier[normals] operator[SEP] identifier[oldIdx] operator[SEP] operator[+] identifier[smoothNormals] operator[SEP] identifier[newIdx] operator[+] Other[1] operator[SEP] operator[*] identifier[normals] operator[SEP] identifier[oldIdx] operator[+] Other[1] operator[SEP] operator[+] identifier[smoothNormals] operator[SEP] identifier[newIdx] operator[+] Other[2] operator[SEP] operator[*] identifier[normals] operator[SEP] identifier[oldIdx] operator[+] Other[2] operator[SEP] operator[SEP] operator[<] literal[Float] operator[SEP] { identifier[magn] operator[=] operator[-] identifier[magn] operator[SEP] } identifier[intNormals] operator[SEP] identifier[newIdx] operator[SEP] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[floor] operator[SEP] identifier[scale] operator[*] identifier[magn] operator[+] literal[Float] operator[SEP] operator[SEP] identifier[magn] operator[=] literal[Float] operator[/] identifier[magn] operator[SEP] Keyword[float] operator[SEP] operator[SEP] identifier[n] operator[=] Keyword[new] Keyword[float] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] Other[3] operator[SEP] operator[++] identifier[j] operator[SEP] { identifier[n] operator[SEP] identifier[j] operator[SEP] operator[=] identifier[normals] operator[SEP] identifier[oldIdx] operator[+] identifier[j] operator[SEP] operator[*] identifier[magn] operator[SEP] } Keyword[float] operator[SEP] operator[SEP] identifier[basisAxes] operator[=] identifier[makeNormalCoordSys] operator[SEP] identifier[smoothNormals] , identifier[newIdx] operator[SEP] operator[SEP] Keyword[float] operator[SEP] operator[SEP] identifier[n2] operator[=] Keyword[new] Keyword[float] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] Other[3] operator[SEP] operator[++] identifier[j] operator[SEP] { Keyword[int] identifier[id] operator[=] identifier[j] operator[*] identifier[Mesh] operator[SEP] identifier[CTM_NORMAL_ELEMENT_COUNT] operator[SEP] identifier[n2] operator[SEP] identifier[j] operator[SEP] operator[=] identifier[basisAxes] operator[SEP] identifier[id] operator[SEP] operator[*] identifier[n] operator[SEP] Other[0] operator[SEP] operator[+] identifier[basisAxes] operator[SEP] identifier[id] operator[+] Other[1] operator[SEP] operator[*] identifier[n] operator[SEP] Other[1] operator[SEP] operator[+] identifier[basisAxes] operator[SEP] identifier[id] operator[+] Other[2] operator[SEP] operator[*] identifier[n] operator[SEP] Other[2] operator[SEP] operator[SEP] } Keyword[double] identifier[phi] , identifier[theta] , identifier[thetaScale] operator[SEP] Keyword[if] operator[SEP] identifier[n2] operator[SEP] Other[2] operator[SEP] operator[>=] literal[Float] operator[SEP] { identifier[phi] operator[=] literal[Float] operator[SEP] } Keyword[else] { identifier[phi] operator[=] identifier[acos] operator[SEP] identifier[n2] operator[SEP] Other[2] operator[SEP] operator[SEP] operator[SEP] } identifier[theta] operator[=] identifier[atan2] operator[SEP] identifier[n2] operator[SEP] Other[1] operator[SEP] , identifier[n2] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[intPhi] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[floor] operator[SEP] identifier[phi] operator[*] operator[SEP] identifier[scale] operator[/] operator[SEP] literal[Float] operator[*] identifier[PI] operator[SEP] operator[SEP] operator[+] literal[Float] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[intPhi] operator[==] Other[0] operator[SEP] { identifier[thetaScale] operator[=] literal[Float] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[intPhi] operator[<=] Other[4] operator[SEP] { identifier[thetaScale] operator[=] literal[Float] operator[/] identifier[PI] operator[SEP] } Keyword[else] { identifier[thetaScale] operator[=] identifier[intPhi] operator[/] operator[SEP] literal[Float] operator[*] identifier[PI] operator[SEP] operator[SEP] } identifier[intNormals] operator[SEP] identifier[newIdx] operator[+] Other[1] operator[SEP] operator[=] identifier[intPhi] operator[SEP] identifier[intNormals] operator[SEP] identifier[newIdx] operator[+] Other[2] operator[SEP] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[floor] operator[SEP] operator[SEP] identifier[theta] operator[+] identifier[PI] operator[SEP] operator[*] identifier[thetaScale] operator[+] literal[Float] operator[SEP] operator[SEP] } Keyword[return] identifier[intNormals] operator[SEP] }
public static String linkTagAction(String target, ServletRequest req) { return linkTagAction(target, req, null); }
class class_name[name] begin[{] method[linkTagAction, return_type[type[String]], modifier[public static], parameter[target, req]] begin[{] return[call[.linkTagAction, parameter[member[.target], member[.req], literal[null]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[linkTagAction] operator[SEP] identifier[String] identifier[target] , identifier[ServletRequest] identifier[req] operator[SEP] { Keyword[return] identifier[linkTagAction] operator[SEP] identifier[target] , identifier[req] , Other[null] operator[SEP] operator[SEP] }
public static synchronized Enumeration<Stack> getStacks() { List<Stack> result = new CopyOnWriteArrayList<Stack>(); if (!initialized) { initialize(); } // Gets the classloader of the code that called this method, may be null. ClassLoader callerCL = ClassLoader.getSystemClassLoader(); // Walk through the loaded stacks. for (StackInfo di : stacks) { // If the caller does not have permission to load the stack then skip it. if (getCallerClass(callerCL, di.stackClassName) != di.stackClass) { println(new StringBuilder().append(" skipping: ").append(di).toString()); continue; } result.add(di.stack); } return Collections.enumeration(result); }
class class_name[name] begin[{] method[getStacks, return_type[type[Enumeration]], modifier[synchronized public static], parameter[]] begin[{] local_variable[type[List], result] if[member[.initialized]] begin[{] call[.initialize, parameter[]] else begin[{] None end[}] local_variable[type[ClassLoader], callerCL] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=callerCL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=stackClassName, postfix_operators=[], prefix_operators=[], qualifier=di, selectors=[])], member=getCallerClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operandr=MemberReference(member=stackClass, postfix_operators=[], prefix_operators=[], qualifier=di, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" skipping: ")], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=di, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=StringBuilder, sub_type=None))], member=println, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ContinueStatement(goto=None, label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=stack, postfix_operators=[], prefix_operators=[], qualifier=di, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=stacks, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=di)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StackInfo, sub_type=None))), label=None) return[call[Collections.enumeration, parameter[member[.result]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[synchronized] identifier[Enumeration] operator[<] identifier[Stack] operator[>] identifier[getStacks] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[Stack] operator[>] identifier[result] operator[=] Keyword[new] identifier[CopyOnWriteArrayList] operator[<] identifier[Stack] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[initialized] operator[SEP] { identifier[initialize] operator[SEP] operator[SEP] operator[SEP] } identifier[ClassLoader] identifier[callerCL] operator[=] identifier[ClassLoader] operator[SEP] identifier[getSystemClassLoader] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[StackInfo] identifier[di] operator[:] identifier[stacks] operator[SEP] { Keyword[if] operator[SEP] identifier[getCallerClass] operator[SEP] identifier[callerCL] , identifier[di] operator[SEP] identifier[stackClassName] operator[SEP] operator[!=] identifier[di] operator[SEP] identifier[stackClass] operator[SEP] { identifier[println] operator[SEP] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[di] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] } identifier[result] operator[SEP] identifier[add] operator[SEP] identifier[di] operator[SEP] identifier[stack] operator[SEP] operator[SEP] } Keyword[return] identifier[Collections] operator[SEP] identifier[enumeration] operator[SEP] identifier[result] operator[SEP] operator[SEP] }
private void readAsync() throws IOException { stateChangeLock.lock(); final byte[] arr = readAheadBuffer.array(); try { if (endOfStream || readInProgress) { return; } checkReadException(); readAheadBuffer.position(0); readAheadBuffer.flip(); readInProgress = true; } finally { stateChangeLock.unlock(); } executorService.execute(() -> { stateChangeLock.lock(); try { if (isClosed) { readInProgress = false; return; } // Flip this so that the close method will not close the underlying input stream when we // are reading. isReading = true; } finally { stateChangeLock.unlock(); } // Please note that it is safe to release the lock and read into the read ahead buffer // because either of following two conditions will hold - 1. The active buffer has // data available to read so the reader will not read from the read ahead buffer. // 2. This is the first time read is called or the active buffer is exhausted, // in that case the reader waits for this async read to complete. // So there is no race condition in both the situations. int read = 0; int off = 0, len = arr.length; Throwable exception = null; try { // try to fill the read ahead buffer. // if a reader is waiting, possibly return early. do { read = underlyingInputStream.read(arr, off, len); if (read <= 0) break; off += read; len -= read; } while (len > 0 && !isWaiting.get()); } catch (Throwable ex) { exception = ex; if (ex instanceof Error) { // `readException` may not be reported to the user. Rethrow Error to make sure at least // The user can see Error in UncaughtExceptionHandler. throw (Error) ex; } } finally { stateChangeLock.lock(); readAheadBuffer.limit(off); if (read < 0 || (exception instanceof EOFException)) { endOfStream = true; } else if (exception != null) { readAborted = true; readException = exception; } readInProgress = false; signalAsyncReadComplete(); stateChangeLock.unlock(); closeUnderlyingInputStreamIfNecessary(); } }); }
class class_name[name] begin[{] method[readAsync, return_type[void], modifier[private], parameter[]] begin[{] call[stateChangeLock.lock, parameter[]] local_variable[type[byte], arr] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=endOfStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=readInProgress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=None, label=None)])), StatementExpression(expression=MethodInvocation(arguments=[], member=checkReadException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=position, postfix_operators=[], prefix_operators=[], qualifier=readAheadBuffer, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=flip, postfix_operators=[], prefix_operators=[], qualifier=readAheadBuffer, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=readInProgress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=unlock, postfix_operators=[], prefix_operators=[], qualifier=stateChangeLock, selectors=[], type_arguments=None), label=None)], label=None, resources=None) call[executorService.execute, parameter[LambdaExpression(body=[StatementExpression(expression=MethodInvocation(arguments=[], member=lock, postfix_operators=[], prefix_operators=[], qualifier=stateChangeLock, selectors=[], type_arguments=None), label=None), TryStatement(block=[IfStatement(condition=MemberReference(member=isClosed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=readInProgress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), ReturnStatement(expression=None, label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=isReading, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=unlock, postfix_operators=[], prefix_operators=[], qualifier=stateChangeLock, selectors=[], type_arguments=None), label=None)], label=None, resources=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=read)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=off), VariableDeclarator(dimensions=[], initializer=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=arr, selectors=[]), name=len)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=exception)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Throwable, sub_type=None)), TryStatement(block=[DoStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=arr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=off, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=underlyingInputStream, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=read, 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=BreakStatement(goto=None, label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=off, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=-=, value=MemberReference(member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), operandr=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=['!'], qualifier=isWaiting, selectors=[], type_arguments=None), operator=&&), label=None)], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Error, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=Cast(expression=MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Error, sub_type=None)), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Throwable']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=lock, postfix_operators=[], prefix_operators=[], qualifier=stateChangeLock, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=off, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=limit, postfix_operators=[], prefix_operators=[], qualifier=readAheadBuffer, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), operandr=BinaryOperation(operandl=MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=EOFException, sub_type=None), operator=instanceof), operator=||), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=exception, 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=readAborted, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=readException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=endOfStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=readInProgress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=signalAsyncReadComplete, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=unlock, postfix_operators=[], prefix_operators=[], qualifier=stateChangeLock, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=closeUnderlyingInputStreamIfNecessary, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, resources=None)], parameters=[])]] end[}] END[}]
Keyword[private] Keyword[void] identifier[readAsync] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[stateChangeLock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[arr] operator[=] identifier[readAheadBuffer] operator[SEP] identifier[array] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[endOfStream] operator[||] identifier[readInProgress] operator[SEP] { Keyword[return] operator[SEP] } identifier[checkReadException] operator[SEP] operator[SEP] operator[SEP] identifier[readAheadBuffer] operator[SEP] identifier[position] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[readAheadBuffer] operator[SEP] identifier[flip] operator[SEP] operator[SEP] operator[SEP] identifier[readInProgress] operator[=] literal[boolean] operator[SEP] } Keyword[finally] { identifier[stateChangeLock] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP] } identifier[executorService] operator[SEP] identifier[execute] operator[SEP] operator[SEP] operator[SEP] operator[->] { identifier[stateChangeLock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[isClosed] operator[SEP] { identifier[readInProgress] operator[=] literal[boolean] operator[SEP] Keyword[return] operator[SEP] } identifier[isReading] operator[=] literal[boolean] operator[SEP] } Keyword[finally] { identifier[stateChangeLock] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP] } Keyword[int] identifier[read] operator[=] Other[0] operator[SEP] Keyword[int] identifier[off] operator[=] Other[0] , identifier[len] operator[=] identifier[arr] operator[SEP] identifier[length] operator[SEP] identifier[Throwable] identifier[exception] operator[=] Other[null] operator[SEP] Keyword[try] { Keyword[do] { identifier[read] operator[=] identifier[underlyingInputStream] operator[SEP] identifier[read] operator[SEP] identifier[arr] , identifier[off] , identifier[len] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[read] operator[<=] Other[0] operator[SEP] Keyword[break] operator[SEP] identifier[off] operator[+=] identifier[read] operator[SEP] identifier[len] operator[-=] identifier[read] operator[SEP] } Keyword[while] operator[SEP] identifier[len] operator[>] Other[0] operator[&&] operator[!] identifier[isWaiting] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[ex] operator[SEP] { identifier[exception] operator[=] identifier[ex] operator[SEP] Keyword[if] operator[SEP] identifier[ex] Keyword[instanceof] identifier[Error] operator[SEP] { Keyword[throw] operator[SEP] identifier[Error] operator[SEP] identifier[ex] operator[SEP] } } Keyword[finally] { identifier[stateChangeLock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] identifier[readAheadBuffer] operator[SEP] identifier[limit] operator[SEP] identifier[off] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[read] operator[<] Other[0] operator[||] operator[SEP] identifier[exception] Keyword[instanceof] identifier[EOFException] operator[SEP] operator[SEP] { identifier[endOfStream] operator[=] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[exception] operator[!=] Other[null] operator[SEP] { identifier[readAborted] operator[=] literal[boolean] operator[SEP] identifier[readException] operator[=] identifier[exception] operator[SEP] } identifier[readInProgress] operator[=] literal[boolean] operator[SEP] identifier[signalAsyncReadComplete] operator[SEP] operator[SEP] operator[SEP] identifier[stateChangeLock] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP] identifier[closeUnderlyingInputStreamIfNecessary] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public static Node getChild(Node parent, int type) { Node n = parent.getFirstChild(); while (n != null && type != n.getNodeType()) { n = n.getNextSibling(); } if (n == null) return null; return n; }
class class_name[name] begin[{] method[getChild, return_type[type[Node]], modifier[public static], parameter[parent, type]] begin[{] local_variable[type[Node], n] while[binary_operation[binary_operation[member[.n], !=, literal[null]], &&, binary_operation[member[.type], !=, call[n.getNodeType, parameter[]]]]] begin[{] assign[member[.n], call[n.getNextSibling, parameter[]]] end[}] if[binary_operation[member[.n], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] return[member[.n]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Node] identifier[getChild] operator[SEP] identifier[Node] identifier[parent] , Keyword[int] identifier[type] operator[SEP] { identifier[Node] identifier[n] operator[=] identifier[parent] operator[SEP] identifier[getFirstChild] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[n] operator[!=] Other[null] operator[&&] identifier[type] operator[!=] identifier[n] operator[SEP] identifier[getNodeType] operator[SEP] operator[SEP] operator[SEP] { identifier[n] operator[=] identifier[n] operator[SEP] identifier[getNextSibling] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[n] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[return] identifier[n] operator[SEP] }
public static CommerceWarehouseItem fetchByCommerceWarehouseId_First( long commerceWarehouseId, OrderByComparator<CommerceWarehouseItem> orderByComparator) { return getPersistence() .fetchByCommerceWarehouseId_First(commerceWarehouseId, orderByComparator); }
class class_name[name] begin[{] method[fetchByCommerceWarehouseId_First, return_type[type[CommerceWarehouseItem]], modifier[public static], parameter[commerceWarehouseId, orderByComparator]] begin[{] return[call[.getPersistence, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[CommerceWarehouseItem] identifier[fetchByCommerceWarehouseId_First] operator[SEP] Keyword[long] identifier[commerceWarehouseId] , identifier[OrderByComparator] operator[<] identifier[CommerceWarehouseItem] operator[>] identifier[orderByComparator] operator[SEP] { Keyword[return] identifier[getPersistence] operator[SEP] operator[SEP] operator[SEP] identifier[fetchByCommerceWarehouseId_First] operator[SEP] identifier[commerceWarehouseId] , identifier[orderByComparator] operator[SEP] operator[SEP] }
public static void logout() { CmsObject cms = A_CmsUI.getCmsObject(); if (UI.getCurrent() instanceof CmsAppWorkplaceUi) { ((CmsAppWorkplaceUi)UI.getCurrent()).onWindowClose(); } String loggedInUser = cms.getRequestContext().getCurrentUser().getName(); UI.getCurrent().getSession().close(); String loginLink = OpenCms.getLinkManager().substituteLinkForUnknownTarget( cms, CmsWorkplaceLoginHandler.LOGIN_HANDLER, false); VaadinService.getCurrentRequest().getWrappedSession().invalidate(); Page.getCurrent().setLocation(loginLink); // logout was successful if (LOG.isInfoEnabled()) { LOG.info( org.opencms.jsp.Messages.get().getBundle().key( org.opencms.jsp.Messages.LOG_LOGOUT_SUCCESFUL_3, loggedInUser, "{workplace logout option}", cms.getRequestContext().getRemoteAddress())); } }
class class_name[name] begin[{] method[logout, return_type[void], modifier[public static], parameter[]] begin[{] local_variable[type[CmsObject], cms] if[binary_operation[call[UI.getCurrent, parameter[]], instanceof, type[CmsAppWorkplaceUi]]] begin[{] Cast(expression=MethodInvocation(arguments=[], member=getCurrent, postfix_operators=[], prefix_operators=[], qualifier=UI, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=CmsAppWorkplaceUi, sub_type=None)) else begin[{] None end[}] local_variable[type[String], loggedInUser] call[UI.getCurrent, parameter[]] local_variable[type[String], loginLink] call[VaadinService.getCurrentRequest, parameter[]] call[Page.getCurrent, parameter[]] if[call[LOG.isInfoEnabled, parameter[]]] begin[{] call[LOG.info, parameter[call[org.opencms.jsp.Messages.get, parameter[]]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[logout] operator[SEP] operator[SEP] { identifier[CmsObject] identifier[cms] operator[=] identifier[A_CmsUI] operator[SEP] identifier[getCmsObject] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[UI] operator[SEP] identifier[getCurrent] operator[SEP] operator[SEP] Keyword[instanceof] identifier[CmsAppWorkplaceUi] operator[SEP] { operator[SEP] operator[SEP] identifier[CmsAppWorkplaceUi] operator[SEP] identifier[UI] operator[SEP] identifier[getCurrent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[onWindowClose] operator[SEP] operator[SEP] operator[SEP] } identifier[String] identifier[loggedInUser] operator[=] identifier[cms] operator[SEP] identifier[getRequestContext] operator[SEP] operator[SEP] operator[SEP] identifier[getCurrentUser] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[UI] operator[SEP] identifier[getCurrent] operator[SEP] operator[SEP] operator[SEP] identifier[getSession] operator[SEP] operator[SEP] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[loginLink] operator[=] identifier[OpenCms] operator[SEP] identifier[getLinkManager] operator[SEP] operator[SEP] operator[SEP] identifier[substituteLinkForUnknownTarget] operator[SEP] identifier[cms] , identifier[CmsWorkplaceLoginHandler] operator[SEP] identifier[LOGIN_HANDLER] , literal[boolean] operator[SEP] operator[SEP] identifier[VaadinService] operator[SEP] identifier[getCurrentRequest] operator[SEP] operator[SEP] operator[SEP] identifier[getWrappedSession] operator[SEP] operator[SEP] operator[SEP] identifier[invalidate] operator[SEP] operator[SEP] operator[SEP] identifier[Page] operator[SEP] identifier[getCurrent] operator[SEP] operator[SEP] operator[SEP] identifier[setLocation] operator[SEP] identifier[loginLink] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[LOG] operator[SEP] identifier[isInfoEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] identifier[org] operator[SEP] identifier[opencms] operator[SEP] identifier[jsp] operator[SEP] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[getBundle] operator[SEP] operator[SEP] operator[SEP] identifier[key] operator[SEP] identifier[org] operator[SEP] identifier[opencms] operator[SEP] identifier[jsp] operator[SEP] identifier[Messages] operator[SEP] identifier[LOG_LOGOUT_SUCCESFUL_3] , identifier[loggedInUser] , literal[String] , identifier[cms] operator[SEP] identifier[getRequestContext] operator[SEP] operator[SEP] operator[SEP] identifier[getRemoteAddress] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public static void compressToFile(@NonNull final Bitmap bitmap, @NonNull final File file, @NonNull final CompressFormat format, final int quality) throws IOException { Condition.INSTANCE.ensureNotNull(bitmap, "The bitmap may not be null"); Condition.INSTANCE.ensureNotNull(file, "The file may not be null"); Condition.INSTANCE.ensureNotNull(format, "The format may not be null"); Condition.INSTANCE.ensureAtLeast(quality, 0, "The quality must be at least 0"); Condition.INSTANCE.ensureAtMaximum(quality, 100, "The quality must be at maximum 100"); OutputStream outputStream = null; try { outputStream = new FileOutputStream(file); boolean result = bitmap.compress(format, quality, outputStream); if (!result) { throw new IOException( "Failed to compress bitmap to file \"" + file + "\" using format " + format + " and quality " + quality); } } finally { StreamUtil.INSTANCE.close(outputStream); } }
class class_name[name] begin[{] method[compressToFile, return_type[void], modifier[public static], parameter[bitmap, file, format, quality]] begin[{] call[Condition.INSTANCE.ensureNotNull, parameter[member[.bitmap], literal["The bitmap may not be null"]]] call[Condition.INSTANCE.ensureNotNull, parameter[member[.file], literal["The file may not be null"]]] call[Condition.INSTANCE.ensureNotNull, parameter[member[.format], literal["The format may not be null"]]] call[Condition.INSTANCE.ensureAtLeast, parameter[member[.quality], literal[0], literal["The quality must be at least 0"]]] call[Condition.INSTANCE.ensureAtMaximum, parameter[member[.quality], literal[100], literal["The quality must be at maximum 100"]]] local_variable[type[OutputStream], outputStream] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=outputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileOutputStream, sub_type=None))), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=format, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=quality, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=outputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compress, postfix_operators=[], prefix_operators=[], qualifier=bitmap, selectors=[], type_arguments=None), name=result)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), IfStatement(condition=MemberReference(member=result, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to compress bitmap to file \""), operandr=MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\" using format "), operator=+), operandr=MemberReference(member=format, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" and quality "), operator=+), operandr=MemberReference(member=quality, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)]))], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=outputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=close, postfix_operators=[], prefix_operators=[], qualifier=StreamUtil.INSTANCE, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[compressToFile] operator[SEP] annotation[@] identifier[NonNull] Keyword[final] identifier[Bitmap] identifier[bitmap] , annotation[@] identifier[NonNull] Keyword[final] identifier[File] identifier[file] , annotation[@] identifier[NonNull] Keyword[final] identifier[CompressFormat] identifier[format] , Keyword[final] Keyword[int] identifier[quality] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Condition] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[ensureNotNull] operator[SEP] identifier[bitmap] , literal[String] operator[SEP] operator[SEP] identifier[Condition] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[ensureNotNull] operator[SEP] identifier[file] , literal[String] operator[SEP] operator[SEP] identifier[Condition] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[ensureNotNull] operator[SEP] identifier[format] , literal[String] operator[SEP] operator[SEP] identifier[Condition] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[ensureAtLeast] operator[SEP] identifier[quality] , Other[0] , literal[String] operator[SEP] operator[SEP] identifier[Condition] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[ensureAtMaximum] operator[SEP] identifier[quality] , Other[100] , literal[String] operator[SEP] operator[SEP] identifier[OutputStream] identifier[outputStream] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[outputStream] operator[=] Keyword[new] identifier[FileOutputStream] operator[SEP] identifier[file] operator[SEP] operator[SEP] Keyword[boolean] identifier[result] operator[=] identifier[bitmap] operator[SEP] identifier[compress] operator[SEP] identifier[format] , identifier[quality] , identifier[outputStream] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[result] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[file] operator[+] literal[String] operator[+] identifier[format] operator[+] literal[String] operator[+] identifier[quality] operator[SEP] operator[SEP] } } Keyword[finally] { identifier[StreamUtil] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[close] operator[SEP] identifier[outputStream] operator[SEP] operator[SEP] } }
@Override protected void updateRendererExtraValues(EpisodeViewModel content, Renderer<EpisodeViewModel> renderer, int position) { super.updateRendererExtraValues(content, renderer, position); EpisodeRenderer episodeRenderer = (EpisodeRenderer) renderer; episodeRenderer.setPosition(position); }
class class_name[name] begin[{] method[updateRendererExtraValues, return_type[void], modifier[protected], parameter[content, renderer, position]] begin[{] SuperMethodInvocation(arguments=[MemberReference(member=content, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=renderer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=position, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=updateRendererExtraValues, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) local_variable[type[EpisodeRenderer], episodeRenderer] call[episodeRenderer.setPosition, parameter[member[.position]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[updateRendererExtraValues] operator[SEP] identifier[EpisodeViewModel] identifier[content] , identifier[Renderer] operator[<] identifier[EpisodeViewModel] operator[>] identifier[renderer] , Keyword[int] identifier[position] operator[SEP] { Keyword[super] operator[SEP] identifier[updateRendererExtraValues] operator[SEP] identifier[content] , identifier[renderer] , identifier[position] operator[SEP] operator[SEP] identifier[EpisodeRenderer] identifier[episodeRenderer] operator[=] operator[SEP] identifier[EpisodeRenderer] operator[SEP] identifier[renderer] operator[SEP] identifier[episodeRenderer] operator[SEP] identifier[setPosition] operator[SEP] identifier[position] operator[SEP] operator[SEP] }
private String checkLogin(String uuid) { String uid = null != uuid ? uuid : this.uuid; String url = String.format("%s/cgi-bin/mmwebwx-bin/login", Constant.BASE_URL); Long time = System.currentTimeMillis(); ApiResponse response = this.client.send(new StringRequest(url) .add("loginicon", true).add("uuid", uid) .add("tip", "1").add("_", time) .add("r", (int) (-time / 1000) / 1579) .timeout(30)); Matcher matcher = CHECK_LOGIN_PATTERN.matcher(response.getRawBody()); if (matcher.find()) { if (StateCode.SUCCESS.equals(matcher.group(1))) { if (!this.processLoginSession(response.getRawBody())) { return StateCode.FAIL; } return StateCode.SUCCESS; } return matcher.group(1); } return StateCode.FAIL; }
class class_name[name] begin[{] method[checkLogin, return_type[type[String]], modifier[private], parameter[uuid]] begin[{] local_variable[type[String], uid] local_variable[type[String], url] local_variable[type[Long], time] local_variable[type[ApiResponse], response] local_variable[type[Matcher], matcher] if[call[matcher.find, parameter[]]] begin[{] if[call[StateCode.SUCCESS.equals, parameter[call[matcher.group, parameter[literal[1]]]]]] begin[{] if[THIS[call[None.processLoginSession, parameter[call[response.getRawBody, parameter[]]]]]] begin[{] return[member[StateCode.FAIL]] else begin[{] None end[}] return[member[StateCode.SUCCESS]] else begin[{] None end[}] return[call[matcher.group, parameter[literal[1]]]] else begin[{] None end[}] return[member[StateCode.FAIL]] end[}] END[}]
Keyword[private] identifier[String] identifier[checkLogin] operator[SEP] identifier[String] identifier[uuid] operator[SEP] { identifier[String] identifier[uid] operator[=] Other[null] operator[!=] identifier[uuid] operator[?] identifier[uuid] operator[:] Keyword[this] operator[SEP] identifier[uuid] operator[SEP] identifier[String] identifier[url] operator[=] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[Constant] operator[SEP] identifier[BASE_URL] operator[SEP] operator[SEP] identifier[Long] identifier[time] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] identifier[ApiResponse] identifier[response] operator[=] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[send] operator[SEP] Keyword[new] identifier[StringRequest] operator[SEP] identifier[url] operator[SEP] operator[SEP] identifier[add] operator[SEP] literal[String] , literal[boolean] operator[SEP] operator[SEP] identifier[add] operator[SEP] literal[String] , identifier[uid] operator[SEP] operator[SEP] identifier[add] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[add] operator[SEP] literal[String] , identifier[time] operator[SEP] operator[SEP] identifier[add] operator[SEP] literal[String] , operator[SEP] Keyword[int] operator[SEP] operator[SEP] operator[-] identifier[time] operator[/] Other[1000] operator[SEP] operator[/] Other[1579] operator[SEP] operator[SEP] identifier[timeout] operator[SEP] Other[30] operator[SEP] operator[SEP] operator[SEP] identifier[Matcher] identifier[matcher] operator[=] identifier[CHECK_LOGIN_PATTERN] operator[SEP] identifier[matcher] operator[SEP] identifier[response] operator[SEP] identifier[getRawBody] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[matcher] operator[SEP] identifier[find] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[StateCode] operator[SEP] identifier[SUCCESS] operator[SEP] identifier[equals] operator[SEP] identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] Keyword[this] operator[SEP] identifier[processLoginSession] operator[SEP] identifier[response] operator[SEP] identifier[getRawBody] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[StateCode] operator[SEP] identifier[FAIL] operator[SEP] } Keyword[return] identifier[StateCode] operator[SEP] identifier[SUCCESS] operator[SEP] } Keyword[return] identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[1] operator[SEP] operator[SEP] } Keyword[return] identifier[StateCode] operator[SEP] identifier[FAIL] operator[SEP] }
public Vector3f set(Vector3fc v) { return set(v.x(), v.y(), v.z()); }
class class_name[name] begin[{] method[set, return_type[type[Vector3f]], modifier[public], parameter[v]] begin[{] return[call[.set, parameter[call[v.x, parameter[]], call[v.y, parameter[]], call[v.z, parameter[]]]]] end[}] END[}]
Keyword[public] identifier[Vector3f] identifier[set] operator[SEP] identifier[Vector3fc] identifier[v] operator[SEP] { Keyword[return] identifier[set] operator[SEP] identifier[v] operator[SEP] identifier[x] operator[SEP] operator[SEP] , identifier[v] operator[SEP] identifier[y] operator[SEP] operator[SEP] , identifier[v] operator[SEP] identifier[z] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") public final static <R> JoinObservable<R> when(Plan0<R> p1) { return from(Observable.create(OperatorJoinPatterns.when(p1))); }
class class_name[name] begin[{] method[when, return_type[type[JoinObservable]], modifier[final public static], parameter[p1]] begin[{] return[call[.from, parameter[call[Observable.create, parameter[call[OperatorJoinPatterns.when, parameter[member[.p1]]]]]]]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[final] Keyword[static] operator[<] identifier[R] operator[>] identifier[JoinObservable] operator[<] identifier[R] operator[>] identifier[when] operator[SEP] identifier[Plan0] operator[<] identifier[R] operator[>] identifier[p1] operator[SEP] { Keyword[return] identifier[from] operator[SEP] identifier[Observable] operator[SEP] identifier[create] operator[SEP] identifier[OperatorJoinPatterns] operator[SEP] identifier[when] operator[SEP] identifier[p1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public java.util.List<ComplianceSummaryByResourceType> getComplianceSummariesByResourceType() { if (complianceSummariesByResourceType == null) { complianceSummariesByResourceType = new com.amazonaws.internal.SdkInternalList<ComplianceSummaryByResourceType>(); } return complianceSummariesByResourceType; }
class class_name[name] begin[{] method[getComplianceSummariesByResourceType, return_type[type[java]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.complianceSummariesByResourceType], ==, literal[null]]] begin[{] assign[member[.complianceSummariesByResourceType], ClassCreator(arguments=[], 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=ComplianceSummaryByResourceType, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))] else begin[{] None end[}] return[member[.complianceSummariesByResourceType]] end[}] END[}]
Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[ComplianceSummaryByResourceType] operator[>] identifier[getComplianceSummariesByResourceType] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[complianceSummariesByResourceType] operator[==] Other[null] operator[SEP] { identifier[complianceSummariesByResourceType] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[ComplianceSummaryByResourceType] operator[>] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[complianceSummariesByResourceType] operator[SEP] }
public void marshall(DetachPolicyRequest detachPolicyRequest, ProtocolMarshaller protocolMarshaller) { if (detachPolicyRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(detachPolicyRequest.getPolicyName(), POLICYNAME_BINDING); protocolMarshaller.marshall(detachPolicyRequest.getTarget(), TARGET_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[detachPolicyRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.detachPolicyRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getPolicyName, postfix_operators=[], prefix_operators=[], qualifier=detachPolicyRequest, selectors=[], type_arguments=None), MemberReference(member=POLICYNAME_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTarget, postfix_operators=[], prefix_operators=[], qualifier=detachPolicyRequest, selectors=[], type_arguments=None), MemberReference(member=TARGET_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DetachPolicyRequest] identifier[detachPolicyRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[detachPolicyRequest] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[detachPolicyRequest] operator[SEP] identifier[getPolicyName] operator[SEP] operator[SEP] , identifier[POLICYNAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[detachPolicyRequest] operator[SEP] identifier[getTarget] operator[SEP] operator[SEP] , identifier[TARGET_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public static void toGeojsonCoordinates(Coordinate[] coords, StringBuilder sb) { sb.append("["); for (int i = 0; i < coords.length; i++) { toGeojsonCoordinate(coords[i], sb); if (i < coords.length - 1) { sb.append(","); } } sb.append("]"); }
class class_name[name] begin[{] method[toGeojsonCoordinates, return_type[void], modifier[public static], parameter[coords, sb]] begin[{] call[sb.append, parameter[literal["["]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=coords, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), MemberReference(member=sb, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toGeojsonCoordinate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=coords, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=",")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=coords, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) call[sb.append, parameter[literal["]"]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[toGeojsonCoordinates] operator[SEP] identifier[Coordinate] operator[SEP] operator[SEP] identifier[coords] , identifier[StringBuilder] identifier[sb] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[coords] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[toGeojsonCoordinate] operator[SEP] identifier[coords] operator[SEP] identifier[i] operator[SEP] , identifier[sb] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[i] operator[<] identifier[coords] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } } identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] }
@Override public boolean accept(Stanza message) { if (!message.hasStanzaIdSet()) { return false; } if (super.accept(message)) { ExtensionElement extension = message.getExtension(ChatStateManager.NAMESPACE); String chatStateElementName = extension.getElementName(); ChatState state; try { state = ChatState.valueOf(chatStateElementName); return (state == ChatState.active); } catch (Exception ex) { return false; } } return true; }
class class_name[name] begin[{] method[accept, return_type[type[boolean]], modifier[public], parameter[message]] begin[{] if[call[message.hasStanzaIdSet, parameter[]]] begin[{] return[literal[false]] else begin[{] None end[}] if[SuperMethodInvocation(arguments=[MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=accept, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] begin[{] local_variable[type[ExtensionElement], extension] local_variable[type[String], chatStateElementName] local_variable[type[ChatState], state] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=chatStateElementName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=ChatState, selectors=[], type_arguments=None)), label=None), ReturnStatement(expression=BinaryOperation(operandl=MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=active, postfix_operators=[], prefix_operators=[], qualifier=ChatState, selectors=[]), operator===), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] return[literal[true]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[accept] operator[SEP] identifier[Stanza] identifier[message] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[message] operator[SEP] identifier[hasStanzaIdSet] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] Keyword[super] operator[SEP] identifier[accept] operator[SEP] identifier[message] operator[SEP] operator[SEP] { identifier[ExtensionElement] identifier[extension] operator[=] identifier[message] operator[SEP] identifier[getExtension] operator[SEP] identifier[ChatStateManager] operator[SEP] identifier[NAMESPACE] operator[SEP] operator[SEP] identifier[String] identifier[chatStateElementName] operator[=] identifier[extension] operator[SEP] identifier[getElementName] operator[SEP] operator[SEP] operator[SEP] identifier[ChatState] identifier[state] operator[SEP] Keyword[try] { identifier[state] operator[=] identifier[ChatState] operator[SEP] identifier[valueOf] operator[SEP] identifier[chatStateElementName] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[state] operator[==] identifier[ChatState] operator[SEP] identifier[active] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
@Override public void initialize() { String table = Preconditions.checkNotNull(this.state.getProp(ForkOperatorUtils .getPropertyNameForBranch(JdbcPublisher.JDBC_PUBLISHER_FINAL_TABLE_NAME, this.branches, this.branchId))); String db = Preconditions.checkNotNull(this.state.getProp(ForkOperatorUtils .getPropertyNameForBranch(JdbcPublisher.JDBC_PUBLISHER_DATABASE_NAME, this.branches, this.branchId))); try (Connection conn = createConnection()) { JdbcWriterCommands commands = this.jdbcWriterCommandsFactory.newInstance(this.state, conn); Map<String, JdbcType> dateColumnMapping = commands.retrieveDateColumns(db, table); LOG.info("Date column mapping: " + dateColumnMapping); final String dateFieldsKey = ForkOperatorUtils.getPropertyNameForBranch( AvroToJdbcEntryConverter.CONVERTER_AVRO_JDBC_DATE_FIELDS, this.branches, this.branchId); for (WorkUnit wu : this.workUnits) { wu.setProp(dateFieldsKey, new Gson().toJson(dateColumnMapping)); } } catch (SQLException e) { throw new RuntimeException(e); } }
class class_name[name] begin[{] method[initialize, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[String], table] local_variable[type[String], db] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=jdbcWriterCommandsFactory, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=state, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=newInstance, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=commands)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JdbcWriterCommands, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=db, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=table, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=retrieveDateColumns, postfix_operators=[], prefix_operators=[], qualifier=commands, selectors=[], type_arguments=None), name=dateColumnMapping)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=JdbcType, sub_type=None))], dimensions=[], name=Map, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Date column mapping: "), operandr=MemberReference(member=dateColumnMapping, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=info, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=CONVERTER_AVRO_JDBC_DATE_FIELDS, postfix_operators=[], prefix_operators=[], qualifier=AvroToJdbcEntryConverter, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=branches, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=branchId, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], member=getPropertyNameForBranch, postfix_operators=[], prefix_operators=[], qualifier=ForkOperatorUtils, selectors=[], type_arguments=None), name=dateFieldsKey)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=dateFieldsKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=dateColumnMapping, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toJson, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Gson, sub_type=None))], member=setProp, postfix_operators=[], prefix_operators=[], qualifier=wu, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=workUnits, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=wu)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=WorkUnit, sub_type=None))), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SQLException']))], finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=conn, type=ReferenceType(arguments=None, dimensions=[], name=Connection, sub_type=None), value=MethodInvocation(arguments=[], member=createConnection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None))]) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[initialize] operator[SEP] operator[SEP] { identifier[String] identifier[table] operator[=] identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] Keyword[this] operator[SEP] identifier[state] operator[SEP] identifier[getProp] operator[SEP] identifier[ForkOperatorUtils] operator[SEP] identifier[getPropertyNameForBranch] operator[SEP] identifier[JdbcPublisher] operator[SEP] identifier[JDBC_PUBLISHER_FINAL_TABLE_NAME] , Keyword[this] operator[SEP] identifier[branches] , Keyword[this] operator[SEP] identifier[branchId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[db] operator[=] identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] Keyword[this] operator[SEP] identifier[state] operator[SEP] identifier[getProp] operator[SEP] identifier[ForkOperatorUtils] operator[SEP] identifier[getPropertyNameForBranch] operator[SEP] identifier[JdbcPublisher] operator[SEP] identifier[JDBC_PUBLISHER_DATABASE_NAME] , Keyword[this] operator[SEP] identifier[branches] , Keyword[this] operator[SEP] identifier[branchId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[try] operator[SEP] identifier[Connection] identifier[conn] operator[=] identifier[createConnection] operator[SEP] operator[SEP] operator[SEP] { identifier[JdbcWriterCommands] identifier[commands] operator[=] Keyword[this] operator[SEP] identifier[jdbcWriterCommandsFactory] operator[SEP] identifier[newInstance] operator[SEP] Keyword[this] operator[SEP] identifier[state] , identifier[conn] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[JdbcType] operator[>] identifier[dateColumnMapping] operator[=] identifier[commands] operator[SEP] identifier[retrieveDateColumns] operator[SEP] identifier[db] , identifier[table] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[dateColumnMapping] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[dateFieldsKey] operator[=] identifier[ForkOperatorUtils] operator[SEP] identifier[getPropertyNameForBranch] operator[SEP] identifier[AvroToJdbcEntryConverter] operator[SEP] identifier[CONVERTER_AVRO_JDBC_DATE_FIELDS] , Keyword[this] operator[SEP] identifier[branches] , Keyword[this] operator[SEP] identifier[branchId] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[WorkUnit] identifier[wu] operator[:] Keyword[this] operator[SEP] identifier[workUnits] operator[SEP] { identifier[wu] operator[SEP] identifier[setProp] operator[SEP] identifier[dateFieldsKey] , Keyword[new] identifier[Gson] operator[SEP] operator[SEP] operator[SEP] identifier[toJson] operator[SEP] identifier[dateColumnMapping] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[SQLException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
private Set<Artifact> getSessionArtifacts() { Set<Artifact> result = new LinkedHashSet<Artifact>(); for (MavenProject p : getSession().getProjectDependencyGraph().getSortedProjects()) { result.add(p.getArtifact()); } return result; }
class class_name[name] begin[{] method[getSessionArtifacts, return_type[type[Set]], modifier[private], parameter[]] begin[{] local_variable[type[Set], result] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getArtifact, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getSession, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getProjectDependencyGraph, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getSortedProjects, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=p)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MavenProject, sub_type=None))), label=None) return[member[.result]] end[}] END[}]
Keyword[private] identifier[Set] operator[<] identifier[Artifact] operator[>] identifier[getSessionArtifacts] operator[SEP] operator[SEP] { identifier[Set] operator[<] identifier[Artifact] operator[>] identifier[result] operator[=] Keyword[new] identifier[LinkedHashSet] operator[<] identifier[Artifact] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[MavenProject] identifier[p] operator[:] identifier[getSession] operator[SEP] operator[SEP] operator[SEP] identifier[getProjectDependencyGraph] operator[SEP] operator[SEP] operator[SEP] identifier[getSortedProjects] operator[SEP] operator[SEP] operator[SEP] { identifier[result] operator[SEP] identifier[add] operator[SEP] identifier[p] operator[SEP] identifier[getArtifact] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public ValidatorType<WebJsptaglibraryDescriptor> getOrCreateValidator() { Node node = model.getOrCreate("validator"); ValidatorType<WebJsptaglibraryDescriptor> validator = new ValidatorTypeImpl<WebJsptaglibraryDescriptor>(this, "validator", model, node); return validator; }
class class_name[name] begin[{] method[getOrCreateValidator, return_type[type[ValidatorType]], modifier[public], parameter[]] begin[{] local_variable[type[Node], node] local_variable[type[ValidatorType], validator] return[member[.validator]] end[}] END[}]
Keyword[public] identifier[ValidatorType] operator[<] identifier[WebJsptaglibraryDescriptor] operator[>] identifier[getOrCreateValidator] operator[SEP] operator[SEP] { identifier[Node] identifier[node] operator[=] identifier[model] operator[SEP] identifier[getOrCreate] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[ValidatorType] operator[<] identifier[WebJsptaglibraryDescriptor] operator[>] identifier[validator] operator[=] Keyword[new] identifier[ValidatorTypeImpl] operator[<] identifier[WebJsptaglibraryDescriptor] operator[>] operator[SEP] Keyword[this] , literal[String] , identifier[model] , identifier[node] operator[SEP] operator[SEP] Keyword[return] identifier[validator] operator[SEP] }
@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:52:47+02:00", comments = "JAXB RI v2.2.11") public void setVilla(JAXBElement<Object> value) { this.villa = value; }
class class_name[name] begin[{] method[setVilla, return_type[void], modifier[public], parameter[value]] begin[{] assign[THIS[member[None.villa]], member[.value]] end[}] END[}]
annotation[@] identifier[Generated] operator[SEP] identifier[value] operator[=] literal[String] , identifier[date] operator[=] literal[String] , identifier[comments] operator[=] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[setVilla] operator[SEP] identifier[JAXBElement] operator[<] identifier[Object] operator[>] identifier[value] operator[SEP] { Keyword[this] operator[SEP] identifier[villa] operator[=] identifier[value] operator[SEP] }
static byte[] fromHexString(String str) { if (str.length() % 2 != 0) { throw new InvalidOperationException("Hex-string has odd length!"); } byte[] data = new byte[str.length() / 2]; int spos = 0; for (int dpos = 0; dpos < data.length; dpos++) { int d1 = Character.digit(str.charAt(spos++), 16); int d2 = Character.digit(str.charAt(spos++), 16); if (d1 < 0 || d2 < 0) { throw new InvalidOperationException("Mal-formed hex-string!"); } data[dpos] = (byte) ((d1 << 4) | d2); } return data; }
class class_name[name] begin[{] method[fromHexString, return_type[type[byte]], modifier[static], parameter[str]] begin[{] if[binary_operation[binary_operation[call[str.length, parameter[]], %, literal[2]], !=, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Hex-string has odd length!")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InvalidOperationException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[byte], data] local_variable[type[int], spos] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=spos, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16)], member=digit, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[], type_arguments=None), name=d1)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=spos, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16)], member=digit, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[], type_arguments=None), name=d2)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=d1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), operandr=BinaryOperation(operandl=MemberReference(member=d2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Mal-formed hex-string!")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InvalidOperationException, sub_type=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=dpos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=d1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=<<), operandr=MemberReference(member=d2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=|), type=BasicType(dimensions=[], name=byte))), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=dpos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=dpos)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=dpos, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.data]] end[}] END[}]
Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[fromHexString] operator[SEP] identifier[String] identifier[str] operator[SEP] { Keyword[if] operator[SEP] identifier[str] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[%] Other[2] operator[!=] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[InvalidOperationException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[byte] operator[SEP] operator[SEP] identifier[data] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[str] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[/] Other[2] operator[SEP] operator[SEP] Keyword[int] identifier[spos] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[dpos] operator[=] Other[0] operator[SEP] identifier[dpos] operator[<] identifier[data] operator[SEP] identifier[length] operator[SEP] identifier[dpos] operator[++] operator[SEP] { Keyword[int] identifier[d1] operator[=] identifier[Character] operator[SEP] identifier[digit] operator[SEP] identifier[str] operator[SEP] identifier[charAt] operator[SEP] identifier[spos] operator[++] operator[SEP] , Other[16] operator[SEP] operator[SEP] Keyword[int] identifier[d2] operator[=] identifier[Character] operator[SEP] identifier[digit] operator[SEP] identifier[str] operator[SEP] identifier[charAt] operator[SEP] identifier[spos] operator[++] operator[SEP] , Other[16] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[d1] operator[<] Other[0] operator[||] identifier[d2] operator[<] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[InvalidOperationException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[data] operator[SEP] identifier[dpos] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] identifier[d1] operator[<<] Other[4] operator[SEP] operator[|] identifier[d2] operator[SEP] operator[SEP] } Keyword[return] identifier[data] operator[SEP] }
public static long block_unsafe(GrayS64 integral , int x0 , int y0 , int x1 , int y1 ) { return ImplIntegralImageOps.block_unsafe(integral, x0, y0, x1, y1); }
class class_name[name] begin[{] method[block_unsafe, return_type[type[long]], modifier[public static], parameter[integral, x0, y0, x1, y1]] begin[{] return[call[ImplIntegralImageOps.block_unsafe, parameter[member[.integral], member[.x0], member[.y0], member[.x1], member[.y1]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[long] identifier[block_unsafe] operator[SEP] identifier[GrayS64] identifier[integral] , Keyword[int] identifier[x0] , Keyword[int] identifier[y0] , Keyword[int] identifier[x1] , Keyword[int] identifier[y1] operator[SEP] { Keyword[return] identifier[ImplIntegralImageOps] operator[SEP] identifier[block_unsafe] operator[SEP] identifier[integral] , identifier[x0] , identifier[y0] , identifier[x1] , identifier[y1] operator[SEP] operator[SEP] }
public int nextSetBit(final int i) { int x = i / 64; if (x >= this.data.limit()) return -1; long w = this.data.get(x); w >>>= (i % 64); if (w != 0) { return i + Long.numberOfTrailingZeros(w); } ++x; for (; x < this.data.limit(); ++x) { if (this.data.get(x) != 0) { return x * 64 + Long.numberOfTrailingZeros(this.data.get(x)); } } return -1; }
class class_name[name] begin[{] method[nextSetBit, return_type[type[int]], modifier[public], parameter[i]] begin[{] local_variable[type[int], x] if[binary_operation[member[.x], >=, THIS[member[None.data]call[None.limit, parameter[]]]]] begin[{] return[literal[1]] else begin[{] None end[}] local_variable[type[long], w] assign[member[.w], binary_operation[member[.i], %, literal[64]]] if[binary_operation[member[.w], !=, literal[0]]] begin[{] return[binary_operation[member[.i], +, call[Long.numberOfTrailingZeros, parameter[member[.w]]]]] else begin[{] None end[}] member[.x] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=data, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, 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=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=64), operator=*), operandr=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=data, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], member=numberOfTrailingZeros, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[], type_arguments=None), operator=+), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=data, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=limit, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operator=<), init=None, update=[MemberReference(member=x, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None) return[literal[1]] end[}] END[}]
Keyword[public] Keyword[int] identifier[nextSetBit] operator[SEP] Keyword[final] Keyword[int] identifier[i] operator[SEP] { Keyword[int] identifier[x] operator[=] identifier[i] operator[/] Other[64] operator[SEP] Keyword[if] operator[SEP] identifier[x] operator[>=] Keyword[this] operator[SEP] identifier[data] operator[SEP] identifier[limit] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[-] Other[1] operator[SEP] Keyword[long] identifier[w] operator[=] Keyword[this] operator[SEP] identifier[data] operator[SEP] identifier[get] operator[SEP] identifier[x] operator[SEP] operator[SEP] identifier[w] operator[>>>=] operator[SEP] identifier[i] operator[%] Other[64] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[w] operator[!=] Other[0] operator[SEP] { Keyword[return] identifier[i] operator[+] identifier[Long] operator[SEP] identifier[numberOfTrailingZeros] operator[SEP] identifier[w] operator[SEP] operator[SEP] } operator[++] identifier[x] operator[SEP] Keyword[for] operator[SEP] operator[SEP] identifier[x] operator[<] Keyword[this] operator[SEP] identifier[data] operator[SEP] identifier[limit] operator[SEP] operator[SEP] operator[SEP] operator[++] identifier[x] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[data] operator[SEP] identifier[get] operator[SEP] identifier[x] operator[SEP] operator[!=] Other[0] operator[SEP] { Keyword[return] identifier[x] operator[*] Other[64] operator[+] identifier[Long] operator[SEP] identifier[numberOfTrailingZeros] operator[SEP] Keyword[this] operator[SEP] identifier[data] operator[SEP] identifier[get] operator[SEP] identifier[x] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] operator[-] Other[1] operator[SEP] }
protected static <T extends Manifest> T removeFromEnvironment(Environment environment, Class<T> type) { String identifier = type.getName(); Object manifest = environment.get(identifier); if (manifest != null) { environment.set(identifier, null); } return type.cast(manifest); }
class class_name[name] begin[{] method[removeFromEnvironment, return_type[type[T]], modifier[static protected], parameter[environment, type]] begin[{] local_variable[type[String], identifier] local_variable[type[Object], manifest] if[binary_operation[member[.manifest], !=, literal[null]]] begin[{] call[environment.set, parameter[member[.identifier], literal[null]]] else begin[{] None end[}] return[call[type.cast, parameter[member[.manifest]]]] end[}] END[}]
Keyword[protected] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Manifest] operator[>] identifier[T] identifier[removeFromEnvironment] operator[SEP] identifier[Environment] identifier[environment] , identifier[Class] operator[<] identifier[T] operator[>] identifier[type] operator[SEP] { identifier[String] identifier[identifier] operator[=] identifier[type] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[Object] identifier[manifest] operator[=] identifier[environment] operator[SEP] identifier[get] operator[SEP] identifier[identifier] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[manifest] operator[!=] Other[null] operator[SEP] { identifier[environment] operator[SEP] identifier[set] operator[SEP] identifier[identifier] , Other[null] operator[SEP] operator[SEP] } Keyword[return] identifier[type] operator[SEP] identifier[cast] operator[SEP] identifier[manifest] operator[SEP] operator[SEP] }
@Override public MachineListVo getConfVoWithZk(Long configId) { Config config = configDao.get(configId); App app = appMgr.getById(config.getAppId()); Env env = envMgr.getById(config.getEnvId()); // // // DisConfigTypeEnum disConfigTypeEnum = DisConfigTypeEnum.FILE; if (config.getType().equals(DisConfigTypeEnum.ITEM.getType())) { disConfigTypeEnum = DisConfigTypeEnum.ITEM; } ZkDisconfData zkDisconfData = zkDeployMgr.getZkDisconfData(app.getName(), env.getName(), config.getVersion(), disConfigTypeEnum, config.getName()); if (zkDisconfData == null) { return new MachineListVo(); } MachineListVo machineListVo = getZkData(zkDisconfData.getData(), config); return machineListVo; }
class class_name[name] begin[{] method[getConfVoWithZk, return_type[type[MachineListVo]], modifier[public], parameter[configId]] begin[{] local_variable[type[Config], config] local_variable[type[App], app] local_variable[type[Env], env] local_variable[type[DisConfigTypeEnum], disConfigTypeEnum] if[call[config.getType, parameter[]]] begin[{] assign[member[.disConfigTypeEnum], member[DisConfigTypeEnum.ITEM]] else begin[{] None end[}] local_variable[type[ZkDisconfData], zkDisconfData] if[binary_operation[member[.zkDisconfData], ==, literal[null]]] begin[{] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MachineListVo, sub_type=None))] else begin[{] None end[}] local_variable[type[MachineListVo], machineListVo] return[member[.machineListVo]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[MachineListVo] identifier[getConfVoWithZk] operator[SEP] identifier[Long] identifier[configId] operator[SEP] { identifier[Config] identifier[config] operator[=] identifier[configDao] operator[SEP] identifier[get] operator[SEP] identifier[configId] operator[SEP] operator[SEP] identifier[App] identifier[app] operator[=] identifier[appMgr] operator[SEP] identifier[getById] operator[SEP] identifier[config] operator[SEP] identifier[getAppId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Env] identifier[env] operator[=] identifier[envMgr] operator[SEP] identifier[getById] operator[SEP] identifier[config] operator[SEP] identifier[getEnvId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[DisConfigTypeEnum] identifier[disConfigTypeEnum] operator[=] identifier[DisConfigTypeEnum] operator[SEP] identifier[FILE] operator[SEP] Keyword[if] operator[SEP] identifier[config] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[DisConfigTypeEnum] operator[SEP] identifier[ITEM] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[disConfigTypeEnum] operator[=] identifier[DisConfigTypeEnum] operator[SEP] identifier[ITEM] operator[SEP] } identifier[ZkDisconfData] identifier[zkDisconfData] operator[=] identifier[zkDeployMgr] operator[SEP] identifier[getZkDisconfData] operator[SEP] identifier[app] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[env] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[config] operator[SEP] identifier[getVersion] operator[SEP] operator[SEP] , identifier[disConfigTypeEnum] , identifier[config] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[zkDisconfData] operator[==] Other[null] operator[SEP] { Keyword[return] Keyword[new] identifier[MachineListVo] operator[SEP] operator[SEP] operator[SEP] } identifier[MachineListVo] identifier[machineListVo] operator[=] identifier[getZkData] operator[SEP] identifier[zkDisconfData] operator[SEP] identifier[getData] operator[SEP] operator[SEP] , identifier[config] operator[SEP] operator[SEP] Keyword[return] identifier[machineListVo] operator[SEP] }
public static MemcachedClient create(final PippoSettings settings) { String host = settings.getString(HOST, "localhost:11211"); String prot = settings.getString(PROT, "BINARY"); CommandFactory protocol; switch (prot) { case "BINARY": protocol = new BinaryCommandFactory(); break; case "TEXT": protocol = new TextCommandFactory(); break; default: protocol = new BinaryCommandFactory(); break; } String user = settings.getString(USER, ""); String pass = settings.getString(PASS, ""); List<String> autM = settings.getStrings(AUTM); String[] mechanisms = autM.toArray(new String[autM.size()]); return create(host, protocol, user, pass, mechanisms); }
class class_name[name] begin[{] method[create, return_type[type[MemcachedClient]], modifier[public static], parameter[settings]] begin[{] local_variable[type[String], host] local_variable[type[String], prot] local_variable[type[CommandFactory], protocol] SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="BINARY")], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=protocol, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BinaryCommandFactory, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TEXT")], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=protocol, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TextCommandFactory, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=protocol, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BinaryCommandFactory, sub_type=None))), label=None), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=prot, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) local_variable[type[String], user] local_variable[type[String], pass] local_variable[type[List], autM] local_variable[type[String], mechanisms] return[call[.create, parameter[member[.host], member[.protocol], member[.user], member[.pass], member[.mechanisms]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[MemcachedClient] identifier[create] operator[SEP] Keyword[final] identifier[PippoSettings] identifier[settings] operator[SEP] { identifier[String] identifier[host] operator[=] identifier[settings] operator[SEP] identifier[getString] operator[SEP] identifier[HOST] , literal[String] operator[SEP] operator[SEP] identifier[String] identifier[prot] operator[=] identifier[settings] operator[SEP] identifier[getString] operator[SEP] identifier[PROT] , literal[String] operator[SEP] operator[SEP] identifier[CommandFactory] identifier[protocol] operator[SEP] Keyword[switch] operator[SEP] identifier[prot] operator[SEP] { Keyword[case] literal[String] operator[:] identifier[protocol] operator[=] Keyword[new] identifier[BinaryCommandFactory] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[protocol] operator[=] Keyword[new] identifier[TextCommandFactory] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] identifier[protocol] operator[=] Keyword[new] identifier[BinaryCommandFactory] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } identifier[String] identifier[user] operator[=] identifier[settings] operator[SEP] identifier[getString] operator[SEP] identifier[USER] , literal[String] operator[SEP] operator[SEP] identifier[String] identifier[pass] operator[=] identifier[settings] operator[SEP] identifier[getString] operator[SEP] identifier[PASS] , literal[String] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[autM] operator[=] identifier[settings] operator[SEP] identifier[getStrings] operator[SEP] identifier[AUTM] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[mechanisms] operator[=] identifier[autM] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[String] operator[SEP] identifier[autM] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[create] operator[SEP] identifier[host] , identifier[protocol] , identifier[user] , identifier[pass] , identifier[mechanisms] operator[SEP] operator[SEP] }
@Override public boolean shouldUseLtpaIfJwtAbsent() { // TODO Auto-generated method stub JwtSsoBuilderConfig jwtssobuilderConfig = getJwtSSOBuilderConfig(); if (jwtssobuilderConfig != null) { return jwtssobuilderConfig.isUseLtpaIfJwtAbsent(); } return true; }
class class_name[name] begin[{] method[shouldUseLtpaIfJwtAbsent, return_type[type[boolean]], modifier[public], parameter[]] begin[{] local_variable[type[JwtSsoBuilderConfig], jwtssobuilderConfig] if[binary_operation[member[.jwtssobuilderConfig], !=, literal[null]]] begin[{] return[call[jwtssobuilderConfig.isUseLtpaIfJwtAbsent, parameter[]]] else begin[{] None end[}] return[literal[true]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[shouldUseLtpaIfJwtAbsent] operator[SEP] operator[SEP] { identifier[JwtSsoBuilderConfig] identifier[jwtssobuilderConfig] operator[=] identifier[getJwtSSOBuilderConfig] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[jwtssobuilderConfig] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[jwtssobuilderConfig] operator[SEP] identifier[isUseLtpaIfJwtAbsent] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
private void serveError(Status status, HTTPTrackerErrorMessage error, RequestHandler requestHandler) throws IOException { requestHandler.serveResponse(status.getCode(), status.getDescription(), error.getData()); }
class class_name[name] begin[{] method[serveError, return_type[void], modifier[private], parameter[status, error, requestHandler]] begin[{] call[requestHandler.serveResponse, parameter[call[status.getCode, parameter[]], call[status.getDescription, parameter[]], call[error.getData, parameter[]]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[serveError] operator[SEP] identifier[Status] identifier[status] , identifier[HTTPTrackerErrorMessage] identifier[error] , identifier[RequestHandler] identifier[requestHandler] operator[SEP] Keyword[throws] identifier[IOException] { identifier[requestHandler] operator[SEP] identifier[serveResponse] operator[SEP] identifier[status] operator[SEP] identifier[getCode] operator[SEP] operator[SEP] , identifier[status] operator[SEP] identifier[getDescription] operator[SEP] operator[SEP] , identifier[error] operator[SEP] identifier[getData] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public Fields getComponentOutputFields(String componentId, String streamId) { Fields ret = _componentToStreamToFields.get(componentId).get(streamId); if (ret == null) { throw new IllegalArgumentException("No output fields defined for component:stream " + componentId + ":" + streamId); } return ret; }
class class_name[name] begin[{] method[getComponentOutputFields, return_type[type[Fields]], modifier[public], parameter[componentId, streamId]] begin[{] local_variable[type[Fields], ret] if[binary_operation[member[.ret], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No output fields defined for component:stream "), operandr=MemberReference(member=componentId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=":"), operator=+), operandr=MemberReference(member=streamId, 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[member[.ret]] end[}] END[}]
Keyword[public] identifier[Fields] identifier[getComponentOutputFields] operator[SEP] identifier[String] identifier[componentId] , identifier[String] identifier[streamId] operator[SEP] { identifier[Fields] identifier[ret] operator[=] identifier[_componentToStreamToFields] operator[SEP] identifier[get] operator[SEP] identifier[componentId] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[streamId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ret] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[componentId] operator[+] literal[String] operator[+] identifier[streamId] operator[SEP] operator[SEP] } Keyword[return] identifier[ret] operator[SEP] }
public Observable<Void> reactivateAsync(String jobId, String taskId) { return reactivateWithServiceResponseAsync(jobId, taskId).map(new Func1<ServiceResponseWithHeaders<Void, TaskReactivateHeaders>, Void>() { @Override public Void call(ServiceResponseWithHeaders<Void, TaskReactivateHeaders> response) { return response.body(); } }); }
class class_name[name] begin[{] method[reactivateAsync, return_type[type[Observable]], modifier[public], parameter[jobId, taskId]] begin[{] return[call[.reactivateWithServiceResponseAsync, parameter[member[.jobId], member[.taskId]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[Void] operator[>] identifier[reactivateAsync] operator[SEP] identifier[String] identifier[jobId] , identifier[String] identifier[taskId] operator[SEP] { Keyword[return] identifier[reactivateWithServiceResponseAsync] operator[SEP] identifier[jobId] , identifier[taskId] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponseWithHeaders] operator[<] identifier[Void] , identifier[TaskReactivateHeaders] operator[>] , identifier[Void] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Void] identifier[call] operator[SEP] identifier[ServiceResponseWithHeaders] operator[<] identifier[Void] , identifier[TaskReactivateHeaders] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public <T> void add(Class<T> eventClass, Listener<T> listener) { add(eventClass, listener, HIDDEN_STATION); }
class class_name[name] begin[{] method[add, return_type[void], modifier[public], parameter[eventClass, listener]] begin[{] call[.add, parameter[member[.eventClass], member[.listener], member[.HIDDEN_STATION]]] end[}] END[}]
Keyword[public] operator[<] identifier[T] operator[>] Keyword[void] identifier[add] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[eventClass] , identifier[Listener] operator[<] identifier[T] operator[>] identifier[listener] operator[SEP] { identifier[add] operator[SEP] identifier[eventClass] , identifier[listener] , identifier[HIDDEN_STATION] operator[SEP] operator[SEP] }
public void transmit( Command c, Map h, String b ) { _server.receive( c, h, b, this ); }
class class_name[name] begin[{] method[transmit, return_type[void], modifier[public], parameter[c, h, b]] begin[{] call[_server.receive, parameter[member[.c], member[.h], member[.b], THIS[]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[transmit] operator[SEP] identifier[Command] identifier[c] , identifier[Map] identifier[h] , identifier[String] identifier[b] operator[SEP] { identifier[_server] operator[SEP] identifier[receive] operator[SEP] identifier[c] , identifier[h] , identifier[b] , Keyword[this] operator[SEP] operator[SEP] }