code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
private static void setUnconditionalArgumentNullness( Updates bothUpdates, List<Node> arguments, ClassAndMethod callee) { Set<Integer> requiredNonNullParameters = REQUIRED_NON_NULL_PARAMETERS.get(callee.name()); for (LocalVariableNode var : variablesAtIndexes(requiredNonNullParameters, arguments)) { bothUpdates.set(var, NONNULL); } }
class class_name[name] begin[{] method[setUnconditionalArgumentNullness, return_type[void], modifier[private static], parameter[bothUpdates, arguments, callee]] begin[{] local_variable[type[Set], requiredNonNullParameters] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=var, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=NONNULL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=set, postfix_operators=[], prefix_operators=[], qualifier=bothUpdates, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=requiredNonNullParameters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=arguments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=variablesAtIndexes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=var)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=LocalVariableNode, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[setUnconditionalArgumentNullness] operator[SEP] identifier[Updates] identifier[bothUpdates] , identifier[List] operator[<] identifier[Node] operator[>] identifier[arguments] , identifier[ClassAndMethod] identifier[callee] operator[SEP] { identifier[Set] operator[<] identifier[Integer] operator[>] identifier[requiredNonNullParameters] operator[=] identifier[REQUIRED_NON_NULL_PARAMETERS] operator[SEP] identifier[get] operator[SEP] identifier[callee] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[LocalVariableNode] identifier[var] operator[:] identifier[variablesAtIndexes] operator[SEP] identifier[requiredNonNullParameters] , identifier[arguments] operator[SEP] operator[SEP] { identifier[bothUpdates] operator[SEP] identifier[set] operator[SEP] identifier[var] , identifier[NONNULL] operator[SEP] operator[SEP] } }
public VircurexLastTrade getVircurexTicker(CurrencyPair currencyPair) throws IOException { VircurexLastTrade vircurexLastTrade = vircurexAuthenticated.getLastTrade( currencyPair.base.getCurrencyCode().toLowerCase(), currencyPair.counter.getCurrencyCode().toLowerCase()); return vircurexLastTrade; }
class class_name[name] begin[{] method[getVircurexTicker, return_type[type[VircurexLastTrade]], modifier[public], parameter[currencyPair]] begin[{] local_variable[type[VircurexLastTrade], vircurexLastTrade] return[member[.vircurexLastTrade]] end[}] END[}]
Keyword[public] identifier[VircurexLastTrade] identifier[getVircurexTicker] operator[SEP] identifier[CurrencyPair] identifier[currencyPair] operator[SEP] Keyword[throws] identifier[IOException] { identifier[VircurexLastTrade] identifier[vircurexLastTrade] operator[=] identifier[vircurexAuthenticated] operator[SEP] identifier[getLastTrade] operator[SEP] identifier[currencyPair] operator[SEP] identifier[base] operator[SEP] identifier[getCurrencyCode] operator[SEP] operator[SEP] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] , identifier[currencyPair] operator[SEP] identifier[counter] operator[SEP] identifier[getCurrencyCode] operator[SEP] operator[SEP] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[vircurexLastTrade] operator[SEP] }
@Override public void setExceptionListener(ExceptionListener eListener) throws IllegalStateRuntimeException, JMSRuntimeException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setExceptionListener", new Object[] { eListener }); try { jmsConnection.setExceptionListener(eListener); } catch (IllegalStateException ise) { throw (IllegalStateRuntimeException) JmsErrorUtils.getJMS2Exception(ise, IllegalStateRuntimeException.class); } catch (JMSException jmse) { throw (JMSRuntimeException) JmsErrorUtils.getJMS2Exception(jmse, JMSRuntimeException.class); } finally { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "setExceptionListener"); } }
class class_name[name] begin[{] method[setExceptionListener, return_type[void], modifier[public], parameter[eListener]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[THIS[], member[.tc], literal["setExceptionListener"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=eListener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]] else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=eListener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setExceptionListener, postfix_operators=[], prefix_operators=[], qualifier=jmsConnection, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=Cast(expression=MethodInvocation(arguments=[MemberReference(member=ise, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateRuntimeException, sub_type=None))], member=getJMS2Exception, postfix_operators=[], prefix_operators=[], qualifier=JmsErrorUtils, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=IllegalStateRuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ise, types=['IllegalStateException'])), CatchClause(block=[ThrowStatement(expression=Cast(expression=MethodInvocation(arguments=[MemberReference(member=jmse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JMSRuntimeException, sub_type=None))], member=getJMS2Exception, postfix_operators=[], prefix_operators=[], qualifier=JmsErrorUtils, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=JMSRuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=jmse, types=['JMSException']))], finally_block=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isEntryEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="setExceptionListener")], member=exit, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None))], label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setExceptionListener] operator[SEP] identifier[ExceptionListener] identifier[eListener] operator[SEP] Keyword[throws] identifier[IllegalStateRuntimeException] , identifier[JMSRuntimeException] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] Keyword[this] , identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[eListener] } operator[SEP] operator[SEP] Keyword[try] { identifier[jmsConnection] operator[SEP] identifier[setExceptionListener] operator[SEP] identifier[eListener] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalStateException] identifier[ise] operator[SEP] { Keyword[throw] operator[SEP] identifier[IllegalStateRuntimeException] operator[SEP] identifier[JmsErrorUtils] operator[SEP] identifier[getJMS2Exception] operator[SEP] identifier[ise] , identifier[IllegalStateRuntimeException] operator[SEP] Keyword[class] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[JMSException] identifier[jmse] operator[SEP] { Keyword[throw] operator[SEP] identifier[JMSRuntimeException] operator[SEP] identifier[JmsErrorUtils] operator[SEP] identifier[getJMS2Exception] operator[SEP] identifier[jmse] , identifier[JMSRuntimeException] operator[SEP] Keyword[class] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] } }
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "solidArrayProperty") public JAXBElement<SolidArrayPropertyType> createSolidArrayProperty(SolidArrayPropertyType value) { return new JAXBElement<SolidArrayPropertyType>(_SolidArrayProperty_QNAME, SolidArrayPropertyType.class, null, value); }
class class_name[name] begin[{] method[createSolidArrayProperty, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=_SolidArrayProperty_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SolidArrayPropertyType, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=SolidArrayPropertyType, sub_type=None))], dimensions=None, name=JAXBElement, sub_type=None))] end[}] END[}]
annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[SolidArrayPropertyType] operator[>] identifier[createSolidArrayProperty] operator[SEP] identifier[SolidArrayPropertyType] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[SolidArrayPropertyType] operator[>] operator[SEP] identifier[_SolidArrayProperty_QNAME] , identifier[SolidArrayPropertyType] operator[SEP] Keyword[class] , Other[null] , identifier[value] operator[SEP] operator[SEP] }
protected static void registerStatsdMetricObserver(List<MetricObserver> observers, String prefix, String host, String port) { // verify at least hostname is set, else cannot configure this observer if (null == host || host.trim().isEmpty()) { LOGGER.info("StatdsMetricObserver not configured, missing environment variable: {}", ENV_STATSD_HOSTNAME); return; } LOGGER.debug("{} environment variable is: {}", ENV_STATSD_PREFIX, prefix); LOGGER.debug("{} environment variable is: {}", ENV_STATSD_HOSTNAME, host); LOGGER.debug("{} environment variable is: {}", ENV_STATSD_PORT, port); int iport = -1; if (port != null && !port.isEmpty()) { try { iport = Integer.valueOf(port); } catch (NumberFormatException e) { iport = -1; LOGGER.warn("Configured port is not an integer. Falling back to default"); } } if (iport < 0) { iport = 8125; //default statsd port LOGGER.debug("Using default port: " + port); } LOGGER.debug("StatsdMetricObserver prefix: " + prefix); LOGGER.debug("StatsdMetricObserver host: " + host); LOGGER.debug("StatsdMetricObserver port: " + iport); observers.add(new StatsdMetricObserver(prefix, host, iport)); }
class class_name[name] begin[{] method[registerStatsdMetricObserver, return_type[void], modifier[static protected], parameter[observers, prefix, host, port]] begin[{] if[binary_operation[binary_operation[literal[null], ==, member[.host]], ||, call[host.trim, parameter[]]]] begin[{] call[LOGGER.info, parameter[literal["StatdsMetricObserver not configured, missing environment variable: {}"], member[.ENV_STATSD_HOSTNAME]]] return[None] else begin[{] None end[}] call[LOGGER.debug, parameter[literal["{} environment variable is: {}"], member[.ENV_STATSD_PREFIX], member[.prefix]]] call[LOGGER.debug, parameter[literal["{} environment variable is: {}"], member[.ENV_STATSD_HOSTNAME], member[.host]]] call[LOGGER.debug, parameter[literal["{} environment variable is: {}"], member[.ENV_STATSD_PORT], member[.port]]] local_variable[type[int], iport] if[binary_operation[binary_operation[member[.port], !=, literal[null]], &&, call[port.isEmpty, parameter[]]]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=iport, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=port, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=iport, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Configured port is not an integer. Falling back to default")], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['NumberFormatException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] if[binary_operation[member[.iport], <, literal[0]]] begin[{] assign[member[.iport], literal[8125]] call[LOGGER.debug, parameter[binary_operation[literal["Using default port: "], +, member[.port]]]] else begin[{] None end[}] call[LOGGER.debug, parameter[binary_operation[literal["StatsdMetricObserver prefix: "], +, member[.prefix]]]] call[LOGGER.debug, parameter[binary_operation[literal["StatsdMetricObserver host: "], +, member[.host]]]] call[LOGGER.debug, parameter[binary_operation[literal["StatsdMetricObserver port: "], +, member[.iport]]]] call[observers.add, parameter[ClassCreator(arguments=[MemberReference(member=prefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=host, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=iport, 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=StatsdMetricObserver, sub_type=None))]] end[}] END[}]
Keyword[protected] Keyword[static] Keyword[void] identifier[registerStatsdMetricObserver] operator[SEP] identifier[List] operator[<] identifier[MetricObserver] operator[>] identifier[observers] , identifier[String] identifier[prefix] , identifier[String] identifier[host] , identifier[String] identifier[port] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[host] operator[||] identifier[host] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[ENV_STATSD_HOSTNAME] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[ENV_STATSD_PREFIX] , identifier[prefix] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[ENV_STATSD_HOSTNAME] , identifier[host] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[ENV_STATSD_PORT] , identifier[port] operator[SEP] operator[SEP] Keyword[int] identifier[iport] operator[=] operator[-] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[port] operator[!=] Other[null] operator[&&] operator[!] identifier[port] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { identifier[iport] operator[=] identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[port] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NumberFormatException] identifier[e] operator[SEP] { identifier[iport] operator[=] operator[-] Other[1] operator[SEP] identifier[LOGGER] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[iport] operator[<] Other[0] operator[SEP] { identifier[iport] operator[=] Other[8125] operator[SEP] identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[port] operator[SEP] operator[SEP] } identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[prefix] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[host] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[iport] operator[SEP] operator[SEP] identifier[observers] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[StatsdMetricObserver] operator[SEP] identifier[prefix] , identifier[host] , identifier[iport] operator[SEP] operator[SEP] operator[SEP] }
public void setAdapter(StickyListHeadersAdapter adapter) { if (adapter == null) { if (mAdapter instanceof SectionIndexerAdapterWrapper) { ((SectionIndexerAdapterWrapper) mAdapter).mSectionIndexerDelegate = null; } if (mAdapter != null) { mAdapter.mDelegate = null; } mList.setAdapter(null); clearHeader(); return; } if (mAdapter != null) { mAdapter.unregisterDataSetObserver(mDataSetObserver); } if (adapter instanceof SectionIndexer) { mAdapter = new SectionIndexerAdapterWrapper(getContext(), adapter); } else { mAdapter = new AdapterWrapper(getContext(), adapter); } mDataSetObserver = new AdapterWrapperDataSetObserver(); mAdapter.registerDataSetObserver(mDataSetObserver); if (mOnHeaderClickListener != null) { mAdapter.setOnHeaderClickListener(new AdapterWrapperHeaderClickHandler()); } else { mAdapter.setOnHeaderClickListener(null); } mAdapter.setDivider(mDivider, mDividerHeight); mList.setAdapter(mAdapter); clearHeader(); }
class class_name[name] begin[{] method[setAdapter, return_type[void], modifier[public], parameter[adapter]] begin[{] if[binary_operation[member[.adapter], ==, literal[null]]] begin[{] if[binary_operation[member[.mAdapter], instanceof, type[SectionIndexerAdapterWrapper]]] begin[{] assign[Cast(expression=MemberReference(member=mAdapter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=SectionIndexerAdapterWrapper, sub_type=None)), literal[null]] else begin[{] None end[}] if[binary_operation[member[.mAdapter], !=, literal[null]]] begin[{] assign[member[mAdapter.mDelegate], literal[null]] else begin[{] None end[}] call[mList.setAdapter, parameter[literal[null]]] call[.clearHeader, parameter[]] return[None] else begin[{] None end[}] if[binary_operation[member[.mAdapter], !=, literal[null]]] begin[{] call[mAdapter.unregisterDataSetObserver, parameter[member[.mDataSetObserver]]] else begin[{] None end[}] if[binary_operation[member[.adapter], instanceof, type[SectionIndexer]]] begin[{] assign[member[.mAdapter], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=adapter, 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=SectionIndexerAdapterWrapper, sub_type=None))] else begin[{] assign[member[.mAdapter], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=adapter, 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=AdapterWrapper, sub_type=None))] end[}] assign[member[.mDataSetObserver], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AdapterWrapperDataSetObserver, sub_type=None))] call[mAdapter.registerDataSetObserver, parameter[member[.mDataSetObserver]]] if[binary_operation[member[.mOnHeaderClickListener], !=, literal[null]]] begin[{] call[mAdapter.setOnHeaderClickListener, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AdapterWrapperHeaderClickHandler, sub_type=None))]] else begin[{] call[mAdapter.setOnHeaderClickListener, parameter[literal[null]]] end[}] call[mAdapter.setDivider, parameter[member[.mDivider], member[.mDividerHeight]]] call[mList.setAdapter, parameter[member[.mAdapter]]] call[.clearHeader, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setAdapter] operator[SEP] identifier[StickyListHeadersAdapter] identifier[adapter] operator[SEP] { Keyword[if] operator[SEP] identifier[adapter] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[mAdapter] Keyword[instanceof] identifier[SectionIndexerAdapterWrapper] operator[SEP] { operator[SEP] operator[SEP] identifier[SectionIndexerAdapterWrapper] operator[SEP] identifier[mAdapter] operator[SEP] operator[SEP] identifier[mSectionIndexerDelegate] operator[=] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[mAdapter] operator[!=] Other[null] operator[SEP] { identifier[mAdapter] operator[SEP] identifier[mDelegate] operator[=] Other[null] operator[SEP] } identifier[mList] operator[SEP] identifier[setAdapter] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[clearHeader] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[if] operator[SEP] identifier[mAdapter] operator[!=] Other[null] operator[SEP] { identifier[mAdapter] operator[SEP] identifier[unregisterDataSetObserver] operator[SEP] identifier[mDataSetObserver] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[adapter] Keyword[instanceof] identifier[SectionIndexer] operator[SEP] { identifier[mAdapter] operator[=] Keyword[new] identifier[SectionIndexerAdapterWrapper] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] , identifier[adapter] operator[SEP] operator[SEP] } Keyword[else] { identifier[mAdapter] operator[=] Keyword[new] identifier[AdapterWrapper] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] , identifier[adapter] operator[SEP] operator[SEP] } identifier[mDataSetObserver] operator[=] Keyword[new] identifier[AdapterWrapperDataSetObserver] operator[SEP] operator[SEP] operator[SEP] identifier[mAdapter] operator[SEP] identifier[registerDataSetObserver] operator[SEP] identifier[mDataSetObserver] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mOnHeaderClickListener] operator[!=] Other[null] operator[SEP] { identifier[mAdapter] operator[SEP] identifier[setOnHeaderClickListener] operator[SEP] Keyword[new] identifier[AdapterWrapperHeaderClickHandler] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[mAdapter] operator[SEP] identifier[setOnHeaderClickListener] operator[SEP] Other[null] operator[SEP] operator[SEP] } identifier[mAdapter] operator[SEP] identifier[setDivider] operator[SEP] identifier[mDivider] , identifier[mDividerHeight] operator[SEP] operator[SEP] identifier[mList] operator[SEP] identifier[setAdapter] operator[SEP] identifier[mAdapter] operator[SEP] operator[SEP] identifier[clearHeader] operator[SEP] operator[SEP] operator[SEP] }
protected Integer getKeyHash(final Map<String, Object> seed) { //Determine the attributes to build the cache key with final Set<String> cacheAttributes; if (this.useAllAttributes) { cacheAttributes = seed.keySet(); } else if (this.cacheKeyAttributes != null) { cacheAttributes = this.cacheKeyAttributes; } else { cacheAttributes = this.defaultAttributeNameSet; } //Build the cache key based on the attribute Set final HashMap<String, Object> cacheKey = new HashMap<>(cacheAttributes.size()); for (final String attr : cacheAttributes) { if (seed.containsKey(attr)) { final Object value = seed.get(attr); if (!this.ignoreEmptyAttributes) { cacheKey.put(attr, value); } else if (value instanceof Collection) { if (!CollectionUtils.isEmpty((Collection<?>) value)) { cacheKey.put(attr, value); } } else if (value instanceof String) { if (StringUtils.isNotEmpty((String) value)) { cacheKey.put(attr, value); } } else if (value != null) { cacheKey.put(attr, value); } } } if (this.logger.isDebugEnabled()) { this.logger.debug("Generated cache Map " + cacheKey + " from seed Map " + seed); } //If no entries don't return a key if (cacheKey.isEmpty()) { return null; } //Return the key map's hash code return cacheKey.hashCode(); }
class class_name[name] begin[{] method[getKeyHash, return_type[type[Integer]], modifier[protected], parameter[seed]] begin[{] local_variable[type[Set], cacheAttributes] if[THIS[member[None.useAllAttributes]]] begin[{] assign[member[.cacheAttributes], call[seed.keySet, parameter[]]] else begin[{] if[binary_operation[THIS[member[None.cacheKeyAttributes]], !=, literal[null]]] begin[{] assign[member[.cacheAttributes], THIS[member[None.cacheKeyAttributes]]] else begin[{] assign[member[.cacheAttributes], THIS[member[None.defaultAttributeNameSet]]] end[}] end[}] local_variable[type[HashMap], cacheKey] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=attr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=seed, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=attr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=seed, selectors=[], type_arguments=None), name=value)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), IfStatement(condition=This(postfix_operators=[], prefix_operators=['!'], qualifier=None, selectors=[MemberReference(member=ignoreEmptyAttributes, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Collection, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=attr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=cacheKey, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], member=isNotEmpty, postfix_operators=[], prefix_operators=[], qualifier=StringUtils, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=attr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=cacheKey, selectors=[], type_arguments=None), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Collection, sub_type=None))], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=CollectionUtils, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=attr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=cacheKey, selectors=[], type_arguments=None), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=attr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=cacheKey, selectors=[], type_arguments=None), label=None)]))]))]), control=EnhancedForControl(iterable=MemberReference(member=cacheAttributes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=attr)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) if[THIS[member[None.logger]call[None.isDebugEnabled, parameter[]]]] begin[{] THIS[member[None.logger]call[None.debug, parameter[binary_operation[binary_operation[binary_operation[literal["Generated cache Map "], +, member[.cacheKey]], +, literal[" from seed Map "]], +, member[.seed]]]]] else begin[{] None end[}] if[call[cacheKey.isEmpty, parameter[]]] begin[{] return[literal[null]] else begin[{] None end[}] return[call[cacheKey.hashCode, parameter[]]] end[}] END[}]
Keyword[protected] identifier[Integer] identifier[getKeyHash] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[seed] operator[SEP] { Keyword[final] identifier[Set] operator[<] identifier[String] operator[>] identifier[cacheAttributes] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[useAllAttributes] operator[SEP] { identifier[cacheAttributes] operator[=] identifier[seed] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[cacheKeyAttributes] operator[!=] Other[null] operator[SEP] { identifier[cacheAttributes] operator[=] Keyword[this] operator[SEP] identifier[cacheKeyAttributes] operator[SEP] } Keyword[else] { identifier[cacheAttributes] operator[=] Keyword[this] operator[SEP] identifier[defaultAttributeNameSet] operator[SEP] } Keyword[final] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] identifier[cacheKey] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] identifier[cacheAttributes] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[attr] operator[:] identifier[cacheAttributes] operator[SEP] { Keyword[if] operator[SEP] identifier[seed] operator[SEP] identifier[containsKey] operator[SEP] identifier[attr] operator[SEP] operator[SEP] { Keyword[final] identifier[Object] identifier[value] operator[=] identifier[seed] operator[SEP] identifier[get] operator[SEP] identifier[attr] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] Keyword[this] operator[SEP] identifier[ignoreEmptyAttributes] operator[SEP] { identifier[cacheKey] operator[SEP] identifier[put] operator[SEP] identifier[attr] , identifier[value] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[Collection] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[CollectionUtils] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] identifier[Collection] operator[<] operator[?] operator[>] operator[SEP] identifier[value] operator[SEP] operator[SEP] { identifier[cacheKey] operator[SEP] identifier[put] operator[SEP] identifier[attr] , identifier[value] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[String] operator[SEP] { Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isNotEmpty] operator[SEP] operator[SEP] identifier[String] operator[SEP] identifier[value] operator[SEP] operator[SEP] { identifier[cacheKey] operator[SEP] identifier[put] operator[SEP] identifier[attr] , identifier[value] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[value] operator[!=] Other[null] operator[SEP] { identifier[cacheKey] operator[SEP] identifier[put] operator[SEP] identifier[attr] , identifier[value] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[logger] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[cacheKey] operator[+] literal[String] operator[+] identifier[seed] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[cacheKey] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[return] identifier[cacheKey] operator[SEP] identifier[hashCode] operator[SEP] operator[SEP] operator[SEP] }
public static void checkArgument(boolean b, String message, Object... args) { if (!b) { throwEx(message, args); } }
class class_name[name] begin[{] method[checkArgument, return_type[void], modifier[public static], parameter[b, message, args]] begin[{] if[member[.b]] begin[{] call[.throwEx, parameter[member[.message], member[.args]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[checkArgument] operator[SEP] Keyword[boolean] identifier[b] , identifier[String] identifier[message] , identifier[Object] operator[...] identifier[args] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[b] operator[SEP] { identifier[throwEx] operator[SEP] identifier[message] , identifier[args] operator[SEP] operator[SEP] } }
private static MethodRef getSetOrAddMethod(FieldDescriptor descriptor) { TypeInfo builder = builderRuntimeType(descriptor.getContainingType()); String prefix = descriptor.isRepeated() ? "add" : "set"; boolean isProto3EnumField = isProto3EnumField(descriptor); String suffix = isProto3EnumField ? "Value" : ""; return MethodRef.createInstanceMethod( builder, new Method( prefix + getFieldName(descriptor, true) + suffix, builder.type(), new Type[] {isProto3EnumField ? Type.INT_TYPE : getRuntimeType(descriptor)})) .asNonNullable(); }
class class_name[name] begin[{] method[getSetOrAddMethod, return_type[type[MethodRef]], modifier[private static], parameter[descriptor]] begin[{] local_variable[type[TypeInfo], builder] local_variable[type[String], prefix] local_variable[type[boolean], isProto3EnumField] local_variable[type[String], suffix] return[call[MethodRef.createInstanceMethod, parameter[member[.builder], ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=prefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[MemberReference(member=descriptor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=getFieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+), operandr=MemberReference(member=suffix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MethodInvocation(arguments=[], member=type, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[TernaryExpression(condition=MemberReference(member=isProto3EnumField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=MethodInvocation(arguments=[MemberReference(member=descriptor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getRuntimeType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), if_true=MemberReference(member=INT_TYPE, postfix_operators=[], prefix_operators=[], qualifier=Type, selectors=[]))]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Type, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Method, sub_type=None))]]] end[}] END[}]
Keyword[private] Keyword[static] identifier[MethodRef] identifier[getSetOrAddMethod] operator[SEP] identifier[FieldDescriptor] identifier[descriptor] operator[SEP] { identifier[TypeInfo] identifier[builder] operator[=] identifier[builderRuntimeType] operator[SEP] identifier[descriptor] operator[SEP] identifier[getContainingType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[prefix] operator[=] identifier[descriptor] operator[SEP] identifier[isRepeated] operator[SEP] operator[SEP] operator[?] literal[String] operator[:] literal[String] operator[SEP] Keyword[boolean] identifier[isProto3EnumField] operator[=] identifier[isProto3EnumField] operator[SEP] identifier[descriptor] operator[SEP] operator[SEP] identifier[String] identifier[suffix] operator[=] identifier[isProto3EnumField] operator[?] literal[String] operator[:] literal[String] operator[SEP] Keyword[return] identifier[MethodRef] operator[SEP] identifier[createInstanceMethod] operator[SEP] identifier[builder] , Keyword[new] identifier[Method] operator[SEP] identifier[prefix] operator[+] identifier[getFieldName] operator[SEP] identifier[descriptor] , literal[boolean] operator[SEP] operator[+] identifier[suffix] , identifier[builder] operator[SEP] identifier[type] operator[SEP] operator[SEP] , Keyword[new] identifier[Type] operator[SEP] operator[SEP] { identifier[isProto3EnumField] operator[?] identifier[Type] operator[SEP] identifier[INT_TYPE] operator[:] identifier[getRuntimeType] operator[SEP] identifier[descriptor] operator[SEP] } operator[SEP] operator[SEP] operator[SEP] identifier[asNonNullable] operator[SEP] operator[SEP] operator[SEP] }
public static InternalLogApi getLog(Class<?> clazz) { return factoryConfigured ? factory.doGetLog(clazz) : new InternalLog(clazz.getName()); // will look up actual logger per log }
class class_name[name] begin[{] method[getLog, return_type[type[InternalLogApi]], modifier[public static], parameter[clazz]] begin[{] return[TernaryExpression(condition=MemberReference(member=factoryConfigured, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=clazz, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InternalLog, sub_type=None)), if_true=MethodInvocation(arguments=[MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=doGetLog, postfix_operators=[], prefix_operators=[], qualifier=factory, selectors=[], type_arguments=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[InternalLogApi] identifier[getLog] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[SEP] { Keyword[return] identifier[factoryConfigured] operator[?] identifier[factory] operator[SEP] identifier[doGetLog] operator[SEP] identifier[clazz] operator[SEP] operator[:] Keyword[new] identifier[InternalLog] operator[SEP] identifier[clazz] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
protected void processForwardConfig( HttpServletRequest request, HttpServletResponse response, ForwardConfig fwd ) throws IOException, ServletException { ServletContext servletContext = getServletContext(); ForwardRedirectHandler fwdRedirectHandler = _handlers.getForwardRedirectHandler(); FlowController fc = PageFlowRequestWrapper.get( request ).getCurrentFlowController(); FlowControllerHandlerContext context = new FlowControllerHandlerContext( request, response, fc ); // Register this module as the one that's handling the action. if ( fc != null ) { InternalUtils.setForwardingModule( request, fc.getModulePath() ); } // // The following is similar to what's in super.processForwardConfig(), but it avoids putting // a slash in front of absolute URLs (e.g., ones that start with "http:"). // if ( fwd != null ) { if ( LOG.isDebugEnabled() ) LOG.debug( "processForwardConfig(" + fwd + ')' ); // // Try to process a tiles definition. If the forward doesn't contain a // a tiles definition, continue on. // if ( processTilesDefinition( fwd.getPath(), fwd.getContextRelative(), request, response ) ) { if ( log.isDebugEnabled() ) { log.debug( " '" + fwd.getPath() + "' - processed as definition" ); } return; } // // If this is a "special" page flow forward, create a Forward to handle it and pass // it to the current page flow. This should only happen when processValidate() // calls this method (or if a plain Struts action forwards to this forward) -- // otherwise, the page flow should be using a Forward already. // if ( fwd instanceof PageFlowActionForward ) { ActionMapping mapping = ( ActionMapping ) request.getAttribute( Globals.MAPPING_KEY ); assert mapping != null; ActionForm form = InternalUtils.getFormBean( mapping, request ); Forward pfFwd = new Forward( ( ActionForward ) fwd, servletContext ); ActionForwardHandler handler = _handlers.getActionForwardHandler(); fwd = handler.processForward( context, pfFwd, mapping, null, InternalUtils.getActionName( mapping ), null, form ); } String path = fwd.getPath(); boolean startsWithSlash = path.length() > 0 && path.charAt( 0 ) == '/'; // // If the URI is absolute (e.g., starts with "http:"), do a redirect to it no matter what. // if ( FileUtils.isAbsoluteURI( path ) ) { fwdRedirectHandler.redirect( context, addScopeParams( path, request ) ); } else if ( fwd.getRedirect() ) { String redirectURI; if ( startsWithSlash && fwd instanceof Forward && ( ( Forward ) fwd ).isExplicitPath() ) { redirectURI = path; } else if ( fwd instanceof Forward && ( ( Forward ) fwd ).isExternalRedirect() ) { assert startsWithSlash : path; // compiler should ensure path starts with '/' redirectURI = path; } else { redirectURI = request.getContextPath() + RequestUtils.forwardURL( request, fwd ); } fwdRedirectHandler.redirect( context, addScopeParams( redirectURI, request ) ); } else { String fwdURI; if ( startsWithSlash && fwd instanceof Forward && ( ( Forward ) fwd ).isExplicitPath() ) { fwdURI = path; } else { fwdURI = RequestUtils.forwardURL( request, fwd ); // // First, see if the current module is a Shared Flow module. If so, unless this is a forward to // another action in the shared flow, we need to translate the local path so it makes sense (strip // off the shared flow module prefix "/-" and replace it with "/"). // ModuleConfig mc = ( ModuleConfig ) request.getAttribute( Globals.MODULE_KEY ); if ( InternalUtils.isSharedFlowModule( mc ) && ! fwdURI.endsWith( ACTION_EXTENSION ) && fwdURI.startsWith( SHARED_FLOW_MODULE_PREFIX ) ) { fwdURI = '/' + fwdURI.substring( SHARED_FLOW_MODULE_PREFIX_LEN ); } } doForward( fwdURI, request, response ); } } }
class class_name[name] begin[{] method[processForwardConfig, return_type[void], modifier[protected], parameter[request, response, fwd]] begin[{] local_variable[type[ServletContext], servletContext] local_variable[type[ForwardRedirectHandler], fwdRedirectHandler] local_variable[type[FlowController], fc] local_variable[type[FlowControllerHandlerContext], context] if[binary_operation[member[.fc], !=, literal[null]]] begin[{] call[InternalUtils.setForwardingModule, parameter[member[.request], call[fc.getModulePath, parameter[]]]] else begin[{] None end[}] if[binary_operation[member[.fwd], !=, literal[null]]] begin[{] if[call[LOG.isDebugEnabled, parameter[]]] begin[{] call[LOG.debug, parameter[binary_operation[binary_operation[literal["processForwardConfig("], +, member[.fwd]], +, literal[')']]]] else begin[{] None end[}] if[call[.processTilesDefinition, parameter[call[fwd.getPath, parameter[]], call[fwd.getContextRelative, parameter[]], member[.request], member[.response]]]] begin[{] if[call[log.isDebugEnabled, parameter[]]] begin[{] call[log.debug, parameter[binary_operation[binary_operation[literal[" '"], +, call[fwd.getPath, parameter[]]], +, literal["' - processed as definition"]]]] else begin[{] None end[}] return[None] else begin[{] None end[}] if[binary_operation[member[.fwd], instanceof, type[PageFlowActionForward]]] begin[{] local_variable[type[ActionMapping], mapping] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=mapping, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=None) local_variable[type[ActionForm], form] local_variable[type[Forward], pfFwd] local_variable[type[ActionForwardHandler], handler] assign[member[.fwd], call[handler.processForward, parameter[member[.context], member[.pfFwd], member[.mapping], literal[null], call[InternalUtils.getActionName, parameter[member[.mapping]]], literal[null], member[.form]]]] else begin[{] None end[}] local_variable[type[String], path] local_variable[type[boolean], startsWithSlash] if[call[FileUtils.isAbsoluteURI, parameter[member[.path]]]] begin[{] call[fwdRedirectHandler.redirect, parameter[member[.context], call[.addScopeParams, parameter[member[.path], member[.request]]]]] else begin[{] if[call[fwd.getRedirect, parameter[]]] begin[{] local_variable[type[String], redirectURI] if[binary_operation[binary_operation[member[.startsWithSlash], &&, binary_operation[member[.fwd], instanceof, type[Forward]]], &&, Cast(expression=MemberReference(member=fwd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Forward, sub_type=None))]] begin[{] assign[member[.redirectURI], member[.path]] else begin[{] if[binary_operation[binary_operation[member[.fwd], instanceof, type[Forward]], &&, Cast(expression=MemberReference(member=fwd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Forward, sub_type=None))]] begin[{] AssertStatement(condition=MemberReference(member=startsWithSlash, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None, value=MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])) assign[member[.redirectURI], member[.path]] else begin[{] assign[member[.redirectURI], binary_operation[call[request.getContextPath, parameter[]], +, call[RequestUtils.forwardURL, parameter[member[.request], member[.fwd]]]]] end[}] end[}] call[fwdRedirectHandler.redirect, parameter[member[.context], call[.addScopeParams, parameter[member[.redirectURI], member[.request]]]]] else begin[{] local_variable[type[String], fwdURI] if[binary_operation[binary_operation[member[.startsWithSlash], &&, binary_operation[member[.fwd], instanceof, type[Forward]]], &&, Cast(expression=MemberReference(member=fwd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Forward, sub_type=None))]] begin[{] assign[member[.fwdURI], member[.path]] else begin[{] assign[member[.fwdURI], call[RequestUtils.forwardURL, parameter[member[.request], member[.fwd]]]] local_variable[type[ModuleConfig], mc] if[binary_operation[binary_operation[call[InternalUtils.isSharedFlowModule, parameter[member[.mc]]], &&, call[fwdURI.endsWith, parameter[member[.ACTION_EXTENSION]]]], &&, call[fwdURI.startsWith, parameter[member[.SHARED_FLOW_MODULE_PREFIX]]]]] begin[{] assign[member[.fwdURI], binary_operation[literal['/'], +, call[fwdURI.substring, parameter[member[.SHARED_FLOW_MODULE_PREFIX_LEN]]]]] else begin[{] None end[}] end[}] call[.doForward, parameter[member[.fwdURI], member[.request], member[.response]]] end[}] end[}] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[processForwardConfig] operator[SEP] identifier[HttpServletRequest] identifier[request] , identifier[HttpServletResponse] identifier[response] , identifier[ForwardConfig] identifier[fwd] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ServletException] { identifier[ServletContext] identifier[servletContext] operator[=] identifier[getServletContext] operator[SEP] operator[SEP] operator[SEP] identifier[ForwardRedirectHandler] identifier[fwdRedirectHandler] operator[=] identifier[_handlers] operator[SEP] identifier[getForwardRedirectHandler] operator[SEP] operator[SEP] operator[SEP] identifier[FlowController] identifier[fc] operator[=] identifier[PageFlowRequestWrapper] operator[SEP] identifier[get] operator[SEP] identifier[request] operator[SEP] operator[SEP] identifier[getCurrentFlowController] operator[SEP] operator[SEP] operator[SEP] identifier[FlowControllerHandlerContext] identifier[context] operator[=] Keyword[new] identifier[FlowControllerHandlerContext] operator[SEP] identifier[request] , identifier[response] , identifier[fc] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[fc] operator[!=] Other[null] operator[SEP] { identifier[InternalUtils] operator[SEP] identifier[setForwardingModule] operator[SEP] identifier[request] , identifier[fc] operator[SEP] identifier[getModulePath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[fwd] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[LOG] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[fwd] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[processTilesDefinition] operator[SEP] identifier[fwd] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] , identifier[fwd] operator[SEP] identifier[getContextRelative] operator[SEP] operator[SEP] , identifier[request] , identifier[response] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[fwd] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] } Keyword[if] operator[SEP] identifier[fwd] Keyword[instanceof] identifier[PageFlowActionForward] operator[SEP] { identifier[ActionMapping] identifier[mapping] operator[=] operator[SEP] identifier[ActionMapping] operator[SEP] identifier[request] operator[SEP] identifier[getAttribute] operator[SEP] identifier[Globals] operator[SEP] identifier[MAPPING_KEY] operator[SEP] operator[SEP] Keyword[assert] identifier[mapping] operator[!=] Other[null] operator[SEP] identifier[ActionForm] identifier[form] operator[=] identifier[InternalUtils] operator[SEP] identifier[getFormBean] operator[SEP] identifier[mapping] , identifier[request] operator[SEP] operator[SEP] identifier[Forward] identifier[pfFwd] operator[=] Keyword[new] identifier[Forward] operator[SEP] operator[SEP] identifier[ActionForward] operator[SEP] identifier[fwd] , identifier[servletContext] operator[SEP] operator[SEP] identifier[ActionForwardHandler] identifier[handler] operator[=] identifier[_handlers] operator[SEP] identifier[getActionForwardHandler] operator[SEP] operator[SEP] operator[SEP] identifier[fwd] operator[=] identifier[handler] operator[SEP] identifier[processForward] operator[SEP] identifier[context] , identifier[pfFwd] , identifier[mapping] , Other[null] , identifier[InternalUtils] operator[SEP] identifier[getActionName] operator[SEP] identifier[mapping] operator[SEP] , Other[null] , identifier[form] operator[SEP] operator[SEP] } identifier[String] identifier[path] operator[=] identifier[fwd] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[startsWithSlash] operator[=] identifier[path] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[&&] identifier[path] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[==] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[FileUtils] operator[SEP] identifier[isAbsoluteURI] operator[SEP] identifier[path] operator[SEP] operator[SEP] { identifier[fwdRedirectHandler] operator[SEP] identifier[redirect] operator[SEP] identifier[context] , identifier[addScopeParams] operator[SEP] identifier[path] , identifier[request] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[fwd] operator[SEP] identifier[getRedirect] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[redirectURI] operator[SEP] Keyword[if] operator[SEP] identifier[startsWithSlash] operator[&&] identifier[fwd] Keyword[instanceof] identifier[Forward] operator[&&] operator[SEP] operator[SEP] identifier[Forward] operator[SEP] identifier[fwd] operator[SEP] operator[SEP] identifier[isExplicitPath] operator[SEP] operator[SEP] operator[SEP] { identifier[redirectURI] operator[=] identifier[path] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[fwd] Keyword[instanceof] identifier[Forward] operator[&&] operator[SEP] operator[SEP] identifier[Forward] operator[SEP] identifier[fwd] operator[SEP] operator[SEP] identifier[isExternalRedirect] operator[SEP] operator[SEP] operator[SEP] { Keyword[assert] identifier[startsWithSlash] operator[:] identifier[path] operator[SEP] identifier[redirectURI] operator[=] identifier[path] operator[SEP] } Keyword[else] { identifier[redirectURI] operator[=] identifier[request] operator[SEP] identifier[getContextPath] operator[SEP] operator[SEP] operator[+] identifier[RequestUtils] operator[SEP] identifier[forwardURL] operator[SEP] identifier[request] , identifier[fwd] operator[SEP] operator[SEP] } identifier[fwdRedirectHandler] operator[SEP] identifier[redirect] operator[SEP] identifier[context] , identifier[addScopeParams] operator[SEP] identifier[redirectURI] , identifier[request] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[String] identifier[fwdURI] operator[SEP] Keyword[if] operator[SEP] identifier[startsWithSlash] operator[&&] identifier[fwd] Keyword[instanceof] identifier[Forward] operator[&&] operator[SEP] operator[SEP] identifier[Forward] operator[SEP] identifier[fwd] operator[SEP] operator[SEP] identifier[isExplicitPath] operator[SEP] operator[SEP] operator[SEP] { identifier[fwdURI] operator[=] identifier[path] operator[SEP] } Keyword[else] { identifier[fwdURI] operator[=] identifier[RequestUtils] operator[SEP] identifier[forwardURL] operator[SEP] identifier[request] , identifier[fwd] operator[SEP] operator[SEP] identifier[ModuleConfig] identifier[mc] operator[=] operator[SEP] identifier[ModuleConfig] operator[SEP] identifier[request] operator[SEP] identifier[getAttribute] operator[SEP] identifier[Globals] operator[SEP] identifier[MODULE_KEY] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[InternalUtils] operator[SEP] identifier[isSharedFlowModule] operator[SEP] identifier[mc] operator[SEP] operator[&&] operator[!] identifier[fwdURI] operator[SEP] identifier[endsWith] operator[SEP] identifier[ACTION_EXTENSION] operator[SEP] operator[&&] identifier[fwdURI] operator[SEP] identifier[startsWith] operator[SEP] identifier[SHARED_FLOW_MODULE_PREFIX] operator[SEP] operator[SEP] { identifier[fwdURI] operator[=] literal[String] operator[+] identifier[fwdURI] operator[SEP] identifier[substring] operator[SEP] identifier[SHARED_FLOW_MODULE_PREFIX_LEN] operator[SEP] operator[SEP] } } identifier[doForward] operator[SEP] identifier[fwdURI] , identifier[request] , identifier[response] operator[SEP] operator[SEP] } } }
private void mapFormContainerStatesTo( Form previousMappedForm, ResultSet resultSetParam ) throws SQLException { if(previousMappedForm == null) { return; } //Form Container State... Long formContainerState = resultSetParam.getLong( SQLColumnIndex._07_FORM_CONTAINER_STATE); long formContStateId = (formContainerState == null) ? 0: formContainerState.longValue(); if(formContStateId > 0) { if(formContStateId == 1) { previousMappedForm.setState(Form.State.OPEN); } else if(formContStateId == 2) { previousMappedForm.setState(Form.State.LOCKED); } } Long formContainerFlowState = resultSetParam.getLong( SQLColumnIndex._08_FORM_CONTAINER_FLOW_STATE); long formContFlowStateId = (formContainerFlowState == null) ? 0: formContainerFlowState.longValue(); if(formContFlowStateId > 0) { if(formContFlowStateId == 1) { previousMappedForm.setFlowState( FluidItem.FlowState.NotInFlow.name()); } else if(formContFlowStateId == 2) { previousMappedForm.setFlowState( FluidItem.FlowState.WorkInProgress.name()); } else if(formContFlowStateId == 3) { previousMappedForm.setFlowState( FluidItem.FlowState.UserSend.name()); } else if(formContFlowStateId == 4) { previousMappedForm.setFlowState( FluidItem.FlowState.UserSendWorkInProgress.name()); } else if(formContFlowStateId == 5) { previousMappedForm.setFlowState(FluidItem.FlowState.Archive.name()); } } }
class class_name[name] begin[{] method[mapFormContainerStatesTo, return_type[void], modifier[private], parameter[previousMappedForm, resultSetParam]] begin[{] if[binary_operation[member[.previousMappedForm], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[Long], formContainerState] local_variable[type[long], formContStateId] if[binary_operation[member[.formContStateId], >, literal[0]]] begin[{] if[binary_operation[member[.formContStateId], ==, literal[1]]] begin[{] call[previousMappedForm.setState, parameter[member[Form.State.OPEN]]] else begin[{] if[binary_operation[member[.formContStateId], ==, literal[2]]] begin[{] call[previousMappedForm.setState, parameter[member[Form.State.LOCKED]]] else begin[{] None end[}] end[}] else begin[{] None end[}] local_variable[type[Long], formContainerFlowState] local_variable[type[long], formContFlowStateId] if[binary_operation[member[.formContFlowStateId], >, literal[0]]] begin[{] if[binary_operation[member[.formContFlowStateId], ==, literal[1]]] begin[{] call[previousMappedForm.setFlowState, parameter[call[FluidItem.FlowState.NotInFlow.name, parameter[]]]] else begin[{] if[binary_operation[member[.formContFlowStateId], ==, literal[2]]] begin[{] call[previousMappedForm.setFlowState, parameter[call[FluidItem.FlowState.WorkInProgress.name, parameter[]]]] else begin[{] if[binary_operation[member[.formContFlowStateId], ==, literal[3]]] begin[{] call[previousMappedForm.setFlowState, parameter[call[FluidItem.FlowState.UserSend.name, parameter[]]]] else begin[{] if[binary_operation[member[.formContFlowStateId], ==, literal[4]]] begin[{] call[previousMappedForm.setFlowState, parameter[call[FluidItem.FlowState.UserSendWorkInProgress.name, parameter[]]]] else begin[{] if[binary_operation[member[.formContFlowStateId], ==, literal[5]]] begin[{] call[previousMappedForm.setFlowState, parameter[call[FluidItem.FlowState.Archive.name, parameter[]]]] else begin[{] None end[}] end[}] end[}] end[}] end[}] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[mapFormContainerStatesTo] operator[SEP] identifier[Form] identifier[previousMappedForm] , identifier[ResultSet] identifier[resultSetParam] operator[SEP] Keyword[throws] identifier[SQLException] { Keyword[if] operator[SEP] identifier[previousMappedForm] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } identifier[Long] identifier[formContainerState] operator[=] identifier[resultSetParam] operator[SEP] identifier[getLong] operator[SEP] identifier[SQLColumnIndex] operator[SEP] identifier[_07_FORM_CONTAINER_STATE] operator[SEP] operator[SEP] Keyword[long] identifier[formContStateId] operator[=] operator[SEP] identifier[formContainerState] operator[==] Other[null] operator[SEP] operator[?] Other[0] operator[:] identifier[formContainerState] operator[SEP] identifier[longValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[formContStateId] operator[>] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[formContStateId] operator[==] Other[1] operator[SEP] { identifier[previousMappedForm] operator[SEP] identifier[setState] operator[SEP] identifier[Form] operator[SEP] identifier[State] operator[SEP] identifier[OPEN] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[formContStateId] operator[==] Other[2] operator[SEP] { identifier[previousMappedForm] operator[SEP] identifier[setState] operator[SEP] identifier[Form] operator[SEP] identifier[State] operator[SEP] identifier[LOCKED] operator[SEP] operator[SEP] } } identifier[Long] identifier[formContainerFlowState] operator[=] identifier[resultSetParam] operator[SEP] identifier[getLong] operator[SEP] identifier[SQLColumnIndex] operator[SEP] identifier[_08_FORM_CONTAINER_FLOW_STATE] operator[SEP] operator[SEP] Keyword[long] identifier[formContFlowStateId] operator[=] operator[SEP] identifier[formContainerFlowState] operator[==] Other[null] operator[SEP] operator[?] Other[0] operator[:] identifier[formContainerFlowState] operator[SEP] identifier[longValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[formContFlowStateId] operator[>] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[formContFlowStateId] operator[==] Other[1] operator[SEP] { identifier[previousMappedForm] operator[SEP] identifier[setFlowState] operator[SEP] identifier[FluidItem] operator[SEP] identifier[FlowState] operator[SEP] identifier[NotInFlow] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[formContFlowStateId] operator[==] Other[2] operator[SEP] { identifier[previousMappedForm] operator[SEP] identifier[setFlowState] operator[SEP] identifier[FluidItem] operator[SEP] identifier[FlowState] operator[SEP] identifier[WorkInProgress] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[formContFlowStateId] operator[==] Other[3] operator[SEP] { identifier[previousMappedForm] operator[SEP] identifier[setFlowState] operator[SEP] identifier[FluidItem] operator[SEP] identifier[FlowState] operator[SEP] identifier[UserSend] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[formContFlowStateId] operator[==] Other[4] operator[SEP] { identifier[previousMappedForm] operator[SEP] identifier[setFlowState] operator[SEP] identifier[FluidItem] operator[SEP] identifier[FlowState] operator[SEP] identifier[UserSendWorkInProgress] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[formContFlowStateId] operator[==] Other[5] operator[SEP] { identifier[previousMappedForm] operator[SEP] identifier[setFlowState] operator[SEP] identifier[FluidItem] operator[SEP] identifier[FlowState] operator[SEP] identifier[Archive] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } }
synchronized void refresh(RollingSegmentHandle source) { Preconditions.checkArgument(source.getSegmentName().equals(this.getSegmentName()), "SegmentName mismatch."); if (this.readOnly == source.readOnly) { // Update the header handle, but only if both this handle and the source one have the same read-only flag. // Otherwise we risk attaching a read-only header handle to a read-write handle or vice-versa. this.headerHandle = source.headerHandle; } this.segmentChunks = new ArrayList<>(source.chunks()); setHeaderLength(source.getHeaderLength()); if (source.isSealed()) { markSealed(); } if (source.isDeleted()) { markDeleted(); } }
class class_name[name] begin[{] method[refresh, return_type[void], modifier[synchronized], parameter[source]] begin[{] call[Preconditions.checkArgument, parameter[call[source.getSegmentName, parameter[]], literal["SegmentName mismatch."]]] if[binary_operation[THIS[member[None.readOnly]], ==, member[source.readOnly]]] begin[{] assign[THIS[member[None.headerHandle]], member[source.headerHandle]] else begin[{] None end[}] assign[THIS[member[None.segmentChunks]], ClassCreator(arguments=[MethodInvocation(arguments=[], member=chunks, postfix_operators=[], prefix_operators=[], qualifier=source, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None))] call[.setHeaderLength, parameter[call[source.getHeaderLength, parameter[]]]] if[call[source.isSealed, parameter[]]] begin[{] call[.markSealed, parameter[]] else begin[{] None end[}] if[call[source.isDeleted, parameter[]]] begin[{] call[.markDeleted, parameter[]] else begin[{] None end[}] end[}] END[}]
Keyword[synchronized] Keyword[void] identifier[refresh] operator[SEP] identifier[RollingSegmentHandle] identifier[source] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] identifier[source] operator[SEP] identifier[getSegmentName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] Keyword[this] operator[SEP] identifier[getSegmentName] operator[SEP] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[readOnly] operator[==] identifier[source] operator[SEP] identifier[readOnly] operator[SEP] { Keyword[this] operator[SEP] identifier[headerHandle] operator[=] identifier[source] operator[SEP] identifier[headerHandle] operator[SEP] } Keyword[this] operator[SEP] identifier[segmentChunks] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[source] operator[SEP] identifier[chunks] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setHeaderLength] operator[SEP] identifier[source] operator[SEP] identifier[getHeaderLength] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[source] operator[SEP] identifier[isSealed] operator[SEP] operator[SEP] operator[SEP] { identifier[markSealed] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[source] operator[SEP] identifier[isDeleted] operator[SEP] operator[SEP] operator[SEP] { identifier[markDeleted] operator[SEP] operator[SEP] operator[SEP] } }
public Vector2i mul(int scalar, Vector2i dest) { dest.x = x * scalar; dest.y = y * scalar; return dest; }
class class_name[name] begin[{] method[mul, return_type[type[Vector2i]], modifier[public], parameter[scalar, dest]] begin[{] assign[member[dest.x], binary_operation[member[.x], *, member[.scalar]]] assign[member[dest.y], binary_operation[member[.y], *, member[.scalar]]] return[member[.dest]] end[}] END[}]
Keyword[public] identifier[Vector2i] identifier[mul] operator[SEP] Keyword[int] identifier[scalar] , identifier[Vector2i] identifier[dest] operator[SEP] { identifier[dest] operator[SEP] identifier[x] operator[=] identifier[x] operator[*] identifier[scalar] operator[SEP] identifier[dest] operator[SEP] identifier[y] operator[=] identifier[y] operator[*] identifier[scalar] operator[SEP] Keyword[return] identifier[dest] operator[SEP] }
@Override public ConsumerManager chooseConsumerManager(SIBUuid12 gatheringTargetUuid, SIBUuid8 fixedMEUuid, HashSet<SIBUuid8> scopedMEs) throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "chooseConsumerManager", new Object[] { gatheringTargetUuid, fixedMEUuid, scopedMEs }); // We're an alias (or foreign destination) so we should never be called with a scoped ME set if (scopedMEs != null) { SIMPErrorException e = new SIMPErrorException("Alias called with scoped ME set"); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.exception(tc, e); } e.setExceptionReason(SIRCConstants.SIRC0901_INTERNAL_MESSAGING_ERROR); e.setExceptionInserts(new String[] { "com.ibm.ws.sib.processor.impl.ProducerSessionImpl.handleMessage", "1:837:1.71.2.6", SIMPUtils.getStackTrace(e) }); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "chooseConsumerManager", e); throw e; } boolean error = false; ConsumerManager consumerManager = null; // If the caller has fixed an ME, first check it's in our set if (fixedMEUuid != null) { if ((_singleScopedQueuePointME != null) && !fixedMEUuid.equals(_singleScopedQueuePointME)) error = true; else if ((_scopedQueuePointMEs != null) && !_scopedQueuePointMEs.contains(fixedMEUuid)) error = true; } if (!error) { // If we have a single ME scoped by this alias we may as well pass it to the target as // a fixed ME (which it must match as we've already checked that) to save // having to parse a HashSet everywhere for no need. if (_singleScopedQueuePointME != null) fixedMEUuid = _singleScopedQueuePointME; // If a gatheringUuid was supplied, replace it with the alias uuid if (gatheringTargetUuid != null) gatheringTargetUuid = _definition.getUUID(); // Pass on any scoped queue points (this is a consumer on an alias) consumerManager = _targetDestinationHandler.chooseConsumerManager(gatheringTargetUuid, fixedMEUuid, _scopedQueuePointMEs); } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "chooseConsumerManager", consumerManager); return consumerManager; }
class class_name[name] begin[{] method[chooseConsumerManager, return_type[type[ConsumerManager]], modifier[public], parameter[gatheringTargetUuid, fixedMEUuid, scopedMEs]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["chooseConsumerManager"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=gatheringTargetUuid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fixedMEUuid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=scopedMEs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]] else begin[{] None end[}] if[binary_operation[member[.scopedMEs], !=, literal[null]]] begin[{] local_variable[type[SIMPErrorException], e] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exception, parameter[member[.tc], member[.e]]] else begin[{] None end[}] call[e.setExceptionReason, parameter[member[SIRCConstants.SIRC0901_INTERNAL_MESSAGING_ERROR]]] call[e.setExceptionInserts, parameter[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ws.sib.processor.impl.ProducerSessionImpl.handleMessage"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1:837:1.71.2.6"), MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getStackTrace, postfix_operators=[], prefix_operators=[], qualifier=SIMPUtils, selectors=[], type_arguments=None)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))]] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["chooseConsumerManager"], member[.e]]] else begin[{] None end[}] ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) else begin[{] None end[}] local_variable[type[boolean], error] local_variable[type[ConsumerManager], consumerManager] if[binary_operation[member[.fixedMEUuid], !=, literal[null]]] begin[{] if[binary_operation[binary_operation[member[._singleScopedQueuePointME], !=, literal[null]], &&, call[fixedMEUuid.equals, parameter[member[._singleScopedQueuePointME]]]]] begin[{] assign[member[.error], literal[true]] else begin[{] if[binary_operation[binary_operation[member[._scopedQueuePointMEs], !=, literal[null]], &&, call[_scopedQueuePointMEs.contains, parameter[member[.fixedMEUuid]]]]] begin[{] assign[member[.error], literal[true]] else begin[{] None end[}] end[}] else begin[{] None end[}] if[member[.error]] begin[{] if[binary_operation[member[._singleScopedQueuePointME], !=, literal[null]]] begin[{] assign[member[.fixedMEUuid], member[._singleScopedQueuePointME]] else begin[{] None end[}] if[binary_operation[member[.gatheringTargetUuid], !=, literal[null]]] begin[{] assign[member[.gatheringTargetUuid], call[_definition.getUUID, parameter[]]] else begin[{] None end[}] assign[member[.consumerManager], call[_targetDestinationHandler.chooseConsumerManager, parameter[member[.gatheringTargetUuid], member[.fixedMEUuid], member[._scopedQueuePointMEs]]]] else begin[{] None end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["chooseConsumerManager"], member[.consumerManager]]] else begin[{] None end[}] return[member[.consumerManager]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ConsumerManager] identifier[chooseConsumerManager] operator[SEP] identifier[SIBUuid12] identifier[gatheringTargetUuid] , identifier[SIBUuid8] identifier[fixedMEUuid] , identifier[HashSet] operator[<] identifier[SIBUuid8] operator[>] identifier[scopedMEs] operator[SEP] Keyword[throws] identifier[SIResourceException] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[gatheringTargetUuid] , identifier[fixedMEUuid] , identifier[scopedMEs] } operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[scopedMEs] operator[!=] Other[null] operator[SEP] { identifier[SIMPErrorException] identifier[e] operator[=] Keyword[new] identifier[SIMPErrorException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[SibTr] operator[SEP] identifier[exception] operator[SEP] identifier[tc] , identifier[e] operator[SEP] operator[SEP] } identifier[e] operator[SEP] identifier[setExceptionReason] operator[SEP] identifier[SIRCConstants] operator[SEP] identifier[SIRC0901_INTERNAL_MESSAGING_ERROR] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[setExceptionInserts] operator[SEP] Keyword[new] identifier[String] operator[SEP] operator[SEP] { literal[String] , literal[String] , identifier[SIMPUtils] operator[SEP] identifier[getStackTrace] operator[SEP] identifier[e] operator[SEP] } operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] identifier[e] operator[SEP] } Keyword[boolean] identifier[error] operator[=] literal[boolean] operator[SEP] identifier[ConsumerManager] identifier[consumerManager] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[fixedMEUuid] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[_singleScopedQueuePointME] operator[!=] Other[null] operator[SEP] operator[&&] operator[!] identifier[fixedMEUuid] operator[SEP] identifier[equals] operator[SEP] identifier[_singleScopedQueuePointME] operator[SEP] operator[SEP] identifier[error] operator[=] literal[boolean] operator[SEP] Keyword[else] Keyword[if] operator[SEP] operator[SEP] identifier[_scopedQueuePointMEs] operator[!=] Other[null] operator[SEP] operator[&&] operator[!] identifier[_scopedQueuePointMEs] operator[SEP] identifier[contains] operator[SEP] identifier[fixedMEUuid] operator[SEP] operator[SEP] identifier[error] operator[=] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[error] operator[SEP] { Keyword[if] operator[SEP] identifier[_singleScopedQueuePointME] operator[!=] Other[null] operator[SEP] identifier[fixedMEUuid] operator[=] identifier[_singleScopedQueuePointME] operator[SEP] Keyword[if] operator[SEP] identifier[gatheringTargetUuid] operator[!=] Other[null] operator[SEP] identifier[gatheringTargetUuid] operator[=] identifier[_definition] operator[SEP] identifier[getUUID] operator[SEP] operator[SEP] operator[SEP] identifier[consumerManager] operator[=] identifier[_targetDestinationHandler] operator[SEP] identifier[chooseConsumerManager] operator[SEP] identifier[gatheringTargetUuid] , identifier[fixedMEUuid] , identifier[_scopedQueuePointMEs] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , identifier[consumerManager] operator[SEP] operator[SEP] Keyword[return] identifier[consumerManager] operator[SEP] }
public static boolean log(Level level, Throwable t, String format, Object... arguments) { return log(LogFactory.get(CallerUtil.getCallerCaller()), level, t, format, arguments); }
class class_name[name] begin[{] method[log, return_type[type[boolean]], modifier[public static], parameter[level, t, format, arguments]] begin[{] return[call[.log, parameter[call[LogFactory.get, parameter[call[CallerUtil.getCallerCaller, parameter[]]]], member[.level], member[.t], member[.format], member[.arguments]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[log] operator[SEP] identifier[Level] identifier[level] , identifier[Throwable] identifier[t] , identifier[String] identifier[format] , identifier[Object] operator[...] identifier[arguments] operator[SEP] { Keyword[return] identifier[log] operator[SEP] identifier[LogFactory] operator[SEP] identifier[get] operator[SEP] identifier[CallerUtil] operator[SEP] identifier[getCallerCaller] operator[SEP] operator[SEP] operator[SEP] , identifier[level] , identifier[t] , identifier[format] , identifier[arguments] operator[SEP] operator[SEP] }
public boolean checkTimeframeArg(String timeframe) { if (Pattern.compile("\\d*(d|h)", Pattern.CASE_INSENSITIVE).matcher(timeframe).matches()) { return true; } else { return false; } }
class class_name[name] begin[{] method[checkTimeframeArg, return_type[type[boolean]], modifier[public], parameter[timeframe]] begin[{] if[call[Pattern.compile, parameter[literal["\\d*(d|h)"], member[Pattern.CASE_INSENSITIVE]]]] begin[{] return[literal[true]] else begin[{] return[literal[false]] end[}] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[checkTimeframeArg] operator[SEP] identifier[String] identifier[timeframe] operator[SEP] { Keyword[if] operator[SEP] identifier[Pattern] operator[SEP] identifier[compile] operator[SEP] literal[String] , identifier[Pattern] operator[SEP] identifier[CASE_INSENSITIVE] operator[SEP] operator[SEP] identifier[matcher] operator[SEP] identifier[timeframe] operator[SEP] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { Keyword[return] literal[boolean] operator[SEP] } }
@Override public void init (Injector injector) throws Exception { super.init(injector); // configure the client manager to use our bits _clmgr.setDefaultSessionFactory(new SessionFactory() { @Override public Class<? extends PresentsSession> getSessionClass (AuthRequest areq) { return CrowdSession.class; } @Override public Class<? extends ClientResolver> getClientResolverClass (Name username) { return CrowdClientResolver.class; } }); }
class class_name[name] begin[{] method[init, return_type[void], modifier[public], parameter[injector]] begin[{] SuperMethodInvocation(arguments=[MemberReference(member=injector, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=init, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) call[_clmgr.setDefaultSessionFactory, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CrowdSession, sub_type=None)), label=None)], documentation=None, modifiers={'public'}, name=getSessionClass, parameters=[FormalParameter(annotations=[], modifiers=set(), name=areq, type=ReferenceType(arguments=None, dimensions=[], name=AuthRequest, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=[TypeArgument(pattern_type=extends, type=ReferenceType(arguments=None, dimensions=[], name=PresentsSession, sub_type=None))], dimensions=[], name=Class, sub_type=None), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CrowdClientResolver, sub_type=None)), label=None)], documentation=None, modifiers={'public'}, name=getClientResolverClass, parameters=[FormalParameter(annotations=[], modifiers=set(), name=username, type=ReferenceType(arguments=None, dimensions=[], name=Name, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=[TypeArgument(pattern_type=extends, type=ReferenceType(arguments=None, dimensions=[], name=ClientResolver, sub_type=None))], dimensions=[], name=Class, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SessionFactory, sub_type=None))]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[init] operator[SEP] identifier[Injector] identifier[injector] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[super] operator[SEP] identifier[init] operator[SEP] identifier[injector] operator[SEP] operator[SEP] identifier[_clmgr] operator[SEP] identifier[setDefaultSessionFactory] operator[SEP] Keyword[new] identifier[SessionFactory] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[PresentsSession] operator[>] identifier[getSessionClass] operator[SEP] identifier[AuthRequest] identifier[areq] operator[SEP] { Keyword[return] identifier[CrowdSession] operator[SEP] Keyword[class] operator[SEP] } annotation[@] identifier[Override] Keyword[public] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[ClientResolver] operator[>] identifier[getClientResolverClass] operator[SEP] identifier[Name] identifier[username] operator[SEP] { Keyword[return] identifier[CrowdClientResolver] operator[SEP] Keyword[class] operator[SEP] } } operator[SEP] operator[SEP] }
public void writeString(String value) throws UnsupportedEncodingException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "writeString", value); getBodyList().add(value); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "writeString"); }
class class_name[name] begin[{] method[writeString, return_type[void], modifier[public], parameter[value]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[THIS[], member[.tc], literal["writeString"], member[.value]]] else begin[{] None end[}] call[.getBodyList, parameter[]] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[THIS[], member[.tc], literal["writeString"]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[writeString] operator[SEP] identifier[String] identifier[value] operator[SEP] Keyword[throws] identifier[UnsupportedEncodingException] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] Keyword[this] , identifier[tc] , literal[String] , identifier[value] operator[SEP] operator[SEP] identifier[getBodyList] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[value] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] }
public static <T> T invokeSetters(final T instance, final Map<String,Object> vars) throws ReflectiveOperationException { if (instance != null && vars != null) { final Class<?> clazz = instance.getClass(); final Method[] methods = clazz.getMethods(); for (final Entry<String,Object> entry : vars.entrySet()) { final String methodName = "set" + entry.getKey().substring(0, 1).toUpperCase(Locale.US) + entry.getKey().substring(1); boolean found = false; for (final Method method : methods) { if (methodName.equals(method.getName()) && method.getParameterTypes().length == 1) { method.invoke(instance, entry.getValue()); found = true; break; } } if (!found) { throw new NoSuchMethodException("Expected setter named '" + methodName + "' for var '" + entry.getKey() + "'"); } } } return instance; }
class class_name[name] begin[{] method[invokeSetters, return_type[type[T]], modifier[public static], parameter[instance, vars]] begin[{] if[binary_operation[binary_operation[member[.instance], !=, literal[null]], &&, binary_operation[member[.vars], !=, literal[null]]]] begin[{] local_variable[type[Class], clazz] local_variable[type[Method], methods] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="set"), operandr=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=substring, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=US, postfix_operators=[], prefix_operators=[], qualifier=Locale, selectors=[])], member=toUpperCase, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=substring, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), name=methodName)], modifiers={'final'}, 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=false), name=found)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=[], qualifier=methodName, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getParameterTypes, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[MemberReference(member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator===), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=instance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=found, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=methods, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=method)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None))), label=None), IfStatement(condition=MemberReference(member=found, 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=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Expected setter named '"), operandr=MemberReference(member=methodName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' for var '"), operator=+), operandr=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NoSuchMethodException, sub_type=None)), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=vars, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=Entry, sub_type=None))), label=None) else begin[{] None end[}] return[member[.instance]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[invokeSetters] operator[SEP] Keyword[final] identifier[T] identifier[instance] , Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[vars] operator[SEP] Keyword[throws] identifier[ReflectiveOperationException] { Keyword[if] operator[SEP] identifier[instance] operator[!=] Other[null] operator[&&] identifier[vars] operator[!=] Other[null] operator[SEP] { Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[=] identifier[instance] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Method] operator[SEP] operator[SEP] identifier[methods] operator[=] identifier[clazz] operator[SEP] identifier[getMethods] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[Entry] operator[<] identifier[String] , identifier[Object] operator[>] identifier[entry] operator[:] identifier[vars] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[String] identifier[methodName] operator[=] literal[String] operator[+] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] identifier[substring] operator[SEP] Other[0] , Other[1] operator[SEP] operator[SEP] identifier[toUpperCase] operator[SEP] identifier[Locale] operator[SEP] identifier[US] operator[SEP] operator[+] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] identifier[substring] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[boolean] identifier[found] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[Method] identifier[method] operator[:] identifier[methods] operator[SEP] { Keyword[if] operator[SEP] identifier[methodName] operator[SEP] identifier[equals] operator[SEP] identifier[method] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[&&] identifier[method] operator[SEP] identifier[getParameterTypes] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[==] Other[1] operator[SEP] { identifier[method] operator[SEP] identifier[invoke] operator[SEP] identifier[instance] , identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[found] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] } } Keyword[if] operator[SEP] operator[!] identifier[found] operator[SEP] { Keyword[throw] Keyword[new] identifier[NoSuchMethodException] operator[SEP] literal[String] operator[+] identifier[methodName] operator[+] literal[String] operator[+] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } } } Keyword[return] identifier[instance] operator[SEP] }
public static HsqlProperties argArrayToProps(String[] arg, String type) { HsqlProperties props = new HsqlProperties(); for (int i = 0; i < arg.length; i++) { String p = arg[i]; if (p.equals("--help") || p.equals("-help")) { props.addError(NO_VALUE_FOR_KEY, p.substring(1)); } else if (p.startsWith("--")) { String value = i + 1 < arg.length ? arg[i + 1] : ""; props.setProperty(type + "." + p.substring(2), value); i++; } else if (p.charAt(0) == '-') { String value = i + 1 < arg.length ? arg[i + 1] : ""; props.setProperty(type + "." + p.substring(1), value); i++; } } return props; }
class class_name[name] begin[{] method[argArrayToProps, return_type[type[HsqlProperties]], modifier[public static], parameter[arg, type]] begin[{] local_variable[type[HsqlProperties], props] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=p)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="--help")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="-help")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None), operator=||), else_statement=IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="--")], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None), else_statement=IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='-'), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[]), operator=<), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), if_true=MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))])), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="."), operator=+), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None), operator=+), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setProperty, postfix_operators=[], prefix_operators=[], qualifier=props, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[]), operator=<), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), if_true=MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))])), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="."), operator=+), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None), operator=+), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setProperty, postfix_operators=[], prefix_operators=[], qualifier=props, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=NO_VALUE_FOR_KEY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None)], member=addError, postfix_operators=[], prefix_operators=[], qualifier=props, 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=arg, 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[.props]] end[}] END[}]
Keyword[public] Keyword[static] identifier[HsqlProperties] identifier[argArrayToProps] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[arg] , identifier[String] identifier[type] operator[SEP] { identifier[HsqlProperties] identifier[props] operator[=] Keyword[new] identifier[HsqlProperties] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[arg] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[String] identifier[p] operator[=] identifier[arg] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[p] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[||] identifier[p] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[props] operator[SEP] identifier[addError] operator[SEP] identifier[NO_VALUE_FOR_KEY] , identifier[p] operator[SEP] identifier[substring] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[p] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[String] identifier[value] operator[=] identifier[i] operator[+] Other[1] operator[<] identifier[arg] operator[SEP] identifier[length] operator[?] identifier[arg] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[:] literal[String] operator[SEP] identifier[props] operator[SEP] identifier[setProperty] operator[SEP] identifier[type] operator[+] literal[String] operator[+] identifier[p] operator[SEP] identifier[substring] operator[SEP] Other[2] operator[SEP] , identifier[value] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[p] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[==] literal[String] operator[SEP] { identifier[String] identifier[value] operator[=] identifier[i] operator[+] Other[1] operator[<] identifier[arg] operator[SEP] identifier[length] operator[?] identifier[arg] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[:] literal[String] operator[SEP] identifier[props] operator[SEP] identifier[setProperty] operator[SEP] identifier[type] operator[+] literal[String] operator[+] identifier[p] operator[SEP] identifier[substring] operator[SEP] Other[1] operator[SEP] , identifier[value] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] } } Keyword[return] identifier[props] operator[SEP] }
public static String getLocation(File file) { Assert.notNull(file, "File cannot be null"); File parent = file.getParentFile(); Assert.notNull(parent, new IllegalArgumentException(String.format( "Unable to determine the location of file [%1$s]", file))); return tryGetCanonicalPathElseGetAbsolutePath(parent); }
class class_name[name] begin[{] method[getLocation, return_type[type[String]], modifier[public static], parameter[file]] begin[{] call[Assert.notNull, parameter[member[.file], literal["File cannot be null"]]] local_variable[type[File], parent] call[Assert.notNull, parameter[member[.parent], ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to determine the location of file [%1$s]"), MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None))]] return[call[.tryGetCanonicalPathElseGetAbsolutePath, parameter[member[.parent]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getLocation] operator[SEP] identifier[File] identifier[file] operator[SEP] { identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] identifier[file] , literal[String] operator[SEP] operator[SEP] identifier[File] identifier[parent] operator[=] identifier[file] operator[SEP] identifier[getParentFile] operator[SEP] operator[SEP] operator[SEP] identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] identifier[parent] , Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[file] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[tryGetCanonicalPathElseGetAbsolutePath] operator[SEP] identifier[parent] operator[SEP] operator[SEP] }
protected Check<T> newCheck(final String id, final IModel<T> model, final int index) { final Check<T> check = new Check<T>(id, model) { /** * The serialVersionUID. */ private static final long serialVersionUID = 1L; /** * {@inheritDoc} */ @Override public IModel<String> getLabel() { return Model.of(getChoiceLabel(getModelObject())); } /** * {@inheritDoc} */ @Override protected boolean getStatelessHint() { return true; } /** * {@inheritDoc} */ @Override public String getValue() { return getChoiceValue(getModelObject(), index); } }; return check; }
class class_name[name] begin[{] method[newCheck, return_type[type[Check]], modifier[protected], parameter[id, model, index]] begin[{] local_variable[type[Check], check] return[member[.check]] end[}] END[}]
Keyword[protected] identifier[Check] operator[<] identifier[T] operator[>] identifier[newCheck] operator[SEP] Keyword[final] identifier[String] identifier[id] , Keyword[final] identifier[IModel] operator[<] identifier[T] operator[>] identifier[model] , Keyword[final] Keyword[int] identifier[index] operator[SEP] { Keyword[final] identifier[Check] operator[<] identifier[T] operator[>] identifier[check] operator[=] Keyword[new] identifier[Check] operator[<] identifier[T] operator[>] operator[SEP] identifier[id] , identifier[model] operator[SEP] { Keyword[private] Keyword[static] Keyword[final] Keyword[long] identifier[serialVersionUID] operator[=] Other[1L] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[IModel] operator[<] identifier[String] operator[>] identifier[getLabel] operator[SEP] operator[SEP] { Keyword[return] identifier[Model] operator[SEP] identifier[of] operator[SEP] identifier[getChoiceLabel] operator[SEP] identifier[getModelObject] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[protected] Keyword[boolean] identifier[getStatelessHint] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[getValue] operator[SEP] operator[SEP] { Keyword[return] identifier[getChoiceValue] operator[SEP] identifier[getModelObject] operator[SEP] operator[SEP] , identifier[index] operator[SEP] operator[SEP] } } operator[SEP] Keyword[return] identifier[check] operator[SEP] }
public static void lsp_prev_compose( float lsp_ele[], /* (i) Q13 : LSP vectors */ float lsp[], /* (o) Q13 : quantized LSP parameters */ float fg[][], /* (i) Q15 : MA prediction coef. */ float freq_prev[][], /* (i) Q13 : previous LSP vector */ float fg_sum[] /* (i) Q15 : present MA prediction coef. */ ) { int j, k; for(j=0; j<LD8KConstants.M; j++) { lsp[j] = lsp_ele[j] * fg_sum[j]; for(k=0; k<LD8KConstants.MA_NP; k++) lsp[j] += freq_prev[k][j]*fg[k][j]; } return; }
class class_name[name] begin[{] method[lsp_prev_compose, return_type[void], modifier[public static], parameter[lsp_ele, lsp, fg, freq_prev, fg_sum]] begin[{] local_variable[type[int], j] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=lsp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=BinaryOperation(operandl=MemberReference(member=lsp_ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=fg_sum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=*)), label=None), ForStatement(body=StatementExpression(expression=Assignment(expressionl=MemberReference(member=lsp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=+=, value=BinaryOperation(operandl=MemberReference(member=freq_prev, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=fg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=*)), label=None), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=MA_NP, postfix_operators=[], prefix_operators=[], qualifier=LD8KConstants, selectors=[]), operator=<), init=[Assignment(expressionl=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))], update=[MemberReference(member=k, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=M, postfix_operators=[], prefix_operators=[], qualifier=LD8KConstants, selectors=[]), operator=<), init=[Assignment(expressionl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))], update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[None] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[lsp_prev_compose] operator[SEP] Keyword[float] identifier[lsp_ele] operator[SEP] operator[SEP] , Keyword[float] identifier[lsp] operator[SEP] operator[SEP] , Keyword[float] identifier[fg] operator[SEP] operator[SEP] operator[SEP] operator[SEP] , Keyword[float] identifier[freq_prev] operator[SEP] operator[SEP] operator[SEP] operator[SEP] , Keyword[float] identifier[fg_sum] operator[SEP] operator[SEP] operator[SEP] { Keyword[int] identifier[j] , identifier[k] operator[SEP] Keyword[for] operator[SEP] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[LD8KConstants] operator[SEP] identifier[M] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[lsp] operator[SEP] identifier[j] operator[SEP] operator[=] identifier[lsp_ele] operator[SEP] identifier[j] operator[SEP] operator[*] identifier[fg_sum] operator[SEP] identifier[j] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[k] operator[=] Other[0] operator[SEP] identifier[k] operator[<] identifier[LD8KConstants] operator[SEP] identifier[MA_NP] operator[SEP] identifier[k] operator[++] operator[SEP] identifier[lsp] operator[SEP] identifier[j] operator[SEP] operator[+=] identifier[freq_prev] operator[SEP] identifier[k] operator[SEP] operator[SEP] identifier[j] operator[SEP] operator[*] identifier[fg] operator[SEP] identifier[k] operator[SEP] operator[SEP] identifier[j] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] }
public void reset() { origVisibleRange = new Range(0, this.delegate.getList().size()); snapshot(); clearFilter(); filter.setText(""); }
class class_name[name] begin[{] method[reset, return_type[void], modifier[public], parameter[]] begin[{] assign[member[.origVisibleRange], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=delegate, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=getList, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=size, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Range, sub_type=None))] call[.snapshot, parameter[]] call[.clearFilter, parameter[]] call[filter.setText, parameter[literal[""]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[reset] operator[SEP] operator[SEP] { identifier[origVisibleRange] operator[=] Keyword[new] identifier[Range] operator[SEP] Other[0] , Keyword[this] operator[SEP] identifier[delegate] operator[SEP] identifier[getList] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[snapshot] operator[SEP] operator[SEP] operator[SEP] identifier[clearFilter] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] }
public static boolean intersect(LineParametric3D_F64 line , Sphere3D_F64 sphere , Point3D_F64 a, Point3D_F64 b ) { // this equation was found by solving for l: // ||(P + V*l) - X0|| == r double r2 = sphere.radius*sphere.radius; double PP = GeometryMath_F64.dot(line.p,line.p); double PV = GeometryMath_F64.dot(line.p,line.slope); double PX = GeometryMath_F64.dot(line.p,sphere.center); double VV = GeometryMath_F64.dot(line.slope,line.slope); double VX = GeometryMath_F64.dot(line.slope,sphere.center); double XX = GeometryMath_F64.dot(sphere.center,sphere.center); // Coefficients in the quadratic equation double A = VV; double B = 2.0*(PV-VX); double C = PP+XX-2.0*PX-r2; // solve for the quadratic equation double inner = B*B - 4.0*A*C; if( inner < 0 ) return false; double sqrt = Math.sqrt(inner); double t0 = (-B + sqrt)/(2.0*A); double t1 = (-B - sqrt)/(2.0*A); line.setPointOnLine(t0,a); line.setPointOnLine(t1,b); return true; }
class class_name[name] begin[{] method[intersect, return_type[type[boolean]], modifier[public static], parameter[line, sphere, a, b]] begin[{] local_variable[type[double], r2] local_variable[type[double], PP] local_variable[type[double], PV] local_variable[type[double], PX] local_variable[type[double], VV] local_variable[type[double], VX] local_variable[type[double], XX] local_variable[type[double], A] local_variable[type[double], B] local_variable[type[double], C] local_variable[type[double], inner] if[binary_operation[member[.inner], <, literal[0]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[double], sqrt] local_variable[type[double], t0] local_variable[type[double], t1] call[line.setPointOnLine, parameter[member[.t0], member[.a]]] call[line.setPointOnLine, parameter[member[.t1], member[.b]]] return[literal[true]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[intersect] operator[SEP] identifier[LineParametric3D_F64] identifier[line] , identifier[Sphere3D_F64] identifier[sphere] , identifier[Point3D_F64] identifier[a] , identifier[Point3D_F64] identifier[b] operator[SEP] { Keyword[double] identifier[r2] operator[=] identifier[sphere] operator[SEP] identifier[radius] operator[*] identifier[sphere] operator[SEP] identifier[radius] operator[SEP] Keyword[double] identifier[PP] operator[=] identifier[GeometryMath_F64] operator[SEP] identifier[dot] operator[SEP] identifier[line] operator[SEP] identifier[p] , identifier[line] operator[SEP] identifier[p] operator[SEP] operator[SEP] Keyword[double] identifier[PV] operator[=] identifier[GeometryMath_F64] operator[SEP] identifier[dot] operator[SEP] identifier[line] operator[SEP] identifier[p] , identifier[line] operator[SEP] identifier[slope] operator[SEP] operator[SEP] Keyword[double] identifier[PX] operator[=] identifier[GeometryMath_F64] operator[SEP] identifier[dot] operator[SEP] identifier[line] operator[SEP] identifier[p] , identifier[sphere] operator[SEP] identifier[center] operator[SEP] operator[SEP] Keyword[double] identifier[VV] operator[=] identifier[GeometryMath_F64] operator[SEP] identifier[dot] operator[SEP] identifier[line] operator[SEP] identifier[slope] , identifier[line] operator[SEP] identifier[slope] operator[SEP] operator[SEP] Keyword[double] identifier[VX] operator[=] identifier[GeometryMath_F64] operator[SEP] identifier[dot] operator[SEP] identifier[line] operator[SEP] identifier[slope] , identifier[sphere] operator[SEP] identifier[center] operator[SEP] operator[SEP] Keyword[double] identifier[XX] operator[=] identifier[GeometryMath_F64] operator[SEP] identifier[dot] operator[SEP] identifier[sphere] operator[SEP] identifier[center] , identifier[sphere] operator[SEP] identifier[center] operator[SEP] operator[SEP] Keyword[double] identifier[A] operator[=] identifier[VV] operator[SEP] Keyword[double] identifier[B] operator[=] literal[Float] operator[*] operator[SEP] identifier[PV] operator[-] identifier[VX] operator[SEP] operator[SEP] Keyword[double] identifier[C] operator[=] identifier[PP] operator[+] identifier[XX] operator[-] literal[Float] operator[*] identifier[PX] operator[-] identifier[r2] operator[SEP] Keyword[double] identifier[inner] operator[=] identifier[B] operator[*] identifier[B] operator[-] literal[Float] operator[*] identifier[A] operator[*] identifier[C] operator[SEP] Keyword[if] operator[SEP] identifier[inner] operator[<] Other[0] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[double] identifier[sqrt] operator[=] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] identifier[inner] operator[SEP] operator[SEP] Keyword[double] identifier[t0] operator[=] operator[SEP] operator[-] identifier[B] operator[+] identifier[sqrt] operator[SEP] operator[/] operator[SEP] literal[Float] operator[*] identifier[A] operator[SEP] operator[SEP] Keyword[double] identifier[t1] operator[=] operator[SEP] operator[-] identifier[B] operator[-] identifier[sqrt] operator[SEP] operator[/] operator[SEP] literal[Float] operator[*] identifier[A] operator[SEP] operator[SEP] identifier[line] operator[SEP] identifier[setPointOnLine] operator[SEP] identifier[t0] , identifier[a] operator[SEP] operator[SEP] identifier[line] operator[SEP] identifier[setPointOnLine] operator[SEP] identifier[t1] , identifier[b] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
@Override public void visit(final GedFile gedfile) { Root root; if (gedfile.getFinder() == null) { root = new Root(); } else { root = new Root(gedfile.getFinder()); } root.setFilename(gedfile.getFilename()); root.setDbName(gedfile.getDbName()); populateGob(root, gedfile); gedObject = root; }
class class_name[name] begin[{] method[visit, return_type[void], modifier[public], parameter[gedfile]] begin[{] local_variable[type[Root], root] if[binary_operation[call[gedfile.getFinder, parameter[]], ==, literal[null]]] begin[{] assign[member[.root], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Root, sub_type=None))] else begin[{] assign[member[.root], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getFinder, postfix_operators=[], prefix_operators=[], qualifier=gedfile, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Root, sub_type=None))] end[}] call[root.setFilename, parameter[call[gedfile.getFilename, parameter[]]]] call[root.setDbName, parameter[call[gedfile.getDbName, parameter[]]]] call[.populateGob, parameter[member[.root], member[.gedfile]]] assign[member[.gedObject], member[.root]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[visit] operator[SEP] Keyword[final] identifier[GedFile] identifier[gedfile] operator[SEP] { identifier[Root] identifier[root] operator[SEP] Keyword[if] operator[SEP] identifier[gedfile] operator[SEP] identifier[getFinder] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[root] operator[=] Keyword[new] identifier[Root] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[root] operator[=] Keyword[new] identifier[Root] operator[SEP] identifier[gedfile] operator[SEP] identifier[getFinder] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[root] operator[SEP] identifier[setFilename] operator[SEP] identifier[gedfile] operator[SEP] identifier[getFilename] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[root] operator[SEP] identifier[setDbName] operator[SEP] identifier[gedfile] operator[SEP] identifier[getDbName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[populateGob] operator[SEP] identifier[root] , identifier[gedfile] operator[SEP] operator[SEP] identifier[gedObject] operator[=] identifier[root] operator[SEP] }
@SuppressWarnings("rawtypes") public boolean hasSensitiveWord(String source) { char[] chars = source.toCharArray(); Map nowMap = pool; for (int i = 0; i < chars.length; i++) { char ch = Character.toUpperCase(chars[i]); nowMap = (Map) nowMap.get(ch); if (nowMap != null) { if ("1".equals(nowMap.get("isEnd"))) { return true; } } else { nowMap = pool; nowMap = (Map) nowMap.get(ch); if (nowMap != null) { if ("1".equals(nowMap.get("isEnd"))) { return true; } } else { nowMap = pool; } } } return false; }
class class_name[name] begin[{] method[hasSensitiveWord, return_type[type[boolean]], modifier[public], parameter[source]] begin[{] local_variable[type[char], chars] local_variable[type[Map], nowMap] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=chars, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=toUpperCase, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[], type_arguments=None), name=ch)], modifiers=set(), type=BasicType(dimensions=[], name=char)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=nowMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=nowMap, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=None))), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=nowMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=nowMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=pool, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=nowMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=nowMap, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=None))), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=nowMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=nowMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=pool, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="isEnd")], member=get, postfix_operators=[], prefix_operators=[], qualifier=nowMap, selectors=[], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], value="1"), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]))]))]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="isEnd")], member=get, postfix_operators=[], prefix_operators=[], qualifier=nowMap, selectors=[], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], value="1"), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]))]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=chars, 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[literal[false]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[boolean] identifier[hasSensitiveWord] operator[SEP] identifier[String] identifier[source] operator[SEP] { Keyword[char] operator[SEP] operator[SEP] identifier[chars] operator[=] identifier[source] operator[SEP] identifier[toCharArray] operator[SEP] operator[SEP] operator[SEP] identifier[Map] identifier[nowMap] operator[=] identifier[pool] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[chars] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[char] identifier[ch] operator[=] identifier[Character] operator[SEP] identifier[toUpperCase] operator[SEP] identifier[chars] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] identifier[nowMap] operator[=] operator[SEP] identifier[Map] operator[SEP] identifier[nowMap] operator[SEP] identifier[get] operator[SEP] identifier[ch] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nowMap] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[nowMap] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[else] { identifier[nowMap] operator[=] identifier[pool] operator[SEP] identifier[nowMap] operator[=] operator[SEP] identifier[Map] operator[SEP] identifier[nowMap] operator[SEP] identifier[get] operator[SEP] identifier[ch] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nowMap] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[nowMap] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[else] { identifier[nowMap] operator[=] identifier[pool] operator[SEP] } } } Keyword[return] literal[boolean] operator[SEP] }
public Observable<List<DatabasePrincipalInner>> listPrincipalsAsync(String resourceGroupName, String clusterName, String databaseName) { return listPrincipalsWithServiceResponseAsync(resourceGroupName, clusterName, databaseName).map(new Func1<ServiceResponse<List<DatabasePrincipalInner>>, List<DatabasePrincipalInner>>() { @Override public List<DatabasePrincipalInner> call(ServiceResponse<List<DatabasePrincipalInner>> response) { return response.body(); } }); }
class class_name[name] begin[{] method[listPrincipalsAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, clusterName, databaseName]] begin[{] return[call[.listPrincipalsWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.clusterName], member[.databaseName]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[List] operator[<] identifier[DatabasePrincipalInner] operator[>] operator[>] identifier[listPrincipalsAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[clusterName] , identifier[String] identifier[databaseName] operator[SEP] { Keyword[return] identifier[listPrincipalsWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[clusterName] , identifier[databaseName] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[List] operator[<] identifier[DatabasePrincipalInner] operator[>] operator[>] , identifier[List] operator[<] identifier[DatabasePrincipalInner] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[DatabasePrincipalInner] operator[>] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[List] operator[<] identifier[DatabasePrincipalInner] operator[>] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
private void convertYieldOfAsyncGenerator(NodeTraversal t, LexicalContext ctx, Node yieldNode) { checkNotNull(yieldNode); checkState(yieldNode.isYield()); checkState(ctx != null && ctx.function != null); checkState(ctx.function.isAsyncGeneratorFunction()); Node expression = yieldNode.removeFirstChild(); Node newActionRecord = astFactory.createNewNode(astFactory.createQName(t.getScope(), ACTION_RECORD_NAME)); if (yieldNode.isYieldAll()) { checkNotNull(expression); // yield* expression becomes new ActionRecord(YIELD_STAR, expression) newActionRecord.addChildToBack(astFactory.createQName(t.getScope(), ACTION_ENUM_YIELD_STAR)); newActionRecord.addChildToBack(expression); } else { if (expression == null) { expression = NodeUtil.newUndefinedNode(null); } // yield expression becomes new ActionRecord(YIELD, expression) newActionRecord.addChildToBack(astFactory.createQName(t.getScope(), ACTION_ENUM_YIELD)); newActionRecord.addChildToBack(expression); } newActionRecord.useSourceInfoIfMissingFromForTree(yieldNode); yieldNode.addChildToFront(newActionRecord); yieldNode.removeProp(Node.YIELD_ALL); }
class class_name[name] begin[{] method[convertYieldOfAsyncGenerator, return_type[void], modifier[private], parameter[t, ctx, yieldNode]] begin[{] call[.checkNotNull, parameter[member[.yieldNode]]] call[.checkState, parameter[call[yieldNode.isYield, parameter[]]]] call[.checkState, parameter[binary_operation[binary_operation[member[.ctx], !=, literal[null]], &&, binary_operation[member[ctx.function], !=, literal[null]]]]] call[.checkState, parameter[call[ctx.function.isAsyncGeneratorFunction, parameter[]]]] local_variable[type[Node], expression] local_variable[type[Node], newActionRecord] if[call[yieldNode.isYieldAll, parameter[]]] begin[{] call[.checkNotNull, parameter[member[.expression]]] call[newActionRecord.addChildToBack, parameter[call[astFactory.createQName, parameter[call[t.getScope, parameter[]], member[.ACTION_ENUM_YIELD_STAR]]]]] call[newActionRecord.addChildToBack, parameter[member[.expression]]] else begin[{] if[binary_operation[member[.expression], ==, literal[null]]] begin[{] assign[member[.expression], call[NodeUtil.newUndefinedNode, parameter[literal[null]]]] else begin[{] None end[}] call[newActionRecord.addChildToBack, parameter[call[astFactory.createQName, parameter[call[t.getScope, parameter[]], member[.ACTION_ENUM_YIELD]]]]] call[newActionRecord.addChildToBack, parameter[member[.expression]]] end[}] call[newActionRecord.useSourceInfoIfMissingFromForTree, parameter[member[.yieldNode]]] call[yieldNode.addChildToFront, parameter[member[.newActionRecord]]] call[yieldNode.removeProp, parameter[member[Node.YIELD_ALL]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[convertYieldOfAsyncGenerator] operator[SEP] identifier[NodeTraversal] identifier[t] , identifier[LexicalContext] identifier[ctx] , identifier[Node] identifier[yieldNode] operator[SEP] { identifier[checkNotNull] operator[SEP] identifier[yieldNode] operator[SEP] operator[SEP] identifier[checkState] operator[SEP] identifier[yieldNode] operator[SEP] identifier[isYield] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[checkState] operator[SEP] identifier[ctx] operator[!=] Other[null] operator[&&] identifier[ctx] operator[SEP] identifier[function] operator[!=] Other[null] operator[SEP] operator[SEP] identifier[checkState] operator[SEP] identifier[ctx] operator[SEP] identifier[function] operator[SEP] identifier[isAsyncGeneratorFunction] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Node] identifier[expression] operator[=] identifier[yieldNode] operator[SEP] identifier[removeFirstChild] operator[SEP] operator[SEP] operator[SEP] identifier[Node] identifier[newActionRecord] operator[=] identifier[astFactory] operator[SEP] identifier[createNewNode] operator[SEP] identifier[astFactory] operator[SEP] identifier[createQName] operator[SEP] identifier[t] operator[SEP] identifier[getScope] operator[SEP] operator[SEP] , identifier[ACTION_RECORD_NAME] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[yieldNode] operator[SEP] identifier[isYieldAll] operator[SEP] operator[SEP] operator[SEP] { identifier[checkNotNull] operator[SEP] identifier[expression] operator[SEP] operator[SEP] identifier[newActionRecord] operator[SEP] identifier[addChildToBack] operator[SEP] identifier[astFactory] operator[SEP] identifier[createQName] operator[SEP] identifier[t] operator[SEP] identifier[getScope] operator[SEP] operator[SEP] , identifier[ACTION_ENUM_YIELD_STAR] operator[SEP] operator[SEP] operator[SEP] identifier[newActionRecord] operator[SEP] identifier[addChildToBack] operator[SEP] identifier[expression] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[expression] operator[==] Other[null] operator[SEP] { identifier[expression] operator[=] identifier[NodeUtil] operator[SEP] identifier[newUndefinedNode] operator[SEP] Other[null] operator[SEP] operator[SEP] } identifier[newActionRecord] operator[SEP] identifier[addChildToBack] operator[SEP] identifier[astFactory] operator[SEP] identifier[createQName] operator[SEP] identifier[t] operator[SEP] identifier[getScope] operator[SEP] operator[SEP] , identifier[ACTION_ENUM_YIELD] operator[SEP] operator[SEP] operator[SEP] identifier[newActionRecord] operator[SEP] identifier[addChildToBack] operator[SEP] identifier[expression] operator[SEP] operator[SEP] } identifier[newActionRecord] operator[SEP] identifier[useSourceInfoIfMissingFromForTree] operator[SEP] identifier[yieldNode] operator[SEP] operator[SEP] identifier[yieldNode] operator[SEP] identifier[addChildToFront] operator[SEP] identifier[newActionRecord] operator[SEP] operator[SEP] identifier[yieldNode] operator[SEP] identifier[removeProp] operator[SEP] identifier[Node] operator[SEP] identifier[YIELD_ALL] operator[SEP] operator[SEP] }
@Handler(dynamic = true) public void onConfigurationUpdate(ConfigurationUpdate event) throws BackingStoreException { if (event instanceof InitialPreferences) { return; } for (String path : event.paths()) { Optional<Map<String, String>> prefs = event.values(path); path = path.substring(1); // Remove leading slash if (!prefs.isPresent()) { preferences.node(path).removeNode(); continue; } for (Map.Entry<String, String> e : prefs.get().entrySet()) { preferences.node(path).put(e.getKey(), e.getValue()); } } preferences.flush(); }
class class_name[name] begin[{] method[onConfigurationUpdate, return_type[void], modifier[public], parameter[event]] begin[{] if[binary_operation[member[.event], instanceof, type[InitialPreferences]]] begin[{] return[None] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=values, postfix_operators=[], prefix_operators=[], qualifier=event, selectors=[], type_arguments=None), name=prefs)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=Map, sub_type=None))], dimensions=[], name=Optional, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=path, selectors=[], type_arguments=None)), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isPresent, postfix_operators=[], prefix_operators=['!'], qualifier=prefs, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=node, postfix_operators=[], prefix_operators=[], qualifier=preferences, selectors=[MethodInvocation(arguments=[], member=removeNode, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), ContinueStatement(goto=None, label=None)])), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=node, postfix_operators=[], prefix_operators=[], qualifier=preferences, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=put, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=prefs, selectors=[MethodInvocation(arguments=[], member=entrySet, 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=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=paths, postfix_operators=[], prefix_operators=[], qualifier=event, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=path)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) call[preferences.flush, parameter[]] end[}] END[}]
annotation[@] identifier[Handler] operator[SEP] identifier[dynamic] operator[=] literal[boolean] operator[SEP] Keyword[public] Keyword[void] identifier[onConfigurationUpdate] operator[SEP] identifier[ConfigurationUpdate] identifier[event] operator[SEP] Keyword[throws] identifier[BackingStoreException] { Keyword[if] operator[SEP] identifier[event] Keyword[instanceof] identifier[InitialPreferences] operator[SEP] { Keyword[return] operator[SEP] } Keyword[for] operator[SEP] identifier[String] identifier[path] operator[:] identifier[event] operator[SEP] identifier[paths] operator[SEP] operator[SEP] operator[SEP] { identifier[Optional] operator[<] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] operator[>] identifier[prefs] operator[=] identifier[event] operator[SEP] identifier[values] operator[SEP] identifier[path] operator[SEP] operator[SEP] identifier[path] operator[=] identifier[path] operator[SEP] identifier[substring] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[prefs] operator[SEP] identifier[isPresent] operator[SEP] operator[SEP] operator[SEP] { identifier[preferences] operator[SEP] identifier[node] operator[SEP] identifier[path] operator[SEP] operator[SEP] identifier[removeNode] operator[SEP] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] } Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[String] operator[>] identifier[e] operator[:] identifier[prefs] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[preferences] operator[SEP] identifier[node] operator[SEP] identifier[path] operator[SEP] operator[SEP] identifier[put] operator[SEP] identifier[e] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] , identifier[e] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } identifier[preferences] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] }
public static BeanInfo createBeanInfo(Class<? extends Object> c) { BeanInfo bi = DefaultBeanInfoResolver.getBeanInfoHelper(c); if (bi == null) { bi = new ConfigBeanInfo(c); DefaultBeanInfoResolver.addBeanInfo(c, bi); } return bi; }
class class_name[name] begin[{] method[createBeanInfo, return_type[type[BeanInfo]], modifier[public static], parameter[c]] begin[{] local_variable[type[BeanInfo], bi] if[binary_operation[member[.bi], ==, literal[null]]] begin[{] assign[member[.bi], ClassCreator(arguments=[MemberReference(member=c, 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=ConfigBeanInfo, sub_type=None))] call[DefaultBeanInfoResolver.addBeanInfo, parameter[member[.c], member[.bi]]] else begin[{] None end[}] return[member[.bi]] end[}] END[}]
Keyword[public] Keyword[static] identifier[BeanInfo] identifier[createBeanInfo] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Object] operator[>] identifier[c] operator[SEP] { identifier[BeanInfo] identifier[bi] operator[=] identifier[DefaultBeanInfoResolver] operator[SEP] identifier[getBeanInfoHelper] operator[SEP] identifier[c] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[bi] operator[==] Other[null] operator[SEP] { identifier[bi] operator[=] Keyword[new] identifier[ConfigBeanInfo] operator[SEP] identifier[c] operator[SEP] operator[SEP] identifier[DefaultBeanInfoResolver] operator[SEP] identifier[addBeanInfo] operator[SEP] identifier[c] , identifier[bi] operator[SEP] operator[SEP] } Keyword[return] identifier[bi] operator[SEP] }
public Table addTableToContent(final String name, final int rowCapacity, final int columnCapacity) throws IOException { final Table previousTable = this.contentElement.getLastTable(); final Table table = this.contentElement.addTable(name, rowCapacity, columnCapacity); this.settingsElement.addTableConfig(table.getConfigEntry()); if (this.observer != null) { if (previousTable == null) this.observer.update(new MetaAndStylesElementsFlusher(this, this.contentElement)); else previousTable.flush(); table.addObserver(this.observer); } return table; }
class class_name[name] begin[{] method[addTableToContent, return_type[type[Table]], modifier[public], parameter[name, rowCapacity, columnCapacity]] begin[{] local_variable[type[Table], previousTable] local_variable[type[Table], table] THIS[member[None.settingsElement]call[None.addTableConfig, parameter[call[table.getConfigEntry, parameter[]]]]] if[binary_operation[THIS[member[None.observer]], !=, literal[null]]] begin[{] if[binary_operation[member[.previousTable], ==, literal[null]]] begin[{] THIS[member[None.observer]call[None.update, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=contentElement, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MetaAndStylesElementsFlusher, sub_type=None))]]] else begin[{] call[previousTable.flush, parameter[]] end[}] call[table.addObserver, parameter[THIS[member[None.observer]]]] else begin[{] None end[}] return[member[.table]] end[}] END[}]
Keyword[public] identifier[Table] identifier[addTableToContent] operator[SEP] Keyword[final] identifier[String] identifier[name] , Keyword[final] Keyword[int] identifier[rowCapacity] , Keyword[final] Keyword[int] identifier[columnCapacity] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[final] identifier[Table] identifier[previousTable] operator[=] Keyword[this] operator[SEP] identifier[contentElement] operator[SEP] identifier[getLastTable] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Table] identifier[table] operator[=] Keyword[this] operator[SEP] identifier[contentElement] operator[SEP] identifier[addTable] operator[SEP] identifier[name] , identifier[rowCapacity] , identifier[columnCapacity] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[settingsElement] operator[SEP] identifier[addTableConfig] operator[SEP] identifier[table] operator[SEP] identifier[getConfigEntry] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[observer] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[previousTable] operator[==] Other[null] operator[SEP] Keyword[this] operator[SEP] identifier[observer] operator[SEP] identifier[update] operator[SEP] Keyword[new] identifier[MetaAndStylesElementsFlusher] operator[SEP] Keyword[this] , Keyword[this] operator[SEP] identifier[contentElement] operator[SEP] operator[SEP] operator[SEP] Keyword[else] identifier[previousTable] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] identifier[table] operator[SEP] identifier[addObserver] operator[SEP] Keyword[this] operator[SEP] identifier[observer] operator[SEP] operator[SEP] } Keyword[return] identifier[table] operator[SEP] }
public boolean selectionChanged(Object source, int iStartRow, int iEndRow, int iSelectType) { boolean bChanged = super.selectionChanged(source, iStartRow, iEndRow, iSelectType); if (bChanged) { // Notify all the listSelectionListeners this.fireMySelectionChanged(new MyListSelectionEvent(source, this, m_iSelectedRow, iSelectType)); } return bChanged; }
class class_name[name] begin[{] method[selectionChanged, return_type[type[boolean]], modifier[public], parameter[source, iStartRow, iEndRow, iSelectType]] begin[{] local_variable[type[boolean], bChanged] if[member[.bChanged]] begin[{] THIS[call[None.fireMySelectionChanged, parameter[ClassCreator(arguments=[MemberReference(member=source, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=m_iSelectedRow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=iSelectType, 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=MyListSelectionEvent, sub_type=None))]]] else begin[{] None end[}] return[member[.bChanged]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[selectionChanged] operator[SEP] identifier[Object] identifier[source] , Keyword[int] identifier[iStartRow] , Keyword[int] identifier[iEndRow] , Keyword[int] identifier[iSelectType] operator[SEP] { Keyword[boolean] identifier[bChanged] operator[=] Keyword[super] operator[SEP] identifier[selectionChanged] operator[SEP] identifier[source] , identifier[iStartRow] , identifier[iEndRow] , identifier[iSelectType] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[bChanged] operator[SEP] { Keyword[this] operator[SEP] identifier[fireMySelectionChanged] operator[SEP] Keyword[new] identifier[MyListSelectionEvent] operator[SEP] identifier[source] , Keyword[this] , identifier[m_iSelectedRow] , identifier[iSelectType] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[bChanged] operator[SEP] }
public int writeDependencyEntry(Object id, Object entry) { int rc = NO_EXCEPTION; if (!this.disableDependencyId) { if (delayOffload) { ValueSet vs = auxDataDependencyTable.getEntries(id); if (vs == null) { Result result = writeValueSetEntry(DEP_ID_DATA, id, entry, null, !ADD_IF_NEW); rc = result.returnCode; boolean bExist = result.bExist; returnToResultPool(result); if (rc != DISK_EXCEPTION && rc != DISK_SIZE_OVER_LIMIT_EXCEPTION && bExist == !EXIST) { rc = auxDataDependencyTable.add(id, entry); } } else { rc = auxDataDependencyTable.add(id, vs, entry); } } else { Result result = writeValueSetEntry(DEP_ID_DATA, id, entry, null, ADD_IF_NEW); rc = result.returnCode; returnToResultPool(result); } } return rc; }
class class_name[name] begin[{] method[writeDependencyEntry, return_type[type[int]], modifier[public], parameter[id, entry]] begin[{] local_variable[type[int], rc] if[THIS[member[None.disableDependencyId]]] begin[{] if[member[.delayOffload]] begin[{] local_variable[type[ValueSet], vs] if[binary_operation[member[.vs], ==, literal[null]]] begin[{] local_variable[type[Result], result] assign[member[.rc], member[result.returnCode]] local_variable[type[boolean], bExist] call[.returnToResultPool, parameter[member[.result]]] if[binary_operation[binary_operation[binary_operation[member[.rc], !=, member[.DISK_EXCEPTION]], &&, binary_operation[member[.rc], !=, member[.DISK_SIZE_OVER_LIMIT_EXCEPTION]]], &&, binary_operation[member[.bExist], ==, member[.EXIST]]]] begin[{] assign[member[.rc], call[auxDataDependencyTable.add, parameter[member[.id], member[.entry]]]] else begin[{] None end[}] else begin[{] assign[member[.rc], call[auxDataDependencyTable.add, parameter[member[.id], member[.vs], member[.entry]]]] end[}] else begin[{] local_variable[type[Result], result] assign[member[.rc], member[result.returnCode]] call[.returnToResultPool, parameter[member[.result]]] end[}] else begin[{] None end[}] return[member[.rc]] end[}] END[}]
Keyword[public] Keyword[int] identifier[writeDependencyEntry] operator[SEP] identifier[Object] identifier[id] , identifier[Object] identifier[entry] operator[SEP] { Keyword[int] identifier[rc] operator[=] identifier[NO_EXCEPTION] operator[SEP] Keyword[if] operator[SEP] operator[!] Keyword[this] operator[SEP] identifier[disableDependencyId] operator[SEP] { Keyword[if] operator[SEP] identifier[delayOffload] operator[SEP] { identifier[ValueSet] identifier[vs] operator[=] identifier[auxDataDependencyTable] operator[SEP] identifier[getEntries] operator[SEP] identifier[id] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[vs] operator[==] Other[null] operator[SEP] { identifier[Result] identifier[result] operator[=] identifier[writeValueSetEntry] operator[SEP] identifier[DEP_ID_DATA] , identifier[id] , identifier[entry] , Other[null] , operator[!] identifier[ADD_IF_NEW] operator[SEP] operator[SEP] identifier[rc] operator[=] identifier[result] operator[SEP] identifier[returnCode] operator[SEP] Keyword[boolean] identifier[bExist] operator[=] identifier[result] operator[SEP] identifier[bExist] operator[SEP] identifier[returnToResultPool] operator[SEP] identifier[result] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[rc] operator[!=] identifier[DISK_EXCEPTION] operator[&&] identifier[rc] operator[!=] identifier[DISK_SIZE_OVER_LIMIT_EXCEPTION] operator[&&] identifier[bExist] operator[==] operator[!] identifier[EXIST] operator[SEP] { identifier[rc] operator[=] identifier[auxDataDependencyTable] operator[SEP] identifier[add] operator[SEP] identifier[id] , identifier[entry] operator[SEP] operator[SEP] } } Keyword[else] { identifier[rc] operator[=] identifier[auxDataDependencyTable] operator[SEP] identifier[add] operator[SEP] identifier[id] , identifier[vs] , identifier[entry] operator[SEP] operator[SEP] } } Keyword[else] { identifier[Result] identifier[result] operator[=] identifier[writeValueSetEntry] operator[SEP] identifier[DEP_ID_DATA] , identifier[id] , identifier[entry] , Other[null] , identifier[ADD_IF_NEW] operator[SEP] operator[SEP] identifier[rc] operator[=] identifier[result] operator[SEP] identifier[returnCode] operator[SEP] identifier[returnToResultPool] operator[SEP] identifier[result] operator[SEP] operator[SEP] } } Keyword[return] identifier[rc] operator[SEP] }
@Override public java.util.List<com.liferay.commerce.price.list.model.CommercePriceListAccountRel> getCommercePriceListAccountRels( int start, int end) { return _commercePriceListAccountRelLocalService.getCommercePriceListAccountRels(start, end); }
class class_name[name] begin[{] method[getCommercePriceListAccountRels, return_type[type[java]], modifier[public], parameter[start, end]] begin[{] return[call[_commercePriceListAccountRelLocalService.getCommercePriceListAccountRels, parameter[member[.start], member[.end]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[price] operator[SEP] identifier[list] operator[SEP] identifier[model] operator[SEP] identifier[CommercePriceListAccountRel] operator[>] identifier[getCommercePriceListAccountRels] operator[SEP] Keyword[int] identifier[start] , Keyword[int] identifier[end] operator[SEP] { Keyword[return] identifier[_commercePriceListAccountRelLocalService] operator[SEP] identifier[getCommercePriceListAccountRels] operator[SEP] identifier[start] , identifier[end] operator[SEP] operator[SEP] }
private AbstractHTTPDestination findDestination(HttpServletRequest req, Bus bus) throws ServletException { // Find destination based on request URI String requestURI = req.getRequestURI(); DestinationRegistry destRegistry = getDestinationRegistryFromBus(bus); if (destRegistry == null) { throw Messages.MESSAGES.cannotObtainRegistry(DestinationRegistry.class.getName()); } requestURI = pathPattern.matcher(requestURI).replaceAll("/"); //first try looking up the destination in the registry map final AbstractHTTPDestination dest = destRegistry.getDestinationForPath(requestURI, true); if (dest != null) { return dest; } //if there's no direct match, iterate on the destinations to see if there's valid "catch-all" destination //(servlet-based endpoints, with "/*" url-pattern in web.xml) Collection<AbstractHTTPDestination> destinations = destRegistry.getDestinations(); AbstractHTTPDestination returnValue = null; for (AbstractHTTPDestination destination : destinations) { String path = destination.getEndpointInfo().getAddress(); try { path = new URL(path).getPath(); } catch (MalformedURLException ex) { // ignore Logger.getLogger(RequestHandlerImpl.class).trace(ex); } if (path != null && requestURI.startsWith(path)) { returnValue = destination; } } if (returnValue == null) throw Messages.MESSAGES.cannotObtainDestinationFor(requestURI); return returnValue; }
class class_name[name] begin[{] method[findDestination, return_type[type[AbstractHTTPDestination]], modifier[private], parameter[req, bus]] begin[{] local_variable[type[String], requestURI] local_variable[type[DestinationRegistry], destRegistry] if[binary_operation[member[.destRegistry], ==, literal[null]]] begin[{] ThrowStatement(expression=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=DestinationRegistry, sub_type=None))], member=cannotObtainRegistry, postfix_operators=[], prefix_operators=[], qualifier=Messages.MESSAGES, selectors=[], type_arguments=None), label=None) else begin[{] None end[}] assign[member[.requestURI], call[pathPattern.matcher, parameter[member[.requestURI]]]] local_variable[type[AbstractHTTPDestination], dest] if[binary_operation[member[.dest], !=, literal[null]]] begin[{] return[member[.dest]] else begin[{] None end[}] local_variable[type[Collection], destinations] local_variable[type[AbstractHTTPDestination], returnValue] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getEndpointInfo, postfix_operators=[], prefix_operators=[], qualifier=destination, selectors=[MethodInvocation(arguments=[], member=getAddress, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=path)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getPath, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=URL, sub_type=None))), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RequestHandlerImpl, sub_type=None))], member=getLogger, postfix_operators=[], prefix_operators=[], qualifier=Logger, selectors=[MethodInvocation(arguments=[MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=trace, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['MalformedURLException']))], finally_block=None, label=None, resources=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=requestURI, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=returnValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=destination, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=destinations, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=destination)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AbstractHTTPDestination, sub_type=None))), label=None) if[binary_operation[member[.returnValue], ==, literal[null]]] begin[{] ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=requestURI, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=cannotObtainDestinationFor, postfix_operators=[], prefix_operators=[], qualifier=Messages.MESSAGES, selectors=[], type_arguments=None), label=None) else begin[{] None end[}] return[member[.returnValue]] end[}] END[}]
Keyword[private] identifier[AbstractHTTPDestination] identifier[findDestination] operator[SEP] identifier[HttpServletRequest] identifier[req] , identifier[Bus] identifier[bus] operator[SEP] Keyword[throws] identifier[ServletException] { identifier[String] identifier[requestURI] operator[=] identifier[req] operator[SEP] identifier[getRequestURI] operator[SEP] operator[SEP] operator[SEP] identifier[DestinationRegistry] identifier[destRegistry] operator[=] identifier[getDestinationRegistryFromBus] operator[SEP] identifier[bus] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[destRegistry] operator[==] Other[null] operator[SEP] { Keyword[throw] identifier[Messages] operator[SEP] identifier[MESSAGES] operator[SEP] identifier[cannotObtainRegistry] operator[SEP] identifier[DestinationRegistry] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[requestURI] operator[=] identifier[pathPattern] operator[SEP] identifier[matcher] operator[SEP] identifier[requestURI] operator[SEP] operator[SEP] identifier[replaceAll] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[AbstractHTTPDestination] identifier[dest] operator[=] identifier[destRegistry] operator[SEP] identifier[getDestinationForPath] operator[SEP] identifier[requestURI] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dest] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[dest] operator[SEP] } identifier[Collection] operator[<] identifier[AbstractHTTPDestination] operator[>] identifier[destinations] operator[=] identifier[destRegistry] operator[SEP] identifier[getDestinations] operator[SEP] operator[SEP] operator[SEP] identifier[AbstractHTTPDestination] identifier[returnValue] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[AbstractHTTPDestination] identifier[destination] operator[:] identifier[destinations] operator[SEP] { identifier[String] identifier[path] operator[=] identifier[destination] operator[SEP] identifier[getEndpointInfo] operator[SEP] operator[SEP] operator[SEP] identifier[getAddress] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[path] operator[=] Keyword[new] identifier[URL] operator[SEP] identifier[path] operator[SEP] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[MalformedURLException] identifier[ex] operator[SEP] { identifier[Logger] operator[SEP] identifier[getLogger] operator[SEP] identifier[RequestHandlerImpl] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[trace] operator[SEP] identifier[ex] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[path] operator[!=] Other[null] operator[&&] identifier[requestURI] operator[SEP] identifier[startsWith] operator[SEP] identifier[path] operator[SEP] operator[SEP] { identifier[returnValue] operator[=] identifier[destination] operator[SEP] } } Keyword[if] operator[SEP] identifier[returnValue] operator[==] Other[null] operator[SEP] Keyword[throw] identifier[Messages] operator[SEP] identifier[MESSAGES] operator[SEP] identifier[cannotObtainDestinationFor] operator[SEP] identifier[requestURI] operator[SEP] operator[SEP] Keyword[return] identifier[returnValue] operator[SEP] }
public void setSeedUserListStatus(com.google.api.ads.adwords.axis.v201809.rm.UserListMembershipStatus seedUserListStatus) { this.seedUserListStatus = seedUserListStatus; }
class class_name[name] begin[{] method[setSeedUserListStatus, return_type[void], modifier[public], parameter[seedUserListStatus]] begin[{] assign[THIS[member[None.seedUserListStatus]], member[.seedUserListStatus]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setSeedUserListStatus] operator[SEP] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[adwords] operator[SEP] identifier[axis] operator[SEP] identifier[v201809] operator[SEP] identifier[rm] operator[SEP] identifier[UserListMembershipStatus] identifier[seedUserListStatus] operator[SEP] { Keyword[this] operator[SEP] identifier[seedUserListStatus] operator[=] identifier[seedUserListStatus] operator[SEP] }
public static void setOutputCompressorClass(JobConf conf, Class<? extends CompressionCodec> codecClass) { setCompressOutput(conf, true); conf.setClass("mapred.output.compression.codec", codecClass, CompressionCodec.class); }
class class_name[name] begin[{] method[setOutputCompressorClass, return_type[void], modifier[public static], parameter[conf, codecClass]] begin[{] call[.setCompressOutput, parameter[member[.conf], literal[true]]] call[conf.setClass, parameter[literal["mapred.output.compression.codec"], member[.codecClass], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CompressionCodec, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[setOutputCompressorClass] operator[SEP] identifier[JobConf] identifier[conf] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[CompressionCodec] operator[>] identifier[codecClass] operator[SEP] { identifier[setCompressOutput] operator[SEP] identifier[conf] , literal[boolean] operator[SEP] operator[SEP] identifier[conf] operator[SEP] identifier[setClass] operator[SEP] literal[String] , identifier[codecClass] , identifier[CompressionCodec] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public static <T> LazyIterable<T> tap(Iterable<T> iterable, Procedure<? super T> procedure) { return new TapIterable<T>(iterable, procedure); }
class class_name[name] begin[{] method[tap, return_type[type[LazyIterable]], modifier[public static], parameter[iterable, procedure]] begin[{] return[ClassCreator(arguments=[MemberReference(member=iterable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=procedure, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=TapIterable, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[LazyIterable] operator[<] identifier[T] operator[>] identifier[tap] operator[SEP] identifier[Iterable] operator[<] identifier[T] operator[>] identifier[iterable] , identifier[Procedure] operator[<] operator[?] Keyword[super] identifier[T] operator[>] identifier[procedure] operator[SEP] { Keyword[return] Keyword[new] identifier[TapIterable] operator[<] identifier[T] operator[>] operator[SEP] identifier[iterable] , identifier[procedure] operator[SEP] operator[SEP] }
public void onImageChange(Bitmap bitmap, String localPath) { if(profileLayoutView != null) { profileLayoutView.onImageChange(bitmap); } // Set the image in the user settings try { UserUtils.getUserSettings(getContext()).setLocalImagePath(localPath); } catch (SocializeException e) { Log.e(SocializeLogger.LOG_TAG, "Error getting user settings", e); } }
class class_name[name] begin[{] method[onImageChange, return_type[void], modifier[public], parameter[bitmap, localPath]] begin[{] if[binary_operation[member[.profileLayoutView], !=, literal[null]]] begin[{] call[profileLayoutView.onImageChange, parameter[member[.bitmap]]] else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=getUserSettings, postfix_operators=[], prefix_operators=[], qualifier=UserUtils, selectors=[MethodInvocation(arguments=[MemberReference(member=localPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setLocalImagePath, 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=[MemberReference(member=LOG_TAG, postfix_operators=[], prefix_operators=[], qualifier=SocializeLogger, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error getting user settings"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=e, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SocializeException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[onImageChange] operator[SEP] identifier[Bitmap] identifier[bitmap] , identifier[String] identifier[localPath] operator[SEP] { Keyword[if] operator[SEP] identifier[profileLayoutView] operator[!=] Other[null] operator[SEP] { identifier[profileLayoutView] operator[SEP] identifier[onImageChange] operator[SEP] identifier[bitmap] operator[SEP] operator[SEP] } Keyword[try] { identifier[UserUtils] operator[SEP] identifier[getUserSettings] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setLocalImagePath] operator[SEP] identifier[localPath] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SocializeException] identifier[e] operator[SEP] { identifier[Log] operator[SEP] identifier[e] operator[SEP] identifier[SocializeLogger] operator[SEP] identifier[LOG_TAG] , literal[String] , identifier[e] operator[SEP] operator[SEP] } }
public static File getNewSubroot() throws IOException { ensureUserRootExists(); File tempFile = File.createTempFile("foo", "", m_root); if (!tempFile.delete()) { throw new IOException(); } tempFile = new File(tempFile.getPath() + m_magic); if (!tempFile.mkdir()) { throw new IOException(); } File tempDir = new File(tempFile, "tmp"); if (!tempDir.mkdir()) { throw new IOException(); } File tempUserDir = new File(tempDir, System.getProperty("user.name")); if (!tempUserDir.mkdir()) { throw new IOException(); } return tempFile; }
class class_name[name] begin[{] method[getNewSubroot, return_type[type[File]], modifier[public static], parameter[]] begin[{] call[.ensureUserRootExists, parameter[]] local_variable[type[File], tempFile] if[call[tempFile.delete, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None) else begin[{] None end[}] assign[member[.tempFile], ClassCreator(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=getPath, postfix_operators=[], prefix_operators=[], qualifier=tempFile, selectors=[], type_arguments=None), operandr=MemberReference(member=m_magic, 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=File, sub_type=None))] if[call[tempFile.mkdir, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[File], tempDir] if[call[tempDir.mkdir, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[File], tempUserDir] if[call[tempUserDir.mkdir, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.tempFile]] end[}] END[}]
Keyword[public] Keyword[static] identifier[File] identifier[getNewSubroot] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[ensureUserRootExists] operator[SEP] operator[SEP] operator[SEP] identifier[File] identifier[tempFile] operator[=] identifier[File] operator[SEP] identifier[createTempFile] operator[SEP] literal[String] , literal[String] , identifier[m_root] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[tempFile] operator[SEP] identifier[delete] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] operator[SEP] operator[SEP] } identifier[tempFile] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[tempFile] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[+] identifier[m_magic] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[tempFile] operator[SEP] identifier[mkdir] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] operator[SEP] operator[SEP] } identifier[File] identifier[tempDir] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[tempFile] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[tempDir] operator[SEP] identifier[mkdir] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] operator[SEP] operator[SEP] } identifier[File] identifier[tempUserDir] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[tempDir] , identifier[System] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[tempUserDir] operator[SEP] identifier[mkdir] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[tempFile] operator[SEP] }
public final EObject ruleXtendEnumLiteral() throws RecognitionException { EObject current = null; AntlrDatatypeRuleToken lv_name_1_0 = null; enterRule(); try { // InternalSARL.g:7417:2: ( ( () ( (lv_name_1_0= ruleValidID ) ) ) ) // InternalSARL.g:7418:2: ( () ( (lv_name_1_0= ruleValidID ) ) ) { // InternalSARL.g:7418:2: ( () ( (lv_name_1_0= ruleValidID ) ) ) // InternalSARL.g:7419:3: () ( (lv_name_1_0= ruleValidID ) ) { // InternalSARL.g:7419:3: () // InternalSARL.g:7420:4: { if ( state.backtracking==0 ) { current = forceCreateModelElement( grammarAccess.getXtendEnumLiteralAccess().getSarlEnumLiteralAction_0(), current); } } // InternalSARL.g:7426:3: ( (lv_name_1_0= ruleValidID ) ) // InternalSARL.g:7427:4: (lv_name_1_0= ruleValidID ) { // InternalSARL.g:7427:4: (lv_name_1_0= ruleValidID ) // InternalSARL.g:7428:5: lv_name_1_0= ruleValidID { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getXtendEnumLiteralAccess().getNameValidIDParserRuleCall_1_0()); } pushFollow(FOLLOW_2); lv_name_1_0=ruleValidID(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getXtendEnumLiteralRule()); } set( current, "name", lv_name_1_0, "org.eclipse.xtend.core.Xtend.ValidID"); afterParserOrEnumRuleCall(); } } } } } if ( state.backtracking==0 ) { leaveRule(); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; }
class class_name[name] begin[{] method[ruleXtendEnumLiteral, return_type[type[EObject]], modifier[final public], parameter[]] begin[{] local_variable[type[EObject], current] local_variable[type[AntlrDatatypeRuleToken], lv_name_1_0] call[.enterRule, parameter[]] TryStatement(block=[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=getXtendEnumLiteralAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getSarlEnumLiteralAction_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)]))]), 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=getXtendEnumLiteralAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getNameValidIDParserRuleCall_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_2, 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_name_1_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=ruleValidID, 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=getXtendEnumLiteralRule, 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="name"), MemberReference(member=lv_name_1_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="org.eclipse.xtend.core.Xtend.ValidID")], member=set, 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)]))])])])]), 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[ruleXtendEnumLiteral] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { identifier[EObject] identifier[current] operator[=] Other[null] operator[SEP] identifier[AntlrDatatypeRuleToken] identifier[lv_name_1_0] operator[=] Other[null] operator[SEP] identifier[enterRule] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { { { { 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[getXtendEnumLiteralAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getSarlEnumLiteralAction_0] operator[SEP] operator[SEP] , identifier[current] 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[getXtendEnumLiteralAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getNameValidIDParserRuleCall_1_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_2] operator[SEP] operator[SEP] identifier[lv_name_1_0] operator[=] identifier[ruleValidID] 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[getXtendEnumLiteralRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[set] operator[SEP] identifier[current] , literal[String] , identifier[lv_name_1_0] , literal[String] operator[SEP] operator[SEP] identifier[afterParserOrEnumRuleCall] operator[SEP] operator[SEP] 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 RemoteModel setRemotingPort(Integer remotingPort) { String rp = remotingPort != null ? remotingPort.toString() : null; setModelAttribute("remotingPort", rp); return this; }
class class_name[name] begin[{] method[setRemotingPort, return_type[type[RemoteModel]], modifier[public], parameter[remotingPort]] begin[{] local_variable[type[String], rp] call[.setModelAttribute, parameter[literal["remotingPort"], member[.rp]]] return[THIS[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[RemoteModel] identifier[setRemotingPort] operator[SEP] identifier[Integer] identifier[remotingPort] operator[SEP] { identifier[String] identifier[rp] operator[=] identifier[remotingPort] operator[!=] Other[null] operator[?] identifier[remotingPort] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[:] Other[null] operator[SEP] identifier[setModelAttribute] operator[SEP] literal[String] , identifier[rp] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
@Override public Map<String, WroModelFactory> provideModelFactories() { final Map<String, WroModelFactory> map = new HashMap<String, WroModelFactory>(); map.put(GroovyModelFactory.ALIAS, new GroovyModelFactory()); map.put(JsonModelFactory.ALIAS, new JsonModelFactory()); map.put(SmartWroModelFactory.ALIAS, new SmartWroModelFactory()); return map; }
class class_name[name] begin[{] method[provideModelFactories, return_type[type[Map]], modifier[public], parameter[]] begin[{] local_variable[type[Map], map] call[map.put, parameter[member[GroovyModelFactory.ALIAS], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GroovyModelFactory, sub_type=None))]] call[map.put, parameter[member[JsonModelFactory.ALIAS], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JsonModelFactory, sub_type=None))]] call[map.put, parameter[member[SmartWroModelFactory.ALIAS], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SmartWroModelFactory, sub_type=None))]] return[member[.map]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[WroModelFactory] operator[>] identifier[provideModelFactories] operator[SEP] operator[SEP] { Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[WroModelFactory] operator[>] identifier[map] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[WroModelFactory] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[GroovyModelFactory] operator[SEP] identifier[ALIAS] , Keyword[new] identifier[GroovyModelFactory] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[JsonModelFactory] operator[SEP] identifier[ALIAS] , Keyword[new] identifier[JsonModelFactory] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[SmartWroModelFactory] operator[SEP] identifier[ALIAS] , Keyword[new] identifier[SmartWroModelFactory] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[map] operator[SEP] }
private void applyDefaultValues(Map<String, Object> parameterValues) { for (Parameter<?> parameter : allParameters) { parameterValues.put(parameter.getName(), getParameterDefaultValue(parameter)); } }
class class_name[name] begin[{] method[applyDefaultValues, return_type[void], modifier[private], parameter[parameterValues]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=parameter, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=parameter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getParameterDefaultValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=parameterValues, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=allParameters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=parameter)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Parameter, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[applyDefaultValues] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[parameterValues] operator[SEP] { Keyword[for] operator[SEP] identifier[Parameter] operator[<] operator[?] operator[>] identifier[parameter] operator[:] identifier[allParameters] operator[SEP] { identifier[parameterValues] operator[SEP] identifier[put] operator[SEP] identifier[parameter] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[getParameterDefaultValue] operator[SEP] identifier[parameter] operator[SEP] operator[SEP] operator[SEP] } }
private void removePreferenceFragmentUnconditionally() { if (isPreferenceFragmentShown()) { resetTitle(); hideToolbarNavigationIcon(); adaptBreadCrumbVisibility(); FragmentTransaction transaction = getSupportFragmentManager().beginTransaction(); transaction.remove(preferenceFragment); if (!isSplitScreen()) { transaction.show(navigationFragment); } transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_CLOSE); transaction.commit(); notifyOnPreferenceFragmentHidden(preferenceFragment); preferenceFragment = null; } }
class class_name[name] begin[{] method[removePreferenceFragmentUnconditionally, return_type[void], modifier[private], parameter[]] begin[{] if[call[.isPreferenceFragmentShown, parameter[]]] begin[{] call[.resetTitle, parameter[]] call[.hideToolbarNavigationIcon, parameter[]] call[.adaptBreadCrumbVisibility, parameter[]] local_variable[type[FragmentTransaction], transaction] call[transaction.remove, parameter[member[.preferenceFragment]]] if[call[.isSplitScreen, parameter[]]] begin[{] call[transaction.show, parameter[member[.navigationFragment]]] else begin[{] None end[}] call[transaction.setTransition, parameter[member[FragmentTransaction.TRANSIT_FRAGMENT_CLOSE]]] call[transaction.commit, parameter[]] call[.notifyOnPreferenceFragmentHidden, parameter[member[.preferenceFragment]]] assign[member[.preferenceFragment], literal[null]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[removePreferenceFragmentUnconditionally] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[isPreferenceFragmentShown] operator[SEP] operator[SEP] operator[SEP] { identifier[resetTitle] operator[SEP] operator[SEP] operator[SEP] identifier[hideToolbarNavigationIcon] operator[SEP] operator[SEP] operator[SEP] identifier[adaptBreadCrumbVisibility] operator[SEP] operator[SEP] operator[SEP] identifier[FragmentTransaction] identifier[transaction] operator[=] identifier[getSupportFragmentManager] operator[SEP] operator[SEP] operator[SEP] identifier[beginTransaction] operator[SEP] operator[SEP] operator[SEP] identifier[transaction] operator[SEP] identifier[remove] operator[SEP] identifier[preferenceFragment] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isSplitScreen] operator[SEP] operator[SEP] operator[SEP] { identifier[transaction] operator[SEP] identifier[show] operator[SEP] identifier[navigationFragment] operator[SEP] operator[SEP] } identifier[transaction] operator[SEP] identifier[setTransition] operator[SEP] identifier[FragmentTransaction] operator[SEP] identifier[TRANSIT_FRAGMENT_CLOSE] operator[SEP] operator[SEP] identifier[transaction] operator[SEP] identifier[commit] operator[SEP] operator[SEP] operator[SEP] identifier[notifyOnPreferenceFragmentHidden] operator[SEP] identifier[preferenceFragment] operator[SEP] operator[SEP] identifier[preferenceFragment] operator[=] Other[null] operator[SEP] } }
public int scanCStringLength() throws IOException { int pos = index; while (true) { while (pos < endIndex) { if (buffer[pos++] == '\0') { return pos - index; } } if (!readMore(STRING_SCAN_SPAN)) { throw new EOFException(); } pos = index; } }
class class_name[name] begin[{] method[scanCStringLength, return_type[type[int]], modifier[public], parameter[]] begin[{] local_variable[type[int], pos] while[literal[true]] begin[{] while[binary_operation[member[.pos], <, member[.endIndex]]] begin[{] if[binary_operation[member[.buffer], ==, literal['\0']]] begin[{] return[binary_operation[member[.pos], -, member[.index]]] else begin[{] None end[}] end[}] if[call[.readMore, parameter[member[.STRING_SCAN_SPAN]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=EOFException, sub_type=None)), label=None) else begin[{] None end[}] assign[member[.pos], member[.index]] end[}] end[}] END[}]
Keyword[public] Keyword[int] identifier[scanCStringLength] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[int] identifier[pos] operator[=] identifier[index] operator[SEP] Keyword[while] operator[SEP] literal[boolean] operator[SEP] { Keyword[while] operator[SEP] identifier[pos] operator[<] identifier[endIndex] operator[SEP] { Keyword[if] operator[SEP] identifier[buffer] operator[SEP] identifier[pos] operator[++] operator[SEP] operator[==] literal[String] operator[SEP] { Keyword[return] identifier[pos] operator[-] identifier[index] operator[SEP] } } Keyword[if] operator[SEP] operator[!] identifier[readMore] operator[SEP] identifier[STRING_SCAN_SPAN] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[EOFException] operator[SEP] operator[SEP] operator[SEP] } identifier[pos] operator[=] identifier[index] operator[SEP] } }
public void initialize(Server server) { serverFailureCounts = new MeasuredRate(failureCountSlidingWindowInterval); requestCountInWindow = new MeasuredRate(300000L); if (publisher == null) { dataDist = new DataDistribution(getBufferSize(), PERCENTS); publisher = new DataPublisher(dataDist, getPublishIntervalMillis()); publisher.start(); } this.server = server; }
class class_name[name] begin[{] method[initialize, return_type[void], modifier[public], parameter[server]] begin[{] assign[member[.serverFailureCounts], ClassCreator(arguments=[MemberReference(member=failureCountSlidingWindowInterval, 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=MeasuredRate, sub_type=None))] assign[member[.requestCountInWindow], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=300000L)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MeasuredRate, sub_type=None))] if[binary_operation[member[.publisher], ==, literal[null]]] begin[{] assign[member[.dataDist], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getBufferSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=PERCENTS, 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=DataDistribution, sub_type=None))] assign[member[.publisher], ClassCreator(arguments=[MemberReference(member=dataDist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getPublishIntervalMillis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DataPublisher, sub_type=None))] call[publisher.start, parameter[]] else begin[{] None end[}] assign[THIS[member[None.server]], member[.server]] end[}] END[}]
Keyword[public] Keyword[void] identifier[initialize] operator[SEP] identifier[Server] identifier[server] operator[SEP] { identifier[serverFailureCounts] operator[=] Keyword[new] identifier[MeasuredRate] operator[SEP] identifier[failureCountSlidingWindowInterval] operator[SEP] operator[SEP] identifier[requestCountInWindow] operator[=] Keyword[new] identifier[MeasuredRate] operator[SEP] Other[300000L] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[publisher] operator[==] Other[null] operator[SEP] { identifier[dataDist] operator[=] Keyword[new] identifier[DataDistribution] operator[SEP] identifier[getBufferSize] operator[SEP] operator[SEP] , identifier[PERCENTS] operator[SEP] operator[SEP] identifier[publisher] operator[=] Keyword[new] identifier[DataPublisher] operator[SEP] identifier[dataDist] , identifier[getPublishIntervalMillis] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[publisher] operator[SEP] identifier[start] operator[SEP] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[server] operator[=] identifier[server] operator[SEP] }
@Override public void handleNotification(Notification notification, Object handback) { if(notification instanceof MBeanServerNotification) { MBeanServerNotification mbeanNotification = (MBeanServerNotification) notification; if(mbeanNotification.getType().equals("JMX.mbean.registered")) { jmxTree = null; registerAsNotificationListener(mbeanNotification.getMBeanName()); } else if(mbeanNotification.getType().equals("JMX.mbean.unregistered")) { jmxTree = null; } } for (NotificationListener listener : listeners) { listener.handleNotification(notification, handback); } }
class class_name[name] begin[{] method[handleNotification, return_type[void], modifier[public], parameter[notification, handback]] begin[{] if[binary_operation[member[.notification], instanceof, type[MBeanServerNotification]]] begin[{] local_variable[type[MBeanServerNotification], mbeanNotification] if[call[mbeanNotification.getType, parameter[]]] begin[{] assign[member[.jmxTree], literal[null]] call[.registerAsNotificationListener, parameter[call[mbeanNotification.getMBeanName, parameter[]]]] else begin[{] if[call[mbeanNotification.getType, parameter[]]] begin[{] assign[member[.jmxTree], literal[null]] else begin[{] None end[}] end[}] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=notification, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=handback, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=handleNotification, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=listeners, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=listener)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NotificationListener, sub_type=None))), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[handleNotification] operator[SEP] identifier[Notification] identifier[notification] , identifier[Object] identifier[handback] operator[SEP] { Keyword[if] operator[SEP] identifier[notification] Keyword[instanceof] identifier[MBeanServerNotification] operator[SEP] { identifier[MBeanServerNotification] identifier[mbeanNotification] operator[=] operator[SEP] identifier[MBeanServerNotification] operator[SEP] identifier[notification] operator[SEP] Keyword[if] operator[SEP] identifier[mbeanNotification] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[jmxTree] operator[=] Other[null] operator[SEP] identifier[registerAsNotificationListener] operator[SEP] identifier[mbeanNotification] operator[SEP] identifier[getMBeanName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[mbeanNotification] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[jmxTree] operator[=] Other[null] operator[SEP] } } Keyword[for] operator[SEP] identifier[NotificationListener] identifier[listener] operator[:] identifier[listeners] operator[SEP] { identifier[listener] operator[SEP] identifier[handleNotification] operator[SEP] identifier[notification] , identifier[handback] operator[SEP] operator[SEP] } }
public BooleanExpr expand(BooleanExpr booleanExpr) { if (booleanExpr == null || booleanExpr instanceof ConstantBooleanExpr) { return booleanExpr; } Collector collector = new Collector(); booleanExpr.acceptVisitor(collector); if (!collector.foundIndexed) { return ConstantBooleanExpr.TRUE; } if (!collector.predicatesToRemove.isEmpty()) { int numCofactors = 1; for (PrimaryPredicateExpr e : collector.predicatesToRemove) { Replacer replacer1 = new Replacer(e, ConstantBooleanExpr.TRUE); BooleanExpr e1 = booleanExpr.acceptVisitor(replacer1); if (!replacer1.found) { continue; } if (e1 == ConstantBooleanExpr.TRUE) { return ConstantBooleanExpr.TRUE; } Replacer replacer2 = new Replacer(e, ConstantBooleanExpr.FALSE); BooleanExpr e2 = booleanExpr.acceptVisitor(replacer2); if (e2 == ConstantBooleanExpr.TRUE) { return ConstantBooleanExpr.TRUE; } if (e1 == ConstantBooleanExpr.FALSE) { booleanExpr = e2; } else if (e2 == ConstantBooleanExpr.FALSE) { booleanExpr = e1; } else { numCofactors *= 2; OrExpr disjunction; if (e1 instanceof OrExpr) { disjunction = (OrExpr) e1; if (e2 instanceof OrExpr) { disjunction.getChildren().addAll(((OrExpr) e2).getChildren()); } else { disjunction.getChildren().add(e2); } } else if (e2 instanceof OrExpr) { disjunction = (OrExpr) e2; disjunction.getChildren().add(e1); } else { disjunction = new OrExpr(e1, e2); } PredicateOptimisations.optimizePredicates(disjunction.getChildren(), false); booleanExpr = disjunction; } if (numCofactors > maxExpansionCofactors) { // expansion is too big, it's better to do full scan rather than search the index with a huge and // complex query that is a disjunction of many predicates so will very likely match everything anyway return ConstantBooleanExpr.TRUE; } } } return booleanExpr; }
class class_name[name] begin[{] method[expand, return_type[type[BooleanExpr]], modifier[public], parameter[booleanExpr]] begin[{] if[binary_operation[binary_operation[member[.booleanExpr], ==, literal[null]], ||, binary_operation[member[.booleanExpr], instanceof, type[ConstantBooleanExpr]]]] begin[{] return[member[.booleanExpr]] else begin[{] None end[}] local_variable[type[Collector], collector] call[booleanExpr.acceptVisitor, parameter[member[.collector]]] if[member[collector.foundIndexed]] begin[{] return[member[ConstantBooleanExpr.TRUE]] else begin[{] None end[}] if[call[collector.predicatesToRemove.isEmpty, parameter[]]] begin[{] local_variable[type[int], numCofactors] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=TRUE, postfix_operators=[], prefix_operators=[], qualifier=ConstantBooleanExpr, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Replacer, sub_type=None)), name=replacer1)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Replacer, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=replacer1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=acceptVisitor, postfix_operators=[], prefix_operators=[], qualifier=booleanExpr, selectors=[], type_arguments=None), name=e1)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BooleanExpr, sub_type=None)), IfStatement(condition=MemberReference(member=found, postfix_operators=[], prefix_operators=['!'], qualifier=replacer1, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=e1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=TRUE, postfix_operators=[], prefix_operators=[], qualifier=ConstantBooleanExpr, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=TRUE, postfix_operators=[], prefix_operators=[], qualifier=ConstantBooleanExpr, selectors=[]), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=FALSE, postfix_operators=[], prefix_operators=[], qualifier=ConstantBooleanExpr, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Replacer, sub_type=None)), name=replacer2)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Replacer, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=replacer2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=acceptVisitor, postfix_operators=[], prefix_operators=[], qualifier=booleanExpr, selectors=[], type_arguments=None), name=e2)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BooleanExpr, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=e2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=TRUE, postfix_operators=[], prefix_operators=[], qualifier=ConstantBooleanExpr, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=TRUE, postfix_operators=[], prefix_operators=[], qualifier=ConstantBooleanExpr, selectors=[]), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=e1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=FALSE, postfix_operators=[], prefix_operators=[], qualifier=ConstantBooleanExpr, selectors=[]), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=e2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=FALSE, postfix_operators=[], prefix_operators=[], qualifier=ConstantBooleanExpr, selectors=[]), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=numCofactors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=*=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=disjunction)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=OrExpr, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=e1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=OrExpr, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=e2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=OrExpr, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=disjunction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=e1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e2, 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=OrExpr, sub_type=None))), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=disjunction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MemberReference(member=e2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=OrExpr, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getChildren, postfix_operators=[], prefix_operators=[], qualifier=disjunction, selectors=[MethodInvocation(arguments=[MemberReference(member=e1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=disjunction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MemberReference(member=e1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=OrExpr, sub_type=None))), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=e2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=OrExpr, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getChildren, postfix_operators=[], prefix_operators=[], qualifier=disjunction, selectors=[MethodInvocation(arguments=[MemberReference(member=e2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getChildren, postfix_operators=[], prefix_operators=[], qualifier=disjunction, selectors=[MethodInvocation(arguments=[Cast(expression=MemberReference(member=e2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=OrExpr, sub_type=None))], member=addAll, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]))])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getChildren, postfix_operators=[], prefix_operators=[], qualifier=disjunction, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=optimizePredicates, postfix_operators=[], prefix_operators=[], qualifier=PredicateOptimisations, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=booleanExpr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=disjunction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=booleanExpr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=e1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=booleanExpr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=e2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=numCofactors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=maxExpansionCofactors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=TRUE, postfix_operators=[], prefix_operators=[], qualifier=ConstantBooleanExpr, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=predicatesToRemove, postfix_operators=[], prefix_operators=[], qualifier=collector, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PrimaryPredicateExpr, sub_type=None))), label=None) else begin[{] None end[}] return[member[.booleanExpr]] end[}] END[}]
Keyword[public] identifier[BooleanExpr] identifier[expand] operator[SEP] identifier[BooleanExpr] identifier[booleanExpr] operator[SEP] { Keyword[if] operator[SEP] identifier[booleanExpr] operator[==] Other[null] operator[||] identifier[booleanExpr] Keyword[instanceof] identifier[ConstantBooleanExpr] operator[SEP] { Keyword[return] identifier[booleanExpr] operator[SEP] } identifier[Collector] identifier[collector] operator[=] Keyword[new] identifier[Collector] operator[SEP] operator[SEP] operator[SEP] identifier[booleanExpr] operator[SEP] identifier[acceptVisitor] operator[SEP] identifier[collector] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[collector] operator[SEP] identifier[foundIndexed] operator[SEP] { Keyword[return] identifier[ConstantBooleanExpr] operator[SEP] identifier[TRUE] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[collector] operator[SEP] identifier[predicatesToRemove] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[int] identifier[numCofactors] operator[=] Other[1] operator[SEP] Keyword[for] operator[SEP] identifier[PrimaryPredicateExpr] identifier[e] operator[:] identifier[collector] operator[SEP] identifier[predicatesToRemove] operator[SEP] { identifier[Replacer] identifier[replacer1] operator[=] Keyword[new] identifier[Replacer] operator[SEP] identifier[e] , identifier[ConstantBooleanExpr] operator[SEP] identifier[TRUE] operator[SEP] operator[SEP] identifier[BooleanExpr] identifier[e1] operator[=] identifier[booleanExpr] operator[SEP] identifier[acceptVisitor] operator[SEP] identifier[replacer1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[replacer1] operator[SEP] identifier[found] operator[SEP] { Keyword[continue] operator[SEP] } Keyword[if] operator[SEP] identifier[e1] operator[==] identifier[ConstantBooleanExpr] operator[SEP] identifier[TRUE] operator[SEP] { Keyword[return] identifier[ConstantBooleanExpr] operator[SEP] identifier[TRUE] operator[SEP] } identifier[Replacer] identifier[replacer2] operator[=] Keyword[new] identifier[Replacer] operator[SEP] identifier[e] , identifier[ConstantBooleanExpr] operator[SEP] identifier[FALSE] operator[SEP] operator[SEP] identifier[BooleanExpr] identifier[e2] operator[=] identifier[booleanExpr] operator[SEP] identifier[acceptVisitor] operator[SEP] identifier[replacer2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[e2] operator[==] identifier[ConstantBooleanExpr] operator[SEP] identifier[TRUE] operator[SEP] { Keyword[return] identifier[ConstantBooleanExpr] operator[SEP] identifier[TRUE] operator[SEP] } Keyword[if] operator[SEP] identifier[e1] operator[==] identifier[ConstantBooleanExpr] operator[SEP] identifier[FALSE] operator[SEP] { identifier[booleanExpr] operator[=] identifier[e2] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[e2] operator[==] identifier[ConstantBooleanExpr] operator[SEP] identifier[FALSE] operator[SEP] { identifier[booleanExpr] operator[=] identifier[e1] operator[SEP] } Keyword[else] { identifier[numCofactors] operator[*=] Other[2] operator[SEP] identifier[OrExpr] identifier[disjunction] operator[SEP] Keyword[if] operator[SEP] identifier[e1] Keyword[instanceof] identifier[OrExpr] operator[SEP] { identifier[disjunction] operator[=] operator[SEP] identifier[OrExpr] operator[SEP] identifier[e1] operator[SEP] Keyword[if] operator[SEP] identifier[e2] Keyword[instanceof] identifier[OrExpr] operator[SEP] { identifier[disjunction] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] identifier[addAll] operator[SEP] operator[SEP] operator[SEP] identifier[OrExpr] operator[SEP] identifier[e2] operator[SEP] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[disjunction] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[e2] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[e2] Keyword[instanceof] identifier[OrExpr] operator[SEP] { identifier[disjunction] operator[=] operator[SEP] identifier[OrExpr] operator[SEP] identifier[e2] operator[SEP] identifier[disjunction] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[e1] operator[SEP] operator[SEP] } Keyword[else] { identifier[disjunction] operator[=] Keyword[new] identifier[OrExpr] operator[SEP] identifier[e1] , identifier[e2] operator[SEP] operator[SEP] } identifier[PredicateOptimisations] operator[SEP] identifier[optimizePredicates] operator[SEP] identifier[disjunction] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] identifier[booleanExpr] operator[=] identifier[disjunction] operator[SEP] } Keyword[if] operator[SEP] identifier[numCofactors] operator[>] identifier[maxExpansionCofactors] operator[SEP] { Keyword[return] identifier[ConstantBooleanExpr] operator[SEP] identifier[TRUE] operator[SEP] } } } Keyword[return] identifier[booleanExpr] operator[SEP] }
public CoinbaseTransaction requestMoneyCoinbaseRequest( CoinbaseRequestMoneyRequest transactionRequest) throws IOException { final CoinbaseTransaction pendingTransaction = coinbase.requestMoney( new CoinbaseTransaction(transactionRequest), exchange.getExchangeSpecification().getApiKey(), signatureCreator, exchange.getNonceFactory()); return handleResponse(pendingTransaction); }
class class_name[name] begin[{] method[requestMoneyCoinbaseRequest, return_type[type[CoinbaseTransaction]], modifier[public], parameter[transactionRequest]] begin[{] local_variable[type[CoinbaseTransaction], pendingTransaction] return[call[.handleResponse, parameter[member[.pendingTransaction]]]] end[}] END[}]
Keyword[public] identifier[CoinbaseTransaction] identifier[requestMoneyCoinbaseRequest] operator[SEP] identifier[CoinbaseRequestMoneyRequest] identifier[transactionRequest] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[final] identifier[CoinbaseTransaction] identifier[pendingTransaction] operator[=] identifier[coinbase] operator[SEP] identifier[requestMoney] operator[SEP] Keyword[new] identifier[CoinbaseTransaction] operator[SEP] identifier[transactionRequest] operator[SEP] , identifier[exchange] operator[SEP] identifier[getExchangeSpecification] operator[SEP] operator[SEP] operator[SEP] identifier[getApiKey] operator[SEP] operator[SEP] , identifier[signatureCreator] , identifier[exchange] operator[SEP] identifier[getNonceFactory] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[handleResponse] operator[SEP] identifier[pendingTransaction] operator[SEP] operator[SEP] }
public static MD5Hash computeMd5ForFile(File dataFile) throws IOException { InputStream in = new FileInputStream(dataFile); try { MessageDigest digester = MD5Hash.getDigester(); DigestInputStream dis = new DigestInputStream(in, digester); IOUtils.copyBytes(dis, new IOUtils.NullOutputStream(), 128*1024, false); return new MD5Hash(digester.digest()); } finally { IOUtils.closeStream(in); } }
class class_name[name] begin[{] method[computeMd5ForFile, return_type[type[MD5Hash]], modifier[public static], parameter[dataFile]] begin[{] local_variable[type[InputStream], in] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getDigester, postfix_operators=[], prefix_operators=[], qualifier=MD5Hash, selectors=[], type_arguments=None), name=digester)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MessageDigest, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=digester, 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=DigestInputStream, sub_type=None)), name=dis)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DigestInputStream, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=dis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOUtils, sub_type=ReferenceType(arguments=None, dimensions=None, name=NullOutputStream, sub_type=None))), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=128), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1024), operator=*), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=copyBytes, postfix_operators=[], prefix_operators=[], qualifier=IOUtils, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=digest, postfix_operators=[], prefix_operators=[], qualifier=digester, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MD5Hash, sub_type=None)), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=closeStream, postfix_operators=[], prefix_operators=[], qualifier=IOUtils, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[MD5Hash] identifier[computeMd5ForFile] operator[SEP] identifier[File] identifier[dataFile] operator[SEP] Keyword[throws] identifier[IOException] { identifier[InputStream] identifier[in] operator[=] Keyword[new] identifier[FileInputStream] operator[SEP] identifier[dataFile] operator[SEP] operator[SEP] Keyword[try] { identifier[MessageDigest] identifier[digester] operator[=] identifier[MD5Hash] operator[SEP] identifier[getDigester] operator[SEP] operator[SEP] operator[SEP] identifier[DigestInputStream] identifier[dis] operator[=] Keyword[new] identifier[DigestInputStream] operator[SEP] identifier[in] , identifier[digester] operator[SEP] operator[SEP] identifier[IOUtils] operator[SEP] identifier[copyBytes] operator[SEP] identifier[dis] , Keyword[new] identifier[IOUtils] operator[SEP] identifier[NullOutputStream] operator[SEP] operator[SEP] , Other[128] operator[*] Other[1024] , literal[boolean] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[MD5Hash] operator[SEP] identifier[digester] operator[SEP] identifier[digest] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { identifier[IOUtils] operator[SEP] identifier[closeStream] operator[SEP] identifier[in] operator[SEP] operator[SEP] } }
public static <T> CompletableFuture<Void> allOf(Collection<CompletableFuture<T>> futures) { return CompletableFuture.allOf(futures.toArray(new CompletableFuture[futures.size()])); }
class class_name[name] begin[{] method[allOf, return_type[type[CompletableFuture]], modifier[public static], parameter[futures]] begin[{] return[call[CompletableFuture.allOf, parameter[call[futures.toArray, parameter[ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=futures, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CompletableFuture, sub_type=None))]]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[CompletableFuture] operator[<] identifier[Void] operator[>] identifier[allOf] operator[SEP] identifier[Collection] operator[<] identifier[CompletableFuture] operator[<] identifier[T] operator[>] operator[>] identifier[futures] operator[SEP] { Keyword[return] identifier[CompletableFuture] operator[SEP] identifier[allOf] operator[SEP] identifier[futures] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[CompletableFuture] operator[SEP] identifier[futures] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private final String getValidJPAColumnName() { String name = null; if (member.isAnnotationPresent(Column.class)) { Column c = member.getAnnotation(Column.class); if (!c.name().isEmpty()) { name = c.name(); } } if (member.isAnnotationPresent(Temporal.class)) { if (!member.getType().equals(Date.class)) { log.error("@Temporal must map to java.util.Date for @Entity(" + managedType.getJavaType() + "." + member.getName() + ")"); return name; } } else if (member.isAnnotationPresent(JoinColumn.class)) { JoinColumn c = member.getAnnotation(JoinColumn.class); if (!c.name().isEmpty()) { name = c.name(); } } else if (member.isAnnotationPresent(CollectionTable.class)) { CollectionTable c = member.getAnnotation(CollectionTable.class); if (!c.name().isEmpty()) { name = c.name(); } } return name == null ? getName() : name; }
class class_name[name] begin[{] method[getValidJPAColumnName, return_type[type[String]], modifier[final private], parameter[]] begin[{] local_variable[type[String], name] if[call[member.isAnnotationPresent, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Column, sub_type=None))]]] begin[{] local_variable[type[Column], c] if[call[c.name, parameter[]]] begin[{] assign[member[.name], call[c.name, parameter[]]] else begin[{] None end[}] else begin[{] None end[}] if[call[member.isAnnotationPresent, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Temporal, sub_type=None))]]] begin[{] if[call[member.getType, parameter[]]] begin[{] call[log.error, parameter[binary_operation[binary_operation[binary_operation[binary_operation[literal["@Temporal must map to java.util.Date for @Entity("], +, call[managedType.getJavaType, parameter[]]], +, literal["."]], +, call[member.getName, parameter[]]], +, literal[")"]]]] return[member[.name]] else begin[{] None end[}] else begin[{] if[call[member.isAnnotationPresent, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JoinColumn, sub_type=None))]]] begin[{] local_variable[type[JoinColumn], c] if[call[c.name, parameter[]]] begin[{] assign[member[.name], call[c.name, parameter[]]] else begin[{] None end[}] else begin[{] if[call[member.isAnnotationPresent, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CollectionTable, sub_type=None))]]] begin[{] local_variable[type[CollectionTable], c] if[call[c.name, parameter[]]] begin[{] assign[member[.name], call[c.name, parameter[]]] else begin[{] None end[}] else begin[{] None end[}] end[}] end[}] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None))] end[}] END[}]
Keyword[private] Keyword[final] identifier[String] identifier[getValidJPAColumnName] operator[SEP] operator[SEP] { identifier[String] identifier[name] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[member] operator[SEP] identifier[isAnnotationPresent] operator[SEP] identifier[Column] operator[SEP] Keyword[class] operator[SEP] operator[SEP] { identifier[Column] identifier[c] operator[=] identifier[member] operator[SEP] identifier[getAnnotation] operator[SEP] identifier[Column] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[c] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[name] operator[=] identifier[c] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[member] operator[SEP] identifier[isAnnotationPresent] operator[SEP] identifier[Temporal] operator[SEP] Keyword[class] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[member] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[Date] operator[SEP] Keyword[class] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[managedType] operator[SEP] identifier[getJavaType] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[member] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[name] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[member] operator[SEP] identifier[isAnnotationPresent] operator[SEP] identifier[JoinColumn] operator[SEP] Keyword[class] operator[SEP] operator[SEP] { identifier[JoinColumn] identifier[c] operator[=] identifier[member] operator[SEP] identifier[getAnnotation] operator[SEP] identifier[JoinColumn] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[c] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[name] operator[=] identifier[c] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[member] operator[SEP] identifier[isAnnotationPresent] operator[SEP] identifier[CollectionTable] operator[SEP] Keyword[class] operator[SEP] operator[SEP] { identifier[CollectionTable] identifier[c] operator[=] identifier[member] operator[SEP] identifier[getAnnotation] operator[SEP] identifier[CollectionTable] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[c] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[name] operator[=] identifier[c] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[name] operator[==] Other[null] operator[?] identifier[getName] operator[SEP] operator[SEP] operator[:] identifier[name] operator[SEP] }
public void close(final LogNode log) { if (!closed.getAndSet(true)) { if (inflaterRecycler != null) { inflaterRecycler.forceClose(); inflaterRecycler = null; } if (moduleRefToModuleReaderProxyRecyclerMap != null) { try { for (final Recycler<ModuleReaderProxy, IOException> recycler : // moduleRefToModuleReaderProxyRecyclerMap.values()) { recycler.forceClose(); } } catch (final InterruptedException e) { interruptionChecker.interrupt(); } moduleRefToModuleReaderProxyRecyclerMap.clear(); moduleRefToModuleReaderProxyRecyclerMap = null; } if (zipFileSliceToLogicalZipFileMap != null) { zipFileSliceToLogicalZipFileMap.clear(); zipFileSliceToLogicalZipFileMap = null; } if (nestedPathToLogicalZipFileAndPackageRootMap != null) { nestedPathToLogicalZipFileAndPackageRootMap.clear(); nestedPathToLogicalZipFileAndPackageRootMap = null; } for (LogicalZipFile logicalZipFile; (logicalZipFile = allocatedLogicalZipFiles.poll()) != null;) { logicalZipFile.close(); } if (canonicalFileToPhysicalZipFileMap != null) { try { for (final PhysicalZipFile physicalZipFile : canonicalFileToPhysicalZipFileMap.values()) { physicalZipFile.close(); } } catch (final InterruptedException e) { interruptionChecker.interrupt(); } canonicalFileToPhysicalZipFileMap.clear(); canonicalFileToPhysicalZipFileMap = null; } if (additionalAllocatedPhysicalZipFiles != null) { for (PhysicalZipFile physicalZipFile; (physicalZipFile = additionalAllocatedPhysicalZipFiles .poll()) != null;) { physicalZipFile.close(); } additionalAllocatedPhysicalZipFiles.clear(); additionalAllocatedPhysicalZipFiles = null; } if (fastZipEntryToZipFileSliceMap != null) { fastZipEntryToZipFileSliceMap.clear(); fastZipEntryToZipFileSliceMap = null; } // Temp files have to be deleted last, after all PhysicalZipFiles are closed if (tempFiles != null) { final LogNode rmLog = tempFiles.isEmpty() || log == null ? null : log.log("Removing temporary files"); while (!tempFiles.isEmpty()) { final File tempFile = tempFiles.removeLast(); try { Files.delete(tempFile.toPath()); } catch (final IOException | SecurityException e) { if (rmLog != null) { rmLog.log("Removing temporary file failed: " + e); } } } tempFiles.clear(); tempFiles = null; } } }
class class_name[name] begin[{] method[close, return_type[void], modifier[public], parameter[log]] begin[{] if[call[closed.getAndSet, parameter[literal[true]]]] begin[{] if[binary_operation[member[.inflaterRecycler], !=, literal[null]]] begin[{] call[inflaterRecycler.forceClose, parameter[]] assign[member[.inflaterRecycler], literal[null]] else begin[{] None end[}] if[binary_operation[member[.moduleRefToModuleReaderProxyRecyclerMap], !=, literal[null]]] begin[{] TryStatement(block=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=forceClose, postfix_operators=[], prefix_operators=[], qualifier=recycler, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=moduleRefToModuleReaderProxyRecyclerMap, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=recycler)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ModuleReaderProxy, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=IOException, sub_type=None))], dimensions=[], name=Recycler, sub_type=None))), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=interrupt, postfix_operators=[], prefix_operators=[], qualifier=interruptionChecker, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InterruptedException']))], finally_block=None, label=None, resources=None) call[moduleRefToModuleReaderProxyRecyclerMap.clear, parameter[]] assign[member[.moduleRefToModuleReaderProxyRecyclerMap], literal[null]] else begin[{] None end[}] if[binary_operation[member[.zipFileSliceToLogicalZipFileMap], !=, literal[null]]] begin[{] call[zipFileSliceToLogicalZipFileMap.clear, parameter[]] assign[member[.zipFileSliceToLogicalZipFileMap], literal[null]] else begin[{] None end[}] if[binary_operation[member[.nestedPathToLogicalZipFileAndPackageRootMap], !=, literal[null]]] begin[{] call[nestedPathToLogicalZipFileAndPackageRootMap.clear, parameter[]] assign[member[.nestedPathToLogicalZipFileAndPackageRootMap], literal[null]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=logicalZipFile, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=logicalZipFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=poll, postfix_operators=[], prefix_operators=[], qualifier=allocatedLogicalZipFiles, selectors=[], type_arguments=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=logicalZipFile)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=LogicalZipFile, sub_type=None)), update=None), label=None) if[binary_operation[member[.canonicalFileToPhysicalZipFileMap], !=, literal[null]]] begin[{] TryStatement(block=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=physicalZipFile, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=canonicalFileToPhysicalZipFileMap, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=physicalZipFile)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=PhysicalZipFile, sub_type=None))), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=interrupt, postfix_operators=[], prefix_operators=[], qualifier=interruptionChecker, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InterruptedException']))], finally_block=None, label=None, resources=None) call[canonicalFileToPhysicalZipFileMap.clear, parameter[]] assign[member[.canonicalFileToPhysicalZipFileMap], literal[null]] else begin[{] None end[}] if[binary_operation[member[.additionalAllocatedPhysicalZipFiles], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=physicalZipFile, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=physicalZipFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=poll, postfix_operators=[], prefix_operators=[], qualifier=additionalAllocatedPhysicalZipFiles, selectors=[], type_arguments=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=physicalZipFile)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PhysicalZipFile, sub_type=None)), update=None), label=None) call[additionalAllocatedPhysicalZipFiles.clear, parameter[]] assign[member[.additionalAllocatedPhysicalZipFiles], literal[null]] else begin[{] None end[}] if[binary_operation[member[.fastZipEntryToZipFileSliceMap], !=, literal[null]]] begin[{] call[fastZipEntryToZipFileSliceMap.clear, parameter[]] assign[member[.fastZipEntryToZipFileSliceMap], literal[null]] else begin[{] None end[}] if[binary_operation[member[.tempFiles], !=, literal[null]]] begin[{] local_variable[type[LogNode], rmLog] while[call[tempFiles.isEmpty, parameter[]]] begin[{] local_variable[type[File], tempFile] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toPath, postfix_operators=[], prefix_operators=[], qualifier=tempFile, selectors=[], type_arguments=None)], member=delete, postfix_operators=[], prefix_operators=[], qualifier=Files, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=rmLog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Removing temporary file failed: "), operandr=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=log, postfix_operators=[], prefix_operators=[], qualifier=rmLog, selectors=[], type_arguments=None), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException', 'SecurityException']))], finally_block=None, label=None, resources=None) end[}] call[tempFiles.clear, parameter[]] assign[member[.tempFiles], literal[null]] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[close] operator[SEP] Keyword[final] identifier[LogNode] identifier[log] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[closed] operator[SEP] identifier[getAndSet] operator[SEP] literal[boolean] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[inflaterRecycler] operator[!=] Other[null] operator[SEP] { identifier[inflaterRecycler] operator[SEP] identifier[forceClose] operator[SEP] operator[SEP] operator[SEP] identifier[inflaterRecycler] operator[=] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[moduleRefToModuleReaderProxyRecyclerMap] operator[!=] Other[null] operator[SEP] { Keyword[try] { Keyword[for] operator[SEP] Keyword[final] identifier[Recycler] operator[<] identifier[ModuleReaderProxy] , identifier[IOException] operator[>] identifier[recycler] operator[:] identifier[moduleRefToModuleReaderProxyRecyclerMap] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { identifier[recycler] operator[SEP] identifier[forceClose] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] Keyword[final] identifier[InterruptedException] identifier[e] operator[SEP] { identifier[interruptionChecker] operator[SEP] identifier[interrupt] operator[SEP] operator[SEP] operator[SEP] } identifier[moduleRefToModuleReaderProxyRecyclerMap] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[moduleRefToModuleReaderProxyRecyclerMap] operator[=] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[zipFileSliceToLogicalZipFileMap] operator[!=] Other[null] operator[SEP] { identifier[zipFileSliceToLogicalZipFileMap] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[zipFileSliceToLogicalZipFileMap] operator[=] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[nestedPathToLogicalZipFileAndPackageRootMap] operator[!=] Other[null] operator[SEP] { identifier[nestedPathToLogicalZipFileAndPackageRootMap] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[nestedPathToLogicalZipFileAndPackageRootMap] operator[=] Other[null] operator[SEP] } Keyword[for] operator[SEP] identifier[LogicalZipFile] identifier[logicalZipFile] operator[SEP] operator[SEP] identifier[logicalZipFile] operator[=] identifier[allocatedLogicalZipFiles] operator[SEP] identifier[poll] operator[SEP] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] operator[SEP] { identifier[logicalZipFile] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[canonicalFileToPhysicalZipFileMap] operator[!=] Other[null] operator[SEP] { Keyword[try] { Keyword[for] operator[SEP] Keyword[final] identifier[PhysicalZipFile] identifier[physicalZipFile] operator[:] identifier[canonicalFileToPhysicalZipFileMap] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { identifier[physicalZipFile] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] Keyword[final] identifier[InterruptedException] identifier[e] operator[SEP] { identifier[interruptionChecker] operator[SEP] identifier[interrupt] operator[SEP] operator[SEP] operator[SEP] } identifier[canonicalFileToPhysicalZipFileMap] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[canonicalFileToPhysicalZipFileMap] operator[=] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[additionalAllocatedPhysicalZipFiles] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[PhysicalZipFile] identifier[physicalZipFile] operator[SEP] operator[SEP] identifier[physicalZipFile] operator[=] identifier[additionalAllocatedPhysicalZipFiles] operator[SEP] identifier[poll] operator[SEP] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] operator[SEP] { identifier[physicalZipFile] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } identifier[additionalAllocatedPhysicalZipFiles] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[additionalAllocatedPhysicalZipFiles] operator[=] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[fastZipEntryToZipFileSliceMap] operator[!=] Other[null] operator[SEP] { identifier[fastZipEntryToZipFileSliceMap] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[fastZipEntryToZipFileSliceMap] operator[=] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[tempFiles] operator[!=] Other[null] operator[SEP] { Keyword[final] identifier[LogNode] identifier[rmLog] operator[=] identifier[tempFiles] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[||] identifier[log] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[log] operator[SEP] identifier[log] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[while] operator[SEP] operator[!] identifier[tempFiles] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[File] identifier[tempFile] operator[=] identifier[tempFiles] operator[SEP] identifier[removeLast] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[Files] operator[SEP] identifier[delete] operator[SEP] identifier[tempFile] operator[SEP] identifier[toPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[IOException] operator[|] identifier[SecurityException] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[rmLog] operator[!=] Other[null] operator[SEP] { identifier[rmLog] operator[SEP] identifier[log] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] operator[SEP] } } } identifier[tempFiles] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[tempFiles] operator[=] Other[null] operator[SEP] } } }
public static Object[] toObjectArray(Object array) { //fixme 以下写法太丑陋,其实可以简单实现 if (!array.getClass().isArray()) { throw new IllegalArgumentException("入参必须是数组"); } if (int[].class.isInstance(array)) { int[] intArr = int[].class.cast(array); Integer[] objArr = new Integer[intArr.length]; for (int i = 0; i < intArr.length; i++) { objArr[i] = intArr[i]; } return objArr; } if (long[].class.isInstance(array)) { long[] longArr = long[].class.cast(array); Long[] objArr = new Long[longArr.length]; for (int i = 0; i < longArr.length; i++) { objArr[i] = longArr[i]; } return objArr; } if (short[].class.isInstance(array)) { short[] arr = short[].class.cast(array); Short[] objArr = new Short[arr.length]; for (int i = 0; i < arr.length; i++) { objArr[i] = arr[i]; } return objArr; } if (float[].class.isInstance(array)) { float[] arr = float[].class.cast(array); Float[] objArr = new Float[arr.length]; for (int i = 0; i < arr.length; i++) { objArr[i] = arr[i]; } return objArr; } if (double[].class.isInstance(array)) { double[] arr = double[].class.cast(array); Double[] objArr = new Double[arr.length]; for (int i = 0; i < arr.length; i++) { objArr[i] = arr[i]; } return objArr; } if (char[].class.isInstance(array)) { char[] arr = char[].class.cast(array); Character[] objArr = new Character[arr.length]; for (int i = 0; i < arr.length; i++) { objArr[i] = arr[i]; } return objArr; } if (byte[].class.isInstance(array)) { byte[] arr = byte[].class.cast(array); Byte[] objArr = new Byte[arr.length]; for (int i = 0; i < arr.length; i++) { objArr[i] = arr[i]; } return objArr; } if (boolean[].class.isInstance(array)) { boolean[] arr = boolean[].class.cast(array); Boolean[] objArr = new Boolean[arr.length]; for (int i = 0; i < arr.length; i++) { objArr[i] = arr[i]; } return objArr; } return Object[].class.cast(array); }
class class_name[name] begin[{] method[toObjectArray, return_type[type[Object]], modifier[public static], parameter[array]] begin[{] if[call[array.getClass, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="入参必须是数组")], 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[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isInstance, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=BasicType(dimensions=[None], name=int))] begin[{] local_variable[type[int], intArr] local_variable[type[Integer], objArr] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=objArr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=intArr, 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=intArr, 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[.objArr]] else begin[{] None end[}] if[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isInstance, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=BasicType(dimensions=[None], name=long))] begin[{] local_variable[type[long], longArr] local_variable[type[Long], objArr] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=objArr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=longArr, 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=longArr, 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[.objArr]] else begin[{] None end[}] if[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isInstance, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=BasicType(dimensions=[None], name=short))] begin[{] local_variable[type[short], arr] local_variable[type[Short], objArr] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=objArr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=arr, 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=arr, 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[.objArr]] else begin[{] None end[}] if[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isInstance, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=BasicType(dimensions=[None], name=float))] begin[{] local_variable[type[float], arr] local_variable[type[Float], objArr] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=objArr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=arr, 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=arr, 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[.objArr]] else begin[{] None end[}] if[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isInstance, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=BasicType(dimensions=[None], name=double))] begin[{] local_variable[type[double], arr] local_variable[type[Double], objArr] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=objArr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=arr, 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=arr, 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[.objArr]] else begin[{] None end[}] if[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isInstance, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=BasicType(dimensions=[None], name=char))] begin[{] local_variable[type[char], arr] local_variable[type[Character], objArr] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=objArr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=arr, 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=arr, 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[.objArr]] else begin[{] None end[}] if[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isInstance, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=BasicType(dimensions=[None], name=byte))] begin[{] local_variable[type[byte], arr] local_variable[type[Byte], objArr] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=objArr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=arr, 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=arr, 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[.objArr]] else begin[{] None end[}] if[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isInstance, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=BasicType(dimensions=[None], name=boolean))] begin[{] local_variable[type[boolean], arr] local_variable[type[Boolean], objArr] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=objArr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=arr, 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=arr, 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[.objArr]] else begin[{] None end[}] return[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=cast, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Object] operator[SEP] operator[SEP] identifier[toObjectArray] operator[SEP] identifier[Object] identifier[array] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[array] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[isArray] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[int] operator[SEP] operator[SEP] operator[SEP] Keyword[class] operator[SEP] identifier[isInstance] operator[SEP] identifier[array] operator[SEP] operator[SEP] { Keyword[int] operator[SEP] operator[SEP] identifier[intArr] operator[=] Keyword[int] operator[SEP] operator[SEP] operator[SEP] Keyword[class] operator[SEP] identifier[cast] operator[SEP] identifier[array] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] operator[SEP] identifier[objArr] operator[=] Keyword[new] identifier[Integer] operator[SEP] identifier[intArr] 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[intArr] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[objArr] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[intArr] operator[SEP] identifier[i] operator[SEP] operator[SEP] } Keyword[return] identifier[objArr] operator[SEP] } Keyword[if] operator[SEP] Keyword[long] operator[SEP] operator[SEP] operator[SEP] Keyword[class] operator[SEP] identifier[isInstance] operator[SEP] identifier[array] operator[SEP] operator[SEP] { Keyword[long] operator[SEP] operator[SEP] identifier[longArr] operator[=] Keyword[long] operator[SEP] operator[SEP] operator[SEP] Keyword[class] operator[SEP] identifier[cast] operator[SEP] identifier[array] operator[SEP] operator[SEP] identifier[Long] operator[SEP] operator[SEP] identifier[objArr] operator[=] Keyword[new] identifier[Long] operator[SEP] identifier[longArr] 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[longArr] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[objArr] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[longArr] operator[SEP] identifier[i] operator[SEP] operator[SEP] } Keyword[return] identifier[objArr] operator[SEP] } Keyword[if] operator[SEP] Keyword[short] operator[SEP] operator[SEP] operator[SEP] Keyword[class] operator[SEP] identifier[isInstance] operator[SEP] identifier[array] operator[SEP] operator[SEP] { Keyword[short] operator[SEP] operator[SEP] identifier[arr] operator[=] Keyword[short] operator[SEP] operator[SEP] operator[SEP] Keyword[class] operator[SEP] identifier[cast] operator[SEP] identifier[array] operator[SEP] operator[SEP] identifier[Short] operator[SEP] operator[SEP] identifier[objArr] operator[=] Keyword[new] identifier[Short] operator[SEP] identifier[arr] 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[arr] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[objArr] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[arr] operator[SEP] identifier[i] operator[SEP] operator[SEP] } Keyword[return] identifier[objArr] operator[SEP] } Keyword[if] operator[SEP] Keyword[float] operator[SEP] operator[SEP] operator[SEP] Keyword[class] operator[SEP] identifier[isInstance] operator[SEP] identifier[array] operator[SEP] operator[SEP] { Keyword[float] operator[SEP] operator[SEP] identifier[arr] operator[=] Keyword[float] operator[SEP] operator[SEP] operator[SEP] Keyword[class] operator[SEP] identifier[cast] operator[SEP] identifier[array] operator[SEP] operator[SEP] identifier[Float] operator[SEP] operator[SEP] identifier[objArr] operator[=] Keyword[new] identifier[Float] operator[SEP] identifier[arr] 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[arr] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[objArr] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[arr] operator[SEP] identifier[i] operator[SEP] operator[SEP] } Keyword[return] identifier[objArr] operator[SEP] } Keyword[if] operator[SEP] Keyword[double] operator[SEP] operator[SEP] operator[SEP] Keyword[class] operator[SEP] identifier[isInstance] operator[SEP] identifier[array] operator[SEP] operator[SEP] { Keyword[double] operator[SEP] operator[SEP] identifier[arr] operator[=] Keyword[double] operator[SEP] operator[SEP] operator[SEP] Keyword[class] operator[SEP] identifier[cast] operator[SEP] identifier[array] operator[SEP] operator[SEP] identifier[Double] operator[SEP] operator[SEP] identifier[objArr] operator[=] Keyword[new] identifier[Double] operator[SEP] identifier[arr] 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[arr] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[objArr] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[arr] operator[SEP] identifier[i] operator[SEP] operator[SEP] } Keyword[return] identifier[objArr] operator[SEP] } Keyword[if] operator[SEP] Keyword[char] operator[SEP] operator[SEP] operator[SEP] Keyword[class] operator[SEP] identifier[isInstance] operator[SEP] identifier[array] operator[SEP] operator[SEP] { Keyword[char] operator[SEP] operator[SEP] identifier[arr] operator[=] Keyword[char] operator[SEP] operator[SEP] operator[SEP] Keyword[class] operator[SEP] identifier[cast] operator[SEP] identifier[array] operator[SEP] operator[SEP] identifier[Character] operator[SEP] operator[SEP] identifier[objArr] operator[=] Keyword[new] identifier[Character] operator[SEP] identifier[arr] 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[arr] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[objArr] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[arr] operator[SEP] identifier[i] operator[SEP] operator[SEP] } Keyword[return] identifier[objArr] operator[SEP] } Keyword[if] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] Keyword[class] operator[SEP] identifier[isInstance] operator[SEP] identifier[array] operator[SEP] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[arr] operator[=] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] Keyword[class] operator[SEP] identifier[cast] operator[SEP] identifier[array] operator[SEP] operator[SEP] identifier[Byte] operator[SEP] operator[SEP] identifier[objArr] operator[=] Keyword[new] identifier[Byte] operator[SEP] identifier[arr] 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[arr] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[objArr] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[arr] operator[SEP] identifier[i] operator[SEP] operator[SEP] } Keyword[return] identifier[objArr] operator[SEP] } Keyword[if] operator[SEP] Keyword[boolean] operator[SEP] operator[SEP] operator[SEP] Keyword[class] operator[SEP] identifier[isInstance] operator[SEP] identifier[array] operator[SEP] operator[SEP] { Keyword[boolean] operator[SEP] operator[SEP] identifier[arr] operator[=] Keyword[boolean] operator[SEP] operator[SEP] operator[SEP] Keyword[class] operator[SEP] identifier[cast] operator[SEP] identifier[array] operator[SEP] operator[SEP] identifier[Boolean] operator[SEP] operator[SEP] identifier[objArr] operator[=] Keyword[new] identifier[Boolean] operator[SEP] identifier[arr] 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[arr] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[objArr] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[arr] operator[SEP] identifier[i] operator[SEP] operator[SEP] } Keyword[return] identifier[objArr] operator[SEP] } Keyword[return] identifier[Object] operator[SEP] operator[SEP] operator[SEP] Keyword[class] operator[SEP] identifier[cast] operator[SEP] identifier[array] operator[SEP] operator[SEP] }
public static boolean isDuplicated(final String input) { int len = input.length(); if (len % 2 == 0) { int half = len / 2; if (hasEqualParts(input, half, half)) { return true; } if (input.substring(half, half + 1).equals(" ") && input.substring(half - 1, half).matches("[;,]")) { return hasEqualParts(input, half - 1, half + 1); } } else { int half = len / 2; String middlePart = input.substring(half - 1, half + 2); if (isSpaceCommaSpace(middlePart)) { return hasEqualParts(input, half - 1, half + 2); } else if (isCommaInTheMiddle(middlePart) || isLineBreakInTheMiddle(middlePart)) { return hasEqualParts(input, half, half + 1); } } return false; }
class class_name[name] begin[{] method[isDuplicated, return_type[type[boolean]], modifier[public static], parameter[input]] begin[{] local_variable[type[int], len] if[binary_operation[binary_operation[member[.len], %, literal[2]], ==, literal[0]]] begin[{] local_variable[type[int], half] if[call[.hasEqualParts, parameter[member[.input], member[.half], member[.half]]]] begin[{] return[literal[true]] else begin[{] None end[}] if[binary_operation[call[input.substring, parameter[member[.half], binary_operation[member[.half], +, literal[1]]]], &&, call[input.substring, parameter[binary_operation[member[.half], -, literal[1]], member[.half]]]]] begin[{] return[call[.hasEqualParts, parameter[member[.input], binary_operation[member[.half], -, literal[1]], binary_operation[member[.half], +, literal[1]]]]] else begin[{] None end[}] else begin[{] local_variable[type[int], half] local_variable[type[String], middlePart] if[call[.isSpaceCommaSpace, parameter[member[.middlePart]]]] begin[{] return[call[.hasEqualParts, parameter[member[.input], binary_operation[member[.half], -, literal[1]], binary_operation[member[.half], +, literal[2]]]]] else begin[{] if[binary_operation[call[.isCommaInTheMiddle, parameter[member[.middlePart]]], ||, call[.isLineBreakInTheMiddle, parameter[member[.middlePart]]]]] begin[{] return[call[.hasEqualParts, parameter[member[.input], member[.half], binary_operation[member[.half], +, literal[1]]]]] else begin[{] None end[}] end[}] end[}] return[literal[false]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isDuplicated] operator[SEP] Keyword[final] identifier[String] identifier[input] operator[SEP] { Keyword[int] identifier[len] operator[=] identifier[input] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[len] operator[%] Other[2] operator[==] Other[0] operator[SEP] { Keyword[int] identifier[half] operator[=] identifier[len] operator[/] Other[2] operator[SEP] Keyword[if] operator[SEP] identifier[hasEqualParts] operator[SEP] identifier[input] , identifier[half] , identifier[half] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[input] operator[SEP] identifier[substring] operator[SEP] identifier[half] , identifier[half] operator[+] Other[1] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[&&] identifier[input] operator[SEP] identifier[substring] operator[SEP] identifier[half] operator[-] Other[1] , identifier[half] operator[SEP] operator[SEP] identifier[matches] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] identifier[hasEqualParts] operator[SEP] identifier[input] , identifier[half] operator[-] Other[1] , identifier[half] operator[+] Other[1] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[int] identifier[half] operator[=] identifier[len] operator[/] Other[2] operator[SEP] identifier[String] identifier[middlePart] operator[=] identifier[input] operator[SEP] identifier[substring] operator[SEP] identifier[half] operator[-] Other[1] , identifier[half] operator[+] Other[2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isSpaceCommaSpace] operator[SEP] identifier[middlePart] operator[SEP] operator[SEP] { Keyword[return] identifier[hasEqualParts] operator[SEP] identifier[input] , identifier[half] operator[-] Other[1] , identifier[half] operator[+] Other[2] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[isCommaInTheMiddle] operator[SEP] identifier[middlePart] operator[SEP] operator[||] identifier[isLineBreakInTheMiddle] operator[SEP] identifier[middlePart] operator[SEP] operator[SEP] { Keyword[return] identifier[hasEqualParts] operator[SEP] identifier[input] , identifier[half] , identifier[half] operator[+] Other[1] operator[SEP] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
public @Nullable <Z> Z mapWithCopyQuietly(Function<T, Z> function) { final @Nullable SharedReference<T> localRef = getCopy(); try { if (localRef == null) { return function.apply(null); } else { return function.apply(localRef.get()); } } finally { if (localRef != null) Closeables2.closeQuietly(localRef, log); } }
class class_name[name] begin[{] method[mapWithCopyQuietly, return_type[type[Z]], modifier[public], parameter[function]] begin[{] local_variable[type[SharedReference], localRef] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=localRef, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=localRef, selectors=[], type_arguments=None)], member=apply, postfix_operators=[], prefix_operators=[], qualifier=function, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=apply, postfix_operators=[], prefix_operators=[], qualifier=function, selectors=[], type_arguments=None), label=None)]))], catches=None, finally_block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=localRef, 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=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=localRef, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=log, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=closeQuietly, postfix_operators=[], prefix_operators=[], qualifier=Closeables2, selectors=[], type_arguments=None), label=None))], label=None, resources=None) end[}] END[}]
Keyword[public] annotation[@] identifier[Nullable] operator[<] identifier[Z] operator[>] identifier[Z] identifier[mapWithCopyQuietly] operator[SEP] identifier[Function] operator[<] identifier[T] , identifier[Z] operator[>] identifier[function] operator[SEP] { Keyword[final] annotation[@] identifier[Nullable] identifier[SharedReference] operator[<] identifier[T] operator[>] identifier[localRef] operator[=] identifier[getCopy] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[localRef] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[function] operator[SEP] identifier[apply] operator[SEP] Other[null] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[function] operator[SEP] identifier[apply] operator[SEP] identifier[localRef] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[finally] { Keyword[if] operator[SEP] identifier[localRef] operator[!=] Other[null] operator[SEP] identifier[Closeables2] operator[SEP] identifier[closeQuietly] operator[SEP] identifier[localRef] , identifier[log] operator[SEP] operator[SEP] } }
@Override protected void resumeFaxJobImpl(FaxJob faxJob) { //create HTTP request HTTPRequest httpRequest=this.createResumeFaxJobHTTPRequest(faxJob); //submit HTTP request this.submitHTTPRequest(faxJob,httpRequest,FaxActionType.RESUME_FAX_JOB); }
class class_name[name] begin[{] method[resumeFaxJobImpl, return_type[void], modifier[protected], parameter[faxJob]] begin[{] local_variable[type[HTTPRequest], httpRequest] THIS[call[None.submitHTTPRequest, parameter[member[.faxJob], member[.httpRequest], member[FaxActionType.RESUME_FAX_JOB]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[resumeFaxJobImpl] operator[SEP] identifier[FaxJob] identifier[faxJob] operator[SEP] { identifier[HTTPRequest] identifier[httpRequest] operator[=] Keyword[this] operator[SEP] identifier[createResumeFaxJobHTTPRequest] operator[SEP] identifier[faxJob] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[submitHTTPRequest] operator[SEP] identifier[faxJob] , identifier[httpRequest] , identifier[FaxActionType] operator[SEP] identifier[RESUME_FAX_JOB] operator[SEP] operator[SEP] }
private void step2primitive(DBIDRef id, DBIDArrayIter it, int n, Relation<? extends O> relation, PrimitiveDistanceFunction<? super O> distFunc, WritableDoubleDataStore m) { O newObj = relation.get(id); for(it.seek(0); it.getOffset() < n; it.advance()) { // M(i) = dist(i, n+1) m.putDouble(it, distFunc.distance(relation.get(it), newObj)); } }
class class_name[name] begin[{] method[step2primitive, return_type[void], modifier[private], parameter[id, it, n, relation, distFunc, m]] begin[{] local_variable[type[O], newObj] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=it, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=it, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=relation, selectors=[], type_arguments=None), MemberReference(member=newObj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=distance, postfix_operators=[], prefix_operators=[], qualifier=distFunc, selectors=[], type_arguments=None)], member=putDouble, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getOffset, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[], type_arguments=None), operandr=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=seek, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[], type_arguments=None)], update=[MethodInvocation(arguments=[], member=advance, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[], type_arguments=None)]), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[step2primitive] operator[SEP] identifier[DBIDRef] identifier[id] , identifier[DBIDArrayIter] identifier[it] , Keyword[int] identifier[n] , identifier[Relation] operator[<] operator[?] Keyword[extends] identifier[O] operator[>] identifier[relation] , identifier[PrimitiveDistanceFunction] operator[<] operator[?] Keyword[super] identifier[O] operator[>] identifier[distFunc] , identifier[WritableDoubleDataStore] identifier[m] operator[SEP] { identifier[O] identifier[newObj] operator[=] identifier[relation] operator[SEP] identifier[get] operator[SEP] identifier[id] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[it] operator[SEP] identifier[seek] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[it] operator[SEP] identifier[getOffset] operator[SEP] operator[SEP] operator[<] identifier[n] operator[SEP] identifier[it] operator[SEP] identifier[advance] operator[SEP] operator[SEP] operator[SEP] { identifier[m] operator[SEP] identifier[putDouble] operator[SEP] identifier[it] , identifier[distFunc] operator[SEP] identifier[distance] operator[SEP] identifier[relation] operator[SEP] identifier[get] operator[SEP] identifier[it] operator[SEP] , identifier[newObj] operator[SEP] operator[SEP] operator[SEP] } }
private static boolean inEncoding(char ch, String encoding) { boolean isInEncoding; try { char cArray[] = new char[1]; cArray[0] = ch; // Construct a String from the char String s = new String(cArray); // Encode the String into a sequence of bytes // using the given, named charset. byte[] bArray = s.getBytes(encoding); isInEncoding = inEncoding(ch, bArray); } catch (Exception e) { isInEncoding = false; // If for some reason the encoding is null, e.g. // for a temporary result tree, we should just // say that every character is in the encoding. if (encoding == null) isInEncoding = true; } return isInEncoding; }
class class_name[name] begin[{] method[inEncoding, return_type[type[boolean]], modifier[private static], parameter[ch, encoding]] begin[{] local_variable[type[boolean], isInEncoding] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[None], initializer=ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=char)), name=cArray)], modifiers=set(), type=BasicType(dimensions=[], name=char)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=cArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), type==, value=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=cArray, 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=String, sub_type=None)), name=s)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=encoding, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getBytes, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[], type_arguments=None), name=bArray)], modifiers=set(), type=BasicType(dimensions=[None], name=byte)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=isInEncoding, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=bArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=inEncoding, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=isInEncoding, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=encoding, 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=StatementExpression(expression=Assignment(expressionl=MemberReference(member=isInEncoding, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) return[member[.isInEncoding]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[boolean] identifier[inEncoding] operator[SEP] Keyword[char] identifier[ch] , identifier[String] identifier[encoding] operator[SEP] { Keyword[boolean] identifier[isInEncoding] operator[SEP] Keyword[try] { Keyword[char] identifier[cArray] operator[SEP] operator[SEP] operator[=] Keyword[new] Keyword[char] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[cArray] operator[SEP] Other[0] operator[SEP] operator[=] identifier[ch] operator[SEP] identifier[String] identifier[s] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[cArray] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bArray] operator[=] identifier[s] operator[SEP] identifier[getBytes] operator[SEP] identifier[encoding] operator[SEP] operator[SEP] identifier[isInEncoding] operator[=] identifier[inEncoding] operator[SEP] identifier[ch] , identifier[bArray] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[isInEncoding] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[encoding] operator[==] Other[null] operator[SEP] identifier[isInEncoding] operator[=] literal[boolean] operator[SEP] } Keyword[return] identifier[isInEncoding] operator[SEP] }
@Override public Map<URI, MatchResult> listMatchesAtLeastOfType(URI origin, MatchType minType) { return listMatchesWithinRange(origin, minType, this.matchTypesSupported.getHighest()); }
class class_name[name] begin[{] method[listMatchesAtLeastOfType, return_type[type[Map]], modifier[public], parameter[origin, minType]] begin[{] return[call[.listMatchesWithinRange, parameter[member[.origin], member[.minType], THIS[member[None.matchTypesSupported]call[None.getHighest, parameter[]]]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Map] operator[<] identifier[URI] , identifier[MatchResult] operator[>] identifier[listMatchesAtLeastOfType] operator[SEP] identifier[URI] identifier[origin] , identifier[MatchType] identifier[minType] operator[SEP] { Keyword[return] identifier[listMatchesWithinRange] operator[SEP] identifier[origin] , identifier[minType] , Keyword[this] operator[SEP] identifier[matchTypesSupported] operator[SEP] identifier[getHighest] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public final HttpServer cookieCodec(ServerCookieEncoder encoder, ServerCookieDecoder decoder) { return tcpConfiguration(tcp -> tcp.bootstrap( b -> HttpServerConfiguration.cookieCodec(b, encoder, decoder))); }
class class_name[name] begin[{] method[cookieCodec, return_type[type[HttpServer]], modifier[final public], parameter[encoder, decoder]] begin[{] return[call[.tcpConfiguration, parameter[LambdaExpression(body=MethodInvocation(arguments=[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=encoder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=decoder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=cookieCodec, postfix_operators=[], prefix_operators=[], qualifier=HttpServerConfiguration, selectors=[], type_arguments=None), parameters=[MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])], member=bootstrap, postfix_operators=[], prefix_operators=[], qualifier=tcp, selectors=[], type_arguments=None), parameters=[MemberReference(member=tcp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]]] end[}] END[}]
Keyword[public] Keyword[final] identifier[HttpServer] identifier[cookieCodec] operator[SEP] identifier[ServerCookieEncoder] identifier[encoder] , identifier[ServerCookieDecoder] identifier[decoder] operator[SEP] { Keyword[return] identifier[tcpConfiguration] operator[SEP] identifier[tcp] operator[->] identifier[tcp] operator[SEP] identifier[bootstrap] operator[SEP] identifier[b] operator[->] identifier[HttpServerConfiguration] operator[SEP] identifier[cookieCodec] operator[SEP] identifier[b] , identifier[encoder] , identifier[decoder] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
protected void render(FacesContext context) throws IOException { String src = (String) getAttributes().get("src"); boolean base64 = Boolean.parseBoolean((String) getAttributes().get("src")); String imagePath = getImageUrl(context, src, base64); ResponseWriter writer = context.getResponseWriter(); writer.write(imagePath); }
class class_name[name] begin[{] method[render, return_type[void], modifier[protected], parameter[context]] begin[{] local_variable[type[String], src] local_variable[type[boolean], base64] local_variable[type[String], imagePath] local_variable[type[ResponseWriter], writer] call[writer.write, parameter[member[.imagePath]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[render] operator[SEP] identifier[FacesContext] identifier[context] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[src] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[getAttributes] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[boolean] identifier[base64] operator[=] identifier[Boolean] operator[SEP] identifier[parseBoolean] operator[SEP] operator[SEP] identifier[String] operator[SEP] identifier[getAttributes] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[imagePath] operator[=] identifier[getImageUrl] operator[SEP] identifier[context] , identifier[src] , identifier[base64] operator[SEP] operator[SEP] identifier[ResponseWriter] identifier[writer] operator[=] identifier[context] operator[SEP] identifier[getResponseWriter] operator[SEP] operator[SEP] operator[SEP] identifier[writer] operator[SEP] identifier[write] operator[SEP] identifier[imagePath] operator[SEP] operator[SEP] }
public Priority[] getPriorities() { List<Priority> actualPriorities = new ArrayList<Priority>(); for (String priority : getAvailablePriorities()) { if (provider.getNumberOfAnnotations(priority) > 0) { actualPriorities.add(Priority.fromString(priority)); } } return actualPriorities.toArray(new Priority[actualPriorities.size()]); }
class class_name[name] begin[{] method[getPriorities, return_type[type[Priority]], modifier[public], parameter[]] begin[{] local_variable[type[List], actualPriorities] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=priority, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getNumberOfAnnotations, postfix_operators=[], prefix_operators=[], qualifier=provider, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=priority, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fromString, postfix_operators=[], prefix_operators=[], qualifier=Priority, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=actualPriorities, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getAvailablePriorities, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=priority)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[call[actualPriorities.toArray, parameter[ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=actualPriorities, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Priority, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[Priority] operator[SEP] operator[SEP] identifier[getPriorities] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[Priority] operator[>] identifier[actualPriorities] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Priority] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[priority] operator[:] identifier[getAvailablePriorities] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[provider] operator[SEP] identifier[getNumberOfAnnotations] operator[SEP] identifier[priority] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[actualPriorities] operator[SEP] identifier[add] operator[SEP] identifier[Priority] operator[SEP] identifier[fromString] operator[SEP] identifier[priority] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[actualPriorities] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[Priority] operator[SEP] identifier[actualPriorities] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void noteOpenConnection(ServerStats serverStats) { if (serverStats == null) { return; } try { serverStats.incrementActiveRequestsCount(); } catch (Exception ex) { logger.error("Error noting stats for client {}", clientName, ex); } }
class class_name[name] begin[{] method[noteOpenConnection, return_type[void], modifier[public], parameter[serverStats]] begin[{] if[binary_operation[member[.serverStats], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=incrementActiveRequestsCount, postfix_operators=[], prefix_operators=[], qualifier=serverStats, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error noting stats for client {}"), MemberReference(member=clientName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[noteOpenConnection] operator[SEP] identifier[ServerStats] identifier[serverStats] operator[SEP] { Keyword[if] operator[SEP] identifier[serverStats] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } Keyword[try] { identifier[serverStats] operator[SEP] identifier[incrementActiveRequestsCount] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[clientName] , identifier[ex] operator[SEP] operator[SEP] } }
public Object firstRow() throws SQLException { List rows = rows(); if (rows.isEmpty()) return null; return (rows.get(0)); }
class class_name[name] begin[{] method[firstRow, return_type[type[Object]], modifier[public], parameter[]] begin[{] local_variable[type[List], rows] if[call[rows.isEmpty, parameter[]]] begin[{] return[literal[null]] else begin[{] None end[}] return[call[rows.get, parameter[literal[0]]]] end[}] END[}]
Keyword[public] identifier[Object] identifier[firstRow] operator[SEP] operator[SEP] Keyword[throws] identifier[SQLException] { identifier[List] identifier[rows] operator[=] identifier[rows] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[rows] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[return] operator[SEP] identifier[rows] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] }
public Moonlight on(CalendarDate date) { // initialization PlainDate d = SolarTime.toGregorian(date); Timezone tz = Timezone.of(this.observerZoneID); Moment start = ((tz.getHistory() == null) ? d.at(PlainTime.midnightAtStartOfDay()).in(tz) : d.atFirstMoment(this.observerZoneID)); double mjd0 = JulianDay.ofMeanSolarTime(start).getMJD(); double longitudeRad = Math.toRadians(this.longitude); double cosLatitude = Math.cos(Math.toRadians(this.latitude)); double sinLatitude = Math.sin(Math.toRadians(this.latitude)); double geodeticAngle = StdSolarCalculator.TIME4J.getGeodeticAngle(this.latitude, this.altitude); double refraction = AstroUtils.refractionFactorOfStdAtmosphere(this.altitude) * SolarTime.STD_REFRACTION / 60; double deltaT = TimeScale.deltaT(d); double hour = 1.0; double y_minus = sinAlt(mjd0, 0.0, longitudeRad, cosLatitude, sinLatitude, geodeticAngle, refraction, deltaT); double[] result = new double[4]; // declaration of result data boolean above = (y_minus > 0.0); // at start of day boolean rises = false; boolean sets = false; double risingHour = Double.NaN; double settingHour = Double.NaN; // loop over 2-hour-search-intervals applying quadratic interpolation do { double y_0 = sinAlt(mjd0, hour, longitudeRad, cosLatitude, sinLatitude, geodeticAngle, refraction, deltaT); double y_plus = sinAlt(mjd0, hour + 1, longitudeRad, cosLatitude, sinLatitude, geodeticAngle, refraction, deltaT); int count = interpolate(y_minus, y_0, y_plus, result); if (count == 1) { double root = result[2]; if (Double.isNaN(root)) { root = result[3]; } if (y_minus < 0.0) { risingHour = hour + root; rises = true; } else { settingHour = hour + root; sets = true; } } else if (count == 2) { if (result[1] < 0.0) { risingHour = hour + result[3]; settingHour = hour + result[2]; } else { risingHour = hour + result[2]; settingHour = hour + result[3]; } rises = true; sets = true; } y_minus = y_plus; hour += 2.0; } while (!((hour > 25.0) || (rises && sets))); // (> 25.0)-condition cares about possible 25-h-day (end-of-DST) // evaluate moonrise and moonset Moment rising = null; Moment setting = null; if (rises) { rising = add(start, risingHour); if (!rising.toZonalTimestamp(this.observerZoneID).getCalendarDate().equals(d)) { rising = null; // rises = false; } } if (sets) { setting = add(start, settingHour); if (!setting.toZonalTimestamp(this.observerZoneID).getCalendarDate().equals(d)) { setting = null; // sets = false; } } return new Moonlight(d, this.observerZoneID, rising, setting, above); }
class class_name[name] begin[{] method[on, return_type[type[Moonlight]], modifier[public], parameter[date]] begin[{] local_variable[type[PlainDate], d] local_variable[type[Timezone], tz] local_variable[type[Moment], start] local_variable[type[double], mjd0] local_variable[type[double], longitudeRad] local_variable[type[double], cosLatitude] local_variable[type[double], sinLatitude] local_variable[type[double], geodeticAngle] local_variable[type[double], refraction] local_variable[type[double], deltaT] local_variable[type[double], hour] local_variable[type[double], y_minus] local_variable[type[double], result] local_variable[type[boolean], above] local_variable[type[boolean], rises] local_variable[type[boolean], sets] local_variable[type[double], risingHour] local_variable[type[double], settingHour] do[binary_operation[binary_operation[member[.hour], >, literal[25.0]], ||, binary_operation[member[.rises], &&, member[.sets]]]] begin[{] local_variable[type[double], y_0] local_variable[type[double], y_plus] local_variable[type[int], count] if[binary_operation[member[.count], ==, literal[1]]] begin[{] local_variable[type[double], root] if[call[Double.isNaN, parameter[member[.root]]]] begin[{] assign[member[.root], member[.result]] else begin[{] None end[}] if[binary_operation[member[.y_minus], <, literal[0.0]]] begin[{] assign[member[.risingHour], binary_operation[member[.hour], +, member[.root]]] assign[member[.rises], literal[true]] else begin[{] assign[member[.settingHour], binary_operation[member[.hour], +, member[.root]]] assign[member[.sets], literal[true]] end[}] else begin[{] if[binary_operation[member[.count], ==, literal[2]]] begin[{] if[binary_operation[member[.result], <, literal[0.0]]] begin[{] assign[member[.risingHour], binary_operation[member[.hour], +, member[.result]]] assign[member[.settingHour], binary_operation[member[.hour], +, member[.result]]] else begin[{] assign[member[.risingHour], binary_operation[member[.hour], +, member[.result]]] assign[member[.settingHour], binary_operation[member[.hour], +, member[.result]]] end[}] assign[member[.rises], literal[true]] assign[member[.sets], literal[true]] else begin[{] None end[}] end[}] assign[member[.y_minus], member[.y_plus]] assign[member[.hour], literal[2.0]] end[}] local_variable[type[Moment], rising] local_variable[type[Moment], setting] if[member[.rises]] begin[{] assign[member[.rising], call[.add, parameter[member[.start], member[.risingHour]]]] if[call[rising.toZonalTimestamp, parameter[THIS[member[None.observerZoneID]]]]] begin[{] assign[member[.rising], literal[null]] else begin[{] None end[}] else begin[{] None end[}] if[member[.sets]] begin[{] assign[member[.setting], call[.add, parameter[member[.start], member[.settingHour]]]] if[call[setting.toZonalTimestamp, parameter[THIS[member[None.observerZoneID]]]]] begin[{] assign[member[.setting], literal[null]] else begin[{] None end[}] else begin[{] None end[}] return[ClassCreator(arguments=[MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=observerZoneID, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), MemberReference(member=rising, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=setting, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=above, 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=Moonlight, sub_type=None))] end[}] END[}]
Keyword[public] identifier[Moonlight] identifier[on] operator[SEP] identifier[CalendarDate] identifier[date] operator[SEP] { identifier[PlainDate] identifier[d] operator[=] identifier[SolarTime] operator[SEP] identifier[toGregorian] operator[SEP] identifier[date] operator[SEP] operator[SEP] identifier[Timezone] identifier[tz] operator[=] identifier[Timezone] operator[SEP] identifier[of] operator[SEP] Keyword[this] operator[SEP] identifier[observerZoneID] operator[SEP] operator[SEP] identifier[Moment] identifier[start] operator[=] operator[SEP] operator[SEP] identifier[tz] operator[SEP] identifier[getHistory] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] operator[?] identifier[d] operator[SEP] identifier[at] operator[SEP] identifier[PlainTime] operator[SEP] identifier[midnightAtStartOfDay] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[in] operator[SEP] identifier[tz] operator[SEP] operator[:] identifier[d] operator[SEP] identifier[atFirstMoment] operator[SEP] Keyword[this] operator[SEP] identifier[observerZoneID] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[mjd0] operator[=] identifier[JulianDay] operator[SEP] identifier[ofMeanSolarTime] operator[SEP] identifier[start] operator[SEP] operator[SEP] identifier[getMJD] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[longitudeRad] operator[=] identifier[Math] operator[SEP] identifier[toRadians] operator[SEP] Keyword[this] operator[SEP] identifier[longitude] operator[SEP] operator[SEP] Keyword[double] identifier[cosLatitude] operator[=] identifier[Math] operator[SEP] identifier[cos] operator[SEP] identifier[Math] operator[SEP] identifier[toRadians] operator[SEP] Keyword[this] operator[SEP] identifier[latitude] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[sinLatitude] operator[=] identifier[Math] operator[SEP] identifier[sin] operator[SEP] identifier[Math] operator[SEP] identifier[toRadians] operator[SEP] Keyword[this] operator[SEP] identifier[latitude] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[geodeticAngle] operator[=] identifier[StdSolarCalculator] operator[SEP] identifier[TIME4J] operator[SEP] identifier[getGeodeticAngle] operator[SEP] Keyword[this] operator[SEP] identifier[latitude] , Keyword[this] operator[SEP] identifier[altitude] operator[SEP] operator[SEP] Keyword[double] identifier[refraction] operator[=] identifier[AstroUtils] operator[SEP] identifier[refractionFactorOfStdAtmosphere] operator[SEP] Keyword[this] operator[SEP] identifier[altitude] operator[SEP] operator[*] identifier[SolarTime] operator[SEP] identifier[STD_REFRACTION] operator[/] Other[60] operator[SEP] Keyword[double] identifier[deltaT] operator[=] identifier[TimeScale] operator[SEP] identifier[deltaT] operator[SEP] identifier[d] operator[SEP] operator[SEP] Keyword[double] identifier[hour] operator[=] literal[Float] operator[SEP] Keyword[double] identifier[y_minus] operator[=] identifier[sinAlt] operator[SEP] identifier[mjd0] , literal[Float] , identifier[longitudeRad] , identifier[cosLatitude] , identifier[sinLatitude] , identifier[geodeticAngle] , identifier[refraction] , identifier[deltaT] operator[SEP] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[result] operator[=] Keyword[new] Keyword[double] operator[SEP] Other[4] operator[SEP] operator[SEP] Keyword[boolean] identifier[above] operator[=] operator[SEP] identifier[y_minus] operator[>] literal[Float] operator[SEP] operator[SEP] Keyword[boolean] identifier[rises] operator[=] literal[boolean] operator[SEP] Keyword[boolean] identifier[sets] operator[=] literal[boolean] operator[SEP] Keyword[double] identifier[risingHour] operator[=] identifier[Double] operator[SEP] identifier[NaN] operator[SEP] Keyword[double] identifier[settingHour] operator[=] identifier[Double] operator[SEP] identifier[NaN] operator[SEP] Keyword[do] { Keyword[double] identifier[y_0] operator[=] identifier[sinAlt] operator[SEP] identifier[mjd0] , identifier[hour] , identifier[longitudeRad] , identifier[cosLatitude] , identifier[sinLatitude] , identifier[geodeticAngle] , identifier[refraction] , identifier[deltaT] operator[SEP] operator[SEP] Keyword[double] identifier[y_plus] operator[=] identifier[sinAlt] operator[SEP] identifier[mjd0] , identifier[hour] operator[+] Other[1] , identifier[longitudeRad] , identifier[cosLatitude] , identifier[sinLatitude] , identifier[geodeticAngle] , identifier[refraction] , identifier[deltaT] operator[SEP] operator[SEP] Keyword[int] identifier[count] operator[=] identifier[interpolate] operator[SEP] identifier[y_minus] , identifier[y_0] , identifier[y_plus] , identifier[result] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[count] operator[==] Other[1] operator[SEP] { Keyword[double] identifier[root] operator[=] identifier[result] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Double] operator[SEP] identifier[isNaN] operator[SEP] identifier[root] operator[SEP] operator[SEP] { identifier[root] operator[=] identifier[result] operator[SEP] Other[3] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[y_minus] operator[<] literal[Float] operator[SEP] { identifier[risingHour] operator[=] identifier[hour] operator[+] identifier[root] operator[SEP] identifier[rises] operator[=] literal[boolean] operator[SEP] } Keyword[else] { identifier[settingHour] operator[=] identifier[hour] operator[+] identifier[root] operator[SEP] identifier[sets] operator[=] literal[boolean] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[count] operator[==] Other[2] operator[SEP] { Keyword[if] operator[SEP] identifier[result] operator[SEP] Other[1] operator[SEP] operator[<] literal[Float] operator[SEP] { identifier[risingHour] operator[=] identifier[hour] operator[+] identifier[result] operator[SEP] Other[3] operator[SEP] operator[SEP] identifier[settingHour] operator[=] identifier[hour] operator[+] identifier[result] operator[SEP] Other[2] operator[SEP] operator[SEP] } Keyword[else] { identifier[risingHour] operator[=] identifier[hour] operator[+] identifier[result] operator[SEP] Other[2] operator[SEP] operator[SEP] identifier[settingHour] operator[=] identifier[hour] operator[+] identifier[result] operator[SEP] Other[3] operator[SEP] operator[SEP] } identifier[rises] operator[=] literal[boolean] operator[SEP] identifier[sets] operator[=] literal[boolean] operator[SEP] } identifier[y_minus] operator[=] identifier[y_plus] operator[SEP] identifier[hour] operator[+=] literal[Float] operator[SEP] } Keyword[while] operator[SEP] operator[!] operator[SEP] operator[SEP] identifier[hour] operator[>] literal[Float] operator[SEP] operator[||] operator[SEP] identifier[rises] operator[&&] identifier[sets] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Moment] identifier[rising] operator[=] Other[null] operator[SEP] identifier[Moment] identifier[setting] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[rises] operator[SEP] { identifier[rising] operator[=] identifier[add] operator[SEP] identifier[start] , identifier[risingHour] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[rising] operator[SEP] identifier[toZonalTimestamp] operator[SEP] Keyword[this] operator[SEP] identifier[observerZoneID] operator[SEP] operator[SEP] identifier[getCalendarDate] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[d] operator[SEP] operator[SEP] { identifier[rising] operator[=] Other[null] operator[SEP] } } Keyword[if] operator[SEP] identifier[sets] operator[SEP] { identifier[setting] operator[=] identifier[add] operator[SEP] identifier[start] , identifier[settingHour] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[setting] operator[SEP] identifier[toZonalTimestamp] operator[SEP] Keyword[this] operator[SEP] identifier[observerZoneID] operator[SEP] operator[SEP] identifier[getCalendarDate] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[d] operator[SEP] operator[SEP] { identifier[setting] operator[=] Other[null] operator[SEP] } } Keyword[return] Keyword[new] identifier[Moonlight] operator[SEP] identifier[d] , Keyword[this] operator[SEP] identifier[observerZoneID] , identifier[rising] , identifier[setting] , identifier[above] operator[SEP] operator[SEP] }
public static void writeToCheckpoint(OutputStream output, List<? extends Checkpointed> components) throws IOException, InterruptedException { OutputChunked chunked = new OutputChunked( new CheckpointOutputStream(output, CheckpointType.COMPOUND), 64 * Constants.KB); for (Checkpointed component : components) { chunked.writeString(component.getCheckpointName().toString()); component.writeToCheckpoint(chunked); chunked.endChunks(); } chunked.flush(); }
class class_name[name] begin[{] method[writeToCheckpoint, return_type[void], modifier[public static], parameter[output, components]] begin[{] local_variable[type[OutputChunked], chunked] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getCheckpointName, postfix_operators=[], prefix_operators=[], qualifier=component, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=writeString, postfix_operators=[], prefix_operators=[], qualifier=chunked, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=chunked, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeToCheckpoint, postfix_operators=[], prefix_operators=[], qualifier=component, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=endChunks, postfix_operators=[], prefix_operators=[], qualifier=chunked, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=components, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=component)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Checkpointed, sub_type=None))), label=None) call[chunked.flush, parameter[]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[writeToCheckpoint] operator[SEP] identifier[OutputStream] identifier[output] , identifier[List] operator[<] operator[?] Keyword[extends] identifier[Checkpointed] operator[>] identifier[components] operator[SEP] Keyword[throws] identifier[IOException] , identifier[InterruptedException] { identifier[OutputChunked] identifier[chunked] operator[=] Keyword[new] identifier[OutputChunked] operator[SEP] Keyword[new] identifier[CheckpointOutputStream] operator[SEP] identifier[output] , identifier[CheckpointType] operator[SEP] identifier[COMPOUND] operator[SEP] , Other[64] operator[*] identifier[Constants] operator[SEP] identifier[KB] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Checkpointed] identifier[component] operator[:] identifier[components] operator[SEP] { identifier[chunked] operator[SEP] identifier[writeString] operator[SEP] identifier[component] operator[SEP] identifier[getCheckpointName] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[component] operator[SEP] identifier[writeToCheckpoint] operator[SEP] identifier[chunked] operator[SEP] operator[SEP] identifier[chunked] operator[SEP] identifier[endChunks] operator[SEP] operator[SEP] operator[SEP] } identifier[chunked] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] }
public ServiceFuture<OperationStatus> updateClosedListAsync(UUID appId, String versionId, UUID clEntityId, ClosedListModelUpdateObject closedListModelUpdateObject, final ServiceCallback<OperationStatus> serviceCallback) { return ServiceFuture.fromResponse(updateClosedListWithServiceResponseAsync(appId, versionId, clEntityId, closedListModelUpdateObject), serviceCallback); }
class class_name[name] begin[{] method[updateClosedListAsync, return_type[type[ServiceFuture]], modifier[public], parameter[appId, versionId, clEntityId, closedListModelUpdateObject, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.updateClosedListWithServiceResponseAsync, parameter[member[.appId], member[.versionId], member[.clEntityId], member[.closedListModelUpdateObject]]], member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[OperationStatus] operator[>] identifier[updateClosedListAsync] operator[SEP] identifier[UUID] identifier[appId] , identifier[String] identifier[versionId] , identifier[UUID] identifier[clEntityId] , identifier[ClosedListModelUpdateObject] identifier[closedListModelUpdateObject] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[OperationStatus] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromResponse] operator[SEP] identifier[updateClosedListWithServiceResponseAsync] operator[SEP] identifier[appId] , identifier[versionId] , identifier[clEntityId] , identifier[closedListModelUpdateObject] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP] }
public final void mLINE_COMMENT() throws RecognitionException { try { int _type = LINE_COMMENT; int _channel = DEFAULT_TOKEN_CHANNEL; // src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1403:5: ( '//' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' ) // src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1403:7: '//' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' { match("//"); // src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1403:12: (~ ( '\\n' | '\\r' ) )* loop30: while (true) { int alt30=2; int LA30_0 = input.LA(1); if ( ((LA30_0 >= '\u0000' && LA30_0 <= '\t')||(LA30_0 >= '\u000B' && LA30_0 <= '\f')||(LA30_0 >= '\u000E' && LA30_0 <= '\uFFFF')) ) { alt30=1; } switch (alt30) { case 1 : // src/main/resources/org/drools/compiler/semantics/java/parser/Java.g: { if ( (input.LA(1) >= '\u0000' && input.LA(1) <= '\t')||(input.LA(1) >= '\u000B' && input.LA(1) <= '\f')||(input.LA(1) >= '\u000E' && input.LA(1) <= '\uFFFF') ) { input.consume(); } else { MismatchedSetException mse = new MismatchedSetException(null,input); recover(mse); throw mse; } } break; default : break loop30; } } // src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1403:26: ( '\\r' )? int alt31=2; int LA31_0 = input.LA(1); if ( (LA31_0=='\r') ) { alt31=1; } switch (alt31) { case 1 : // src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1403:26: '\\r' { match('\r'); } break; } match('\n'); _channel=HIDDEN; } state.type = _type; state.channel = _channel; } finally { // do for sure before leaving } }
class class_name[name] begin[{] method[mLINE_COMMENT, return_type[void], modifier[final public], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=LINE_COMMENT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=_type)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=DEFAULT_TOKEN_CHANNEL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=_channel)], modifiers=set(), type=BasicType(dimensions=[], name=int)), BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="//")], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt30)], 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=LA30_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA30_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=''), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA30_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\t'), operator=<=), operator=&&), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA30_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=' '), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA30_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\f'), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA30_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=''), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA30_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='￿'), operator=<=), operator=&&), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt30, 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=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=''), operator=>=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\t'), operator=<=), operator=&&), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=' '), operator=>=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\f'), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=''), operator=>=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='￿'), operator=<=), operator=&&), operator=||), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), 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=MismatchedSetException, sub_type=None)), name=mse)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MismatchedSetException, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=mse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=MemberReference(member=mse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=consume, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=loop30, label=None)])], expression=MemberReference(member=alt30, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=loop30), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt31)], 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=LA31_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA31_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\r'), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt31, 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=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\r')], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=alt31, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\n')], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=_channel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=HIDDEN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), StatementExpression(expression=Assignment(expressionl=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=MemberReference(member=_type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=MemberReference(member=_channel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)], catches=None, finally_block=[], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[mLINE_COMMENT] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { Keyword[try] { Keyword[int] identifier[_type] operator[=] identifier[LINE_COMMENT] operator[SEP] Keyword[int] identifier[_channel] operator[=] identifier[DEFAULT_TOKEN_CHANNEL] operator[SEP] { identifier[match] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[loop30] operator[:] Keyword[while] operator[SEP] literal[boolean] operator[SEP] { Keyword[int] identifier[alt30] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA30_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[LA30_0] operator[>=] literal[String] operator[&&] identifier[LA30_0] operator[<=] literal[String] operator[SEP] operator[||] operator[SEP] identifier[LA30_0] operator[>=] literal[String] operator[&&] identifier[LA30_0] operator[<=] literal[String] operator[SEP] operator[||] operator[SEP] identifier[LA30_0] operator[>=] literal[String] operator[&&] identifier[LA30_0] operator[<=] literal[String] operator[SEP] operator[SEP] operator[SEP] { identifier[alt30] operator[=] Other[1] operator[SEP] } Keyword[switch] operator[SEP] identifier[alt30] operator[SEP] { Keyword[case] Other[1] operator[:] { Keyword[if] operator[SEP] operator[SEP] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[>=] literal[String] operator[&&] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[<=] literal[String] operator[SEP] operator[||] operator[SEP] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[>=] literal[String] operator[&&] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[<=] literal[String] operator[SEP] operator[||] operator[SEP] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[>=] literal[String] operator[&&] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[<=] literal[String] operator[SEP] operator[SEP] { identifier[input] operator[SEP] identifier[consume] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[MismatchedSetException] identifier[mse] operator[=] Keyword[new] identifier[MismatchedSetException] operator[SEP] Other[null] , identifier[input] operator[SEP] operator[SEP] identifier[recover] operator[SEP] identifier[mse] operator[SEP] operator[SEP] Keyword[throw] identifier[mse] operator[SEP] } } Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[break] identifier[loop30] operator[SEP] } } Keyword[int] identifier[alt31] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA31_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA31_0] operator[==] literal[String] operator[SEP] operator[SEP] { identifier[alt31] operator[=] Other[1] operator[SEP] } Keyword[switch] operator[SEP] identifier[alt31] operator[SEP] { Keyword[case] Other[1] operator[:] { identifier[match] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] } identifier[match] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[_channel] operator[=] identifier[HIDDEN] operator[SEP] } identifier[state] operator[SEP] identifier[type] operator[=] identifier[_type] operator[SEP] identifier[state] operator[SEP] identifier[channel] operator[=] identifier[_channel] operator[SEP] } Keyword[finally] { } }
public static CommerceAvailabilityEstimate findByUuid_First(String uuid, OrderByComparator<CommerceAvailabilityEstimate> orderByComparator) throws com.liferay.commerce.exception.NoSuchAvailabilityEstimateException { return getPersistence().findByUuid_First(uuid, orderByComparator); }
class class_name[name] begin[{] method[findByUuid_First, return_type[type[CommerceAvailabilityEstimate]], modifier[public static], parameter[uuid, orderByComparator]] begin[{] return[call[.getPersistence, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[CommerceAvailabilityEstimate] identifier[findByUuid_First] operator[SEP] identifier[String] identifier[uuid] , identifier[OrderByComparator] operator[<] identifier[CommerceAvailabilityEstimate] operator[>] identifier[orderByComparator] operator[SEP] Keyword[throws] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[exception] operator[SEP] identifier[NoSuchAvailabilityEstimateException] { Keyword[return] identifier[getPersistence] operator[SEP] operator[SEP] operator[SEP] identifier[findByUuid_First] operator[SEP] identifier[uuid] , identifier[orderByComparator] operator[SEP] operator[SEP] }
public <T> T toBeanIgnoreCase(T bean) { BeanUtil.fillBeanWithMapIgnoreCase(this, bean, false); return bean; }
class class_name[name] begin[{] method[toBeanIgnoreCase, return_type[type[T]], modifier[public], parameter[bean]] begin[{] call[BeanUtil.fillBeanWithMapIgnoreCase, parameter[THIS[], member[.bean], literal[false]]] return[member[.bean]] end[}] END[}]
Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[toBeanIgnoreCase] operator[SEP] identifier[T] identifier[bean] operator[SEP] { identifier[BeanUtil] operator[SEP] identifier[fillBeanWithMapIgnoreCase] operator[SEP] Keyword[this] , identifier[bean] , literal[boolean] operator[SEP] operator[SEP] Keyword[return] identifier[bean] operator[SEP] }
static public void registerTransform( String transformName, Class c) { if (!(VertTransformBuilderIF.class.isAssignableFrom( c)) && !(HorizTransformBuilderIF.class.isAssignableFrom( c))) throw new IllegalArgumentException("Class "+c.getName()+" must implement VertTransformBuilderIF or HorizTransformBuilderIF"); // fail fast - check newInstance works try { c.newInstance(); } catch (InstantiationException e) { throw new IllegalArgumentException("CoordTransBuilderIF Class "+c.getName()+" cannot instantiate, probably need default Constructor"); } catch (IllegalAccessException e) { throw new IllegalArgumentException("CoordTransBuilderIF Class "+c.getName()+" is not accessible"); } // user stuff gets put at top if (userMode) transformList.add( 0, new Transform( transformName, c)); else transformList.add( new Transform( transformName, c)); }
class class_name[name] begin[{] method[registerTransform, return_type[void], modifier[public static], parameter[transformName, c]] begin[{] if[binary_operation[ClassReference(postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=VertTransformBuilderIF, sub_type=None)), &&, ClassReference(postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HorizTransformBuilderIF, sub_type=None))]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Class "), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" must implement VertTransformBuilderIF or HorizTransformBuilderIF"), 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[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="CoordTransBuilderIF Class "), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" cannot instantiate, probably need default Constructor"), 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)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InstantiationException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="CoordTransBuilderIF Class "), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is not accessible"), 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)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IllegalAccessException']))], finally_block=None, label=None, resources=None) if[member[.userMode]] begin[{] call[transformList.add, parameter[literal[0], ClassCreator(arguments=[MemberReference(member=transformName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=c, 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=Transform, sub_type=None))]] else begin[{] call[transformList.add, parameter[ClassCreator(arguments=[MemberReference(member=transformName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=c, 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=Transform, sub_type=None))]] end[}] end[}] END[}]
Keyword[static] Keyword[public] Keyword[void] identifier[registerTransform] operator[SEP] identifier[String] identifier[transformName] , identifier[Class] identifier[c] operator[SEP] { Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[VertTransformBuilderIF] operator[SEP] Keyword[class] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[c] operator[SEP] operator[SEP] operator[&&] operator[!] operator[SEP] identifier[HorizTransformBuilderIF] operator[SEP] Keyword[class] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[c] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[c] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[try] { identifier[c] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InstantiationException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[c] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalAccessException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[c] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[userMode] operator[SEP] identifier[transformList] operator[SEP] identifier[add] operator[SEP] Other[0] , Keyword[new] identifier[Transform] operator[SEP] identifier[transformName] , identifier[c] operator[SEP] operator[SEP] operator[SEP] Keyword[else] identifier[transformList] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Transform] operator[SEP] identifier[transformName] , identifier[c] operator[SEP] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") private <IN1, IN2, OUT> TypeInformation<OUT> privateCreateTypeInfo(Type returnType, TypeInformation<IN1> in1Type, TypeInformation<IN2> in2Type) { ArrayList<Type> typeHierarchy = new ArrayList<Type>(); // get info from hierarchy return (TypeInformation<OUT>) createTypeInfoWithTypeHierarchy(typeHierarchy, returnType, in1Type, in2Type); }
class class_name[name] begin[{] method[privateCreateTypeInfo, return_type[type[TypeInformation]], modifier[private], parameter[returnType, in1Type, in2Type]] begin[{] local_variable[type[ArrayList], typeHierarchy] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=typeHierarchy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=returnType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=in1Type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=in2Type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createTypeInfoWithTypeHierarchy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=OUT, sub_type=None))], dimensions=[], name=TypeInformation, sub_type=None))] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] operator[<] identifier[IN1] , identifier[IN2] , identifier[OUT] operator[>] identifier[TypeInformation] operator[<] identifier[OUT] operator[>] identifier[privateCreateTypeInfo] operator[SEP] identifier[Type] identifier[returnType] , identifier[TypeInformation] operator[<] identifier[IN1] operator[>] identifier[in1Type] , identifier[TypeInformation] operator[<] identifier[IN2] operator[>] identifier[in2Type] operator[SEP] { identifier[ArrayList] operator[<] identifier[Type] operator[>] identifier[typeHierarchy] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Type] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[TypeInformation] operator[<] identifier[OUT] operator[>] operator[SEP] identifier[createTypeInfoWithTypeHierarchy] operator[SEP] identifier[typeHierarchy] , identifier[returnType] , identifier[in1Type] , identifier[in2Type] operator[SEP] operator[SEP] }
public boolean is(T state, T... otherStates) { return EnumSet.of(state, otherStates).contains(currentState); }
class class_name[name] begin[{] method[is, return_type[type[boolean]], modifier[public], parameter[state, otherStates]] begin[{] return[call[EnumSet.of, parameter[member[.state], member[.otherStates]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[is] operator[SEP] identifier[T] identifier[state] , identifier[T] operator[...] identifier[otherStates] operator[SEP] { Keyword[return] identifier[EnumSet] operator[SEP] identifier[of] operator[SEP] identifier[state] , identifier[otherStates] operator[SEP] operator[SEP] identifier[contains] operator[SEP] identifier[currentState] operator[SEP] operator[SEP] }
static GraphNode getServiceNode(HttpServletRequest request) { final IRI serviceUri = new IRI(getFullRequestUrl(request)); final Graph resultGraph = new SimpleGraph(); return new GraphNode(serviceUri, resultGraph); }
class class_name[name] begin[{] method[getServiceNode, return_type[type[GraphNode]], modifier[static], parameter[request]] begin[{] local_variable[type[IRI], serviceUri] local_variable[type[Graph], resultGraph] return[ClassCreator(arguments=[MemberReference(member=serviceUri, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=resultGraph, 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=GraphNode, sub_type=None))] end[}] END[}]
Keyword[static] identifier[GraphNode] identifier[getServiceNode] operator[SEP] identifier[HttpServletRequest] identifier[request] operator[SEP] { Keyword[final] identifier[IRI] identifier[serviceUri] operator[=] Keyword[new] identifier[IRI] operator[SEP] identifier[getFullRequestUrl] operator[SEP] identifier[request] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Graph] identifier[resultGraph] operator[=] Keyword[new] identifier[SimpleGraph] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[GraphNode] operator[SEP] identifier[serviceUri] , identifier[resultGraph] operator[SEP] operator[SEP] }
public static String getPrettyFormatted(String str) { return String.format("%s-%s-%s-%s-%s", new Object[] { str.substring(0, 8), str.substring(8, 12), str.substring(12, 16), str.substring(16, 20), str.substring(20) }); }
class class_name[name] begin[{] method[getPrettyFormatted, return_type[type[String]], modifier[public static], parameter[str]] begin[{] return[call[String.format, parameter[literal["%s-%s-%s-%s-%s"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=12)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=12), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=20)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=20)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getPrettyFormatted] operator[SEP] identifier[String] identifier[str] operator[SEP] { Keyword[return] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[str] operator[SEP] identifier[substring] operator[SEP] Other[0] , Other[8] operator[SEP] , identifier[str] operator[SEP] identifier[substring] operator[SEP] Other[8] , Other[12] operator[SEP] , identifier[str] operator[SEP] identifier[substring] operator[SEP] Other[12] , Other[16] operator[SEP] , identifier[str] operator[SEP] identifier[substring] operator[SEP] Other[16] , Other[20] operator[SEP] , identifier[str] operator[SEP] identifier[substring] operator[SEP] Other[20] operator[SEP] } operator[SEP] operator[SEP] }
public RuntimeException handleException(final Exception e) { log.error(e.getMessage(), e); if (e instanceof RuntimeException && EnvUtil.isPortableType(e.getClass()) ) { return (RuntimeException) e; } return new GenericPortableException( e.getMessage(), e ); }
class class_name[name] begin[{] method[handleException, return_type[type[RuntimeException]], modifier[public], parameter[e]] begin[{] call[log.error, parameter[call[e.getMessage, parameter[]], member[.e]]] if[binary_operation[binary_operation[member[.e], instanceof, type[RuntimeException]], &&, call[EnvUtil.isPortableType, parameter[call[e.getClass, parameter[]]]]]] begin[{] return[Cast(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=RuntimeException, sub_type=None))] else begin[{] None end[}] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), 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=GenericPortableException, sub_type=None))] end[}] END[}]
Keyword[public] identifier[RuntimeException] identifier[handleException] operator[SEP] Keyword[final] identifier[Exception] identifier[e] operator[SEP] { identifier[log] operator[SEP] identifier[error] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[e] Keyword[instanceof] identifier[RuntimeException] operator[&&] identifier[EnvUtil] operator[SEP] identifier[isPortableType] operator[SEP] identifier[e] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] identifier[RuntimeException] operator[SEP] identifier[e] operator[SEP] } Keyword[return] Keyword[new] identifier[GenericPortableException] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] }
public static <X extends Throwable> void throwOrHandle(final X e, final Predicate<X> p, final Consumer<X> handler) { if (p.test(e)) throw ExceptionSoftener.<RuntimeException> uncheck(e); else handler.accept(e); }
class class_name[name] begin[{] method[throwOrHandle, return_type[void], modifier[public static], parameter[e, p, handler]] begin[{] if[call[p.test, parameter[member[.e]]]] begin[{] ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=ExceptionSoftener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=RuntimeException, sub_type=None))]), label=None) else begin[{] call[handler.accept, parameter[member[.e]]] end[}] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[X] Keyword[extends] identifier[Throwable] operator[>] Keyword[void] identifier[throwOrHandle] operator[SEP] Keyword[final] identifier[X] identifier[e] , Keyword[final] identifier[Predicate] operator[<] identifier[X] operator[>] identifier[p] , Keyword[final] identifier[Consumer] operator[<] identifier[X] operator[>] identifier[handler] operator[SEP] { Keyword[if] operator[SEP] identifier[p] operator[SEP] identifier[test] operator[SEP] identifier[e] operator[SEP] operator[SEP] Keyword[throw] identifier[ExceptionSoftener] operator[SEP] operator[<] identifier[RuntimeException] operator[>] identifier[uncheck] operator[SEP] identifier[e] operator[SEP] operator[SEP] Keyword[else] identifier[handler] operator[SEP] identifier[accept] operator[SEP] identifier[e] operator[SEP] operator[SEP] }
public static XorRelayedAddressAttribute createXorRelayedAddressAttribute( TransportAddress address, byte[] tranID) { XorRelayedAddressAttribute attribute = new XorRelayedAddressAttribute(); // TODO shouldn't we be XORing the address before setting it? attribute.setAddress(address, tranID); return attribute; }
class class_name[name] begin[{] method[createXorRelayedAddressAttribute, return_type[type[XorRelayedAddressAttribute]], modifier[public static], parameter[address, tranID]] begin[{] local_variable[type[XorRelayedAddressAttribute], attribute] call[attribute.setAddress, parameter[member[.address], member[.tranID]]] return[member[.attribute]] end[}] END[}]
Keyword[public] Keyword[static] identifier[XorRelayedAddressAttribute] identifier[createXorRelayedAddressAttribute] operator[SEP] identifier[TransportAddress] identifier[address] , Keyword[byte] operator[SEP] operator[SEP] identifier[tranID] operator[SEP] { identifier[XorRelayedAddressAttribute] identifier[attribute] operator[=] Keyword[new] identifier[XorRelayedAddressAttribute] operator[SEP] operator[SEP] operator[SEP] identifier[attribute] operator[SEP] identifier[setAddress] operator[SEP] identifier[address] , identifier[tranID] operator[SEP] operator[SEP] Keyword[return] identifier[attribute] operator[SEP] }
public String[] exec(String toExec) { Matcher m = getMatcher(toExec); if (m.find()) { List<String> list = new ArrayList<>(); int count = m.groupCount(); For(1).to(count).loop(i -> { list.add(m.group(i)); }); return list.toArray(new String[list.size()]); } else { return null; } }
class class_name[name] begin[{] method[exec, return_type[type[String]], modifier[public], parameter[toExec]] begin[{] local_variable[type[Matcher], m] if[call[m.find, parameter[]]] begin[{] local_variable[type[List], list] local_variable[type[int], count] call[.For, parameter[literal[1]]] return[call[list.toArray, parameter[ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))]]] else begin[{] return[literal[null]] end[}] end[}] END[}]
Keyword[public] identifier[String] operator[SEP] operator[SEP] identifier[exec] operator[SEP] identifier[String] identifier[toExec] operator[SEP] { identifier[Matcher] identifier[m] operator[=] identifier[getMatcher] operator[SEP] identifier[toExec] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m] operator[SEP] identifier[find] operator[SEP] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[list] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[count] operator[=] identifier[m] operator[SEP] identifier[groupCount] operator[SEP] operator[SEP] operator[SEP] identifier[For] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[to] operator[SEP] identifier[count] operator[SEP] operator[SEP] identifier[loop] operator[SEP] identifier[i] operator[->] { identifier[list] operator[SEP] identifier[add] operator[SEP] identifier[m] operator[SEP] identifier[group] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] Keyword[return] identifier[list] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[String] operator[SEP] identifier[list] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Other[null] operator[SEP] } }
public static void writeStringSet(DataOutputStream os, Collection<String> set) throws IOException { if(set==null) { os.writeInt(-1); } else { os.writeInt(set.size()); for(String s : set) { writeString(os, s); } } }
class class_name[name] begin[{] method[writeStringSet, return_type[void], modifier[public static], parameter[os, set]] begin[{] if[binary_operation[member[.set], ==, literal[null]]] begin[{] call[os.writeInt, parameter[literal[1]]] else begin[{] call[os.writeInt, parameter[call[set.size, parameter[]]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=os, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=set, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=s)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[writeStringSet] operator[SEP] identifier[DataOutputStream] identifier[os] , identifier[Collection] operator[<] identifier[String] operator[>] identifier[set] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[set] operator[==] Other[null] operator[SEP] { identifier[os] operator[SEP] identifier[writeInt] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] } Keyword[else] { identifier[os] operator[SEP] identifier[writeInt] operator[SEP] identifier[set] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[s] operator[:] identifier[set] operator[SEP] { identifier[writeString] operator[SEP] identifier[os] , identifier[s] operator[SEP] operator[SEP] } } }
public void loadContext(Context ctx) { validateContextNotNull(ctx); for (ContextDataFactory cdf : this.contextDataFactories) { cdf.loadContextData(getSession(), ctx); } }
class class_name[name] begin[{] method[loadContext, return_type[void], modifier[public], parameter[ctx]] begin[{] call[.validateContextNotNull, parameter[member[.ctx]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSession, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=ctx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=loadContextData, postfix_operators=[], prefix_operators=[], qualifier=cdf, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=contextDataFactories, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=cdf)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ContextDataFactory, sub_type=None))), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[loadContext] operator[SEP] identifier[Context] identifier[ctx] operator[SEP] { identifier[validateContextNotNull] operator[SEP] identifier[ctx] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ContextDataFactory] identifier[cdf] operator[:] Keyword[this] operator[SEP] identifier[contextDataFactories] operator[SEP] { identifier[cdf] operator[SEP] identifier[loadContextData] operator[SEP] identifier[getSession] operator[SEP] operator[SEP] , identifier[ctx] operator[SEP] operator[SEP] } }
public void deserialize(long mask) throws DeserializationException { if (mask <= RpcDeserializeLevel.DESERIALIZE_CLAZZ) { this.deserializeClazz(); } else if (mask <= RpcDeserializeLevel.DESERIALIZE_HEADER) { this.deserializeClazz(); this.deserializeHeader(this.getInvokeContext()); } else if (mask <= RpcDeserializeLevel.DESERIALIZE_ALL) { this.deserialize(); } }
class class_name[name] begin[{] method[deserialize, return_type[void], modifier[public], parameter[mask]] begin[{] if[binary_operation[member[.mask], <=, member[RpcDeserializeLevel.DESERIALIZE_CLAZZ]]] begin[{] THIS[call[None.deserializeClazz, parameter[]]] else begin[{] if[binary_operation[member[.mask], <=, member[RpcDeserializeLevel.DESERIALIZE_HEADER]]] begin[{] THIS[call[None.deserializeClazz, parameter[]]] THIS[call[None.deserializeHeader, parameter[THIS[call[None.getInvokeContext, parameter[]]]]]] else begin[{] if[binary_operation[member[.mask], <=, member[RpcDeserializeLevel.DESERIALIZE_ALL]]] begin[{] THIS[call[None.deserialize, parameter[]]] else begin[{] None end[}] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[deserialize] operator[SEP] Keyword[long] identifier[mask] operator[SEP] Keyword[throws] identifier[DeserializationException] { Keyword[if] operator[SEP] identifier[mask] operator[<=] identifier[RpcDeserializeLevel] operator[SEP] identifier[DESERIALIZE_CLAZZ] operator[SEP] { Keyword[this] operator[SEP] identifier[deserializeClazz] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[mask] operator[<=] identifier[RpcDeserializeLevel] operator[SEP] identifier[DESERIALIZE_HEADER] operator[SEP] { Keyword[this] operator[SEP] identifier[deserializeClazz] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[deserializeHeader] operator[SEP] Keyword[this] operator[SEP] identifier[getInvokeContext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[mask] operator[<=] identifier[RpcDeserializeLevel] operator[SEP] identifier[DESERIALIZE_ALL] operator[SEP] { Keyword[this] operator[SEP] identifier[deserialize] operator[SEP] operator[SEP] operator[SEP] } }
protected static void read(InputStream xmlInputStream) throws SAXException, IOException, ParserConfigurationException, JAXBException { LOGGER.info("process example file"); Is24XmlDocument doc = Is24XmlUtils.createDocument(xmlInputStream); if (doc == null) { LOGGER.warn("> provided XML is not supported"); } else { printToConsole(doc); } }
class class_name[name] begin[{] method[read, return_type[void], modifier[static protected], parameter[xmlInputStream]] begin[{] call[LOGGER.info, parameter[literal["process example file"]]] local_variable[type[Is24XmlDocument], doc] if[binary_operation[member[.doc], ==, literal[null]]] begin[{] call[LOGGER.warn, parameter[literal["> provided XML is not supported"]]] else begin[{] call[.printToConsole, parameter[member[.doc]]] end[}] end[}] END[}]
Keyword[protected] Keyword[static] Keyword[void] identifier[read] operator[SEP] identifier[InputStream] identifier[xmlInputStream] operator[SEP] Keyword[throws] identifier[SAXException] , identifier[IOException] , identifier[ParserConfigurationException] , identifier[JAXBException] { identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Is24XmlDocument] identifier[doc] operator[=] identifier[Is24XmlUtils] operator[SEP] identifier[createDocument] operator[SEP] identifier[xmlInputStream] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[doc] operator[==] Other[null] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[printToConsole] operator[SEP] identifier[doc] operator[SEP] operator[SEP] } }
public void setContentLength(int len) { if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) { //306998.15 logger.entering(CLASS_NAME,"setContentLength", "length --> " + String.valueOf(len) + " ["+this+"]"); } // d151464 - check the include flag WebAppDispatcherContext dispatchContext = (WebAppDispatcherContext) getRequest().getWebAppDispatcherContext(); if (dispatchContext.isInclude() == true) { if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) { //306998.15 logger.logp(Level.FINE, CLASS_NAME,"setContentLength", nls.getString("Illegal.from.included.servlet", "Illegal from included servlet"), "setContentLength length --> " + String.valueOf(len)); //311717 } } else { if (_response!=null) { if (!_response.isCommitted()) { _response.setContentLength(len); } } _contentLength = len; // LIBERTY _bufferedOut.setLimit(_contentLength = len); _bufferedWriter.setLimitLong(_contentLength); //still want to try to set the header even if the response is committed to throw the warning setIntHeader(HEADER_CONTENT_LENGTH, len); } if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) { //306998.15 logger.exiting(CLASS_NAME,"setContentLength"); } }
class class_name[name] begin[{] method[setContentLength, return_type[void], modifier[public], parameter[len]] begin[{] if[binary_operation[call[com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[logger.isLoggable, parameter[member[Level.FINE]]]]] begin[{] call[logger.entering, parameter[member[.CLASS_NAME], literal["setContentLength"], binary_operation[binary_operation[binary_operation[binary_operation[literal["length --> "], +, call[String.valueOf, parameter[member[.len]]]], +, literal[" ["]], +, THIS[]], +, literal["]"]]]] else begin[{] None end[}] local_variable[type[WebAppDispatcherContext], dispatchContext] if[binary_operation[call[dispatchContext.isInclude, parameter[]], ==, literal[true]]] begin[{] if[binary_operation[call[com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[logger.isLoggable, parameter[member[Level.FINE]]]]] begin[{] call[logger.logp, parameter[member[Level.FINE], member[.CLASS_NAME], literal["setContentLength"], call[nls.getString, parameter[literal["Illegal.from.included.servlet"], literal["Illegal from included servlet"]]], binary_operation[literal["setContentLength length --> "], +, call[String.valueOf, parameter[member[.len]]]]]] else begin[{] None end[}] else begin[{] if[binary_operation[member[._response], !=, literal[null]]] begin[{] if[call[_response.isCommitted, parameter[]]] begin[{] call[_response.setContentLength, parameter[member[.len]]] else begin[{] None end[}] else begin[{] None end[}] assign[member[._contentLength], member[.len]] call[_bufferedWriter.setLimitLong, parameter[member[._contentLength]]] call[.setIntHeader, parameter[member[.HEADER_CONTENT_LENGTH], member[.len]]] end[}] if[binary_operation[call[com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[logger.isLoggable, parameter[member[Level.FINE]]]]] begin[{] call[logger.exiting, parameter[member[.CLASS_NAME], literal["setContentLength"]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setContentLength] operator[SEP] Keyword[int] identifier[len] operator[SEP] { Keyword[if] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ejs] operator[SEP] identifier[ras] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[logger] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[FINE] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[entering] operator[SEP] identifier[CLASS_NAME] , literal[String] , literal[String] operator[+] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[len] operator[SEP] operator[+] literal[String] operator[+] Keyword[this] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[WebAppDispatcherContext] identifier[dispatchContext] operator[=] operator[SEP] identifier[WebAppDispatcherContext] operator[SEP] identifier[getRequest] operator[SEP] operator[SEP] operator[SEP] identifier[getWebAppDispatcherContext] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dispatchContext] operator[SEP] identifier[isInclude] operator[SEP] operator[SEP] operator[==] literal[boolean] operator[SEP] { Keyword[if] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ejs] operator[SEP] identifier[ras] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[logger] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[FINE] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[logp] operator[SEP] identifier[Level] operator[SEP] identifier[FINE] , identifier[CLASS_NAME] , literal[String] , identifier[nls] operator[SEP] identifier[getString] operator[SEP] literal[String] , literal[String] operator[SEP] , literal[String] operator[+] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[len] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[if] operator[SEP] identifier[_response] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[_response] operator[SEP] identifier[isCommitted] operator[SEP] operator[SEP] operator[SEP] { identifier[_response] operator[SEP] identifier[setContentLength] operator[SEP] identifier[len] operator[SEP] operator[SEP] } } identifier[_contentLength] operator[=] identifier[len] operator[SEP] identifier[_bufferedWriter] operator[SEP] identifier[setLimitLong] operator[SEP] identifier[_contentLength] operator[SEP] operator[SEP] identifier[setIntHeader] operator[SEP] identifier[HEADER_CONTENT_LENGTH] , identifier[len] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ejs] operator[SEP] identifier[ras] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[logger] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[FINE] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[exiting] operator[SEP] identifier[CLASS_NAME] , literal[String] operator[SEP] operator[SEP] } }
private List<HalFormsProperty> determineInputs() { if (!ENTITY_ALTERING_METHODS.contains(getHttpMethod())) { return Collections.emptyList(); } return PropertyUtils.findPropertyNames(getInputType()).stream() // .map(propertyName -> new HalFormsProperty() // .withName(propertyName) // .withRequired(REQUIRED_METHODS.contains(getHttpMethod()))) // .collect(Collectors.toList()); }
class class_name[name] begin[{] method[determineInputs, return_type[type[List]], modifier[private], parameter[]] begin[{] if[call[ENTITY_ALTERING_METHODS.contains, parameter[call[.getHttpMethod, parameter[]]]]] begin[{] return[call[Collections.emptyList, parameter[]]] else begin[{] None end[}] return[call[PropertyUtils.findPropertyNames, parameter[call[.getInputType, parameter[]]]]] end[}] END[}]
Keyword[private] identifier[List] operator[<] identifier[HalFormsProperty] operator[>] identifier[determineInputs] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[ENTITY_ALTERING_METHODS] operator[SEP] identifier[contains] operator[SEP] identifier[getHttpMethod] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[Collections] operator[SEP] identifier[emptyList] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[PropertyUtils] operator[SEP] identifier[findPropertyNames] operator[SEP] identifier[getInputType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[propertyName] operator[->] Keyword[new] identifier[HalFormsProperty] operator[SEP] operator[SEP] operator[SEP] identifier[withName] operator[SEP] identifier[propertyName] operator[SEP] operator[SEP] identifier[withRequired] operator[SEP] identifier[REQUIRED_METHODS] operator[SEP] identifier[contains] operator[SEP] identifier[getHttpMethod] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[toList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
void handleProcessFinish(InternalEvent event) throws ProcessException { try { String ownerType = event.getOwnerType(); String secondaryOwnerType = event.getSecondaryOwnerType(); if (!OwnerType.ACTIVITY_INSTANCE.equals(secondaryOwnerType)) { // top level processes (non-remote) or ABORT embedded processes ProcessInstance pi = edao.getProcessInstance(event.getWorkInstanceId()); Process subProcVO = getProcessDefinition(pi); if (pi.isEmbedded()) { subProcVO.getSubProcessVO(event.getWorkId()); String embeddedProcType = subProcVO.getAttribute(WorkAttributeConstant.EMBEDDED_PROCESS_TYPE); if (ProcessVisibilityConstant.EMBEDDED_ABORT_PROCESS.equals(embeddedProcType)) { Long parentProcInstId = event.getOwnerId(); pi = edao.getProcessInstance(parentProcInstId); this.cancelProcessInstanceTree(pi); if (logger.isInfoEnabled()) { logger.info(logtag(pi.getProcessId(), pi.getId(), pi.getMasterRequestId()), "Process cancelled"); } InternalEvent procFinishMsg = InternalEvent.createProcessFinishMessage(pi); if (OwnerType.ACTIVITY_INSTANCE.equals(pi.getSecondaryOwner())) { procFinishMsg.setSecondaryOwnerType(pi.getSecondaryOwner()); procFinishMsg.setSecondaryOwnerId(pi.getSecondaryOwnerId()); } this.sendInternalEvent(procFinishMsg); } } } else if (ownerType.equals(OwnerType.PROCESS_INSTANCE) || ownerType.equals(OwnerType.MAIN_PROCESS_INSTANCE) || ownerType.equals(OwnerType.ERROR)) { // local process call or call to error/correction/delay handler Long activityInstId = event.getSecondaryOwnerId(); ActivityInstance actInst = edao.getActivityInstance(activityInstId); ProcessInstance procInst = edao.getProcessInstance(actInst.getProcessInstanceId()); BaseActivity cntrActivity = prepareActivityForResume(event,procInst, actInst); if (cntrActivity!=null) { resumeProcessInstanceForSecondaryOwner(event, cntrActivity); } // else the process is completed/cancelled } } catch (Exception e) { throw new ProcessException(-1, e.getMessage(), e); } }
class class_name[name] begin[{] method[handleProcessFinish, return_type[void], modifier[default], parameter[event]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getOwnerType, postfix_operators=[], prefix_operators=[], qualifier=event, selectors=[], type_arguments=None), name=ownerType)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getSecondaryOwnerType, postfix_operators=[], prefix_operators=[], qualifier=event, selectors=[], type_arguments=None), name=secondaryOwnerType)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=secondaryOwnerType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=['!'], qualifier=OwnerType.ACTIVITY_INSTANCE, selectors=[], type_arguments=None), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=PROCESS_INSTANCE, postfix_operators=[], prefix_operators=[], qualifier=OwnerType, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=ownerType, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=MAIN_PROCESS_INSTANCE, postfix_operators=[], prefix_operators=[], qualifier=OwnerType, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=ownerType, selectors=[], type_arguments=None), operator=||), operandr=MethodInvocation(arguments=[MemberReference(member=ERROR, postfix_operators=[], prefix_operators=[], qualifier=OwnerType, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=ownerType, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getSecondaryOwnerId, postfix_operators=[], prefix_operators=[], qualifier=event, selectors=[], type_arguments=None), name=activityInstId)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Long, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=activityInstId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getActivityInstance, postfix_operators=[], prefix_operators=[], qualifier=edao, selectors=[], type_arguments=None), name=actInst)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ActivityInstance, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getProcessInstanceId, postfix_operators=[], prefix_operators=[], qualifier=actInst, selectors=[], type_arguments=None)], member=getProcessInstance, postfix_operators=[], prefix_operators=[], qualifier=edao, selectors=[], type_arguments=None), name=procInst)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ProcessInstance, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=procInst, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=actInst, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=prepareActivityForResume, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=cntrActivity)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BaseActivity, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=cntrActivity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cntrActivity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=resumeProcessInstanceForSecondaryOwner, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getWorkInstanceId, postfix_operators=[], prefix_operators=[], qualifier=event, selectors=[], type_arguments=None)], member=getProcessInstance, postfix_operators=[], prefix_operators=[], qualifier=edao, selectors=[], type_arguments=None), name=pi)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ProcessInstance, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=pi, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getProcessDefinition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=subProcVO)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Process, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=isEmbedded, postfix_operators=[], prefix_operators=[], qualifier=pi, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getWorkId, postfix_operators=[], prefix_operators=[], qualifier=event, selectors=[], type_arguments=None)], member=getSubProcessVO, postfix_operators=[], prefix_operators=[], qualifier=subProcVO, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=EMBEDDED_PROCESS_TYPE, postfix_operators=[], prefix_operators=[], qualifier=WorkAttributeConstant, selectors=[])], member=getAttribute, postfix_operators=[], prefix_operators=[], qualifier=subProcVO, selectors=[], type_arguments=None), name=embeddedProcType)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=embeddedProcType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=ProcessVisibilityConstant.EMBEDDED_ABORT_PROCESS, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getOwnerId, postfix_operators=[], prefix_operators=[], qualifier=event, selectors=[], type_arguments=None), name=parentProcInstId)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Long, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=pi, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=parentProcInstId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getProcessInstance, postfix_operators=[], prefix_operators=[], qualifier=edao, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=pi, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=cancelProcessInstanceTree, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isInfoEnabled, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getProcessId, postfix_operators=[], prefix_operators=[], qualifier=pi, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=pi, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getMasterRequestId, postfix_operators=[], prefix_operators=[], qualifier=pi, selectors=[], type_arguments=None)], member=logtag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Process cancelled")], member=info, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=pi, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createProcessFinishMessage, postfix_operators=[], prefix_operators=[], qualifier=InternalEvent, selectors=[], type_arguments=None), name=procFinishMsg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InternalEvent, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSecondaryOwner, postfix_operators=[], prefix_operators=[], qualifier=pi, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=[], qualifier=OwnerType.ACTIVITY_INSTANCE, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSecondaryOwner, postfix_operators=[], prefix_operators=[], qualifier=pi, selectors=[], type_arguments=None)], member=setSecondaryOwnerType, postfix_operators=[], prefix_operators=[], qualifier=procFinishMsg, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSecondaryOwnerId, postfix_operators=[], prefix_operators=[], qualifier=pi, selectors=[], type_arguments=None)], member=setSecondaryOwnerId, postfix_operators=[], prefix_operators=[], qualifier=procFinishMsg, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=procFinishMsg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sendInternalEvent, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]))]))]))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), 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=ProcessException, 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[void] identifier[handleProcessFinish] operator[SEP] identifier[InternalEvent] identifier[event] operator[SEP] Keyword[throws] identifier[ProcessException] { Keyword[try] { identifier[String] identifier[ownerType] operator[=] identifier[event] operator[SEP] identifier[getOwnerType] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[secondaryOwnerType] operator[=] identifier[event] operator[SEP] identifier[getSecondaryOwnerType] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[OwnerType] operator[SEP] identifier[ACTIVITY_INSTANCE] operator[SEP] identifier[equals] operator[SEP] identifier[secondaryOwnerType] operator[SEP] operator[SEP] { identifier[ProcessInstance] identifier[pi] operator[=] identifier[edao] operator[SEP] identifier[getProcessInstance] operator[SEP] identifier[event] operator[SEP] identifier[getWorkInstanceId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Process] identifier[subProcVO] operator[=] identifier[getProcessDefinition] operator[SEP] identifier[pi] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pi] operator[SEP] identifier[isEmbedded] operator[SEP] operator[SEP] operator[SEP] { identifier[subProcVO] operator[SEP] identifier[getSubProcessVO] operator[SEP] identifier[event] operator[SEP] identifier[getWorkId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[embeddedProcType] operator[=] identifier[subProcVO] operator[SEP] identifier[getAttribute] operator[SEP] identifier[WorkAttributeConstant] operator[SEP] identifier[EMBEDDED_PROCESS_TYPE] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ProcessVisibilityConstant] operator[SEP] identifier[EMBEDDED_ABORT_PROCESS] operator[SEP] identifier[equals] operator[SEP] identifier[embeddedProcType] operator[SEP] operator[SEP] { identifier[Long] identifier[parentProcInstId] operator[=] identifier[event] operator[SEP] identifier[getOwnerId] operator[SEP] operator[SEP] operator[SEP] identifier[pi] operator[=] identifier[edao] operator[SEP] identifier[getProcessInstance] operator[SEP] identifier[parentProcInstId] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[cancelProcessInstanceTree] operator[SEP] identifier[pi] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isInfoEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[info] operator[SEP] identifier[logtag] operator[SEP] identifier[pi] operator[SEP] identifier[getProcessId] operator[SEP] operator[SEP] , identifier[pi] operator[SEP] identifier[getId] operator[SEP] operator[SEP] , identifier[pi] operator[SEP] identifier[getMasterRequestId] operator[SEP] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] } identifier[InternalEvent] identifier[procFinishMsg] operator[=] identifier[InternalEvent] operator[SEP] identifier[createProcessFinishMessage] operator[SEP] identifier[pi] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[OwnerType] operator[SEP] identifier[ACTIVITY_INSTANCE] operator[SEP] identifier[equals] operator[SEP] identifier[pi] operator[SEP] identifier[getSecondaryOwner] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[procFinishMsg] operator[SEP] identifier[setSecondaryOwnerType] operator[SEP] identifier[pi] operator[SEP] identifier[getSecondaryOwner] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[procFinishMsg] operator[SEP] identifier[setSecondaryOwnerId] operator[SEP] identifier[pi] operator[SEP] identifier[getSecondaryOwnerId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[sendInternalEvent] operator[SEP] identifier[procFinishMsg] operator[SEP] operator[SEP] } } } Keyword[else] Keyword[if] operator[SEP] identifier[ownerType] operator[SEP] identifier[equals] operator[SEP] identifier[OwnerType] operator[SEP] identifier[PROCESS_INSTANCE] operator[SEP] operator[||] identifier[ownerType] operator[SEP] identifier[equals] operator[SEP] identifier[OwnerType] operator[SEP] identifier[MAIN_PROCESS_INSTANCE] operator[SEP] operator[||] identifier[ownerType] operator[SEP] identifier[equals] operator[SEP] identifier[OwnerType] operator[SEP] identifier[ERROR] operator[SEP] operator[SEP] { identifier[Long] identifier[activityInstId] operator[=] identifier[event] operator[SEP] identifier[getSecondaryOwnerId] operator[SEP] operator[SEP] operator[SEP] identifier[ActivityInstance] identifier[actInst] operator[=] identifier[edao] operator[SEP] identifier[getActivityInstance] operator[SEP] identifier[activityInstId] operator[SEP] operator[SEP] identifier[ProcessInstance] identifier[procInst] operator[=] identifier[edao] operator[SEP] identifier[getProcessInstance] operator[SEP] identifier[actInst] operator[SEP] identifier[getProcessInstanceId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[BaseActivity] identifier[cntrActivity] operator[=] identifier[prepareActivityForResume] operator[SEP] identifier[event] , identifier[procInst] , identifier[actInst] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cntrActivity] operator[!=] Other[null] operator[SEP] { identifier[resumeProcessInstanceForSecondaryOwner] operator[SEP] identifier[event] , identifier[cntrActivity] operator[SEP] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ProcessException] operator[SEP] operator[-] Other[1] , identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public IStatus validateDrop(Object target, int aDropOperation, TransferData transferType) { // if (VdmUIPlugin.DEBUG) // System.out.println("Target Object for drop: " // + target.getClass().toString()); if (target instanceof IVdmContainer) { target = ((IVdmContainer) target).getContainer(); } if (!(target instanceof IResource)) { return WorkbenchNavigatorPlugin .createStatus( IStatus.INFO, 0, WorkbenchNavigatorMessages.DropAdapter_targetMustBeResource, null); } IResource resource = (IResource) target; if (!resource.isAccessible()) { return WorkbenchNavigatorPlugin .createErrorStatus( 0, WorkbenchNavigatorMessages.DropAdapter_canNotDropIntoClosedProject, null); } IContainer destination = getActualTarget(resource); if (destination.getType() == IResource.ROOT) { return WorkbenchNavigatorPlugin .createErrorStatus( 0, WorkbenchNavigatorMessages.DropAdapter_resourcesCanNotBeSiblings, null); } String message = null; // drag within Eclipse? if (LocalSelectionTransfer.getTransfer().isSupportedType(transferType)) { IResource[] selectedResources = getSelectedResources(); boolean bProjectDrop = false; for (int iRes = 0; iRes < selectedResources.length; iRes++) { IResource res = selectedResources[iRes]; if (res instanceof IProject) { bProjectDrop = true; } } if (bProjectDrop) { // drop of projects not supported on other IResources // "Path for project must have only one segment." message = WorkbenchNavigatorMessages.DropAdapter_canNotDropProjectIntoProject; } else { if (selectedResources.length == 0) { message = WorkbenchNavigatorMessages.DropAdapter_dropOperationErrorOther; } else { CopyFilesAndFoldersOperation operation; if (aDropOperation == DND.DROP_COPY) { if (Policy.DEBUG_DND) { System.out .println("ResourceDropAdapterAssistant.validateDrop validating COPY."); //$NON-NLS-1$ } operation = new CopyFilesAndFoldersOperation(getShell()); } else { if (Policy.DEBUG_DND) { System.out .println("ResourceDropAdapterAssistant.validateDrop validating MOVE."); //$NON-NLS-1$ } operation = new MoveFilesAndFoldersOperation(getShell()); } message = operation.validateDestination(destination, selectedResources); } } } // file import? else if (FileTransfer.getInstance().isSupportedType(transferType)) { String[] sourceNames = (String[]) FileTransfer.getInstance() .nativeToJava(transferType); if (sourceNames == null) { // source names will be null on Linux. Use empty names to do // destination validation. // Fixes bug 29778 sourceNames = new String[0]; } CopyFilesAndFoldersOperation copyOperation = new CopyFilesAndFoldersOperation( getShell()); message = copyOperation.validateImportDestination(destination, sourceNames); } if (message != null) { return WorkbenchNavigatorPlugin.createErrorStatus(0, message, null); } return Status.OK_STATUS; }
class class_name[name] begin[{] method[validateDrop, return_type[type[IStatus]], modifier[public], parameter[target, aDropOperation, transferType]] begin[{] if[binary_operation[member[.target], instanceof, type[IVdmContainer]]] begin[{] assign[member[.target], Cast(expression=MemberReference(member=target, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=IVdmContainer, sub_type=None))] else begin[{] None end[}] if[binary_operation[member[.target], instanceof, type[IResource]]] begin[{] return[call[WorkbenchNavigatorPlugin.createStatus, parameter[member[IStatus.INFO], literal[0], member[WorkbenchNavigatorMessages.DropAdapter_targetMustBeResource], literal[null]]]] else begin[{] None end[}] local_variable[type[IResource], resource] if[call[resource.isAccessible, parameter[]]] begin[{] return[call[WorkbenchNavigatorPlugin.createErrorStatus, parameter[literal[0], member[WorkbenchNavigatorMessages.DropAdapter_canNotDropIntoClosedProject], literal[null]]]] else begin[{] None end[}] local_variable[type[IContainer], destination] if[binary_operation[call[destination.getType, parameter[]], ==, member[IResource.ROOT]]] begin[{] return[call[WorkbenchNavigatorPlugin.createErrorStatus, parameter[literal[0], member[WorkbenchNavigatorMessages.DropAdapter_resourcesCanNotBeSiblings], literal[null]]]] else begin[{] None end[}] local_variable[type[String], message] if[call[LocalSelectionTransfer.getTransfer, parameter[]]] begin[{] local_variable[type[IResource], selectedResources] local_variable[type[boolean], bProjectDrop] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=selectedResources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=iRes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=res)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=IResource, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=res, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=IProject, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=bProjectDrop, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=iRes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=selectedResources, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=iRes)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=iRes, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) if[member[.bProjectDrop]] begin[{] assign[member[.message], member[WorkbenchNavigatorMessages.DropAdapter_canNotDropProjectIntoProject]] else begin[{] if[binary_operation[member[selectedResources.length], ==, literal[0]]] begin[{] assign[member[.message], member[WorkbenchNavigatorMessages.DropAdapter_dropOperationErrorOther]] else begin[{] local_variable[type[CopyFilesAndFoldersOperation], operation] if[binary_operation[member[.aDropOperation], ==, member[DND.DROP_COPY]]] begin[{] if[member[Policy.DEBUG_DND]] begin[{] call[System.out.println, parameter[literal["ResourceDropAdapterAssistant.validateDrop validating COPY."]]] else begin[{] None end[}] assign[member[.operation], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getShell, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CopyFilesAndFoldersOperation, sub_type=None))] else begin[{] if[member[Policy.DEBUG_DND]] begin[{] call[System.out.println, parameter[literal["ResourceDropAdapterAssistant.validateDrop validating MOVE."]]] else begin[{] None end[}] assign[member[.operation], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getShell, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MoveFilesAndFoldersOperation, sub_type=None))] end[}] assign[member[.message], call[operation.validateDestination, parameter[member[.destination], member[.selectedResources]]]] end[}] end[}] else begin[{] if[call[FileTransfer.getInstance, parameter[]]] begin[{] local_variable[type[String], sourceNames] if[binary_operation[member[.sourceNames], ==, literal[null]]] begin[{] assign[member[.sourceNames], ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))] else begin[{] None end[}] local_variable[type[CopyFilesAndFoldersOperation], copyOperation] assign[member[.message], call[copyOperation.validateImportDestination, parameter[member[.destination], member[.sourceNames]]]] else begin[{] None end[}] end[}] if[binary_operation[member[.message], !=, literal[null]]] begin[{] return[call[WorkbenchNavigatorPlugin.createErrorStatus, parameter[literal[0], member[.message], literal[null]]]] else begin[{] None end[}] return[member[Status.OK_STATUS]] end[}] END[}]
Keyword[public] identifier[IStatus] identifier[validateDrop] operator[SEP] identifier[Object] identifier[target] , Keyword[int] identifier[aDropOperation] , identifier[TransferData] identifier[transferType] operator[SEP] { Keyword[if] operator[SEP] identifier[target] Keyword[instanceof] identifier[IVdmContainer] operator[SEP] { identifier[target] operator[=] operator[SEP] operator[SEP] identifier[IVdmContainer] operator[SEP] identifier[target] operator[SEP] operator[SEP] identifier[getContainer] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[target] Keyword[instanceof] identifier[IResource] operator[SEP] operator[SEP] { Keyword[return] identifier[WorkbenchNavigatorPlugin] operator[SEP] identifier[createStatus] operator[SEP] identifier[IStatus] operator[SEP] identifier[INFO] , Other[0] , identifier[WorkbenchNavigatorMessages] operator[SEP] identifier[DropAdapter_targetMustBeResource] , Other[null] operator[SEP] operator[SEP] } identifier[IResource] identifier[resource] operator[=] operator[SEP] identifier[IResource] operator[SEP] identifier[target] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[resource] operator[SEP] identifier[isAccessible] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[WorkbenchNavigatorPlugin] operator[SEP] identifier[createErrorStatus] operator[SEP] Other[0] , identifier[WorkbenchNavigatorMessages] operator[SEP] identifier[DropAdapter_canNotDropIntoClosedProject] , Other[null] operator[SEP] operator[SEP] } identifier[IContainer] identifier[destination] operator[=] identifier[getActualTarget] operator[SEP] identifier[resource] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[destination] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[==] identifier[IResource] operator[SEP] identifier[ROOT] operator[SEP] { Keyword[return] identifier[WorkbenchNavigatorPlugin] operator[SEP] identifier[createErrorStatus] operator[SEP] Other[0] , identifier[WorkbenchNavigatorMessages] operator[SEP] identifier[DropAdapter_resourcesCanNotBeSiblings] , Other[null] operator[SEP] operator[SEP] } identifier[String] identifier[message] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[LocalSelectionTransfer] operator[SEP] identifier[getTransfer] operator[SEP] operator[SEP] operator[SEP] identifier[isSupportedType] operator[SEP] identifier[transferType] operator[SEP] operator[SEP] { identifier[IResource] operator[SEP] operator[SEP] identifier[selectedResources] operator[=] identifier[getSelectedResources] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[bProjectDrop] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[iRes] operator[=] Other[0] operator[SEP] identifier[iRes] operator[<] identifier[selectedResources] operator[SEP] identifier[length] operator[SEP] identifier[iRes] operator[++] operator[SEP] { identifier[IResource] identifier[res] operator[=] identifier[selectedResources] operator[SEP] identifier[iRes] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[res] Keyword[instanceof] identifier[IProject] operator[SEP] { identifier[bProjectDrop] operator[=] literal[boolean] operator[SEP] } } Keyword[if] operator[SEP] identifier[bProjectDrop] operator[SEP] { identifier[message] operator[=] identifier[WorkbenchNavigatorMessages] operator[SEP] identifier[DropAdapter_canNotDropProjectIntoProject] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[selectedResources] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { identifier[message] operator[=] identifier[WorkbenchNavigatorMessages] operator[SEP] identifier[DropAdapter_dropOperationErrorOther] operator[SEP] } Keyword[else] { identifier[CopyFilesAndFoldersOperation] identifier[operation] operator[SEP] Keyword[if] operator[SEP] identifier[aDropOperation] operator[==] identifier[DND] operator[SEP] identifier[DROP_COPY] operator[SEP] { Keyword[if] operator[SEP] identifier[Policy] operator[SEP] identifier[DEBUG_DND] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[operation] operator[=] Keyword[new] identifier[CopyFilesAndFoldersOperation] operator[SEP] identifier[getShell] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[Policy] operator[SEP] identifier[DEBUG_DND] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[operation] operator[=] Keyword[new] identifier[MoveFilesAndFoldersOperation] operator[SEP] identifier[getShell] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[message] operator[=] identifier[operation] operator[SEP] identifier[validateDestination] operator[SEP] identifier[destination] , identifier[selectedResources] operator[SEP] operator[SEP] } } } Keyword[else] Keyword[if] operator[SEP] identifier[FileTransfer] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[isSupportedType] operator[SEP] identifier[transferType] operator[SEP] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[sourceNames] operator[=] operator[SEP] identifier[String] operator[SEP] operator[SEP] operator[SEP] identifier[FileTransfer] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[nativeToJava] operator[SEP] identifier[transferType] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sourceNames] operator[==] Other[null] operator[SEP] { identifier[sourceNames] operator[=] Keyword[new] identifier[String] operator[SEP] Other[0] operator[SEP] operator[SEP] } identifier[CopyFilesAndFoldersOperation] identifier[copyOperation] operator[=] Keyword[new] identifier[CopyFilesAndFoldersOperation] operator[SEP] identifier[getShell] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[message] operator[=] identifier[copyOperation] operator[SEP] identifier[validateImportDestination] operator[SEP] identifier[destination] , identifier[sourceNames] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[message] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[WorkbenchNavigatorPlugin] operator[SEP] identifier[createErrorStatus] operator[SEP] Other[0] , identifier[message] , Other[null] operator[SEP] operator[SEP] } Keyword[return] identifier[Status] operator[SEP] identifier[OK_STATUS] operator[SEP] }
public static CircuitBreakerExports ofCircuitBreaker(String prefix, CircuitBreaker circuitBreaker) { requireNonNull(prefix); requireNonNull(circuitBreaker); return new CircuitBreakerExports(prefix, Array.of(circuitBreaker)); }
class class_name[name] begin[{] method[ofCircuitBreaker, return_type[type[CircuitBreakerExports]], modifier[public static], parameter[prefix, circuitBreaker]] begin[{] call[.requireNonNull, parameter[member[.prefix]]] call[.requireNonNull, parameter[member[.circuitBreaker]]] return[ClassCreator(arguments=[MemberReference(member=prefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=circuitBreaker, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=of, postfix_operators=[], prefix_operators=[], qualifier=Array, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CircuitBreakerExports, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[CircuitBreakerExports] identifier[ofCircuitBreaker] operator[SEP] identifier[String] identifier[prefix] , identifier[CircuitBreaker] identifier[circuitBreaker] operator[SEP] { identifier[requireNonNull] operator[SEP] identifier[prefix] operator[SEP] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[circuitBreaker] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[CircuitBreakerExports] operator[SEP] identifier[prefix] , identifier[Array] operator[SEP] identifier[of] operator[SEP] identifier[circuitBreaker] operator[SEP] operator[SEP] operator[SEP] }
public static void escapePropertiesKey(final String text, final Writer writer, final PropertiesKeyEscapeLevel level) throws IOException { if (writer == null) { throw new IllegalArgumentException("Argument 'writer' cannot be null"); } if (level == null) { throw new IllegalArgumentException("The 'level' argument cannot be null"); } PropertiesKeyEscapeUtil.escape(new InternalStringReader(text), writer, level); }
class class_name[name] begin[{] method[escapePropertiesKey, return_type[void], modifier[public static], parameter[text, writer, level]] begin[{] if[binary_operation[member[.writer], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Argument 'writer' 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[.level], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The 'level' argument 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[PropertiesKeyEscapeUtil.escape, parameter[ClassCreator(arguments=[MemberReference(member=text, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InternalStringReader, sub_type=None)), member[.writer], member[.level]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[escapePropertiesKey] operator[SEP] Keyword[final] identifier[String] identifier[text] , Keyword[final] identifier[Writer] identifier[writer] , Keyword[final] identifier[PropertiesKeyEscapeLevel] identifier[level] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[writer] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[level] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[PropertiesKeyEscapeUtil] operator[SEP] identifier[escape] operator[SEP] Keyword[new] identifier[InternalStringReader] operator[SEP] identifier[text] operator[SEP] , identifier[writer] , identifier[level] operator[SEP] operator[SEP] }
final public void Equality() throws ParseException { Compare(); label_9: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EQ0: case EQ1: case NE0: case NE1: ; break; default: jj_la1[14] = jj_gen; break label_9; } switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EQ0: case EQ1: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EQ0: jj_consume_token(EQ0); break; case EQ1: jj_consume_token(EQ1); break; default: jj_la1[15] = jj_gen; jj_consume_token(-1); throw new ParseException(); } AstEqual jjtn001 = new AstEqual(JJTEQUAL); boolean jjtc001 = true; jjtree.openNodeScope(jjtn001); try { Compare(); } catch (Throwable jjte001) { if (jjtc001) { jjtree.clearNodeScope(jjtn001); jjtc001 = false; } else { jjtree.popNode(); } if (jjte001 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte001;} } if (jjte001 instanceof ParseException) { {if (true) throw (ParseException)jjte001;} } {if (true) throw (Error)jjte001;} } finally { if (jjtc001) { jjtree.closeNodeScope(jjtn001, 2); } } break; case NE0: case NE1: switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case NE0: jj_consume_token(NE0); break; case NE1: jj_consume_token(NE1); break; default: jj_la1[16] = jj_gen; jj_consume_token(-1); throw new ParseException(); } AstNotEqual jjtn002 = new AstNotEqual(JJTNOTEQUAL); boolean jjtc002 = true; jjtree.openNodeScope(jjtn002); try { Compare(); } catch (Throwable jjte002) { if (jjtc002) { jjtree.clearNodeScope(jjtn002); jjtc002 = false; } else { jjtree.popNode(); } if (jjte002 instanceof RuntimeException) { {if (true) throw (RuntimeException)jjte002;} } if (jjte002 instanceof ParseException) { {if (true) throw (ParseException)jjte002;} } {if (true) throw (Error)jjte002;} } finally { if (jjtc002) { jjtree.closeNodeScope(jjtn002, 2); } } break; default: jj_la1[17] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } }
class class_name[name] begin[{] method[Equality, return_type[void], modifier[final public], parameter[]] begin[{] call[.Compare, parameter[]] while[literal[true]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['EQ0', 'EQ1', 'NE0', 'NE1'], statements=[Statement(label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=jj_la1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=14))]), type==, value=MemberReference(member=jj_gen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), BreakStatement(goto=label_9, label=None)])], expression=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=jj_ntk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator===), if_false=MemberReference(member=jj_ntk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[], member=jj_ntk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None) SwitchStatement(cases=[SwitchStatementCase(case=['EQ0', 'EQ1'], statements=[SwitchStatement(cases=[SwitchStatementCase(case=['EQ0'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=EQ0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=jj_consume_token, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['EQ1'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=EQ1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=jj_consume_token, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=jj_la1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=15))]), type==, value=MemberReference(member=jj_gen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)], member=jj_consume_token, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ParseException, sub_type=None)), label=None)])], expression=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=jj_ntk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator===), if_false=MemberReference(member=jj_ntk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[], member=jj_ntk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=JJTEQUAL, 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=AstEqual, sub_type=None)), name=jjtn001)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AstEqual, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), name=jjtc001)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=jjtn001, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=openNodeScope, postfix_operators=[], prefix_operators=[], qualifier=jjtree, selectors=[], type_arguments=None), label=None), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=Compare, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[IfStatement(condition=MemberReference(member=jjtc001, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=popNode, postfix_operators=[], prefix_operators=[], qualifier=jjtree, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=jjtn001, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=clearNodeScope, postfix_operators=[], prefix_operators=[], qualifier=jjtree, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=jjtc001, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=jjte001, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=RuntimeException, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[IfStatement(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), else_statement=None, label=None, then_statement=ThrowStatement(expression=Cast(expression=MemberReference(member=jjte001, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=RuntimeException, sub_type=None)), label=None))])])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=jjte001, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=ParseException, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[IfStatement(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), else_statement=None, label=None, then_statement=ThrowStatement(expression=Cast(expression=MemberReference(member=jjte001, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ParseException, sub_type=None)), label=None))])])), BlockStatement(label=None, statements=[IfStatement(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), else_statement=None, label=None, then_statement=ThrowStatement(expression=Cast(expression=MemberReference(member=jjte001, 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=jjte001, types=['Throwable']))], finally_block=[IfStatement(condition=MemberReference(member=jjtc001, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=jjtn001, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=closeNodeScope, postfix_operators=[], prefix_operators=[], qualifier=jjtree, selectors=[], type_arguments=None), label=None)]))], label=None, resources=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['NE0', 'NE1'], statements=[SwitchStatement(cases=[SwitchStatementCase(case=['NE0'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=NE0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=jj_consume_token, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['NE1'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=NE1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=jj_consume_token, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=jj_la1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16))]), type==, value=MemberReference(member=jj_gen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)], member=jj_consume_token, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ParseException, sub_type=None)), label=None)])], expression=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=jj_ntk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator===), if_false=MemberReference(member=jj_ntk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[], member=jj_ntk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=JJTNOTEQUAL, 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=AstNotEqual, sub_type=None)), name=jjtn002)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AstNotEqual, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), name=jjtc002)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=jjtn002, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=openNodeScope, postfix_operators=[], prefix_operators=[], qualifier=jjtree, selectors=[], type_arguments=None), label=None), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=Compare, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[IfStatement(condition=MemberReference(member=jjtc002, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=popNode, postfix_operators=[], prefix_operators=[], qualifier=jjtree, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=jjtn002, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=clearNodeScope, postfix_operators=[], prefix_operators=[], qualifier=jjtree, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=jjtc002, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=jjte002, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=RuntimeException, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[IfStatement(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), else_statement=None, label=None, then_statement=ThrowStatement(expression=Cast(expression=MemberReference(member=jjte002, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=RuntimeException, sub_type=None)), label=None))])])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=jjte002, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=ParseException, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[IfStatement(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), else_statement=None, label=None, then_statement=ThrowStatement(expression=Cast(expression=MemberReference(member=jjte002, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ParseException, sub_type=None)), label=None))])])), BlockStatement(label=None, statements=[IfStatement(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), else_statement=None, label=None, then_statement=ThrowStatement(expression=Cast(expression=MemberReference(member=jjte002, 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=jjte002, types=['Throwable']))], finally_block=[IfStatement(condition=MemberReference(member=jjtc002, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=jjtn002, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=closeNodeScope, postfix_operators=[], prefix_operators=[], qualifier=jjtree, selectors=[], type_arguments=None), label=None)]))], label=None, resources=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=jj_la1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=17))]), type==, value=MemberReference(member=jj_gen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)], member=jj_consume_token, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ParseException, sub_type=None)), label=None)])], expression=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=jj_ntk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator===), if_false=MemberReference(member=jj_ntk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[], member=jj_ntk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None) end[}] end[}] END[}]
Keyword[final] Keyword[public] Keyword[void] identifier[Equality] operator[SEP] operator[SEP] Keyword[throws] identifier[ParseException] { identifier[Compare] operator[SEP] operator[SEP] operator[SEP] identifier[label_9] operator[:] Keyword[while] operator[SEP] literal[boolean] operator[SEP] { Keyword[switch] operator[SEP] operator[SEP] identifier[jj_ntk] operator[==] operator[-] Other[1] operator[SEP] operator[?] identifier[jj_ntk] operator[SEP] operator[SEP] operator[:] identifier[jj_ntk] operator[SEP] { Keyword[case] identifier[EQ0] operator[:] Keyword[case] identifier[EQ1] operator[:] Keyword[case] identifier[NE0] operator[:] Keyword[case] identifier[NE1] operator[:] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] identifier[jj_la1] operator[SEP] Other[14] operator[SEP] operator[=] identifier[jj_gen] operator[SEP] Keyword[break] identifier[label_9] operator[SEP] } Keyword[switch] operator[SEP] operator[SEP] identifier[jj_ntk] operator[==] operator[-] Other[1] operator[SEP] operator[?] identifier[jj_ntk] operator[SEP] operator[SEP] operator[:] identifier[jj_ntk] operator[SEP] { Keyword[case] identifier[EQ0] operator[:] Keyword[case] identifier[EQ1] operator[:] Keyword[switch] operator[SEP] operator[SEP] identifier[jj_ntk] operator[==] operator[-] Other[1] operator[SEP] operator[?] identifier[jj_ntk] operator[SEP] operator[SEP] operator[:] identifier[jj_ntk] operator[SEP] { Keyword[case] identifier[EQ0] operator[:] identifier[jj_consume_token] operator[SEP] identifier[EQ0] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[EQ1] operator[:] identifier[jj_consume_token] operator[SEP] identifier[EQ1] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] identifier[jj_la1] operator[SEP] Other[15] operator[SEP] operator[=] identifier[jj_gen] operator[SEP] identifier[jj_consume_token] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[ParseException] operator[SEP] operator[SEP] operator[SEP] } identifier[AstEqual] identifier[jjtn001] operator[=] Keyword[new] identifier[AstEqual] operator[SEP] identifier[JJTEQUAL] operator[SEP] operator[SEP] Keyword[boolean] identifier[jjtc001] operator[=] literal[boolean] operator[SEP] identifier[jjtree] operator[SEP] identifier[openNodeScope] operator[SEP] identifier[jjtn001] operator[SEP] operator[SEP] Keyword[try] { identifier[Compare] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[jjte001] operator[SEP] { Keyword[if] operator[SEP] identifier[jjtc001] operator[SEP] { identifier[jjtree] operator[SEP] identifier[clearNodeScope] operator[SEP] identifier[jjtn001] operator[SEP] operator[SEP] identifier[jjtc001] operator[=] literal[boolean] operator[SEP] } Keyword[else] { identifier[jjtree] operator[SEP] identifier[popNode] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[jjte001] Keyword[instanceof] identifier[RuntimeException] operator[SEP] { { Keyword[if] operator[SEP] literal[boolean] operator[SEP] Keyword[throw] operator[SEP] identifier[RuntimeException] operator[SEP] identifier[jjte001] operator[SEP] } } Keyword[if] operator[SEP] identifier[jjte001] Keyword[instanceof] identifier[ParseException] operator[SEP] { { Keyword[if] operator[SEP] literal[boolean] operator[SEP] Keyword[throw] operator[SEP] identifier[ParseException] operator[SEP] identifier[jjte001] operator[SEP] } } { Keyword[if] operator[SEP] literal[boolean] operator[SEP] Keyword[throw] operator[SEP] identifier[Error] operator[SEP] identifier[jjte001] operator[SEP] } } Keyword[finally] { Keyword[if] operator[SEP] identifier[jjtc001] operator[SEP] { identifier[jjtree] operator[SEP] identifier[closeNodeScope] operator[SEP] identifier[jjtn001] , Other[2] operator[SEP] operator[SEP] } } Keyword[break] operator[SEP] Keyword[case] identifier[NE0] operator[:] Keyword[case] identifier[NE1] operator[:] Keyword[switch] operator[SEP] operator[SEP] identifier[jj_ntk] operator[==] operator[-] Other[1] operator[SEP] operator[?] identifier[jj_ntk] operator[SEP] operator[SEP] operator[:] identifier[jj_ntk] operator[SEP] { Keyword[case] identifier[NE0] operator[:] identifier[jj_consume_token] operator[SEP] identifier[NE0] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[NE1] operator[:] identifier[jj_consume_token] operator[SEP] identifier[NE1] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] identifier[jj_la1] operator[SEP] Other[16] operator[SEP] operator[=] identifier[jj_gen] operator[SEP] identifier[jj_consume_token] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[ParseException] operator[SEP] operator[SEP] operator[SEP] } identifier[AstNotEqual] identifier[jjtn002] operator[=] Keyword[new] identifier[AstNotEqual] operator[SEP] identifier[JJTNOTEQUAL] operator[SEP] operator[SEP] Keyword[boolean] identifier[jjtc002] operator[=] literal[boolean] operator[SEP] identifier[jjtree] operator[SEP] identifier[openNodeScope] operator[SEP] identifier[jjtn002] operator[SEP] operator[SEP] Keyword[try] { identifier[Compare] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[jjte002] operator[SEP] { Keyword[if] operator[SEP] identifier[jjtc002] operator[SEP] { identifier[jjtree] operator[SEP] identifier[clearNodeScope] operator[SEP] identifier[jjtn002] operator[SEP] operator[SEP] identifier[jjtc002] operator[=] literal[boolean] operator[SEP] } Keyword[else] { identifier[jjtree] operator[SEP] identifier[popNode] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[jjte002] Keyword[instanceof] identifier[RuntimeException] operator[SEP] { { Keyword[if] operator[SEP] literal[boolean] operator[SEP] Keyword[throw] operator[SEP] identifier[RuntimeException] operator[SEP] identifier[jjte002] operator[SEP] } } Keyword[if] operator[SEP] identifier[jjte002] Keyword[instanceof] identifier[ParseException] operator[SEP] { { Keyword[if] operator[SEP] literal[boolean] operator[SEP] Keyword[throw] operator[SEP] identifier[ParseException] operator[SEP] identifier[jjte002] operator[SEP] } } { Keyword[if] operator[SEP] literal[boolean] operator[SEP] Keyword[throw] operator[SEP] identifier[Error] operator[SEP] identifier[jjte002] operator[SEP] } } Keyword[finally] { Keyword[if] operator[SEP] identifier[jjtc002] operator[SEP] { identifier[jjtree] operator[SEP] identifier[closeNodeScope] operator[SEP] identifier[jjtn002] , Other[2] operator[SEP] operator[SEP] } } Keyword[break] operator[SEP] Keyword[default] operator[:] identifier[jj_la1] operator[SEP] Other[17] operator[SEP] operator[=] identifier[jj_gen] operator[SEP] identifier[jj_consume_token] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[ParseException] operator[SEP] operator[SEP] operator[SEP] } } }
public void bindValue(InternalQName varName, Value value) throws IllegalArgumentException, RepositoryException { if (!variableNames.contains(varName)) { throw new IllegalArgumentException("not a valid variable in this query"); } else { bindValues.put(varName, value); } }
class class_name[name] begin[{] method[bindValue, return_type[void], modifier[public], parameter[varName, value]] begin[{] if[call[variableNames.contains, parameter[member[.varName]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="not a valid variable in this query")], 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[{] call[bindValues.put, parameter[member[.varName], member[.value]]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[bindValue] operator[SEP] identifier[InternalQName] identifier[varName] , identifier[Value] identifier[value] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] , identifier[RepositoryException] { Keyword[if] operator[SEP] operator[!] identifier[variableNames] operator[SEP] identifier[contains] operator[SEP] identifier[varName] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[bindValues] operator[SEP] identifier[put] operator[SEP] identifier[varName] , identifier[value] operator[SEP] operator[SEP] } }
public HashIntMap<User> loadUsersFromId (int[] userIds) throws PersistenceException { HashIntMap<User> data = new HashIntMap<User>(); if (userIds.length > 0) { String query = "where userId in (" + genIdString(userIds) + ")"; for (User user : loadAll(_utable, query)) { user.setDirtyMask(_utable.getFieldMask()); data.put(user.userId, user); } } return data; }
class class_name[name] begin[{] method[loadUsersFromId, return_type[type[HashIntMap]], modifier[public], parameter[userIds]] begin[{] local_variable[type[HashIntMap], data] if[binary_operation[member[userIds.length], >, literal[0]]] begin[{] local_variable[type[String], query] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getFieldMask, postfix_operators=[], prefix_operators=[], qualifier=_utable, selectors=[], type_arguments=None)], member=setDirtyMask, postfix_operators=[], prefix_operators=[], qualifier=user, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=userId, postfix_operators=[], prefix_operators=[], qualifier=user, selectors=[]), MemberReference(member=user, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=_utable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=query, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=loadAll, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=user)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=User, sub_type=None))), label=None) else begin[{] None end[}] return[member[.data]] end[}] END[}]
Keyword[public] identifier[HashIntMap] operator[<] identifier[User] operator[>] identifier[loadUsersFromId] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[userIds] operator[SEP] Keyword[throws] identifier[PersistenceException] { identifier[HashIntMap] operator[<] identifier[User] operator[>] identifier[data] operator[=] Keyword[new] identifier[HashIntMap] operator[<] identifier[User] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[userIds] operator[SEP] identifier[length] operator[>] Other[0] operator[SEP] { identifier[String] identifier[query] operator[=] literal[String] operator[+] identifier[genIdString] operator[SEP] identifier[userIds] operator[SEP] operator[+] literal[String] operator[SEP] Keyword[for] operator[SEP] identifier[User] identifier[user] operator[:] identifier[loadAll] operator[SEP] identifier[_utable] , identifier[query] operator[SEP] operator[SEP] { identifier[user] operator[SEP] identifier[setDirtyMask] operator[SEP] identifier[_utable] operator[SEP] identifier[getFieldMask] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[data] operator[SEP] identifier[put] operator[SEP] identifier[user] operator[SEP] identifier[userId] , identifier[user] operator[SEP] operator[SEP] } } Keyword[return] identifier[data] operator[SEP] }
public void checkInvariants(CallStack frame, Tuple<Expr> invariants) { for (int i = 0; i != invariants.size(); ++i) { RValue.Bool b = executeExpression(BOOL_T, invariants.get(i), frame); if (b == RValue.False) { // FIXME: need to do more here throw new AssertionError(); } } }
class class_name[name] begin[{] method[checkInvariants, return_type[void], modifier[public], parameter[frame, invariants]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=BOOL_T, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=invariants, selectors=[], type_arguments=None), MemberReference(member=frame, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=executeExpression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=b)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=RValue, sub_type=ReferenceType(arguments=None, dimensions=None, name=Bool, sub_type=None))), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=False, postfix_operators=[], prefix_operators=[], qualifier=RValue, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AssertionError, sub_type=None)), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=invariants, selectors=[], type_arguments=None), operator=!=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[checkInvariants] operator[SEP] identifier[CallStack] identifier[frame] , identifier[Tuple] operator[<] identifier[Expr] operator[>] identifier[invariants] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[!=] identifier[invariants] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[++] identifier[i] operator[SEP] { identifier[RValue] operator[SEP] identifier[Bool] identifier[b] operator[=] identifier[executeExpression] operator[SEP] identifier[BOOL_T] , identifier[invariants] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] , identifier[frame] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[b] operator[==] identifier[RValue] operator[SEP] identifier[False] operator[SEP] { Keyword[throw] Keyword[new] identifier[AssertionError] operator[SEP] operator[SEP] operator[SEP] } } }
public void away (ClientObject caller, String message) { BodyObject body = _locator.forClient(caller); // we modify this field via an invocation service request because a body object is not // modifiable by the client body.setAwayMessage(message); }
class class_name[name] begin[{] method[away, return_type[void], modifier[public], parameter[caller, message]] begin[{] local_variable[type[BodyObject], body] call[body.setAwayMessage, parameter[member[.message]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[away] operator[SEP] identifier[ClientObject] identifier[caller] , identifier[String] identifier[message] operator[SEP] { identifier[BodyObject] identifier[body] operator[=] identifier[_locator] operator[SEP] identifier[forClient] operator[SEP] identifier[caller] operator[SEP] operator[SEP] identifier[body] operator[SEP] identifier[setAwayMessage] operator[SEP] identifier[message] operator[SEP] operator[SEP] }
protected void addPartialInfo(ClassDoc cd, Content contentTree) { addPreQualifiedStrongClassLink(LinkInfoImpl.Kind.TREE, cd, contentTree); }
class class_name[name] begin[{] method[addPartialInfo, return_type[void], modifier[protected], parameter[cd, contentTree]] begin[{] call[.addPreQualifiedStrongClassLink, parameter[member[LinkInfoImpl.Kind.TREE], member[.cd], member[.contentTree]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[addPartialInfo] operator[SEP] identifier[ClassDoc] identifier[cd] , identifier[Content] identifier[contentTree] operator[SEP] { identifier[addPreQualifiedStrongClassLink] operator[SEP] identifier[LinkInfoImpl] operator[SEP] identifier[Kind] operator[SEP] identifier[TREE] , identifier[cd] , identifier[contentTree] operator[SEP] operator[SEP] }
private void setAsyncListener(MessageListener listener) throws JMSException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setAsyncListener", listener); consumer = new Consumer(listener, session, sessionAckMode); try { // ConsumerSession must be stopped to register the callback coreConsumerSession.stop(); int batchSize = 1; boolean deliverImmediately = false; if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Registering async callback for consumer" + consumer); // the register call will replace any existing callback, so no need for // separate deregister call. coreConsumerSession.registerAsynchConsumerCallback(consumer, 0, // maxActiveMessages - no limit 0, // messageLockExpiry - no expiry batchSize, session.getOrderingContext() ); // Deal with the case where the listener is set after the connection // is started. Note that this will handle the restarting of the core // consumer session if we paused it earlier in this block. if (session.getState() == STARTED) coreConsumerSession.start(deliverImmediately); } catch (SIIncorrectCallException sie) { // No FFDC code needed // d222942 review. Default message ok. // d238447 FFDC Review. FFDC here, see comment in next catch for more detail. throw (JMSException) JmsErrorUtils.newThrowable(JMSException.class, "EXCEPTION_RECEIVED_CWSIA0085", new Object[] { sie, "JmsMsgConsumerImpl.setAsyncListener" }, sie, "JmsMsgConsumerImpl.setAsyncListener#1", this, tc); } catch (SIException sie) { // No FFDC code needed // The exceptions thrown by stop, registerAsynchConsumerCallback and start are mostly // the "connection lost" family. registerAsynchConsumerCallback can also throw an // SIIncorrectCallException if the coreConsumerSession hasn't been stopped, but that // shouldn't be possible in the code above. Default message ok. // d238447 FFDC Review. SIIncorrectCall separated into its own catch block above, // no FFDCs for this group. throw (JMSException) JmsErrorUtils.newThrowable(JMSException.class, "EXCEPTION_RECEIVED_CWSIA0085", new Object[] { sie, "JmsMsgConsumerImpl.setAsyncListener" }, sie, null, // null probeId = no FFDC this, tc); } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "setAsyncListener"); }
class class_name[name] begin[{] method[setAsyncListener, return_type[void], modifier[private], parameter[listener]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[THIS[], member[.tc], literal["setAsyncListener"], member[.listener]]] else begin[{] None end[}] assign[member[.consumer], ClassCreator(arguments=[MemberReference(member=listener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sessionAckMode, 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=Consumer, sub_type=None))] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=stop, postfix_operators=[], prefix_operators=[], qualifier=coreConsumerSession, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=batchSize)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=deliverImmediately)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Registering async callback for consumer"), operandr=MemberReference(member=consumer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=consumer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=batchSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getOrderingContext, postfix_operators=[], prefix_operators=[], qualifier=session, selectors=[], type_arguments=None)], member=registerAsynchConsumerCallback, postfix_operators=[], prefix_operators=[], qualifier=coreConsumerSession, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getState, postfix_operators=[], prefix_operators=[], qualifier=session, selectors=[], type_arguments=None), operandr=MemberReference(member=STARTED, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=deliverImmediately, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=start, postfix_operators=[], prefix_operators=[], qualifier=coreConsumerSession, selectors=[], type_arguments=None), label=None))], catches=[CatchClause(block=[ThrowStatement(expression=Cast(expression=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JMSException, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="EXCEPTION_RECEIVED_CWSIA0085"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=sie, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="JmsMsgConsumerImpl.setAsyncListener")]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None)), MemberReference(member=sie, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="JmsMsgConsumerImpl.setAsyncListener#1"), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=newThrowable, postfix_operators=[], prefix_operators=[], qualifier=JmsErrorUtils, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=JMSException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=sie, types=['SIIncorrectCallException'])), CatchClause(block=[ThrowStatement(expression=Cast(expression=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JMSException, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="EXCEPTION_RECEIVED_CWSIA0085"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=sie, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="JmsMsgConsumerImpl.setAsyncListener")]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None)), MemberReference(member=sie, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=newThrowable, postfix_operators=[], prefix_operators=[], qualifier=JmsErrorUtils, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=JMSException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=sie, types=['SIException']))], finally_block=None, label=None, resources=None) if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[THIS[], member[.tc], literal["setAsyncListener"]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[setAsyncListener] operator[SEP] identifier[MessageListener] identifier[listener] operator[SEP] Keyword[throws] identifier[JMSException] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] Keyword[this] , identifier[tc] , literal[String] , identifier[listener] operator[SEP] operator[SEP] identifier[consumer] operator[=] Keyword[new] identifier[Consumer] operator[SEP] identifier[listener] , identifier[session] , identifier[sessionAckMode] operator[SEP] operator[SEP] Keyword[try] { identifier[coreConsumerSession] operator[SEP] identifier[stop] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[batchSize] operator[=] Other[1] operator[SEP] Keyword[boolean] identifier[deliverImmediately] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[+] identifier[consumer] operator[SEP] operator[SEP] identifier[coreConsumerSession] operator[SEP] identifier[registerAsynchConsumerCallback] operator[SEP] identifier[consumer] , Other[0] , Other[0] , identifier[batchSize] , identifier[session] operator[SEP] identifier[getOrderingContext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[session] operator[SEP] identifier[getState] operator[SEP] operator[SEP] operator[==] identifier[STARTED] operator[SEP] identifier[coreConsumerSession] operator[SEP] identifier[start] operator[SEP] identifier[deliverImmediately] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SIIncorrectCallException] identifier[sie] operator[SEP] { Keyword[throw] operator[SEP] identifier[JMSException] operator[SEP] identifier[JmsErrorUtils] operator[SEP] identifier[newThrowable] operator[SEP] identifier[JMSException] operator[SEP] Keyword[class] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[sie] , literal[String] } , identifier[sie] , literal[String] , Keyword[this] , identifier[tc] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SIException] identifier[sie] operator[SEP] { Keyword[throw] operator[SEP] identifier[JMSException] operator[SEP] identifier[JmsErrorUtils] operator[SEP] identifier[newThrowable] operator[SEP] identifier[JMSException] operator[SEP] Keyword[class] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[sie] , literal[String] } , identifier[sie] , Other[null] , Keyword[this] , identifier[tc] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] }