code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public static servicegroup_stats get(nitro_service service, String servicegroupname) throws Exception{ servicegroup_stats obj = new servicegroup_stats(); obj.set_servicegroupname(servicegroupname); servicegroup_stats response = (servicegroup_stats) obj.stat_resource(service); return response; }
class class_name[name] begin[{] method[get, return_type[type[servicegroup_stats]], modifier[public static], parameter[service, servicegroupname]] begin[{] local_variable[type[servicegroup_stats], obj] call[obj.set_servicegroupname, parameter[member[.servicegroupname]]] local_variable[type[servicegroup_stats], response] return[member[.response]] end[}] END[}]
Keyword[public] Keyword[static] identifier[servicegroup_stats] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[servicegroupname] operator[SEP] Keyword[throws] identifier[Exception] { identifier[servicegroup_stats] identifier[obj] operator[=] Keyword[new] identifier[servicegroup_stats] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[set_servicegroupname] operator[SEP] identifier[servicegroupname] operator[SEP] operator[SEP] identifier[servicegroup_stats] identifier[response] operator[=] operator[SEP] identifier[servicegroup_stats] operator[SEP] identifier[obj] operator[SEP] identifier[stat_resource] operator[SEP] identifier[service] operator[SEP] operator[SEP] Keyword[return] identifier[response] operator[SEP] }
private ReliabilitySubset createPersistentSubset(Reliability reliability, TransactionCommon tran) throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "createPersistentSubset", new Object[] { reliability }); ReliabilitySubset subset = new ReliabilitySubset(reliability, initialData); subsets[getIndex(reliability)] = subset; if(reliability.compareTo(Reliability.BEST_EFFORT_NONPERSISTENT) > 0) { try { Transaction msTran = txManager.resolveAndEnlistMsgStoreTransaction(tran); itemStream.addItem(subset, msTran); subsetIDs[getIndex(reliability)] = subset.getID(); } catch (MessageStoreException e) { // FFDC FFDCFilter.processException( e, "com.ibm.ws.sib.processor.gd.StreamSet.createPersistentSubset", "1:398:1.67", this); //not sure if this default is needed but better safe than sorry subsetIDs[getIndex(reliability)] = NO_ID; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.exception(tc, e); SibTr.exit(tc, "createPersistentSubset", e); } } } else { subsetIDs[getIndex(reliability)] = NO_ID; } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "createPersistentSubset", subset); return subset; }
class class_name[name] begin[{] method[createPersistentSubset, return_type[type[ReliabilitySubset]], modifier[private], parameter[reliability, tran]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[THIS[], member[.tc], literal["createPersistentSubset"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=reliability, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]] else begin[{] None end[}] local_variable[type[ReliabilitySubset], subset] assign[member[.subsets], member[.subset]] if[binary_operation[call[reliability.compareTo, parameter[member[Reliability.BEST_EFFORT_NONPERSISTENT]]], >, literal[0]]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=tran, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=resolveAndEnlistMsgStoreTransaction, postfix_operators=[], prefix_operators=[], qualifier=txManager, selectors=[], type_arguments=None), name=msTran)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Transaction, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=subset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=msTran, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addItem, postfix_operators=[], prefix_operators=[], qualifier=itemStream, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=subsetIDs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MethodInvocation(arguments=[MemberReference(member=reliability, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None))]), type==, value=MethodInvocation(arguments=[], member=getID, postfix_operators=[], prefix_operators=[], qualifier=subset, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ws.sib.processor.gd.StreamSet.createPersistentSubset"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1:398:1.67"), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=subsetIDs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MethodInvocation(arguments=[MemberReference(member=reliability, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None))]), type==, value=MemberReference(member=NO_ID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), 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=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=exception, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="createPersistentSubset"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=exit, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['MessageStoreException']))], finally_block=None, label=None, resources=None) else begin[{] assign[member[.subsetIDs], member[.NO_ID]] end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["createPersistentSubset"], member[.subset]]] else begin[{] None end[}] return[member[.subset]] end[}] END[}]
Keyword[private] identifier[ReliabilitySubset] identifier[createPersistentSubset] operator[SEP] identifier[Reliability] identifier[reliability] , identifier[TransactionCommon] identifier[tran] 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] Keyword[this] , identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[reliability] } operator[SEP] operator[SEP] identifier[ReliabilitySubset] identifier[subset] operator[=] Keyword[new] identifier[ReliabilitySubset] operator[SEP] identifier[reliability] , identifier[initialData] operator[SEP] operator[SEP] identifier[subsets] operator[SEP] identifier[getIndex] operator[SEP] identifier[reliability] operator[SEP] operator[SEP] operator[=] identifier[subset] operator[SEP] Keyword[if] operator[SEP] identifier[reliability] operator[SEP] identifier[compareTo] operator[SEP] identifier[Reliability] operator[SEP] identifier[BEST_EFFORT_NONPERSISTENT] operator[SEP] operator[>] Other[0] operator[SEP] { Keyword[try] { identifier[Transaction] identifier[msTran] operator[=] identifier[txManager] operator[SEP] identifier[resolveAndEnlistMsgStoreTransaction] operator[SEP] identifier[tran] operator[SEP] operator[SEP] identifier[itemStream] operator[SEP] identifier[addItem] operator[SEP] identifier[subset] , identifier[msTran] operator[SEP] operator[SEP] identifier[subsetIDs] operator[SEP] identifier[getIndex] operator[SEP] identifier[reliability] operator[SEP] operator[SEP] operator[=] identifier[subset] operator[SEP] identifier[getID] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[MessageStoreException] identifier[e] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[e] , literal[String] , literal[String] , Keyword[this] operator[SEP] operator[SEP] identifier[subsetIDs] operator[SEP] identifier[getIndex] operator[SEP] identifier[reliability] operator[SEP] operator[SEP] operator[=] identifier[NO_ID] 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[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , identifier[e] operator[SEP] operator[SEP] } } } Keyword[else] { identifier[subsetIDs] operator[SEP] identifier[getIndex] operator[SEP] identifier[reliability] operator[SEP] operator[SEP] operator[=] identifier[NO_ID] 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[subset] operator[SEP] operator[SEP] Keyword[return] identifier[subset] operator[SEP] }
public List<Integer> getPageIds(String title) throws WikiApiException { Session session = this.__getHibernateSession(); session.beginTransaction(); Iterator results = session.createQuery( "select p.pageID from PageMapLine as p where p.name = :pName").setParameter("pName", title, StringType.INSTANCE).list().iterator(); session.getTransaction().commit(); if(!results.hasNext()){ throw new WikiPageNotFoundException(); } List<Integer> resultList = new LinkedList<Integer>(); while(results.hasNext()){ resultList.add((Integer)results.next()); } return resultList; }
class class_name[name] begin[{] method[getPageIds, return_type[type[List]], modifier[public], parameter[title]] begin[{] local_variable[type[Session], session] call[session.beginTransaction, parameter[]] local_variable[type[Iterator], results] call[session.getTransaction, parameter[]] if[call[results.hasNext, 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=WikiPageNotFoundException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[List], resultList] while[call[results.hasNext, parameter[]]] begin[{] call[resultList.add, parameter[Cast(expression=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=results, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))]] end[}] return[member[.resultList]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[Integer] operator[>] identifier[getPageIds] operator[SEP] identifier[String] identifier[title] operator[SEP] Keyword[throws] identifier[WikiApiException] { identifier[Session] identifier[session] operator[=] Keyword[this] operator[SEP] identifier[__getHibernateSession] operator[SEP] operator[SEP] operator[SEP] identifier[session] operator[SEP] identifier[beginTransaction] operator[SEP] operator[SEP] operator[SEP] identifier[Iterator] identifier[results] operator[=] identifier[session] operator[SEP] identifier[createQuery] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[setParameter] operator[SEP] literal[String] , identifier[title] , identifier[StringType] operator[SEP] identifier[INSTANCE] operator[SEP] operator[SEP] identifier[list] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[session] operator[SEP] identifier[getTransaction] operator[SEP] operator[SEP] operator[SEP] identifier[commit] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[results] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[WikiPageNotFoundException] operator[SEP] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[Integer] operator[>] identifier[resultList] operator[=] Keyword[new] identifier[LinkedList] operator[<] identifier[Integer] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[results] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[resultList] operator[SEP] identifier[add] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[results] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[resultList] operator[SEP] }
public static Ticker adaptTicker(BankeraTickerResponse ticker, CurrencyPair currencyPair) { BigDecimal high = new BigDecimal(ticker.getTicker().getHigh()); BigDecimal low = new BigDecimal(ticker.getTicker().getLow()); BigDecimal bid = new BigDecimal(ticker.getTicker().getBid()); BigDecimal ask = new BigDecimal(ticker.getTicker().getAsk()); BigDecimal last = new BigDecimal(ticker.getTicker().getLast()); BigDecimal volume = new BigDecimal(ticker.getTicker().getVolume()); Date timestamp = new Date(ticker.getTicker().getTimestamp()); return new Ticker.Builder() .currencyPair(currencyPair) .high(high) .low(low) .bid(bid) .ask(ask) .last(last) .volume(volume) .timestamp(timestamp) .build(); }
class class_name[name] begin[{] method[adaptTicker, return_type[type[Ticker]], modifier[public static], parameter[ticker, currencyPair]] begin[{] local_variable[type[BigDecimal], high] local_variable[type[BigDecimal], low] local_variable[type[BigDecimal], bid] local_variable[type[BigDecimal], ask] local_variable[type[BigDecimal], last] local_variable[type[BigDecimal], volume] local_variable[type[Date], timestamp] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=currencyPair, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=currencyPair, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=high, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=high, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=low, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=low, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=bid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=bid, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=ask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=ask, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=last, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=last, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=volume, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=volume, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=timestamp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=timestamp, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Ticker, sub_type=ReferenceType(arguments=None, dimensions=None, name=Builder, sub_type=None)))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Ticker] identifier[adaptTicker] operator[SEP] identifier[BankeraTickerResponse] identifier[ticker] , identifier[CurrencyPair] identifier[currencyPair] operator[SEP] { identifier[BigDecimal] identifier[high] operator[=] Keyword[new] identifier[BigDecimal] operator[SEP] identifier[ticker] operator[SEP] identifier[getTicker] operator[SEP] operator[SEP] operator[SEP] identifier[getHigh] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[BigDecimal] identifier[low] operator[=] Keyword[new] identifier[BigDecimal] operator[SEP] identifier[ticker] operator[SEP] identifier[getTicker] operator[SEP] operator[SEP] operator[SEP] identifier[getLow] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[BigDecimal] identifier[bid] operator[=] Keyword[new] identifier[BigDecimal] operator[SEP] identifier[ticker] operator[SEP] identifier[getTicker] operator[SEP] operator[SEP] operator[SEP] identifier[getBid] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[BigDecimal] identifier[ask] operator[=] Keyword[new] identifier[BigDecimal] operator[SEP] identifier[ticker] operator[SEP] identifier[getTicker] operator[SEP] operator[SEP] operator[SEP] identifier[getAsk] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[BigDecimal] identifier[last] operator[=] Keyword[new] identifier[BigDecimal] operator[SEP] identifier[ticker] operator[SEP] identifier[getTicker] operator[SEP] operator[SEP] operator[SEP] identifier[getLast] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[BigDecimal] identifier[volume] operator[=] Keyword[new] identifier[BigDecimal] operator[SEP] identifier[ticker] operator[SEP] identifier[getTicker] operator[SEP] operator[SEP] operator[SEP] identifier[getVolume] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Date] identifier[timestamp] operator[=] Keyword[new] identifier[Date] operator[SEP] identifier[ticker] operator[SEP] identifier[getTicker] operator[SEP] operator[SEP] operator[SEP] identifier[getTimestamp] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[Ticker] operator[SEP] identifier[Builder] operator[SEP] operator[SEP] operator[SEP] identifier[currencyPair] operator[SEP] identifier[currencyPair] operator[SEP] operator[SEP] identifier[high] operator[SEP] identifier[high] operator[SEP] operator[SEP] identifier[low] operator[SEP] identifier[low] operator[SEP] operator[SEP] identifier[bid] operator[SEP] identifier[bid] operator[SEP] operator[SEP] identifier[ask] operator[SEP] identifier[ask] operator[SEP] operator[SEP] identifier[last] operator[SEP] identifier[last] operator[SEP] operator[SEP] identifier[volume] operator[SEP] identifier[volume] operator[SEP] operator[SEP] identifier[timestamp] operator[SEP] identifier[timestamp] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] }
private ExecutorService createThreadPoolWithBoundedQueue(int threadCount) { BlockingQueue<Runnable> blockingQueue = new ArrayBlockingQueue<Runnable>(threadCount); RejectedExecutionHandler rejectedExecutionHandler = new ThreadPoolExecutor.CallerRunsPolicy(); return new ProcessingLibraryThreadPoolExecutor(threadCount, threadCount, 0, TimeUnit.MILLISECONDS, blockingQueue, rejectedExecutionHandler, exceptionHandler); }
class class_name[name] begin[{] method[createThreadPoolWithBoundedQueue, return_type[type[ExecutorService]], modifier[private], parameter[threadCount]] begin[{] local_variable[type[BlockingQueue], blockingQueue] local_variable[type[RejectedExecutionHandler], rejectedExecutionHandler] return[ClassCreator(arguments=[MemberReference(member=threadCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=threadCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=MILLISECONDS, postfix_operators=[], prefix_operators=[], qualifier=TimeUnit, selectors=[]), MemberReference(member=blockingQueue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rejectedExecutionHandler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=exceptionHandler, 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=ProcessingLibraryThreadPoolExecutor, sub_type=None))] end[}] END[}]
Keyword[private] identifier[ExecutorService] identifier[createThreadPoolWithBoundedQueue] operator[SEP] Keyword[int] identifier[threadCount] operator[SEP] { identifier[BlockingQueue] operator[<] identifier[Runnable] operator[>] identifier[blockingQueue] operator[=] Keyword[new] identifier[ArrayBlockingQueue] operator[<] identifier[Runnable] operator[>] operator[SEP] identifier[threadCount] operator[SEP] operator[SEP] identifier[RejectedExecutionHandler] identifier[rejectedExecutionHandler] operator[=] Keyword[new] identifier[ThreadPoolExecutor] operator[SEP] identifier[CallerRunsPolicy] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ProcessingLibraryThreadPoolExecutor] operator[SEP] identifier[threadCount] , identifier[threadCount] , Other[0] , identifier[TimeUnit] operator[SEP] identifier[MILLISECONDS] , identifier[blockingQueue] , identifier[rejectedExecutionHandler] , identifier[exceptionHandler] operator[SEP] operator[SEP] }
public static BinderContext bind(BinderType format) { BinderContext binder = binders.get(format); if (binder == null) throw new KriptonRuntimeException(String.format("%s format is not supported", format)); return binder; }
class class_name[name] begin[{] method[bind, return_type[type[BinderContext]], modifier[public static], parameter[format]] begin[{] local_variable[type[BinderContext], binder] if[binary_operation[member[.binder], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="%s format is not supported"), MemberReference(member=format, 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=KriptonRuntimeException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.binder]] end[}] END[}]
Keyword[public] Keyword[static] identifier[BinderContext] identifier[bind] operator[SEP] identifier[BinderType] identifier[format] operator[SEP] { identifier[BinderContext] identifier[binder] operator[=] identifier[binders] operator[SEP] identifier[get] operator[SEP] identifier[format] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[binder] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[KriptonRuntimeException] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[format] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[binder] operator[SEP] }
public void hideEditableListButtons() { removeEditButtonsPositionTimer(); for (org.opencms.ade.containerpage.client.ui.CmsContainerPageContainer container : m_targetContainers.values()) { container.hideEditableListButtons(); } }
class class_name[name] begin[{] method[hideEditableListButtons, return_type[void], modifier[public], parameter[]] begin[{] call[.removeEditButtonsPositionTimer, parameter[]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=hideEditableListButtons, postfix_operators=[], prefix_operators=[], qualifier=container, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=m_targetContainers, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=container)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=org, sub_type=ReferenceType(arguments=None, dimensions=None, name=opencms, sub_type=ReferenceType(arguments=None, dimensions=None, name=ade, sub_type=ReferenceType(arguments=None, dimensions=None, name=containerpage, sub_type=ReferenceType(arguments=None, dimensions=None, name=client, sub_type=ReferenceType(arguments=None, dimensions=None, name=ui, sub_type=ReferenceType(arguments=None, dimensions=None, name=CmsContainerPageContainer, sub_type=None))))))))), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[hideEditableListButtons] operator[SEP] operator[SEP] { identifier[removeEditButtonsPositionTimer] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[org] operator[SEP] identifier[opencms] operator[SEP] identifier[ade] operator[SEP] identifier[containerpage] operator[SEP] identifier[client] operator[SEP] identifier[ui] operator[SEP] identifier[CmsContainerPageContainer] identifier[container] operator[:] identifier[m_targetContainers] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { identifier[container] operator[SEP] identifier[hideEditableListButtons] operator[SEP] operator[SEP] operator[SEP] } }
public static String[] extractList(String input, char delimiter) { int end = input.indexOf(delimiter); if (-1 == end) { return new String[] { input.trim() }; } List<String> output = new LinkedList<String>(); int start = 0; do { output.add(input.substring(start, end).trim()); start = end + 1; end = input.indexOf(delimiter, start); } while (-1 != end); // copy the last value if it exists if (start < input.length()) { output.add(input.substring(start).trim()); } return output.toArray(new String[output.size()]); }
class class_name[name] begin[{] method[extractList, return_type[type[String]], modifier[public static], parameter[input, delimiter]] begin[{] local_variable[type[int], end] if[binary_operation[literal[1], ==, member[.end]]] begin[{] return[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[], member=trim, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=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[List], output] local_variable[type[int], start] do[binary_operation[literal[1], !=, member[.end]]] begin[{] call[output.add, parameter[call[input.substring, parameter[member[.start], member[.end]]]]] assign[member[.start], binary_operation[member[.end], +, literal[1]]] assign[member[.end], call[input.indexOf, parameter[member[.delimiter], member[.start]]]] end[}] if[binary_operation[member[.start], <, call[input.length, parameter[]]]] begin[{] call[output.add, parameter[call[input.substring, parameter[member[.start]]]]] else begin[{] None end[}] return[call[output.toArray, parameter[ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=output, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] operator[SEP] operator[SEP] identifier[extractList] operator[SEP] identifier[String] identifier[input] , Keyword[char] identifier[delimiter] operator[SEP] { Keyword[int] identifier[end] operator[=] identifier[input] operator[SEP] identifier[indexOf] operator[SEP] identifier[delimiter] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[-] Other[1] operator[==] identifier[end] operator[SEP] { Keyword[return] Keyword[new] identifier[String] operator[SEP] operator[SEP] { identifier[input] operator[SEP] identifier[trim] operator[SEP] operator[SEP] } operator[SEP] } identifier[List] operator[<] identifier[String] operator[>] identifier[output] operator[=] Keyword[new] identifier[LinkedList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[start] operator[=] Other[0] operator[SEP] Keyword[do] { identifier[output] operator[SEP] identifier[add] operator[SEP] identifier[input] operator[SEP] identifier[substring] operator[SEP] identifier[start] , identifier[end] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[start] operator[=] identifier[end] operator[+] Other[1] operator[SEP] identifier[end] operator[=] identifier[input] operator[SEP] identifier[indexOf] operator[SEP] identifier[delimiter] , identifier[start] operator[SEP] operator[SEP] } Keyword[while] operator[SEP] operator[-] Other[1] operator[!=] identifier[end] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[start] operator[<] identifier[input] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] { identifier[output] operator[SEP] identifier[add] operator[SEP] identifier[input] operator[SEP] identifier[substring] operator[SEP] identifier[start] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[output] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[String] operator[SEP] identifier[output] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@FFDCIgnore(NullPointerException.class) protected void addLibraryFile(File f) { if (!!!f.exists()) { if (tc.isWarningEnabled()) { Tr.warning(tc, "cls.library.archive", f, new FileNotFoundException(f.getName())); } return; } // Skip files that are not archives of some sort. if (!f.isDirectory() && !isArchive(f)) return; //this area subject to refactor following shared lib rework.. //ideally the shared lib code will start passing us ArtifactContainers, and it //will own the management of the ACF via DS. //NASTY.. need to use DS to get the ACF, not OSGi backdoor ;p BundleContext bc = FrameworkUtil.getBundle(ContainerClassLoader.class).getBundleContext(); ServiceReference<ArtifactContainerFactory> acfsr = bc.getServiceReference(ArtifactContainerFactory.class); if (acfsr != null) { ArtifactContainerFactory acf = bc.getService(acfsr); if (acf != null) { //NASTY.. using this bundle as the cache dir location for the data file.. try { ArtifactContainer ac = acf.getContainer(bc.getBundle().getDataFile(""), f); smartClassPath.addArtifactContainer(ac); } catch (NullPointerException e) { // TODO completed under task 74097 if (tc.isDebugEnabled()) { Tr.debug(tc, "Exception while adding files to classpath", e); } if (tc.isInfoEnabled()) { Tr.info(tc, "cls.library.file.forbidden", f); } } } } }
class class_name[name] begin[{] method[addLibraryFile, return_type[void], modifier[protected], parameter[f]] begin[{] if[call[f.exists, parameter[]]] begin[{] if[call[tc.isWarningEnabled, parameter[]]] begin[{] call[Tr.warning, parameter[member[.tc], literal["cls.library.archive"], member[.f], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileNotFoundException, sub_type=None))]] else begin[{] None end[}] return[None] else begin[{] None end[}] if[binary_operation[call[f.isDirectory, parameter[]], &&, call[.isArchive, parameter[member[.f]]]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[BundleContext], bc] local_variable[type[ServiceReference], acfsr] if[binary_operation[member[.acfsr], !=, literal[null]]] begin[{] local_variable[type[ArtifactContainerFactory], acf] if[binary_operation[member[.acf], !=, literal[null]]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getBundle, postfix_operators=[], prefix_operators=[], qualifier=bc, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=getDataFile, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getContainer, postfix_operators=[], prefix_operators=[], qualifier=acf, selectors=[], type_arguments=None), name=ac)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ArtifactContainer, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ac, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addArtifactContainer, postfix_operators=[], prefix_operators=[], qualifier=smartClassPath, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Exception while adding files to classpath"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MethodInvocation(arguments=[], member=isInfoEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="cls.library.file.forbidden"), MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=info, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['NullPointerException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[FFDCIgnore] operator[SEP] identifier[NullPointerException] operator[SEP] Keyword[class] operator[SEP] Keyword[protected] Keyword[void] identifier[addLibraryFile] operator[SEP] identifier[File] identifier[f] operator[SEP] { Keyword[if] operator[SEP] operator[!] operator[!] operator[!] identifier[f] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isWarningEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[warning] operator[SEP] identifier[tc] , literal[String] , identifier[f] , Keyword[new] identifier[FileNotFoundException] operator[SEP] identifier[f] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[f] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[isArchive] operator[SEP] identifier[f] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[BundleContext] identifier[bc] operator[=] identifier[FrameworkUtil] operator[SEP] identifier[getBundle] operator[SEP] identifier[ContainerClassLoader] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[getBundleContext] operator[SEP] operator[SEP] operator[SEP] identifier[ServiceReference] operator[<] identifier[ArtifactContainerFactory] operator[>] identifier[acfsr] operator[=] identifier[bc] operator[SEP] identifier[getServiceReference] operator[SEP] identifier[ArtifactContainerFactory] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[acfsr] operator[!=] Other[null] operator[SEP] { identifier[ArtifactContainerFactory] identifier[acf] operator[=] identifier[bc] operator[SEP] identifier[getService] operator[SEP] identifier[acfsr] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[acf] operator[!=] Other[null] operator[SEP] { Keyword[try] { identifier[ArtifactContainer] identifier[ac] operator[=] identifier[acf] operator[SEP] identifier[getContainer] operator[SEP] identifier[bc] operator[SEP] identifier[getBundle] operator[SEP] operator[SEP] operator[SEP] identifier[getDataFile] operator[SEP] literal[String] operator[SEP] , identifier[f] operator[SEP] operator[SEP] identifier[smartClassPath] operator[SEP] identifier[addArtifactContainer] operator[SEP] identifier[ac] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NullPointerException] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isInfoEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[info] operator[SEP] identifier[tc] , literal[String] , identifier[f] operator[SEP] operator[SEP] } } } } }
public static autoscaleprofile[] get(nitro_service service) throws Exception{ autoscaleprofile obj = new autoscaleprofile(); autoscaleprofile[] response = (autoscaleprofile[])obj.get_resources(service); return response; }
class class_name[name] begin[{] method[get, return_type[type[autoscaleprofile]], modifier[public static], parameter[service]] begin[{] local_variable[type[autoscaleprofile], obj] local_variable[type[autoscaleprofile], response] return[member[.response]] end[}] END[}]
Keyword[public] Keyword[static] identifier[autoscaleprofile] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] operator[SEP] Keyword[throws] identifier[Exception] { identifier[autoscaleprofile] identifier[obj] operator[=] Keyword[new] identifier[autoscaleprofile] operator[SEP] operator[SEP] operator[SEP] identifier[autoscaleprofile] operator[SEP] operator[SEP] identifier[response] operator[=] operator[SEP] identifier[autoscaleprofile] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[get_resources] operator[SEP] identifier[service] operator[SEP] operator[SEP] Keyword[return] identifier[response] operator[SEP] }
@Override public EvolutionResult<G, C> apply(final EvolutionStart<G, C> start) { return evolve(start); }
class class_name[name] begin[{] method[apply, return_type[type[EvolutionResult]], modifier[public], parameter[start]] begin[{] return[call[.evolve, parameter[member[.start]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[EvolutionResult] operator[<] identifier[G] , identifier[C] operator[>] identifier[apply] operator[SEP] Keyword[final] identifier[EvolutionStart] operator[<] identifier[G] , identifier[C] operator[>] identifier[start] operator[SEP] { Keyword[return] identifier[evolve] operator[SEP] identifier[start] operator[SEP] operator[SEP] }
@Deprecated public StreamVariantsRequest getStreamVariantsRequest(String variantSetId) { return StreamVariantsRequest.newBuilder() .setVariantSetId(variantSetId) .setReferenceName(referenceName) .setStart(start) .setEnd(end) .build(); }
class class_name[name] begin[{] method[getStreamVariantsRequest, return_type[type[StreamVariantsRequest]], modifier[public], parameter[variantSetId]] begin[{] return[call[StreamVariantsRequest.newBuilder, parameter[]]] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[public] identifier[StreamVariantsRequest] identifier[getStreamVariantsRequest] operator[SEP] identifier[String] identifier[variantSetId] operator[SEP] { Keyword[return] identifier[StreamVariantsRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setVariantSetId] operator[SEP] identifier[variantSetId] operator[SEP] operator[SEP] identifier[setReferenceName] operator[SEP] identifier[referenceName] operator[SEP] operator[SEP] identifier[setStart] operator[SEP] identifier[start] operator[SEP] operator[SEP] identifier[setEnd] operator[SEP] identifier[end] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] }
public PutResult putAnnotations(List<Annotation> annotations) throws IOException, TokenExpiredException { String requestUrl = COLLECTION_RESOURCE + RESOURCE; ArgusResponse response = getClient().executeHttpRequest(ArgusHttpClient.RequestType.POST, requestUrl, annotations); assertValidResponse(response, requestUrl); Map<String, Object> map = fromJson(response.getResult(), new TypeReference<Map<String, Object>>() { }); List<String> errorMessages = (List<String>) map.get("Error Messages"); return new PutResult(String.valueOf(map.get("Success")), String.valueOf(map.get("Errors")), errorMessages); }
class class_name[name] begin[{] method[putAnnotations, return_type[type[PutResult]], modifier[public], parameter[annotations]] begin[{] local_variable[type[String], requestUrl] local_variable[type[ArgusResponse], response] call[.assertValidResponse, parameter[member[.response], member[.requestUrl]]] local_variable[type[Map], map] local_variable[type[List], errorMessages] return[ClassCreator(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Success")], member=get, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Errors")], member=get, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None), MemberReference(member=errorMessages, 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=PutResult, sub_type=None))] end[}] END[}]
Keyword[public] identifier[PutResult] identifier[putAnnotations] operator[SEP] identifier[List] operator[<] identifier[Annotation] operator[>] identifier[annotations] operator[SEP] Keyword[throws] identifier[IOException] , identifier[TokenExpiredException] { identifier[String] identifier[requestUrl] operator[=] identifier[COLLECTION_RESOURCE] operator[+] identifier[RESOURCE] operator[SEP] identifier[ArgusResponse] identifier[response] operator[=] identifier[getClient] operator[SEP] operator[SEP] operator[SEP] identifier[executeHttpRequest] operator[SEP] identifier[ArgusHttpClient] operator[SEP] identifier[RequestType] operator[SEP] identifier[POST] , identifier[requestUrl] , identifier[annotations] operator[SEP] operator[SEP] identifier[assertValidResponse] operator[SEP] identifier[response] , identifier[requestUrl] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[map] operator[=] identifier[fromJson] operator[SEP] identifier[response] operator[SEP] identifier[getResult] operator[SEP] operator[SEP] , Keyword[new] identifier[TypeReference] operator[<] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] operator[>] operator[SEP] operator[SEP] { } operator[SEP] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[errorMessages] operator[=] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] operator[SEP] identifier[map] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[PutResult] operator[SEP] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[map] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] , identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[map] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] , identifier[errorMessages] operator[SEP] operator[SEP] }
public String convertIfcTransitionCodeToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); }
class class_name[name] begin[{] method[convertIfcTransitionCodeToString, return_type[type[String]], modifier[public], parameter[eDataType, instanceValue]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=instanceValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=instanceValue, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))] end[}] END[}]
Keyword[public] identifier[String] identifier[convertIfcTransitionCodeToString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[Object] identifier[instanceValue] operator[SEP] { Keyword[return] identifier[instanceValue] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[instanceValue] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public void putTag(Tag tag, String value) { if (value != null) { mValues.put(tag, sanitizeString(value)); } }
class class_name[name] begin[{] method[putTag, return_type[void], modifier[public], parameter[tag, value]] begin[{] if[binary_operation[member[.value], !=, literal[null]]] begin[{] call[mValues.put, parameter[member[.tag], call[.sanitizeString, parameter[member[.value]]]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[putTag] operator[SEP] identifier[Tag] identifier[tag] , identifier[String] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[value] operator[!=] Other[null] operator[SEP] { identifier[mValues] operator[SEP] identifier[put] operator[SEP] identifier[tag] , identifier[sanitizeString] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] } }
@Override public List<HttpMessageConverter<?>> getHttpMessageConverters(Collection<MediaType> mediaTypes) { List<HttpMessageConverter<?>> converters = new ArrayList<>(); converters.add(new StringHttpMessageConverter(StandardCharsets.UTF_8)); List<MediaType> halFlavors = mediaTypes.stream() // .filter(it -> HAL_FLAVORS.contains(it)) // .collect(Collectors.toList()); if (!halFlavors.isEmpty()) { converters.add(getHalConverter(halFlavors)); } return converters; }
class class_name[name] begin[{] method[getHttpMessageConverters, return_type[type[List]], modifier[public], parameter[mediaTypes]] begin[{] local_variable[type[List], converters] call[converters.add, parameter[ClassCreator(arguments=[MemberReference(member=UTF_8, postfix_operators=[], prefix_operators=[], qualifier=StandardCharsets, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringHttpMessageConverter, sub_type=None))]] local_variable[type[List], halFlavors] if[call[halFlavors.isEmpty, parameter[]]] begin[{] call[converters.add, parameter[call[.getHalConverter, parameter[member[.halFlavors]]]]] else begin[{] None end[}] return[member[.converters]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[HttpMessageConverter] operator[<] operator[?] operator[>] operator[>] identifier[getHttpMessageConverters] operator[SEP] identifier[Collection] operator[<] identifier[MediaType] operator[>] identifier[mediaTypes] operator[SEP] { identifier[List] operator[<] identifier[HttpMessageConverter] operator[<] operator[?] operator[>] operator[>] identifier[converters] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[converters] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[StringHttpMessageConverter] operator[SEP] identifier[StandardCharsets] operator[SEP] identifier[UTF_8] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[MediaType] operator[>] identifier[halFlavors] operator[=] identifier[mediaTypes] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[it] operator[->] identifier[HAL_FLAVORS] operator[SEP] identifier[contains] operator[SEP] identifier[it] operator[SEP] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[toList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[halFlavors] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[converters] operator[SEP] identifier[add] operator[SEP] identifier[getHalConverter] operator[SEP] identifier[halFlavors] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[converters] operator[SEP] }
private void handleThrowableFirstLine(OutputStream sw, IThrowableProxy tp, String stackTracePrefix, boolean isRootException) throws IOException { StringBuilder sb = new StringBuilder().append(stackTracePrefix); if (!isRootException) { sb.append(CoreConstants.CAUSED_BY); } sb.append(tp.getClassName()).append(": ").append(tp.getMessage()); sw.write(sb.toString().getBytes()); sw.flush(); }
class class_name[name] begin[{] method[handleThrowableFirstLine, return_type[void], modifier[private], parameter[sw, tp, stackTracePrefix, isRootException]] begin[{] local_variable[type[StringBuilder], sb] if[member[.isRootException]] begin[{] call[sb.append, parameter[member[CoreConstants.CAUSED_BY]]] else begin[{] None end[}] call[sb.append, parameter[call[tp.getClassName, parameter[]]]] call[sw.write, parameter[call[sb.toString, parameter[]]]] call[sw.flush, parameter[]] end[}] END[}]
Keyword[private] Keyword[void] identifier[handleThrowableFirstLine] operator[SEP] identifier[OutputStream] identifier[sw] , identifier[IThrowableProxy] identifier[tp] , identifier[String] identifier[stackTracePrefix] , Keyword[boolean] identifier[isRootException] operator[SEP] Keyword[throws] identifier[IOException] { identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[stackTracePrefix] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isRootException] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[CoreConstants] operator[SEP] identifier[CAUSED_BY] operator[SEP] operator[SEP] } identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[tp] operator[SEP] identifier[getClassName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[tp] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[sw] operator[SEP] identifier[write] operator[SEP] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[getBytes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[sw] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] }
@NotNull @ObjectiveCName("editGroupTitleWithGid:withTitle:") public Promise<Void> editGroupTitle(final int gid, final String title) { return modules.getGroupsModule().editTitle(gid, title); }
class class_name[name] begin[{] method[editGroupTitle, return_type[type[Promise]], modifier[public], parameter[gid, title]] begin[{] return[call[modules.getGroupsModule, parameter[]]] end[}] END[}]
annotation[@] identifier[NotNull] annotation[@] identifier[ObjectiveCName] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[Promise] operator[<] identifier[Void] operator[>] identifier[editGroupTitle] operator[SEP] Keyword[final] Keyword[int] identifier[gid] , Keyword[final] identifier[String] identifier[title] operator[SEP] { Keyword[return] identifier[modules] operator[SEP] identifier[getGroupsModule] operator[SEP] operator[SEP] operator[SEP] identifier[editTitle] operator[SEP] identifier[gid] , identifier[title] operator[SEP] operator[SEP] }
@Override public synchronized void start(StartContext context) throws StartException { final ProcessControllerClient client; try { final ThreadFactory threadFactory = doPrivileged(new PrivilegedAction<JBossThreadFactory>() { public JBossThreadFactory run() { return new JBossThreadFactory(new ThreadGroup("ProcessControllerConnection-thread"), Boolean.FALSE, null, "%G - %t", null, null); } }); final ExecutorService executorService; if (EnhancedQueueExecutor.DISABLE_HINT) { executorService = new ThreadPoolExecutor(THREAD_POOL_CORE_SIZE, THREAD_POOL_MAX_SIZE, 30L, TimeUnit.MILLISECONDS, new LinkedBlockingDeque<>(WORK_QUEUE_SIZE), threadFactory); } else { executorService = new EnhancedQueueExecutor.Builder() .setCorePoolSize(THREAD_POOL_CORE_SIZE) .setMaximumPoolSize(THREAD_POOL_MAX_SIZE) .setKeepAliveTime(30L, TimeUnit.MILLISECONDS) .setMaximumQueueSize(WORK_QUEUE_SIZE) .setThreadFactory(threadFactory) .build(); } final ProtocolClient.Configuration configuration = new ProtocolClient.Configuration(); configuration.setReadExecutor(executorService); configuration.setServerAddress(new InetSocketAddress(environment.getProcessControllerAddress(), environment.getProcessControllerPort().intValue())); configuration.setBindAddress(new InetSocketAddress(environment.getHostControllerAddress(), environment.getHostControllerPort())); configuration.setThreadFactory(threadFactory); configuration.setSocketFactory(SocketFactory.getDefault()); client = ProcessControllerClient.connect(configuration, authCode, new ProcessMessageHandler() { @Override public void handleProcessAdded(final ProcessControllerClient client, final String processName) { if (serverInventory == null){ throw HostControllerLogger.ROOT_LOGGER.noServerInventory(); } if(ManagedServer.isServerProcess(processName)) { serverInventory.serverProcessAdded(processName); } } @Override public void handleProcessStarted(final ProcessControllerClient client, final String processName) { if (serverInventory == null){ throw HostControllerLogger.ROOT_LOGGER.noServerInventory(); } if(ManagedServer.isServerProcess(processName)) { serverInventory.serverProcessStarted(processName); } } @Override public void handleProcessStopped(final ProcessControllerClient client, final String processName, final long uptimeMillis) { if (serverInventory == null){ throw HostControllerLogger.ROOT_LOGGER.noServerInventory(); } if(ManagedServer.isServerProcess(processName)) { serverInventory.serverProcessStopped(processName); } } @Override public void handleProcessRemoved(final ProcessControllerClient client, final String processName) { if (serverInventory == null){ throw HostControllerLogger.ROOT_LOGGER.noServerInventory(); } if(ManagedServer.isServerProcess(processName)) { serverInventory.serverProcessRemoved(processName); } } @Override public void handleProcessInventory(final ProcessControllerClient client, final Map<String, ProcessInfo> inventory) { if (serverInventory == null){ throw HostControllerLogger.ROOT_LOGGER.noServerInventory(); } serverInventory.processInventory(inventory); } @Override public void handleConnectionShutdown(final ProcessControllerClient client) { if(serverInventory == null) { return; } serverInventory.connectionFinished(); } @Override public void handleConnectionFailure(final ProcessControllerClient client, final IOException cause) { if(serverInventory == null) { return; } serverInventory.connectionFinished(); } @Override public void handleConnectionFinished(final ProcessControllerClient client) { if(serverInventory == null) { return; } serverInventory.connectionFinished(); } @Override public void handleOperationFailed(ProcessControllerClient client, OperationType operation, String processName) { if (serverInventory == null){ throw HostControllerLogger.ROOT_LOGGER.noServerInventory(); } if(ManagedServer.isServerProcess(processName)) { serverInventory.operationFailed(processName, operation); } } }); } catch(IOException e) { throw new StartException(e); } this.client = client; }
class class_name[name] begin[{] method[start, return_type[void], modifier[synchronized public], parameter[context]] begin[{] local_variable[type[ProcessControllerClient], client] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[ReturnStatement(expression=ClassCreator(arguments=[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ProcessControllerConnection-thread")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ThreadGroup, sub_type=None)), MemberReference(member=FALSE, postfix_operators=[], prefix_operators=[], qualifier=Boolean, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="%G - %t"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JBossThreadFactory, sub_type=None)), label=None)], documentation=None, modifiers={'public'}, name=run, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=JBossThreadFactory, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=JBossThreadFactory, sub_type=None))], dimensions=None, name=PrivilegedAction, sub_type=None))], member=doPrivileged, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=threadFactory)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=ThreadFactory, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=executorService)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=ExecutorService, sub_type=None)), IfStatement(condition=MemberReference(member=DISABLE_HINT, postfix_operators=[], prefix_operators=[], qualifier=EnhancedQueueExecutor, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=executorService, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=THREAD_POOL_CORE_SIZE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setCorePoolSize, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=THREAD_POOL_MAX_SIZE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setMaximumPoolSize, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=30L), MemberReference(member=MILLISECONDS, postfix_operators=[], prefix_operators=[], qualifier=TimeUnit, selectors=[])], member=setKeepAliveTime, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=WORK_QUEUE_SIZE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setMaximumQueueSize, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=threadFactory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setThreadFactory, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=EnhancedQueueExecutor, sub_type=ReferenceType(arguments=None, dimensions=None, name=Builder, sub_type=None)))), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=executorService, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=THREAD_POOL_CORE_SIZE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=THREAD_POOL_MAX_SIZE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=30L), MemberReference(member=MILLISECONDS, postfix_operators=[], prefix_operators=[], qualifier=TimeUnit, selectors=[]), ClassCreator(arguments=[MemberReference(member=WORK_QUEUE_SIZE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=LinkedBlockingDeque, sub_type=None)), MemberReference(member=threadFactory, 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=ThreadPoolExecutor, sub_type=None))), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ProtocolClient, sub_type=ReferenceType(arguments=None, dimensions=None, name=Configuration, sub_type=None))), name=configuration)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=ProtocolClient, sub_type=ReferenceType(arguments=None, dimensions=None, name=Configuration, sub_type=None))), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=executorService, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setReadExecutor, postfix_operators=[], prefix_operators=[], qualifier=configuration, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getProcessControllerAddress, postfix_operators=[], prefix_operators=[], qualifier=environment, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getProcessControllerPort, postfix_operators=[], prefix_operators=[], qualifier=environment, selectors=[MethodInvocation(arguments=[], member=intValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InetSocketAddress, sub_type=None))], member=setServerAddress, postfix_operators=[], prefix_operators=[], qualifier=configuration, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getHostControllerAddress, postfix_operators=[], prefix_operators=[], qualifier=environment, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getHostControllerPort, postfix_operators=[], prefix_operators=[], qualifier=environment, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InetSocketAddress, sub_type=None))], member=setBindAddress, postfix_operators=[], prefix_operators=[], qualifier=configuration, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=threadFactory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setThreadFactory, postfix_operators=[], prefix_operators=[], qualifier=configuration, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDefault, postfix_operators=[], prefix_operators=[], qualifier=SocketFactory, selectors=[], type_arguments=None)], member=setSocketFactory, postfix_operators=[], prefix_operators=[], qualifier=configuration, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=client, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=configuration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=authCode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=serverInventory, 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=[ThrowStatement(expression=MethodInvocation(arguments=[], member=noServerInventory, postfix_operators=[], prefix_operators=[], qualifier=HostControllerLogger.ROOT_LOGGER, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=processName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isServerProcess, postfix_operators=[], prefix_operators=[], qualifier=ManagedServer, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=processName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=serverProcessAdded, postfix_operators=[], prefix_operators=[], qualifier=serverInventory, selectors=[], type_arguments=None), label=None)]))], documentation=None, modifiers={'public'}, name=handleProcessAdded, parameters=[FormalParameter(annotations=[], modifiers={'final'}, name=client, type=ReferenceType(arguments=None, dimensions=[], name=ProcessControllerClient, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers={'final'}, name=processName, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=serverInventory, 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=[ThrowStatement(expression=MethodInvocation(arguments=[], member=noServerInventory, postfix_operators=[], prefix_operators=[], qualifier=HostControllerLogger.ROOT_LOGGER, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=processName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isServerProcess, postfix_operators=[], prefix_operators=[], qualifier=ManagedServer, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=processName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=serverProcessStarted, postfix_operators=[], prefix_operators=[], qualifier=serverInventory, selectors=[], type_arguments=None), label=None)]))], documentation=None, modifiers={'public'}, name=handleProcessStarted, parameters=[FormalParameter(annotations=[], modifiers={'final'}, name=client, type=ReferenceType(arguments=None, dimensions=[], name=ProcessControllerClient, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers={'final'}, name=processName, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=serverInventory, 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=[ThrowStatement(expression=MethodInvocation(arguments=[], member=noServerInventory, postfix_operators=[], prefix_operators=[], qualifier=HostControllerLogger.ROOT_LOGGER, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=processName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isServerProcess, postfix_operators=[], prefix_operators=[], qualifier=ManagedServer, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=processName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=serverProcessStopped, postfix_operators=[], prefix_operators=[], qualifier=serverInventory, selectors=[], type_arguments=None), label=None)]))], documentation=None, modifiers={'public'}, name=handleProcessStopped, parameters=[FormalParameter(annotations=[], modifiers={'final'}, name=client, type=ReferenceType(arguments=None, dimensions=[], name=ProcessControllerClient, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers={'final'}, name=processName, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers={'final'}, name=uptimeMillis, type=BasicType(dimensions=[], name=long), varargs=False)], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=serverInventory, 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=[ThrowStatement(expression=MethodInvocation(arguments=[], member=noServerInventory, postfix_operators=[], prefix_operators=[], qualifier=HostControllerLogger.ROOT_LOGGER, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=processName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isServerProcess, postfix_operators=[], prefix_operators=[], qualifier=ManagedServer, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=processName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=serverProcessRemoved, postfix_operators=[], prefix_operators=[], qualifier=serverInventory, selectors=[], type_arguments=None), label=None)]))], documentation=None, modifiers={'public'}, name=handleProcessRemoved, parameters=[FormalParameter(annotations=[], modifiers={'final'}, name=client, type=ReferenceType(arguments=None, dimensions=[], name=ProcessControllerClient, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers={'final'}, name=processName, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=serverInventory, 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=[ThrowStatement(expression=MethodInvocation(arguments=[], member=noServerInventory, postfix_operators=[], prefix_operators=[], qualifier=HostControllerLogger.ROOT_LOGGER, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=inventory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processInventory, postfix_operators=[], prefix_operators=[], qualifier=serverInventory, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=handleProcessInventory, parameters=[FormalParameter(annotations=[], modifiers={'final'}, name=client, type=ReferenceType(arguments=None, dimensions=[], name=ProcessControllerClient, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers={'final'}, name=inventory, 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=ProcessInfo, sub_type=None))], dimensions=[], name=Map, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=serverInventory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=None, label=None)])), StatementExpression(expression=MethodInvocation(arguments=[], member=connectionFinished, postfix_operators=[], prefix_operators=[], qualifier=serverInventory, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=handleConnectionShutdown, parameters=[FormalParameter(annotations=[], modifiers={'final'}, name=client, type=ReferenceType(arguments=None, dimensions=[], name=ProcessControllerClient, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=serverInventory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=None, label=None)])), StatementExpression(expression=MethodInvocation(arguments=[], member=connectionFinished, postfix_operators=[], prefix_operators=[], qualifier=serverInventory, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=handleConnectionFailure, parameters=[FormalParameter(annotations=[], modifiers={'final'}, name=client, type=ReferenceType(arguments=None, dimensions=[], name=ProcessControllerClient, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers={'final'}, name=cause, type=ReferenceType(arguments=None, dimensions=[], name=IOException, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=serverInventory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=None, label=None)])), StatementExpression(expression=MethodInvocation(arguments=[], member=connectionFinished, postfix_operators=[], prefix_operators=[], qualifier=serverInventory, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=handleConnectionFinished, parameters=[FormalParameter(annotations=[], modifiers={'final'}, name=client, type=ReferenceType(arguments=None, dimensions=[], name=ProcessControllerClient, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=serverInventory, 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=[ThrowStatement(expression=MethodInvocation(arguments=[], member=noServerInventory, postfix_operators=[], prefix_operators=[], qualifier=HostControllerLogger.ROOT_LOGGER, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=processName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isServerProcess, postfix_operators=[], prefix_operators=[], qualifier=ManagedServer, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=processName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=operation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=operationFailed, postfix_operators=[], prefix_operators=[], qualifier=serverInventory, selectors=[], type_arguments=None), label=None)]))], documentation=None, modifiers={'public'}, name=handleOperationFailed, parameters=[FormalParameter(annotations=[], modifiers=set(), name=client, type=ReferenceType(arguments=None, dimensions=[], name=ProcessControllerClient, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=operation, type=ReferenceType(arguments=None, dimensions=[], name=OperationType, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=processName, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ProcessMessageHandler, sub_type=None))], member=connect, postfix_operators=[], prefix_operators=[], qualifier=ProcessControllerClient, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StartException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) assign[THIS[member[None.client]], member[.client]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[synchronized] Keyword[void] identifier[start] operator[SEP] identifier[StartContext] identifier[context] operator[SEP] Keyword[throws] identifier[StartException] { Keyword[final] identifier[ProcessControllerClient] identifier[client] operator[SEP] Keyword[try] { Keyword[final] identifier[ThreadFactory] identifier[threadFactory] operator[=] identifier[doPrivileged] operator[SEP] Keyword[new] identifier[PrivilegedAction] operator[<] identifier[JBossThreadFactory] operator[>] operator[SEP] operator[SEP] { Keyword[public] identifier[JBossThreadFactory] identifier[run] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[JBossThreadFactory] operator[SEP] Keyword[new] identifier[ThreadGroup] operator[SEP] literal[String] operator[SEP] , identifier[Boolean] operator[SEP] identifier[FALSE] , Other[null] , literal[String] , Other[null] , Other[null] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] Keyword[final] identifier[ExecutorService] identifier[executorService] operator[SEP] Keyword[if] operator[SEP] identifier[EnhancedQueueExecutor] operator[SEP] identifier[DISABLE_HINT] operator[SEP] { identifier[executorService] operator[=] Keyword[new] identifier[ThreadPoolExecutor] operator[SEP] identifier[THREAD_POOL_CORE_SIZE] , identifier[THREAD_POOL_MAX_SIZE] , Other[30L] , identifier[TimeUnit] operator[SEP] identifier[MILLISECONDS] , Keyword[new] identifier[LinkedBlockingDeque] operator[<] operator[>] operator[SEP] identifier[WORK_QUEUE_SIZE] operator[SEP] , identifier[threadFactory] operator[SEP] operator[SEP] } Keyword[else] { identifier[executorService] operator[=] Keyword[new] identifier[EnhancedQueueExecutor] operator[SEP] identifier[Builder] operator[SEP] operator[SEP] operator[SEP] identifier[setCorePoolSize] operator[SEP] identifier[THREAD_POOL_CORE_SIZE] operator[SEP] operator[SEP] identifier[setMaximumPoolSize] operator[SEP] identifier[THREAD_POOL_MAX_SIZE] operator[SEP] operator[SEP] identifier[setKeepAliveTime] operator[SEP] Other[30L] , identifier[TimeUnit] operator[SEP] identifier[MILLISECONDS] operator[SEP] operator[SEP] identifier[setMaximumQueueSize] operator[SEP] identifier[WORK_QUEUE_SIZE] operator[SEP] operator[SEP] identifier[setThreadFactory] operator[SEP] identifier[threadFactory] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[ProtocolClient] operator[SEP] identifier[Configuration] identifier[configuration] operator[=] Keyword[new] identifier[ProtocolClient] operator[SEP] identifier[Configuration] operator[SEP] operator[SEP] operator[SEP] identifier[configuration] operator[SEP] identifier[setReadExecutor] operator[SEP] identifier[executorService] operator[SEP] operator[SEP] identifier[configuration] operator[SEP] identifier[setServerAddress] operator[SEP] Keyword[new] identifier[InetSocketAddress] operator[SEP] identifier[environment] operator[SEP] identifier[getProcessControllerAddress] operator[SEP] operator[SEP] , identifier[environment] operator[SEP] identifier[getProcessControllerPort] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[configuration] operator[SEP] identifier[setBindAddress] operator[SEP] Keyword[new] identifier[InetSocketAddress] operator[SEP] identifier[environment] operator[SEP] identifier[getHostControllerAddress] operator[SEP] operator[SEP] , identifier[environment] operator[SEP] identifier[getHostControllerPort] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[configuration] operator[SEP] identifier[setThreadFactory] operator[SEP] identifier[threadFactory] operator[SEP] operator[SEP] identifier[configuration] operator[SEP] identifier[setSocketFactory] operator[SEP] identifier[SocketFactory] operator[SEP] identifier[getDefault] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[client] operator[=] identifier[ProcessControllerClient] operator[SEP] identifier[connect] operator[SEP] identifier[configuration] , identifier[authCode] , Keyword[new] identifier[ProcessMessageHandler] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[handleProcessAdded] operator[SEP] Keyword[final] identifier[ProcessControllerClient] identifier[client] , Keyword[final] identifier[String] identifier[processName] operator[SEP] { Keyword[if] operator[SEP] identifier[serverInventory] operator[==] Other[null] operator[SEP] { Keyword[throw] identifier[HostControllerLogger] operator[SEP] identifier[ROOT_LOGGER] operator[SEP] identifier[noServerInventory] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[ManagedServer] operator[SEP] identifier[isServerProcess] operator[SEP] identifier[processName] operator[SEP] operator[SEP] { identifier[serverInventory] operator[SEP] identifier[serverProcessAdded] operator[SEP] identifier[processName] operator[SEP] operator[SEP] } } annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[handleProcessStarted] operator[SEP] Keyword[final] identifier[ProcessControllerClient] identifier[client] , Keyword[final] identifier[String] identifier[processName] operator[SEP] { Keyword[if] operator[SEP] identifier[serverInventory] operator[==] Other[null] operator[SEP] { Keyword[throw] identifier[HostControllerLogger] operator[SEP] identifier[ROOT_LOGGER] operator[SEP] identifier[noServerInventory] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[ManagedServer] operator[SEP] identifier[isServerProcess] operator[SEP] identifier[processName] operator[SEP] operator[SEP] { identifier[serverInventory] operator[SEP] identifier[serverProcessStarted] operator[SEP] identifier[processName] operator[SEP] operator[SEP] } } annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[handleProcessStopped] operator[SEP] Keyword[final] identifier[ProcessControllerClient] identifier[client] , Keyword[final] identifier[String] identifier[processName] , Keyword[final] Keyword[long] identifier[uptimeMillis] operator[SEP] { Keyword[if] operator[SEP] identifier[serverInventory] operator[==] Other[null] operator[SEP] { Keyword[throw] identifier[HostControllerLogger] operator[SEP] identifier[ROOT_LOGGER] operator[SEP] identifier[noServerInventory] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[ManagedServer] operator[SEP] identifier[isServerProcess] operator[SEP] identifier[processName] operator[SEP] operator[SEP] { identifier[serverInventory] operator[SEP] identifier[serverProcessStopped] operator[SEP] identifier[processName] operator[SEP] operator[SEP] } } annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[handleProcessRemoved] operator[SEP] Keyword[final] identifier[ProcessControllerClient] identifier[client] , Keyword[final] identifier[String] identifier[processName] operator[SEP] { Keyword[if] operator[SEP] identifier[serverInventory] operator[==] Other[null] operator[SEP] { Keyword[throw] identifier[HostControllerLogger] operator[SEP] identifier[ROOT_LOGGER] operator[SEP] identifier[noServerInventory] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[ManagedServer] operator[SEP] identifier[isServerProcess] operator[SEP] identifier[processName] operator[SEP] operator[SEP] { identifier[serverInventory] operator[SEP] identifier[serverProcessRemoved] operator[SEP] identifier[processName] operator[SEP] operator[SEP] } } annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[handleProcessInventory] operator[SEP] Keyword[final] identifier[ProcessControllerClient] identifier[client] , Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[ProcessInfo] operator[>] identifier[inventory] operator[SEP] { Keyword[if] operator[SEP] identifier[serverInventory] operator[==] Other[null] operator[SEP] { Keyword[throw] identifier[HostControllerLogger] operator[SEP] identifier[ROOT_LOGGER] operator[SEP] identifier[noServerInventory] operator[SEP] operator[SEP] operator[SEP] } identifier[serverInventory] operator[SEP] identifier[processInventory] operator[SEP] identifier[inventory] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[handleConnectionShutdown] operator[SEP] Keyword[final] identifier[ProcessControllerClient] identifier[client] operator[SEP] { Keyword[if] operator[SEP] identifier[serverInventory] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } identifier[serverInventory] operator[SEP] identifier[connectionFinished] operator[SEP] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[handleConnectionFailure] operator[SEP] Keyword[final] identifier[ProcessControllerClient] identifier[client] , Keyword[final] identifier[IOException] identifier[cause] operator[SEP] { Keyword[if] operator[SEP] identifier[serverInventory] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } identifier[serverInventory] operator[SEP] identifier[connectionFinished] operator[SEP] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[handleConnectionFinished] operator[SEP] Keyword[final] identifier[ProcessControllerClient] identifier[client] operator[SEP] { Keyword[if] operator[SEP] identifier[serverInventory] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } identifier[serverInventory] operator[SEP] identifier[connectionFinished] operator[SEP] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[handleOperationFailed] operator[SEP] identifier[ProcessControllerClient] identifier[client] , identifier[OperationType] identifier[operation] , identifier[String] identifier[processName] operator[SEP] { Keyword[if] operator[SEP] identifier[serverInventory] operator[==] Other[null] operator[SEP] { Keyword[throw] identifier[HostControllerLogger] operator[SEP] identifier[ROOT_LOGGER] operator[SEP] identifier[noServerInventory] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[ManagedServer] operator[SEP] identifier[isServerProcess] operator[SEP] identifier[processName] operator[SEP] operator[SEP] { identifier[serverInventory] operator[SEP] identifier[operationFailed] operator[SEP] identifier[processName] , identifier[operation] operator[SEP] operator[SEP] } } } operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[StartException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[client] operator[=] identifier[client] operator[SEP] }
@Override public void disableTwoPhaseIterator() { super.disableTwoPhaseIterator(); for (MtasSpanSequenceItem item : items) { item.getQuery().disableTwoPhaseIterator(); } if (ignoreQuery != null) { ignoreQuery.disableTwoPhaseIterator(); } }
class class_name[name] begin[{] method[disableTwoPhaseIterator, return_type[void], modifier[public], parameter[]] begin[{] SuperMethodInvocation(arguments=[], member=disableTwoPhaseIterator, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getQuery, postfix_operators=[], prefix_operators=[], qualifier=item, selectors=[MethodInvocation(arguments=[], member=disableTwoPhaseIterator, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=items, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=item)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MtasSpanSequenceItem, sub_type=None))), label=None) if[binary_operation[member[.ignoreQuery], !=, literal[null]]] begin[{] call[ignoreQuery.disableTwoPhaseIterator, parameter[]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[disableTwoPhaseIterator] operator[SEP] operator[SEP] { Keyword[super] operator[SEP] identifier[disableTwoPhaseIterator] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[MtasSpanSequenceItem] identifier[item] operator[:] identifier[items] operator[SEP] { identifier[item] operator[SEP] identifier[getQuery] operator[SEP] operator[SEP] operator[SEP] identifier[disableTwoPhaseIterator] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[ignoreQuery] operator[!=] Other[null] operator[SEP] { identifier[ignoreQuery] operator[SEP] identifier[disableTwoPhaseIterator] operator[SEP] operator[SEP] operator[SEP] } }
public void setTitle(Session session) { StringBuilder strBuilder = new StringBuilder(); if (session != null) { strBuilder.append(session.getSessionName()).append(" - "); if (!session.isNewState()) { File file = new File(session.getFileName()); strBuilder.append(file.getName().replaceAll(".session\\z", "")).append(" - "); } } strBuilder.append(Constant.PROGRAM_NAME).append(' ').append(Constant.PROGRAM_VERSION); super.setTitle(strBuilder.toString()); }
class class_name[name] begin[{] method[setTitle, return_type[void], modifier[public], parameter[session]] begin[{] local_variable[type[StringBuilder], strBuilder] if[binary_operation[member[.session], !=, literal[null]]] begin[{] call[strBuilder.append, parameter[call[session.getSessionName, parameter[]]]] if[call[session.isNewState, parameter[]]] begin[{] local_variable[type[File], file] call[strBuilder.append, parameter[call[file.getName, parameter[]]]] else begin[{] None end[}] else begin[{] None end[}] call[strBuilder.append, parameter[member[Constant.PROGRAM_NAME]]] SuperMethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=strBuilder, selectors=[], type_arguments=None)], member=setTitle, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[setTitle] operator[SEP] identifier[Session] identifier[session] operator[SEP] { identifier[StringBuilder] identifier[strBuilder] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[session] operator[!=] Other[null] operator[SEP] { identifier[strBuilder] operator[SEP] identifier[append] operator[SEP] identifier[session] operator[SEP] identifier[getSessionName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[session] operator[SEP] identifier[isNewState] operator[SEP] operator[SEP] operator[SEP] { identifier[File] identifier[file] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[session] operator[SEP] identifier[getFileName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[strBuilder] operator[SEP] identifier[append] operator[SEP] identifier[file] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[replaceAll] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } } identifier[strBuilder] operator[SEP] identifier[append] operator[SEP] identifier[Constant] operator[SEP] identifier[PROGRAM_NAME] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[Constant] operator[SEP] identifier[PROGRAM_VERSION] operator[SEP] operator[SEP] Keyword[super] operator[SEP] identifier[setTitle] operator[SEP] identifier[strBuilder] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override public CPInstance[] findByC_ST_PrevAndNext(long CPInstanceId, long CPDefinitionId, int status, OrderByComparator<CPInstance> orderByComparator) throws NoSuchCPInstanceException { CPInstance cpInstance = findByPrimaryKey(CPInstanceId); Session session = null; try { session = openSession(); CPInstance[] array = new CPInstanceImpl[3]; array[0] = getByC_ST_PrevAndNext(session, cpInstance, CPDefinitionId, status, orderByComparator, true); array[1] = cpInstance; array[2] = getByC_ST_PrevAndNext(session, cpInstance, CPDefinitionId, status, orderByComparator, false); return array; } catch (Exception e) { throw processException(e); } finally { closeSession(session); } }
class class_name[name] begin[{] method[findByC_ST_PrevAndNext, return_type[type[CPInstance]], modifier[public], parameter[CPInstanceId, CPDefinitionId, status, orderByComparator]] begin[{] local_variable[type[CPInstance], cpInstance] local_variable[type[Session], session] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=openSession, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CPInstanceImpl, sub_type=None)), name=array)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=CPInstance, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), type==, value=MethodInvocation(arguments=[MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cpInstance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=CPDefinitionId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=status, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=orderByComparator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=getByC_ST_PrevAndNext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), type==, value=MemberReference(member=cpInstance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2))]), type==, value=MethodInvocation(arguments=[MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cpInstance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=CPDefinitionId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=status, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=orderByComparator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=getByC_ST_PrevAndNext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), ReturnStatement(expression=MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=closeSession, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CPInstance] operator[SEP] operator[SEP] identifier[findByC_ST_PrevAndNext] operator[SEP] Keyword[long] identifier[CPInstanceId] , Keyword[long] identifier[CPDefinitionId] , Keyword[int] identifier[status] , identifier[OrderByComparator] operator[<] identifier[CPInstance] operator[>] identifier[orderByComparator] operator[SEP] Keyword[throws] identifier[NoSuchCPInstanceException] { identifier[CPInstance] identifier[cpInstance] operator[=] identifier[findByPrimaryKey] operator[SEP] identifier[CPInstanceId] operator[SEP] operator[SEP] identifier[Session] identifier[session] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[session] operator[=] identifier[openSession] operator[SEP] operator[SEP] operator[SEP] identifier[CPInstance] operator[SEP] operator[SEP] identifier[array] operator[=] Keyword[new] identifier[CPInstanceImpl] operator[SEP] Other[3] operator[SEP] operator[SEP] identifier[array] operator[SEP] Other[0] operator[SEP] operator[=] identifier[getByC_ST_PrevAndNext] operator[SEP] identifier[session] , identifier[cpInstance] , identifier[CPDefinitionId] , identifier[status] , identifier[orderByComparator] , literal[boolean] operator[SEP] operator[SEP] identifier[array] operator[SEP] Other[1] operator[SEP] operator[=] identifier[cpInstance] operator[SEP] identifier[array] operator[SEP] Other[2] operator[SEP] operator[=] identifier[getByC_ST_PrevAndNext] operator[SEP] identifier[session] , identifier[cpInstance] , identifier[CPDefinitionId] , identifier[status] , identifier[orderByComparator] , literal[boolean] operator[SEP] operator[SEP] Keyword[return] identifier[array] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] identifier[processException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[finally] { identifier[closeSession] operator[SEP] identifier[session] operator[SEP] operator[SEP] } }
@Override public Stream<LoadBalancerMetadata> findLazy(LoadBalancerFilter filter) { checkNotNull(filter, "Filter must be not a null"); Stream<DataCenterMetadata> dataCenters = dataCenterService.findLazy( filter.getDataCenterFilter() ); return dataCenters .flatMap(datacenter -> loadBalancerClient .getLoadBalancers(datacenter.getId()) .stream() ) .filter(filter.getPredicate()) .filter(filter.getIds().size() > 0 ? combine(LoadBalancerMetadata::getId, in(filter.getIds())) : alwaysTrue() ); }
class class_name[name] begin[{] method[findLazy, return_type[type[Stream]], modifier[public], parameter[filter]] begin[{] call[.checkNotNull, parameter[member[.filter], literal["Filter must be not a null"]]] local_variable[type[Stream], dataCenters] return[call[dataCenters.flatMap, parameter[LambdaExpression(body=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=datacenter, selectors=[], type_arguments=None)], member=getLoadBalancers, postfix_operators=[], prefix_operators=[], qualifier=loadBalancerClient, selectors=[MethodInvocation(arguments=[], member=stream, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), parameters=[MemberReference(member=datacenter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Stream] operator[<] identifier[LoadBalancerMetadata] operator[>] identifier[findLazy] operator[SEP] identifier[LoadBalancerFilter] identifier[filter] operator[SEP] { identifier[checkNotNull] operator[SEP] identifier[filter] , literal[String] operator[SEP] operator[SEP] identifier[Stream] operator[<] identifier[DataCenterMetadata] operator[>] identifier[dataCenters] operator[=] identifier[dataCenterService] operator[SEP] identifier[findLazy] operator[SEP] identifier[filter] operator[SEP] identifier[getDataCenterFilter] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[dataCenters] operator[SEP] identifier[flatMap] operator[SEP] identifier[datacenter] operator[->] identifier[loadBalancerClient] operator[SEP] identifier[getLoadBalancers] operator[SEP] identifier[datacenter] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[filter] operator[SEP] identifier[getPredicate] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[filter] operator[SEP] identifier[getIds] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[?] identifier[combine] operator[SEP] identifier[LoadBalancerMetadata] operator[::] identifier[getId] , identifier[in] operator[SEP] identifier[filter] operator[SEP] identifier[getIds] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[:] identifier[alwaysTrue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private void hideItemContent(Element element) { List<Element> itemWidget = CmsDomUtil.getElementsByClass( org.opencms.gwt.client.ui.css.I_CmsLayoutBundle.INSTANCE.listItemWidgetCss().itemContainer(), element); if ((itemWidget != null) && (itemWidget.size() > 0)) { itemWidget.get(0).addClassName(I_CmsSitemapLayoutBundle.INSTANCE.sitemapItemCss().contentHide()); } }
class class_name[name] begin[{] method[hideItemContent, return_type[void], modifier[private], parameter[element]] begin[{] local_variable[type[List], itemWidget] if[binary_operation[binary_operation[member[.itemWidget], !=, literal[null]], &&, binary_operation[call[itemWidget.size, parameter[]], >, literal[0]]]] begin[{] call[itemWidget.get, parameter[literal[0]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[hideItemContent] operator[SEP] identifier[Element] identifier[element] operator[SEP] { identifier[List] operator[<] identifier[Element] operator[>] identifier[itemWidget] operator[=] identifier[CmsDomUtil] operator[SEP] identifier[getElementsByClass] operator[SEP] identifier[org] operator[SEP] identifier[opencms] operator[SEP] identifier[gwt] operator[SEP] identifier[client] operator[SEP] identifier[ui] operator[SEP] identifier[css] operator[SEP] identifier[I_CmsLayoutBundle] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[listItemWidgetCss] operator[SEP] operator[SEP] operator[SEP] identifier[itemContainer] operator[SEP] operator[SEP] , identifier[element] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[itemWidget] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[itemWidget] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] operator[SEP] { identifier[itemWidget] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[addClassName] operator[SEP] identifier[I_CmsSitemapLayoutBundle] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[sitemapItemCss] operator[SEP] operator[SEP] operator[SEP] identifier[contentHide] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public UsageRecordSummaryCollection usageRecordSummaries() throws StripeException { return usageRecordSummaries((Map<String, Object>) null, (RequestOptions) null); }
class class_name[name] begin[{] method[usageRecordSummaries, return_type[type[UsageRecordSummaryCollection]], modifier[public], parameter[]] begin[{] return[call[.usageRecordSummaries, parameter[Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=Map, sub_type=None)), Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), type=ReferenceType(arguments=None, dimensions=[], name=RequestOptions, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[UsageRecordSummaryCollection] identifier[usageRecordSummaries] operator[SEP] operator[SEP] Keyword[throws] identifier[StripeException] { Keyword[return] identifier[usageRecordSummaries] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] Other[null] , operator[SEP] identifier[RequestOptions] operator[SEP] Other[null] operator[SEP] operator[SEP] }
public static boolean changeMobileDataState(boolean dataEnabled) { if(Build.VERSION.SDK_INT < 9) { throw new UnsupportedOperationException("Unsupported SDK version. This operation is only available on SDK 9 or above."); } try { ConnectivityManager connectivityManager = (ConnectivityManager) QuickUtils.getContext().getSystemService(Context.CONNECTIVITY_SERVICE); Class connectivityManagerClass = Class.forName(connectivityManager.getClass().getName()); Method setMobileDataEnabled = connectivityManagerClass.getDeclaredMethod("setMobileDataEnabled", Boolean.TYPE); setMobileDataEnabled.setAccessible(true); setMobileDataEnabled.invoke(connectivityManager, dataEnabled); return true; } catch(Exception e) { return false; } }
class class_name[name] begin[{] method[changeMobileDataState, return_type[type[boolean]], modifier[public static], parameter[dataEnabled]] begin[{] if[binary_operation[member[Build.VERSION.SDK_INT], <, literal[9]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unsupported SDK version. This operation is only available on SDK 9 or above.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UnsupportedOperationException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=getContext, postfix_operators=[], prefix_operators=[], qualifier=QuickUtils, selectors=[MethodInvocation(arguments=[MemberReference(member=CONNECTIVITY_SERVICE, postfix_operators=[], prefix_operators=[], qualifier=Context, selectors=[])], member=getSystemService, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=ConnectivityManager, sub_type=None)), name=connectivityManager)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ConnectivityManager, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=connectivityManager, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[], type_arguments=None), name=connectivityManagerClass)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Class, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="setMobileDataEnabled"), MemberReference(member=TYPE, postfix_operators=[], prefix_operators=[], qualifier=Boolean, selectors=[])], member=getDeclaredMethod, postfix_operators=[], prefix_operators=[], qualifier=connectivityManagerClass, selectors=[], type_arguments=None), name=setMobileDataEnabled)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setAccessible, postfix_operators=[], prefix_operators=[], qualifier=setMobileDataEnabled, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=connectivityManager, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=dataEnabled, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=setMobileDataEnabled, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[changeMobileDataState] operator[SEP] Keyword[boolean] identifier[dataEnabled] operator[SEP] { Keyword[if] operator[SEP] identifier[Build] operator[SEP] identifier[VERSION] operator[SEP] identifier[SDK_INT] operator[<] Other[9] operator[SEP] { Keyword[throw] Keyword[new] identifier[UnsupportedOperationException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[ConnectivityManager] identifier[connectivityManager] operator[=] operator[SEP] identifier[ConnectivityManager] operator[SEP] identifier[QuickUtils] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] identifier[getSystemService] operator[SEP] identifier[Context] operator[SEP] identifier[CONNECTIVITY_SERVICE] operator[SEP] operator[SEP] identifier[Class] identifier[connectivityManagerClass] operator[=] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[connectivityManager] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Method] identifier[setMobileDataEnabled] operator[=] identifier[connectivityManagerClass] operator[SEP] identifier[getDeclaredMethod] operator[SEP] literal[String] , identifier[Boolean] operator[SEP] identifier[TYPE] operator[SEP] operator[SEP] identifier[setMobileDataEnabled] operator[SEP] identifier[setAccessible] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[setMobileDataEnabled] operator[SEP] identifier[invoke] operator[SEP] identifier[connectivityManager] , identifier[dataEnabled] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } }
public static host_interface reset(nitro_service client, host_interface resource) throws Exception { return ((host_interface[]) resource.perform_operation(client, "reset"))[0]; }
class class_name[name] begin[{] method[reset, return_type[type[host_interface]], modifier[public static], parameter[client, resource]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=client, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="reset")], member=perform_operation, postfix_operators=[], prefix_operators=[], qualifier=resource, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[None], name=host_interface, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[host_interface] identifier[reset] operator[SEP] identifier[nitro_service] identifier[client] , identifier[host_interface] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[return] operator[SEP] operator[SEP] identifier[host_interface] operator[SEP] operator[SEP] operator[SEP] identifier[resource] operator[SEP] identifier[perform_operation] operator[SEP] identifier[client] , literal[String] operator[SEP] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[SEP] }
public ImageVectorizationResult getImageVectorizationResultWait() throws Exception { try { ImageVectorizationResult imvr = pool.take().get(); return imvr; } catch (Exception e) { throw e; } finally { // in any case (Exception or not) the numPendingTask should be reduced numPendingTasks--; } }
class class_name[name] begin[{] method[getImageVectorizationResultWait, return_type[type[ImageVectorizationResult]], modifier[public], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=take, postfix_operators=[], prefix_operators=[], qualifier=pool, selectors=[MethodInvocation(arguments=[], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=imvr)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ImageVectorizationResult, sub_type=None)), ReturnStatement(expression=MemberReference(member=imvr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=[StatementExpression(expression=MemberReference(member=numPendingTasks, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] identifier[ImageVectorizationResult] identifier[getImageVectorizationResultWait] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[try] { identifier[ImageVectorizationResult] identifier[imvr] operator[=] identifier[pool] operator[SEP] identifier[take] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[imvr] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] identifier[e] operator[SEP] } Keyword[finally] { identifier[numPendingTasks] operator[--] operator[SEP] } }
public static long count_filtered(nitro_service service, String username, String filter) throws Exception{ aaauser_tmsessionpolicy_binding obj = new aaauser_tmsessionpolicy_binding(); obj.set_username(username); options option = new options(); option.set_count(true); option.set_filter(filter); aaauser_tmsessionpolicy_binding[] response = (aaauser_tmsessionpolicy_binding[]) obj.getfiltered(service, option); if (response != null) { return response[0].__count; } return 0; }
class class_name[name] begin[{] method[count_filtered, return_type[type[long]], modifier[public static], parameter[service, username, filter]] begin[{] local_variable[type[aaauser_tmsessionpolicy_binding], obj] call[obj.set_username, parameter[member[.username]]] local_variable[type[options], option] call[option.set_count, parameter[literal[true]]] call[option.set_filter, parameter[member[.filter]]] local_variable[type[aaauser_tmsessionpolicy_binding], response] if[binary_operation[member[.response], !=, literal[null]]] begin[{] return[member[.response]] else begin[{] None end[}] return[literal[0]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[long] identifier[count_filtered] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[username] , identifier[String] identifier[filter] operator[SEP] Keyword[throws] identifier[Exception] { identifier[aaauser_tmsessionpolicy_binding] identifier[obj] operator[=] Keyword[new] identifier[aaauser_tmsessionpolicy_binding] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[set_username] operator[SEP] identifier[username] operator[SEP] operator[SEP] identifier[options] identifier[option] operator[=] Keyword[new] identifier[options] operator[SEP] operator[SEP] operator[SEP] identifier[option] operator[SEP] identifier[set_count] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[option] operator[SEP] identifier[set_filter] operator[SEP] identifier[filter] operator[SEP] operator[SEP] identifier[aaauser_tmsessionpolicy_binding] operator[SEP] operator[SEP] identifier[response] operator[=] operator[SEP] identifier[aaauser_tmsessionpolicy_binding] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[getfiltered] operator[SEP] identifier[service] , identifier[option] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[response] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[response] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[__count] operator[SEP] } Keyword[return] Other[0] operator[SEP] }
public boolean attach() { if (!attached) { attached = true; if (isLocalBeanStoreSyncNeeded()) { if (!beanStore.delegate().isEmpty()) { // The local bean store is authoritative, so copy everything to the backing store for (BeanIdentifier id : beanStore) { ContextualInstance<?> instance = beanStore.get(id); String prefixedId = getNamingScheme().prefix(id); ContextLogger.LOG.updatingStoreWithContextualUnderId(instance, id); setAttribute(prefixedId, instance); } } if (!isAttributeLazyFetchingEnabled()) { // Additionally copy anything not in the local bean store but in the backing store fetchUninitializedAttributes(); } } return true; } else { return false; } }
class class_name[name] begin[{] method[attach, return_type[type[boolean]], modifier[public], parameter[]] begin[{] if[member[.attached]] begin[{] assign[member[.attached], literal[true]] if[call[.isLocalBeanStoreSyncNeeded, parameter[]]] begin[{] if[call[beanStore.delegate, parameter[]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=beanStore, selectors=[], type_arguments=None), name=instance)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=ContextualInstance, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getNamingScheme, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=prefix, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=prefixedId)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=instance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=updatingStoreWithContextualUnderId, postfix_operators=[], prefix_operators=[], qualifier=ContextLogger.LOG, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=prefixedId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=instance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setAttribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=beanStore, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=id)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BeanIdentifier, sub_type=None))), label=None) else begin[{] None end[}] if[call[.isAttributeLazyFetchingEnabled, parameter[]]] begin[{] call[.fetchUninitializedAttributes, parameter[]] else begin[{] None end[}] else begin[{] None end[}] return[literal[true]] else begin[{] return[literal[false]] end[}] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[attach] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[attached] operator[SEP] { identifier[attached] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[isLocalBeanStoreSyncNeeded] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[beanStore] operator[SEP] identifier[delegate] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[BeanIdentifier] identifier[id] operator[:] identifier[beanStore] operator[SEP] { identifier[ContextualInstance] operator[<] operator[?] operator[>] identifier[instance] operator[=] identifier[beanStore] operator[SEP] identifier[get] operator[SEP] identifier[id] operator[SEP] operator[SEP] identifier[String] identifier[prefixedId] operator[=] identifier[getNamingScheme] operator[SEP] operator[SEP] operator[SEP] identifier[prefix] operator[SEP] identifier[id] operator[SEP] operator[SEP] identifier[ContextLogger] operator[SEP] identifier[LOG] operator[SEP] identifier[updatingStoreWithContextualUnderId] operator[SEP] identifier[instance] , identifier[id] operator[SEP] operator[SEP] identifier[setAttribute] operator[SEP] identifier[prefixedId] , identifier[instance] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] operator[!] identifier[isAttributeLazyFetchingEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[fetchUninitializedAttributes] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { Keyword[return] literal[boolean] operator[SEP] } }
public JSONObject optJSONObject(String key) { Object object = this.opt(key); return object instanceof JSONObject ? (JSONObject) object : null; }
class class_name[name] begin[{] method[optJSONObject, return_type[type[JSONObject]], modifier[public], parameter[key]] begin[{] local_variable[type[Object], object] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=JSONObject, sub_type=None), operator=instanceof), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=Cast(expression=MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=JSONObject, sub_type=None)))] end[}] END[}]
Keyword[public] identifier[JSONObject] identifier[optJSONObject] operator[SEP] identifier[String] identifier[key] operator[SEP] { identifier[Object] identifier[object] operator[=] Keyword[this] operator[SEP] identifier[opt] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[return] identifier[object] Keyword[instanceof] identifier[JSONObject] operator[?] operator[SEP] identifier[JSONObject] operator[SEP] identifier[object] operator[:] Other[null] operator[SEP] }
public void marshall(Classifier classifier, ProtocolMarshaller protocolMarshaller) { if (classifier == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(classifier.getGrokClassifier(), GROKCLASSIFIER_BINDING); protocolMarshaller.marshall(classifier.getXMLClassifier(), XMLCLASSIFIER_BINDING); protocolMarshaller.marshall(classifier.getJsonClassifier(), JSONCLASSIFIER_BINDING); protocolMarshaller.marshall(classifier.getCsvClassifier(), CSVCLASSIFIER_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[classifier, protocolMarshaller]] begin[{] if[binary_operation[member[.classifier], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getGrokClassifier, postfix_operators=[], prefix_operators=[], qualifier=classifier, selectors=[], type_arguments=None), MemberReference(member=GROKCLASSIFIER_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getXMLClassifier, postfix_operators=[], prefix_operators=[], qualifier=classifier, selectors=[], type_arguments=None), MemberReference(member=XMLCLASSIFIER_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getJsonClassifier, postfix_operators=[], prefix_operators=[], qualifier=classifier, selectors=[], type_arguments=None), MemberReference(member=JSONCLASSIFIER_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getCsvClassifier, postfix_operators=[], prefix_operators=[], qualifier=classifier, selectors=[], type_arguments=None), MemberReference(member=CSVCLASSIFIER_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[Classifier] identifier[classifier] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[classifier] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[classifier] operator[SEP] identifier[getGrokClassifier] operator[SEP] operator[SEP] , identifier[GROKCLASSIFIER_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[classifier] operator[SEP] identifier[getXMLClassifier] operator[SEP] operator[SEP] , identifier[XMLCLASSIFIER_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[classifier] operator[SEP] identifier[getJsonClassifier] operator[SEP] operator[SEP] , identifier[JSONCLASSIFIER_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[classifier] operator[SEP] identifier[getCsvClassifier] operator[SEP] operator[SEP] , identifier[CSVCLASSIFIER_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public void createImages() { image = UtilImageIO.loadImage(UtilIO.pathExample("standard/barbara.jpg")); gray = ConvertBufferedImage.convertFromSingle(image, null, GrayU8.class); derivX = GeneralizedImageOps.createSingleBand(GrayS16.class, gray.getWidth(), gray.getHeight()); derivY = GeneralizedImageOps.createSingleBand(GrayS16.class, gray.getWidth(), gray.getHeight()); GImageDerivativeOps.gradient(DerivativeType.SOBEL, gray, derivX, derivY, BorderType.EXTENDED); }
class class_name[name] begin[{] method[createImages, return_type[void], modifier[public], parameter[]] begin[{] assign[member[.image], call[UtilImageIO.loadImage, parameter[call[UtilIO.pathExample, parameter[literal["standard/barbara.jpg"]]]]]] assign[member[.gray], call[ConvertBufferedImage.convertFromSingle, parameter[member[.image], literal[null], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GrayU8, sub_type=None))]]] assign[member[.derivX], call[GeneralizedImageOps.createSingleBand, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GrayS16, sub_type=None)), call[gray.getWidth, parameter[]], call[gray.getHeight, parameter[]]]]] assign[member[.derivY], call[GeneralizedImageOps.createSingleBand, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GrayS16, sub_type=None)), call[gray.getWidth, parameter[]], call[gray.getHeight, parameter[]]]]] call[GImageDerivativeOps.gradient, parameter[member[DerivativeType.SOBEL], member[.gray], member[.derivX], member[.derivY], member[BorderType.EXTENDED]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[createImages] operator[SEP] operator[SEP] { identifier[image] operator[=] identifier[UtilImageIO] operator[SEP] identifier[loadImage] operator[SEP] identifier[UtilIO] operator[SEP] identifier[pathExample] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[gray] operator[=] identifier[ConvertBufferedImage] operator[SEP] identifier[convertFromSingle] operator[SEP] identifier[image] , Other[null] , identifier[GrayU8] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[derivX] operator[=] identifier[GeneralizedImageOps] operator[SEP] identifier[createSingleBand] operator[SEP] identifier[GrayS16] operator[SEP] Keyword[class] , identifier[gray] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] , identifier[gray] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[derivY] operator[=] identifier[GeneralizedImageOps] operator[SEP] identifier[createSingleBand] operator[SEP] identifier[GrayS16] operator[SEP] Keyword[class] , identifier[gray] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] , identifier[gray] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[GImageDerivativeOps] operator[SEP] identifier[gradient] operator[SEP] identifier[DerivativeType] operator[SEP] identifier[SOBEL] , identifier[gray] , identifier[derivX] , identifier[derivY] , identifier[BorderType] operator[SEP] identifier[EXTENDED] operator[SEP] operator[SEP] }
public synchronized boolean makeExclusiveDependency(int depStreamID, int exclusiveParentStreamID) { Node depNode = root.findNode(depStreamID); Node exclusiveParentNode = root.findNode(exclusiveParentStreamID); return makeExclusiveDependency(depNode, exclusiveParentNode); }
class class_name[name] begin[{] method[makeExclusiveDependency, return_type[type[boolean]], modifier[synchronized public], parameter[depStreamID, exclusiveParentStreamID]] begin[{] local_variable[type[Node], depNode] local_variable[type[Node], exclusiveParentNode] return[call[.makeExclusiveDependency, parameter[member[.depNode], member[.exclusiveParentNode]]]] end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[boolean] identifier[makeExclusiveDependency] operator[SEP] Keyword[int] identifier[depStreamID] , Keyword[int] identifier[exclusiveParentStreamID] operator[SEP] { identifier[Node] identifier[depNode] operator[=] identifier[root] operator[SEP] identifier[findNode] operator[SEP] identifier[depStreamID] operator[SEP] operator[SEP] identifier[Node] identifier[exclusiveParentNode] operator[=] identifier[root] operator[SEP] identifier[findNode] operator[SEP] identifier[exclusiveParentStreamID] operator[SEP] operator[SEP] Keyword[return] identifier[makeExclusiveDependency] operator[SEP] identifier[depNode] , identifier[exclusiveParentNode] operator[SEP] operator[SEP] }
public void setPatternMatrix(float a, float b, float c, float d, float e, float f) { setMatrix(a, b, c, d, e, f); }
class class_name[name] begin[{] method[setPatternMatrix, return_type[void], modifier[public], parameter[a, b, c, d, e, f]] begin[{] call[.setMatrix, parameter[member[.a], member[.b], member[.c], member[.d], member[.e], member[.f]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setPatternMatrix] operator[SEP] Keyword[float] identifier[a] , Keyword[float] identifier[b] , Keyword[float] identifier[c] , Keyword[float] identifier[d] , Keyword[float] identifier[e] , Keyword[float] identifier[f] operator[SEP] { identifier[setMatrix] operator[SEP] identifier[a] , identifier[b] , identifier[c] , identifier[d] , identifier[e] , identifier[f] operator[SEP] operator[SEP] }
public static PublicKey getValidatePublicKey(String certId) { X509Certificate cf = null; if (certMap.containsKey(certId)) { // 存在certId对应的证书对象 cf = certMap.get(certId); return cf.getPublicKey(); } else { // 不存在则重新Load证书文件目录 initValidateCertFromDir(); if (certMap.containsKey(certId)) { // 存在certId对应的证书对象 cf = certMap.get(certId); return cf.getPublicKey(); } else { LogUtil.writeErrorLog("缺少certId=[" + certId + "]对应的验签证书."); return null; } } }
class class_name[name] begin[{] method[getValidatePublicKey, return_type[type[PublicKey]], modifier[public static], parameter[certId]] begin[{] local_variable[type[X509Certificate], cf] if[call[certMap.containsKey, parameter[member[.certId]]]] begin[{] assign[member[.cf], call[certMap.get, parameter[member[.certId]]]] return[call[cf.getPublicKey, parameter[]]] else begin[{] call[.initValidateCertFromDir, parameter[]] if[call[certMap.containsKey, parameter[member[.certId]]]] begin[{] assign[member[.cf], call[certMap.get, parameter[member[.certId]]]] return[call[cf.getPublicKey, parameter[]]] else begin[{] call[LogUtil.writeErrorLog, parameter[binary_operation[binary_operation[literal["缺少certId=["], +, member[.certId]], +, literal["]对应的验签证书."]]]] return[literal[null]] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[PublicKey] identifier[getValidatePublicKey] operator[SEP] identifier[String] identifier[certId] operator[SEP] { identifier[X509Certificate] identifier[cf] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[certMap] operator[SEP] identifier[containsKey] operator[SEP] identifier[certId] operator[SEP] operator[SEP] { identifier[cf] operator[=] identifier[certMap] operator[SEP] identifier[get] operator[SEP] identifier[certId] operator[SEP] operator[SEP] Keyword[return] identifier[cf] operator[SEP] identifier[getPublicKey] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[initValidateCertFromDir] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[certMap] operator[SEP] identifier[containsKey] operator[SEP] identifier[certId] operator[SEP] operator[SEP] { identifier[cf] operator[=] identifier[certMap] operator[SEP] identifier[get] operator[SEP] identifier[certId] operator[SEP] operator[SEP] Keyword[return] identifier[cf] operator[SEP] identifier[getPublicKey] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[LogUtil] operator[SEP] identifier[writeErrorLog] operator[SEP] literal[String] operator[+] identifier[certId] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } } }
void setConfigValues(Configuration config) { this.config = config; numParasToCheck = config.getNumParasToCheck(); defaultParaCheck = numParasToCheck * PARA_CHECK_FACTOR; doResetCheck = config.isResetCheck(); }
class class_name[name] begin[{] method[setConfigValues, return_type[void], modifier[default], parameter[config]] begin[{] assign[THIS[member[None.config]], member[.config]] assign[member[.numParasToCheck], call[config.getNumParasToCheck, parameter[]]] assign[member[.defaultParaCheck], binary_operation[member[.numParasToCheck], *, member[.PARA_CHECK_FACTOR]]] assign[member[.doResetCheck], call[config.isResetCheck, parameter[]]] end[}] END[}]
Keyword[void] identifier[setConfigValues] operator[SEP] identifier[Configuration] identifier[config] operator[SEP] { Keyword[this] operator[SEP] identifier[config] operator[=] identifier[config] operator[SEP] identifier[numParasToCheck] operator[=] identifier[config] operator[SEP] identifier[getNumParasToCheck] operator[SEP] operator[SEP] operator[SEP] identifier[defaultParaCheck] operator[=] identifier[numParasToCheck] operator[*] identifier[PARA_CHECK_FACTOR] operator[SEP] identifier[doResetCheck] operator[=] identifier[config] operator[SEP] identifier[isResetCheck] operator[SEP] operator[SEP] operator[SEP] }
public void setTrailNameList(java.util.Collection<String> trailNameList) { if (trailNameList == null) { this.trailNameList = null; return; } this.trailNameList = new com.amazonaws.internal.SdkInternalList<String>(trailNameList); }
class class_name[name] begin[{] method[setTrailNameList, return_type[void], modifier[public], parameter[trailNameList]] begin[{] if[binary_operation[member[.trailNameList], ==, literal[null]]] begin[{] assign[THIS[member[None.trailNameList]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.trailNameList]], ClassCreator(arguments=[MemberReference(member=trailNameList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=amazonaws, sub_type=ReferenceType(arguments=None, dimensions=None, name=internal, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setTrailNameList] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[trailNameList] operator[SEP] { Keyword[if] operator[SEP] identifier[trailNameList] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[trailNameList] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[trailNameList] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[String] operator[>] operator[SEP] identifier[trailNameList] operator[SEP] operator[SEP] }
private void insertDefaultActiveServers() { listeFilmlistenUrls_akt.add(new DatenFilmlisteUrl("http://m.picn.de/f/Filmliste-akt.xz", DatenFilmlisteUrl.SERVER_ART_AKT)); listeFilmlistenUrls_akt.add(new DatenFilmlisteUrl("http://m1.picn.de/f/Filmliste-akt.xz", DatenFilmlisteUrl.SERVER_ART_AKT)); listeFilmlistenUrls_akt.add(new DatenFilmlisteUrl("http://m2.picn.de/f/Filmliste-akt.xz", DatenFilmlisteUrl.SERVER_ART_AKT)); listeFilmlistenUrls_akt.add(new DatenFilmlisteUrl("http://download10.onlinetvrecorder.com/mediathekview/Filmliste-akt.xz", DatenFilmlisteUrl.SERVER_ART_AKT)); listeFilmlistenUrls_akt.add(new DatenFilmlisteUrl("http://mediathekview.jankal.me/Filmliste-akt.xz", DatenFilmlisteUrl.SERVER_ART_AKT)); listeFilmlistenUrls_akt.add(new DatenFilmlisteUrl("http://verteiler1.mediathekview.de/Filmliste-akt.xz", DatenFilmlisteUrl.SERVER_ART_AKT)); listeFilmlistenUrls_akt.add(new DatenFilmlisteUrl("http://verteiler2.mediathekview.de/Filmliste-akt.xz", DatenFilmlisteUrl.SERVER_ART_AKT)); listeFilmlistenUrls_akt.add(new DatenFilmlisteUrl("http://verteiler3.mediathekview.de/Filmliste-akt.xz", DatenFilmlisteUrl.SERVER_ART_AKT)); }
class class_name[name] begin[{] method[insertDefaultActiveServers, return_type[void], modifier[private], parameter[]] begin[{] call[listeFilmlistenUrls_akt.add, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="http://m.picn.de/f/Filmliste-akt.xz"), MemberReference(member=SERVER_ART_AKT, postfix_operators=[], prefix_operators=[], qualifier=DatenFilmlisteUrl, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DatenFilmlisteUrl, sub_type=None))]] call[listeFilmlistenUrls_akt.add, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="http://m1.picn.de/f/Filmliste-akt.xz"), MemberReference(member=SERVER_ART_AKT, postfix_operators=[], prefix_operators=[], qualifier=DatenFilmlisteUrl, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DatenFilmlisteUrl, sub_type=None))]] call[listeFilmlistenUrls_akt.add, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="http://m2.picn.de/f/Filmliste-akt.xz"), MemberReference(member=SERVER_ART_AKT, postfix_operators=[], prefix_operators=[], qualifier=DatenFilmlisteUrl, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DatenFilmlisteUrl, sub_type=None))]] call[listeFilmlistenUrls_akt.add, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="http://download10.onlinetvrecorder.com/mediathekview/Filmliste-akt.xz"), MemberReference(member=SERVER_ART_AKT, postfix_operators=[], prefix_operators=[], qualifier=DatenFilmlisteUrl, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DatenFilmlisteUrl, sub_type=None))]] call[listeFilmlistenUrls_akt.add, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="http://mediathekview.jankal.me/Filmliste-akt.xz"), MemberReference(member=SERVER_ART_AKT, postfix_operators=[], prefix_operators=[], qualifier=DatenFilmlisteUrl, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DatenFilmlisteUrl, sub_type=None))]] call[listeFilmlistenUrls_akt.add, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="http://verteiler1.mediathekview.de/Filmliste-akt.xz"), MemberReference(member=SERVER_ART_AKT, postfix_operators=[], prefix_operators=[], qualifier=DatenFilmlisteUrl, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DatenFilmlisteUrl, sub_type=None))]] call[listeFilmlistenUrls_akt.add, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="http://verteiler2.mediathekview.de/Filmliste-akt.xz"), MemberReference(member=SERVER_ART_AKT, postfix_operators=[], prefix_operators=[], qualifier=DatenFilmlisteUrl, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DatenFilmlisteUrl, sub_type=None))]] call[listeFilmlistenUrls_akt.add, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="http://verteiler3.mediathekview.de/Filmliste-akt.xz"), MemberReference(member=SERVER_ART_AKT, postfix_operators=[], prefix_operators=[], qualifier=DatenFilmlisteUrl, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DatenFilmlisteUrl, sub_type=None))]] end[}] END[}]
Keyword[private] Keyword[void] identifier[insertDefaultActiveServers] operator[SEP] operator[SEP] { identifier[listeFilmlistenUrls_akt] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[DatenFilmlisteUrl] operator[SEP] literal[String] , identifier[DatenFilmlisteUrl] operator[SEP] identifier[SERVER_ART_AKT] operator[SEP] operator[SEP] operator[SEP] identifier[listeFilmlistenUrls_akt] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[DatenFilmlisteUrl] operator[SEP] literal[String] , identifier[DatenFilmlisteUrl] operator[SEP] identifier[SERVER_ART_AKT] operator[SEP] operator[SEP] operator[SEP] identifier[listeFilmlistenUrls_akt] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[DatenFilmlisteUrl] operator[SEP] literal[String] , identifier[DatenFilmlisteUrl] operator[SEP] identifier[SERVER_ART_AKT] operator[SEP] operator[SEP] operator[SEP] identifier[listeFilmlistenUrls_akt] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[DatenFilmlisteUrl] operator[SEP] literal[String] , identifier[DatenFilmlisteUrl] operator[SEP] identifier[SERVER_ART_AKT] operator[SEP] operator[SEP] operator[SEP] identifier[listeFilmlistenUrls_akt] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[DatenFilmlisteUrl] operator[SEP] literal[String] , identifier[DatenFilmlisteUrl] operator[SEP] identifier[SERVER_ART_AKT] operator[SEP] operator[SEP] operator[SEP] identifier[listeFilmlistenUrls_akt] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[DatenFilmlisteUrl] operator[SEP] literal[String] , identifier[DatenFilmlisteUrl] operator[SEP] identifier[SERVER_ART_AKT] operator[SEP] operator[SEP] operator[SEP] identifier[listeFilmlistenUrls_akt] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[DatenFilmlisteUrl] operator[SEP] literal[String] , identifier[DatenFilmlisteUrl] operator[SEP] identifier[SERVER_ART_AKT] operator[SEP] operator[SEP] operator[SEP] identifier[listeFilmlistenUrls_akt] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[DatenFilmlisteUrl] operator[SEP] literal[String] , identifier[DatenFilmlisteUrl] operator[SEP] identifier[SERVER_ART_AKT] operator[SEP] operator[SEP] operator[SEP] }
@Override public void notifyOfUserRegistryChange() { super.notifyOfUserRegistryChange(); for (AuthzInfo authzInfo : resourceToAuthzInfoMap.values()) { authzInfo.authzTableContainer = new AuthzTableContainer(authzInfo.authzTableContainer.resourceName); } }
class class_name[name] begin[{] method[notifyOfUserRegistryChange, return_type[void], modifier[public], parameter[]] begin[{] SuperMethodInvocation(arguments=[], member=notifyOfUserRegistryChange, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=authzTableContainer, postfix_operators=[], prefix_operators=[], qualifier=authzInfo, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=resourceName, postfix_operators=[], prefix_operators=[], qualifier=authzInfo.authzTableContainer, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AuthzTableContainer, sub_type=None))), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=resourceToAuthzInfoMap, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=authzInfo)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AuthzInfo, sub_type=None))), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[notifyOfUserRegistryChange] operator[SEP] operator[SEP] { Keyword[super] operator[SEP] identifier[notifyOfUserRegistryChange] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[AuthzInfo] identifier[authzInfo] operator[:] identifier[resourceToAuthzInfoMap] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { identifier[authzInfo] operator[SEP] identifier[authzTableContainer] operator[=] Keyword[new] identifier[AuthzTableContainer] operator[SEP] identifier[authzInfo] operator[SEP] identifier[authzTableContainer] operator[SEP] identifier[resourceName] operator[SEP] operator[SEP] } }
public static void process_array(CodeEmitter e, Type type, ProcessArrayCallback callback) { Type componentType = TypeUtils.getComponentType(type); Local array = e.make_local(); Local loopvar = e.make_local(Type.INT_TYPE); Label loopbody = e.make_label(); Label checkloop = e.make_label(); e.store_local(array); e.push(0); e.store_local(loopvar); e.goTo(checkloop); e.mark(loopbody); e.load_local(array); e.load_local(loopvar); e.array_load(componentType); callback.processElement(componentType); e.iinc(loopvar, 1); e.mark(checkloop); e.load_local(loopvar); e.load_local(array); e.arraylength(); e.if_icmp(e.LT, loopbody); }
class class_name[name] begin[{] method[process_array, return_type[void], modifier[public static], parameter[e, type, callback]] begin[{] local_variable[type[Type], componentType] local_variable[type[Local], array] local_variable[type[Local], loopvar] local_variable[type[Label], loopbody] local_variable[type[Label], checkloop] call[e.store_local, parameter[member[.array]]] call[e.push, parameter[literal[0]]] call[e.store_local, parameter[member[.loopvar]]] call[e.goTo, parameter[member[.checkloop]]] call[e.mark, parameter[member[.loopbody]]] call[e.load_local, parameter[member[.array]]] call[e.load_local, parameter[member[.loopvar]]] call[e.array_load, parameter[member[.componentType]]] call[callback.processElement, parameter[member[.componentType]]] call[e.iinc, parameter[member[.loopvar], literal[1]]] call[e.mark, parameter[member[.checkloop]]] call[e.load_local, parameter[member[.loopvar]]] call[e.load_local, parameter[member[.array]]] call[e.arraylength, parameter[]] call[e.if_icmp, parameter[member[e.LT], member[.loopbody]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[process_array] operator[SEP] identifier[CodeEmitter] identifier[e] , identifier[Type] identifier[type] , identifier[ProcessArrayCallback] identifier[callback] operator[SEP] { identifier[Type] identifier[componentType] operator[=] identifier[TypeUtils] operator[SEP] identifier[getComponentType] operator[SEP] identifier[type] operator[SEP] operator[SEP] identifier[Local] identifier[array] operator[=] identifier[e] operator[SEP] identifier[make_local] operator[SEP] operator[SEP] operator[SEP] identifier[Local] identifier[loopvar] operator[=] identifier[e] operator[SEP] identifier[make_local] operator[SEP] identifier[Type] operator[SEP] identifier[INT_TYPE] operator[SEP] operator[SEP] identifier[Label] identifier[loopbody] operator[=] identifier[e] operator[SEP] identifier[make_label] operator[SEP] operator[SEP] operator[SEP] identifier[Label] identifier[checkloop] operator[=] identifier[e] operator[SEP] identifier[make_label] operator[SEP] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[store_local] operator[SEP] identifier[array] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[push] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[store_local] operator[SEP] identifier[loopvar] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[goTo] operator[SEP] identifier[checkloop] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[mark] operator[SEP] identifier[loopbody] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[load_local] operator[SEP] identifier[array] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[load_local] operator[SEP] identifier[loopvar] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[array_load] operator[SEP] identifier[componentType] operator[SEP] operator[SEP] identifier[callback] operator[SEP] identifier[processElement] operator[SEP] identifier[componentType] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[iinc] operator[SEP] identifier[loopvar] , Other[1] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[mark] operator[SEP] identifier[checkloop] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[load_local] operator[SEP] identifier[loopvar] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[load_local] operator[SEP] identifier[array] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[arraylength] operator[SEP] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[if_icmp] operator[SEP] identifier[e] operator[SEP] identifier[LT] , identifier[loopbody] operator[SEP] operator[SEP] }
public Observable<Page<RedisResourceInner>> listNextAsync(final String nextPageLink) { return listNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<RedisResourceInner>>, Page<RedisResourceInner>>() { @Override public Page<RedisResourceInner> call(ServiceResponse<Page<RedisResourceInner>> response) { return response.body(); } }); }
class class_name[name] begin[{] method[listNextAsync, return_type[type[Observable]], modifier[public], parameter[nextPageLink]] begin[{] return[call[.listNextWithServiceResponseAsync, parameter[member[.nextPageLink]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[RedisResourceInner] operator[>] operator[>] identifier[listNextAsync] operator[SEP] Keyword[final] identifier[String] identifier[nextPageLink] operator[SEP] { Keyword[return] identifier[listNextWithServiceResponseAsync] operator[SEP] identifier[nextPageLink] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[RedisResourceInner] operator[>] operator[>] , identifier[Page] operator[<] identifier[RedisResourceInner] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Page] operator[<] identifier[RedisResourceInner] operator[>] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[RedisResourceInner] operator[>] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
@Override public Message newMessage(final Object message) { final ReusableObjectMessage result = getObject(); result.set(message); return result; }
class class_name[name] begin[{] method[newMessage, return_type[type[Message]], modifier[public], parameter[message]] begin[{] local_variable[type[ReusableObjectMessage], result] call[result.set, parameter[member[.message]]] return[member[.result]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Message] identifier[newMessage] operator[SEP] Keyword[final] identifier[Object] identifier[message] operator[SEP] { Keyword[final] identifier[ReusableObjectMessage] identifier[result] operator[=] identifier[getObject] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[set] operator[SEP] identifier[message] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
@NonNull public IconicsDrawable roundedCornersRyDp(@Dimension(unit = DP) int sizeDp) { return roundedCornersRyPx(Utils.convertDpToPx(mContext, sizeDp)); }
class class_name[name] begin[{] method[roundedCornersRyDp, return_type[type[IconicsDrawable]], modifier[public], parameter[sizeDp]] begin[{] return[call[.roundedCornersRyPx, parameter[call[Utils.convertDpToPx, parameter[member[.mContext], member[.sizeDp]]]]]] end[}] END[}]
annotation[@] identifier[NonNull] Keyword[public] identifier[IconicsDrawable] identifier[roundedCornersRyDp] operator[SEP] annotation[@] identifier[Dimension] operator[SEP] identifier[unit] operator[=] identifier[DP] operator[SEP] Keyword[int] identifier[sizeDp] operator[SEP] { Keyword[return] identifier[roundedCornersRyPx] operator[SEP] identifier[Utils] operator[SEP] identifier[convertDpToPx] operator[SEP] identifier[mContext] , identifier[sizeDp] operator[SEP] operator[SEP] operator[SEP] }
public static BigDecimal round(BigDecimal number, int scale, RoundingMode roundingMode) { if (null == number) { number = BigDecimal.ZERO; } if (scale < 0) { scale = 0; } if (null == roundingMode) { roundingMode = RoundingMode.HALF_UP; } return number.setScale(scale, roundingMode); }
class class_name[name] begin[{] method[round, return_type[type[BigDecimal]], modifier[public static], parameter[number, scale, roundingMode]] begin[{] if[binary_operation[literal[null], ==, member[.number]]] begin[{] assign[member[.number], member[BigDecimal.ZERO]] else begin[{] None end[}] if[binary_operation[member[.scale], <, literal[0]]] begin[{] assign[member[.scale], literal[0]] else begin[{] None end[}] if[binary_operation[literal[null], ==, member[.roundingMode]]] begin[{] assign[member[.roundingMode], member[RoundingMode.HALF_UP]] else begin[{] None end[}] return[call[number.setScale, parameter[member[.scale], member[.roundingMode]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[BigDecimal] identifier[round] operator[SEP] identifier[BigDecimal] identifier[number] , Keyword[int] identifier[scale] , identifier[RoundingMode] identifier[roundingMode] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[number] operator[SEP] { identifier[number] operator[=] identifier[BigDecimal] operator[SEP] identifier[ZERO] operator[SEP] } Keyword[if] operator[SEP] identifier[scale] operator[<] Other[0] operator[SEP] { identifier[scale] operator[=] Other[0] operator[SEP] } Keyword[if] operator[SEP] Other[null] operator[==] identifier[roundingMode] operator[SEP] { identifier[roundingMode] operator[=] identifier[RoundingMode] operator[SEP] identifier[HALF_UP] operator[SEP] } Keyword[return] identifier[number] operator[SEP] identifier[setScale] operator[SEP] identifier[scale] , identifier[roundingMode] operator[SEP] operator[SEP] }
public JobTargetGroupInner get(String resourceGroupName, String serverName, String jobAgentName, String targetGroupName) { return getWithServiceResponseAsync(resourceGroupName, serverName, jobAgentName, targetGroupName).toBlocking().single().body(); }
class class_name[name] begin[{] method[get, return_type[type[JobTargetGroupInner]], modifier[public], parameter[resourceGroupName, serverName, jobAgentName, targetGroupName]] begin[{] return[call[.getWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.serverName], member[.jobAgentName], member[.targetGroupName]]]] end[}] END[}]
Keyword[public] identifier[JobTargetGroupInner] identifier[get] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[serverName] , identifier[String] identifier[jobAgentName] , identifier[String] identifier[targetGroupName] operator[SEP] { Keyword[return] identifier[getWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[serverName] , identifier[jobAgentName] , identifier[targetGroupName] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[single] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] }
public static MutableDoubleTuple normalizeElements( DoubleTuple t, DoubleTuple min, DoubleTuple max, MutableDoubleTuple result) { result = validate(t, result); for (int i=0; i<result.getSize(); i++) { double value = t.get(i); double minValue = min.get(i); double maxValue = max.get(i); double alpha = (value - minValue) / (maxValue - minValue); double newValue = alpha; result.set(i, newValue); } return result; }
class class_name[name] begin[{] method[normalizeElements, return_type[type[MutableDoubleTuple]], modifier[public static], parameter[t, min, max, result]] begin[{] assign[member[.result], call[.validate, parameter[member[.t], member[.result]]]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=BasicType(dimensions=[], name=double)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=min, selectors=[], type_arguments=None), name=minValue)], modifiers=set(), type=BasicType(dimensions=[], name=double)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=max, selectors=[], type_arguments=None), name=maxValue)], modifiers=set(), type=BasicType(dimensions=[], name=double)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=minValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operandr=BinaryOperation(operandl=MemberReference(member=maxValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=minValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operator=/), name=alpha)], modifiers=set(), type=BasicType(dimensions=[], name=double)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=alpha, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=newValue)], modifiers=set(), type=BasicType(dimensions=[], name=double)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=newValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=set, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getSize, postfix_operators=[], prefix_operators=[], qualifier=result, 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) return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] identifier[MutableDoubleTuple] identifier[normalizeElements] operator[SEP] identifier[DoubleTuple] identifier[t] , identifier[DoubleTuple] identifier[min] , identifier[DoubleTuple] identifier[max] , identifier[MutableDoubleTuple] identifier[result] operator[SEP] { identifier[result] operator[=] identifier[validate] operator[SEP] identifier[t] , identifier[result] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[result] operator[SEP] identifier[getSize] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[double] identifier[value] operator[=] identifier[t] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[double] identifier[minValue] operator[=] identifier[min] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[double] identifier[maxValue] operator[=] identifier[max] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[double] identifier[alpha] operator[=] operator[SEP] identifier[value] operator[-] identifier[minValue] operator[SEP] operator[/] operator[SEP] identifier[maxValue] operator[-] identifier[minValue] operator[SEP] operator[SEP] Keyword[double] identifier[newValue] operator[=] identifier[alpha] operator[SEP] identifier[result] operator[SEP] identifier[set] operator[SEP] identifier[i] , identifier[newValue] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
private void createNodePaths() { TreeTraverser<OWLClassContainer> traverser = new TreeTraverser<OWLClassContainer>() { @Override public Iterable<OWLClassContainer> children(OWLClassContainer container) { int count = 0; List<OWLClassContainer> containers = new ArrayList<>(); for (OWLClass childClass : loader.getChildClass(container.getOwlClass())) { containers.add( new OWLClassContainer( childClass, constructNodePath(container.getNodePath(), count), false)); count++; } return containers; } }; OWLClass pseudoRootClass = loader.createClass(PSEUDO_ROOT_CLASS_LABEL, loader.getRootClasses()); for (OWLClassContainer container : traverser.preOrderTraversal( new OWLClassContainer(pseudoRootClass, PSEUDO_ROOT_CLASS_NODEPATH, true))) { OWLClass ontologyTerm = container.getOwlClass(); String ontologyTermNodePath = container.getNodePath(); String ontologyTermIRI = ontologyTerm.getIRI().toString(); OntologyTermNodePath nodePathEntity = createNodePathEntity(container, ontologyTermNodePath); nodePathsPerOntologyTerm.put(ontologyTermIRI, nodePathEntity); } }
class class_name[name] begin[{] method[createNodePaths, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[TreeTraverser], traverser] local_variable[type[OWLClass], pseudoRootClass] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getOwlClass, postfix_operators=[], prefix_operators=[], qualifier=container, selectors=[], type_arguments=None), name=ontologyTerm)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=OWLClass, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getNodePath, postfix_operators=[], prefix_operators=[], qualifier=container, selectors=[], type_arguments=None), name=ontologyTermNodePath)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getIRI, postfix_operators=[], prefix_operators=[], qualifier=ontologyTerm, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=ontologyTermIRI)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=container, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ontologyTermNodePath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createNodePathEntity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=nodePathEntity)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=OntologyTermNodePath, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ontologyTermIRI, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=nodePathEntity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=nodePathsPerOntologyTerm, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=pseudoRootClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=PSEUDO_ROOT_CLASS_NODEPATH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OWLClassContainer, sub_type=None))], member=preOrderTraversal, postfix_operators=[], prefix_operators=[], qualifier=traverser, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=container)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=OWLClassContainer, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[createNodePaths] operator[SEP] operator[SEP] { identifier[TreeTraverser] operator[<] identifier[OWLClassContainer] operator[>] identifier[traverser] operator[=] Keyword[new] identifier[TreeTraverser] operator[<] identifier[OWLClassContainer] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Iterable] operator[<] identifier[OWLClassContainer] operator[>] identifier[children] operator[SEP] identifier[OWLClassContainer] identifier[container] operator[SEP] { Keyword[int] identifier[count] operator[=] Other[0] operator[SEP] identifier[List] operator[<] identifier[OWLClassContainer] operator[>] identifier[containers] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[OWLClass] identifier[childClass] operator[:] identifier[loader] operator[SEP] identifier[getChildClass] operator[SEP] identifier[container] operator[SEP] identifier[getOwlClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[containers] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[OWLClassContainer] operator[SEP] identifier[childClass] , identifier[constructNodePath] operator[SEP] identifier[container] operator[SEP] identifier[getNodePath] operator[SEP] operator[SEP] , identifier[count] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] identifier[count] operator[++] operator[SEP] } Keyword[return] identifier[containers] operator[SEP] } } operator[SEP] identifier[OWLClass] identifier[pseudoRootClass] operator[=] identifier[loader] operator[SEP] identifier[createClass] operator[SEP] identifier[PSEUDO_ROOT_CLASS_LABEL] , identifier[loader] operator[SEP] identifier[getRootClasses] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[OWLClassContainer] identifier[container] operator[:] identifier[traverser] operator[SEP] identifier[preOrderTraversal] operator[SEP] Keyword[new] identifier[OWLClassContainer] operator[SEP] identifier[pseudoRootClass] , identifier[PSEUDO_ROOT_CLASS_NODEPATH] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] { identifier[OWLClass] identifier[ontologyTerm] operator[=] identifier[container] operator[SEP] identifier[getOwlClass] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[ontologyTermNodePath] operator[=] identifier[container] operator[SEP] identifier[getNodePath] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[ontologyTermIRI] operator[=] identifier[ontologyTerm] operator[SEP] identifier[getIRI] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[OntologyTermNodePath] identifier[nodePathEntity] operator[=] identifier[createNodePathEntity] operator[SEP] identifier[container] , identifier[ontologyTermNodePath] operator[SEP] operator[SEP] identifier[nodePathsPerOntologyTerm] operator[SEP] identifier[put] operator[SEP] identifier[ontologyTermIRI] , identifier[nodePathEntity] operator[SEP] operator[SEP] } }
@Override public void handle(CommandContext ctx, String commandLine) { if (commandLine.contains("--help")) { this.printHelp(commandLine, ctx); return; } String[] commands = commandLine.split(" "); if (commands.length == 1) { this.printHistory(ctx); } else if (commands.length == 2) { String argument = commands[1]; if ("clear".equals(argument)) { ctx.getHistory().clear(); } else if ("enable".equals(argument)) { ctx.getHistory().setUseHistory(true); } else if ("disable".equals(argument)) { ctx.getHistory().setUseHistory(false); } else { ctx.printLine("Invalid command."); } } else { ctx.printLine("Invalid command."); } }
class class_name[name] begin[{] method[handle, return_type[void], modifier[public], parameter[ctx, commandLine]] begin[{] if[call[commandLine.contains, parameter[literal["--help"]]]] begin[{] THIS[call[None.printHelp, parameter[member[.commandLine], member[.ctx]]]] return[None] else begin[{] None end[}] local_variable[type[String], commands] if[binary_operation[member[commands.length], ==, literal[1]]] begin[{] THIS[call[None.printHistory, parameter[member[.ctx]]]] else begin[{] if[binary_operation[member[commands.length], ==, literal[2]]] begin[{] local_variable[type[String], argument] if[literal["clear"]] begin[{] call[ctx.getHistory, parameter[]] else begin[{] if[literal["enable"]] begin[{] call[ctx.getHistory, parameter[]] else begin[{] if[literal["disable"]] begin[{] call[ctx.getHistory, parameter[]] else begin[{] call[ctx.printLine, parameter[literal["Invalid command."]]] end[}] end[}] end[}] else begin[{] call[ctx.printLine, parameter[literal["Invalid command."]]] end[}] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[handle] operator[SEP] identifier[CommandContext] identifier[ctx] , identifier[String] identifier[commandLine] operator[SEP] { Keyword[if] operator[SEP] identifier[commandLine] operator[SEP] identifier[contains] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[printHelp] operator[SEP] identifier[commandLine] , identifier[ctx] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[String] operator[SEP] operator[SEP] identifier[commands] operator[=] identifier[commandLine] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[commands] operator[SEP] identifier[length] operator[==] Other[1] operator[SEP] { Keyword[this] operator[SEP] identifier[printHistory] operator[SEP] identifier[ctx] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[commands] operator[SEP] identifier[length] operator[==] Other[2] operator[SEP] { identifier[String] identifier[argument] operator[=] identifier[commands] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[argument] operator[SEP] operator[SEP] { identifier[ctx] operator[SEP] identifier[getHistory] operator[SEP] operator[SEP] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[argument] operator[SEP] operator[SEP] { identifier[ctx] operator[SEP] identifier[getHistory] operator[SEP] operator[SEP] operator[SEP] identifier[setUseHistory] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[argument] operator[SEP] operator[SEP] { identifier[ctx] operator[SEP] identifier[getHistory] operator[SEP] operator[SEP] operator[SEP] identifier[setUseHistory] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } Keyword[else] { identifier[ctx] operator[SEP] identifier[printLine] operator[SEP] literal[String] operator[SEP] operator[SEP] } } Keyword[else] { identifier[ctx] operator[SEP] identifier[printLine] operator[SEP] literal[String] operator[SEP] operator[SEP] } }
private void rehash(int newCapacity) { long[] oldKeys = keys; V[] oldVals = values; keys = new long[newCapacity]; @SuppressWarnings({ "unchecked", "SuspiciousArrayCast" }) V[] temp = (V[]) new Object[newCapacity]; values = temp; maxSize = calcMaxSize(newCapacity); mask = newCapacity - 1; // Insert to the new arrays. for (int i = 0; i < oldVals.length; ++i) { V oldVal = oldVals[i]; if (oldVal != null) { // Inlined put(), but much simpler: we don't need to worry about // duplicated keys, growing/rehashing, or failing to insert. long oldKey = oldKeys[i]; int index = hashIndex(oldKey); for (;;) { if (values[index] == null) { keys[index] = oldKey; values[index] = oldVal; break; } // Conflict, keep probing. Can wrap around, but never reaches startIndex again. index = probeNext(index); } } } }
class class_name[name] begin[{] method[rehash, return_type[void], modifier[private], parameter[newCapacity]] begin[{] local_variable[type[long], oldKeys] local_variable[type[V], oldVals] assign[member[.keys], ArrayCreator(dimensions=[MemberReference(member=newCapacity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=long))] local_variable[type[V], temp] assign[member[.values], member[.temp]] assign[member[.maxSize], call[.calcMaxSize, parameter[member[.newCapacity]]]] assign[member[.mask], binary_operation[member[.newCapacity], -, literal[1]]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=oldVals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=oldVal)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=oldVal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=oldKeys, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=oldKey)], modifiers=set(), type=BasicType(dimensions=[], name=long)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=oldKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=hashIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=index)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=index, 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=keys, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=oldKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=oldVal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), BreakStatement(goto=None, label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=probeNext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=None, init=None, update=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=oldVals, 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) end[}] END[}]
Keyword[private] Keyword[void] identifier[rehash] operator[SEP] Keyword[int] identifier[newCapacity] operator[SEP] { Keyword[long] operator[SEP] operator[SEP] identifier[oldKeys] operator[=] identifier[keys] operator[SEP] identifier[V] operator[SEP] operator[SEP] identifier[oldVals] operator[=] identifier[values] operator[SEP] identifier[keys] operator[=] Keyword[new] Keyword[long] operator[SEP] identifier[newCapacity] operator[SEP] operator[SEP] annotation[@] identifier[SuppressWarnings] operator[SEP] { literal[String] , literal[String] } operator[SEP] identifier[V] operator[SEP] operator[SEP] identifier[temp] operator[=] operator[SEP] identifier[V] operator[SEP] operator[SEP] operator[SEP] Keyword[new] identifier[Object] operator[SEP] identifier[newCapacity] operator[SEP] operator[SEP] identifier[values] operator[=] identifier[temp] operator[SEP] identifier[maxSize] operator[=] identifier[calcMaxSize] operator[SEP] identifier[newCapacity] operator[SEP] operator[SEP] identifier[mask] operator[=] identifier[newCapacity] operator[-] Other[1] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[oldVals] operator[SEP] identifier[length] operator[SEP] operator[++] identifier[i] operator[SEP] { identifier[V] identifier[oldVal] operator[=] identifier[oldVals] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[oldVal] operator[!=] Other[null] operator[SEP] { Keyword[long] identifier[oldKey] operator[=] identifier[oldKeys] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[int] identifier[index] operator[=] identifier[hashIndex] operator[SEP] identifier[oldKey] operator[SEP] operator[SEP] Keyword[for] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[values] operator[SEP] identifier[index] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[keys] operator[SEP] identifier[index] operator[SEP] operator[=] identifier[oldKey] operator[SEP] identifier[values] operator[SEP] identifier[index] operator[SEP] operator[=] identifier[oldVal] operator[SEP] Keyword[break] operator[SEP] } identifier[index] operator[=] identifier[probeNext] operator[SEP] identifier[index] operator[SEP] operator[SEP] } } } }
public void setElementRef(String newElementRef) { String oldElementRef = elementRef; elementRef = newElementRef; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, BpsimPackage.ELEMENT_PARAMETERS__ELEMENT_REF, oldElementRef, elementRef)); }
class class_name[name] begin[{] method[setElementRef, return_type[void], modifier[public], parameter[newElementRef]] begin[{] local_variable[type[String], oldElementRef] assign[member[.elementRef], member[.newElementRef]] if[call[.eNotificationRequired, parameter[]]] begin[{] call[.eNotify, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=SET, postfix_operators=[], prefix_operators=[], qualifier=Notification, selectors=[]), MemberReference(member=ELEMENT_PARAMETERS__ELEMENT_REF, postfix_operators=[], prefix_operators=[], qualifier=BpsimPackage, selectors=[]), MemberReference(member=oldElementRef, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=elementRef, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ENotificationImpl, sub_type=None))]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setElementRef] operator[SEP] identifier[String] identifier[newElementRef] operator[SEP] { identifier[String] identifier[oldElementRef] operator[=] identifier[elementRef] operator[SEP] identifier[elementRef] operator[=] identifier[newElementRef] operator[SEP] Keyword[if] operator[SEP] identifier[eNotificationRequired] operator[SEP] operator[SEP] operator[SEP] identifier[eNotify] operator[SEP] Keyword[new] identifier[ENotificationImpl] operator[SEP] Keyword[this] , identifier[Notification] operator[SEP] identifier[SET] , identifier[BpsimPackage] operator[SEP] identifier[ELEMENT_PARAMETERS__ELEMENT_REF] , identifier[oldElementRef] , identifier[elementRef] operator[SEP] operator[SEP] operator[SEP] }
public static <T> List<T> singletonList(T element) { if (element == null) { return Collections.emptyList(); } return Collections.singletonList(element); }
class class_name[name] begin[{] method[singletonList, return_type[type[List]], modifier[public static], parameter[element]] begin[{] if[binary_operation[member[.element], ==, literal[null]]] begin[{] return[call[Collections.emptyList, parameter[]]] else begin[{] None end[}] return[call[Collections.singletonList, parameter[member[.element]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[singletonList] operator[SEP] identifier[T] identifier[element] operator[SEP] { Keyword[if] operator[SEP] identifier[element] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[Collections] operator[SEP] identifier[emptyList] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[Collections] operator[SEP] identifier[singletonList] operator[SEP] identifier[element] operator[SEP] operator[SEP] }
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "TopoSurface") public JAXBElement<TopoSurfaceType> createTopoSurface(TopoSurfaceType value) { return new JAXBElement<TopoSurfaceType>(_TopoSurface_QNAME, TopoSurfaceType.class, null, value); }
class class_name[name] begin[{] method[createTopoSurface, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=_TopoSurface_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TopoSurfaceType, 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=TopoSurfaceType, 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[TopoSurfaceType] operator[>] identifier[createTopoSurface] operator[SEP] identifier[TopoSurfaceType] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[TopoSurfaceType] operator[>] operator[SEP] identifier[_TopoSurface_QNAME] , identifier[TopoSurfaceType] operator[SEP] Keyword[class] , Other[null] , identifier[value] operator[SEP] operator[SEP] }
@Override public void set(final PreparedStatement st, final int index, final Boolean value, final int dbSqlType) throws SQLException { st.setBoolean(index, value.booleanValue()); }
class class_name[name] begin[{] method[set, return_type[void], modifier[public], parameter[st, index, value, dbSqlType]] begin[{] call[st.setBoolean, parameter[member[.index], call[value.booleanValue, parameter[]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[set] operator[SEP] Keyword[final] identifier[PreparedStatement] identifier[st] , Keyword[final] Keyword[int] identifier[index] , Keyword[final] identifier[Boolean] identifier[value] , Keyword[final] Keyword[int] identifier[dbSqlType] operator[SEP] Keyword[throws] identifier[SQLException] { identifier[st] operator[SEP] identifier[setBoolean] operator[SEP] identifier[index] , identifier[value] operator[SEP] identifier[booleanValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public Configuration create(InputStream stream) { try { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setValidating(false); factory.setIgnoringElementContentWhitespace(true); factory.setNamespaceAware(true); DocumentBuilder documentBuilder = factory.newDocumentBuilder(); Document document = documentBuilder.parse(stream); return domConfigurationFactory.create(document); } catch (ParserConfigurationException e) { throw new TextProcessorFactoryException(e); } catch (IOException e) { throw new TextProcessorFactoryException(e); } catch (SAXException e) { throw new TextProcessorFactoryException(e); } }
class class_name[name] begin[{] method[create, return_type[type[Configuration]], modifier[public], parameter[stream]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=DocumentBuilderFactory, selectors=[], type_arguments=None), name=factory)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DocumentBuilderFactory, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=setValidating, postfix_operators=[], prefix_operators=[], qualifier=factory, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setIgnoringElementContentWhitespace, postfix_operators=[], prefix_operators=[], qualifier=factory, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setNamespaceAware, postfix_operators=[], prefix_operators=[], qualifier=factory, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=newDocumentBuilder, postfix_operators=[], prefix_operators=[], qualifier=factory, selectors=[], type_arguments=None), name=documentBuilder)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DocumentBuilder, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=stream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parse, postfix_operators=[], prefix_operators=[], qualifier=documentBuilder, selectors=[], type_arguments=None), name=document)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Document, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=document, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=create, postfix_operators=[], prefix_operators=[], qualifier=domConfigurationFactory, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TextProcessorFactoryException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ParserConfigurationException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TextProcessorFactoryException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TextProcessorFactoryException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SAXException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] identifier[Configuration] identifier[create] operator[SEP] identifier[InputStream] identifier[stream] operator[SEP] { Keyword[try] { identifier[DocumentBuilderFactory] identifier[factory] operator[=] identifier[DocumentBuilderFactory] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] identifier[factory] operator[SEP] identifier[setValidating] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[factory] operator[SEP] identifier[setIgnoringElementContentWhitespace] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[factory] operator[SEP] identifier[setNamespaceAware] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[DocumentBuilder] identifier[documentBuilder] operator[=] identifier[factory] operator[SEP] identifier[newDocumentBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[Document] identifier[document] operator[=] identifier[documentBuilder] operator[SEP] identifier[parse] operator[SEP] identifier[stream] operator[SEP] operator[SEP] Keyword[return] identifier[domConfigurationFactory] operator[SEP] identifier[create] operator[SEP] identifier[document] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ParserConfigurationException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[TextProcessorFactoryException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[TextProcessorFactoryException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SAXException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[TextProcessorFactoryException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
@Action(semantics = SemanticsOf.SAFE) public List<ApplicationTenancy> findMatching(final String search) { if (search != null && search.length() > 0) { return findByNameOrPathMatching(search); } return Lists.newArrayList(); }
class class_name[name] begin[{] method[findMatching, return_type[type[List]], modifier[public], parameter[search]] begin[{] if[binary_operation[binary_operation[member[.search], !=, literal[null]], &&, binary_operation[call[search.length, parameter[]], >, literal[0]]]] begin[{] return[call[.findByNameOrPathMatching, parameter[member[.search]]]] else begin[{] None end[}] return[call[Lists.newArrayList, parameter[]]] end[}] END[}]
annotation[@] identifier[Action] operator[SEP] identifier[semantics] operator[=] identifier[SemanticsOf] operator[SEP] identifier[SAFE] operator[SEP] Keyword[public] identifier[List] operator[<] identifier[ApplicationTenancy] operator[>] identifier[findMatching] operator[SEP] Keyword[final] identifier[String] identifier[search] operator[SEP] { Keyword[if] operator[SEP] identifier[search] operator[!=] Other[null] operator[&&] identifier[search] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { Keyword[return] identifier[findByNameOrPathMatching] operator[SEP] identifier[search] operator[SEP] operator[SEP] } Keyword[return] identifier[Lists] operator[SEP] identifier[newArrayList] operator[SEP] operator[SEP] operator[SEP] }
public void setupSFields() { this.getRecord(ClassInfoScreenRecord.CLASS_INFO_SCREEN_RECORD_FILE).getField(ClassInfoScreenRecord.CLASS_PROJECT_ID).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(ClassInfoScreenRecord.CLASS_INFO_SCREEN_RECORD_FILE).getField(ClassInfoScreenRecord.NAME).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); this.getRecord(ClassInfoScreenRecord.CLASS_INFO_SCREEN_RECORD_FILE).getField(ClassInfoScreenRecord.PACKAGE).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); }
class class_name[name] begin[{] method[setupSFields, return_type[void], modifier[public], parameter[]] begin[{] THIS[call[None.getRecord, parameter[member[ClassInfoScreenRecord.CLASS_INFO_SCREEN_RECORD_FILE]]]call[None.getField, parameter[member[ClassInfoScreenRecord.CLASS_PROJECT_ID]]]call[None.setupDefaultView, parameter[THIS[call[None.getNextLocation, parameter[member[ScreenConstants.NEXT_LOGICAL], member[ScreenConstants.ANCHOR_DEFAULT]]]], THIS[], member[ScreenConstants.DEFAULT_DISPLAY]]]] THIS[call[None.getRecord, parameter[member[ClassInfoScreenRecord.CLASS_INFO_SCREEN_RECORD_FILE]]]call[None.getField, parameter[member[ClassInfoScreenRecord.NAME]]]call[None.setupDefaultView, parameter[THIS[call[None.getNextLocation, parameter[member[ScreenConstants.NEXT_LOGICAL], member[ScreenConstants.ANCHOR_DEFAULT]]]], THIS[], member[ScreenConstants.DEFAULT_DISPLAY]]]] THIS[call[None.getRecord, parameter[member[ClassInfoScreenRecord.CLASS_INFO_SCREEN_RECORD_FILE]]]call[None.getField, parameter[member[ClassInfoScreenRecord.PACKAGE]]]call[None.setupDefaultView, parameter[THIS[call[None.getNextLocation, parameter[member[ScreenConstants.NEXT_LOGICAL], member[ScreenConstants.ANCHOR_DEFAULT]]]], THIS[], member[ScreenConstants.DEFAULT_DISPLAY]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setupSFields] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[getRecord] operator[SEP] identifier[ClassInfoScreenRecord] operator[SEP] identifier[CLASS_INFO_SCREEN_RECORD_FILE] operator[SEP] operator[SEP] identifier[getField] operator[SEP] identifier[ClassInfoScreenRecord] operator[SEP] identifier[CLASS_PROJECT_ID] operator[SEP] operator[SEP] identifier[setupDefaultView] operator[SEP] Keyword[this] operator[SEP] identifier[getNextLocation] operator[SEP] identifier[ScreenConstants] operator[SEP] identifier[NEXT_LOGICAL] , identifier[ScreenConstants] operator[SEP] identifier[ANCHOR_DEFAULT] operator[SEP] , Keyword[this] , identifier[ScreenConstants] operator[SEP] identifier[DEFAULT_DISPLAY] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[getRecord] operator[SEP] identifier[ClassInfoScreenRecord] operator[SEP] identifier[CLASS_INFO_SCREEN_RECORD_FILE] operator[SEP] operator[SEP] identifier[getField] operator[SEP] identifier[ClassInfoScreenRecord] operator[SEP] identifier[NAME] operator[SEP] operator[SEP] identifier[setupDefaultView] operator[SEP] Keyword[this] operator[SEP] identifier[getNextLocation] operator[SEP] identifier[ScreenConstants] operator[SEP] identifier[NEXT_LOGICAL] , identifier[ScreenConstants] operator[SEP] identifier[ANCHOR_DEFAULT] operator[SEP] , Keyword[this] , identifier[ScreenConstants] operator[SEP] identifier[DEFAULT_DISPLAY] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[getRecord] operator[SEP] identifier[ClassInfoScreenRecord] operator[SEP] identifier[CLASS_INFO_SCREEN_RECORD_FILE] operator[SEP] operator[SEP] identifier[getField] operator[SEP] identifier[ClassInfoScreenRecord] operator[SEP] identifier[PACKAGE] operator[SEP] operator[SEP] identifier[setupDefaultView] operator[SEP] Keyword[this] operator[SEP] identifier[getNextLocation] operator[SEP] identifier[ScreenConstants] operator[SEP] identifier[NEXT_LOGICAL] , identifier[ScreenConstants] operator[SEP] identifier[ANCHOR_DEFAULT] operator[SEP] , Keyword[this] , identifier[ScreenConstants] operator[SEP] identifier[DEFAULT_DISPLAY] operator[SEP] operator[SEP] }
public Interval toInterval() { DateTimeField field = getField(); long start = field.roundFloor(getMillis()); long end = field.add(start, 1); Interval interval = new Interval(start, end, getChronology()); return interval; }
class class_name[name] begin[{] method[toInterval, return_type[type[Interval]], modifier[public], parameter[]] begin[{] local_variable[type[DateTimeField], field] local_variable[type[long], start] local_variable[type[long], end] local_variable[type[Interval], interval] return[member[.interval]] end[}] END[}]
Keyword[public] identifier[Interval] identifier[toInterval] operator[SEP] operator[SEP] { identifier[DateTimeField] identifier[field] operator[=] identifier[getField] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[start] operator[=] identifier[field] operator[SEP] identifier[roundFloor] operator[SEP] identifier[getMillis] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[end] operator[=] identifier[field] operator[SEP] identifier[add] operator[SEP] identifier[start] , Other[1] operator[SEP] operator[SEP] identifier[Interval] identifier[interval] operator[=] Keyword[new] identifier[Interval] operator[SEP] identifier[start] , identifier[end] , identifier[getChronology] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[interval] operator[SEP] }
private void onCounterColumn(CounterColumn column, EntityMetadata m, Object entity, EntityType entityType, List<String> relationNames, boolean isWrapReq, Map<String, Object> relations, boolean isCql3Enabled) throws InstantiationException, IllegalAccessException { String thriftColumnName = PropertyAccessorFactory.STRING.fromBytes(String.class, column.getName()); String thriftColumnValue = new Long(column.getValue()).toString(); populateViaThrift(m, entity, entityType, relationNames, relations, thriftColumnName, thriftColumnValue, isCql3Enabled); }
class class_name[name] begin[{] method[onCounterColumn, return_type[void], modifier[private], parameter[column, m, entity, entityType, relationNames, isWrapReq, relations, isCql3Enabled]] begin[{] local_variable[type[String], thriftColumnName] local_variable[type[String], thriftColumnValue] call[.populateViaThrift, parameter[member[.m], member[.entity], member[.entityType], member[.relationNames], member[.relations], member[.thriftColumnName], member[.thriftColumnValue], member[.isCql3Enabled]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[onCounterColumn] operator[SEP] identifier[CounterColumn] identifier[column] , identifier[EntityMetadata] identifier[m] , identifier[Object] identifier[entity] , identifier[EntityType] identifier[entityType] , identifier[List] operator[<] identifier[String] operator[>] identifier[relationNames] , Keyword[boolean] identifier[isWrapReq] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[relations] , Keyword[boolean] identifier[isCql3Enabled] operator[SEP] Keyword[throws] identifier[InstantiationException] , identifier[IllegalAccessException] { identifier[String] identifier[thriftColumnName] operator[=] identifier[PropertyAccessorFactory] operator[SEP] identifier[STRING] operator[SEP] identifier[fromBytes] operator[SEP] identifier[String] operator[SEP] Keyword[class] , identifier[column] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[thriftColumnValue] operator[=] Keyword[new] identifier[Long] operator[SEP] identifier[column] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[populateViaThrift] operator[SEP] identifier[m] , identifier[entity] , identifier[entityType] , identifier[relationNames] , identifier[relations] , identifier[thriftColumnName] , identifier[thriftColumnValue] , identifier[isCql3Enabled] operator[SEP] operator[SEP] }
private static PersistentResourceXMLDescription.PersistentResourceXMLBuilder listenerBuilder(PersistentResourceDefinition resource) { return builder(resource.getPathElement()) // xsd socket-optionsType .addAttributes( ListenerResourceDefinition.RECEIVE_BUFFER, ListenerResourceDefinition.SEND_BUFFER, ListenerResourceDefinition.BACKLOG, ListenerResourceDefinition.KEEP_ALIVE, ListenerResourceDefinition.READ_TIMEOUT, ListenerResourceDefinition.WRITE_TIMEOUT, ListenerResourceDefinition.MAX_CONNECTIONS) // xsd listener-type .addAttributes( ListenerResourceDefinition.SOCKET_BINDING, ListenerResourceDefinition.WORKER, ListenerResourceDefinition.BUFFER_POOL, ListenerResourceDefinition.ENABLED, ListenerResourceDefinition.RESOLVE_PEER_ADDRESS, ListenerResourceDefinition.MAX_ENTITY_SIZE, ListenerResourceDefinition.BUFFER_PIPELINED_DATA, ListenerResourceDefinition.MAX_HEADER_SIZE, ListenerResourceDefinition.MAX_PARAMETERS, ListenerResourceDefinition.MAX_HEADERS, ListenerResourceDefinition.MAX_COOKIES, ListenerResourceDefinition.ALLOW_ENCODED_SLASH, ListenerResourceDefinition.DECODE_URL, ListenerResourceDefinition.URL_CHARSET, ListenerResourceDefinition.ALWAYS_SET_KEEP_ALIVE, ListenerResourceDefinition.MAX_BUFFERED_REQUEST_SIZE, ListenerResourceDefinition.RECORD_REQUEST_START_TIME, ListenerResourceDefinition.ALLOW_EQUALS_IN_COOKIE_VALUE, ListenerResourceDefinition.NO_REQUEST_TIMEOUT, ListenerResourceDefinition.REQUEST_PARSE_TIMEOUT, ListenerResourceDefinition.DISALLOWED_METHODS, ListenerResourceDefinition.SECURE, ListenerResourceDefinition.RFC6265_COOKIE_VALIDATION, ListenerResourceDefinition.ALLOW_UNESCAPED_CHARACTERS_IN_URL); }
class class_name[name] begin[{] method[listenerBuilder, return_type[type[PersistentResourceXMLDescription]], modifier[private static], parameter[resource]] begin[{] return[call[.builder, parameter[call[resource.getPathElement, parameter[]]]]] end[}] END[}]
Keyword[private] Keyword[static] identifier[PersistentResourceXMLDescription] operator[SEP] identifier[PersistentResourceXMLBuilder] identifier[listenerBuilder] operator[SEP] identifier[PersistentResourceDefinition] identifier[resource] operator[SEP] { Keyword[return] identifier[builder] operator[SEP] identifier[resource] operator[SEP] identifier[getPathElement] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addAttributes] operator[SEP] identifier[ListenerResourceDefinition] operator[SEP] identifier[RECEIVE_BUFFER] , identifier[ListenerResourceDefinition] operator[SEP] identifier[SEND_BUFFER] , identifier[ListenerResourceDefinition] operator[SEP] identifier[BACKLOG] , identifier[ListenerResourceDefinition] operator[SEP] identifier[KEEP_ALIVE] , identifier[ListenerResourceDefinition] operator[SEP] identifier[READ_TIMEOUT] , identifier[ListenerResourceDefinition] operator[SEP] identifier[WRITE_TIMEOUT] , identifier[ListenerResourceDefinition] operator[SEP] identifier[MAX_CONNECTIONS] operator[SEP] operator[SEP] identifier[addAttributes] operator[SEP] identifier[ListenerResourceDefinition] operator[SEP] identifier[SOCKET_BINDING] , identifier[ListenerResourceDefinition] operator[SEP] identifier[WORKER] , identifier[ListenerResourceDefinition] operator[SEP] identifier[BUFFER_POOL] , identifier[ListenerResourceDefinition] operator[SEP] identifier[ENABLED] , identifier[ListenerResourceDefinition] operator[SEP] identifier[RESOLVE_PEER_ADDRESS] , identifier[ListenerResourceDefinition] operator[SEP] identifier[MAX_ENTITY_SIZE] , identifier[ListenerResourceDefinition] operator[SEP] identifier[BUFFER_PIPELINED_DATA] , identifier[ListenerResourceDefinition] operator[SEP] identifier[MAX_HEADER_SIZE] , identifier[ListenerResourceDefinition] operator[SEP] identifier[MAX_PARAMETERS] , identifier[ListenerResourceDefinition] operator[SEP] identifier[MAX_HEADERS] , identifier[ListenerResourceDefinition] operator[SEP] identifier[MAX_COOKIES] , identifier[ListenerResourceDefinition] operator[SEP] identifier[ALLOW_ENCODED_SLASH] , identifier[ListenerResourceDefinition] operator[SEP] identifier[DECODE_URL] , identifier[ListenerResourceDefinition] operator[SEP] identifier[URL_CHARSET] , identifier[ListenerResourceDefinition] operator[SEP] identifier[ALWAYS_SET_KEEP_ALIVE] , identifier[ListenerResourceDefinition] operator[SEP] identifier[MAX_BUFFERED_REQUEST_SIZE] , identifier[ListenerResourceDefinition] operator[SEP] identifier[RECORD_REQUEST_START_TIME] , identifier[ListenerResourceDefinition] operator[SEP] identifier[ALLOW_EQUALS_IN_COOKIE_VALUE] , identifier[ListenerResourceDefinition] operator[SEP] identifier[NO_REQUEST_TIMEOUT] , identifier[ListenerResourceDefinition] operator[SEP] identifier[REQUEST_PARSE_TIMEOUT] , identifier[ListenerResourceDefinition] operator[SEP] identifier[DISALLOWED_METHODS] , identifier[ListenerResourceDefinition] operator[SEP] identifier[SECURE] , identifier[ListenerResourceDefinition] operator[SEP] identifier[RFC6265_COOKIE_VALIDATION] , identifier[ListenerResourceDefinition] operator[SEP] identifier[ALLOW_UNESCAPED_CHARACTERS_IN_URL] operator[SEP] operator[SEP] }
public boolean allowsIndexedFunctionExecutionOnTarget(OFromClause target, OCommandContext context) { return left.allowsIndexedFunctionExecutionOnTarget(target, context, operator, right.execute((OResult) null, context)); }
class class_name[name] begin[{] method[allowsIndexedFunctionExecutionOnTarget, return_type[type[boolean]], modifier[public], parameter[target, context]] begin[{] return[call[left.allowsIndexedFunctionExecutionOnTarget, parameter[member[.target], member[.context], member[.operator], call[right.execute, parameter[Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), type=ReferenceType(arguments=None, dimensions=[], name=OResult, sub_type=None)), member[.context]]]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[allowsIndexedFunctionExecutionOnTarget] operator[SEP] identifier[OFromClause] identifier[target] , identifier[OCommandContext] identifier[context] operator[SEP] { Keyword[return] identifier[left] operator[SEP] identifier[allowsIndexedFunctionExecutionOnTarget] operator[SEP] identifier[target] , identifier[context] , identifier[operator] , identifier[right] operator[SEP] identifier[execute] operator[SEP] operator[SEP] identifier[OResult] operator[SEP] Other[null] , identifier[context] operator[SEP] operator[SEP] operator[SEP] }
public ModelNode translateOperationForProxy(final ModelNode op) { return translateOperationForProxy(op, PathAddress.pathAddress(op.get(OP_ADDR))); }
class class_name[name] begin[{] method[translateOperationForProxy, return_type[type[ModelNode]], modifier[public], parameter[op]] begin[{] return[call[.translateOperationForProxy, parameter[member[.op], call[PathAddress.pathAddress, parameter[call[op.get, parameter[member[.OP_ADDR]]]]]]]] end[}] END[}]
Keyword[public] identifier[ModelNode] identifier[translateOperationForProxy] operator[SEP] Keyword[final] identifier[ModelNode] identifier[op] operator[SEP] { Keyword[return] identifier[translateOperationForProxy] operator[SEP] identifier[op] , identifier[PathAddress] operator[SEP] identifier[pathAddress] operator[SEP] identifier[op] operator[SEP] identifier[get] operator[SEP] identifier[OP_ADDR] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public long skip(long n) throws IOException { int s = cache.size(); if(s > 0){ if(s < n){ n = n - s; } else { for(int i = 0; i < n; i ++){ cache.poll(); } return n; } } return super.skip(n) + s; }
class class_name[name] begin[{] method[skip, return_type[type[long]], modifier[public], parameter[n]] begin[{] local_variable[type[int], s] if[binary_operation[member[.s], >, literal[0]]] begin[{] if[binary_operation[member[.s], <, member[.n]]] begin[{] assign[member[.n], binary_operation[member[.n], -, member[.s]]] else begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=poll, postfix_operators=[], prefix_operators=[], qualifier=cache, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.n]] end[}] else begin[{] None end[}] return[binary_operation[SuperMethodInvocation(arguments=[MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=skip, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None), +, member[.s]]] end[}] END[}]
Keyword[public] Keyword[long] identifier[skip] operator[SEP] Keyword[long] identifier[n] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[int] identifier[s] operator[=] identifier[cache] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[s] operator[>] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[s] operator[<] identifier[n] operator[SEP] { identifier[n] operator[=] identifier[n] operator[-] identifier[s] operator[SEP] } Keyword[else] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[n] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[cache] operator[SEP] identifier[poll] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[n] operator[SEP] } } Keyword[return] Keyword[super] operator[SEP] identifier[skip] operator[SEP] identifier[n] operator[SEP] operator[+] identifier[s] operator[SEP] }
private static File makeTopIndexFileFromConfig(FeatureCollectionConfig config) { Formatter errlog = new Formatter(); CollectionSpecParser specp = config.getCollectionSpecParser(errlog); String name = StringUtil2.replace(config.collectionName, '\\', "/"); // String cname = DirectoryCollection.makeCollectionName(name, Paths.get(specp.getRootDir())); return makeIndexFile(name, new File(specp.getRootDir())); }
class class_name[name] begin[{] method[makeTopIndexFileFromConfig, return_type[type[File]], modifier[private static], parameter[config]] begin[{] local_variable[type[Formatter], errlog] local_variable[type[CollectionSpecParser], specp] local_variable[type[String], name] return[call[.makeIndexFile, parameter[member[.name], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getRootDir, postfix_operators=[], prefix_operators=[], qualifier=specp, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))]]] end[}] END[}]
Keyword[private] Keyword[static] identifier[File] identifier[makeTopIndexFileFromConfig] operator[SEP] identifier[FeatureCollectionConfig] identifier[config] operator[SEP] { identifier[Formatter] identifier[errlog] operator[=] Keyword[new] identifier[Formatter] operator[SEP] operator[SEP] operator[SEP] identifier[CollectionSpecParser] identifier[specp] operator[=] identifier[config] operator[SEP] identifier[getCollectionSpecParser] operator[SEP] identifier[errlog] operator[SEP] operator[SEP] identifier[String] identifier[name] operator[=] identifier[StringUtil2] operator[SEP] identifier[replace] operator[SEP] identifier[config] operator[SEP] identifier[collectionName] , literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[makeIndexFile] operator[SEP] identifier[name] , Keyword[new] identifier[File] operator[SEP] identifier[specp] operator[SEP] identifier[getRootDir] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") public Map<String, String> getSystemJavaxPersistenceOverrides() { if(propertyOverridesExist()) { // we make use of a type cast hack to convert Properties to a Map return mergeFilteredMaps(System.getenv(), (Map) System.getProperties()); } return null; }
class class_name[name] begin[{] method[getSystemJavaxPersistenceOverrides, return_type[type[Map]], modifier[public], parameter[]] begin[{] if[call[.propertyOverridesExist, parameter[]]] begin[{] return[call[.mergeFilteredMaps, parameter[call[System.getenv, parameter[]], Cast(expression=MethodInvocation(arguments=[], member=getProperties, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=None))]]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[getSystemJavaxPersistenceOverrides] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[propertyOverridesExist] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[mergeFilteredMaps] operator[SEP] identifier[System] operator[SEP] identifier[getenv] operator[SEP] operator[SEP] , operator[SEP] identifier[Map] operator[SEP] identifier[System] operator[SEP] identifier[getProperties] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public void marshall(SearchSkillGroupsRequest searchSkillGroupsRequest, ProtocolMarshaller protocolMarshaller) { if (searchSkillGroupsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(searchSkillGroupsRequest.getNextToken(), NEXTTOKEN_BINDING); protocolMarshaller.marshall(searchSkillGroupsRequest.getMaxResults(), MAXRESULTS_BINDING); protocolMarshaller.marshall(searchSkillGroupsRequest.getFilters(), FILTERS_BINDING); protocolMarshaller.marshall(searchSkillGroupsRequest.getSortCriteria(), SORTCRITERIA_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[searchSkillGroupsRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.searchSkillGroupsRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNextToken, postfix_operators=[], prefix_operators=[], qualifier=searchSkillGroupsRequest, selectors=[], type_arguments=None), MemberReference(member=NEXTTOKEN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMaxResults, postfix_operators=[], prefix_operators=[], qualifier=searchSkillGroupsRequest, selectors=[], type_arguments=None), MemberReference(member=MAXRESULTS_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getFilters, postfix_operators=[], prefix_operators=[], qualifier=searchSkillGroupsRequest, selectors=[], type_arguments=None), MemberReference(member=FILTERS_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSortCriteria, postfix_operators=[], prefix_operators=[], qualifier=searchSkillGroupsRequest, selectors=[], type_arguments=None), MemberReference(member=SORTCRITERIA_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[SearchSkillGroupsRequest] identifier[searchSkillGroupsRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[searchSkillGroupsRequest] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[searchSkillGroupsRequest] operator[SEP] identifier[getNextToken] operator[SEP] operator[SEP] , identifier[NEXTTOKEN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[searchSkillGroupsRequest] operator[SEP] identifier[getMaxResults] operator[SEP] operator[SEP] , identifier[MAXRESULTS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[searchSkillGroupsRequest] operator[SEP] identifier[getFilters] operator[SEP] operator[SEP] , identifier[FILTERS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[searchSkillGroupsRequest] operator[SEP] identifier[getSortCriteria] operator[SEP] operator[SEP] , identifier[SORTCRITERIA_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public static ImageInfo read(InputStream in) throws IOException { ImageInfo imageInfo = new ImageInfo(); imageInfo.setInput(in); if (!imageInfo.check()) { throw new IOException("ImageInfo.check() failed; data stream is " + "broken or does not contain data in a supported image format"); } return imageInfo; }
class class_name[name] begin[{] method[read, return_type[type[ImageInfo]], modifier[public static], parameter[in]] begin[{] local_variable[type[ImageInfo], imageInfo] call[imageInfo.setInput, parameter[member[.in]]] if[call[imageInfo.check, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ImageInfo.check() failed; data stream is "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="broken or does not contain data in a supported image format"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.imageInfo]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ImageInfo] identifier[read] operator[SEP] identifier[InputStream] identifier[in] operator[SEP] Keyword[throws] identifier[IOException] { identifier[ImageInfo] identifier[imageInfo] operator[=] Keyword[new] identifier[ImageInfo] operator[SEP] operator[SEP] operator[SEP] identifier[imageInfo] operator[SEP] identifier[setInput] operator[SEP] identifier[in] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[imageInfo] operator[SEP] identifier[check] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[imageInfo] operator[SEP] }
public void setAjaxStopEvent(ISliderAjaxEvent ajaxStopEvent) { this.ajaxEvents.put(SliderAjaxEvent.ajaxStopEvent, ajaxStopEvent); setStopEvent(new SliderAjaxJsScopeUiEvent(this, SliderAjaxEvent.ajaxStopEvent)); }
class class_name[name] begin[{] method[setAjaxStopEvent, return_type[void], modifier[public], parameter[ajaxStopEvent]] begin[{] THIS[member[None.ajaxEvents]call[None.put, parameter[member[SliderAjaxEvent.ajaxStopEvent], member[.ajaxStopEvent]]]] call[.setStopEvent, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=ajaxStopEvent, postfix_operators=[], prefix_operators=[], qualifier=SliderAjaxEvent, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SliderAjaxJsScopeUiEvent, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setAjaxStopEvent] operator[SEP] identifier[ISliderAjaxEvent] identifier[ajaxStopEvent] operator[SEP] { Keyword[this] operator[SEP] identifier[ajaxEvents] operator[SEP] identifier[put] operator[SEP] identifier[SliderAjaxEvent] operator[SEP] identifier[ajaxStopEvent] , identifier[ajaxStopEvent] operator[SEP] operator[SEP] identifier[setStopEvent] operator[SEP] Keyword[new] identifier[SliderAjaxJsScopeUiEvent] operator[SEP] Keyword[this] , identifier[SliderAjaxEvent] operator[SEP] identifier[ajaxStopEvent] operator[SEP] operator[SEP] operator[SEP] }
public static TraceEvent getType(List<TraceEvent> events, String identifier, int... types) { for (TraceEvent te : events) { for (int type : types) { if (te.getType() == type && (identifier == null || te.getConnectionListener().equals(identifier))) return te; } } return null; }
class class_name[name] begin[{] method[getType, return_type[type[TraceEvent]], modifier[public static], parameter[events, identifier, types]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=te, selectors=[], type_arguments=None), operandr=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=identifier, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[], member=getConnectionListener, postfix_operators=[], prefix_operators=[], qualifier=te, selectors=[MethodInvocation(arguments=[MemberReference(member=identifier, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=||), operator=&&), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=te, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None))]), control=EnhancedForControl(iterable=MemberReference(member=types, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=type)], modifiers=set(), type=BasicType(dimensions=[], name=int))), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=events, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=te)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TraceEvent, sub_type=None))), label=None) return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] identifier[TraceEvent] identifier[getType] operator[SEP] identifier[List] operator[<] identifier[TraceEvent] operator[>] identifier[events] , identifier[String] identifier[identifier] , Keyword[int] operator[...] identifier[types] operator[SEP] { Keyword[for] operator[SEP] identifier[TraceEvent] identifier[te] operator[:] identifier[events] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[type] operator[:] identifier[types] operator[SEP] { Keyword[if] operator[SEP] identifier[te] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[==] identifier[type] operator[&&] operator[SEP] identifier[identifier] operator[==] Other[null] operator[||] identifier[te] operator[SEP] identifier[getConnectionListener] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[identifier] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[te] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
static private void transferGroup(NetcdfFile ds, NetcdfDataset targetDs, Group src, Group targetGroup, ReplaceVariableCheck replaceCheck) { boolean unlimitedOK = true; // LOOK why not allowed? // group attributes transferGroupAttributes(src, targetGroup); // dimensions for (Dimension d : src.getDimensions()) { if (null == targetGroup.findDimensionLocal(d.getShortName())) { Dimension newd = new Dimension(d.getShortName(), d.getLength(), d.isShared(), unlimitedOK && d.isUnlimited(), d.isVariableLength()); targetGroup.addDimension(newd); } } // variables for (Variable v : src.getVariables()) { Variable targetV = targetGroup.findVariable(v.getShortName()); VariableEnhanced targetVe = (VariableEnhanced) targetV; boolean replace = (replaceCheck != null) && replaceCheck.replace(v); // replaceCheck not currently used if (replace || (null == targetV)) { // replace it if ((v instanceof Structure) && !(v instanceof StructureDS)) { v = new StructureDS(targetGroup, (Structure) v); // else if (!(v instanceof VariableDS) && !(v instanceof StructureDS)) Doug Lindolm } else if (!(v instanceof VariableDS)) { v = new VariableDS(targetGroup, v, false); // enhancement done by original variable, this is just to reparent to target dataset. } if (null != targetV) targetGroup.remove(targetV); targetGroup.addVariable(v); // reparent group v.resetDimensions(); // dimensions will be different } else if (!targetV.hasCachedData() && (targetVe.getOriginalVariable() == null)) { // this is the case where we defined the variable, but didnt set its data. we now set it with the first nested // dataset that has a variable with the same name targetVe.setOriginalVariable(v); } } // nested groups - check if target already has it for (Group srcNested : src.getGroups()) { Group nested = targetGroup.findGroup(srcNested.getShortName()); if (null == nested) { nested = new Group(ds, targetGroup, srcNested.getShortName()); targetGroup.addGroup(nested); } transferGroup(ds, targetDs, srcNested, nested, replaceCheck); } }
class class_name[name] begin[{] method[transferGroup, return_type[void], modifier[private static], parameter[ds, targetDs, src, targetGroup, replaceCheck]] begin[{] local_variable[type[boolean], unlimitedOK] call[.transferGroupAttributes, parameter[member[.src], member[.targetGroup]]] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getShortName, postfix_operators=[], prefix_operators=[], qualifier=d, selectors=[], type_arguments=None)], member=findDimensionLocal, postfix_operators=[], prefix_operators=[], qualifier=targetGroup, selectors=[], type_arguments=None), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getShortName, postfix_operators=[], prefix_operators=[], qualifier=d, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getLength, postfix_operators=[], prefix_operators=[], qualifier=d, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=isShared, postfix_operators=[], prefix_operators=[], qualifier=d, selectors=[], type_arguments=None), BinaryOperation(operandl=MemberReference(member=unlimitedOK, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=isUnlimited, postfix_operators=[], prefix_operators=[], qualifier=d, selectors=[], type_arguments=None), operator=&&), MethodInvocation(arguments=[], member=isVariableLength, postfix_operators=[], prefix_operators=[], qualifier=d, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Dimension, sub_type=None)), name=newd)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Dimension, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=newd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addDimension, postfix_operators=[], prefix_operators=[], qualifier=targetGroup, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getDimensions, postfix_operators=[], prefix_operators=[], qualifier=src, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=d)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Dimension, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getShortName, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None)], member=findVariable, postfix_operators=[], prefix_operators=[], qualifier=targetGroup, selectors=[], type_arguments=None), name=targetV)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Variable, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=targetV, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=VariableEnhanced, sub_type=None)), name=targetVe)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=VariableEnhanced, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=replaceCheck, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=replace, postfix_operators=[], prefix_operators=[], qualifier=replaceCheck, selectors=[], type_arguments=None), operator=&&), name=replace)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=replace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=targetV, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), else_statement=IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=hasCachedData, postfix_operators=[], prefix_operators=['!'], qualifier=targetV, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getOriginalVariable, postfix_operators=[], prefix_operators=[], qualifier=targetVe, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setOriginalVariable, postfix_operators=[], prefix_operators=[], qualifier=targetVe, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Structure, sub_type=None), operator=instanceof), operandr=BinaryOperation(operandl=MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=StructureDS, sub_type=None), operator=instanceof), operator=&&), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=VariableDS, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=targetGroup, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=VariableDS, sub_type=None))), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=targetGroup, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Structure, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StructureDS, sub_type=None))), label=None)])), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=targetV, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=targetV, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=targetGroup, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addVariable, postfix_operators=[], prefix_operators=[], qualifier=targetGroup, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=resetDimensions, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getVariables, postfix_operators=[], prefix_operators=[], qualifier=src, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=v)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Variable, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getShortName, postfix_operators=[], prefix_operators=[], qualifier=srcNested, selectors=[], type_arguments=None)], member=findGroup, postfix_operators=[], prefix_operators=[], qualifier=targetGroup, selectors=[], type_arguments=None), name=nested)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Group, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=nested, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=nested, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=ds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=targetGroup, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getShortName, postfix_operators=[], prefix_operators=[], qualifier=srcNested, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Group, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=nested, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addGroup, postfix_operators=[], prefix_operators=[], qualifier=targetGroup, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=targetDs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=srcNested, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=nested, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=replaceCheck, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=transferGroup, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getGroups, postfix_operators=[], prefix_operators=[], qualifier=src, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=srcNested)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Group, sub_type=None))), label=None) end[}] END[}]
Keyword[static] Keyword[private] Keyword[void] identifier[transferGroup] operator[SEP] identifier[NetcdfFile] identifier[ds] , identifier[NetcdfDataset] identifier[targetDs] , identifier[Group] identifier[src] , identifier[Group] identifier[targetGroup] , identifier[ReplaceVariableCheck] identifier[replaceCheck] operator[SEP] { Keyword[boolean] identifier[unlimitedOK] operator[=] literal[boolean] operator[SEP] identifier[transferGroupAttributes] operator[SEP] identifier[src] , identifier[targetGroup] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Dimension] identifier[d] operator[:] identifier[src] operator[SEP] identifier[getDimensions] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[targetGroup] operator[SEP] identifier[findDimensionLocal] operator[SEP] identifier[d] operator[SEP] identifier[getShortName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[Dimension] identifier[newd] operator[=] Keyword[new] identifier[Dimension] operator[SEP] identifier[d] operator[SEP] identifier[getShortName] operator[SEP] operator[SEP] , identifier[d] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] , identifier[d] operator[SEP] identifier[isShared] operator[SEP] operator[SEP] , identifier[unlimitedOK] operator[&&] identifier[d] operator[SEP] identifier[isUnlimited] operator[SEP] operator[SEP] , identifier[d] operator[SEP] identifier[isVariableLength] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[targetGroup] operator[SEP] identifier[addDimension] operator[SEP] identifier[newd] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] identifier[Variable] identifier[v] operator[:] identifier[src] operator[SEP] identifier[getVariables] operator[SEP] operator[SEP] operator[SEP] { identifier[Variable] identifier[targetV] operator[=] identifier[targetGroup] operator[SEP] identifier[findVariable] operator[SEP] identifier[v] operator[SEP] identifier[getShortName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[VariableEnhanced] identifier[targetVe] operator[=] operator[SEP] identifier[VariableEnhanced] operator[SEP] identifier[targetV] operator[SEP] Keyword[boolean] identifier[replace] operator[=] operator[SEP] identifier[replaceCheck] operator[!=] Other[null] operator[SEP] operator[&&] identifier[replaceCheck] operator[SEP] identifier[replace] operator[SEP] identifier[v] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[replace] operator[||] operator[SEP] Other[null] operator[==] identifier[targetV] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[v] Keyword[instanceof] identifier[Structure] operator[SEP] operator[&&] operator[!] operator[SEP] identifier[v] Keyword[instanceof] identifier[StructureDS] operator[SEP] operator[SEP] { identifier[v] operator[=] Keyword[new] identifier[StructureDS] operator[SEP] identifier[targetGroup] , operator[SEP] identifier[Structure] operator[SEP] identifier[v] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[v] Keyword[instanceof] identifier[VariableDS] operator[SEP] operator[SEP] { identifier[v] operator[=] Keyword[new] identifier[VariableDS] operator[SEP] identifier[targetGroup] , identifier[v] , literal[boolean] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Other[null] operator[!=] identifier[targetV] operator[SEP] identifier[targetGroup] operator[SEP] identifier[remove] operator[SEP] identifier[targetV] operator[SEP] operator[SEP] identifier[targetGroup] operator[SEP] identifier[addVariable] operator[SEP] identifier[v] operator[SEP] operator[SEP] identifier[v] operator[SEP] identifier[resetDimensions] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[!] identifier[targetV] operator[SEP] identifier[hasCachedData] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[targetVe] operator[SEP] identifier[getOriginalVariable] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] operator[SEP] { identifier[targetVe] operator[SEP] identifier[setOriginalVariable] operator[SEP] identifier[v] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] identifier[Group] identifier[srcNested] operator[:] identifier[src] operator[SEP] identifier[getGroups] operator[SEP] operator[SEP] operator[SEP] { identifier[Group] identifier[nested] operator[=] identifier[targetGroup] operator[SEP] identifier[findGroup] operator[SEP] identifier[srcNested] operator[SEP] identifier[getShortName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[==] identifier[nested] operator[SEP] { identifier[nested] operator[=] Keyword[new] identifier[Group] operator[SEP] identifier[ds] , identifier[targetGroup] , identifier[srcNested] operator[SEP] identifier[getShortName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[targetGroup] operator[SEP] identifier[addGroup] operator[SEP] identifier[nested] operator[SEP] operator[SEP] } identifier[transferGroup] operator[SEP] identifier[ds] , identifier[targetDs] , identifier[srcNested] , identifier[nested] , identifier[replaceCheck] operator[SEP] operator[SEP] } }
public static boolean existsTable(String appid) { if (StringUtils.isBlank(appid)) { return false; } try { DescribeTableResult res = getClient().describeTable(getTableNameForAppid(appid)); return res != null; } catch (Exception e) { return false; } }
class class_name[name] begin[{] method[existsTable, return_type[type[boolean]], modifier[public static], parameter[appid]] begin[{] if[call[StringUtils.isBlank, parameter[member[.appid]]]] begin[{] return[literal[false]] else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getClient, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=appid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getTableNameForAppid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=describeTable, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=res)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DescribeTableResult, sub_type=None)), ReturnStatement(expression=BinaryOperation(operandl=MemberReference(member=res, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[existsTable] operator[SEP] identifier[String] identifier[appid] operator[SEP] { Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isBlank] operator[SEP] identifier[appid] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[try] { identifier[DescribeTableResult] identifier[res] operator[=] identifier[getClient] operator[SEP] operator[SEP] operator[SEP] identifier[describeTable] operator[SEP] identifier[getTableNameForAppid] operator[SEP] identifier[appid] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[res] operator[!=] Other[null] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } }
static Point calculateCenterOfBoundingBox(Point[] coordinates) { double pointXMin = coordinates[0].x; double pointXMax = coordinates[0].x; double pointYMin = coordinates[0].y; double pointYMax = coordinates[0].y; for (Point immutablePoint : coordinates) { if (immutablePoint.x < pointXMin) { pointXMin = immutablePoint.x; } else if (immutablePoint.x > pointXMax) { pointXMax = immutablePoint.x; } if (immutablePoint.y < pointYMin) { pointYMin = immutablePoint.y; } else if (immutablePoint.y > pointYMax) { pointYMax = immutablePoint.y; } } return new Point((pointXMin + pointXMax) / 2, (pointYMax + pointYMin) / 2); }
class class_name[name] begin[{] method[calculateCenterOfBoundingBox, return_type[type[Point]], modifier[static], parameter[coordinates]] begin[{] local_variable[type[double], pointXMin] local_variable[type[double], pointXMax] local_variable[type[double], pointYMin] local_variable[type[double], pointYMax] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=immutablePoint, selectors=[]), operandr=MemberReference(member=pointXMin, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=immutablePoint, selectors=[]), operandr=MemberReference(member=pointXMax, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=pointXMax, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=immutablePoint, selectors=[])), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=pointXMin, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=immutablePoint, selectors=[])), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=immutablePoint, selectors=[]), operandr=MemberReference(member=pointYMin, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=immutablePoint, selectors=[]), operandr=MemberReference(member=pointYMax, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=pointYMax, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=immutablePoint, selectors=[])), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=pointYMin, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=immutablePoint, selectors=[])), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=coordinates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=immutablePoint)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Point, sub_type=None))), label=None) return[ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=pointXMin, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=pointXMax, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=/), BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=pointYMax, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=pointYMin, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=/)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Point, sub_type=None))] end[}] END[}]
Keyword[static] identifier[Point] identifier[calculateCenterOfBoundingBox] operator[SEP] identifier[Point] operator[SEP] operator[SEP] identifier[coordinates] operator[SEP] { Keyword[double] identifier[pointXMin] operator[=] identifier[coordinates] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[x] operator[SEP] Keyword[double] identifier[pointXMax] operator[=] identifier[coordinates] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[x] operator[SEP] Keyword[double] identifier[pointYMin] operator[=] identifier[coordinates] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[y] operator[SEP] Keyword[double] identifier[pointYMax] operator[=] identifier[coordinates] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[y] operator[SEP] Keyword[for] operator[SEP] identifier[Point] identifier[immutablePoint] operator[:] identifier[coordinates] operator[SEP] { Keyword[if] operator[SEP] identifier[immutablePoint] operator[SEP] identifier[x] operator[<] identifier[pointXMin] operator[SEP] { identifier[pointXMin] operator[=] identifier[immutablePoint] operator[SEP] identifier[x] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[immutablePoint] operator[SEP] identifier[x] operator[>] identifier[pointXMax] operator[SEP] { identifier[pointXMax] operator[=] identifier[immutablePoint] operator[SEP] identifier[x] operator[SEP] } Keyword[if] operator[SEP] identifier[immutablePoint] operator[SEP] identifier[y] operator[<] identifier[pointYMin] operator[SEP] { identifier[pointYMin] operator[=] identifier[immutablePoint] operator[SEP] identifier[y] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[immutablePoint] operator[SEP] identifier[y] operator[>] identifier[pointYMax] operator[SEP] { identifier[pointYMax] operator[=] identifier[immutablePoint] operator[SEP] identifier[y] operator[SEP] } } Keyword[return] Keyword[new] identifier[Point] operator[SEP] operator[SEP] identifier[pointXMin] operator[+] identifier[pointXMax] operator[SEP] operator[/] Other[2] , operator[SEP] identifier[pointYMax] operator[+] identifier[pointYMin] operator[SEP] operator[/] Other[2] operator[SEP] operator[SEP] }
@Override public UnexpectedExceptionInformation getUnexpectedException(int code) { if (exceptionMapping == null) { exceptionMapping = processUnexpectedResponseExceptionTypes(); } return exceptionMapping.getOrDefault(code, defaultException); }
class class_name[name] begin[{] method[getUnexpectedException, return_type[type[UnexpectedExceptionInformation]], modifier[public], parameter[code]] begin[{] if[binary_operation[member[.exceptionMapping], ==, literal[null]]] begin[{] assign[member[.exceptionMapping], call[.processUnexpectedResponseExceptionTypes, parameter[]]] else begin[{] None end[}] return[call[exceptionMapping.getOrDefault, parameter[member[.code], member[.defaultException]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[UnexpectedExceptionInformation] identifier[getUnexpectedException] operator[SEP] Keyword[int] identifier[code] operator[SEP] { Keyword[if] operator[SEP] identifier[exceptionMapping] operator[==] Other[null] operator[SEP] { identifier[exceptionMapping] operator[=] identifier[processUnexpectedResponseExceptionTypes] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[exceptionMapping] operator[SEP] identifier[getOrDefault] operator[SEP] identifier[code] , identifier[defaultException] operator[SEP] operator[SEP] }
protected void bulkInsertWithComparator() { if (insertionBufferSize == 0) { return; } int right = size + insertionBufferSize - 2; int left = Math.max(size, right / 2); while (insertionBufferSize > 0) { --insertionBufferSize; array[size] = insertionBuffer[insertionBufferSize]; insertionBuffer[insertionBufferSize] = null; reverse.clear(size); ++size; } while (right > left + 1) { left = left / 2; right = right / 2; for (int j = left; j <= right; j++) { fixdownWithComparator(j); } } if (left != 0) { int i = dancestor(left); fixdownWithComparator(i); fixupWithComparator(i); } if (right != 0) { int i = dancestor(right); fixdownWithComparator(i); fixupWithComparator(i); } insertionBufferMinPos = 0; }
class class_name[name] begin[{] method[bulkInsertWithComparator, return_type[void], modifier[protected], parameter[]] begin[{] if[binary_operation[member[.insertionBufferSize], ==, literal[0]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[int], right] local_variable[type[int], left] while[binary_operation[member[.insertionBufferSize], >, literal[0]]] begin[{] member[.insertionBufferSize] assign[member[.array], member[.insertionBuffer]] assign[member[.insertionBuffer], literal[null]] call[reverse.clear, parameter[member[.size]]] member[.size] end[}] while[binary_operation[member[.right], >, binary_operation[member[.left], +, literal[1]]]] begin[{] assign[member[.left], binary_operation[member[.left], /, literal[2]]] assign[member[.right], binary_operation[member[.right], /, literal[2]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fixdownWithComparator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=right, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=left, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] if[binary_operation[member[.left], !=, literal[0]]] begin[{] local_variable[type[int], i] call[.fixdownWithComparator, parameter[member[.i]]] call[.fixupWithComparator, parameter[member[.i]]] else begin[{] None end[}] if[binary_operation[member[.right], !=, literal[0]]] begin[{] local_variable[type[int], i] call[.fixdownWithComparator, parameter[member[.i]]] call[.fixupWithComparator, parameter[member[.i]]] else begin[{] None end[}] assign[member[.insertionBufferMinPos], literal[0]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[bulkInsertWithComparator] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[insertionBufferSize] operator[==] Other[0] operator[SEP] { Keyword[return] operator[SEP] } Keyword[int] identifier[right] operator[=] identifier[size] operator[+] identifier[insertionBufferSize] operator[-] Other[2] operator[SEP] Keyword[int] identifier[left] operator[=] identifier[Math] operator[SEP] identifier[max] operator[SEP] identifier[size] , identifier[right] operator[/] Other[2] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[insertionBufferSize] operator[>] Other[0] operator[SEP] { operator[--] identifier[insertionBufferSize] operator[SEP] identifier[array] operator[SEP] identifier[size] operator[SEP] operator[=] identifier[insertionBuffer] operator[SEP] identifier[insertionBufferSize] operator[SEP] operator[SEP] identifier[insertionBuffer] operator[SEP] identifier[insertionBufferSize] operator[SEP] operator[=] Other[null] operator[SEP] identifier[reverse] operator[SEP] identifier[clear] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[++] identifier[size] operator[SEP] } Keyword[while] operator[SEP] identifier[right] operator[>] identifier[left] operator[+] Other[1] operator[SEP] { identifier[left] operator[=] identifier[left] operator[/] Other[2] operator[SEP] identifier[right] operator[=] identifier[right] operator[/] Other[2] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] identifier[left] operator[SEP] identifier[j] operator[<=] identifier[right] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[fixdownWithComparator] operator[SEP] identifier[j] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[left] operator[!=] Other[0] operator[SEP] { Keyword[int] identifier[i] operator[=] identifier[dancestor] operator[SEP] identifier[left] operator[SEP] operator[SEP] identifier[fixdownWithComparator] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[fixupWithComparator] operator[SEP] identifier[i] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[right] operator[!=] Other[0] operator[SEP] { Keyword[int] identifier[i] operator[=] identifier[dancestor] operator[SEP] identifier[right] operator[SEP] operator[SEP] identifier[fixdownWithComparator] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[fixupWithComparator] operator[SEP] identifier[i] operator[SEP] operator[SEP] } identifier[insertionBufferMinPos] operator[=] Other[0] operator[SEP] }
private String getHumanMessage(final Set<ConstraintViolation<T>> requestConstraintViolations) { return requestConstraintViolations.stream() .sorted((p1, p2) -> p1.getPropertyPath().toString().compareTo(p2.getPropertyPath().toString())) .map(p -> p.getPropertyPath().toString() + " " + p.getMessage()).collect(Collectors.joining(", ")); }
class class_name[name] begin[{] method[getHumanMessage, return_type[type[String]], modifier[private], parameter[requestConstraintViolations]] begin[{] return[call[requestConstraintViolations.stream, parameter[]]] end[}] END[}]
Keyword[private] identifier[String] identifier[getHumanMessage] operator[SEP] Keyword[final] identifier[Set] operator[<] identifier[ConstraintViolation] operator[<] identifier[T] operator[>] operator[>] identifier[requestConstraintViolations] operator[SEP] { Keyword[return] identifier[requestConstraintViolations] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[sorted] operator[SEP] operator[SEP] identifier[p1] , identifier[p2] operator[SEP] operator[->] identifier[p1] operator[SEP] identifier[getPropertyPath] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[compareTo] operator[SEP] identifier[p2] operator[SEP] identifier[getPropertyPath] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[p] operator[->] identifier[p] operator[SEP] identifier[getPropertyPath] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[p] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[joining] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] }
public static ObjectName createResourceObjectName(String serverName, String resourceType, String keyName) { ObjectName objectName; Hashtable<String, String> props = new Hashtable<String, String>(); props.put(TYPE_SERVER, serverName); objectName = createObjectName(resourceType, keyName, props); return objectName; }
class class_name[name] begin[{] method[createResourceObjectName, return_type[type[ObjectName]], modifier[public static], parameter[serverName, resourceType, keyName]] begin[{] local_variable[type[ObjectName], objectName] local_variable[type[Hashtable], props] call[props.put, parameter[member[.TYPE_SERVER], member[.serverName]]] assign[member[.objectName], call[.createObjectName, parameter[member[.resourceType], member[.keyName], member[.props]]]] return[member[.objectName]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ObjectName] identifier[createResourceObjectName] operator[SEP] identifier[String] identifier[serverName] , identifier[String] identifier[resourceType] , identifier[String] identifier[keyName] operator[SEP] { identifier[ObjectName] identifier[objectName] operator[SEP] identifier[Hashtable] operator[<] identifier[String] , identifier[String] operator[>] identifier[props] operator[=] Keyword[new] identifier[Hashtable] operator[<] identifier[String] , identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[props] operator[SEP] identifier[put] operator[SEP] identifier[TYPE_SERVER] , identifier[serverName] operator[SEP] operator[SEP] identifier[objectName] operator[=] identifier[createObjectName] operator[SEP] identifier[resourceType] , identifier[keyName] , identifier[props] operator[SEP] operator[SEP] Keyword[return] identifier[objectName] operator[SEP] }
@Override public MessageResponse deserialize(JsonElement element, Type alsoIgnored, JsonDeserializationContext ignored) { List<String> results = new ArrayList<String>(); String reason = ""; String details = ""; JsonObject body = element.getAsJsonObject(); boolean succeeded = body.get("outcome").getAsString().equals("SUCCESS"); if (succeeded) { if (body.get("results") != null) { for (JsonElement result : body.get("results").getAsJsonArray()) { if(result.isJsonNull()) results.add(null); else if(result.isJsonObject()) results.add(result.toString()); else results.add(result.getAsString()); } } } else { reason = body.get("reason").getAsString(); details = body.get("details").getAsString(); } return new MessageResponse(succeeded, results, reason, details); }
class class_name[name] begin[{] method[deserialize, return_type[type[MessageResponse]], modifier[public], parameter[element, alsoIgnored, ignored]] begin[{] local_variable[type[List], results] local_variable[type[String], reason] local_variable[type[String], details] local_variable[type[JsonObject], body] local_variable[type[boolean], succeeded] if[member[.succeeded]] begin[{] if[binary_operation[call[body.get, parameter[literal["results"]]], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isJsonNull, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[], member=isJsonObject, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), else_statement=StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAsString, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=results, selectors=[], type_arguments=None), label=None), label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=results, selectors=[], type_arguments=None), label=None)), label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=add, postfix_operators=[], prefix_operators=[], qualifier=results, selectors=[], type_arguments=None), label=None))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="results")], member=get, postfix_operators=[], prefix_operators=[], qualifier=body, selectors=[MethodInvocation(arguments=[], member=getAsJsonArray, 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=result)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JsonElement, sub_type=None))), label=None) else begin[{] None end[}] else begin[{] assign[member[.reason], call[body.get, parameter[literal["reason"]]]] assign[member[.details], call[body.get, parameter[literal["details"]]]] end[}] return[ClassCreator(arguments=[MemberReference(member=succeeded, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=results, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=reason, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=details, 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=MessageResponse, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[MessageResponse] identifier[deserialize] operator[SEP] identifier[JsonElement] identifier[element] , identifier[Type] identifier[alsoIgnored] , identifier[JsonDeserializationContext] identifier[ignored] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[results] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[reason] operator[=] literal[String] operator[SEP] identifier[String] identifier[details] operator[=] literal[String] operator[SEP] identifier[JsonObject] identifier[body] operator[=] identifier[element] operator[SEP] identifier[getAsJsonObject] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[succeeded] operator[=] identifier[body] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[getAsString] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[succeeded] operator[SEP] { Keyword[if] operator[SEP] identifier[body] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[JsonElement] identifier[result] operator[:] identifier[body] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[getAsJsonArray] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[result] operator[SEP] identifier[isJsonNull] operator[SEP] operator[SEP] operator[SEP] identifier[results] operator[SEP] identifier[add] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[result] operator[SEP] identifier[isJsonObject] operator[SEP] operator[SEP] operator[SEP] identifier[results] operator[SEP] identifier[add] operator[SEP] identifier[result] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[else] identifier[results] operator[SEP] identifier[add] operator[SEP] identifier[result] operator[SEP] identifier[getAsString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[else] { identifier[reason] operator[=] identifier[body] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[getAsString] operator[SEP] operator[SEP] operator[SEP] identifier[details] operator[=] identifier[body] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[getAsString] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[MessageResponse] operator[SEP] identifier[succeeded] , identifier[results] , identifier[reason] , identifier[details] operator[SEP] operator[SEP] }
public void uploadFiles( String[] fieldNames, final I_CmsJavaScriptObjectCallback fileCallback, I_CmsErrorCallback errorCallback) { Set<String> fieldSet = new HashSet<String>(); for (String field : fieldNames) { fieldSet.add(field); } m_formWrapper.uploadFields(fieldSet, new Function<Map<String, String>, Void>() { public Void apply(Map<String, String> input) { fileCallback.call(CmsJsUtils.convertMapToJsObject(input)); return null; } }, errorCallback); }
class class_name[name] begin[{] method[uploadFiles, return_type[void], modifier[public], parameter[fieldNames, fileCallback, errorCallback]] begin[{] local_variable[type[Set], fieldSet] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=fieldSet, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=fieldNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=field)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) call[m_formWrapper.uploadFields, parameter[member[.fieldSet], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convertMapToJsObject, postfix_operators=[], prefix_operators=[], qualifier=CmsJsUtils, selectors=[], type_arguments=None)], member=call, postfix_operators=[], prefix_operators=[], qualifier=fileCallback, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], documentation=None, modifiers={'public'}, name=apply, parameters=[FormalParameter(annotations=[], modifiers=set(), name=input, 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), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=Void, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[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)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Void, sub_type=None))], dimensions=None, name=Function, sub_type=None)), member[.errorCallback]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[uploadFiles] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[fieldNames] , Keyword[final] identifier[I_CmsJavaScriptObjectCallback] identifier[fileCallback] , identifier[I_CmsErrorCallback] identifier[errorCallback] operator[SEP] { identifier[Set] operator[<] identifier[String] operator[>] identifier[fieldSet] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[field] operator[:] identifier[fieldNames] operator[SEP] { identifier[fieldSet] operator[SEP] identifier[add] operator[SEP] identifier[field] operator[SEP] operator[SEP] } identifier[m_formWrapper] operator[SEP] identifier[uploadFields] operator[SEP] identifier[fieldSet] , Keyword[new] identifier[Function] operator[<] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] , identifier[Void] operator[>] operator[SEP] operator[SEP] { Keyword[public] identifier[Void] identifier[apply] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[input] operator[SEP] { identifier[fileCallback] operator[SEP] identifier[call] operator[SEP] identifier[CmsJsUtils] operator[SEP] identifier[convertMapToJsObject] operator[SEP] identifier[input] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } } , identifier[errorCallback] operator[SEP] operator[SEP] }
public static Profile getCurrentProfile() { RequestContext context = RequestContext.getCurrent(); if (context != null) { return getProfile(context.getRequest()); } else { return null; } }
class class_name[name] begin[{] method[getCurrentProfile, return_type[type[Profile]], modifier[public static], parameter[]] begin[{] local_variable[type[RequestContext], context] if[binary_operation[member[.context], !=, literal[null]]] begin[{] return[call[.getProfile, parameter[call[context.getRequest, parameter[]]]]] else begin[{] return[literal[null]] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[Profile] identifier[getCurrentProfile] operator[SEP] operator[SEP] { identifier[RequestContext] identifier[context] operator[=] identifier[RequestContext] operator[SEP] identifier[getCurrent] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[context] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[getProfile] operator[SEP] identifier[context] operator[SEP] identifier[getRequest] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Other[null] operator[SEP] } }
@SuppressWarnings("unchecked") public static DataProviderFactory create(final Object... args) { // Find the implementation for the DataProviderFactory. final Class<? extends DataProviderFactory> dataProviderClass = findDataProviderImpl(); // Find the constructor that matches the arguments passed. final DataProviderFactory factory; try { Constructor<? extends DataProviderFactory> dataProviderConstructor = null; final Constructor[] constructors = dataProviderClass.getDeclaredConstructors(); for (final Constructor constructor : constructors) { final Class<?>[] params = constructor.getParameterTypes(); boolean matches = false; // Ensure that all the argument match if (args.length == params.length) { matches = true; for (int i = 0; i < params.length; i++) { if (!params[i].isAssignableFrom(args[i].getClass())) { matches = false; } } } // If the constructor matches then break the loop, as we've found the matching constructor if (matches) { dataProviderConstructor = constructor; break; } } // Make sure a constructor was found if (dataProviderConstructor != null) { factory = dataProviderConstructor.newInstance(args); } else { factory = null; } } catch (Exception e) { throw new RuntimeException(e); } return factory; }
class class_name[name] begin[{] method[create, return_type[type[DataProviderFactory]], modifier[public static], parameter[args]] begin[{] local_variable[type[Class], dataProviderClass] local_variable[type[DataProviderFactory], factory] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=dataProviderConstructor)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=extends, type=ReferenceType(arguments=None, dimensions=[], name=DataProviderFactory, sub_type=None))], dimensions=[], name=Constructor, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getDeclaredConstructors, postfix_operators=[], prefix_operators=[], qualifier=dataProviderClass, selectors=[], type_arguments=None), name=constructors)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[None], name=Constructor, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getParameterTypes, postfix_operators=[], prefix_operators=[], qualifier=constructor, selectors=[], type_arguments=None), name=params)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[None], name=Class, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=matches)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=args, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=params, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=matches, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=params, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=getClass, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], member=isAssignableFrom, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=matches, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=params, 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)])), IfStatement(condition=MemberReference(member=matches, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dataProviderConstructor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=constructor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=constructors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=constructor)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Constructor, sub_type=None))), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=dataProviderConstructor, 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=factory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=factory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=dataProviderConstructor, selectors=[], type_arguments=None)), label=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) return[member[.factory]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] identifier[DataProviderFactory] identifier[create] operator[SEP] Keyword[final] identifier[Object] operator[...] identifier[args] operator[SEP] { Keyword[final] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[DataProviderFactory] operator[>] identifier[dataProviderClass] operator[=] identifier[findDataProviderImpl] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[DataProviderFactory] identifier[factory] operator[SEP] Keyword[try] { identifier[Constructor] operator[<] operator[?] Keyword[extends] identifier[DataProviderFactory] operator[>] identifier[dataProviderConstructor] operator[=] Other[null] operator[SEP] Keyword[final] identifier[Constructor] operator[SEP] operator[SEP] identifier[constructors] operator[=] identifier[dataProviderClass] operator[SEP] identifier[getDeclaredConstructors] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[Constructor] identifier[constructor] operator[:] identifier[constructors] operator[SEP] { Keyword[final] identifier[Class] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[params] operator[=] identifier[constructor] operator[SEP] identifier[getParameterTypes] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[matches] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[args] operator[SEP] identifier[length] operator[==] identifier[params] operator[SEP] identifier[length] operator[SEP] { identifier[matches] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[params] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[params] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[args] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[matches] operator[=] literal[boolean] operator[SEP] } } } Keyword[if] operator[SEP] identifier[matches] operator[SEP] { identifier[dataProviderConstructor] operator[=] identifier[constructor] operator[SEP] Keyword[break] operator[SEP] } } Keyword[if] operator[SEP] identifier[dataProviderConstructor] operator[!=] Other[null] operator[SEP] { identifier[factory] operator[=] identifier[dataProviderConstructor] operator[SEP] identifier[newInstance] operator[SEP] identifier[args] operator[SEP] operator[SEP] } Keyword[else] { identifier[factory] operator[=] Other[null] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[return] identifier[factory] operator[SEP] }
void tagparse(Dap2Parse parsestate, int kind) throws ParseException { /* Create the storage object corresponding to what we are parsing */ String expected = parseactual(); switch (kind) { case SCAN_DATASET: parseClass = DapDDS; if(ddsobject == null) throw new ParseException("DapParse: found DDS, expected " + expected); break; case SCAN_ATTR: parseClass = DapDAS; if(dasobject == null) throw new ParseException("DapParse: found DAS, expected " + parseactual()); lexstate.dassetup(); break; case SCAN_ERROR: parseClass = DapERR; if(errobject == null) throw new ParseException("DapParse: found error{}, expected " + parseactual()); break; default: throw new ParseException("Unknown tag argument: " + kind); } }
class class_name[name] begin[{] method[tagparse, return_type[void], modifier[default], parameter[parsestate, kind]] begin[{] local_variable[type[String], expected] SwitchStatement(cases=[SwitchStatementCase(case=['SCAN_DATASET'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=parseClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=DapDDS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ddsobject, 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=ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DapParse: found DDS, expected "), operandr=MemberReference(member=expected, 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=ParseException, sub_type=None)), label=None)), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['SCAN_ATTR'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=parseClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=DapDAS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=dasobject, 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=ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DapParse: found DAS, expected "), operandr=MethodInvocation(arguments=[], member=parseactual, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ParseException, sub_type=None)), label=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=dassetup, postfix_operators=[], prefix_operators=[], qualifier=lexstate, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['SCAN_ERROR'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=parseClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=DapERR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=errobject, 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=ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DapParse: found error{}, expected "), operandr=MethodInvocation(arguments=[], member=parseactual, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ParseException, sub_type=None)), label=None)), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unknown tag argument: "), operandr=MemberReference(member=kind, 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=ParseException, sub_type=None)), label=None)])], expression=MemberReference(member=kind, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
Keyword[void] identifier[tagparse] operator[SEP] identifier[Dap2Parse] identifier[parsestate] , Keyword[int] identifier[kind] operator[SEP] Keyword[throws] identifier[ParseException] { identifier[String] identifier[expected] operator[=] identifier[parseactual] operator[SEP] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[kind] operator[SEP] { Keyword[case] identifier[SCAN_DATASET] operator[:] identifier[parseClass] operator[=] identifier[DapDDS] operator[SEP] Keyword[if] operator[SEP] identifier[ddsobject] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[ParseException] operator[SEP] literal[String] operator[+] identifier[expected] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[SCAN_ATTR] operator[:] identifier[parseClass] operator[=] identifier[DapDAS] operator[SEP] Keyword[if] operator[SEP] identifier[dasobject] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[ParseException] operator[SEP] literal[String] operator[+] identifier[parseactual] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[lexstate] operator[SEP] identifier[dassetup] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[SCAN_ERROR] operator[:] identifier[parseClass] operator[=] identifier[DapERR] operator[SEP] Keyword[if] operator[SEP] identifier[errobject] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[ParseException] operator[SEP] literal[String] operator[+] identifier[parseactual] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[ParseException] operator[SEP] literal[String] operator[+] identifier[kind] operator[SEP] operator[SEP] } }
private void createAccumulators(final OnDemandStatsProducer<S> producer, final Method method, Accumulate... annotations) { for (final Accumulate annotation : annotations) if (annotation != null) AccumulatorUtil.getInstance().createAccumulator(producer, annotation, method); }
class class_name[name] begin[{] method[createAccumulators, return_type[void], modifier[private], parameter[producer, method, annotations]] begin[{] ForStatement(body=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=annotation, 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=[], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=AccumulatorUtil, selectors=[MethodInvocation(arguments=[MemberReference(member=producer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=annotation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createAccumulator, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)), control=EnhancedForControl(iterable=MemberReference(member=annotations, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=annotation)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Accumulate, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[createAccumulators] operator[SEP] Keyword[final] identifier[OnDemandStatsProducer] operator[<] identifier[S] operator[>] identifier[producer] , Keyword[final] identifier[Method] identifier[method] , identifier[Accumulate] operator[...] identifier[annotations] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] identifier[Accumulate] identifier[annotation] operator[:] identifier[annotations] operator[SEP] Keyword[if] operator[SEP] identifier[annotation] operator[!=] Other[null] operator[SEP] identifier[AccumulatorUtil] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[createAccumulator] operator[SEP] identifier[producer] , identifier[annotation] , identifier[method] operator[SEP] operator[SEP] }
public static File [] getFilesWithPrefix(File dir, final String prefix) { FileFilter prefixFilter = new FileFilter() { public boolean accept(File pathname) { return pathname.getName().toLowerCase(). startsWith(prefix.toLowerCase()); } }; return dir.listFiles(prefixFilter); }
class class_name[name] begin[{] method[getFilesWithPrefix, return_type[type[File]], modifier[public static], parameter[dir, prefix]] begin[{] local_variable[type[FileFilter], prefixFilter] return[call[dir.listFiles, parameter[member[.prefixFilter]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[File] operator[SEP] operator[SEP] identifier[getFilesWithPrefix] operator[SEP] identifier[File] identifier[dir] , Keyword[final] identifier[String] identifier[prefix] operator[SEP] { identifier[FileFilter] identifier[prefixFilter] operator[=] Keyword[new] identifier[FileFilter] operator[SEP] operator[SEP] { Keyword[public] Keyword[boolean] identifier[accept] operator[SEP] identifier[File] identifier[pathname] operator[SEP] { Keyword[return] identifier[pathname] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] identifier[prefix] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] Keyword[return] identifier[dir] operator[SEP] identifier[listFiles] operator[SEP] identifier[prefixFilter] operator[SEP] operator[SEP] }
protected String getStringMethodParam(String methodName, String paramKey, String defaultValue) { if (CommonUtils.isEmpty(configContext)) { return defaultValue; } String o = (String) configContext.get(buildMethodKey(methodName, paramKey)); if (o == null) { o = (String) configContext.get(paramKey); return o == null ? defaultValue : o; } else { return o; } }
class class_name[name] begin[{] method[getStringMethodParam, return_type[type[String]], modifier[protected], parameter[methodName, paramKey, defaultValue]] begin[{] if[call[CommonUtils.isEmpty, parameter[member[.configContext]]]] begin[{] return[member[.defaultValue]] else begin[{] None end[}] local_variable[type[String], o] if[binary_operation[member[.o], ==, literal[null]]] begin[{] assign[member[.o], Cast(expression=MethodInvocation(arguments=[MemberReference(member=paramKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=configContext, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=defaultValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] else begin[{] return[member[.o]] end[}] end[}] END[}]
Keyword[protected] identifier[String] identifier[getStringMethodParam] operator[SEP] identifier[String] identifier[methodName] , identifier[String] identifier[paramKey] , identifier[String] identifier[defaultValue] operator[SEP] { Keyword[if] operator[SEP] identifier[CommonUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[configContext] operator[SEP] operator[SEP] { Keyword[return] identifier[defaultValue] operator[SEP] } identifier[String] identifier[o] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[configContext] operator[SEP] identifier[get] operator[SEP] identifier[buildMethodKey] operator[SEP] identifier[methodName] , identifier[paramKey] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[o] operator[==] Other[null] operator[SEP] { identifier[o] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[configContext] operator[SEP] identifier[get] operator[SEP] identifier[paramKey] operator[SEP] operator[SEP] Keyword[return] identifier[o] operator[==] Other[null] operator[?] identifier[defaultValue] operator[:] identifier[o] operator[SEP] } Keyword[else] { Keyword[return] identifier[o] operator[SEP] } }
public static <T, P> T detectWith( Iterable<T> iterable, Predicate2<? super T, ? super P> predicate, P parameter) { if (iterable instanceof MutableCollection) { return ((MutableCollection<T>) iterable).detectWith(predicate, parameter); } if (iterable instanceof ArrayList) { return ArrayListIterate.detectWith((ArrayList<T>) iterable, predicate, parameter); } if (iterable instanceof RandomAccess) { return RandomAccessListIterate.detectWith((List<T>) iterable, predicate, parameter); } if (iterable != null) { return IterableIterate.detectWith(iterable, predicate, parameter); } throw new IllegalArgumentException("Cannot perform detectWith on null"); }
class class_name[name] begin[{] method[detectWith, return_type[type[T]], modifier[public static], parameter[iterable, predicate, parameter]] begin[{] if[binary_operation[member[.iterable], instanceof, type[MutableCollection]]] begin[{] return[Cast(expression=MemberReference(member=iterable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=MutableCollection, sub_type=None))] else begin[{] None end[}] if[binary_operation[member[.iterable], instanceof, type[ArrayList]]] begin[{] return[call[ArrayListIterate.detectWith, parameter[Cast(expression=MemberReference(member=iterable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=ArrayList, sub_type=None)), member[.predicate], member[.parameter]]]] else begin[{] None end[}] if[binary_operation[member[.iterable], instanceof, type[RandomAccess]]] begin[{] return[call[RandomAccessListIterate.detectWith, parameter[Cast(expression=MemberReference(member=iterable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=List, sub_type=None)), member[.predicate], member[.parameter]]]] else begin[{] None end[}] if[binary_operation[member[.iterable], !=, literal[null]]] begin[{] return[call[IterableIterate.detectWith, parameter[member[.iterable], member[.predicate], member[.parameter]]]] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot perform detectWith on 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) end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[P] operator[>] identifier[T] identifier[detectWith] operator[SEP] identifier[Iterable] operator[<] identifier[T] operator[>] identifier[iterable] , identifier[Predicate2] operator[<] operator[?] Keyword[super] identifier[T] , operator[?] Keyword[super] identifier[P] operator[>] identifier[predicate] , identifier[P] identifier[parameter] operator[SEP] { Keyword[if] operator[SEP] identifier[iterable] Keyword[instanceof] identifier[MutableCollection] operator[SEP] { Keyword[return] operator[SEP] operator[SEP] identifier[MutableCollection] operator[<] identifier[T] operator[>] operator[SEP] identifier[iterable] operator[SEP] operator[SEP] identifier[detectWith] operator[SEP] identifier[predicate] , identifier[parameter] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[iterable] Keyword[instanceof] identifier[ArrayList] operator[SEP] { Keyword[return] identifier[ArrayListIterate] operator[SEP] identifier[detectWith] operator[SEP] operator[SEP] identifier[ArrayList] operator[<] identifier[T] operator[>] operator[SEP] identifier[iterable] , identifier[predicate] , identifier[parameter] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[iterable] Keyword[instanceof] identifier[RandomAccess] operator[SEP] { Keyword[return] identifier[RandomAccessListIterate] operator[SEP] identifier[detectWith] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[T] operator[>] operator[SEP] identifier[iterable] , identifier[predicate] , identifier[parameter] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[iterable] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[IterableIterate] operator[SEP] identifier[detectWith] operator[SEP] identifier[iterable] , identifier[predicate] , identifier[parameter] operator[SEP] operator[SEP] } Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] }
void set_value() throws DevFailed { switch(data_type) { case Tango_DEV_BOOLEAN: super.set_value(bool_val); break; case Tango_DEV_SHORT: super.set_value(short_val); break; case Tango_DEV_LONG: super.set_value(long_val); break; case Tango_DEV_LONG64: super.set_value(long64_val); break; case Tango_DEV_DOUBLE: super.set_value(double_val); break; case Tango_DEV_STRING: super.set_value(str_val); break; } }
class class_name[name] begin[{] method[set_value, return_type[void], modifier[default], parameter[]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['Tango_DEV_BOOLEAN'], statements=[StatementExpression(expression=SuperMethodInvocation(arguments=[MemberReference(member=bool_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=set_value, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['Tango_DEV_SHORT'], statements=[StatementExpression(expression=SuperMethodInvocation(arguments=[MemberReference(member=short_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=set_value, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['Tango_DEV_LONG'], statements=[StatementExpression(expression=SuperMethodInvocation(arguments=[MemberReference(member=long_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=set_value, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['Tango_DEV_LONG64'], statements=[StatementExpression(expression=SuperMethodInvocation(arguments=[MemberReference(member=long64_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=set_value, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['Tango_DEV_DOUBLE'], statements=[StatementExpression(expression=SuperMethodInvocation(arguments=[MemberReference(member=double_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=set_value, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['Tango_DEV_STRING'], statements=[StatementExpression(expression=SuperMethodInvocation(arguments=[MemberReference(member=str_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=set_value, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=data_type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
Keyword[void] identifier[set_value] operator[SEP] operator[SEP] Keyword[throws] identifier[DevFailed] { Keyword[switch] operator[SEP] identifier[data_type] operator[SEP] { Keyword[case] identifier[Tango_DEV_BOOLEAN] operator[:] Keyword[super] operator[SEP] identifier[set_value] operator[SEP] identifier[bool_val] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Tango_DEV_SHORT] operator[:] Keyword[super] operator[SEP] identifier[set_value] operator[SEP] identifier[short_val] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Tango_DEV_LONG] operator[:] Keyword[super] operator[SEP] identifier[set_value] operator[SEP] identifier[long_val] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Tango_DEV_LONG64] operator[:] Keyword[super] operator[SEP] identifier[set_value] operator[SEP] identifier[long64_val] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Tango_DEV_DOUBLE] operator[:] Keyword[super] operator[SEP] identifier[set_value] operator[SEP] identifier[double_val] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Tango_DEV_STRING] operator[:] Keyword[super] operator[SEP] identifier[set_value] operator[SEP] identifier[str_val] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } }
@Override public CreateQueueResult createQueue(CreateQueueRequest request) { request = beforeClientExecution(request); return executeCreateQueue(request); }
class class_name[name] begin[{] method[createQueue, return_type[type[CreateQueueResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeCreateQueue, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CreateQueueResult] identifier[createQueue] operator[SEP] identifier[CreateQueueRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeCreateQueue] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public Map<String, T> output(@NonNull List<String> variables, Map<String, T> placeholderValues) { Preconditions.checkState(!variables.isEmpty(), "Variables to perform forward pass for must not be empty"); List<String> sdPlaceholders = sameDiff.inputs(); Preconditions.checkState(sdPlaceholders == null || sdPlaceholders.isEmpty() || (placeholderValues != null && placeholderValues.size() == sdPlaceholders.size() && placeholderValues.keySet().containsAll(sdPlaceholders)), "Attempting to perform inference with invalid placeholders: SameDiff instance has placeholder variables %s, placeholders provided for inference: %s", sdPlaceholders, (placeholderValues == null ? null : placeholderValues.keySet())); //Step 0: validation - that variables exist, placeholders have arrays, etc for (String s : variables) { Preconditions.checkState(sameDiff.variableMap().containsKey(s), "Requested output variable %s does not exist in SameDiff instance", s); } placeholderValues = preprocessPlaceholders(placeholderValues); //Clear state from past availableForExec.clear(); availableForExecSet.clear(); subgraph.clear(); execInputs.clear(); execInputsAllIter.clear(); execConstInputs.clear(); nodeOutputs.clear(); //TODO eventually we'll have cache here for later execs... main challenge is detecting in-place array modifications and invalidating old results tensorArrays.clear(); //Step 1: determine subgraph structure we actually need to execute //Basic plan: work backwards from the variables we want, based on the graph structure, to work out what // we actually need to execute initSubgraph(variables); //Step 2: execute in any order, until we have all required nodeOutputs /* The idea is simple: we start off with a set of "available to execute" variables - just the placeholders and constants at this point. Then, we remove an "available to execute" node and execute it. Execution may be: (a) For constants and placeholders: just looking up the value (b) For variables as outputs of ops: actually executing the op After execution, we look at the graph structure and determine what that now executed/calculated variable is an input to. If all inputs are available for the op, we mark all output variables of that op as available for execution. We stop computation once all the required outputs are available. At this point, subgraph may NOT be empty - for example, switch ops may cause entire branches of the graph to be skipped. */ Map<String, T> out = new HashMap<>(); int step = 0; while (out.size() < variables.size()) { if(availableForExec.size() == 0){ int missingCount = variables.size() - out.size(); StringBuilder sb = new StringBuilder(); sb.append("No variable are available for execution at step ") .append(step).append(": ").append(missingCount).append(" values remaining"); Set<String> missing = new HashSet<>(); for(String s : variables){ if(!out.containsKey(s)){ missing.add(s); } } if(missingCount <= 10){ sb.append(". Missing variables: "); sb.append(missing); } else { sb.append(". First 10 missing variables: "); Iterator<String> iter = missing.iterator(); for( int i=0; i<10 && iter.hasNext(); i++ ){ if(i > 0) sb.append(","); sb.append(iter.next()); } } String s = sb.toString(); throw new IllegalStateException(s); } //Get any variable and execute it's corresponding op VarId varToExec = availableForExec.remove(); availableForExecSet.remove(varToExec); if (nodeOutputs.containsKey(varToExec)) { //Already processed this one. May occur if execution was triggered by a different output of a multi-output op //But we'll still update its descendants to ensure they are marked as available if (variables.contains(varToExec.getVariable())) { //Check if required output out.put(varToExec.getVariable(), nodeOutputs.get(varToExec)); } updateDescendentsForExec(step, varToExec); continue; } //Get inputs to this variable. May be actual op inputs, or just control dependencies Set<VarId> inputsToVar = execInputs.get(varToExec); VarId allIterInputVar = newVarId(varToExec.getVariable(), varToExec.getFrame(), 0, varToExec.getParentFrame()); Set<VarId> inputsToVarAllIter = execInputsAllIter.get(allIterInputVar); Set<String> constPhForVar = execConstInputs.get(varToExec.getVariable()); log.trace("Beginning execution step {}: variable {}", step, varToExec); if (sameDiff.getVariable(varToExec.getVariable()).isPlaceHolder()) { //Variable is placeholder: do lookup nodeOutputs.put(varToExec, placeholderValues.get(varToExec.getVariable())); updateDescendentsForExec(step, varToExec); //Check + mark descendants as available for exec if (variables.contains(varToExec.getVariable())) { //Check if required output out.put(varToExec.getVariable(), placeholderValues.get(varToExec.getVariable())); } } else if (sameDiff.getVariable(varToExec.getVariable()).isConstant() || sameDiff.getVariable(varToExec.getVariable()).getVariableType() == VariableType.VARIABLE) { //Variable is constant: do lookup //OR variable is VARIABLE type - i.e., a trainable parameter... T phArr = getConstantOrVariable(varToExec.getVariable()); Preconditions.checkNotNull(phArr, "Encountered null placeholder array for constant: %s", varToExec); nodeOutputs.put(varToExec, phArr); updateDescendentsForExec(step, varToExec); //Check + mark descendants as available for exec if (variables.contains(varToExec.getVariable())) { //Check if required output out.put(varToExec.getVariable(), phArr); } } else if (sameDiff.getVariableOutputFunction(varToExec.getVariable()) != null) { //Variable is the output of an op -> execute op String opName = sameDiff.getVariables().get(varToExec.getVariable()).getOutputOfOp(); //Execute op FrameIter frameIter = varToExec.toFrameIter(); O parameterizedOp = getAndParameterizeOp(opName, frameIter, inputsToVar, inputsToVarAllIter, constPhForVar, placeholderValues); T[] opOutputValues = getOutputs(parameterizedOp, frameIter, inputsToVar, inputsToVarAllIter, constPhForVar); //Post execution: work out what is now available for exec String[] opOutputVarNames = sameDiff.getFunctionById(opName).outputVariablesNames(); Preconditions.checkState(opOutputValues.length == opOutputVarNames.length, "Unexpected number of outputs from executed op %s:" + " got %s outputs when %s outputs were expected (%s)", parameterizedOp.getClass().getSimpleName(), opOutputValues.length, opOutputVarNames.length, opOutputVarNames); for (int i = 0; i < opOutputVarNames.length; i++) { if (opOutputValues[i] == null && parameterizedOp instanceof Switch) { //Skip null - for switch op only. Switch op forwards input to only one of its outputs //All other ops should not continue; } Preconditions.checkNotNull(opOutputValues[i], "Encountered null output (output %s) for op %s at execution step %s", i, parameterizedOp.getClass().getSimpleName(), step); VarId outputVarId; boolean addDummyOutput = false; if (parameterizedOp instanceof Enter) { //Enter op: output is variable in a new (specified) frame, iteration 0. String frame = ((Enter) parameterizedOp).getFrameName(); boolean isConstant = ((Enter) parameterizedOp).isConstant(); FrameIter outParentFrame = varToExec.getParentFrame(); if(isConstant && outParentFrame != null){ //For enter nodes that are constants, we want iteration 0 in all frames in the heirarchy //For example, const -> Enter(a) -> Enter(b) -> op; in this case, the input to Op (at any frame/iteration) should should // be the constant value - which is recorded as (frame="a",iter=0,parent=(frame="b",iter=0)) outParentFrame = outParentFrame.clone(); FrameIter toZero = outParentFrame; while(toZero != null){ toZero.setIteration(0); toZero = toZero.getParentFrame(); } } outputVarId = newVarId(opOutputVarNames[i], frame, 0, outParentFrame); addDummyOutput = true; } else if (parameterizedOp instanceof Exit) { //Exit node forwards input to parent frame (which is already reflected in varToExec) outputVarId = newVarId(opOutputVarNames[i], varToExec.getFrame(), varToExec.getIteration(), varToExec.getParentFrame()); addDummyOutput = true; } else if (parameterizedOp instanceof NextIteration) { //NextIteration op: forwards its single input to its output varible in the current frame, but increments the iteration number //Note that varToExec has already had its iteration number incremented by 1 (relative to its input) in updateDescendentsForExec... so don't increment here outputVarId = newVarId(opOutputVarNames[i], varToExec.getFrame(), varToExec.getIteration(), varToExec.getParentFrame()); addDummyOutput = true; } else if (parameterizedOp instanceof LoopCond) { //LoopCond just forwards input to output outputVarId = newVarId(opOutputVarNames[i], varToExec.getFrame(), varToExec.getIteration(), varToExec.getParentFrame()); addDummyOutput = true; } else { //Standard ops - output variable has same frame and iteration number as the input(s) outputVarId = newVarId(opOutputVarNames[i], varToExec.getFrame(), varToExec.getIteration(), varToExec.getParentFrame()); } if(addDummyOutput){ //For ops like enter/exit/nextiteration, these don't have a real output for that node //But, we still want an entry in nodeOutputs, which we also use for checking if an op has already been executed nodeOutputs.put(newVarId(opOutputVarNames[i], varToExec.getFrame(), varToExec.getIteration(), varToExec.getParentFrame()), null); } nodeOutputs.put(outputVarId, opOutputValues[i]); updateDescendentsForExec(step, outputVarId); //Check + mark descendants as available for exec if (variables.contains(opOutputVarNames[i])) { //Check if required output out.put(opOutputVarNames[i], opOutputValues[i]); } } } else { Variable v = sameDiff.getVariables().get(varToExec.getVariable()); throw new IllegalStateException("Unable to execute variable " + varToExec + " of type " + v.getVariable().getVariableType()); } step++; } //TODO under what circumstances should we clear the nodeOutputs map? //TODO when should we close the workspace? (Might want to leave it open if we expect to re-use) return out; }
class class_name[name] begin[{] method[output, return_type[type[Map]], modifier[public], parameter[variables, placeholderValues]] begin[{] call[Preconditions.checkState, parameter[call[variables.isEmpty, parameter[]], literal["Variables to perform forward pass for must not be empty"]]] local_variable[type[List], sdPlaceholders] call[Preconditions.checkState, parameter[binary_operation[binary_operation[binary_operation[member[.sdPlaceholders], ==, literal[null]], ||, call[sdPlaceholders.isEmpty, parameter[]]], ||, binary_operation[binary_operation[binary_operation[member[.placeholderValues], !=, literal[null]], &&, binary_operation[call[placeholderValues.size, parameter[]], ==, call[sdPlaceholders.size, parameter[]]]], &&, call[placeholderValues.keySet, parameter[]]]], literal["Attempting to perform inference with invalid placeholders: SameDiff instance has placeholder variables %s, placeholders provided for inference: %s"], member[.sdPlaceholders], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=placeholderValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=placeholderValues, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=variableMap, postfix_operators=[], prefix_operators=[], qualifier=sameDiff, selectors=[MethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Requested output variable %s does not exist in SameDiff instance"), MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkState, postfix_operators=[], prefix_operators=[], qualifier=Preconditions, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=variables, 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) assign[member[.placeholderValues], call[.preprocessPlaceholders, parameter[member[.placeholderValues]]]] call[availableForExec.clear, parameter[]] call[availableForExecSet.clear, parameter[]] call[subgraph.clear, parameter[]] call[execInputs.clear, parameter[]] call[execInputsAllIter.clear, parameter[]] call[execConstInputs.clear, parameter[]] call[nodeOutputs.clear, parameter[]] call[tensorArrays.clear, parameter[]] call[.initSubgraph, parameter[member[.variables]]] local_variable[type[Map], out] local_variable[type[int], step] while[binary_operation[call[out.size, parameter[]], <, call[variables.size, parameter[]]]] begin[{] if[binary_operation[call[availableForExec.size, parameter[]], ==, literal[0]]] begin[{] local_variable[type[int], missingCount] local_variable[type[StringBuilder], sb] call[sb.append, parameter[literal["No variable are available for execution at step "]]] local_variable[type[Set], missing] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=['!'], qualifier=out, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=missing, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=variables, 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) if[binary_operation[member[.missingCount], <=, literal[10]]] begin[{] call[sb.append, parameter[literal[". Missing variables: "]]] call[sb.append, parameter[member[.missing]]] else begin[{] call[sb.append, parameter[literal[". First 10 missing variables: "]]] local_variable[type[Iterator], iter] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=",")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=iter, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10), operator=<), operandr=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=iter, 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[}] local_variable[type[String], s] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=s, 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=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[VarId], varToExec] call[availableForExecSet.remove, parameter[member[.varToExec]]] if[call[nodeOutputs.containsKey, parameter[member[.varToExec]]]] begin[{] if[call[variables.contains, parameter[call[varToExec.getVariable, parameter[]]]]] begin[{] call[out.put, parameter[call[varToExec.getVariable, parameter[]], call[nodeOutputs.get, parameter[member[.varToExec]]]]] else begin[{] None end[}] call[.updateDescendentsForExec, parameter[member[.step], member[.varToExec]]] ContinueStatement(goto=None, label=None) else begin[{] None end[}] local_variable[type[Set], inputsToVar] local_variable[type[VarId], allIterInputVar] local_variable[type[Set], inputsToVarAllIter] local_variable[type[Set], constPhForVar] call[log.trace, parameter[literal["Beginning execution step {}: variable {}"], member[.step], member[.varToExec]]] if[call[sameDiff.getVariable, parameter[call[varToExec.getVariable, parameter[]]]]] begin[{] call[nodeOutputs.put, parameter[member[.varToExec], call[placeholderValues.get, parameter[call[varToExec.getVariable, parameter[]]]]]] call[.updateDescendentsForExec, parameter[member[.step], member[.varToExec]]] if[call[variables.contains, parameter[call[varToExec.getVariable, parameter[]]]]] begin[{] call[out.put, parameter[call[varToExec.getVariable, parameter[]], call[placeholderValues.get, parameter[call[varToExec.getVariable, parameter[]]]]]] else begin[{] None end[}] else begin[{] if[binary_operation[call[sameDiff.getVariable, parameter[call[varToExec.getVariable, parameter[]]]], ||, binary_operation[call[sameDiff.getVariable, parameter[call[varToExec.getVariable, parameter[]]]], ==, member[VariableType.VARIABLE]]]] begin[{] local_variable[type[T], phArr] call[Preconditions.checkNotNull, parameter[member[.phArr], literal["Encountered null placeholder array for constant: %s"], member[.varToExec]]] call[nodeOutputs.put, parameter[member[.varToExec], member[.phArr]]] call[.updateDescendentsForExec, parameter[member[.step], member[.varToExec]]] if[call[variables.contains, parameter[call[varToExec.getVariable, parameter[]]]]] begin[{] call[out.put, parameter[call[varToExec.getVariable, parameter[]], member[.phArr]]] else begin[{] None end[}] else begin[{] if[binary_operation[call[sameDiff.getVariableOutputFunction, parameter[call[varToExec.getVariable, parameter[]]]], !=, literal[null]]] begin[{] local_variable[type[String], opName] local_variable[type[FrameIter], frameIter] local_variable[type[O], parameterizedOp] local_variable[type[T], opOutputValues] local_variable[type[String], opOutputVarNames] call[Preconditions.checkState, parameter[binary_operation[member[opOutputValues.length], ==, member[opOutputVarNames.length]], binary_operation[literal["Unexpected number of outputs from executed op %s:"], +, literal[" got %s outputs when %s outputs were expected (%s)"]], call[parameterizedOp.getClass, parameter[]], member[opOutputValues.length], member[opOutputVarNames.length], member[.opOutputVarNames]]] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=opOutputValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=BinaryOperation(operandl=MemberReference(member=parameterizedOp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Switch, sub_type=None), operator=instanceof), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=opOutputValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Encountered null output (output %s) for op %s at execution step %s"), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=parameterizedOp, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=step, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkNotNull, postfix_operators=[], prefix_operators=[], qualifier=Preconditions, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=outputVarId)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=VarId, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=addDummyOutput)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=parameterizedOp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Enter, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=parameterizedOp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Exit, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=parameterizedOp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=NextIteration, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=parameterizedOp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=LoopCond, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=outputVarId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=opOutputVarNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), MethodInvocation(arguments=[], member=getFrame, postfix_operators=[], prefix_operators=[], qualifier=varToExec, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getIteration, postfix_operators=[], prefix_operators=[], qualifier=varToExec, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getParentFrame, postfix_operators=[], prefix_operators=[], qualifier=varToExec, selectors=[], type_arguments=None)], member=newVarId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=outputVarId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=opOutputVarNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), MethodInvocation(arguments=[], member=getFrame, postfix_operators=[], prefix_operators=[], qualifier=varToExec, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getIteration, postfix_operators=[], prefix_operators=[], qualifier=varToExec, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getParentFrame, postfix_operators=[], prefix_operators=[], qualifier=varToExec, selectors=[], type_arguments=None)], member=newVarId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=addDummyOutput, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=outputVarId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=opOutputVarNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), MethodInvocation(arguments=[], member=getFrame, postfix_operators=[], prefix_operators=[], qualifier=varToExec, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getIteration, postfix_operators=[], prefix_operators=[], qualifier=varToExec, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getParentFrame, postfix_operators=[], prefix_operators=[], qualifier=varToExec, selectors=[], type_arguments=None)], member=newVarId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=addDummyOutput, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=outputVarId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=opOutputVarNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), MethodInvocation(arguments=[], member=getFrame, postfix_operators=[], prefix_operators=[], qualifier=varToExec, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getIteration, postfix_operators=[], prefix_operators=[], qualifier=varToExec, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getParentFrame, postfix_operators=[], prefix_operators=[], qualifier=varToExec, selectors=[], type_arguments=None)], member=newVarId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=addDummyOutput, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=parameterizedOp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Enter, sub_type=None)), name=frame)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=parameterizedOp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Enter, sub_type=None)), name=isConstant)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getParentFrame, postfix_operators=[], prefix_operators=[], qualifier=varToExec, selectors=[], type_arguments=None), name=outParentFrame)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FrameIter, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=isConstant, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=outParentFrame, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=outParentFrame, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=clone, postfix_operators=[], prefix_operators=[], qualifier=outParentFrame, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=outParentFrame, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=toZero)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FrameIter, sub_type=None)), WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=setIteration, postfix_operators=[], prefix_operators=[], qualifier=toZero, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=toZero, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getParentFrame, postfix_operators=[], prefix_operators=[], qualifier=toZero, selectors=[], type_arguments=None)), label=None)]), condition=BinaryOperation(operandl=MemberReference(member=toZero, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=outputVarId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=opOutputVarNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), MemberReference(member=frame, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=outParentFrame, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=newVarId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=addDummyOutput, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)])), IfStatement(condition=MemberReference(member=addDummyOutput, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=opOutputVarNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), MethodInvocation(arguments=[], member=getFrame, postfix_operators=[], prefix_operators=[], qualifier=varToExec, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getIteration, postfix_operators=[], prefix_operators=[], qualifier=varToExec, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getParentFrame, postfix_operators=[], prefix_operators=[], qualifier=varToExec, selectors=[], type_arguments=None)], member=newVarId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=put, postfix_operators=[], prefix_operators=[], qualifier=nodeOutputs, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=outputVarId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=opOutputValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=put, postfix_operators=[], prefix_operators=[], qualifier=nodeOutputs, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=step, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=outputVarId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=updateDescendentsForExec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=opOutputVarNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=contains, postfix_operators=[], prefix_operators=[], qualifier=variables, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=opOutputVarNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), MemberReference(member=opOutputValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=put, postfix_operators=[], prefix_operators=[], qualifier=out, 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=opOutputVarNames, 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) else begin[{] local_variable[type[Variable], v] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to execute variable "), operandr=MemberReference(member=varToExec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" of type "), operator=+), operandr=MethodInvocation(arguments=[], member=getVariable, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[MethodInvocation(arguments=[], member=getVariableType, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) end[}] end[}] end[}] member[.step] end[}] return[member[.out]] end[}] END[}]
Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[T] operator[>] identifier[output] operator[SEP] annotation[@] identifier[NonNull] identifier[List] operator[<] identifier[String] operator[>] identifier[variables] , identifier[Map] operator[<] identifier[String] , identifier[T] operator[>] identifier[placeholderValues] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkState] operator[SEP] operator[!] identifier[variables] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[sdPlaceholders] operator[=] identifier[sameDiff] operator[SEP] identifier[inputs] operator[SEP] operator[SEP] operator[SEP] identifier[Preconditions] operator[SEP] identifier[checkState] operator[SEP] identifier[sdPlaceholders] operator[==] Other[null] operator[||] identifier[sdPlaceholders] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[||] operator[SEP] identifier[placeholderValues] operator[!=] Other[null] operator[&&] identifier[placeholderValues] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] identifier[sdPlaceholders] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[&&] identifier[placeholderValues] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] identifier[containsAll] operator[SEP] identifier[sdPlaceholders] operator[SEP] operator[SEP] , literal[String] , identifier[sdPlaceholders] , operator[SEP] identifier[placeholderValues] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[placeholderValues] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[s] operator[:] identifier[variables] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkState] operator[SEP] identifier[sameDiff] operator[SEP] identifier[variableMap] operator[SEP] operator[SEP] operator[SEP] identifier[containsKey] operator[SEP] identifier[s] operator[SEP] , literal[String] , identifier[s] operator[SEP] operator[SEP] } identifier[placeholderValues] operator[=] identifier[preprocessPlaceholders] operator[SEP] identifier[placeholderValues] operator[SEP] operator[SEP] identifier[availableForExec] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[availableForExecSet] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[subgraph] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[execInputs] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[execInputsAllIter] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[execConstInputs] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[nodeOutputs] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[tensorArrays] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[initSubgraph] operator[SEP] identifier[variables] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[T] operator[>] identifier[out] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[step] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] identifier[out] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[<] identifier[variables] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[availableForExec] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[int] identifier[missingCount] operator[=] identifier[variables] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] identifier[out] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[step] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[missingCount] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[missing] operator[=] Keyword[new] identifier[HashSet] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[s] operator[:] identifier[variables] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[out] operator[SEP] identifier[containsKey] operator[SEP] identifier[s] operator[SEP] operator[SEP] { identifier[missing] operator[SEP] identifier[add] operator[SEP] identifier[s] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[missingCount] operator[<=] Other[10] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[missing] operator[SEP] operator[SEP] } Keyword[else] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Iterator] operator[<] identifier[String] operator[>] identifier[iter] operator[=] identifier[missing] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] Other[10] operator[&&] identifier[iter] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[i] operator[>] Other[0] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[iter] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } identifier[String] identifier[s] operator[=] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] identifier[s] operator[SEP] operator[SEP] } identifier[VarId] identifier[varToExec] operator[=] identifier[availableForExec] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] identifier[availableForExecSet] operator[SEP] identifier[remove] operator[SEP] identifier[varToExec] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nodeOutputs] operator[SEP] identifier[containsKey] operator[SEP] identifier[varToExec] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[variables] operator[SEP] identifier[contains] operator[SEP] identifier[varToExec] operator[SEP] identifier[getVariable] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[out] operator[SEP] identifier[put] operator[SEP] identifier[varToExec] operator[SEP] identifier[getVariable] operator[SEP] operator[SEP] , identifier[nodeOutputs] operator[SEP] identifier[get] operator[SEP] identifier[varToExec] operator[SEP] operator[SEP] operator[SEP] } identifier[updateDescendentsForExec] operator[SEP] identifier[step] , identifier[varToExec] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] } identifier[Set] operator[<] identifier[VarId] operator[>] identifier[inputsToVar] operator[=] identifier[execInputs] operator[SEP] identifier[get] operator[SEP] identifier[varToExec] operator[SEP] operator[SEP] identifier[VarId] identifier[allIterInputVar] operator[=] identifier[newVarId] operator[SEP] identifier[varToExec] operator[SEP] identifier[getVariable] operator[SEP] operator[SEP] , identifier[varToExec] operator[SEP] identifier[getFrame] operator[SEP] operator[SEP] , Other[0] , identifier[varToExec] operator[SEP] identifier[getParentFrame] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[VarId] operator[>] identifier[inputsToVarAllIter] operator[=] identifier[execInputsAllIter] operator[SEP] identifier[get] operator[SEP] identifier[allIterInputVar] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[constPhForVar] operator[=] identifier[execConstInputs] operator[SEP] identifier[get] operator[SEP] identifier[varToExec] operator[SEP] identifier[getVariable] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[trace] operator[SEP] literal[String] , identifier[step] , identifier[varToExec] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sameDiff] operator[SEP] identifier[getVariable] operator[SEP] identifier[varToExec] operator[SEP] identifier[getVariable] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[isPlaceHolder] operator[SEP] operator[SEP] operator[SEP] { identifier[nodeOutputs] operator[SEP] identifier[put] operator[SEP] identifier[varToExec] , identifier[placeholderValues] operator[SEP] identifier[get] operator[SEP] identifier[varToExec] operator[SEP] identifier[getVariable] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[updateDescendentsForExec] operator[SEP] identifier[step] , identifier[varToExec] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[variables] operator[SEP] identifier[contains] operator[SEP] identifier[varToExec] operator[SEP] identifier[getVariable] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[out] operator[SEP] identifier[put] operator[SEP] identifier[varToExec] operator[SEP] identifier[getVariable] operator[SEP] operator[SEP] , identifier[placeholderValues] operator[SEP] identifier[get] operator[SEP] identifier[varToExec] operator[SEP] identifier[getVariable] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[sameDiff] operator[SEP] identifier[getVariable] operator[SEP] identifier[varToExec] operator[SEP] identifier[getVariable] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[isConstant] operator[SEP] operator[SEP] operator[||] identifier[sameDiff] operator[SEP] identifier[getVariable] operator[SEP] identifier[varToExec] operator[SEP] identifier[getVariable] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getVariableType] operator[SEP] operator[SEP] operator[==] identifier[VariableType] operator[SEP] identifier[VARIABLE] operator[SEP] { identifier[T] identifier[phArr] operator[=] identifier[getConstantOrVariable] operator[SEP] identifier[varToExec] operator[SEP] identifier[getVariable] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[phArr] , literal[String] , identifier[varToExec] operator[SEP] operator[SEP] identifier[nodeOutputs] operator[SEP] identifier[put] operator[SEP] identifier[varToExec] , identifier[phArr] operator[SEP] operator[SEP] identifier[updateDescendentsForExec] operator[SEP] identifier[step] , identifier[varToExec] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[variables] operator[SEP] identifier[contains] operator[SEP] identifier[varToExec] operator[SEP] identifier[getVariable] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[out] operator[SEP] identifier[put] operator[SEP] identifier[varToExec] operator[SEP] identifier[getVariable] operator[SEP] operator[SEP] , identifier[phArr] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[sameDiff] operator[SEP] identifier[getVariableOutputFunction] operator[SEP] identifier[varToExec] operator[SEP] identifier[getVariable] operator[SEP] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[String] identifier[opName] operator[=] identifier[sameDiff] operator[SEP] identifier[getVariables] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[varToExec] operator[SEP] identifier[getVariable] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getOutputOfOp] operator[SEP] operator[SEP] operator[SEP] identifier[FrameIter] identifier[frameIter] operator[=] identifier[varToExec] operator[SEP] identifier[toFrameIter] operator[SEP] operator[SEP] operator[SEP] identifier[O] identifier[parameterizedOp] operator[=] identifier[getAndParameterizeOp] operator[SEP] identifier[opName] , identifier[frameIter] , identifier[inputsToVar] , identifier[inputsToVarAllIter] , identifier[constPhForVar] , identifier[placeholderValues] operator[SEP] operator[SEP] identifier[T] operator[SEP] operator[SEP] identifier[opOutputValues] operator[=] identifier[getOutputs] operator[SEP] identifier[parameterizedOp] , identifier[frameIter] , identifier[inputsToVar] , identifier[inputsToVarAllIter] , identifier[constPhForVar] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[opOutputVarNames] operator[=] identifier[sameDiff] operator[SEP] identifier[getFunctionById] operator[SEP] identifier[opName] operator[SEP] operator[SEP] identifier[outputVariablesNames] operator[SEP] operator[SEP] operator[SEP] identifier[Preconditions] operator[SEP] identifier[checkState] operator[SEP] identifier[opOutputValues] operator[SEP] identifier[length] operator[==] identifier[opOutputVarNames] operator[SEP] identifier[length] , literal[String] operator[+] literal[String] , identifier[parameterizedOp] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] , identifier[opOutputValues] operator[SEP] identifier[length] , identifier[opOutputVarNames] operator[SEP] identifier[length] , identifier[opOutputVarNames] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[opOutputVarNames] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[opOutputValues] operator[SEP] identifier[i] operator[SEP] operator[==] Other[null] operator[&&] identifier[parameterizedOp] Keyword[instanceof] identifier[Switch] operator[SEP] { Keyword[continue] operator[SEP] } identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[opOutputValues] operator[SEP] identifier[i] operator[SEP] , literal[String] , identifier[i] , identifier[parameterizedOp] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] , identifier[step] operator[SEP] operator[SEP] identifier[VarId] identifier[outputVarId] operator[SEP] Keyword[boolean] identifier[addDummyOutput] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[parameterizedOp] Keyword[instanceof] identifier[Enter] operator[SEP] { identifier[String] identifier[frame] operator[=] operator[SEP] operator[SEP] identifier[Enter] operator[SEP] identifier[parameterizedOp] operator[SEP] operator[SEP] identifier[getFrameName] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[isConstant] operator[=] operator[SEP] operator[SEP] identifier[Enter] operator[SEP] identifier[parameterizedOp] operator[SEP] operator[SEP] identifier[isConstant] operator[SEP] operator[SEP] operator[SEP] identifier[FrameIter] identifier[outParentFrame] operator[=] identifier[varToExec] operator[SEP] identifier[getParentFrame] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isConstant] operator[&&] identifier[outParentFrame] operator[!=] Other[null] operator[SEP] { identifier[outParentFrame] operator[=] identifier[outParentFrame] operator[SEP] identifier[clone] operator[SEP] operator[SEP] operator[SEP] identifier[FrameIter] identifier[toZero] operator[=] identifier[outParentFrame] operator[SEP] Keyword[while] operator[SEP] identifier[toZero] operator[!=] Other[null] operator[SEP] { identifier[toZero] operator[SEP] identifier[setIteration] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[toZero] operator[=] identifier[toZero] operator[SEP] identifier[getParentFrame] operator[SEP] operator[SEP] operator[SEP] } } identifier[outputVarId] operator[=] identifier[newVarId] operator[SEP] identifier[opOutputVarNames] operator[SEP] identifier[i] operator[SEP] , identifier[frame] , Other[0] , identifier[outParentFrame] operator[SEP] operator[SEP] identifier[addDummyOutput] operator[=] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[parameterizedOp] Keyword[instanceof] identifier[Exit] operator[SEP] { identifier[outputVarId] operator[=] identifier[newVarId] operator[SEP] identifier[opOutputVarNames] operator[SEP] identifier[i] operator[SEP] , identifier[varToExec] operator[SEP] identifier[getFrame] operator[SEP] operator[SEP] , identifier[varToExec] operator[SEP] identifier[getIteration] operator[SEP] operator[SEP] , identifier[varToExec] operator[SEP] identifier[getParentFrame] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addDummyOutput] operator[=] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[parameterizedOp] Keyword[instanceof] identifier[NextIteration] operator[SEP] { identifier[outputVarId] operator[=] identifier[newVarId] operator[SEP] identifier[opOutputVarNames] operator[SEP] identifier[i] operator[SEP] , identifier[varToExec] operator[SEP] identifier[getFrame] operator[SEP] operator[SEP] , identifier[varToExec] operator[SEP] identifier[getIteration] operator[SEP] operator[SEP] , identifier[varToExec] operator[SEP] identifier[getParentFrame] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addDummyOutput] operator[=] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[parameterizedOp] Keyword[instanceof] identifier[LoopCond] operator[SEP] { identifier[outputVarId] operator[=] identifier[newVarId] operator[SEP] identifier[opOutputVarNames] operator[SEP] identifier[i] operator[SEP] , identifier[varToExec] operator[SEP] identifier[getFrame] operator[SEP] operator[SEP] , identifier[varToExec] operator[SEP] identifier[getIteration] operator[SEP] operator[SEP] , identifier[varToExec] operator[SEP] identifier[getParentFrame] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addDummyOutput] operator[=] literal[boolean] operator[SEP] } Keyword[else] { identifier[outputVarId] operator[=] identifier[newVarId] operator[SEP] identifier[opOutputVarNames] operator[SEP] identifier[i] operator[SEP] , identifier[varToExec] operator[SEP] identifier[getFrame] operator[SEP] operator[SEP] , identifier[varToExec] operator[SEP] identifier[getIteration] operator[SEP] operator[SEP] , identifier[varToExec] operator[SEP] identifier[getParentFrame] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[addDummyOutput] operator[SEP] { identifier[nodeOutputs] operator[SEP] identifier[put] operator[SEP] identifier[newVarId] operator[SEP] identifier[opOutputVarNames] operator[SEP] identifier[i] operator[SEP] , identifier[varToExec] operator[SEP] identifier[getFrame] operator[SEP] operator[SEP] , identifier[varToExec] operator[SEP] identifier[getIteration] operator[SEP] operator[SEP] , identifier[varToExec] operator[SEP] identifier[getParentFrame] operator[SEP] operator[SEP] operator[SEP] , Other[null] operator[SEP] operator[SEP] } identifier[nodeOutputs] operator[SEP] identifier[put] operator[SEP] identifier[outputVarId] , identifier[opOutputValues] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] identifier[updateDescendentsForExec] operator[SEP] identifier[step] , identifier[outputVarId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[variables] operator[SEP] identifier[contains] operator[SEP] identifier[opOutputVarNames] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] { identifier[out] operator[SEP] identifier[put] operator[SEP] identifier[opOutputVarNames] operator[SEP] identifier[i] operator[SEP] , identifier[opOutputValues] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[else] { identifier[Variable] identifier[v] operator[=] identifier[sameDiff] operator[SEP] identifier[getVariables] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[varToExec] operator[SEP] identifier[getVariable] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[varToExec] operator[+] literal[String] operator[+] identifier[v] operator[SEP] identifier[getVariable] operator[SEP] operator[SEP] operator[SEP] identifier[getVariableType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[step] operator[++] operator[SEP] } Keyword[return] identifier[out] operator[SEP] }
synchronized boolean reload(int permit, boolean suspend) { return internalSetState(new ReloadTask(permit, suspend), InternalState.SERVER_STARTED, InternalState.RELOADING); }
class class_name[name] begin[{] method[reload, return_type[type[boolean]], modifier[synchronized], parameter[permit, suspend]] begin[{] return[call[.internalSetState, parameter[ClassCreator(arguments=[MemberReference(member=permit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=suspend, 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=ReloadTask, sub_type=None)), member[InternalState.SERVER_STARTED], member[InternalState.RELOADING]]]] end[}] END[}]
Keyword[synchronized] Keyword[boolean] identifier[reload] operator[SEP] Keyword[int] identifier[permit] , Keyword[boolean] identifier[suspend] operator[SEP] { Keyword[return] identifier[internalSetState] operator[SEP] Keyword[new] identifier[ReloadTask] operator[SEP] identifier[permit] , identifier[suspend] operator[SEP] , identifier[InternalState] operator[SEP] identifier[SERVER_STARTED] , identifier[InternalState] operator[SEP] identifier[RELOADING] operator[SEP] operator[SEP] }
public Object seek(String strSeekSign, int iOpenMode, String strKeyArea, String strFields, Object objKeyData) throws DBException, RemoteException { m_objCurrentKey = null; Object data = (Vector)m_mDataMap.get(objKeyData); if (data == null) data = Boolean.FALSE; else m_objCurrentKey = objKeyData; m_iCurrentRecord = -1; m_iterator = null; return data; }
class class_name[name] begin[{] method[seek, return_type[type[Object]], modifier[public], parameter[strSeekSign, iOpenMode, strKeyArea, strFields, objKeyData]] begin[{] assign[member[.m_objCurrentKey], literal[null]] local_variable[type[Object], data] if[binary_operation[member[.data], ==, literal[null]]] begin[{] assign[member[.data], member[Boolean.FALSE]] else begin[{] assign[member[.m_objCurrentKey], member[.objKeyData]] end[}] assign[member[.m_iCurrentRecord], literal[1]] assign[member[.m_iterator], literal[null]] return[member[.data]] end[}] END[}]
Keyword[public] identifier[Object] identifier[seek] operator[SEP] identifier[String] identifier[strSeekSign] , Keyword[int] identifier[iOpenMode] , identifier[String] identifier[strKeyArea] , identifier[String] identifier[strFields] , identifier[Object] identifier[objKeyData] operator[SEP] Keyword[throws] identifier[DBException] , identifier[RemoteException] { identifier[m_objCurrentKey] operator[=] Other[null] operator[SEP] identifier[Object] identifier[data] operator[=] operator[SEP] identifier[Vector] operator[SEP] identifier[m_mDataMap] operator[SEP] identifier[get] operator[SEP] identifier[objKeyData] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[data] operator[==] Other[null] operator[SEP] identifier[data] operator[=] identifier[Boolean] operator[SEP] identifier[FALSE] operator[SEP] Keyword[else] identifier[m_objCurrentKey] operator[=] identifier[objKeyData] operator[SEP] identifier[m_iCurrentRecord] operator[=] operator[-] Other[1] operator[SEP] identifier[m_iterator] operator[=] Other[null] operator[SEP] Keyword[return] identifier[data] operator[SEP] }
public void processResults(Document document) throws Throwable { Element root = document.getDocumentElement(); root.normalize(); // top element should testcase which has attributes for the outcome of the test // e.g <testcase classname="TheClass" name="theName(TheClass)" status="Error"><exception message="message" type="type">some text</exception></testcase> NamedNodeMap attributes = root.getAttributes(); String statusAsStr = attributes.getNamedItem("status").getNodeValue(); Status status = Status.valueOf(statusAsStr); if (status.equals(Status.Error) || status.equals(Status.Failure)) { throw getException(root, status); } }
class class_name[name] begin[{] method[processResults, return_type[void], modifier[public], parameter[document]] begin[{] local_variable[type[Element], root] call[root.normalize, parameter[]] local_variable[type[NamedNodeMap], attributes] local_variable[type[String], statusAsStr] local_variable[type[Status], status] if[binary_operation[call[status.equals, parameter[member[Status.Error]]], ||, call[status.equals, parameter[member[Status.Failure]]]]] begin[{] ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=root, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=status, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[processResults] operator[SEP] identifier[Document] identifier[document] operator[SEP] Keyword[throws] identifier[Throwable] { identifier[Element] identifier[root] operator[=] identifier[document] operator[SEP] identifier[getDocumentElement] operator[SEP] operator[SEP] operator[SEP] identifier[root] operator[SEP] identifier[normalize] operator[SEP] operator[SEP] operator[SEP] identifier[NamedNodeMap] identifier[attributes] operator[=] identifier[root] operator[SEP] identifier[getAttributes] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[statusAsStr] operator[=] identifier[attributes] operator[SEP] identifier[getNamedItem] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[getNodeValue] operator[SEP] operator[SEP] operator[SEP] identifier[Status] identifier[status] operator[=] identifier[Status] operator[SEP] identifier[valueOf] operator[SEP] identifier[statusAsStr] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[status] operator[SEP] identifier[equals] operator[SEP] identifier[Status] operator[SEP] identifier[Error] operator[SEP] operator[||] identifier[status] operator[SEP] identifier[equals] operator[SEP] identifier[Status] operator[SEP] identifier[Failure] operator[SEP] operator[SEP] { Keyword[throw] identifier[getException] operator[SEP] identifier[root] , identifier[status] operator[SEP] operator[SEP] } }
public EClass getOBD() { if (obdEClass == null) { obdEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(307); } return obdEClass; }
class class_name[name] begin[{] method[getOBD, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.obdEClass], ==, literal[null]]] begin[{] assign[member[.obdEClass], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], member=getEPackage, postfix_operators=[], prefix_operators=[], qualifier=EPackage.Registry.INSTANCE, selectors=[MethodInvocation(arguments=[], member=getEClassifiers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=307)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=EClass, sub_type=None))] else begin[{] None end[}] return[member[.obdEClass]] end[}] END[}]
Keyword[public] identifier[EClass] identifier[getOBD] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[obdEClass] operator[==] Other[null] operator[SEP] { identifier[obdEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[AfplibPackage] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[307] operator[SEP] operator[SEP] } Keyword[return] identifier[obdEClass] operator[SEP] }
public SheetConfiguration getCurrentSheetConfig() { String currentTabName = this.getCurrent().getCurrentTabName(); if (currentTabName == null) { return null; } return this.getSheetConfigMap().get(currentTabName); }
class class_name[name] begin[{] method[getCurrentSheetConfig, return_type[type[SheetConfiguration]], modifier[public], parameter[]] begin[{] local_variable[type[String], currentTabName] if[binary_operation[member[.currentTabName], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] return[THIS[call[None.getSheetConfigMap, parameter[]]call[None.get, parameter[member[.currentTabName]]]]] end[}] END[}]
Keyword[public] identifier[SheetConfiguration] identifier[getCurrentSheetConfig] operator[SEP] operator[SEP] { identifier[String] identifier[currentTabName] operator[=] Keyword[this] operator[SEP] identifier[getCurrent] operator[SEP] operator[SEP] operator[SEP] identifier[getCurrentTabName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[currentTabName] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] identifier[getSheetConfigMap] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[currentTabName] operator[SEP] operator[SEP] }
public static String getOrderByClause(Class<?> entityClass) { EntityTable table = getEntityTable(entityClass); if (table.getOrderByClause() != null) { return table.getOrderByClause(); } List<EntityColumn> orderEntityColumns = new ArrayList<EntityColumn>(); for (EntityColumn column : table.getEntityClassColumns()) { if (column.getOrderBy() != null) { orderEntityColumns.add(column); } } Collections.sort(orderEntityColumns, new Comparator<EntityColumn>() { @Override public int compare(EntityColumn o1, EntityColumn o2) { return o1.getOrderPriority() - o2.getOrderPriority(); } }); StringBuilder orderBy = new StringBuilder(); for (EntityColumn column : orderEntityColumns) { if (orderBy.length() != 0) { orderBy.append(","); } orderBy.append(column.getColumn()).append(" ").append(column.getOrderBy()); } table.setOrderByClause(orderBy.toString()); return table.getOrderByClause(); }
class class_name[name] begin[{] method[getOrderByClause, return_type[type[String]], modifier[public static], parameter[entityClass]] begin[{] local_variable[type[EntityTable], table] if[binary_operation[call[table.getOrderByClause, parameter[]], !=, literal[null]]] begin[{] return[call[table.getOrderByClause, parameter[]]] else begin[{] None end[}] local_variable[type[List], orderEntityColumns] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getOrderBy, postfix_operators=[], prefix_operators=[], qualifier=column, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=column, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=orderEntityColumns, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getEntityClassColumns, postfix_operators=[], prefix_operators=[], qualifier=table, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=column)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=EntityColumn, sub_type=None))), label=None) call[Collections.sort, parameter[member[.orderEntityColumns], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getOrderPriority, postfix_operators=[], prefix_operators=[], qualifier=o1, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getOrderPriority, postfix_operators=[], prefix_operators=[], qualifier=o2, selectors=[], type_arguments=None), operator=-), label=None)], documentation=None, modifiers={'public'}, name=compare, parameters=[FormalParameter(annotations=[], modifiers=set(), name=o1, type=ReferenceType(arguments=None, dimensions=[], name=EntityColumn, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=o2, type=ReferenceType(arguments=None, dimensions=[], name=EntityColumn, sub_type=None), varargs=False)], return_type=BasicType(dimensions=[], name=int), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=EntityColumn, sub_type=None))], dimensions=None, name=Comparator, sub_type=None))]] local_variable[type[StringBuilder], orderBy] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=orderBy, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=",")], member=append, postfix_operators=[], prefix_operators=[], qualifier=orderBy, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getColumn, postfix_operators=[], prefix_operators=[], qualifier=column, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=orderBy, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" ")], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getOrderBy, postfix_operators=[], prefix_operators=[], qualifier=column, selectors=[], type_arguments=None)], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=orderEntityColumns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=column)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=EntityColumn, sub_type=None))), label=None) call[table.setOrderByClause, parameter[call[orderBy.toString, parameter[]]]] return[call[table.getOrderByClause, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getOrderByClause] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[entityClass] operator[SEP] { identifier[EntityTable] identifier[table] operator[=] identifier[getEntityTable] operator[SEP] identifier[entityClass] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[table] operator[SEP] identifier[getOrderByClause] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[table] operator[SEP] identifier[getOrderByClause] operator[SEP] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[EntityColumn] operator[>] identifier[orderEntityColumns] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[EntityColumn] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[EntityColumn] identifier[column] operator[:] identifier[table] operator[SEP] identifier[getEntityClassColumns] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[column] operator[SEP] identifier[getOrderBy] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[orderEntityColumns] operator[SEP] identifier[add] operator[SEP] identifier[column] operator[SEP] operator[SEP] } } identifier[Collections] operator[SEP] identifier[sort] operator[SEP] identifier[orderEntityColumns] , Keyword[new] identifier[Comparator] operator[<] identifier[EntityColumn] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[compare] operator[SEP] identifier[EntityColumn] identifier[o1] , identifier[EntityColumn] identifier[o2] operator[SEP] { Keyword[return] identifier[o1] operator[SEP] identifier[getOrderPriority] operator[SEP] operator[SEP] operator[-] identifier[o2] operator[SEP] identifier[getOrderPriority] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[StringBuilder] identifier[orderBy] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[EntityColumn] identifier[column] operator[:] identifier[orderEntityColumns] operator[SEP] { Keyword[if] operator[SEP] identifier[orderBy] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[!=] Other[0] operator[SEP] { identifier[orderBy] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[orderBy] operator[SEP] identifier[append] operator[SEP] identifier[column] operator[SEP] identifier[getColumn] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[column] operator[SEP] identifier[getOrderBy] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[table] operator[SEP] identifier[setOrderByClause] operator[SEP] identifier[orderBy] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[table] operator[SEP] identifier[getOrderByClause] operator[SEP] operator[SEP] operator[SEP] }
public ApiResponse<TypeResponse> getUniverseTypesTypeIdWithHttpInfo(Integer typeId, String acceptLanguage, String datasource, String ifNoneMatch, String language) throws ApiException { com.squareup.okhttp.Call call = getUniverseTypesTypeIdValidateBeforeCall(typeId, acceptLanguage, datasource, ifNoneMatch, language, null); Type localVarReturnType = new TypeToken<TypeResponse>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
class class_name[name] begin[{] method[getUniverseTypesTypeIdWithHttpInfo, return_type[type[ApiResponse]], modifier[public], parameter[typeId, acceptLanguage, datasource, ifNoneMatch, language]] begin[{] local_variable[type[com], call] local_variable[type[Type], localVarReturnType] return[call[apiClient.execute, parameter[member[.call], member[.localVarReturnType]]]] end[}] END[}]
Keyword[public] identifier[ApiResponse] operator[<] identifier[TypeResponse] operator[>] identifier[getUniverseTypesTypeIdWithHttpInfo] operator[SEP] identifier[Integer] identifier[typeId] , identifier[String] identifier[acceptLanguage] , identifier[String] identifier[datasource] , identifier[String] identifier[ifNoneMatch] , identifier[String] identifier[language] operator[SEP] Keyword[throws] identifier[ApiException] { identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Call] identifier[call] operator[=] identifier[getUniverseTypesTypeIdValidateBeforeCall] operator[SEP] identifier[typeId] , identifier[acceptLanguage] , identifier[datasource] , identifier[ifNoneMatch] , identifier[language] , Other[null] operator[SEP] operator[SEP] identifier[Type] identifier[localVarReturnType] operator[=] Keyword[new] identifier[TypeToken] operator[<] identifier[TypeResponse] operator[>] operator[SEP] operator[SEP] { } operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[apiClient] operator[SEP] identifier[execute] operator[SEP] identifier[call] , identifier[localVarReturnType] operator[SEP] operator[SEP] }
public boolean confirmInstalled(String packageName, List<String> output){ if (output != null) { return output.stream().anyMatch(s -> s != null && s.contains(getInstallSuccess())); } else { return true; //may be successful } }
class class_name[name] begin[{] method[confirmInstalled, return_type[type[boolean]], modifier[public], parameter[packageName, output]] begin[{] if[binary_operation[member[.output], !=, literal[null]]] begin[{] return[call[output.stream, parameter[]]] else begin[{] return[literal[true]] end[}] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[confirmInstalled] operator[SEP] identifier[String] identifier[packageName] , identifier[List] operator[<] identifier[String] operator[>] identifier[output] operator[SEP] { Keyword[if] operator[SEP] identifier[output] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[output] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[anyMatch] operator[SEP] identifier[s] operator[->] identifier[s] operator[!=] Other[null] operator[&&] identifier[s] operator[SEP] identifier[contains] operator[SEP] identifier[getInstallSuccess] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] literal[boolean] operator[SEP] } }
public String convertIfcWindowStyleConstructionEnumToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); }
class class_name[name] begin[{] method[convertIfcWindowStyleConstructionEnumToString, return_type[type[String]], modifier[public], parameter[eDataType, instanceValue]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=instanceValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=instanceValue, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))] end[}] END[}]
Keyword[public] identifier[String] identifier[convertIfcWindowStyleConstructionEnumToString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[Object] identifier[instanceValue] operator[SEP] { Keyword[return] identifier[instanceValue] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[instanceValue] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public String getDescription() { if (fullDescription == null) { if (description == null || isExtensionListInDescription()) { fullDescription = description == null ? "(" : description + " ("; // Construit la description a partir des extentions. Enumeration<String> extensions = filters.keys(); if (extensions != null) { fullDescription += "." + extensions.nextElement(); while (extensions.hasMoreElements()) { fullDescription += ", ." + extensions.nextElement(); } } fullDescription += ")"; } else { fullDescription = description; } } return fullDescription; }
class class_name[name] begin[{] method[getDescription, return_type[type[String]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.fullDescription], ==, literal[null]]] begin[{] if[binary_operation[binary_operation[member[.description], ==, literal[null]], ||, call[.isExtensionListInDescription, parameter[]]]] begin[{] assign[member[.fullDescription], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=description, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=BinaryOperation(operandl=MemberReference(member=description, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" ("), operator=+), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="("))] local_variable[type[Enumeration], extensions] if[binary_operation[member[.extensions], !=, literal[null]]] begin[{] assign[member[.fullDescription], binary_operation[literal["."], +, call[extensions.nextElement, parameter[]]]] while[call[extensions.hasMoreElements, parameter[]]] begin[{] assign[member[.fullDescription], binary_operation[literal[", ."], +, call[extensions.nextElement, parameter[]]]] end[}] else begin[{] None end[}] assign[member[.fullDescription], literal[")"]] else begin[{] assign[member[.fullDescription], member[.description]] end[}] else begin[{] None end[}] return[member[.fullDescription]] end[}] END[}]
Keyword[public] identifier[String] identifier[getDescription] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[fullDescription] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[description] operator[==] Other[null] operator[||] identifier[isExtensionListInDescription] operator[SEP] operator[SEP] operator[SEP] { identifier[fullDescription] operator[=] identifier[description] operator[==] Other[null] operator[?] literal[String] operator[:] identifier[description] operator[+] literal[String] operator[SEP] identifier[Enumeration] operator[<] identifier[String] operator[>] identifier[extensions] operator[=] identifier[filters] operator[SEP] identifier[keys] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[extensions] operator[!=] Other[null] operator[SEP] { identifier[fullDescription] operator[+=] literal[String] operator[+] identifier[extensions] operator[SEP] identifier[nextElement] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[extensions] operator[SEP] identifier[hasMoreElements] operator[SEP] operator[SEP] operator[SEP] { identifier[fullDescription] operator[+=] literal[String] operator[+] identifier[extensions] operator[SEP] identifier[nextElement] operator[SEP] operator[SEP] operator[SEP] } } identifier[fullDescription] operator[+=] literal[String] operator[SEP] } Keyword[else] { identifier[fullDescription] operator[=] identifier[description] operator[SEP] } } Keyword[return] identifier[fullDescription] operator[SEP] }
@Override protected String renderLink(String fullPath) { // if(bundler.get) StringBuffer sb = new StringBuffer(PRE_TAG).append(type).append(TYPE_END_ATTRIBUTE).append(SRC_START_ATTRIBUTE); sb.append(fullPath); sb.append(SRC_END_ATTRIBUTE); if (async && !renderGlobalLinks) { sb.append(ASYNC_ATTRIBUTE); } if (defer && !renderGlobalLinks) { sb.append(DEFER_ATTRIBUTE); } if (crossorigin != null && !renderGlobalLinks) { sb.append(' ').append(JawrConstant.CROSSORIGIN_ATTR).append("=\"").append(crossorigin).append("\""); } sb.append(POST_TAG); return sb.toString(); }
class class_name[name] begin[{] method[renderLink, return_type[type[String]], modifier[protected], parameter[fullPath]] begin[{] local_variable[type[StringBuffer], sb] call[sb.append, parameter[member[.fullPath]]] call[sb.append, parameter[member[.SRC_END_ATTRIBUTE]]] if[binary_operation[member[.async], &&, member[.renderGlobalLinks]]] begin[{] call[sb.append, parameter[member[.ASYNC_ATTRIBUTE]]] else begin[{] None end[}] if[binary_operation[member[.defer], &&, member[.renderGlobalLinks]]] begin[{] call[sb.append, parameter[member[.DEFER_ATTRIBUTE]]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.crossorigin], !=, literal[null]], &&, member[.renderGlobalLinks]]] begin[{] call[sb.append, parameter[literal[' ']]] else begin[{] None end[}] call[sb.append, parameter[member[.POST_TAG]]] return[call[sb.toString, parameter[]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] identifier[String] identifier[renderLink] operator[SEP] identifier[String] identifier[fullPath] operator[SEP] { identifier[StringBuffer] identifier[sb] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] identifier[PRE_TAG] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[type] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[TYPE_END_ATTRIBUTE] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[SRC_START_ATTRIBUTE] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[fullPath] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[SRC_END_ATTRIBUTE] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[async] operator[&&] operator[!] identifier[renderGlobalLinks] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[ASYNC_ATTRIBUTE] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[defer] operator[&&] operator[!] identifier[renderGlobalLinks] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[DEFER_ATTRIBUTE] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[crossorigin] operator[!=] Other[null] operator[&&] operator[!] identifier[renderGlobalLinks] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[JawrConstant] operator[SEP] identifier[CROSSORIGIN_ATTR] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[crossorigin] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[POST_TAG] operator[SEP] operator[SEP] Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public void pauseJob (@Nonnull final TriggerKey aTriggerKey) { ValueEnforcer.notNull (aTriggerKey, "TriggerKey"); try { m_aScheduler.pauseTrigger (aTriggerKey); LOGGER.info ("Succesfully paused job with TriggerKey " + aTriggerKey.toString ()); } catch (final SchedulerException ex) { LOGGER.error ("Failed to pause job with TriggerKey " + aTriggerKey.toString (), ex); } }
class class_name[name] begin[{] method[pauseJob, return_type[void], modifier[public], parameter[aTriggerKey]] begin[{] call[ValueEnforcer.notNull, parameter[member[.aTriggerKey], literal["TriggerKey"]]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=aTriggerKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pauseTrigger, postfix_operators=[], prefix_operators=[], qualifier=m_aScheduler, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Succesfully paused job with TriggerKey "), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=aTriggerKey, selectors=[], type_arguments=None), operator=+)], member=info, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to pause job with TriggerKey "), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=aTriggerKey, selectors=[], type_arguments=None), operator=+), 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=['SchedulerException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[pauseJob] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[TriggerKey] identifier[aTriggerKey] operator[SEP] { identifier[ValueEnforcer] operator[SEP] identifier[notNull] operator[SEP] identifier[aTriggerKey] , literal[String] operator[SEP] operator[SEP] Keyword[try] { identifier[m_aScheduler] operator[SEP] identifier[pauseTrigger] operator[SEP] identifier[aTriggerKey] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[aTriggerKey] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[SchedulerException] identifier[ex] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[aTriggerKey] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[ex] operator[SEP] operator[SEP] } }