code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public static AVIMMessageIntervalBound createBound(String messageId, long timestamp, boolean closed) { return new AVIMMessageIntervalBound(messageId, timestamp, closed); }
class class_name[name] begin[{] method[createBound, return_type[type[AVIMMessageIntervalBound]], modifier[public static], parameter[messageId, timestamp, closed]] begin[{] return[ClassCreator(arguments=[MemberReference(member=messageId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=timestamp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=closed, 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=AVIMMessageIntervalBound, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[AVIMMessageIntervalBound] identifier[createBound] operator[SEP] identifier[String] identifier[messageId] , Keyword[long] identifier[timestamp] , Keyword[boolean] identifier[closed] operator[SEP] { Keyword[return] Keyword[new] identifier[AVIMMessageIntervalBound] operator[SEP] identifier[messageId] , identifier[timestamp] , identifier[closed] operator[SEP] operator[SEP] }
private void parseResource(final Element resourceElement, final Collection<Resource> resources) { final String tagName = resourceElement.getTagName(); final String uri = resourceElement.getTextContent(); if (TAG_GROUP_REF.equals(tagName)) { // uri in this case is the group name resources.addAll(getResourcesForGroup(uri)); } if (getResourceType(resourceElement) != null) { final Resource resource = createResource(resourceElement); LOG.debug("\t\tadding resource: {}", resource); resources.add(resource); } }
class class_name[name] begin[{] method[parseResource, return_type[void], modifier[private], parameter[resourceElement, resources]] begin[{] local_variable[type[String], tagName] local_variable[type[String], uri] if[call[TAG_GROUP_REF.equals, parameter[member[.tagName]]]] begin[{] call[resources.addAll, parameter[call[.getResourcesForGroup, parameter[member[.uri]]]]] else begin[{] None end[}] if[binary_operation[call[.getResourceType, parameter[member[.resourceElement]]], !=, literal[null]]] begin[{] local_variable[type[Resource], resource] call[LOG.debug, parameter[literal["\t\tadding resource: {}"], member[.resource]]] call[resources.add, parameter[member[.resource]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[parseResource] operator[SEP] Keyword[final] identifier[Element] identifier[resourceElement] , Keyword[final] identifier[Collection] operator[<] identifier[Resource] operator[>] identifier[resources] operator[SEP] { Keyword[final] identifier[String] identifier[tagName] operator[=] identifier[resourceElement] operator[SEP] identifier[getTagName] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[uri] operator[=] identifier[resourceElement] operator[SEP] identifier[getTextContent] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TAG_GROUP_REF] operator[SEP] identifier[equals] operator[SEP] identifier[tagName] operator[SEP] operator[SEP] { identifier[resources] operator[SEP] identifier[addAll] operator[SEP] identifier[getResourcesForGroup] operator[SEP] identifier[uri] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[getResourceType] operator[SEP] identifier[resourceElement] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[final] identifier[Resource] identifier[resource] operator[=] identifier[createResource] operator[SEP] identifier[resourceElement] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[resource] operator[SEP] operator[SEP] identifier[resources] operator[SEP] identifier[add] operator[SEP] identifier[resource] operator[SEP] operator[SEP] } }
private SSLContext createSSLContext() throws ClientSslSocketFactoryException { final KeyManager[] keyManagers = this.keyStore != null ? createKeyManagers() : null; final TrustManager[] trustManagers = this.trustStore != null ? createTrustManagers() : null; try { final SSLContext sslcontext = SSLContext.getInstance(SOCKET_ALGORITHM); sslcontext.init(keyManagers, trustManagers, null); return sslcontext; } catch (NoSuchAlgorithmException e) { throw new ClientSslSocketFactoryException(String.format("Failed to create an SSL context that supports algorithm %s: %s", SOCKET_ALGORITHM, e.getMessage()), e); } catch (KeyManagementException e) { throw new ClientSslSocketFactoryException(String.format("Failed to initialize an SSL context: %s", e.getMessage()), e); } }
class class_name[name] begin[{] method[createSSLContext, return_type[type[SSLContext]], modifier[private], parameter[]] begin[{] local_variable[type[KeyManager], keyManagers] local_variable[type[TrustManager], trustManagers] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=SOCKET_ALGORITHM, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=SSLContext, selectors=[], type_arguments=None), name=sslcontext)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=SSLContext, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=keyManagers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=trustManagers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=init, postfix_operators=[], prefix_operators=[], qualifier=sslcontext, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=sslcontext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to create an SSL context that supports algorithm %s: %s"), MemberReference(member=SOCKET_ALGORITHM, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ClientSslSocketFactoryException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['NoSuchAlgorithmException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to initialize an SSL context: %s"), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ClientSslSocketFactoryException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['KeyManagementException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] identifier[SSLContext] identifier[createSSLContext] operator[SEP] operator[SEP] Keyword[throws] identifier[ClientSslSocketFactoryException] { Keyword[final] identifier[KeyManager] operator[SEP] operator[SEP] identifier[keyManagers] operator[=] Keyword[this] operator[SEP] identifier[keyStore] operator[!=] Other[null] operator[?] identifier[createKeyManagers] operator[SEP] operator[SEP] operator[:] Other[null] operator[SEP] Keyword[final] identifier[TrustManager] operator[SEP] operator[SEP] identifier[trustManagers] operator[=] Keyword[this] operator[SEP] identifier[trustStore] operator[!=] Other[null] operator[?] identifier[createTrustManagers] operator[SEP] operator[SEP] operator[:] Other[null] operator[SEP] Keyword[try] { Keyword[final] identifier[SSLContext] identifier[sslcontext] operator[=] identifier[SSLContext] operator[SEP] identifier[getInstance] operator[SEP] identifier[SOCKET_ALGORITHM] operator[SEP] operator[SEP] identifier[sslcontext] operator[SEP] identifier[init] operator[SEP] identifier[keyManagers] , identifier[trustManagers] , Other[null] operator[SEP] operator[SEP] Keyword[return] identifier[sslcontext] operator[SEP] } Keyword[catch] operator[SEP] identifier[NoSuchAlgorithmException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ClientSslSocketFactoryException] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[SOCKET_ALGORITHM] , identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[KeyManagementException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ClientSslSocketFactoryException] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
@Override public Result parse(Command cmd, InputStream input, ResultType type) { return parseResults(cmd, input, type); }
class class_name[name] begin[{] method[parse, return_type[type[Result]], modifier[public], parameter[cmd, input, type]] begin[{] return[call[.parseResults, parameter[member[.cmd], member[.input], member[.type]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Result] identifier[parse] operator[SEP] identifier[Command] identifier[cmd] , identifier[InputStream] identifier[input] , identifier[ResultType] identifier[type] operator[SEP] { Keyword[return] identifier[parseResults] operator[SEP] identifier[cmd] , identifier[input] , identifier[type] operator[SEP] operator[SEP] }
private synchronized int findNewMapTask(final TaskTrackerStatus tts, final int clusterSize, final int numUniqueHosts, final int maxCacheLevel) { if (numMapTasks == 0) { if(LOG.isDebugEnabled()) { LOG.debug("No maps to schedule for " + profile.getJobID()); } return -1; } String taskTracker = tts.getTrackerName(); TaskInProgress tip = null; // // Update the last-known clusterSize // this.clusterSize = clusterSize; if (!shouldRunOnTaskTracker(taskTracker)) { return -1; } // Check to ensure this TaskTracker has enough resources to // run tasks from this job long outSize = resourceEstimator.getEstimatedMapOutputSize(); long availSpace = tts.getResourceStatus().getAvailableSpace(); final long SAVETY_BUFFER = conf.getLong("mapred.map.reserved.disk.mb", 300) * 1024 * 1024; if (availSpace < outSize + SAVETY_BUFFER) { LOG.warn("No room for map task. Node " + tts.getHost() + " has " + availSpace + " bytes free; The safty buffer is " + SAVETY_BUFFER + " bytes; but we expect map to take " + outSize); return -1; //see if a different TIP might work better. } // For scheduling a map task, we have two caches and a list (optional) // I) one for non-running task // II) one for running task (this is for handling speculation) // III) a list of TIPs that have empty locations (e.g., dummy splits), // the list is empty if all TIPs have associated locations // First a look up is done on the non-running cache and on a miss, a look // up is done on the running cache. The order for lookup within the cache: // 1. from local node to root [bottom up] // 2. breadth wise for all the parent nodes at max level // We fall to linear scan of the list (III above) if we have misses in the // above caches Node node = jobtracker.getNode(tts.getHost()); // // I) Non-running TIP : // // 1. check from local node to the root [bottom up cache lookup] // i.e if the cache is available and the host has been resolved // (node!=null) if (node != null) { Node key = node; int level = 0; // maxCacheLevel might be greater than this.maxLevel if findNewMapTask is // called to schedule any task (local, rack-local, off-switch or speculative) // tasks or it might be NON_LOCAL_CACHE_LEVEL (i.e. -1) if findNewMapTask is // (i.e. -1) if findNewMapTask is to only schedule off-switch/speculative // tasks int maxLevelToSchedule = Math.min(maxCacheLevel, maxLevel); for (level = 0;level < maxLevelToSchedule; ++level) { List <TaskInProgress> cacheForLevel = nonRunningMapCache.get(key); if (cacheForLevel != null) { tip = findTaskFromList(cacheForLevel, tts, numUniqueHosts,level == 0); if (tip != null) { // Add to running cache scheduleMap(tip); // remove the cache if its empty if (cacheForLevel.size() == 0) { nonRunningMapCache.remove(key); } return tip.getIdWithinJob(); } } key = key.getParent(); } // Check if we need to only schedule a local task (node-local/rack-local) if (level == maxCacheLevel) { return -1; } } //2. Search breadth-wise across parents at max level for non-running // TIP if // - cache exists and there is a cache miss // - node information for the tracker is missing (tracker's topology // info not obtained yet) // collection of node at max level in the cache structure Collection<Node> nodesAtMaxLevel = jobtracker.getNodesAtMaxLevel(); // get the node parent at max level Node nodeParentAtMaxLevel = (node == null) ? null : JobTracker.getParentNode(node, maxLevel - 1); for (Node parent : nodesAtMaxLevel) { // skip the parent that has already been scanned if (parent == nodeParentAtMaxLevel) { continue; } List<TaskInProgress> cache = nonRunningMapCache.get(parent); if (cache != null) { tip = findTaskFromList(cache, tts, numUniqueHosts, false); if (tip != null) { // Add to the running cache scheduleMap(tip); // remove the cache if empty if (cache.size() == 0) { nonRunningMapCache.remove(parent); } LOG.info("Choosing a non-local task " + tip.getTIPId()); return tip.getIdWithinJob(); } } } // 3. Search non-local tips for a new task tip = findTaskFromList(nonLocalMaps, tts, numUniqueHosts, false); if (tip != null) { // Add to the running list scheduleMap(tip); LOG.info("Choosing a non-local task " + tip.getTIPId()); return tip.getIdWithinJob(); } // // II) Running TIP : // if (hasSpeculativeMaps) { tip = getSpeculativeMap(tts.getTrackerName(), tts.getHost()); if (tip != null) { LOG.info("Choosing a non-local task " + tip.getTIPId() + " for speculation"); return tip.getIdWithinJob(); } } return -1; }
class class_name[name] begin[{] method[findNewMapTask, return_type[type[int]], modifier[synchronized private], parameter[tts, clusterSize, numUniqueHosts, maxCacheLevel]] begin[{] if[binary_operation[member[.numMapTasks], ==, literal[0]]] begin[{] if[call[LOG.isDebugEnabled, parameter[]]] begin[{] call[LOG.debug, parameter[binary_operation[literal["No maps to schedule for "], +, call[profile.getJobID, parameter[]]]]] else begin[{] None end[}] return[literal[1]] else begin[{] None end[}] local_variable[type[String], taskTracker] local_variable[type[TaskInProgress], tip] assign[THIS[member[None.clusterSize]], member[.clusterSize]] if[call[.shouldRunOnTaskTracker, parameter[member[.taskTracker]]]] begin[{] return[literal[1]] else begin[{] None end[}] local_variable[type[long], outSize] local_variable[type[long], availSpace] local_variable[type[long], SAVETY_BUFFER] if[binary_operation[member[.availSpace], <, binary_operation[member[.outSize], +, member[.SAVETY_BUFFER]]]] begin[{] call[LOG.warn, parameter[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["No room for map task. Node "], +, call[tts.getHost, parameter[]]], +, literal[" has "]], +, member[.availSpace]], +, literal[" bytes free; The safty buffer is "]], +, member[.SAVETY_BUFFER]], +, literal[" bytes; but we expect map to take "]], +, member[.outSize]]]] return[literal[1]] else begin[{] None end[}] local_variable[type[Node], node] if[binary_operation[member[.node], !=, literal[null]]] begin[{] local_variable[type[Node], key] local_variable[type[int], level] local_variable[type[int], maxLevelToSchedule] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=nonRunningMapCache, selectors=[], type_arguments=None), name=cacheForLevel)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=TaskInProgress, sub_type=None))], dimensions=[], name=List, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=cacheForLevel, 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=tip, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=cacheForLevel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=numUniqueHosts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=level, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===)], member=findTaskFromList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=tip, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tip, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=scheduleMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=cacheForLevel, 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=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=nonRunningMapCache, selectors=[], type_arguments=None), label=None)])), ReturnStatement(expression=MethodInvocation(arguments=[], member=getIdWithinJob, postfix_operators=[], prefix_operators=[], qualifier=tip, selectors=[], type_arguments=None), label=None)]))])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getParent, postfix_operators=[], prefix_operators=[], qualifier=key, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=level, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=maxLevelToSchedule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=[Assignment(expressionl=MemberReference(member=level, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))], update=[MemberReference(member=level, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None) if[binary_operation[member[.level], ==, member[.maxCacheLevel]]] begin[{] return[literal[1]] else begin[{] None end[}] else begin[{] None end[}] local_variable[type[Collection], nodesAtMaxLevel] local_variable[type[Node], nodeParentAtMaxLevel] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=parent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=nodeParentAtMaxLevel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=parent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=nonRunningMapCache, selectors=[], type_arguments=None), name=cache)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=TaskInProgress, sub_type=None))], dimensions=[], name=List, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=cache, 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=tip, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=cache, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=numUniqueHosts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=findTaskFromList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=tip, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tip, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=scheduleMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=cache, 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=[MemberReference(member=parent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=nonRunningMapCache, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Choosing a non-local task "), operandr=MethodInvocation(arguments=[], member=getTIPId, postfix_operators=[], prefix_operators=[], qualifier=tip, selectors=[], type_arguments=None), operator=+)], member=info, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[], member=getIdWithinJob, postfix_operators=[], prefix_operators=[], qualifier=tip, selectors=[], type_arguments=None), label=None)]))]))]), control=EnhancedForControl(iterable=MemberReference(member=nodesAtMaxLevel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=parent)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None))), label=None) assign[member[.tip], call[.findTaskFromList, parameter[member[.nonLocalMaps], member[.tts], member[.numUniqueHosts], literal[false]]]] if[binary_operation[member[.tip], !=, literal[null]]] begin[{] call[.scheduleMap, parameter[member[.tip]]] call[LOG.info, parameter[binary_operation[literal["Choosing a non-local task "], +, call[tip.getTIPId, parameter[]]]]] return[call[tip.getIdWithinJob, parameter[]]] else begin[{] None end[}] if[member[.hasSpeculativeMaps]] begin[{] assign[member[.tip], call[.getSpeculativeMap, parameter[call[tts.getTrackerName, parameter[]], call[tts.getHost, parameter[]]]]] if[binary_operation[member[.tip], !=, literal[null]]] begin[{] call[LOG.info, parameter[binary_operation[binary_operation[literal["Choosing a non-local task "], +, call[tip.getTIPId, parameter[]]], +, literal[" for speculation"]]]] return[call[tip.getIdWithinJob, parameter[]]] else begin[{] None end[}] else begin[{] None end[}] return[literal[1]] end[}] END[}]
Keyword[private] Keyword[synchronized] Keyword[int] identifier[findNewMapTask] operator[SEP] Keyword[final] identifier[TaskTrackerStatus] identifier[tts] , Keyword[final] Keyword[int] identifier[clusterSize] , Keyword[final] Keyword[int] identifier[numUniqueHosts] , Keyword[final] Keyword[int] identifier[maxCacheLevel] operator[SEP] { Keyword[if] operator[SEP] identifier[numMapTasks] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[LOG] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[profile] operator[SEP] identifier[getJobID] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] operator[-] Other[1] operator[SEP] } identifier[String] identifier[taskTracker] operator[=] identifier[tts] operator[SEP] identifier[getTrackerName] operator[SEP] operator[SEP] operator[SEP] identifier[TaskInProgress] identifier[tip] operator[=] Other[null] operator[SEP] Keyword[this] operator[SEP] identifier[clusterSize] operator[=] identifier[clusterSize] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[shouldRunOnTaskTracker] operator[SEP] identifier[taskTracker] operator[SEP] operator[SEP] { Keyword[return] operator[-] Other[1] operator[SEP] } Keyword[long] identifier[outSize] operator[=] identifier[resourceEstimator] operator[SEP] identifier[getEstimatedMapOutputSize] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[availSpace] operator[=] identifier[tts] operator[SEP] identifier[getResourceStatus] operator[SEP] operator[SEP] operator[SEP] identifier[getAvailableSpace] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[long] identifier[SAVETY_BUFFER] operator[=] identifier[conf] operator[SEP] identifier[getLong] operator[SEP] literal[String] , Other[300] operator[SEP] operator[*] Other[1024] operator[*] Other[1024] operator[SEP] Keyword[if] operator[SEP] identifier[availSpace] operator[<] identifier[outSize] operator[+] identifier[SAVETY_BUFFER] operator[SEP] { identifier[LOG] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[tts] operator[SEP] identifier[getHost] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[availSpace] operator[+] literal[String] operator[+] identifier[SAVETY_BUFFER] operator[+] literal[String] operator[+] identifier[outSize] operator[SEP] operator[SEP] Keyword[return] operator[-] Other[1] operator[SEP] } identifier[Node] identifier[node] operator[=] identifier[jobtracker] operator[SEP] identifier[getNode] operator[SEP] identifier[tts] operator[SEP] identifier[getHost] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[node] operator[!=] Other[null] operator[SEP] { identifier[Node] identifier[key] operator[=] identifier[node] operator[SEP] Keyword[int] identifier[level] operator[=] Other[0] operator[SEP] Keyword[int] identifier[maxLevelToSchedule] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[maxCacheLevel] , identifier[maxLevel] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[level] operator[=] Other[0] operator[SEP] identifier[level] operator[<] identifier[maxLevelToSchedule] operator[SEP] operator[++] identifier[level] operator[SEP] { identifier[List] operator[<] identifier[TaskInProgress] operator[>] identifier[cacheForLevel] operator[=] identifier[nonRunningMapCache] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cacheForLevel] operator[!=] Other[null] operator[SEP] { identifier[tip] operator[=] identifier[findTaskFromList] operator[SEP] identifier[cacheForLevel] , identifier[tts] , identifier[numUniqueHosts] , identifier[level] operator[==] Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tip] operator[!=] Other[null] operator[SEP] { identifier[scheduleMap] operator[SEP] identifier[tip] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cacheForLevel] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[nonRunningMapCache] operator[SEP] identifier[remove] operator[SEP] identifier[key] operator[SEP] operator[SEP] } Keyword[return] identifier[tip] operator[SEP] identifier[getIdWithinJob] operator[SEP] operator[SEP] operator[SEP] } } identifier[key] operator[=] identifier[key] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[level] operator[==] identifier[maxCacheLevel] operator[SEP] { Keyword[return] operator[-] Other[1] operator[SEP] } } identifier[Collection] operator[<] identifier[Node] operator[>] identifier[nodesAtMaxLevel] operator[=] identifier[jobtracker] operator[SEP] identifier[getNodesAtMaxLevel] operator[SEP] operator[SEP] operator[SEP] identifier[Node] identifier[nodeParentAtMaxLevel] operator[=] operator[SEP] identifier[node] operator[==] Other[null] operator[SEP] operator[?] Other[null] operator[:] identifier[JobTracker] operator[SEP] identifier[getParentNode] operator[SEP] identifier[node] , identifier[maxLevel] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Node] identifier[parent] operator[:] identifier[nodesAtMaxLevel] operator[SEP] { Keyword[if] operator[SEP] identifier[parent] operator[==] identifier[nodeParentAtMaxLevel] operator[SEP] { Keyword[continue] operator[SEP] } identifier[List] operator[<] identifier[TaskInProgress] operator[>] identifier[cache] operator[=] identifier[nonRunningMapCache] operator[SEP] identifier[get] operator[SEP] identifier[parent] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cache] operator[!=] Other[null] operator[SEP] { identifier[tip] operator[=] identifier[findTaskFromList] operator[SEP] identifier[cache] , identifier[tts] , identifier[numUniqueHosts] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tip] operator[!=] Other[null] operator[SEP] { identifier[scheduleMap] operator[SEP] identifier[tip] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cache] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[nonRunningMapCache] operator[SEP] identifier[remove] operator[SEP] identifier[parent] operator[SEP] operator[SEP] } identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[tip] operator[SEP] identifier[getTIPId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[tip] operator[SEP] identifier[getIdWithinJob] operator[SEP] operator[SEP] operator[SEP] } } } identifier[tip] operator[=] identifier[findTaskFromList] operator[SEP] identifier[nonLocalMaps] , identifier[tts] , identifier[numUniqueHosts] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tip] operator[!=] Other[null] operator[SEP] { identifier[scheduleMap] operator[SEP] identifier[tip] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[tip] operator[SEP] identifier[getTIPId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[tip] operator[SEP] identifier[getIdWithinJob] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[hasSpeculativeMaps] operator[SEP] { identifier[tip] operator[=] identifier[getSpeculativeMap] operator[SEP] identifier[tts] operator[SEP] identifier[getTrackerName] operator[SEP] operator[SEP] , identifier[tts] operator[SEP] identifier[getHost] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tip] operator[!=] Other[null] operator[SEP] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[tip] operator[SEP] identifier[getTIPId] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[tip] operator[SEP] identifier[getIdWithinJob] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] operator[-] Other[1] operator[SEP] }
public static SimpleTemplate getTemplate( String file ) { String templateText = templateData.get( file ); if ( templateText == null || !cacheTemplates ) { try (FileReader fr = new FileReader( file )) { templateText = SimpleTemplate.getStringFromStream( fr ); templateData.put( file, templateText ); } catch ( IOException e ) { // Not found templateData.put( file, NO_TEMPLATE ); } } else // Quick check prevents trying each time if ( templateText.equals( NO_TEMPLATE ) ) return null; if ( templateText == null ) return null; else return new SimpleTemplate( templateText ); }
class class_name[name] begin[{] method[getTemplate, return_type[type[SimpleTemplate]], modifier[public static], parameter[file]] begin[{] local_variable[type[String], templateText] if[binary_operation[binary_operation[member[.templateText], ==, literal[null]], ||, member[.cacheTemplates]]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=templateText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=fr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getStringFromStream, postfix_operators=[], prefix_operators=[], qualifier=SimpleTemplate, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=templateText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=templateData, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=NO_TEMPLATE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=templateData, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=fr, type=ReferenceType(arguments=None, dimensions=[], name=FileReader, sub_type=None), value=ClassCreator(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileReader, sub_type=None)))]) else begin[{] if[call[templateText.equals, parameter[member[.NO_TEMPLATE]]]] begin[{] return[literal[null]] else begin[{] None end[}] end[}] if[binary_operation[member[.templateText], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] return[ClassCreator(arguments=[MemberReference(member=templateText, 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=SimpleTemplate, sub_type=None))] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[SimpleTemplate] identifier[getTemplate] operator[SEP] identifier[String] identifier[file] operator[SEP] { identifier[String] identifier[templateText] operator[=] identifier[templateData] operator[SEP] identifier[get] operator[SEP] identifier[file] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[templateText] operator[==] Other[null] operator[||] operator[!] identifier[cacheTemplates] operator[SEP] { Keyword[try] operator[SEP] identifier[FileReader] identifier[fr] operator[=] Keyword[new] identifier[FileReader] operator[SEP] identifier[file] operator[SEP] operator[SEP] { identifier[templateText] operator[=] identifier[SimpleTemplate] operator[SEP] identifier[getStringFromStream] operator[SEP] identifier[fr] operator[SEP] operator[SEP] identifier[templateData] operator[SEP] identifier[put] operator[SEP] identifier[file] , identifier[templateText] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[templateData] operator[SEP] identifier[put] operator[SEP] identifier[file] , identifier[NO_TEMPLATE] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[templateText] operator[SEP] identifier[equals] operator[SEP] identifier[NO_TEMPLATE] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[templateText] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[else] Keyword[return] Keyword[new] identifier[SimpleTemplate] operator[SEP] identifier[templateText] operator[SEP] operator[SEP] }
private void addActivation(MavenProfileDescriptor mavenProfileDescriptor, Activation activation, Store store) { if (null == activation) { return; } MavenProfileActivationDescriptor profileActivationDescriptor = store.create(MavenProfileActivationDescriptor.class); mavenProfileDescriptor.setActivation(profileActivationDescriptor); profileActivationDescriptor.setJdk(activation.getJdk()); profileActivationDescriptor.setActiveByDefault(activation.isActiveByDefault()); ActivationFile activationFile = activation.getFile(); if (null != activationFile) { MavenActivationFileDescriptor activationFileDescriptor = store.create(MavenActivationFileDescriptor.class); profileActivationDescriptor.setActivationFile(activationFileDescriptor); activationFileDescriptor.setExists(activationFile.getExists()); activationFileDescriptor.setMissing(activationFile.getMissing()); } ActivationOS os = activation.getOs(); if (null != os) { MavenActivationOSDescriptor osDescriptor = store.create(MavenActivationOSDescriptor.class); profileActivationDescriptor.setActivationOS(osDescriptor); osDescriptor.setArch(os.getArch()); osDescriptor.setFamily(os.getFamily()); osDescriptor.setName(os.getName()); osDescriptor.setVersion(os.getVersion()); } ActivationProperty property = activation.getProperty(); if (null != property) { PropertyDescriptor propertyDescriptor = store.create(PropertyDescriptor.class); profileActivationDescriptor.setProperty(propertyDescriptor); propertyDescriptor.setName(property.getName()); propertyDescriptor.setValue(property.getValue()); } }
class class_name[name] begin[{] method[addActivation, return_type[void], modifier[private], parameter[mavenProfileDescriptor, activation, store]] begin[{] if[binary_operation[literal[null], ==, member[.activation]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[MavenProfileActivationDescriptor], profileActivationDescriptor] call[mavenProfileDescriptor.setActivation, parameter[member[.profileActivationDescriptor]]] call[profileActivationDescriptor.setJdk, parameter[call[activation.getJdk, parameter[]]]] call[profileActivationDescriptor.setActiveByDefault, parameter[call[activation.isActiveByDefault, parameter[]]]] local_variable[type[ActivationFile], activationFile] if[binary_operation[literal[null], !=, member[.activationFile]]] begin[{] local_variable[type[MavenActivationFileDescriptor], activationFileDescriptor] call[profileActivationDescriptor.setActivationFile, parameter[member[.activationFileDescriptor]]] call[activationFileDescriptor.setExists, parameter[call[activationFile.getExists, parameter[]]]] call[activationFileDescriptor.setMissing, parameter[call[activationFile.getMissing, parameter[]]]] else begin[{] None end[}] local_variable[type[ActivationOS], os] if[binary_operation[literal[null], !=, member[.os]]] begin[{] local_variable[type[MavenActivationOSDescriptor], osDescriptor] call[profileActivationDescriptor.setActivationOS, parameter[member[.osDescriptor]]] call[osDescriptor.setArch, parameter[call[os.getArch, parameter[]]]] call[osDescriptor.setFamily, parameter[call[os.getFamily, parameter[]]]] call[osDescriptor.setName, parameter[call[os.getName, parameter[]]]] call[osDescriptor.setVersion, parameter[call[os.getVersion, parameter[]]]] else begin[{] None end[}] local_variable[type[ActivationProperty], property] if[binary_operation[literal[null], !=, member[.property]]] begin[{] local_variable[type[PropertyDescriptor], propertyDescriptor] call[profileActivationDescriptor.setProperty, parameter[member[.propertyDescriptor]]] call[propertyDescriptor.setName, parameter[call[property.getName, parameter[]]]] call[propertyDescriptor.setValue, parameter[call[property.getValue, parameter[]]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[addActivation] operator[SEP] identifier[MavenProfileDescriptor] identifier[mavenProfileDescriptor] , identifier[Activation] identifier[activation] , identifier[Store] identifier[store] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[activation] operator[SEP] { Keyword[return] operator[SEP] } identifier[MavenProfileActivationDescriptor] identifier[profileActivationDescriptor] operator[=] identifier[store] operator[SEP] identifier[create] operator[SEP] identifier[MavenProfileActivationDescriptor] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[mavenProfileDescriptor] operator[SEP] identifier[setActivation] operator[SEP] identifier[profileActivationDescriptor] operator[SEP] operator[SEP] identifier[profileActivationDescriptor] operator[SEP] identifier[setJdk] operator[SEP] identifier[activation] operator[SEP] identifier[getJdk] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[profileActivationDescriptor] operator[SEP] identifier[setActiveByDefault] operator[SEP] identifier[activation] operator[SEP] identifier[isActiveByDefault] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ActivationFile] identifier[activationFile] operator[=] identifier[activation] operator[SEP] identifier[getFile] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[activationFile] operator[SEP] { identifier[MavenActivationFileDescriptor] identifier[activationFileDescriptor] operator[=] identifier[store] operator[SEP] identifier[create] operator[SEP] identifier[MavenActivationFileDescriptor] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[profileActivationDescriptor] operator[SEP] identifier[setActivationFile] operator[SEP] identifier[activationFileDescriptor] operator[SEP] operator[SEP] identifier[activationFileDescriptor] operator[SEP] identifier[setExists] operator[SEP] identifier[activationFile] operator[SEP] identifier[getExists] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[activationFileDescriptor] operator[SEP] identifier[setMissing] operator[SEP] identifier[activationFile] operator[SEP] identifier[getMissing] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[ActivationOS] identifier[os] operator[=] identifier[activation] operator[SEP] identifier[getOs] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[os] operator[SEP] { identifier[MavenActivationOSDescriptor] identifier[osDescriptor] operator[=] identifier[store] operator[SEP] identifier[create] operator[SEP] identifier[MavenActivationOSDescriptor] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[profileActivationDescriptor] operator[SEP] identifier[setActivationOS] operator[SEP] identifier[osDescriptor] operator[SEP] operator[SEP] identifier[osDescriptor] operator[SEP] identifier[setArch] operator[SEP] identifier[os] operator[SEP] identifier[getArch] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[osDescriptor] operator[SEP] identifier[setFamily] operator[SEP] identifier[os] operator[SEP] identifier[getFamily] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[osDescriptor] operator[SEP] identifier[setName] operator[SEP] identifier[os] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[osDescriptor] operator[SEP] identifier[setVersion] operator[SEP] identifier[os] operator[SEP] identifier[getVersion] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[ActivationProperty] identifier[property] operator[=] identifier[activation] operator[SEP] identifier[getProperty] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[property] operator[SEP] { identifier[PropertyDescriptor] identifier[propertyDescriptor] operator[=] identifier[store] operator[SEP] identifier[create] operator[SEP] identifier[PropertyDescriptor] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[profileActivationDescriptor] operator[SEP] identifier[setProperty] operator[SEP] identifier[propertyDescriptor] operator[SEP] operator[SEP] identifier[propertyDescriptor] operator[SEP] identifier[setName] operator[SEP] identifier[property] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[propertyDescriptor] operator[SEP] identifier[setValue] operator[SEP] identifier[property] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
protected void handleSimpleCORS( final HttpServletRequest request, final HttpServletResponse response, final FilterChain filterChain) throws IOException, ServletException { CorsFilter.CORSRequestType requestType = checkRequestType(request); if (!(requestType == CorsFilter.CORSRequestType.SIMPLE || requestType == CorsFilter.CORSRequestType.ACTUAL)) { throw new IllegalArgumentException( "Expects a HttpServletRequest object of type " + CorsFilter.CORSRequestType.SIMPLE + " or " + CorsFilter.CORSRequestType.ACTUAL); } final String originOrNull = request.getHeader(CorsFilter.REQUEST_HEADER_ORIGIN); log.debug("Request origin: {}", originOrNull); final String origin = originOrNull == null ? "" : originOrNull.toLowerCase(Locale.ENGLISH); final String methodOrNull = request.getMethod(); log.debug("Request method: {}", methodOrNull); final String method = methodOrNull == null ? "" : methodOrNull.toUpperCase(Locale.ENGLISH); // Section 6.1.2 if (!isOriginAllowed(origin)) { handleInvalidCORS(request, response, filterChain); return; } if (!allowedHttpMethods.contains(method)) { handleInvalidCORS(request, response, filterChain); return; } // Section 6.1.3 // Add a single Access-Control-Allow-Origin header. if (anyOriginAllowed && !supportsCredentials) { // If resource doesn't support credentials and if any origin is // allowed // to make CORS request, return header with '*'. response.addHeader(CorsFilter.RESPONSE_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN, "*"); } else { // If the resource supports credentials add a single // Access-Control-Allow-Origin header, with the value of the Origin // header as value. response.addHeader(CorsFilter.RESPONSE_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN, origin); } // Section 6.1.3 // If the resource supports credentials, add a single // Access-Control-Allow-Credentials header with the case-sensitive // string "true" as value. if (supportsCredentials) { response.addHeader(CorsFilter.RESPONSE_HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS, "true"); } // Section 6.1.4 // If the list of exposed headers is not empty add one or more // Access-Control-Expose-Headers headers, with as values the header // field names given in the list of exposed headers. if ((exposedHeaders != null) && (exposedHeaders.size() > 0)) { String exposedHeadersString = join(exposedHeaders, ","); response.addHeader( CorsFilter.RESPONSE_HEADER_ACCESS_CONTROL_EXPOSE_HEADERS, exposedHeadersString); } // Indicate the response depends on the origin response.addHeader(CorsFilter.REQUEST_HEADER_VARY, CorsFilter.REQUEST_HEADER_ORIGIN); // Forward the request down the filter chain. filterChain.doFilter(request, response); }
class class_name[name] begin[{] method[handleSimpleCORS, return_type[void], modifier[protected], parameter[request, response, filterChain]] begin[{] local_variable[type[CorsFilter], requestType] if[binary_operation[binary_operation[member[.requestType], ==, member[CorsFilter.CORSRequestType.SIMPLE]], ||, binary_operation[member[.requestType], ==, member[CorsFilter.CORSRequestType.ACTUAL]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Expects a HttpServletRequest object of type "), operandr=MemberReference(member=SIMPLE, postfix_operators=[], prefix_operators=[], qualifier=CorsFilter.CORSRequestType, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" or "), operator=+), operandr=MemberReference(member=ACTUAL, postfix_operators=[], prefix_operators=[], qualifier=CorsFilter.CORSRequestType, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[String], originOrNull] call[log.debug, parameter[literal["Request origin: {}"], member[.originOrNull]]] local_variable[type[String], origin] local_variable[type[String], methodOrNull] call[log.debug, parameter[literal["Request method: {}"], member[.methodOrNull]]] local_variable[type[String], method] if[call[.isOriginAllowed, parameter[member[.origin]]]] begin[{] call[.handleInvalidCORS, parameter[member[.request], member[.response], member[.filterChain]]] return[None] else begin[{] None end[}] if[call[allowedHttpMethods.contains, parameter[member[.method]]]] begin[{] call[.handleInvalidCORS, parameter[member[.request], member[.response], member[.filterChain]]] return[None] else begin[{] None end[}] if[binary_operation[member[.anyOriginAllowed], &&, member[.supportsCredentials]]] begin[{] call[response.addHeader, parameter[member[CorsFilter.RESPONSE_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN], literal["*"]]] else begin[{] call[response.addHeader, parameter[member[CorsFilter.RESPONSE_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN], member[.origin]]] end[}] if[member[.supportsCredentials]] begin[{] call[response.addHeader, parameter[member[CorsFilter.RESPONSE_HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS], literal["true"]]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.exposedHeaders], !=, literal[null]], &&, binary_operation[call[exposedHeaders.size, parameter[]], >, literal[0]]]] begin[{] local_variable[type[String], exposedHeadersString] call[response.addHeader, parameter[member[CorsFilter.RESPONSE_HEADER_ACCESS_CONTROL_EXPOSE_HEADERS], member[.exposedHeadersString]]] else begin[{] None end[}] call[response.addHeader, parameter[member[CorsFilter.REQUEST_HEADER_VARY], member[CorsFilter.REQUEST_HEADER_ORIGIN]]] call[filterChain.doFilter, parameter[member[.request], member[.response]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[handleSimpleCORS] operator[SEP] Keyword[final] identifier[HttpServletRequest] identifier[request] , Keyword[final] identifier[HttpServletResponse] identifier[response] , Keyword[final] identifier[FilterChain] identifier[filterChain] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ServletException] { identifier[CorsFilter] operator[SEP] identifier[CORSRequestType] identifier[requestType] operator[=] identifier[checkRequestType] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[requestType] operator[==] identifier[CorsFilter] operator[SEP] identifier[CORSRequestType] operator[SEP] identifier[SIMPLE] operator[||] identifier[requestType] operator[==] identifier[CorsFilter] operator[SEP] identifier[CORSRequestType] operator[SEP] identifier[ACTUAL] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[CorsFilter] operator[SEP] identifier[CORSRequestType] operator[SEP] identifier[SIMPLE] operator[+] literal[String] operator[+] identifier[CorsFilter] operator[SEP] identifier[CORSRequestType] operator[SEP] identifier[ACTUAL] operator[SEP] operator[SEP] } Keyword[final] identifier[String] identifier[originOrNull] operator[=] identifier[request] operator[SEP] identifier[getHeader] operator[SEP] identifier[CorsFilter] operator[SEP] identifier[REQUEST_HEADER_ORIGIN] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[originOrNull] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[origin] operator[=] identifier[originOrNull] operator[==] Other[null] operator[?] literal[String] operator[:] identifier[originOrNull] operator[SEP] identifier[toLowerCase] operator[SEP] identifier[Locale] operator[SEP] identifier[ENGLISH] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[methodOrNull] operator[=] identifier[request] operator[SEP] identifier[getMethod] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[methodOrNull] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[method] operator[=] identifier[methodOrNull] operator[==] Other[null] operator[?] literal[String] operator[:] identifier[methodOrNull] operator[SEP] identifier[toUpperCase] operator[SEP] identifier[Locale] operator[SEP] identifier[ENGLISH] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isOriginAllowed] operator[SEP] identifier[origin] operator[SEP] operator[SEP] { identifier[handleInvalidCORS] operator[SEP] identifier[request] , identifier[response] , identifier[filterChain] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[allowedHttpMethods] operator[SEP] identifier[contains] operator[SEP] identifier[method] operator[SEP] operator[SEP] { identifier[handleInvalidCORS] operator[SEP] identifier[request] , identifier[response] , identifier[filterChain] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[if] operator[SEP] identifier[anyOriginAllowed] operator[&&] operator[!] identifier[supportsCredentials] operator[SEP] { identifier[response] operator[SEP] identifier[addHeader] operator[SEP] identifier[CorsFilter] operator[SEP] identifier[RESPONSE_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN] , literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[response] operator[SEP] identifier[addHeader] operator[SEP] identifier[CorsFilter] operator[SEP] identifier[RESPONSE_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN] , identifier[origin] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[supportsCredentials] operator[SEP] { identifier[response] operator[SEP] identifier[addHeader] operator[SEP] identifier[CorsFilter] operator[SEP] identifier[RESPONSE_HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS] , literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[SEP] identifier[exposedHeaders] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[exposedHeaders] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] operator[SEP] { identifier[String] identifier[exposedHeadersString] operator[=] identifier[join] operator[SEP] identifier[exposedHeaders] , literal[String] operator[SEP] operator[SEP] identifier[response] operator[SEP] identifier[addHeader] operator[SEP] identifier[CorsFilter] operator[SEP] identifier[RESPONSE_HEADER_ACCESS_CONTROL_EXPOSE_HEADERS] , identifier[exposedHeadersString] operator[SEP] operator[SEP] } identifier[response] operator[SEP] identifier[addHeader] operator[SEP] identifier[CorsFilter] operator[SEP] identifier[REQUEST_HEADER_VARY] , identifier[CorsFilter] operator[SEP] identifier[REQUEST_HEADER_ORIGIN] operator[SEP] operator[SEP] identifier[filterChain] operator[SEP] identifier[doFilter] operator[SEP] identifier[request] , identifier[response] operator[SEP] operator[SEP] }
public long[] scanLeft(LongBinaryOperator accumulator) { Spliterator.OfLong spliterator = spliterator(); long size = spliterator.getExactSizeIfKnown(); LongBuffer buf = new LongBuffer(size >= 0 && size <= Integer.MAX_VALUE ? (int) size : INITIAL_SIZE); delegate(spliterator).forEachOrdered(i -> buf.add(buf.size == 0 ? i : accumulator.applyAsLong(buf.data[buf.size - 1], i))); return buf.toArray(); }
class class_name[name] begin[{] method[scanLeft, return_type[type[long]], modifier[public], parameter[accumulator]] begin[{] local_variable[type[Spliterator], spliterator] local_variable[type[long], size] local_variable[type[LongBuffer], buf] call[.delegate, parameter[member[.spliterator]]] return[call[buf.toArray, parameter[]]] end[}] END[}]
Keyword[public] Keyword[long] operator[SEP] operator[SEP] identifier[scanLeft] operator[SEP] identifier[LongBinaryOperator] identifier[accumulator] operator[SEP] { identifier[Spliterator] operator[SEP] identifier[OfLong] identifier[spliterator] operator[=] identifier[spliterator] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[size] operator[=] identifier[spliterator] operator[SEP] identifier[getExactSizeIfKnown] operator[SEP] operator[SEP] operator[SEP] identifier[LongBuffer] identifier[buf] operator[=] Keyword[new] identifier[LongBuffer] operator[SEP] identifier[size] operator[>=] Other[0] operator[&&] identifier[size] operator[<=] identifier[Integer] operator[SEP] identifier[MAX_VALUE] operator[?] operator[SEP] Keyword[int] operator[SEP] identifier[size] operator[:] identifier[INITIAL_SIZE] operator[SEP] operator[SEP] identifier[delegate] operator[SEP] identifier[spliterator] operator[SEP] operator[SEP] identifier[forEachOrdered] operator[SEP] identifier[i] operator[->] identifier[buf] operator[SEP] identifier[add] operator[SEP] identifier[buf] operator[SEP] identifier[size] operator[==] Other[0] operator[?] identifier[i] operator[:] identifier[accumulator] operator[SEP] identifier[applyAsLong] operator[SEP] identifier[buf] operator[SEP] identifier[data] operator[SEP] identifier[buf] operator[SEP] identifier[size] operator[-] Other[1] operator[SEP] , identifier[i] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[buf] operator[SEP] identifier[toArray] operator[SEP] operator[SEP] operator[SEP] }
@Override public boolean onMessage(String channel, IMessage<String, byte[]> msg) { if (msg instanceof UniversalIdStrMessage) { return onMessage(channel, (UniversalIdStrMessage) msg); } throw new IllegalArgumentException("This subscriber expects message of type [" + UniversalIdStrMessage.class.getName() + "]!"); }
class class_name[name] begin[{] method[onMessage, return_type[type[boolean]], modifier[public], parameter[channel, msg]] begin[{] if[binary_operation[member[.msg], instanceof, type[UniversalIdStrMessage]]] begin[{] return[call[.onMessage, parameter[member[.channel], Cast(expression=MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=UniversalIdStrMessage, sub_type=None))]]] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="This subscriber expects message of type ["), operandr=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=UniversalIdStrMessage, sub_type=None)), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]!"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[onMessage] operator[SEP] identifier[String] identifier[channel] , identifier[IMessage] operator[<] identifier[String] , Keyword[byte] operator[SEP] operator[SEP] operator[>] identifier[msg] operator[SEP] { Keyword[if] operator[SEP] identifier[msg] Keyword[instanceof] identifier[UniversalIdStrMessage] operator[SEP] { Keyword[return] identifier[onMessage] operator[SEP] identifier[channel] , operator[SEP] identifier[UniversalIdStrMessage] operator[SEP] identifier[msg] operator[SEP] operator[SEP] } Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[UniversalIdStrMessage] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] }
public Element svgRect(double x, double y, double w, double h) { return SVGUtil.svgRect(document, x, y, w, h); }
class class_name[name] begin[{] method[svgRect, return_type[type[Element]], modifier[public], parameter[x, y, w, h]] begin[{] return[call[SVGUtil.svgRect, parameter[member[.document], member[.x], member[.y], member[.w], member[.h]]]] end[}] END[}]
Keyword[public] identifier[Element] identifier[svgRect] operator[SEP] Keyword[double] identifier[x] , Keyword[double] identifier[y] , Keyword[double] identifier[w] , Keyword[double] identifier[h] operator[SEP] { Keyword[return] identifier[SVGUtil] operator[SEP] identifier[svgRect] operator[SEP] identifier[document] , identifier[x] , identifier[y] , identifier[w] , identifier[h] operator[SEP] operator[SEP] }
private static PatternLayoutEncoder createPatternLayoutEncoder(LoggerContext context, String patternProperty) { final String pattern = context.getProperty(patternProperty); final PatternLayoutEncoder patternLayoutEncoder = new PatternLayoutEncoder(); patternLayoutEncoder.setContext(context); patternLayoutEncoder.setPattern(pattern); patternLayoutEncoder.start(); return patternLayoutEncoder; }
class class_name[name] begin[{] method[createPatternLayoutEncoder, return_type[type[PatternLayoutEncoder]], modifier[private static], parameter[context, patternProperty]] begin[{] local_variable[type[String], pattern] local_variable[type[PatternLayoutEncoder], patternLayoutEncoder] call[patternLayoutEncoder.setContext, parameter[member[.context]]] call[patternLayoutEncoder.setPattern, parameter[member[.pattern]]] call[patternLayoutEncoder.start, parameter[]] return[member[.patternLayoutEncoder]] end[}] END[}]
Keyword[private] Keyword[static] identifier[PatternLayoutEncoder] identifier[createPatternLayoutEncoder] operator[SEP] identifier[LoggerContext] identifier[context] , identifier[String] identifier[patternProperty] operator[SEP] { Keyword[final] identifier[String] identifier[pattern] operator[=] identifier[context] operator[SEP] identifier[getProperty] operator[SEP] identifier[patternProperty] operator[SEP] operator[SEP] Keyword[final] identifier[PatternLayoutEncoder] identifier[patternLayoutEncoder] operator[=] Keyword[new] identifier[PatternLayoutEncoder] operator[SEP] operator[SEP] operator[SEP] identifier[patternLayoutEncoder] operator[SEP] identifier[setContext] operator[SEP] identifier[context] operator[SEP] operator[SEP] identifier[patternLayoutEncoder] operator[SEP] identifier[setPattern] operator[SEP] identifier[pattern] operator[SEP] operator[SEP] identifier[patternLayoutEncoder] operator[SEP] identifier[start] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[patternLayoutEncoder] operator[SEP] }
@Override public <C extends Configuration<K, V>> C getConfiguration(Class<C> clazz) { throw new UnsupportedOperationException(); }
class class_name[name] begin[{] method[getConfiguration, return_type[type[C]], modifier[public], parameter[clazz]] 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=UnsupportedOperationException, sub_type=None)), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] operator[<] identifier[C] Keyword[extends] identifier[Configuration] operator[<] identifier[K] , identifier[V] operator[>] operator[>] identifier[C] identifier[getConfiguration] operator[SEP] identifier[Class] operator[<] identifier[C] operator[>] identifier[clazz] operator[SEP] { Keyword[throw] Keyword[new] identifier[UnsupportedOperationException] operator[SEP] operator[SEP] operator[SEP] }
private int getOrAppendVertex(Coordinate newCoord, Quadtree ptQuad) { Envelope queryEnv = new Envelope(newCoord); queryEnv.expandBy(epsilon); QuadTreeVisitor visitor = new QuadTreeVisitor(epsilon, newCoord); try { ptQuad.query(queryEnv, visitor); } catch (RuntimeException ex) { //ignore } if (visitor.getNearest() != null) { return visitor.getNearest().index; } // Not found then // Append to the list and QuadTree EnvelopeWithIndex ret = new EnvelopeWithIndex(triVertex.size(), newCoord); ptQuad.insert(queryEnv, ret); triVertex.add(ret); return ret.index; }
class class_name[name] begin[{] method[getOrAppendVertex, return_type[type[int]], modifier[private], parameter[newCoord, ptQuad]] begin[{] local_variable[type[Envelope], queryEnv] call[queryEnv.expandBy, parameter[member[.epsilon]]] local_variable[type[QuadTreeVisitor], visitor] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=queryEnv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=visitor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=query, postfix_operators=[], prefix_operators=[], qualifier=ptQuad, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['RuntimeException']))], finally_block=None, label=None, resources=None) if[binary_operation[call[visitor.getNearest, parameter[]], !=, literal[null]]] begin[{] return[call[visitor.getNearest, parameter[]]] else begin[{] None end[}] local_variable[type[EnvelopeWithIndex], ret] call[ptQuad.insert, parameter[member[.queryEnv], member[.ret]]] call[triVertex.add, parameter[member[.ret]]] return[member[ret.index]] end[}] END[}]
Keyword[private] Keyword[int] identifier[getOrAppendVertex] operator[SEP] identifier[Coordinate] identifier[newCoord] , identifier[Quadtree] identifier[ptQuad] operator[SEP] { identifier[Envelope] identifier[queryEnv] operator[=] Keyword[new] identifier[Envelope] operator[SEP] identifier[newCoord] operator[SEP] operator[SEP] identifier[queryEnv] operator[SEP] identifier[expandBy] operator[SEP] identifier[epsilon] operator[SEP] operator[SEP] identifier[QuadTreeVisitor] identifier[visitor] operator[=] Keyword[new] identifier[QuadTreeVisitor] operator[SEP] identifier[epsilon] , identifier[newCoord] operator[SEP] operator[SEP] Keyword[try] { identifier[ptQuad] operator[SEP] identifier[query] operator[SEP] identifier[queryEnv] , identifier[visitor] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[RuntimeException] identifier[ex] operator[SEP] { } Keyword[if] operator[SEP] identifier[visitor] operator[SEP] identifier[getNearest] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[visitor] operator[SEP] identifier[getNearest] operator[SEP] operator[SEP] operator[SEP] identifier[index] operator[SEP] } identifier[EnvelopeWithIndex] identifier[ret] operator[=] Keyword[new] identifier[EnvelopeWithIndex] operator[SEP] identifier[triVertex] operator[SEP] identifier[size] operator[SEP] operator[SEP] , identifier[newCoord] operator[SEP] operator[SEP] identifier[ptQuad] operator[SEP] identifier[insert] operator[SEP] identifier[queryEnv] , identifier[ret] operator[SEP] operator[SEP] identifier[triVertex] operator[SEP] identifier[add] operator[SEP] identifier[ret] operator[SEP] operator[SEP] Keyword[return] identifier[ret] operator[SEP] identifier[index] operator[SEP] }
@Override GroupReplyList write_attribute_reply_i(final int rid, final int tmo, final boolean fwd) throws DevFailed { final Integer rid_obj = new Integer(rid); final GroupReplyList rl = new GroupReplyList(); final AsynchRequest ar = arp.get(rid_obj); if (ar == null) { final DevError[] errors = new DevError[1]; errors[0] = new DevError(); errors[0].severity = ErrSeverity.ERR; errors[0].reason = "API_BadAsynPollId"; errors[0].desc = "Invalid asynch. request identifier specified"; errors[0].origin = "GroupDeviceElement.write_attribute_reply"; final DevFailed e = new DevFailed(errors); rl.add(new GroupReply(get_name(), "unknown", e)); return rl; } if (ar.req_id == -1) { for (final String element : ar.obj_name) { rl.add(new GroupReply(get_name(), element, ar.exception)); } arp.remove(rid_obj); return rl; } try { proxy.write_attribute_reply(ar.req_id, tmo); for (final String element : ar.obj_name) { rl.add(new GroupReply(get_name(), element)); } } catch (final AsynReplyNotArrived na) { final DevError[] errors = new DevError[1]; errors[0] = new DevError(); errors[0].severity = ErrSeverity.ERR; errors[0].reason = "API_AsynReplyNotArrived"; errors[0].desc = "No reply for asynch request"; errors[0].origin = "GroupDeviceElement.write_attribute_reply"; final DevFailed e = new DevFailed(errors); for (final String element : ar.obj_name) { rl.add(new GroupReply(get_name(), element, e)); } } catch (final DevFailed df) { for (final String element : ar.obj_name) { rl.add(new GroupReply(get_name(), element, df)); } } catch (final Exception ex) { final DevError[] errors = new DevError[1]; errors[0] = new DevError(); errors[0].severity = ErrSeverity.ERR; errors[0].reason = "unknown exception caught"; errors[0].desc = "unknown error"; errors[0].origin = "GroupDeviceElemnt.write_attribute_reply"; final DevFailed e = new DevFailed(errors); for (final String element : ar.obj_name) { rl.add(new GroupReply(get_name(), element, e)); } } arp.remove(rid_obj); return rl; }
class class_name[name] begin[{] method[write_attribute_reply_i, return_type[type[GroupReplyList]], modifier[default], parameter[rid, tmo, fwd]] begin[{] local_variable[type[Integer], rid_obj] local_variable[type[GroupReplyList], rl] local_variable[type[AsynchRequest], ar] if[binary_operation[member[.ar], ==, literal[null]]] begin[{] local_variable[type[DevError], errors] assign[member[.errors], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DevError, sub_type=None))] assign[member[.errors], member[ErrSeverity.ERR]] assign[member[.errors], literal["API_BadAsynPollId"]] assign[member[.errors], literal["Invalid asynch. request identifier specified"]] assign[member[.errors], literal["GroupDeviceElement.write_attribute_reply"]] local_variable[type[DevFailed], e] call[rl.add, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[], member=get_name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="unknown"), 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=GroupReply, sub_type=None))]] return[member[.rl]] else begin[{] None end[}] if[binary_operation[member[ar.req_id], ==, literal[1]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=get_name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=element, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=ar, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GroupReply, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=rl, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=obj_name, postfix_operators=[], prefix_operators=[], qualifier=ar, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=element)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) call[arp.remove, parameter[member[.rid_obj]]] return[member[.rl]] else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=req_id, postfix_operators=[], prefix_operators=[], qualifier=ar, selectors=[]), MemberReference(member=tmo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write_attribute_reply, postfix_operators=[], prefix_operators=[], qualifier=proxy, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=get_name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=element, 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=GroupReply, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=rl, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=obj_name, postfix_operators=[], prefix_operators=[], qualifier=ar, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=element)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DevError, sub_type=None)), name=errors)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[None], name=DevError, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=errors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DevError, sub_type=None))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=errors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), MemberReference(member=severity, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=ERR, postfix_operators=[], prefix_operators=[], qualifier=ErrSeverity, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=errors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), MemberReference(member=reason, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_AsynReplyNotArrived")), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=errors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), MemberReference(member=desc, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No reply for asynch request")), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=errors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), MemberReference(member=origin, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="GroupDeviceElement.write_attribute_reply")), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=errors, 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=DevFailed, sub_type=None)), name=e)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=DevFailed, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=get_name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=element, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GroupReply, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=rl, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=obj_name, postfix_operators=[], prefix_operators=[], qualifier=ar, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=element)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=na, types=['AsynReplyNotArrived'])), CatchClause(block=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=get_name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=element, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=df, 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=GroupReply, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=rl, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=obj_name, postfix_operators=[], prefix_operators=[], qualifier=ar, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=element)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=df, types=['DevFailed'])), CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DevError, sub_type=None)), name=errors)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[None], name=DevError, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=errors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DevError, sub_type=None))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=errors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), MemberReference(member=severity, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=ERR, postfix_operators=[], prefix_operators=[], qualifier=ErrSeverity, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=errors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), MemberReference(member=reason, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="unknown exception caught")), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=errors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), MemberReference(member=desc, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="unknown error")), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=errors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), MemberReference(member=origin, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="GroupDeviceElemnt.write_attribute_reply")), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=errors, 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=DevFailed, sub_type=None)), name=e)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=DevFailed, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=get_name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=element, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GroupReply, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=rl, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=obj_name, postfix_operators=[], prefix_operators=[], qualifier=ar, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=element)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None) call[arp.remove, parameter[member[.rid_obj]]] return[member[.rl]] end[}] END[}]
annotation[@] identifier[Override] identifier[GroupReplyList] identifier[write_attribute_reply_i] operator[SEP] Keyword[final] Keyword[int] identifier[rid] , Keyword[final] Keyword[int] identifier[tmo] , Keyword[final] Keyword[boolean] identifier[fwd] operator[SEP] Keyword[throws] identifier[DevFailed] { Keyword[final] identifier[Integer] identifier[rid_obj] operator[=] Keyword[new] identifier[Integer] operator[SEP] identifier[rid] operator[SEP] operator[SEP] Keyword[final] identifier[GroupReplyList] identifier[rl] operator[=] Keyword[new] identifier[GroupReplyList] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[AsynchRequest] identifier[ar] operator[=] identifier[arp] operator[SEP] identifier[get] operator[SEP] identifier[rid_obj] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ar] operator[==] Other[null] operator[SEP] { Keyword[final] identifier[DevError] operator[SEP] operator[SEP] identifier[errors] operator[=] Keyword[new] identifier[DevError] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[errors] operator[SEP] Other[0] operator[SEP] operator[=] Keyword[new] identifier[DevError] operator[SEP] operator[SEP] operator[SEP] identifier[errors] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[severity] operator[=] identifier[ErrSeverity] operator[SEP] identifier[ERR] operator[SEP] identifier[errors] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[reason] operator[=] literal[String] operator[SEP] identifier[errors] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[desc] operator[=] literal[String] operator[SEP] identifier[errors] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[origin] operator[=] literal[String] operator[SEP] Keyword[final] identifier[DevFailed] identifier[e] operator[=] Keyword[new] identifier[DevFailed] operator[SEP] identifier[errors] operator[SEP] operator[SEP] identifier[rl] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[GroupReply] operator[SEP] identifier[get_name] operator[SEP] operator[SEP] , literal[String] , identifier[e] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[rl] operator[SEP] } Keyword[if] operator[SEP] identifier[ar] operator[SEP] identifier[req_id] operator[==] operator[-] Other[1] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[element] operator[:] identifier[ar] operator[SEP] identifier[obj_name] operator[SEP] { identifier[rl] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[GroupReply] operator[SEP] identifier[get_name] operator[SEP] operator[SEP] , identifier[element] , identifier[ar] operator[SEP] identifier[exception] operator[SEP] operator[SEP] operator[SEP] } identifier[arp] operator[SEP] identifier[remove] operator[SEP] identifier[rid_obj] operator[SEP] operator[SEP] Keyword[return] identifier[rl] operator[SEP] } Keyword[try] { identifier[proxy] operator[SEP] identifier[write_attribute_reply] operator[SEP] identifier[ar] operator[SEP] identifier[req_id] , identifier[tmo] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[element] operator[:] identifier[ar] operator[SEP] identifier[obj_name] operator[SEP] { identifier[rl] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[GroupReply] operator[SEP] identifier[get_name] operator[SEP] operator[SEP] , identifier[element] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] Keyword[final] identifier[AsynReplyNotArrived] identifier[na] operator[SEP] { Keyword[final] identifier[DevError] operator[SEP] operator[SEP] identifier[errors] operator[=] Keyword[new] identifier[DevError] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[errors] operator[SEP] Other[0] operator[SEP] operator[=] Keyword[new] identifier[DevError] operator[SEP] operator[SEP] operator[SEP] identifier[errors] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[severity] operator[=] identifier[ErrSeverity] operator[SEP] identifier[ERR] operator[SEP] identifier[errors] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[reason] operator[=] literal[String] operator[SEP] identifier[errors] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[desc] operator[=] literal[String] operator[SEP] identifier[errors] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[origin] operator[=] literal[String] operator[SEP] Keyword[final] identifier[DevFailed] identifier[e] operator[=] Keyword[new] identifier[DevFailed] operator[SEP] identifier[errors] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[element] operator[:] identifier[ar] operator[SEP] identifier[obj_name] operator[SEP] { identifier[rl] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[GroupReply] operator[SEP] identifier[get_name] operator[SEP] operator[SEP] , identifier[element] , identifier[e] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] Keyword[final] identifier[DevFailed] identifier[df] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[element] operator[:] identifier[ar] operator[SEP] identifier[obj_name] operator[SEP] { identifier[rl] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[GroupReply] operator[SEP] identifier[get_name] operator[SEP] operator[SEP] , identifier[element] , identifier[df] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] Keyword[final] identifier[Exception] identifier[ex] operator[SEP] { Keyword[final] identifier[DevError] operator[SEP] operator[SEP] identifier[errors] operator[=] Keyword[new] identifier[DevError] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[errors] operator[SEP] Other[0] operator[SEP] operator[=] Keyword[new] identifier[DevError] operator[SEP] operator[SEP] operator[SEP] identifier[errors] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[severity] operator[=] identifier[ErrSeverity] operator[SEP] identifier[ERR] operator[SEP] identifier[errors] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[reason] operator[=] literal[String] operator[SEP] identifier[errors] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[desc] operator[=] literal[String] operator[SEP] identifier[errors] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[origin] operator[=] literal[String] operator[SEP] Keyword[final] identifier[DevFailed] identifier[e] operator[=] Keyword[new] identifier[DevFailed] operator[SEP] identifier[errors] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[element] operator[:] identifier[ar] operator[SEP] identifier[obj_name] operator[SEP] { identifier[rl] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[GroupReply] operator[SEP] identifier[get_name] operator[SEP] operator[SEP] , identifier[element] , identifier[e] operator[SEP] operator[SEP] operator[SEP] } } identifier[arp] operator[SEP] identifier[remove] operator[SEP] identifier[rid_obj] operator[SEP] operator[SEP] Keyword[return] identifier[rl] operator[SEP] }
public static final String read(ReadableByteChannel ch, int length, Charset charset) throws IOException { return new String(read(ch, length), charset); }
class class_name[name] begin[{] method[read, return_type[type[String]], modifier[final public static], parameter[ch, length, charset]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=charset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] Keyword[final] identifier[String] identifier[read] operator[SEP] identifier[ReadableByteChannel] identifier[ch] , Keyword[int] identifier[length] , identifier[Charset] identifier[charset] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[return] Keyword[new] identifier[String] operator[SEP] identifier[read] operator[SEP] identifier[ch] , identifier[length] operator[SEP] , identifier[charset] operator[SEP] operator[SEP] }
protected String serializeNowFromMap(@Nullable String user, long duration, @Nullable List<String> roles, Map<String, Object> nameAndValMap) { return serializeNowFromMap(user, duration, toArr(roles), nameAndValMap); }
class class_name[name] begin[{] method[serializeNowFromMap, return_type[type[String]], modifier[protected], parameter[user, duration, roles, nameAndValMap]] begin[{] return[call[.serializeNowFromMap, parameter[member[.user], member[.duration], call[.toArr, parameter[member[.roles]]], member[.nameAndValMap]]]] end[}] END[}]
Keyword[protected] identifier[String] identifier[serializeNowFromMap] operator[SEP] annotation[@] identifier[Nullable] identifier[String] identifier[user] , Keyword[long] identifier[duration] , annotation[@] identifier[Nullable] identifier[List] operator[<] identifier[String] operator[>] identifier[roles] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[nameAndValMap] operator[SEP] { Keyword[return] identifier[serializeNowFromMap] operator[SEP] identifier[user] , identifier[duration] , identifier[toArr] operator[SEP] identifier[roles] operator[SEP] , identifier[nameAndValMap] operator[SEP] operator[SEP] }
public static WorkQueue getWorkQueue(Type type, int nThreads) { switch(type) { case Simple: return new SimpleWorkQueue(nThreads); case Multi: return new MultiWorkQueue(nThreads); //case WorkStealing: default: return new MultiWorkQueue(nThreads); } }
class class_name[name] begin[{] method[getWorkQueue, return_type[type[WorkQueue]], modifier[public static], parameter[type, nThreads]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['Simple'], statements=[ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=nThreads, 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=SimpleWorkQueue, sub_type=None)), label=None)]), SwitchStatementCase(case=['Multi'], statements=[ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=nThreads, 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=MultiWorkQueue, sub_type=None)), label=None)]), SwitchStatementCase(case=[], statements=[ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=nThreads, 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=MultiWorkQueue, sub_type=None)), label=None)])], expression=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[WorkQueue] identifier[getWorkQueue] operator[SEP] identifier[Type] identifier[type] , Keyword[int] identifier[nThreads] operator[SEP] { Keyword[switch] operator[SEP] identifier[type] operator[SEP] { Keyword[case] identifier[Simple] operator[:] Keyword[return] Keyword[new] identifier[SimpleWorkQueue] operator[SEP] identifier[nThreads] operator[SEP] operator[SEP] Keyword[case] identifier[Multi] operator[:] Keyword[return] Keyword[new] identifier[MultiWorkQueue] operator[SEP] identifier[nThreads] operator[SEP] operator[SEP] Keyword[default] operator[:] Keyword[return] Keyword[new] identifier[MultiWorkQueue] operator[SEP] identifier[nThreads] operator[SEP] operator[SEP] } }
public synchronized void initialize(ContainerConfig configData) throws CSIException { final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); // d532639.2 if (isTraceOn && tc.isEntryEnabled()) Tr.entry(tc, "initialize"); if (initialized) { throw new CSIException("already initialized"); } this.containerExtFactory = configData.getContainerExtensionFactory(); // 125942 this.ivEJBRuntime = configData.getEJBRuntime(); // F743-12528 classLoader = configData.getClassLoader(); if (classLoader == null) classLoader = this.getClass().getClassLoader(); // 92886 this.ivName = configData.getContainerName(); this.persisterFactory = configData.getPersisterFactory(); EJSContainer.sessionKeyFactory = configData.getSessionKeyFactory(); this.sessionHandleFactory = configData.getStatefulSessionHandleFactory();//86203 this.ivSecurityCollaborator = configData.getSecurityCollaborator(); this.uowCtrl = configData.getUOWControl(); this.userTransactionImpl = uowCtrl.getUserTransaction(); this.ivUOWManager = UOWManagerFactory.getUOWManager(); // LI4548-11 this.ivAfterActivationCollaborators = configData.getAfterActivationCollaborators(); this.ivBeforeActivationCollaborators = configData.getBeforeActivationCollaborators(); this.ivBeforeActivationAfterCompletionCollaborators = configData.getBeforeActivationAfterCompletionCollaborators();//92702 j2eeNameFactory = configData.getJ2EENameFactory();//89554 this.pmiFactory = configData.getPmiBeanFactory();//86523.3 this.ivObjectCopier = configData.getObjectCopier(); // RTC102299 this.orbUtils = configData.getOrbUtils();//87918.11 this.ivEntityHelper = configData.getEntityHelper(); this.ivSFSBFailoverEnabled = configData.isEnabledSFSBFailover(); //LIDB2018-1 this.ivSfFailoverCache = configData.getStatefulFailoverCache(); //LIDB2018-1 this.passivator = configData.getStatefulPassivator(); // F87439 this.ivStatefulBeanEnqDeq = configData.getStatefulBeanEnqDeq(); // d646413.2 this.ivDispatchEventListenerManager = configData.getDispatchEventListenerManager(); // d646413.2 //------------------------------------------------- // FIX ME: make cache size parameters configurable //------------------------------------------------- poolManager = configData.getPoolManager();//87918.7 activator = new Activator(this, configData.getEJBCache(), configData.getPassivationPolicy(), passivator, ivSfFailoverCache); //LIDB2018-1 homeOfHomes = new HomeOfHomes(this, activator); int uncached = Activator.UNCACHED_ACTIVATION_STRATEGY; ActivationStrategy as = activator.getActivationStrategy(uncached); homeOfHomes.setActivationStrategy(as); wrapperManager = configData.getWrapperManager(); // Register an instance of RunUnderUOWCallback with the UOWManager, // so the EJB Container is notified when a 'user' (like Spring) // initiates a transaction. LI4548-11 ivUOWManager.registerRunUnderUOWCallback(new RunUnderUOWCallback()); initialized = true; defaultContainer = this; // f111627.1 if (isTraceOn && tc.isEntryEnabled()) Tr.exit(tc, "initialize"); }
class class_name[name] begin[{] method[initialize, return_type[void], modifier[synchronized public], parameter[configData]] begin[{] local_variable[type[boolean], isTraceOn] if[binary_operation[member[.isTraceOn], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.entry, parameter[member[.tc], literal["initialize"]]] else begin[{] None end[}] if[member[.initialized]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="already initialized")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CSIException, sub_type=None)), label=None) else begin[{] None end[}] assign[THIS[member[None.containerExtFactory]], call[configData.getContainerExtensionFactory, parameter[]]] assign[THIS[member[None.ivEJBRuntime]], call[configData.getEJBRuntime, parameter[]]] assign[member[.classLoader], call[configData.getClassLoader, parameter[]]] if[binary_operation[member[.classLoader], ==, literal[null]]] begin[{] assign[member[.classLoader], THIS[call[None.getClass, parameter[]]call[None.getClassLoader, parameter[]]]] else begin[{] None end[}] assign[THIS[member[None.ivName]], call[configData.getContainerName, parameter[]]] assign[THIS[member[None.persisterFactory]], call[configData.getPersisterFactory, parameter[]]] assign[member[EJSContainer.sessionKeyFactory], call[configData.getSessionKeyFactory, parameter[]]] assign[THIS[member[None.sessionHandleFactory]], call[configData.getStatefulSessionHandleFactory, parameter[]]] assign[THIS[member[None.ivSecurityCollaborator]], call[configData.getSecurityCollaborator, parameter[]]] assign[THIS[member[None.uowCtrl]], call[configData.getUOWControl, parameter[]]] assign[THIS[member[None.userTransactionImpl]], call[uowCtrl.getUserTransaction, parameter[]]] assign[THIS[member[None.ivUOWManager]], call[UOWManagerFactory.getUOWManager, parameter[]]] assign[THIS[member[None.ivAfterActivationCollaborators]], call[configData.getAfterActivationCollaborators, parameter[]]] assign[THIS[member[None.ivBeforeActivationCollaborators]], call[configData.getBeforeActivationCollaborators, parameter[]]] assign[THIS[member[None.ivBeforeActivationAfterCompletionCollaborators]], call[configData.getBeforeActivationAfterCompletionCollaborators, parameter[]]] assign[member[.j2eeNameFactory], call[configData.getJ2EENameFactory, parameter[]]] assign[THIS[member[None.pmiFactory]], call[configData.getPmiBeanFactory, parameter[]]] assign[THIS[member[None.ivObjectCopier]], call[configData.getObjectCopier, parameter[]]] assign[THIS[member[None.orbUtils]], call[configData.getOrbUtils, parameter[]]] assign[THIS[member[None.ivEntityHelper]], call[configData.getEntityHelper, parameter[]]] assign[THIS[member[None.ivSFSBFailoverEnabled]], call[configData.isEnabledSFSBFailover, parameter[]]] assign[THIS[member[None.ivSfFailoverCache]], call[configData.getStatefulFailoverCache, parameter[]]] assign[THIS[member[None.passivator]], call[configData.getStatefulPassivator, parameter[]]] assign[THIS[member[None.ivStatefulBeanEnqDeq]], call[configData.getStatefulBeanEnqDeq, parameter[]]] assign[THIS[member[None.ivDispatchEventListenerManager]], call[configData.getDispatchEventListenerManager, parameter[]]] assign[member[.poolManager], call[configData.getPoolManager, parameter[]]] assign[member[.activator], ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MethodInvocation(arguments=[], member=getEJBCache, postfix_operators=[], prefix_operators=[], qualifier=configData, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getPassivationPolicy, postfix_operators=[], prefix_operators=[], qualifier=configData, selectors=[], type_arguments=None), MemberReference(member=passivator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ivSfFailoverCache, 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=Activator, sub_type=None))] assign[member[.homeOfHomes], ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=activator, 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=HomeOfHomes, sub_type=None))] local_variable[type[int], uncached] local_variable[type[ActivationStrategy], as] call[homeOfHomes.setActivationStrategy, parameter[member[.as]]] assign[member[.wrapperManager], call[configData.getWrapperManager, parameter[]]] call[ivUOWManager.registerRunUnderUOWCallback, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RunUnderUOWCallback, sub_type=None))]] assign[member[.initialized], literal[true]] assign[member[.defaultContainer], THIS[]] if[binary_operation[member[.isTraceOn], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.exit, parameter[member[.tc], literal["initialize"]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[void] identifier[initialize] operator[SEP] identifier[ContainerConfig] identifier[configData] operator[SEP] Keyword[throws] identifier[CSIException] { Keyword[final] Keyword[boolean] identifier[isTraceOn] operator[=] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[initialized] operator[SEP] { Keyword[throw] Keyword[new] identifier[CSIException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[containerExtFactory] operator[=] identifier[configData] operator[SEP] identifier[getContainerExtensionFactory] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[ivEJBRuntime] operator[=] identifier[configData] operator[SEP] identifier[getEJBRuntime] operator[SEP] operator[SEP] operator[SEP] identifier[classLoader] operator[=] identifier[configData] operator[SEP] identifier[getClassLoader] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[classLoader] operator[==] Other[null] operator[SEP] identifier[classLoader] operator[=] Keyword[this] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getClassLoader] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[ivName] operator[=] identifier[configData] operator[SEP] identifier[getContainerName] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[persisterFactory] operator[=] identifier[configData] operator[SEP] identifier[getPersisterFactory] operator[SEP] operator[SEP] operator[SEP] identifier[EJSContainer] operator[SEP] identifier[sessionKeyFactory] operator[=] identifier[configData] operator[SEP] identifier[getSessionKeyFactory] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[sessionHandleFactory] operator[=] identifier[configData] operator[SEP] identifier[getStatefulSessionHandleFactory] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[ivSecurityCollaborator] operator[=] identifier[configData] operator[SEP] identifier[getSecurityCollaborator] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[uowCtrl] operator[=] identifier[configData] operator[SEP] identifier[getUOWControl] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[userTransactionImpl] operator[=] identifier[uowCtrl] operator[SEP] identifier[getUserTransaction] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[ivUOWManager] operator[=] identifier[UOWManagerFactory] operator[SEP] identifier[getUOWManager] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[ivAfterActivationCollaborators] operator[=] identifier[configData] operator[SEP] identifier[getAfterActivationCollaborators] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[ivBeforeActivationCollaborators] operator[=] identifier[configData] operator[SEP] identifier[getBeforeActivationCollaborators] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[ivBeforeActivationAfterCompletionCollaborators] operator[=] identifier[configData] operator[SEP] identifier[getBeforeActivationAfterCompletionCollaborators] operator[SEP] operator[SEP] operator[SEP] identifier[j2eeNameFactory] operator[=] identifier[configData] operator[SEP] identifier[getJ2EENameFactory] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[pmiFactory] operator[=] identifier[configData] operator[SEP] identifier[getPmiBeanFactory] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[ivObjectCopier] operator[=] identifier[configData] operator[SEP] identifier[getObjectCopier] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[orbUtils] operator[=] identifier[configData] operator[SEP] identifier[getOrbUtils] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[ivEntityHelper] operator[=] identifier[configData] operator[SEP] identifier[getEntityHelper] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[ivSFSBFailoverEnabled] operator[=] identifier[configData] operator[SEP] identifier[isEnabledSFSBFailover] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[ivSfFailoverCache] operator[=] identifier[configData] operator[SEP] identifier[getStatefulFailoverCache] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[passivator] operator[=] identifier[configData] operator[SEP] identifier[getStatefulPassivator] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[ivStatefulBeanEnqDeq] operator[=] identifier[configData] operator[SEP] identifier[getStatefulBeanEnqDeq] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[ivDispatchEventListenerManager] operator[=] identifier[configData] operator[SEP] identifier[getDispatchEventListenerManager] operator[SEP] operator[SEP] operator[SEP] identifier[poolManager] operator[=] identifier[configData] operator[SEP] identifier[getPoolManager] operator[SEP] operator[SEP] operator[SEP] identifier[activator] operator[=] Keyword[new] identifier[Activator] operator[SEP] Keyword[this] , identifier[configData] operator[SEP] identifier[getEJBCache] operator[SEP] operator[SEP] , identifier[configData] operator[SEP] identifier[getPassivationPolicy] operator[SEP] operator[SEP] , identifier[passivator] , identifier[ivSfFailoverCache] operator[SEP] operator[SEP] identifier[homeOfHomes] operator[=] Keyword[new] identifier[HomeOfHomes] operator[SEP] Keyword[this] , identifier[activator] operator[SEP] operator[SEP] Keyword[int] identifier[uncached] operator[=] identifier[Activator] operator[SEP] identifier[UNCACHED_ACTIVATION_STRATEGY] operator[SEP] identifier[ActivationStrategy] identifier[as] operator[=] identifier[activator] operator[SEP] identifier[getActivationStrategy] operator[SEP] identifier[uncached] operator[SEP] operator[SEP] identifier[homeOfHomes] operator[SEP] identifier[setActivationStrategy] operator[SEP] identifier[as] operator[SEP] operator[SEP] identifier[wrapperManager] operator[=] identifier[configData] operator[SEP] identifier[getWrapperManager] operator[SEP] operator[SEP] operator[SEP] identifier[ivUOWManager] operator[SEP] identifier[registerRunUnderUOWCallback] operator[SEP] Keyword[new] identifier[RunUnderUOWCallback] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[initialized] operator[=] literal[boolean] operator[SEP] identifier[defaultContainer] operator[=] Keyword[this] operator[SEP] Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] }
public com.google.protobuf.ByteString getJobNameBytes() { java.lang.Object ref = jobName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); jobName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } }
class class_name[name] begin[{] method[getJobNameBytes, return_type[type[com]], modifier[public], parameter[]] begin[{] local_variable[type[java], ref] if[binary_operation[member[.ref], instanceof, type[java]]] begin[{] local_variable[type[com], b] assign[member[.jobName_], member[.b]] return[member[.b]] else begin[{] return[Cast(expression=MemberReference(member=ref, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=google, sub_type=ReferenceType(arguments=None, dimensions=None, name=protobuf, sub_type=ReferenceType(arguments=None, dimensions=None, name=ByteString, sub_type=None)))))] end[}] end[}] END[}]
Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[ByteString] identifier[getJobNameBytes] operator[SEP] operator[SEP] { identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[Object] identifier[ref] operator[=] identifier[jobName_] operator[SEP] Keyword[if] operator[SEP] identifier[ref] Keyword[instanceof] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] operator[SEP] { identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[ByteString] identifier[b] operator[=] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[ByteString] operator[SEP] identifier[copyFromUtf8] operator[SEP] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] operator[SEP] identifier[ref] operator[SEP] operator[SEP] identifier[jobName_] operator[=] identifier[b] operator[SEP] Keyword[return] identifier[b] operator[SEP] } Keyword[else] { Keyword[return] operator[SEP] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[ByteString] operator[SEP] identifier[ref] operator[SEP] } }
private static void statFile(String fname) { try { Path path = Paths.get(new URI(fname)); long size = Files.size(path); System.out.println(fname + ": " + size + " bytes."); } catch (Exception ex) { System.out.println(fname + ": " + ex.toString()); } }
class class_name[name] begin[{] method[statFile, return_type[void], modifier[private static], parameter[fname]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=fname, 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=URI, sub_type=None))], member=get, postfix_operators=[], prefix_operators=[], qualifier=Paths, selectors=[], type_arguments=None), name=path)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Path, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=size, postfix_operators=[], prefix_operators=[], qualifier=Files, selectors=[], type_arguments=None), name=size)], modifiers=set(), type=BasicType(dimensions=[], name=long)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=fname, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=": "), operator=+), operandr=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" bytes."), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=fname, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=": "), operator=+), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[statFile] operator[SEP] identifier[String] identifier[fname] operator[SEP] { Keyword[try] { identifier[Path] identifier[path] operator[=] identifier[Paths] operator[SEP] identifier[get] operator[SEP] Keyword[new] identifier[URI] operator[SEP] identifier[fname] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[size] operator[=] identifier[Files] operator[SEP] identifier[size] operator[SEP] identifier[path] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[fname] operator[+] literal[String] operator[+] identifier[size] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[fname] operator[+] literal[String] operator[+] identifier[ex] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
@Override protected void run() throws Exception { final ResourceLoader resourceLoader = new MojoResourceLoader(getRuntimeRealm(), getScriptpath()); final Map<String, Object> context = createContext(); final Map<String, Object> options = Maps.newHashMap(); final ShellRunner shell = getRuntime().createShellRunner(); shell.run(getRuntimeRealm(), resourceLoader, context, options); }
class class_name[name] begin[{] method[run, return_type[void], modifier[protected], parameter[]] begin[{] local_variable[type[ResourceLoader], resourceLoader] local_variable[type[Map], context] local_variable[type[Map], options] local_variable[type[ShellRunner], shell] call[shell.run, parameter[call[.getRuntimeRealm, parameter[]], member[.resourceLoader], member[.context], member[.options]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[run] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[final] identifier[ResourceLoader] identifier[resourceLoader] operator[=] Keyword[new] identifier[MojoResourceLoader] operator[SEP] identifier[getRuntimeRealm] operator[SEP] operator[SEP] , identifier[getScriptpath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[context] operator[=] identifier[createContext] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[options] operator[=] identifier[Maps] operator[SEP] identifier[newHashMap] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[ShellRunner] identifier[shell] operator[=] identifier[getRuntime] operator[SEP] operator[SEP] operator[SEP] identifier[createShellRunner] operator[SEP] operator[SEP] operator[SEP] identifier[shell] operator[SEP] identifier[run] operator[SEP] identifier[getRuntimeRealm] operator[SEP] operator[SEP] , identifier[resourceLoader] , identifier[context] , identifier[options] operator[SEP] operator[SEP] }
public void installationTemplate_templateName_partitionScheme_schemeName_hardwareRaid_name_PUT(String templateName, String schemeName, String name, OvhHardwareRaid body) throws IOException { String qPath = "/me/installationTemplate/{templateName}/partitionScheme/{schemeName}/hardwareRaid/{name}"; StringBuilder sb = path(qPath, templateName, schemeName, name); exec(qPath, "PUT", sb.toString(), body); }
class class_name[name] begin[{] method[installationTemplate_templateName_partitionScheme_schemeName_hardwareRaid_name_PUT, return_type[void], modifier[public], parameter[templateName, schemeName, name, body]] begin[{] local_variable[type[String], qPath] local_variable[type[StringBuilder], sb] call[.exec, parameter[member[.qPath], literal["PUT"], call[sb.toString, parameter[]], member[.body]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[installationTemplate_templateName_partitionScheme_schemeName_hardwareRaid_name_PUT] operator[SEP] identifier[String] identifier[templateName] , identifier[String] identifier[schemeName] , identifier[String] identifier[name] , identifier[OvhHardwareRaid] identifier[body] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[qPath] operator[=] literal[String] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] identifier[path] operator[SEP] identifier[qPath] , identifier[templateName] , identifier[schemeName] , identifier[name] operator[SEP] operator[SEP] identifier[exec] operator[SEP] identifier[qPath] , literal[String] , identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[body] operator[SEP] operator[SEP] }
private static BufferedImage rgbToBuffered(MagickImage pImage, boolean pAlpha) throws MagickException { Dimension size = pImage.getDimension(); int length = size.width * size.height; int bands = pAlpha ? 4 : 3; byte[] pixels = new byte[length * bands]; // TODO: If we do multiple dispatches (one per line, typically), we could provide listener // feedback. But it's currently a lot slower than fetching all the pixels in one go. // Note: The ordering ABGR or BGR corresponds to BufferedImage // TYPE_4BYTE_ABGR and TYPE_3BYTE_BGR respectively pImage.dispatchImage(0, 0, size.width, size.height, pAlpha ? "ABGR" : "BGR", pixels); // Init databuffer with array, to avoid allocation of empty array DataBuffer buffer = new DataBufferByte(pixels, pixels.length); int[] bandOffsets = pAlpha ? BAND_OFF_TRANS : BAND_OFF_OPAQUE; WritableRaster raster = Raster.createInterleavedRaster(buffer, size.width, size.height, size.width * bands, bands, bandOffsets, LOCATION_UPPER_LEFT); return new BufferedImage(pAlpha ? CM_COLOR_ALPHA : CM_COLOR_OPAQUE, raster, pAlpha, null); }
class class_name[name] begin[{] method[rgbToBuffered, return_type[type[BufferedImage]], modifier[private static], parameter[pImage, pAlpha]] begin[{] local_variable[type[Dimension], size] local_variable[type[int], length] local_variable[type[int], bands] local_variable[type[byte], pixels] call[pImage.dispatchImage, parameter[literal[0], literal[0], member[size.width], member[size.height], TernaryExpression(condition=MemberReference(member=pAlpha, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="BGR"), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ABGR")), member[.pixels]]] local_variable[type[DataBuffer], buffer] local_variable[type[int], bandOffsets] local_variable[type[WritableRaster], raster] return[ClassCreator(arguments=[TernaryExpression(condition=MemberReference(member=pAlpha, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=MemberReference(member=CM_COLOR_OPAQUE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=CM_COLOR_ALPHA, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=raster, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pAlpha, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=BufferedImage, sub_type=None))] end[}] END[}]
Keyword[private] Keyword[static] identifier[BufferedImage] identifier[rgbToBuffered] operator[SEP] identifier[MagickImage] identifier[pImage] , Keyword[boolean] identifier[pAlpha] operator[SEP] Keyword[throws] identifier[MagickException] { identifier[Dimension] identifier[size] operator[=] identifier[pImage] operator[SEP] identifier[getDimension] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[length] operator[=] identifier[size] operator[SEP] identifier[width] operator[*] identifier[size] operator[SEP] identifier[height] operator[SEP] Keyword[int] identifier[bands] operator[=] identifier[pAlpha] operator[?] Other[4] operator[:] Other[3] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[pixels] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[length] operator[*] identifier[bands] operator[SEP] operator[SEP] identifier[pImage] operator[SEP] identifier[dispatchImage] operator[SEP] Other[0] , Other[0] , identifier[size] operator[SEP] identifier[width] , identifier[size] operator[SEP] identifier[height] , identifier[pAlpha] operator[?] literal[String] operator[:] literal[String] , identifier[pixels] operator[SEP] operator[SEP] identifier[DataBuffer] identifier[buffer] operator[=] Keyword[new] identifier[DataBufferByte] operator[SEP] identifier[pixels] , identifier[pixels] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[bandOffsets] operator[=] identifier[pAlpha] operator[?] identifier[BAND_OFF_TRANS] operator[:] identifier[BAND_OFF_OPAQUE] operator[SEP] identifier[WritableRaster] identifier[raster] operator[=] identifier[Raster] operator[SEP] identifier[createInterleavedRaster] operator[SEP] identifier[buffer] , identifier[size] operator[SEP] identifier[width] , identifier[size] operator[SEP] identifier[height] , identifier[size] operator[SEP] identifier[width] operator[*] identifier[bands] , identifier[bands] , identifier[bandOffsets] , identifier[LOCATION_UPPER_LEFT] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[BufferedImage] operator[SEP] identifier[pAlpha] operator[?] identifier[CM_COLOR_ALPHA] operator[:] identifier[CM_COLOR_OPAQUE] , identifier[raster] , identifier[pAlpha] , Other[null] operator[SEP] operator[SEP] }
private void assembleDissectorPhases() throws InvalidDissectorException { for (final Dissector dissector : allDissectors) { final String inputType = dissector.getInputType(); if (inputType == null) { throw new InvalidDissectorException("Dissector returns null on getInputType(): ["+ dissector.getClass().getCanonicalName()+"]"); } final List<String> outputs = dissector.getPossibleOutput(); if (outputs == null || outputs.isEmpty()) { throw new InvalidDissectorException("Dissector cannot create any outputs: ["+ dissector.getClass().getCanonicalName()+"]"); } // Create all dissector phases for (final String output: outputs) { final int colonPos = output.indexOf(':'); final String outputType = output.substring(0, colonPos); final String name = output.substring(colonPos + 1); availableDissectors.add(new DissectorPhase(inputType, outputType, name, dissector)); } } }
class class_name[name] begin[{] method[assembleDissectorPhases, return_type[void], modifier[private], parameter[]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getInputType, postfix_operators=[], prefix_operators=[], qualifier=dissector, selectors=[], type_arguments=None), name=inputType)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=inputType, 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=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Dissector returns null on getInputType(): ["), operandr=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=dissector, selectors=[MethodInvocation(arguments=[], member=getCanonicalName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InvalidDissectorException, sub_type=None)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getPossibleOutput, postfix_operators=[], prefix_operators=[], qualifier=dissector, selectors=[], type_arguments=None), name=outputs)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=List, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=outputs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=outputs, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Dissector cannot create any outputs: ["), operandr=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=dissector, selectors=[MethodInvocation(arguments=[], member=getCanonicalName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InvalidDissectorException, sub_type=None)), label=None)])), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=':')], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=output, selectors=[], type_arguments=None), name=colonPos)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=colonPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=output, selectors=[], type_arguments=None), name=outputType)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=colonPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=output, selectors=[], type_arguments=None), name=name)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=inputType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=outputType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=dissector, 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=DissectorPhase, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=availableDissectors, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=outputs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=output)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=allDissectors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=dissector)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Dissector, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[assembleDissectorPhases] operator[SEP] operator[SEP] Keyword[throws] identifier[InvalidDissectorException] { Keyword[for] operator[SEP] Keyword[final] identifier[Dissector] identifier[dissector] operator[:] identifier[allDissectors] operator[SEP] { Keyword[final] identifier[String] identifier[inputType] operator[=] identifier[dissector] operator[SEP] identifier[getInputType] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[inputType] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[InvalidDissectorException] operator[SEP] literal[String] operator[+] identifier[dissector] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getCanonicalName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[outputs] operator[=] identifier[dissector] operator[SEP] identifier[getPossibleOutput] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[outputs] operator[==] Other[null] operator[||] identifier[outputs] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[InvalidDissectorException] operator[SEP] literal[String] operator[+] identifier[dissector] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getCanonicalName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[output] operator[:] identifier[outputs] operator[SEP] { Keyword[final] Keyword[int] identifier[colonPos] operator[=] identifier[output] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[outputType] operator[=] identifier[output] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[colonPos] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[name] operator[=] identifier[output] operator[SEP] identifier[substring] operator[SEP] identifier[colonPos] operator[+] Other[1] operator[SEP] operator[SEP] identifier[availableDissectors] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[DissectorPhase] operator[SEP] identifier[inputType] , identifier[outputType] , identifier[name] , identifier[dissector] operator[SEP] operator[SEP] operator[SEP] } } }
public ServiceFuture<TopologyInner> getTopologyAsync(String resourceGroupName, String networkWatcherName, TopologyParameters parameters, final ServiceCallback<TopologyInner> serviceCallback) { return ServiceFuture.fromResponse(getTopologyWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); }
class class_name[name] begin[{] method[getTopologyAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, networkWatcherName, parameters, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.getTopologyWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.networkWatcherName], member[.parameters]]], member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[TopologyInner] operator[>] identifier[getTopologyAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[networkWatcherName] , identifier[TopologyParameters] identifier[parameters] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[TopologyInner] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromResponse] operator[SEP] identifier[getTopologyWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[networkWatcherName] , identifier[parameters] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP] }
public static long parseSignedLong(CharSequence s, final int start, final int end) throws NumberFormatException { if (s.charAt(start) == '-') { // negative! return -parseUnsignedLong(s, start + 1, end); } else { return parseUnsignedLong(s, start, end); } }
class class_name[name] begin[{] method[parseSignedLong, return_type[type[long]], modifier[public static], parameter[s, start, end]] begin[{] if[binary_operation[call[s.charAt, parameter[member[.start]]], ==, literal['-']]] begin[{] return[call[.parseUnsignedLong, parameter[member[.s], binary_operation[member[.start], +, literal[1]], member[.end]]]] else begin[{] return[call[.parseUnsignedLong, parameter[member[.s], member[.start], member[.end]]]] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[long] identifier[parseSignedLong] operator[SEP] identifier[CharSequence] identifier[s] , Keyword[final] Keyword[int] identifier[start] , Keyword[final] Keyword[int] identifier[end] operator[SEP] Keyword[throws] identifier[NumberFormatException] { Keyword[if] operator[SEP] identifier[s] operator[SEP] identifier[charAt] operator[SEP] identifier[start] operator[SEP] operator[==] literal[String] operator[SEP] { Keyword[return] operator[-] identifier[parseUnsignedLong] operator[SEP] identifier[s] , identifier[start] operator[+] Other[1] , identifier[end] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[parseUnsignedLong] operator[SEP] identifier[s] , identifier[start] , identifier[end] operator[SEP] operator[SEP] } }
public Date parseDate(String str) { if (str == null) return null; try { return dateFormat.parse(str); } catch (ParseException e) { throw new RuntimeException(e); } }
class class_name[name] begin[{] method[parseDate, return_type[type[Date]], modifier[public], parameter[str]] begin[{] if[binary_operation[member[.str], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=str, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parse, postfix_operators=[], prefix_operators=[], qualifier=dateFormat, 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=['ParseException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] identifier[Date] identifier[parseDate] operator[SEP] identifier[String] identifier[str] operator[SEP] { Keyword[if] operator[SEP] identifier[str] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[try] { Keyword[return] identifier[dateFormat] operator[SEP] identifier[parse] operator[SEP] identifier[str] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ParseException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
public int doMove(int iRelPosition) throws DBException { Object objData = m_pTable.move(iRelPosition, this); if (objData instanceof BaseBuffer) { this.setDataSource(objData); return Constants.NORMAL_RETURN; // Normal return } else if (objData instanceof Number) return ((Number)objData).intValue(); // Usually EOF else return Constants.ERROR_RETURN; // Never }
class class_name[name] begin[{] method[doMove, return_type[type[int]], modifier[public], parameter[iRelPosition]] begin[{] local_variable[type[Object], objData] if[binary_operation[member[.objData], instanceof, type[BaseBuffer]]] begin[{] THIS[call[None.setDataSource, parameter[member[.objData]]]] return[member[Constants.NORMAL_RETURN]] else begin[{] if[binary_operation[member[.objData], instanceof, type[Number]]] begin[{] return[Cast(expression=MemberReference(member=objData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Number, sub_type=None))] else begin[{] return[member[Constants.ERROR_RETURN]] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[int] identifier[doMove] operator[SEP] Keyword[int] identifier[iRelPosition] operator[SEP] Keyword[throws] identifier[DBException] { identifier[Object] identifier[objData] operator[=] identifier[m_pTable] operator[SEP] identifier[move] operator[SEP] identifier[iRelPosition] , Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[objData] Keyword[instanceof] identifier[BaseBuffer] operator[SEP] { Keyword[this] operator[SEP] identifier[setDataSource] operator[SEP] identifier[objData] operator[SEP] operator[SEP] Keyword[return] identifier[Constants] operator[SEP] identifier[NORMAL_RETURN] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[objData] Keyword[instanceof] identifier[Number] operator[SEP] Keyword[return] operator[SEP] operator[SEP] identifier[Number] operator[SEP] identifier[objData] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] Keyword[else] Keyword[return] identifier[Constants] operator[SEP] identifier[ERROR_RETURN] operator[SEP] }
public Map<String, Map<String, Map<String, Map<String, ?>>>> validationConstraints(String type) { return getEntity(invokeGet(Utils.formatMessage("_constraints/{0}", type), null), Map.class); }
class class_name[name] begin[{] method[validationConstraints, return_type[type[Map]], modifier[public], parameter[type]] begin[{] return[call[.getEntity, parameter[call[.invokeGet, parameter[call[Utils.formatMessage, parameter[literal["_constraints/{0}"], member[.type]]], literal[null]]], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Map, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Map] operator[<] identifier[String] , identifier[Map] operator[<] identifier[String] , identifier[Map] operator[<] identifier[String] , operator[?] operator[>] operator[>] operator[>] operator[>] identifier[validationConstraints] operator[SEP] identifier[String] identifier[type] operator[SEP] { Keyword[return] identifier[getEntity] operator[SEP] identifier[invokeGet] operator[SEP] identifier[Utils] operator[SEP] identifier[formatMessage] operator[SEP] literal[String] , identifier[type] operator[SEP] , Other[null] operator[SEP] , identifier[Map] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
void fillPage(final int position) { if (Constants.DEBUG) { Log.d("InfiniteViewPager", "setup Page " + position); printPageModels("before newPage"); } final PageModel<T> oldModel = mPageModels[position]; final PageModel<T> newModel = createPageModel(position); if (oldModel == null || newModel == null) { Log.w(Constants.LOG_TAG, "fillPage no model found " + oldModel + " " + newModel); return; } // moving the new created views to the page of the viewpager oldModel.removeAllChildren(); for (final View newChild : newModel.getChildren()) { newModel.removeViewFromParent(newChild); oldModel.addChild(newChild); } mPageModels[position].setIndicator(newModel.getIndicator()); }
class class_name[name] begin[{] method[fillPage, return_type[void], modifier[default], parameter[position]] begin[{] if[member[Constants.DEBUG]] begin[{] call[Log.d, parameter[literal["InfiniteViewPager"], binary_operation[literal["setup Page "], +, member[.position]]]] call[.printPageModels, parameter[literal["before newPage"]]] else begin[{] None end[}] local_variable[type[PageModel], oldModel] local_variable[type[PageModel], newModel] if[binary_operation[binary_operation[member[.oldModel], ==, literal[null]], ||, binary_operation[member[.newModel], ==, literal[null]]]] begin[{] call[Log.w, parameter[member[Constants.LOG_TAG], binary_operation[binary_operation[binary_operation[literal["fillPage no model found "], +, member[.oldModel]], +, literal[" "]], +, member[.newModel]]]] return[None] else begin[{] None end[}] call[oldModel.removeAllChildren, parameter[]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=newChild, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeViewFromParent, postfix_operators=[], prefix_operators=[], qualifier=newModel, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=newChild, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addChild, postfix_operators=[], prefix_operators=[], qualifier=oldModel, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getChildren, postfix_operators=[], prefix_operators=[], qualifier=newModel, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=newChild)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=View, sub_type=None))), label=None) member[.mPageModels] end[}] END[}]
Keyword[void] identifier[fillPage] operator[SEP] Keyword[final] Keyword[int] identifier[position] operator[SEP] { Keyword[if] operator[SEP] identifier[Constants] operator[SEP] identifier[DEBUG] operator[SEP] { identifier[Log] operator[SEP] identifier[d] operator[SEP] literal[String] , literal[String] operator[+] identifier[position] operator[SEP] operator[SEP] identifier[printPageModels] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[final] identifier[PageModel] operator[<] identifier[T] operator[>] identifier[oldModel] operator[=] identifier[mPageModels] operator[SEP] identifier[position] operator[SEP] operator[SEP] Keyword[final] identifier[PageModel] operator[<] identifier[T] operator[>] identifier[newModel] operator[=] identifier[createPageModel] operator[SEP] identifier[position] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[oldModel] operator[==] Other[null] operator[||] identifier[newModel] operator[==] Other[null] operator[SEP] { identifier[Log] operator[SEP] identifier[w] operator[SEP] identifier[Constants] operator[SEP] identifier[LOG_TAG] , literal[String] operator[+] identifier[oldModel] operator[+] literal[String] operator[+] identifier[newModel] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[oldModel] operator[SEP] identifier[removeAllChildren] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[View] identifier[newChild] operator[:] identifier[newModel] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] { identifier[newModel] operator[SEP] identifier[removeViewFromParent] operator[SEP] identifier[newChild] operator[SEP] operator[SEP] identifier[oldModel] operator[SEP] identifier[addChild] operator[SEP] identifier[newChild] operator[SEP] operator[SEP] } identifier[mPageModels] operator[SEP] identifier[position] operator[SEP] operator[SEP] identifier[setIndicator] operator[SEP] identifier[newModel] operator[SEP] identifier[getIndicator] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public java.util.List<ChapInfo> getChapCredentials() { if (chapCredentials == null) { chapCredentials = new com.amazonaws.internal.SdkInternalList<ChapInfo>(); } return chapCredentials; }
class class_name[name] begin[{] method[getChapCredentials, return_type[type[java]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.chapCredentials], ==, literal[null]]] begin[{] assign[member[.chapCredentials], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=amazonaws, sub_type=ReferenceType(arguments=None, dimensions=None, name=internal, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ChapInfo, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))] else begin[{] None end[}] return[member[.chapCredentials]] end[}] END[}]
Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[ChapInfo] operator[>] identifier[getChapCredentials] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[chapCredentials] operator[==] Other[null] operator[SEP] { identifier[chapCredentials] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[ChapInfo] operator[>] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[chapCredentials] operator[SEP] }
@Override public ServiceInstance vote(List<ServiceInstance> instances) { if (instances.isEmpty()) { return null; } int i = index.getAndIncrement(); int pos = i % instances.size(); ServiceInstance instance = instances.get(pos); return instance; }
class class_name[name] begin[{] method[vote, return_type[type[ServiceInstance]], modifier[public], parameter[instances]] begin[{] if[call[instances.isEmpty, parameter[]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[int], i] local_variable[type[int], pos] local_variable[type[ServiceInstance], instance] return[member[.instance]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ServiceInstance] identifier[vote] operator[SEP] identifier[List] operator[<] identifier[ServiceInstance] operator[>] identifier[instances] operator[SEP] { Keyword[if] operator[SEP] identifier[instances] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[int] identifier[i] operator[=] identifier[index] operator[SEP] identifier[getAndIncrement] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[pos] operator[=] identifier[i] operator[%] identifier[instances] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[ServiceInstance] identifier[instance] operator[=] identifier[instances] operator[SEP] identifier[get] operator[SEP] identifier[pos] operator[SEP] operator[SEP] Keyword[return] identifier[instance] operator[SEP] }
public String getMdwVersion() throws IOException { if (mdwVersion == null) { YamlProperties yaml = getProjectYaml(); if (yaml != null) { mdwVersion = yaml.getString(Props.ProjectYaml.MDW_VERSION); } } return mdwVersion; }
class class_name[name] begin[{] method[getMdwVersion, return_type[type[String]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.mdwVersion], ==, literal[null]]] begin[{] local_variable[type[YamlProperties], yaml] if[binary_operation[member[.yaml], !=, literal[null]]] begin[{] assign[member[.mdwVersion], call[yaml.getString, parameter[member[Props.ProjectYaml.MDW_VERSION]]]] else begin[{] None end[}] else begin[{] None end[}] return[member[.mdwVersion]] end[}] END[}]
Keyword[public] identifier[String] identifier[getMdwVersion] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[mdwVersion] operator[==] Other[null] operator[SEP] { identifier[YamlProperties] identifier[yaml] operator[=] identifier[getProjectYaml] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[yaml] operator[!=] Other[null] operator[SEP] { identifier[mdwVersion] operator[=] identifier[yaml] operator[SEP] identifier[getString] operator[SEP] identifier[Props] operator[SEP] identifier[ProjectYaml] operator[SEP] identifier[MDW_VERSION] operator[SEP] operator[SEP] } } Keyword[return] identifier[mdwVersion] operator[SEP] }
public OvhOperation serviceName_cluster_clusterId_allowedNetwork_allowedNetworkId_DELETE(String serviceName, String clusterId, String allowedNetworkId) throws IOException { String qPath = "/dbaas/logs/{serviceName}/cluster/{clusterId}/allowedNetwork/{allowedNetworkId}"; StringBuilder sb = path(qPath, serviceName, clusterId, allowedNetworkId); String resp = exec(qPath, "DELETE", sb.toString(), null); return convertTo(resp, OvhOperation.class); }
class class_name[name] begin[{] method[serviceName_cluster_clusterId_allowedNetwork_allowedNetworkId_DELETE, return_type[type[OvhOperation]], modifier[public], parameter[serviceName, clusterId, allowedNetworkId]] begin[{] local_variable[type[String], qPath] local_variable[type[StringBuilder], sb] local_variable[type[String], resp] return[call[.convertTo, parameter[member[.resp], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OvhOperation, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[OvhOperation] identifier[serviceName_cluster_clusterId_allowedNetwork_allowedNetworkId_DELETE] operator[SEP] identifier[String] identifier[serviceName] , identifier[String] identifier[clusterId] , identifier[String] identifier[allowedNetworkId] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[qPath] operator[=] literal[String] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] identifier[path] operator[SEP] identifier[qPath] , identifier[serviceName] , identifier[clusterId] , identifier[allowedNetworkId] operator[SEP] operator[SEP] identifier[String] identifier[resp] operator[=] identifier[exec] operator[SEP] identifier[qPath] , literal[String] , identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , Other[null] operator[SEP] operator[SEP] Keyword[return] identifier[convertTo] operator[SEP] identifier[resp] , identifier[OvhOperation] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
static String decryptMessageElement(OmemoElement element, CipherAndAuthTag cipherAndAuthTag) throws CryptoFailedException { if (!element.isMessageElement()) { throw new IllegalArgumentException("decryptMessageElement cannot decrypt OmemoElement which is no MessageElement!"); } if (cipherAndAuthTag.getAuthTag() == null || cipherAndAuthTag.getAuthTag().length != 16) { throw new CryptoFailedException("AuthenticationTag is null or has wrong length: " + (cipherAndAuthTag.getAuthTag() == null ? "null" : cipherAndAuthTag.getAuthTag().length)); } byte[] encryptedBody = payloadAndAuthTag(element, cipherAndAuthTag.getAuthTag()); try { String plaintext = new String(cipherAndAuthTag.getCipher().doFinal(encryptedBody), StringUtils.UTF8); return plaintext; } catch (UnsupportedEncodingException | IllegalBlockSizeException | BadPaddingException e) { throw new CryptoFailedException("decryptMessageElement could not decipher message body: " + e.getMessage()); } }
class class_name[name] begin[{] method[decryptMessageElement, return_type[type[String]], modifier[static], parameter[element, cipherAndAuthTag]] begin[{] if[call[element.isMessageElement, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="decryptMessageElement cannot decrypt OmemoElement which is no MessageElement!")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[binary_operation[call[cipherAndAuthTag.getAuthTag, parameter[]], ==, literal[null]], ||, binary_operation[call[cipherAndAuthTag.getAuthTag, parameter[]], !=, literal[16]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="AuthenticationTag is null or has wrong length: "), operandr=TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getAuthTag, postfix_operators=[], prefix_operators=[], qualifier=cipherAndAuthTag, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[], member=getAuthTag, postfix_operators=[], prefix_operators=[], qualifier=cipherAndAuthTag, selectors=[MemberReference(member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="null")), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CryptoFailedException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[byte], encryptedBody] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getCipher, postfix_operators=[], prefix_operators=[], qualifier=cipherAndAuthTag, selectors=[MethodInvocation(arguments=[MemberReference(member=encryptedBody, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=doFinal, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=UTF8, postfix_operators=[], prefix_operators=[], qualifier=StringUtils, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), name=plaintext)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), ReturnStatement(expression=MemberReference(member=plaintext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="decryptMessageElement could not decipher message body: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, 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=CryptoFailedException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['UnsupportedEncodingException', 'IllegalBlockSizeException', 'BadPaddingException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[static] identifier[String] identifier[decryptMessageElement] operator[SEP] identifier[OmemoElement] identifier[element] , identifier[CipherAndAuthTag] identifier[cipherAndAuthTag] operator[SEP] Keyword[throws] identifier[CryptoFailedException] { Keyword[if] operator[SEP] operator[!] identifier[element] operator[SEP] identifier[isMessageElement] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[cipherAndAuthTag] operator[SEP] identifier[getAuthTag] operator[SEP] operator[SEP] operator[==] Other[null] operator[||] identifier[cipherAndAuthTag] operator[SEP] identifier[getAuthTag] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[!=] Other[16] operator[SEP] { Keyword[throw] Keyword[new] identifier[CryptoFailedException] operator[SEP] literal[String] operator[+] operator[SEP] identifier[cipherAndAuthTag] operator[SEP] identifier[getAuthTag] operator[SEP] operator[SEP] operator[==] Other[null] operator[?] literal[String] operator[:] identifier[cipherAndAuthTag] operator[SEP] identifier[getAuthTag] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[byte] operator[SEP] operator[SEP] identifier[encryptedBody] operator[=] identifier[payloadAndAuthTag] operator[SEP] identifier[element] , identifier[cipherAndAuthTag] operator[SEP] identifier[getAuthTag] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[String] identifier[plaintext] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[cipherAndAuthTag] operator[SEP] identifier[getCipher] operator[SEP] operator[SEP] operator[SEP] identifier[doFinal] operator[SEP] identifier[encryptedBody] operator[SEP] , identifier[StringUtils] operator[SEP] identifier[UTF8] operator[SEP] operator[SEP] Keyword[return] identifier[plaintext] operator[SEP] } Keyword[catch] operator[SEP] identifier[UnsupportedEncodingException] operator[|] identifier[IllegalBlockSizeException] operator[|] identifier[BadPaddingException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[CryptoFailedException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
private synchronized void emitRecords() throws IOException { for (String recordName : bufferedData.keySet()) { RecordMap recordMap = bufferedData.get(recordName); synchronized (recordMap) { Set<Entry<TagMap, MetricMap>> entrySet = recordMap.entrySet (); for (Entry<TagMap, MetricMap> entry : entrySet) { OutputRecord outRec = new OutputRecord(entry.getKey(), entry.getValue()); emitRecord(contextName, recordName, outRec); } } } flush(); }
class class_name[name] begin[{] method[emitRecords, return_type[void], modifier[synchronized private], parameter[]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=recordName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=bufferedData, selectors=[], type_arguments=None), name=recordMap)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=RecordMap, sub_type=None)), SynchronizedStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=recordMap, selectors=[], type_arguments=None), name=entrySet)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=TagMap, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=MetricMap, sub_type=None))], dimensions=[], name=Entry, sub_type=None))], dimensions=[], name=Set, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OutputRecord, sub_type=None)), name=outRec)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=OutputRecord, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=contextName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=recordName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=outRec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=emitRecord, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=TagMap, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=MetricMap, sub_type=None))], dimensions=[], name=Entry, sub_type=None))), label=None)], label=None, lock=MemberReference(member=recordMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=bufferedData, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=recordName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) call[.flush, parameter[]] end[}] END[}]
Keyword[private] Keyword[synchronized] Keyword[void] identifier[emitRecords] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[for] operator[SEP] identifier[String] identifier[recordName] operator[:] identifier[bufferedData] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { identifier[RecordMap] identifier[recordMap] operator[=] identifier[bufferedData] operator[SEP] identifier[get] operator[SEP] identifier[recordName] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] identifier[recordMap] operator[SEP] { identifier[Set] operator[<] identifier[Entry] operator[<] identifier[TagMap] , identifier[MetricMap] operator[>] operator[>] identifier[entrySet] operator[=] identifier[recordMap] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Entry] operator[<] identifier[TagMap] , identifier[MetricMap] operator[>] identifier[entry] operator[:] identifier[entrySet] operator[SEP] { identifier[OutputRecord] identifier[outRec] operator[=] Keyword[new] identifier[OutputRecord] operator[SEP] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] , identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[emitRecord] operator[SEP] identifier[contextName] , identifier[recordName] , identifier[outRec] operator[SEP] operator[SEP] } } } identifier[flush] operator[SEP] operator[SEP] operator[SEP] }
private void tryBackgroundEnter(boolean focused) { if (mBackground == null) { mBackground = new RippleBackground(this, mHotspotBounds); } mBackground.setup(mState.mMaxRadius, mDensity); mBackground.enter(focused); }
class class_name[name] begin[{] method[tryBackgroundEnter, return_type[void], modifier[private], parameter[focused]] begin[{] if[binary_operation[member[.mBackground], ==, literal[null]]] begin[{] assign[member[.mBackground], ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=mHotspotBounds, 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=RippleBackground, sub_type=None))] else begin[{] None end[}] call[mBackground.setup, parameter[member[mState.mMaxRadius], member[.mDensity]]] call[mBackground.enter, parameter[member[.focused]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[tryBackgroundEnter] operator[SEP] Keyword[boolean] identifier[focused] operator[SEP] { Keyword[if] operator[SEP] identifier[mBackground] operator[==] Other[null] operator[SEP] { identifier[mBackground] operator[=] Keyword[new] identifier[RippleBackground] operator[SEP] Keyword[this] , identifier[mHotspotBounds] operator[SEP] operator[SEP] } identifier[mBackground] operator[SEP] identifier[setup] operator[SEP] identifier[mState] operator[SEP] identifier[mMaxRadius] , identifier[mDensity] operator[SEP] operator[SEP] identifier[mBackground] operator[SEP] identifier[enter] operator[SEP] identifier[focused] operator[SEP] operator[SEP] }
@Override public final <RQ, RS> Maybe<RS> postFor(String resource, RQ rq, Class<RS> clazz) throws RestEndpointIOException { return post(resource, rq, clazz).flatMap(new BodyTransformer<RS>()); }
class class_name[name] begin[{] method[postFor, return_type[type[Maybe]], modifier[final public], parameter[resource, rq, clazz]] begin[{] return[call[.post, parameter[member[.resource], member[.rq], member[.clazz]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[final] operator[<] identifier[RQ] , identifier[RS] operator[>] identifier[Maybe] operator[<] identifier[RS] operator[>] identifier[postFor] operator[SEP] identifier[String] identifier[resource] , identifier[RQ] identifier[rq] , identifier[Class] operator[<] identifier[RS] operator[>] identifier[clazz] operator[SEP] Keyword[throws] identifier[RestEndpointIOException] { Keyword[return] identifier[post] operator[SEP] identifier[resource] , identifier[rq] , identifier[clazz] operator[SEP] operator[SEP] identifier[flatMap] operator[SEP] Keyword[new] identifier[BodyTransformer] operator[<] identifier[RS] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private void buildTargetPanel() { setUpUtilBar(); panel.add(utilBar); panel.add(heading); panel.add(panelContentRO); panel.add(menu); }
class class_name[name] begin[{] method[buildTargetPanel, return_type[void], modifier[private], parameter[]] begin[{] call[.setUpUtilBar, parameter[]] call[panel.add, parameter[member[.utilBar]]] call[panel.add, parameter[member[.heading]]] call[panel.add, parameter[member[.panelContentRO]]] call[panel.add, parameter[member[.menu]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[buildTargetPanel] operator[SEP] operator[SEP] { identifier[setUpUtilBar] operator[SEP] operator[SEP] operator[SEP] identifier[panel] operator[SEP] identifier[add] operator[SEP] identifier[utilBar] operator[SEP] operator[SEP] identifier[panel] operator[SEP] identifier[add] operator[SEP] identifier[heading] operator[SEP] operator[SEP] identifier[panel] operator[SEP] identifier[add] operator[SEP] identifier[panelContentRO] operator[SEP] operator[SEP] identifier[panel] operator[SEP] identifier[add] operator[SEP] identifier[menu] operator[SEP] operator[SEP] }
void submit() { try { OpenCms.getSiteManager().updateGeneralSettings( m_cms, ((CmsSite)m_fieldDefaultURI.getValue()).getSiteRoot(), getWebserverList(), "/" + (String)m_fieldSharedFolder.getValue() + "/"); if (!CmsEditSiteForm.FORBIDDEN_FOLDER_NAMES.isEmpty()) { CmsEditSiteForm.FORBIDDEN_FOLDER_NAMES.set(1, (String)m_fieldSharedFolder.getValue()); } // write the system configuration OpenCms.writeConfiguration(CmsSitesConfiguration.class); } catch (CmsException e) { // } }
class class_name[name] begin[{] method[submit, return_type[void], modifier[default], parameter[]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=getSiteManager, postfix_operators=[], prefix_operators=[], qualifier=OpenCms, selectors=[MethodInvocation(arguments=[MemberReference(member=m_cms, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=m_fieldDefaultURI, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=CmsSite, sub_type=None)), MethodInvocation(arguments=[], member=getWebserverList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/"), operandr=Cast(expression=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=m_fieldSharedFolder, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/"), operator=+)], member=updateGeneralSettings, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=CmsEditSiteForm.FORBIDDEN_FOLDER_NAMES, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), Cast(expression=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=m_fieldSharedFolder, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], member=set, postfix_operators=[], prefix_operators=[], qualifier=CmsEditSiteForm.FORBIDDEN_FOLDER_NAMES, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CmsSitesConfiguration, sub_type=None))], member=writeConfiguration, postfix_operators=[], prefix_operators=[], qualifier=OpenCms, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['CmsException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[void] identifier[submit] operator[SEP] operator[SEP] { Keyword[try] { identifier[OpenCms] operator[SEP] identifier[getSiteManager] operator[SEP] operator[SEP] operator[SEP] identifier[updateGeneralSettings] operator[SEP] identifier[m_cms] , operator[SEP] operator[SEP] identifier[CmsSite] operator[SEP] identifier[m_fieldDefaultURI] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getSiteRoot] operator[SEP] operator[SEP] , identifier[getWebserverList] operator[SEP] operator[SEP] , literal[String] operator[+] operator[SEP] identifier[String] operator[SEP] identifier[m_fieldSharedFolder] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[CmsEditSiteForm] operator[SEP] identifier[FORBIDDEN_FOLDER_NAMES] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[CmsEditSiteForm] operator[SEP] identifier[FORBIDDEN_FOLDER_NAMES] operator[SEP] identifier[set] operator[SEP] Other[1] , operator[SEP] identifier[String] operator[SEP] identifier[m_fieldSharedFolder] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[OpenCms] operator[SEP] identifier[writeConfiguration] operator[SEP] identifier[CmsSitesConfiguration] operator[SEP] Keyword[class] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[CmsException] identifier[e] operator[SEP] { } }
@SuppressWarnings("null") public static void assertEquals(final Object one, final Object two, final StatusType status) { if ((one == null) && (two == null)) { return; } RESTAssert.assertNotNull(one, status); RESTAssert.assertTrue(one.equals(two), status); }
class class_name[name] begin[{] method[assertEquals, return_type[void], modifier[public static], parameter[one, two, status]] begin[{] if[binary_operation[binary_operation[member[.one], ==, literal[null]], &&, binary_operation[member[.two], ==, literal[null]]]] begin[{] return[None] else begin[{] None end[}] call[RESTAssert.assertNotNull, parameter[member[.one], member[.status]]] call[RESTAssert.assertTrue, parameter[call[one.equals, parameter[member[.two]]], member[.status]]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] Keyword[void] identifier[assertEquals] operator[SEP] Keyword[final] identifier[Object] identifier[one] , Keyword[final] identifier[Object] identifier[two] , Keyword[final] identifier[StatusType] identifier[status] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[one] operator[==] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[two] operator[==] Other[null] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } identifier[RESTAssert] operator[SEP] identifier[assertNotNull] operator[SEP] identifier[one] , identifier[status] operator[SEP] operator[SEP] identifier[RESTAssert] operator[SEP] identifier[assertTrue] operator[SEP] identifier[one] operator[SEP] identifier[equals] operator[SEP] identifier[two] operator[SEP] , identifier[status] operator[SEP] operator[SEP] }
private HashMap<String, DBIDs> multipleAssignment(Relation<?> data) { HashMap<String, DBIDs> labelMap = new HashMap<>(); for(DBIDIter iditer = data.iterDBIDs(); iditer.valid(); iditer.advance()) { String[] labels = data.get(iditer).toString().split(" "); for(String label : labels) { assign(labelMap, label, iditer); } } return labelMap; }
class class_name[name] begin[{] method[multipleAssignment, return_type[type[HashMap]], modifier[private], parameter[data]] begin[{] local_variable[type[HashMap], labelMap] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=iditer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" ")], member=split, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=labels)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=labelMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=label, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=iditer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=assign, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=labels, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=label)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None)]), control=ForControl(condition=MethodInvocation(arguments=[], member=valid, postfix_operators=[], prefix_operators=[], qualifier=iditer, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=iterDBIDs, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[], type_arguments=None), name=iditer)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DBIDIter, sub_type=None)), update=[MethodInvocation(arguments=[], member=advance, postfix_operators=[], prefix_operators=[], qualifier=iditer, selectors=[], type_arguments=None)]), label=None) return[member[.labelMap]] end[}] END[}]
Keyword[private] identifier[HashMap] operator[<] identifier[String] , identifier[DBIDs] operator[>] identifier[multipleAssignment] operator[SEP] identifier[Relation] operator[<] operator[?] operator[>] identifier[data] operator[SEP] { identifier[HashMap] operator[<] identifier[String] , identifier[DBIDs] operator[>] identifier[labelMap] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[DBIDIter] identifier[iditer] operator[=] identifier[data] operator[SEP] identifier[iterDBIDs] operator[SEP] operator[SEP] operator[SEP] identifier[iditer] operator[SEP] identifier[valid] operator[SEP] operator[SEP] operator[SEP] identifier[iditer] operator[SEP] identifier[advance] operator[SEP] operator[SEP] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[labels] operator[=] identifier[data] operator[SEP] identifier[get] operator[SEP] identifier[iditer] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[label] operator[:] identifier[labels] operator[SEP] { identifier[assign] operator[SEP] identifier[labelMap] , identifier[label] , identifier[iditer] operator[SEP] operator[SEP] } } Keyword[return] identifier[labelMap] operator[SEP] }
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final Maybe<T> doAfterTerminate(Action onAfterTerminate) { return RxJavaPlugins.onAssembly(new MaybePeek<T>(this, Functions.emptyConsumer(), // onSubscribe Functions.emptyConsumer(), // onSuccess Functions.emptyConsumer(), // onError Functions.EMPTY_ACTION, // onComplete ObjectHelper.requireNonNull(onAfterTerminate, "onAfterTerminate is null"), Functions.EMPTY_ACTION // dispose )); }
class class_name[name] begin[{] method[doAfterTerminate, return_type[type[Maybe]], modifier[final public], parameter[onAfterTerminate]] begin[{] return[call[RxJavaPlugins.onAssembly, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MethodInvocation(arguments=[], member=emptyConsumer, postfix_operators=[], prefix_operators=[], qualifier=Functions, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=emptyConsumer, postfix_operators=[], prefix_operators=[], qualifier=Functions, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=emptyConsumer, postfix_operators=[], prefix_operators=[], qualifier=Functions, selectors=[], type_arguments=None), MemberReference(member=EMPTY_ACTION, postfix_operators=[], prefix_operators=[], qualifier=Functions, selectors=[]), MethodInvocation(arguments=[MemberReference(member=onAfterTerminate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="onAfterTerminate is null")], member=requireNonNull, postfix_operators=[], prefix_operators=[], qualifier=ObjectHelper, selectors=[], type_arguments=None), MemberReference(member=EMPTY_ACTION, postfix_operators=[], prefix_operators=[], qualifier=Functions, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=MaybePeek, sub_type=None))]]] end[}] END[}]
annotation[@] identifier[CheckReturnValue] annotation[@] identifier[SchedulerSupport] operator[SEP] identifier[SchedulerSupport] operator[SEP] identifier[NONE] operator[SEP] Keyword[public] Keyword[final] identifier[Maybe] operator[<] identifier[T] operator[>] identifier[doAfterTerminate] operator[SEP] identifier[Action] identifier[onAfterTerminate] operator[SEP] { Keyword[return] identifier[RxJavaPlugins] operator[SEP] identifier[onAssembly] operator[SEP] Keyword[new] identifier[MaybePeek] operator[<] identifier[T] operator[>] operator[SEP] Keyword[this] , identifier[Functions] operator[SEP] identifier[emptyConsumer] operator[SEP] operator[SEP] , identifier[Functions] operator[SEP] identifier[emptyConsumer] operator[SEP] operator[SEP] , identifier[Functions] operator[SEP] identifier[emptyConsumer] operator[SEP] operator[SEP] , identifier[Functions] operator[SEP] identifier[EMPTY_ACTION] , identifier[ObjectHelper] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[onAfterTerminate] , literal[String] operator[SEP] , identifier[Functions] operator[SEP] identifier[EMPTY_ACTION] operator[SEP] operator[SEP] operator[SEP] }
public BaseDataJsonFieldBo setData(String data) { setAttribute(ATTR_DATA, data != null ? data.trim() : "{}"); return this; }
class class_name[name] begin[{] method[setData, return_type[type[BaseDataJsonFieldBo]], modifier[public], parameter[data]] begin[{] call[.setAttribute, parameter[member[.ATTR_DATA], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="{}"), if_true=MethodInvocation(arguments=[], member=trim, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[], type_arguments=None))]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[BaseDataJsonFieldBo] identifier[setData] operator[SEP] identifier[String] identifier[data] operator[SEP] { identifier[setAttribute] operator[SEP] identifier[ATTR_DATA] , identifier[data] operator[!=] Other[null] operator[?] identifier[data] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[:] literal[String] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
private void rule3() { if (parent instanceof XsdSchema && attributesMap.containsKey(REF_TAG)){ throw new ParsingException(XSD_TAG + " element: The " + REF_TAG + " attribute cannot be present when the parent of the " + xsdElementIsXsdSchema); } }
class class_name[name] begin[{] method[rule3, return_type[void], modifier[private], parameter[]] begin[{] if[binary_operation[binary_operation[member[.parent], instanceof, type[XsdSchema]], &&, call[attributesMap.containsKey, parameter[member[.REF_TAG]]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=XSD_TAG, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" element: The "), operator=+), operandr=MemberReference(member=REF_TAG, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" attribute cannot be present when the parent of the "), operator=+), operandr=MemberReference(member=xsdElementIsXsdSchema, 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=ParsingException, sub_type=None)), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[rule3] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[parent] Keyword[instanceof] identifier[XsdSchema] operator[&&] identifier[attributesMap] operator[SEP] identifier[containsKey] operator[SEP] identifier[REF_TAG] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[ParsingException] operator[SEP] identifier[XSD_TAG] operator[+] literal[String] operator[+] identifier[REF_TAG] operator[+] literal[String] operator[+] identifier[xsdElementIsXsdSchema] operator[SEP] operator[SEP] } }
public static void delete(final File file, final boolean ignoreFailures) { if (file.isDirectory()) { final File[] files = file.listFiles(); if (null != files) { for (final File f : files) { delete(f, ignoreFailures); } } } if (!file.delete() && !ignoreFailures) { try { Files.delete(file.toPath()); } catch (final IOException ex) { LangUtil.rethrowUnchecked(ex); } } }
class class_name[name] begin[{] method[delete, return_type[void], modifier[public static], parameter[file, ignoreFailures]] begin[{] if[call[file.isDirectory, parameter[]]] begin[{] local_variable[type[File], files] if[binary_operation[literal[null], !=, member[.files]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ignoreFailures, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=delete, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=files, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=f)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))), label=None) else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[call[file.delete, parameter[]], &&, member[.ignoreFailures]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toPath, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[], type_arguments=None)], member=delete, postfix_operators=[], prefix_operators=[], qualifier=Files, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rethrowUnchecked, postfix_operators=[], prefix_operators=[], qualifier=LangUtil, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['IOException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[delete] operator[SEP] Keyword[final] identifier[File] identifier[file] , Keyword[final] Keyword[boolean] identifier[ignoreFailures] operator[SEP] { Keyword[if] operator[SEP] identifier[file] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[File] operator[SEP] operator[SEP] identifier[files] operator[=] identifier[file] operator[SEP] identifier[listFiles] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[files] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] identifier[File] identifier[f] operator[:] identifier[files] operator[SEP] { identifier[delete] operator[SEP] identifier[f] , identifier[ignoreFailures] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] operator[!] identifier[file] operator[SEP] identifier[delete] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[ignoreFailures] operator[SEP] { Keyword[try] { identifier[Files] operator[SEP] identifier[delete] operator[SEP] identifier[file] operator[SEP] identifier[toPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[IOException] identifier[ex] operator[SEP] { identifier[LangUtil] operator[SEP] identifier[rethrowUnchecked] operator[SEP] identifier[ex] operator[SEP] operator[SEP] } } }
public TrainingJobDefinition withHyperParameters(java.util.Map<String, String> hyperParameters) { setHyperParameters(hyperParameters); return this; }
class class_name[name] begin[{] method[withHyperParameters, return_type[type[TrainingJobDefinition]], modifier[public], parameter[hyperParameters]] begin[{] call[.setHyperParameters, parameter[member[.hyperParameters]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[TrainingJobDefinition] identifier[withHyperParameters] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[hyperParameters] operator[SEP] { identifier[setHyperParameters] operator[SEP] identifier[hyperParameters] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public void updateDialog(SIPDialog sipDialog) throws SipCacheException { Node dialogNode = ((Node) dialogRootNode.getChild(Fqn.fromString(sipDialog.getDialogId()))); if(dialogNode != null) { if(dialogNode != null) { sipDialog = (SIPDialog) dialogNode.get(sipDialog.getDialogId()); } } }
class class_name[name] begin[{] method[updateDialog, return_type[void], modifier[public], parameter[sipDialog]] begin[{] local_variable[type[Node], dialogNode] if[binary_operation[member[.dialogNode], !=, literal[null]]] begin[{] if[binary_operation[member[.dialogNode], !=, literal[null]]] begin[{] assign[member[.sipDialog], Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDialogId, postfix_operators=[], prefix_operators=[], qualifier=sipDialog, selectors=[], type_arguments=None)], member=get, postfix_operators=[], prefix_operators=[], qualifier=dialogNode, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=SIPDialog, sub_type=None))] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[updateDialog] operator[SEP] identifier[SIPDialog] identifier[sipDialog] operator[SEP] Keyword[throws] identifier[SipCacheException] { identifier[Node] identifier[dialogNode] operator[=] operator[SEP] operator[SEP] identifier[Node] operator[SEP] identifier[dialogRootNode] operator[SEP] identifier[getChild] operator[SEP] identifier[Fqn] operator[SEP] identifier[fromString] operator[SEP] identifier[sipDialog] operator[SEP] identifier[getDialogId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dialogNode] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[dialogNode] operator[!=] Other[null] operator[SEP] { identifier[sipDialog] operator[=] operator[SEP] identifier[SIPDialog] operator[SEP] identifier[dialogNode] operator[SEP] identifier[get] operator[SEP] identifier[sipDialog] operator[SEP] identifier[getDialogId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } }
public OvhReceiversAsynchronousCleanReport serviceName_receivers_slotId_clean_POST(String serviceName, Long slotId, Boolean freemium, Boolean priceOnly) throws IOException { String qPath = "/sms/{serviceName}/receivers/{slotId}/clean"; StringBuilder sb = path(qPath, serviceName, slotId); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "freemium", freemium); addBody(o, "priceOnly", priceOnly); String resp = exec(qPath, "POST", sb.toString(), o); return convertTo(resp, OvhReceiversAsynchronousCleanReport.class); }
class class_name[name] begin[{] method[serviceName_receivers_slotId_clean_POST, return_type[type[OvhReceiversAsynchronousCleanReport]], modifier[public], parameter[serviceName, slotId, freemium, priceOnly]] begin[{] local_variable[type[String], qPath] local_variable[type[StringBuilder], sb] local_variable[type[HashMap], o] call[.addBody, parameter[member[.o], literal["freemium"], member[.freemium]]] call[.addBody, parameter[member[.o], literal["priceOnly"], member[.priceOnly]]] local_variable[type[String], resp] return[call[.convertTo, parameter[member[.resp], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OvhReceiversAsynchronousCleanReport, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[OvhReceiversAsynchronousCleanReport] identifier[serviceName_receivers_slotId_clean_POST] operator[SEP] identifier[String] identifier[serviceName] , identifier[Long] identifier[slotId] , identifier[Boolean] identifier[freemium] , identifier[Boolean] identifier[priceOnly] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[qPath] operator[=] literal[String] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] identifier[path] operator[SEP] identifier[qPath] , identifier[serviceName] , identifier[slotId] operator[SEP] operator[SEP] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] identifier[o] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[addBody] operator[SEP] identifier[o] , literal[String] , identifier[freemium] operator[SEP] operator[SEP] identifier[addBody] operator[SEP] identifier[o] , literal[String] , identifier[priceOnly] operator[SEP] operator[SEP] identifier[String] identifier[resp] operator[=] identifier[exec] operator[SEP] identifier[qPath] , literal[String] , identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[o] operator[SEP] operator[SEP] Keyword[return] identifier[convertTo] operator[SEP] identifier[resp] , identifier[OvhReceiversAsynchronousCleanReport] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
private Map<String, ColumnDefinition> makeColumnMap(ColumnDefinition[] columns) { Map<String, ColumnDefinition> map = new HashMap<String, ColumnDefinition>(); for (ColumnDefinition def : columns) { map.put(def.getName(), def); } return map; }
class class_name[name] begin[{] method[makeColumnMap, return_type[type[Map]], modifier[private], parameter[columns]] begin[{] local_variable[type[Map], map] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=def, selectors=[], type_arguments=None), MemberReference(member=def, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=columns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=def)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ColumnDefinition, sub_type=None))), label=None) return[member[.map]] end[}] END[}]
Keyword[private] identifier[Map] operator[<] identifier[String] , identifier[ColumnDefinition] operator[>] identifier[makeColumnMap] operator[SEP] identifier[ColumnDefinition] operator[SEP] operator[SEP] identifier[columns] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[ColumnDefinition] operator[>] identifier[map] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[ColumnDefinition] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ColumnDefinition] identifier[def] operator[:] identifier[columns] operator[SEP] { identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[def] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[def] operator[SEP] operator[SEP] } Keyword[return] identifier[map] operator[SEP] }
public boolean isValidOffset(ZoneOffset offset) { return isGap() ? false : (getOffsetBefore().equals(offset) || getOffsetAfter().equals(offset)); }
class class_name[name] begin[{] method[isValidOffset, return_type[type[boolean]], modifier[public], parameter[offset]] begin[{] return[TernaryExpression(condition=MethodInvocation(arguments=[], member=isGap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), if_false=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getOffsetBefore, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getOffsetAfter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=offset, 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=||), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false))] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isValidOffset] operator[SEP] identifier[ZoneOffset] identifier[offset] operator[SEP] { Keyword[return] identifier[isGap] operator[SEP] operator[SEP] operator[?] literal[boolean] operator[:] operator[SEP] identifier[getOffsetBefore] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[offset] operator[SEP] operator[||] identifier[getOffsetAfter] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[offset] operator[SEP] operator[SEP] operator[SEP] }
public void marshall(ExecutionProperty executionProperty, ProtocolMarshaller protocolMarshaller) { if (executionProperty == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(executionProperty.getMaxConcurrentRuns(), MAXCONCURRENTRUNS_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[executionProperty, protocolMarshaller]] begin[{] if[binary_operation[member[.executionProperty], ==, 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=getMaxConcurrentRuns, postfix_operators=[], prefix_operators=[], qualifier=executionProperty, selectors=[], type_arguments=None), MemberReference(member=MAXCONCURRENTRUNS_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[ExecutionProperty] identifier[executionProperty] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[executionProperty] 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[executionProperty] operator[SEP] identifier[getMaxConcurrentRuns] operator[SEP] operator[SEP] , identifier[MAXCONCURRENTRUNS_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] } }
private static void buildRanges() { // careful, no lead zeros allowed // low high len vendor mod-10? ranges = new LCR[] { new LCR(4000000000000L, 4999999999999L, 13, VISA, true), new LCR(30000000000000L, 30599999999999L, 14, DINERS, true), new LCR(36000000000000L, 36999999999999L, 14, DINERS, true), new LCR(38000000000000L, 38999999999999L, 14, DINERS, true), new LCR(180000000000000L, 180099999999999L, 15, JCB, true), new LCR(201400000000000L, 201499999999999L, 15, ENROUTE, false), new LCR(213100000000000L, 213199999999999L, 15, JCB, true), new LCR(214900000000000L, 214999999999999L, 15, ENROUTE, false), new LCR(340000000000000L, 349999999999999L, 15, AMEX, true), new LCR(370000000000000L, 379999999999999L, 15, AMEX, true), new LCR(3000000000000000L, 3999999999999999L, 16, JCB, true), new LCR(4000000000000000L, 4999999999999999L, 16, VISA, true), new LCR(5100000000000000L, 5599999999999999L, 16, MASTERCARD, true), new LCR(6011000000000000L, 6011999999999999L, 16, DISCOVER, true) }; // end table // initialisation }
class class_name[name] begin[{] method[buildRanges, return_type[void], modifier[private static], parameter[]] begin[{] assign[member[.ranges], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4000000000000L), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4999999999999L), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=13), MemberReference(member=VISA, 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=LCR, sub_type=None)), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=30000000000000L), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=30599999999999L), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=14), MemberReference(member=DINERS, 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=LCR, sub_type=None)), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=36000000000000L), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=36999999999999L), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=14), MemberReference(member=DINERS, 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=LCR, sub_type=None)), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=38000000000000L), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=38999999999999L), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=14), MemberReference(member=DINERS, 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=LCR, sub_type=None)), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=180000000000000L), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=180099999999999L), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=15), MemberReference(member=JCB, 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=LCR, sub_type=None)), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=201400000000000L), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=201499999999999L), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=15), MemberReference(member=ENROUTE, 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=LCR, sub_type=None)), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=213100000000000L), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=213199999999999L), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=15), MemberReference(member=JCB, 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=LCR, sub_type=None)), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=214900000000000L), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=214999999999999L), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=15), MemberReference(member=ENROUTE, 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=LCR, sub_type=None)), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=340000000000000L), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=349999999999999L), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=15), MemberReference(member=AMEX, 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=LCR, sub_type=None)), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=370000000000000L), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=379999999999999L), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=15), MemberReference(member=AMEX, 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=LCR, sub_type=None)), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3000000000000000L), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3999999999999999L), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16), MemberReference(member=JCB, 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=LCR, sub_type=None)), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4000000000000000L), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4999999999999999L), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16), MemberReference(member=VISA, 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=LCR, sub_type=None)), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5100000000000000L), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5599999999999999L), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16), MemberReference(member=MASTERCARD, 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=LCR, sub_type=None)), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6011000000000000L), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6011999999999999L), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16), MemberReference(member=DISCOVER, 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=LCR, sub_type=None))]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LCR, sub_type=None))] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[buildRanges] operator[SEP] operator[SEP] { identifier[ranges] operator[=] Keyword[new] identifier[LCR] operator[SEP] operator[SEP] { Keyword[new] identifier[LCR] operator[SEP] Other[4000000000000L] , Other[4999999999999L] , Other[13] , identifier[VISA] , literal[boolean] operator[SEP] , Keyword[new] identifier[LCR] operator[SEP] Other[30000000000000L] , Other[30599999999999L] , Other[14] , identifier[DINERS] , literal[boolean] operator[SEP] , Keyword[new] identifier[LCR] operator[SEP] Other[36000000000000L] , Other[36999999999999L] , Other[14] , identifier[DINERS] , literal[boolean] operator[SEP] , Keyword[new] identifier[LCR] operator[SEP] Other[38000000000000L] , Other[38999999999999L] , Other[14] , identifier[DINERS] , literal[boolean] operator[SEP] , Keyword[new] identifier[LCR] operator[SEP] Other[180000000000000L] , Other[180099999999999L] , Other[15] , identifier[JCB] , literal[boolean] operator[SEP] , Keyword[new] identifier[LCR] operator[SEP] Other[201400000000000L] , Other[201499999999999L] , Other[15] , identifier[ENROUTE] , literal[boolean] operator[SEP] , Keyword[new] identifier[LCR] operator[SEP] Other[213100000000000L] , Other[213199999999999L] , Other[15] , identifier[JCB] , literal[boolean] operator[SEP] , Keyword[new] identifier[LCR] operator[SEP] Other[214900000000000L] , Other[214999999999999L] , Other[15] , identifier[ENROUTE] , literal[boolean] operator[SEP] , Keyword[new] identifier[LCR] operator[SEP] Other[340000000000000L] , Other[349999999999999L] , Other[15] , identifier[AMEX] , literal[boolean] operator[SEP] , Keyword[new] identifier[LCR] operator[SEP] Other[370000000000000L] , Other[379999999999999L] , Other[15] , identifier[AMEX] , literal[boolean] operator[SEP] , Keyword[new] identifier[LCR] operator[SEP] Other[3000000000000000L] , Other[3999999999999999L] , Other[16] , identifier[JCB] , literal[boolean] operator[SEP] , Keyword[new] identifier[LCR] operator[SEP] Other[4000000000000000L] , Other[4999999999999999L] , Other[16] , identifier[VISA] , literal[boolean] operator[SEP] , Keyword[new] identifier[LCR] operator[SEP] Other[5100000000000000L] , Other[5599999999999999L] , Other[16] , identifier[MASTERCARD] , literal[boolean] operator[SEP] , Keyword[new] identifier[LCR] operator[SEP] Other[6011000000000000L] , Other[6011999999999999L] , Other[16] , identifier[DISCOVER] , literal[boolean] operator[SEP] } operator[SEP] }
public void resolveAssociations(final E data, final int maxDepth) { SQLiteDatabase database = openDB(); try { new DatabaseResolver(context, database).resolve(data, 0, maxDepth); } finally { closeDB(database); } }
class class_name[name] begin[{] method[resolveAssociations, return_type[void], modifier[public], parameter[data, maxDepth]] begin[{] local_variable[type[SQLiteDatabase], database] TryStatement(block=[StatementExpression(expression=ClassCreator(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=database, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=maxDepth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=resolve, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=DatabaseResolver, sub_type=None)), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=database, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=closeDB, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[resolveAssociations] operator[SEP] Keyword[final] identifier[E] identifier[data] , Keyword[final] Keyword[int] identifier[maxDepth] operator[SEP] { identifier[SQLiteDatabase] identifier[database] operator[=] identifier[openDB] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[new] identifier[DatabaseResolver] operator[SEP] identifier[context] , identifier[database] operator[SEP] operator[SEP] identifier[resolve] operator[SEP] identifier[data] , Other[0] , identifier[maxDepth] operator[SEP] operator[SEP] } Keyword[finally] { identifier[closeDB] operator[SEP] identifier[database] operator[SEP] operator[SEP] } }
public Observable<ServiceResponse<List<DomainTopicInner>>> listByDomainWithServiceResponseAsync(String resourceGroupName, String domainName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (domainName == null) { throw new IllegalArgumentException("Parameter domainName is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.listByDomain(this.client.subscriptionId(), resourceGroupName, domainName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<List<DomainTopicInner>>>>() { @Override public Observable<ServiceResponse<List<DomainTopicInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<DomainTopicInner>> result = listByDomainDelegate(response); List<DomainTopicInner> items = null; if (result.body() != null) { items = result.body().items(); } ServiceResponse<List<DomainTopicInner>> clientResponse = new ServiceResponse<List<DomainTopicInner>>(items, result.response()); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
class class_name[name] begin[{] method[listByDomainWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, domainName]] begin[{] if[binary_operation[THIS[member[None.client]call[None.subscriptionId, parameter[]]], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter this.client.subscriptionId() is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.resourceGroupName], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter resourceGroupName is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.domainName], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter domainName is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[THIS[member[None.client]call[None.apiVersion, parameter[]]], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter this.client.apiVersion() is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] return[call[service.listByDomain, parameter[THIS[member[None.client]call[None.subscriptionId, parameter[]]], member[.resourceGroupName], member[.domainName], THIS[member[None.client]call[None.apiVersion, parameter[]]], THIS[member[None.client]call[None.acceptLanguage, parameter[]]], THIS[member[None.client]call[None.userAgent, parameter[]]]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[List] operator[<] identifier[DomainTopicInner] operator[>] operator[>] operator[>] identifier[listByDomainWithServiceResponseAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[domainName] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[subscriptionId] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[resourceGroupName] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[domainName] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[apiVersion] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[service] operator[SEP] identifier[listByDomain] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[subscriptionId] operator[SEP] operator[SEP] , identifier[resourceGroupName] , identifier[domainName] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[apiVersion] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[acceptLanguage] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[userAgent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[flatMap] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[Response] operator[<] identifier[ResponseBody] operator[>] , identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[List] operator[<] identifier[DomainTopicInner] operator[>] operator[>] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[List] operator[<] identifier[DomainTopicInner] operator[>] operator[>] operator[>] identifier[call] operator[SEP] identifier[Response] operator[<] identifier[ResponseBody] operator[>] identifier[response] operator[SEP] { Keyword[try] { identifier[ServiceResponse] operator[<] identifier[PageImpl] operator[<] identifier[DomainTopicInner] operator[>] operator[>] identifier[result] operator[=] identifier[listByDomainDelegate] operator[SEP] identifier[response] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[DomainTopicInner] operator[>] identifier[items] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[items] operator[=] identifier[result] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] identifier[items] operator[SEP] operator[SEP] operator[SEP] } identifier[ServiceResponse] operator[<] identifier[List] operator[<] identifier[DomainTopicInner] operator[>] operator[>] identifier[clientResponse] operator[=] Keyword[new] identifier[ServiceResponse] operator[<] identifier[List] operator[<] identifier[DomainTopicInner] operator[>] operator[>] operator[SEP] identifier[items] , identifier[result] operator[SEP] identifier[response] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[Observable] operator[SEP] identifier[just] operator[SEP] identifier[clientResponse] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { Keyword[return] identifier[Observable] operator[SEP] identifier[error] operator[SEP] identifier[t] operator[SEP] operator[SEP] } } } operator[SEP] operator[SEP] }
public static JCas getJCas(final Annotation annotation) { JCas result = null; try { result = annotation.getCAS().getJCas(); } catch (final CASException e) { throw new IllegalArgumentException(e); } return result; }
class class_name[name] begin[{] method[getJCas, return_type[type[JCas]], modifier[public static], parameter[annotation]] begin[{] local_variable[type[JCas], result] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getCAS, postfix_operators=[], prefix_operators=[], qualifier=annotation, selectors=[MethodInvocation(arguments=[], member=getJCas, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['CASException']))], finally_block=None, label=None, resources=None) return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] identifier[JCas] identifier[getJCas] operator[SEP] Keyword[final] identifier[Annotation] identifier[annotation] operator[SEP] { identifier[JCas] identifier[result] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[result] operator[=] identifier[annotation] operator[SEP] identifier[getCAS] operator[SEP] operator[SEP] operator[SEP] identifier[getJCas] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[CASException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public static Schema arrayOf(Schema componentSchema) { return new Schema(Type.ARRAY, null, componentSchema, null, null, null, null, null); }
class class_name[name] begin[{] method[arrayOf, return_type[type[Schema]], modifier[public static], parameter[componentSchema]] begin[{] return[ClassCreator(arguments=[MemberReference(member=ARRAY, postfix_operators=[], prefix_operators=[], qualifier=Type, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=componentSchema, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), 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=Schema, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Schema] identifier[arrayOf] operator[SEP] identifier[Schema] identifier[componentSchema] operator[SEP] { Keyword[return] Keyword[new] identifier[Schema] operator[SEP] identifier[Type] operator[SEP] identifier[ARRAY] , Other[null] , identifier[componentSchema] , Other[null] , Other[null] , Other[null] , Other[null] , Other[null] operator[SEP] operator[SEP] }
private String loadTemplateFile(String templateName) { String name = templateName.replace('.', '/') + ".java"; InputStream in = SpoonMojoGenerate.class.getClassLoader().getResourceAsStream(name); String packageName = templateName.substring(0, templateName.lastIndexOf('.')); String fileName = templateName.substring(templateName.lastIndexOf('.') + 1) + ".java"; try { return TemplateLoader.loadToTmpFolder(in, packageName, fileName) .getAbsolutePath(); } catch (IOException e) { LogWrapper.warn(spoon, String.format("Template %s cannot be loaded.", templateName), e); return null; } }
class class_name[name] begin[{] method[loadTemplateFile, return_type[type[String]], modifier[private], parameter[templateName]] begin[{] local_variable[type[String], name] local_variable[type[InputStream], in] local_variable[type[String], packageName] local_variable[type[String], fileName] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=packageName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fileName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=loadToTmpFolder, postfix_operators=[], prefix_operators=[], qualifier=TemplateLoader, selectors=[MethodInvocation(arguments=[], member=getAbsolutePath, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=spoon, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Template %s cannot be loaded."), MemberReference(member=templateName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LogWrapper, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] identifier[String] identifier[loadTemplateFile] operator[SEP] identifier[String] identifier[templateName] operator[SEP] { identifier[String] identifier[name] operator[=] identifier[templateName] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[+] literal[String] operator[SEP] identifier[InputStream] identifier[in] operator[=] identifier[SpoonMojoGenerate] operator[SEP] Keyword[class] operator[SEP] identifier[getClassLoader] operator[SEP] operator[SEP] operator[SEP] identifier[getResourceAsStream] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[String] identifier[packageName] operator[=] identifier[templateName] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[templateName] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[fileName] operator[=] identifier[templateName] operator[SEP] identifier[substring] operator[SEP] identifier[templateName] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[+] Other[1] operator[SEP] operator[+] literal[String] operator[SEP] Keyword[try] { Keyword[return] identifier[TemplateLoader] operator[SEP] identifier[loadToTmpFolder] operator[SEP] identifier[in] , identifier[packageName] , identifier[fileName] operator[SEP] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[LogWrapper] operator[SEP] identifier[warn] operator[SEP] identifier[spoon] , identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[templateName] operator[SEP] , identifier[e] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } }
protected static final String printable(String s) { if (s == null) return "null"; StringBuffer retval = new StringBuffer(s.length() + 16); retval.append("'"); @SuppressWarnings("unused") char ch; for (int i = 0; i < s.length(); i++) { addPrintable(retval, s.charAt(i)); } retval.append("'"); return retval.toString(); }
class class_name[name] begin[{] method[printable, return_type[type[String]], modifier[final static protected], parameter[s]] begin[{] if[binary_operation[member[.s], ==, literal[null]]] begin[{] return[literal["null"]] else begin[{] None end[}] local_variable[type[StringBuffer], retval] call[retval.append, parameter[literal["'"]]] local_variable[type[char], ch] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=retval, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[], type_arguments=None)], member=addPrintable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=s, 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) call[retval.append, parameter[literal["'"]]] return[call[retval.toString, parameter[]]] end[}] END[}]
Keyword[protected] Keyword[static] Keyword[final] identifier[String] identifier[printable] operator[SEP] identifier[String] identifier[s] operator[SEP] { Keyword[if] operator[SEP] identifier[s] operator[==] Other[null] operator[SEP] Keyword[return] literal[String] operator[SEP] identifier[StringBuffer] identifier[retval] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] identifier[s] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[+] Other[16] operator[SEP] operator[SEP] identifier[retval] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[char] identifier[ch] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[s] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[addPrintable] operator[SEP] identifier[retval] , identifier[s] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } identifier[retval] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[retval] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public void decode(AsnInputStream ais) throws ParseException { try { AsnInputStream localAis = ais.readSequenceStream(); int tag = localAis.readTag(); if (tag != _TAG_DTX || localAis.getTagClass() != Tag.CLASS_APPLICATION) throw new ParseException(PAbortCauseType.IncorrectTxPortion, null, "Error decoding TC-Abort: Expected DestinationTransactionId, found tag: " + tag); this.destTxId = localAis.readOctetString(); if (localAis.available() == 0) return; tag = localAis.readTag(); if (localAis.getTagClass() != Tag.CLASS_APPLICATION) throw new ParseException(PAbortCauseType.IncorrectTxPortion, null, "Error decoding TC-Abort: DialogPortion and P-AbortCause portion must has tag class CLASS_APPLICATION"); switch (tag) { case DialogPortion._TAG: if (localAis.isTagPrimitive()) throw new ParseException(PAbortCauseType.IncorrectTxPortion, null, "Error decoding TC-End: DialogPortion must be constructive"); this.dp = TcapFactory.createDialogPortion(localAis); break; case _TAG_P: // primitive? this.type = PAbortCauseType.getFromInt((int) localAis.readInteger()); break; default: throw new ParseException(PAbortCauseType.IncorrectTxPortion, null, "Error decoding TC-Abort: bad tag while parsing DialogPortion and P-AbortCause portion: " + tag); } if (localAis.available() > 0) throw new ParseException(PAbortCauseType.IncorrectTxPortion, null, "Error decoding TC-Abort: too mych data"); } catch (IOException e) { throw new ParseException(PAbortCauseType.BadlyFormattedTxPortion, null, "IOException while decoding TC-Abort: " + e.getMessage(), e); } catch (AsnException e) { throw new ParseException(PAbortCauseType.BadlyFormattedTxPortion, null, "AsnException while decoding TC-Abort: " + e.getMessage(), e); } }
class class_name[name] begin[{] method[decode, return_type[void], modifier[public], parameter[ais]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=readSequenceStream, postfix_operators=[], prefix_operators=[], qualifier=ais, selectors=[], type_arguments=None), name=localAis)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AsnInputStream, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=readTag, postfix_operators=[], prefix_operators=[], qualifier=localAis, selectors=[], type_arguments=None), name=tag)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=tag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=_TAG_DTX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getTagClass, postfix_operators=[], prefix_operators=[], qualifier=localAis, selectors=[], type_arguments=None), operandr=MemberReference(member=CLASS_APPLICATION, postfix_operators=[], prefix_operators=[], qualifier=Tag, selectors=[]), operator=!=), operator=||), else_statement=None, label=None, then_statement=ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=IncorrectTxPortion, postfix_operators=[], prefix_operators=[], qualifier=PAbortCauseType, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error decoding TC-Abort: Expected DestinationTransactionId, found tag: "), operandr=MemberReference(member=tag, 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)), StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=destTxId, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MethodInvocation(arguments=[], member=readOctetString, postfix_operators=[], prefix_operators=[], qualifier=localAis, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=available, postfix_operators=[], prefix_operators=[], qualifier=localAis, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=tag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=readTag, postfix_operators=[], prefix_operators=[], qualifier=localAis, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getTagClass, postfix_operators=[], prefix_operators=[], qualifier=localAis, selectors=[], type_arguments=None), operandr=MemberReference(member=CLASS_APPLICATION, postfix_operators=[], prefix_operators=[], qualifier=Tag, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=IncorrectTxPortion, postfix_operators=[], prefix_operators=[], qualifier=PAbortCauseType, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error decoding TC-Abort: DialogPortion and P-AbortCause portion must has tag class CLASS_APPLICATION")], 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)), SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=_TAG, postfix_operators=[], prefix_operators=[], qualifier=DialogPortion, selectors=[])], statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isTagPrimitive, postfix_operators=[], prefix_operators=[], qualifier=localAis, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=IncorrectTxPortion, postfix_operators=[], prefix_operators=[], qualifier=PAbortCauseType, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error decoding TC-End: DialogPortion must be constructive")], 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=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=dp, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MethodInvocation(arguments=[MemberReference(member=localAis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createDialogPortion, postfix_operators=[], prefix_operators=[], qualifier=TcapFactory, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['_TAG_P'], statements=[StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=type, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MethodInvocation(arguments=[Cast(expression=MethodInvocation(arguments=[], member=readInteger, postfix_operators=[], prefix_operators=[], qualifier=localAis, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int))], member=getFromInt, postfix_operators=[], prefix_operators=[], qualifier=PAbortCauseType, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=IncorrectTxPortion, postfix_operators=[], prefix_operators=[], qualifier=PAbortCauseType, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error decoding TC-Abort: bad tag while parsing DialogPortion and P-AbortCause portion: "), operandr=MemberReference(member=tag, 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=tag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=available, postfix_operators=[], prefix_operators=[], qualifier=localAis, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=IncorrectTxPortion, postfix_operators=[], prefix_operators=[], qualifier=PAbortCauseType, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error decoding TC-Abort: too mych data")], 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))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=BadlyFormattedTxPortion, postfix_operators=[], prefix_operators=[], qualifier=PAbortCauseType, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="IOException while decoding TC-Abort: "), 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=ParseException, 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=BadlyFormattedTxPortion, postfix_operators=[], prefix_operators=[], qualifier=PAbortCauseType, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="AsnException while decoding TC-Abort: "), 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=ParseException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['AsnException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[decode] operator[SEP] identifier[AsnInputStream] identifier[ais] operator[SEP] Keyword[throws] identifier[ParseException] { Keyword[try] { identifier[AsnInputStream] identifier[localAis] operator[=] identifier[ais] operator[SEP] identifier[readSequenceStream] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[tag] operator[=] identifier[localAis] operator[SEP] identifier[readTag] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tag] operator[!=] identifier[_TAG_DTX] operator[||] identifier[localAis] operator[SEP] identifier[getTagClass] operator[SEP] operator[SEP] operator[!=] identifier[Tag] operator[SEP] identifier[CLASS_APPLICATION] operator[SEP] Keyword[throw] Keyword[new] identifier[ParseException] operator[SEP] identifier[PAbortCauseType] operator[SEP] identifier[IncorrectTxPortion] , Other[null] , literal[String] operator[+] identifier[tag] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[destTxId] operator[=] identifier[localAis] operator[SEP] identifier[readOctetString] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[localAis] operator[SEP] identifier[available] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] Keyword[return] operator[SEP] identifier[tag] operator[=] identifier[localAis] operator[SEP] identifier[readTag] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[localAis] operator[SEP] identifier[getTagClass] operator[SEP] operator[SEP] operator[!=] identifier[Tag] operator[SEP] identifier[CLASS_APPLICATION] operator[SEP] Keyword[throw] Keyword[new] identifier[ParseException] operator[SEP] identifier[PAbortCauseType] operator[SEP] identifier[IncorrectTxPortion] , Other[null] , literal[String] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[tag] operator[SEP] { Keyword[case] identifier[DialogPortion] operator[SEP] identifier[_TAG] operator[:] Keyword[if] operator[SEP] identifier[localAis] operator[SEP] identifier[isTagPrimitive] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[ParseException] operator[SEP] identifier[PAbortCauseType] operator[SEP] identifier[IncorrectTxPortion] , Other[null] , literal[String] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[dp] operator[=] identifier[TcapFactory] operator[SEP] identifier[createDialogPortion] operator[SEP] identifier[localAis] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[_TAG_P] operator[:] Keyword[this] operator[SEP] identifier[type] operator[=] identifier[PAbortCauseType] operator[SEP] identifier[getFromInt] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[localAis] operator[SEP] identifier[readInteger] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[ParseException] operator[SEP] identifier[PAbortCauseType] operator[SEP] identifier[IncorrectTxPortion] , Other[null] , literal[String] operator[+] identifier[tag] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[localAis] operator[SEP] identifier[available] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] Keyword[throw] Keyword[new] identifier[ParseException] operator[SEP] identifier[PAbortCauseType] operator[SEP] identifier[IncorrectTxPortion] , Other[null] , literal[String] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ParseException] operator[SEP] identifier[PAbortCauseType] operator[SEP] identifier[BadlyFormattedTxPortion] , Other[null] , literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[AsnException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ParseException] operator[SEP] identifier[PAbortCauseType] operator[SEP] identifier[BadlyFormattedTxPortion] , Other[null] , literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public void marshall(Mp4Settings mp4Settings, ProtocolMarshaller protocolMarshaller) { if (mp4Settings == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(mp4Settings.getCslgAtom(), CSLGATOM_BINDING); protocolMarshaller.marshall(mp4Settings.getFreeSpaceBox(), FREESPACEBOX_BINDING); protocolMarshaller.marshall(mp4Settings.getMoovPlacement(), MOOVPLACEMENT_BINDING); protocolMarshaller.marshall(mp4Settings.getMp4MajorBrand(), MP4MAJORBRAND_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[mp4Settings, protocolMarshaller]] begin[{] if[binary_operation[member[.mp4Settings], ==, 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=getCslgAtom, postfix_operators=[], prefix_operators=[], qualifier=mp4Settings, selectors=[], type_arguments=None), MemberReference(member=CSLGATOM_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=getFreeSpaceBox, postfix_operators=[], prefix_operators=[], qualifier=mp4Settings, selectors=[], type_arguments=None), MemberReference(member=FREESPACEBOX_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=getMoovPlacement, postfix_operators=[], prefix_operators=[], qualifier=mp4Settings, selectors=[], type_arguments=None), MemberReference(member=MOOVPLACEMENT_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=getMp4MajorBrand, postfix_operators=[], prefix_operators=[], qualifier=mp4Settings, selectors=[], type_arguments=None), MemberReference(member=MP4MAJORBRAND_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[Mp4Settings] identifier[mp4Settings] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[mp4Settings] 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[mp4Settings] operator[SEP] identifier[getCslgAtom] operator[SEP] operator[SEP] , identifier[CSLGATOM_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[mp4Settings] operator[SEP] identifier[getFreeSpaceBox] operator[SEP] operator[SEP] , identifier[FREESPACEBOX_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[mp4Settings] operator[SEP] identifier[getMoovPlacement] operator[SEP] operator[SEP] , identifier[MOOVPLACEMENT_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[mp4Settings] operator[SEP] identifier[getMp4MajorBrand] operator[SEP] operator[SEP] , identifier[MP4MAJORBRAND_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 Object doMove(int iRelPosition, int iRecordCount) throws DBException, RemoteException { boolean bShouldBeCached = (((m_iOpenMode & Constants.OPEN_CACHE_RECORDS) == Constants.OPEN_CACHE_RECORDS) || ((m_iOpenMode & Constants.OPEN_READ_ONLY) == Constants.OPEN_READ_ONLY)); if (!bShouldBeCached) { // If it is not read-only or explicit request, don't cache (it is way too hard to reposition the records for an update/remove). m_objCurrentPhysicalRecord = NONE; m_objCurrentLockedRecord = NONE; m_objCurrentCacheRecord = NONE; return m_tableRemote.doMove(iRelPosition, iRecordCount); } else { // If it is read-only, use the hash table cache to do a multiple read. int iCurrentLogicalPosition = m_iCurrentLogicalPosition + iRelPosition; if (iRelPosition == Constants.FIRST_RECORD) iCurrentLogicalPosition = 0; if (iRelPosition == Constants.LAST_RECORD) { if (m_iPhysicalLastRecordPlusOne == -1) iCurrentLogicalPosition = -1; else iCurrentLogicalPosition = m_iPhysicalLastRecordPlusOne - 1; } return this.cacheGetMove(iRelPosition, iRecordCount, iCurrentLogicalPosition, false); } }
class class_name[name] begin[{] method[doMove, return_type[type[Object]], modifier[public], parameter[iRelPosition, iRecordCount]] begin[{] local_variable[type[boolean], bShouldBeCached] if[member[.bShouldBeCached]] begin[{] assign[member[.m_objCurrentPhysicalRecord], member[.NONE]] assign[member[.m_objCurrentLockedRecord], member[.NONE]] assign[member[.m_objCurrentCacheRecord], member[.NONE]] return[call[m_tableRemote.doMove, parameter[member[.iRelPosition], member[.iRecordCount]]]] else begin[{] local_variable[type[int], iCurrentLogicalPosition] if[binary_operation[member[.iRelPosition], ==, member[Constants.FIRST_RECORD]]] begin[{] assign[member[.iCurrentLogicalPosition], literal[0]] else begin[{] None end[}] if[binary_operation[member[.iRelPosition], ==, member[Constants.LAST_RECORD]]] begin[{] if[binary_operation[member[.m_iPhysicalLastRecordPlusOne], ==, literal[1]]] begin[{] assign[member[.iCurrentLogicalPosition], literal[1]] else begin[{] assign[member[.iCurrentLogicalPosition], binary_operation[member[.m_iPhysicalLastRecordPlusOne], -, literal[1]]] end[}] else begin[{] None end[}] return[THIS[call[None.cacheGetMove, parameter[member[.iRelPosition], member[.iRecordCount], member[.iCurrentLogicalPosition], literal[false]]]]] end[}] end[}] END[}]
Keyword[public] identifier[Object] identifier[doMove] operator[SEP] Keyword[int] identifier[iRelPosition] , Keyword[int] identifier[iRecordCount] operator[SEP] Keyword[throws] identifier[DBException] , identifier[RemoteException] { Keyword[boolean] identifier[bShouldBeCached] operator[=] operator[SEP] operator[SEP] operator[SEP] identifier[m_iOpenMode] operator[&] identifier[Constants] operator[SEP] identifier[OPEN_CACHE_RECORDS] operator[SEP] operator[==] identifier[Constants] operator[SEP] identifier[OPEN_CACHE_RECORDS] operator[SEP] operator[||] operator[SEP] operator[SEP] identifier[m_iOpenMode] operator[&] identifier[Constants] operator[SEP] identifier[OPEN_READ_ONLY] operator[SEP] operator[==] identifier[Constants] operator[SEP] identifier[OPEN_READ_ONLY] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[bShouldBeCached] operator[SEP] { identifier[m_objCurrentPhysicalRecord] operator[=] identifier[NONE] operator[SEP] identifier[m_objCurrentLockedRecord] operator[=] identifier[NONE] operator[SEP] identifier[m_objCurrentCacheRecord] operator[=] identifier[NONE] operator[SEP] Keyword[return] identifier[m_tableRemote] operator[SEP] identifier[doMove] operator[SEP] identifier[iRelPosition] , identifier[iRecordCount] operator[SEP] operator[SEP] } Keyword[else] { Keyword[int] identifier[iCurrentLogicalPosition] operator[=] identifier[m_iCurrentLogicalPosition] operator[+] identifier[iRelPosition] operator[SEP] Keyword[if] operator[SEP] identifier[iRelPosition] operator[==] identifier[Constants] operator[SEP] identifier[FIRST_RECORD] operator[SEP] identifier[iCurrentLogicalPosition] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[iRelPosition] operator[==] identifier[Constants] operator[SEP] identifier[LAST_RECORD] operator[SEP] { Keyword[if] operator[SEP] identifier[m_iPhysicalLastRecordPlusOne] operator[==] operator[-] Other[1] operator[SEP] identifier[iCurrentLogicalPosition] operator[=] operator[-] Other[1] operator[SEP] Keyword[else] identifier[iCurrentLogicalPosition] operator[=] identifier[m_iPhysicalLastRecordPlusOne] operator[-] Other[1] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] identifier[cacheGetMove] operator[SEP] identifier[iRelPosition] , identifier[iRecordCount] , identifier[iCurrentLogicalPosition] , literal[boolean] operator[SEP] operator[SEP] } }
@Override protected ResolutionResult resolveDependencies(String projectFolder, String topLevelFolder, Set<String> paketDependenciesFiles) { boolean installSuccess = true; Collection<DependencyInfo> dependencies = new ArrayList<>(); List<String> excludes = new LinkedList<>(); if (paketRunPreStep) { File paket = new File(topLevelFolder + Constants.FORWARD_SLASH + PAKET_EXE); if (StringUtils.isNotEmpty(this.paketPath)) { paket = new File(this.paketPath); } else if (!paket.exists()) { paket = null; } installSuccess = !executePreparationStep(topLevelFolder, paket); } if (installSuccess) { String paketLockPath = topLevelFolder + Constants.FORWARD_SLASH + PAKET_LOCK; File paketLockFile = new File(paketLockPath); if (paketLockFile.exists()) { logger.debug("Found paket.lock file: {}", paketLockPath); Map<String, List<String>> groupToDirectDependenciesMap = getGroupToDirectDependencies(paketDependenciesFiles.iterator().next()); if (groupToDirectDependenciesMap != null && !groupToDirectDependenciesMap.keySet().isEmpty()) { Collection<AbstractPaketDependencyCollector> paketDependencyCollectors = new LinkedList<>(); for(String groupName : groupToDirectDependenciesMap.keySet()) { if (groupName.equals(MAIN)) { paketDependencyCollectors.add(new MainGroupPaketDependencyCollector(groupToDirectDependenciesMap.get(MAIN), this.paketIgnoredGroups)); } else { paketDependencyCollectors.add(new GroupPaketDependencyCollector(groupToDirectDependenciesMap.get(groupName), this.paketIgnoredGroups, groupName)); } } logger.info("Start collecting paket dependencies"); paketDependencyCollectors.forEach(paketDependencyCollector -> { Collection<AgentProjectInfo> prjectInfo = paketDependencyCollector.collectDependencies(topLevelFolder); dependencies.addAll(prjectInfo.iterator().next().getDependencies()); }); } // ignore all the nupkg files in order to not scan them again if (!dependencies.isEmpty()) { if (this.ignoreSourceFiles) { excludes.addAll(normalizeLocalPath(projectFolder, topLevelFolder,extensionPattern(PAKET_EXTENSIONS) , null)); } else { excludes.addAll(normalizeLocalPath(projectFolder, topLevelFolder, extensionPattern(PAKET_EXTENSIONS), Constants.PACKAGES)); } } } else { logger.warn("Could not find paket.lock file in {}. Please execute 'paket install' first.", topLevelFolder); } } else { logger.warn("'paket install' command failed"); } return new ResolutionResult(dependencies, excludes, getDependencyType(), topLevelFolder); }
class class_name[name] begin[{] method[resolveDependencies, return_type[type[ResolutionResult]], modifier[protected], parameter[projectFolder, topLevelFolder, paketDependenciesFiles]] begin[{] local_variable[type[boolean], installSuccess] local_variable[type[Collection], dependencies] local_variable[type[List], excludes] if[member[.paketRunPreStep]] begin[{] local_variable[type[File], paket] if[call[StringUtils.isNotEmpty, parameter[THIS[member[None.paketPath]]]]] begin[{] assign[member[.paket], ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=paketPath, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))] else begin[{] if[call[paket.exists, parameter[]]] begin[{] assign[member[.paket], literal[null]] else begin[{] None end[}] end[}] assign[member[.installSuccess], call[.executePreparationStep, parameter[member[.topLevelFolder], member[.paket]]]] else begin[{] None end[}] if[member[.installSuccess]] begin[{] local_variable[type[String], paketLockPath] local_variable[type[File], paketLockFile] if[call[paketLockFile.exists, parameter[]]] begin[{] call[logger.debug, parameter[literal["Found paket.lock file: {}"], member[.paketLockPath]]] local_variable[type[Map], groupToDirectDependenciesMap] if[binary_operation[binary_operation[member[.groupToDirectDependenciesMap], !=, literal[null]], &&, call[groupToDirectDependenciesMap.keySet, parameter[]]]] begin[{] local_variable[type[Collection], paketDependencyCollectors] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=MAIN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=groupName, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=groupName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=groupToDirectDependenciesMap, selectors=[], type_arguments=None), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=paketIgnoredGroups, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), MemberReference(member=groupName, 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=GroupPaketDependencyCollector, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=paketDependencyCollectors, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=MAIN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=groupToDirectDependenciesMap, selectors=[], type_arguments=None), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=paketIgnoredGroups, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MainGroupPaketDependencyCollector, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=paketDependencyCollectors, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=groupToDirectDependenciesMap, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=groupName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) call[logger.info, parameter[literal["Start collecting paket dependencies"]]] call[paketDependencyCollectors.forEach, parameter[LambdaExpression(body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=topLevelFolder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=collectDependencies, postfix_operators=[], prefix_operators=[], qualifier=paketDependencyCollector, selectors=[], type_arguments=None), name=prjectInfo)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=AgentProjectInfo, sub_type=None))], dimensions=[], name=Collection, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=iterator, postfix_operators=[], prefix_operators=[], qualifier=prjectInfo, selectors=[MethodInvocation(arguments=[], member=next, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getDependencies, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=dependencies, selectors=[], type_arguments=None), label=None)], parameters=[MemberReference(member=paketDependencyCollector, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]] else begin[{] None end[}] if[call[dependencies.isEmpty, parameter[]]] begin[{] if[THIS[member[None.ignoreSourceFiles]]] begin[{] call[excludes.addAll, parameter[call[.normalizeLocalPath, parameter[member[.projectFolder], member[.topLevelFolder], call[.extensionPattern, parameter[member[.PAKET_EXTENSIONS]]], literal[null]]]]] else begin[{] call[excludes.addAll, parameter[call[.normalizeLocalPath, parameter[member[.projectFolder], member[.topLevelFolder], call[.extensionPattern, parameter[member[.PAKET_EXTENSIONS]]], member[Constants.PACKAGES]]]]] end[}] else begin[{] None end[}] else begin[{] call[logger.warn, parameter[literal["Could not find paket.lock file in {}. Please execute 'paket install' first."], member[.topLevelFolder]]] end[}] else begin[{] call[logger.warn, parameter[literal["'paket install' command failed"]]] end[}] return[ClassCreator(arguments=[MemberReference(member=dependencies, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=excludes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getDependencyType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=topLevelFolder, 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=ResolutionResult, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] identifier[ResolutionResult] identifier[resolveDependencies] operator[SEP] identifier[String] identifier[projectFolder] , identifier[String] identifier[topLevelFolder] , identifier[Set] operator[<] identifier[String] operator[>] identifier[paketDependenciesFiles] operator[SEP] { Keyword[boolean] identifier[installSuccess] operator[=] literal[boolean] operator[SEP] identifier[Collection] operator[<] identifier[DependencyInfo] operator[>] identifier[dependencies] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[excludes] operator[=] Keyword[new] identifier[LinkedList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[paketRunPreStep] operator[SEP] { identifier[File] identifier[paket] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[topLevelFolder] operator[+] identifier[Constants] operator[SEP] identifier[FORWARD_SLASH] operator[+] identifier[PAKET_EXE] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isNotEmpty] operator[SEP] Keyword[this] operator[SEP] identifier[paketPath] operator[SEP] operator[SEP] { identifier[paket] operator[=] Keyword[new] identifier[File] operator[SEP] Keyword[this] operator[SEP] identifier[paketPath] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[!] identifier[paket] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { identifier[paket] operator[=] Other[null] operator[SEP] } identifier[installSuccess] operator[=] operator[!] identifier[executePreparationStep] operator[SEP] identifier[topLevelFolder] , identifier[paket] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[installSuccess] operator[SEP] { identifier[String] identifier[paketLockPath] operator[=] identifier[topLevelFolder] operator[+] identifier[Constants] operator[SEP] identifier[FORWARD_SLASH] operator[+] identifier[PAKET_LOCK] operator[SEP] identifier[File] identifier[paketLockFile] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[paketLockPath] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[paketLockFile] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[paketLockPath] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[String] operator[>] operator[>] identifier[groupToDirectDependenciesMap] operator[=] identifier[getGroupToDirectDependencies] operator[SEP] identifier[paketDependenciesFiles] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[groupToDirectDependenciesMap] operator[!=] Other[null] operator[&&] operator[!] identifier[groupToDirectDependenciesMap] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[Collection] operator[<] identifier[AbstractPaketDependencyCollector] operator[>] identifier[paketDependencyCollectors] operator[=] Keyword[new] identifier[LinkedList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[groupName] operator[:] identifier[groupToDirectDependenciesMap] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[groupName] operator[SEP] identifier[equals] operator[SEP] identifier[MAIN] operator[SEP] operator[SEP] { identifier[paketDependencyCollectors] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[MainGroupPaketDependencyCollector] operator[SEP] identifier[groupToDirectDependenciesMap] operator[SEP] identifier[get] operator[SEP] identifier[MAIN] operator[SEP] , Keyword[this] operator[SEP] identifier[paketIgnoredGroups] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[paketDependencyCollectors] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[GroupPaketDependencyCollector] operator[SEP] identifier[groupToDirectDependenciesMap] operator[SEP] identifier[get] operator[SEP] identifier[groupName] operator[SEP] , Keyword[this] operator[SEP] identifier[paketIgnoredGroups] , identifier[groupName] operator[SEP] operator[SEP] operator[SEP] } } identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[paketDependencyCollectors] operator[SEP] identifier[forEach] operator[SEP] identifier[paketDependencyCollector] operator[->] { identifier[Collection] operator[<] identifier[AgentProjectInfo] operator[>] identifier[prjectInfo] operator[=] identifier[paketDependencyCollector] operator[SEP] identifier[collectDependencies] operator[SEP] identifier[topLevelFolder] operator[SEP] operator[SEP] identifier[dependencies] operator[SEP] identifier[addAll] operator[SEP] identifier[prjectInfo] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[getDependencies] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[dependencies] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[ignoreSourceFiles] operator[SEP] { identifier[excludes] operator[SEP] identifier[addAll] operator[SEP] identifier[normalizeLocalPath] operator[SEP] identifier[projectFolder] , identifier[topLevelFolder] , identifier[extensionPattern] operator[SEP] identifier[PAKET_EXTENSIONS] operator[SEP] , Other[null] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[excludes] operator[SEP] identifier[addAll] operator[SEP] identifier[normalizeLocalPath] operator[SEP] identifier[projectFolder] , identifier[topLevelFolder] , identifier[extensionPattern] operator[SEP] identifier[PAKET_EXTENSIONS] operator[SEP] , identifier[Constants] operator[SEP] identifier[PACKAGES] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[else] { identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[topLevelFolder] operator[SEP] operator[SEP] } } Keyword[else] { identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[ResolutionResult] operator[SEP] identifier[dependencies] , identifier[excludes] , identifier[getDependencyType] operator[SEP] operator[SEP] , identifier[topLevelFolder] operator[SEP] operator[SEP] }
public void setSummaryColumnStyleAndScope(HtmlTree thTree) { thTree.addStyle(HtmlStyle.colSecond); thTree.addAttr(HtmlAttr.SCOPE, "row"); }
class class_name[name] begin[{] method[setSummaryColumnStyleAndScope, return_type[void], modifier[public], parameter[thTree]] begin[{] call[thTree.addStyle, parameter[member[HtmlStyle.colSecond]]] call[thTree.addAttr, parameter[member[HtmlAttr.SCOPE], literal["row"]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setSummaryColumnStyleAndScope] operator[SEP] identifier[HtmlTree] identifier[thTree] operator[SEP] { identifier[thTree] operator[SEP] identifier[addStyle] operator[SEP] identifier[HtmlStyle] operator[SEP] identifier[colSecond] operator[SEP] operator[SEP] identifier[thTree] operator[SEP] identifier[addAttr] operator[SEP] identifier[HtmlAttr] operator[SEP] identifier[SCOPE] , literal[String] operator[SEP] operator[SEP] }
private static List<Object> dataBagToRepeatedField(Builder containingMessageBuilder, FieldDescriptor fieldDescriptor, DataBag bag) { ArrayList<Object> bagContents = new ArrayList<Object>((int)bag.size()); Iterator<Tuple> bagIter = bag.iterator(); while (bagIter.hasNext()) { Tuple tuple = bagIter.next(); if (fieldDescriptor.getType() == FieldDescriptor.Type.MESSAGE) { Builder nestedMessageBuilder = containingMessageBuilder.newBuilderForField(fieldDescriptor); bagContents.add(tupleToMessage((Builder)nestedMessageBuilder, tuple)); } else { try { bagContents.add(tupleFieldToSingleField(fieldDescriptor, tuple.get(0))); } catch (ExecException e) { LOG.warn("Could not add a value for repeated field with descriptor " + fieldDescriptor); } } } return bagContents; }
class class_name[name] begin[{] method[dataBagToRepeatedField, return_type[type[List]], modifier[private static], parameter[containingMessageBuilder, fieldDescriptor, bag]] begin[{] local_variable[type[ArrayList], bagContents] local_variable[type[Iterator], bagIter] while[call[bagIter.hasNext, parameter[]]] begin[{] local_variable[type[Tuple], tuple] if[binary_operation[call[fieldDescriptor.getType, parameter[]], ==, member[FieldDescriptor.Type.MESSAGE]]] begin[{] local_variable[type[Builder], nestedMessageBuilder] call[bagContents.add, parameter[call[.tupleToMessage, parameter[Cast(expression=MemberReference(member=nestedMessageBuilder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Builder, sub_type=None)), member[.tuple]]]]] else begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=fieldDescriptor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=tuple, selectors=[], type_arguments=None)], member=tupleFieldToSingleField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=bagContents, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not add a value for repeated field with descriptor "), operandr=MemberReference(member=fieldDescriptor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ExecException']))], finally_block=None, label=None, resources=None) end[}] end[}] return[member[.bagContents]] end[}] END[}]
Keyword[private] Keyword[static] identifier[List] operator[<] identifier[Object] operator[>] identifier[dataBagToRepeatedField] operator[SEP] identifier[Builder] identifier[containingMessageBuilder] , identifier[FieldDescriptor] identifier[fieldDescriptor] , identifier[DataBag] identifier[bag] operator[SEP] { identifier[ArrayList] operator[<] identifier[Object] operator[>] identifier[bagContents] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Object] operator[>] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[bag] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Iterator] operator[<] identifier[Tuple] operator[>] identifier[bagIter] operator[=] identifier[bag] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[bagIter] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[Tuple] identifier[tuple] operator[=] identifier[bagIter] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[fieldDescriptor] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[==] identifier[FieldDescriptor] operator[SEP] identifier[Type] operator[SEP] identifier[MESSAGE] operator[SEP] { identifier[Builder] identifier[nestedMessageBuilder] operator[=] identifier[containingMessageBuilder] operator[SEP] identifier[newBuilderForField] operator[SEP] identifier[fieldDescriptor] operator[SEP] operator[SEP] identifier[bagContents] operator[SEP] identifier[add] operator[SEP] identifier[tupleToMessage] operator[SEP] operator[SEP] identifier[Builder] operator[SEP] identifier[nestedMessageBuilder] , identifier[tuple] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[try] { identifier[bagContents] operator[SEP] identifier[add] operator[SEP] identifier[tupleFieldToSingleField] operator[SEP] identifier[fieldDescriptor] , identifier[tuple] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ExecException] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[fieldDescriptor] operator[SEP] operator[SEP] } } } Keyword[return] identifier[bagContents] operator[SEP] }
@Override public Object visit(Before before, Object extraData) { String propertyName = getPropertyName(before.getExpression1()); String finalName = parsePropertyName(propertyName, before); Object literal = getLiteralValue(before.getExpression2()); if (literal instanceof Date) { return Restrictions.lt(finalName, literal); } else { throw new UnsupportedOperationException("visit(Object userData)"); } }
class class_name[name] begin[{] method[visit, return_type[type[Object]], modifier[public], parameter[before, extraData]] begin[{] local_variable[type[String], propertyName] local_variable[type[String], finalName] local_variable[type[Object], literal] if[binary_operation[member[.literal], instanceof, type[Date]]] begin[{] return[call[Restrictions.lt, parameter[member[.finalName], member[.literal]]]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="visit(Object userData)")], 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) end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[visit] operator[SEP] identifier[Before] identifier[before] , identifier[Object] identifier[extraData] operator[SEP] { identifier[String] identifier[propertyName] operator[=] identifier[getPropertyName] operator[SEP] identifier[before] operator[SEP] identifier[getExpression1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[finalName] operator[=] identifier[parsePropertyName] operator[SEP] identifier[propertyName] , identifier[before] operator[SEP] operator[SEP] identifier[Object] identifier[literal] operator[=] identifier[getLiteralValue] operator[SEP] identifier[before] operator[SEP] identifier[getExpression2] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[literal] Keyword[instanceof] identifier[Date] operator[SEP] { Keyword[return] identifier[Restrictions] operator[SEP] identifier[lt] operator[SEP] identifier[finalName] , identifier[literal] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[UnsupportedOperationException] operator[SEP] literal[String] operator[SEP] operator[SEP] } }
public static <T> Object callMethod(Object obj, Class<T> c, String name, Class<?>[] classes, Object[] args) { try { Method m = getMethod(c, name, classes); return m.invoke(obj, args); } catch(InvocationTargetException e) { throw getCause(e); } catch(IllegalAccessException e) { throw new IllegalStateException(e); } }
class class_name[name] begin[{] method[callMethod, return_type[type[Object]], modifier[public static], parameter[obj, c, name, classes, args]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=classes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getMethod, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=m)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getCause, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InvocationTargetException'])), 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=IllegalStateException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IllegalAccessException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Object] identifier[callMethod] operator[SEP] identifier[Object] identifier[obj] , identifier[Class] operator[<] identifier[T] operator[>] identifier[c] , identifier[String] identifier[name] , identifier[Class] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[classes] , identifier[Object] operator[SEP] operator[SEP] identifier[args] operator[SEP] { Keyword[try] { identifier[Method] identifier[m] operator[=] identifier[getMethod] operator[SEP] identifier[c] , identifier[name] , identifier[classes] operator[SEP] operator[SEP] Keyword[return] identifier[m] operator[SEP] identifier[invoke] operator[SEP] identifier[obj] , identifier[args] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InvocationTargetException] identifier[e] operator[SEP] { Keyword[throw] identifier[getCause] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalAccessException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
public static long millis(final String time, final String timeUnit) { return TIMEUNITS.get(timeUnit).toMillis(Long.parseLong(time)); }
class class_name[name] begin[{] method[millis, return_type[type[long]], modifier[public static], parameter[time, timeUnit]] begin[{] return[call[TIMEUNITS.get, parameter[member[.timeUnit]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[long] identifier[millis] operator[SEP] Keyword[final] identifier[String] identifier[time] , Keyword[final] identifier[String] identifier[timeUnit] operator[SEP] { Keyword[return] identifier[TIMEUNITS] operator[SEP] identifier[get] operator[SEP] identifier[timeUnit] operator[SEP] operator[SEP] identifier[toMillis] operator[SEP] identifier[Long] operator[SEP] identifier[parseLong] operator[SEP] identifier[time] operator[SEP] operator[SEP] operator[SEP] }
public void updateStructure() { if (size() > 1) { Collections.sort(this); m_projectFile.getChildTasks().clear(); Task lastTask = null; int lastLevel = -1; boolean autoWbs = m_projectFile.getProjectConfig().getAutoWBS(); boolean autoOutlineNumber = m_projectFile.getProjectConfig().getAutoOutlineNumber(); for (Task task : this) { task.clearChildTasks(); Task parent = null; if (!task.getNull()) { int level = NumberHelper.getInt(task.getOutlineLevel()); if (lastTask != null) { if (level == lastLevel || task.getNull()) { parent = lastTask.getParentTask(); level = lastLevel; } else { if (level > lastLevel) { parent = lastTask; } else { while (level <= lastLevel) { parent = lastTask.getParentTask(); if (parent == null) { break; } lastLevel = NumberHelper.getInt(parent.getOutlineLevel()); lastTask = parent; } } } } lastTask = task; lastLevel = level; if (autoWbs || task.getWBS() == null) { task.generateWBS(parent); } if (autoOutlineNumber) { task.generateOutlineNumber(parent); } } if (parent == null) { m_projectFile.getChildTasks().add(task); } else { parent.addChildTask(task); } } } }
class class_name[name] begin[{] method[updateStructure, return_type[void], modifier[public], parameter[]] begin[{] if[binary_operation[call[.size, parameter[]], >, literal[1]]] begin[{] call[Collections.sort, parameter[THIS[]]] call[m_projectFile.getChildTasks, parameter[]] local_variable[type[Task], lastTask] local_variable[type[int], lastLevel] local_variable[type[boolean], autoWbs] local_variable[type[boolean], autoOutlineNumber] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=clearChildTasks, postfix_operators=[], prefix_operators=[], qualifier=task, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=parent)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Task, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=getNull, postfix_operators=[], prefix_operators=['!'], qualifier=task, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getOutlineLevel, postfix_operators=[], prefix_operators=[], qualifier=task, selectors=[], type_arguments=None)], member=getInt, postfix_operators=[], prefix_operators=[], qualifier=NumberHelper, selectors=[], type_arguments=None), name=level)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=lastTask, 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=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=level, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=lastLevel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=MethodInvocation(arguments=[], member=getNull, postfix_operators=[], prefix_operators=[], qualifier=task, selectors=[], type_arguments=None), operator=||), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=level, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=lastLevel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=BlockStatement(label=None, statements=[WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=parent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getParentTask, postfix_operators=[], prefix_operators=[], qualifier=lastTask, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=parent, 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=[BreakStatement(goto=None, label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastLevel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getOutlineLevel, postfix_operators=[], prefix_operators=[], qualifier=parent, selectors=[], type_arguments=None)], member=getInt, postfix_operators=[], prefix_operators=[], qualifier=NumberHelper, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastTask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=parent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), condition=BinaryOperation(operandl=MemberReference(member=level, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=lastLevel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=parent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=lastTask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=parent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getParentTask, postfix_operators=[], prefix_operators=[], qualifier=lastTask, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=level, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=lastLevel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastTask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=task, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastLevel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=level, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=autoWbs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getWBS, postfix_operators=[], prefix_operators=[], qualifier=task, 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=parent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=generateWBS, postfix_operators=[], prefix_operators=[], qualifier=task, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MemberReference(member=autoOutlineNumber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=parent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=generateOutlineNumber, postfix_operators=[], prefix_operators=[], qualifier=task, selectors=[], type_arguments=None), label=None)]))])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=parent, 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=MethodInvocation(arguments=[MemberReference(member=task, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addChildTask, postfix_operators=[], prefix_operators=[], qualifier=parent, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getChildTasks, postfix_operators=[], prefix_operators=[], qualifier=m_projectFile, selectors=[MethodInvocation(arguments=[MemberReference(member=task, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=task)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Task, sub_type=None))), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[updateStructure] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[1] operator[SEP] { identifier[Collections] operator[SEP] identifier[sort] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[m_projectFile] operator[SEP] identifier[getChildTasks] operator[SEP] operator[SEP] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[Task] identifier[lastTask] operator[=] Other[null] operator[SEP] Keyword[int] identifier[lastLevel] operator[=] operator[-] Other[1] operator[SEP] Keyword[boolean] identifier[autoWbs] operator[=] identifier[m_projectFile] operator[SEP] identifier[getProjectConfig] operator[SEP] operator[SEP] operator[SEP] identifier[getAutoWBS] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[autoOutlineNumber] operator[=] identifier[m_projectFile] operator[SEP] identifier[getProjectConfig] operator[SEP] operator[SEP] operator[SEP] identifier[getAutoOutlineNumber] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Task] identifier[task] operator[:] Keyword[this] operator[SEP] { identifier[task] operator[SEP] identifier[clearChildTasks] operator[SEP] operator[SEP] operator[SEP] identifier[Task] identifier[parent] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[task] operator[SEP] identifier[getNull] operator[SEP] operator[SEP] operator[SEP] { Keyword[int] identifier[level] operator[=] identifier[NumberHelper] operator[SEP] identifier[getInt] operator[SEP] identifier[task] operator[SEP] identifier[getOutlineLevel] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[lastTask] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[level] operator[==] identifier[lastLevel] operator[||] identifier[task] operator[SEP] identifier[getNull] operator[SEP] operator[SEP] operator[SEP] { identifier[parent] operator[=] identifier[lastTask] operator[SEP] identifier[getParentTask] operator[SEP] operator[SEP] operator[SEP] identifier[level] operator[=] identifier[lastLevel] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[level] operator[>] identifier[lastLevel] operator[SEP] { identifier[parent] operator[=] identifier[lastTask] operator[SEP] } Keyword[else] { Keyword[while] operator[SEP] identifier[level] operator[<=] identifier[lastLevel] operator[SEP] { identifier[parent] operator[=] identifier[lastTask] operator[SEP] identifier[getParentTask] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[parent] operator[==] Other[null] operator[SEP] { Keyword[break] operator[SEP] } identifier[lastLevel] operator[=] identifier[NumberHelper] operator[SEP] identifier[getInt] operator[SEP] identifier[parent] operator[SEP] identifier[getOutlineLevel] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[lastTask] operator[=] identifier[parent] operator[SEP] } } } } identifier[lastTask] operator[=] identifier[task] operator[SEP] identifier[lastLevel] operator[=] identifier[level] operator[SEP] Keyword[if] operator[SEP] identifier[autoWbs] operator[||] identifier[task] operator[SEP] identifier[getWBS] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[task] operator[SEP] identifier[generateWBS] operator[SEP] identifier[parent] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[autoOutlineNumber] operator[SEP] { identifier[task] operator[SEP] identifier[generateOutlineNumber] operator[SEP] identifier[parent] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[parent] operator[==] Other[null] operator[SEP] { identifier[m_projectFile] operator[SEP] identifier[getChildTasks] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[task] operator[SEP] operator[SEP] } Keyword[else] { identifier[parent] operator[SEP] identifier[addChildTask] operator[SEP] identifier[task] operator[SEP] operator[SEP] } } } }
public void addSummary(Record recSummary, BaseField[][] mxKeyFields, BaseField[][] mxDataFields) { try { recSummary.addNew(); // First move the key to see if a record exists this.setupSummaryKey(mxKeyFields); boolean bSuccess = recSummary.seek("="); if (bSuccess) recSummary.edit(); else { recSummary.addNew(); this.setupSummaryKey(mxKeyFields); } this.addSummaryData(mxDataFields); if (bSuccess) recSummary.set(); else recSummary.add(); } catch (DBException ex) { ex.printStackTrace(); } }
class class_name[name] begin[{] method[addSummary, return_type[void], modifier[public], parameter[recSummary, mxKeyFields, mxDataFields]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=addNew, postfix_operators=[], prefix_operators=[], qualifier=recSummary, selectors=[], type_arguments=None), label=None), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=mxKeyFields, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setupSummaryKey, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="=")], member=seek, postfix_operators=[], prefix_operators=[], qualifier=recSummary, selectors=[], type_arguments=None), name=bSuccess)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), IfStatement(condition=MemberReference(member=bSuccess, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=addNew, postfix_operators=[], prefix_operators=[], qualifier=recSummary, selectors=[], type_arguments=None), label=None), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=mxKeyFields, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setupSummaryKey, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[], member=edit, postfix_operators=[], prefix_operators=[], qualifier=recSummary, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=mxDataFields, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addSummaryData, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), IfStatement(condition=MemberReference(member=bSuccess, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=StatementExpression(expression=MethodInvocation(arguments=[], member=add, postfix_operators=[], prefix_operators=[], qualifier=recSummary, selectors=[], type_arguments=None), label=None), label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[], member=set, postfix_operators=[], prefix_operators=[], qualifier=recSummary, selectors=[], type_arguments=None), label=None))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['DBException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[addSummary] operator[SEP] identifier[Record] identifier[recSummary] , identifier[BaseField] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[mxKeyFields] , identifier[BaseField] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[mxDataFields] operator[SEP] { Keyword[try] { identifier[recSummary] operator[SEP] identifier[addNew] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[setupSummaryKey] operator[SEP] identifier[mxKeyFields] operator[SEP] operator[SEP] Keyword[boolean] identifier[bSuccess] operator[=] identifier[recSummary] operator[SEP] identifier[seek] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[bSuccess] operator[SEP] identifier[recSummary] operator[SEP] identifier[edit] operator[SEP] operator[SEP] operator[SEP] Keyword[else] { identifier[recSummary] operator[SEP] identifier[addNew] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[setupSummaryKey] operator[SEP] identifier[mxKeyFields] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[addSummaryData] operator[SEP] identifier[mxDataFields] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[bSuccess] operator[SEP] identifier[recSummary] operator[SEP] identifier[set] operator[SEP] operator[SEP] operator[SEP] Keyword[else] identifier[recSummary] operator[SEP] identifier[add] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[DBException] identifier[ex] operator[SEP] { identifier[ex] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } }
public void marshall(ListBillingGroupsRequest listBillingGroupsRequest, ProtocolMarshaller protocolMarshaller) { if (listBillingGroupsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(listBillingGroupsRequest.getNextToken(), NEXTTOKEN_BINDING); protocolMarshaller.marshall(listBillingGroupsRequest.getMaxResults(), MAXRESULTS_BINDING); protocolMarshaller.marshall(listBillingGroupsRequest.getNamePrefixFilter(), NAMEPREFIXFILTER_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[listBillingGroupsRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.listBillingGroupsRequest], ==, 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=listBillingGroupsRequest, 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=listBillingGroupsRequest, 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=getNamePrefixFilter, postfix_operators=[], prefix_operators=[], qualifier=listBillingGroupsRequest, selectors=[], type_arguments=None), MemberReference(member=NAMEPREFIXFILTER_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[ListBillingGroupsRequest] identifier[listBillingGroupsRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[listBillingGroupsRequest] 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[listBillingGroupsRequest] operator[SEP] identifier[getNextToken] operator[SEP] operator[SEP] , identifier[NEXTTOKEN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[listBillingGroupsRequest] operator[SEP] identifier[getMaxResults] operator[SEP] operator[SEP] , identifier[MAXRESULTS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[listBillingGroupsRequest] operator[SEP] identifier[getNamePrefixFilter] operator[SEP] operator[SEP] , identifier[NAMEPREFIXFILTER_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 Query orderby(final Collection<? extends Expression> orderbyColumns) { if (orderbyColumns == null) { return this; } this.orderbyColumns.addAll(orderbyColumns); return this; }
class class_name[name] begin[{] method[orderby, return_type[type[Query]], modifier[public], parameter[orderbyColumns]] begin[{] if[binary_operation[member[.orderbyColumns], ==, literal[null]]] begin[{] return[THIS[]] else begin[{] None end[}] THIS[member[None.orderbyColumns]call[None.addAll, parameter[member[.orderbyColumns]]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[Query] identifier[orderby] operator[SEP] Keyword[final] identifier[Collection] operator[<] operator[?] Keyword[extends] identifier[Expression] operator[>] identifier[orderbyColumns] operator[SEP] { Keyword[if] operator[SEP] identifier[orderbyColumns] operator[==] Other[null] operator[SEP] { Keyword[return] Keyword[this] operator[SEP] } Keyword[this] operator[SEP] identifier[orderbyColumns] operator[SEP] identifier[addAll] operator[SEP] identifier[orderbyColumns] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public <T, U> U forStream( String fileName, Class<T> clazz, Map<String, Object> params, Function<? super Stream<T>, U> handleStream) { String sql = getTemplate(fileName, params); SqlParameterSource sps = paramBuilder.byMap(params); RowMapper<T> mapper = mapperBuilder.mapper(clazz); return queryStreamWithNamedParams(sql, sps, mapper, handleStream); }
class class_name[name] begin[{] method[forStream, return_type[type[U]], modifier[public], parameter[fileName, clazz, params, handleStream]] begin[{] local_variable[type[String], sql] local_variable[type[SqlParameterSource], sps] local_variable[type[RowMapper], mapper] return[call[.queryStreamWithNamedParams, parameter[member[.sql], member[.sps], member[.mapper], member[.handleStream]]]] end[}] END[}]
Keyword[public] operator[<] identifier[T] , identifier[U] operator[>] identifier[U] identifier[forStream] operator[SEP] identifier[String] identifier[fileName] , identifier[Class] operator[<] identifier[T] operator[>] identifier[clazz] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[params] , identifier[Function] operator[<] operator[?] Keyword[super] identifier[Stream] operator[<] identifier[T] operator[>] , identifier[U] operator[>] identifier[handleStream] operator[SEP] { identifier[String] identifier[sql] operator[=] identifier[getTemplate] operator[SEP] identifier[fileName] , identifier[params] operator[SEP] operator[SEP] identifier[SqlParameterSource] identifier[sps] operator[=] identifier[paramBuilder] operator[SEP] identifier[byMap] operator[SEP] identifier[params] operator[SEP] operator[SEP] identifier[RowMapper] operator[<] identifier[T] operator[>] identifier[mapper] operator[=] identifier[mapperBuilder] operator[SEP] identifier[mapper] operator[SEP] identifier[clazz] operator[SEP] operator[SEP] Keyword[return] identifier[queryStreamWithNamedParams] operator[SEP] identifier[sql] , identifier[sps] , identifier[mapper] , identifier[handleStream] operator[SEP] operator[SEP] }
public static List<String> splitLines( final String content ) { if (content == null || content.length() == 0) return Collections.emptyList(); String[] lines = content.split("[\\r]?\\n"); return Arrays.asList(lines); }
class class_name[name] begin[{] method[splitLines, return_type[type[List]], modifier[public static], parameter[content]] begin[{] if[binary_operation[binary_operation[member[.content], ==, literal[null]], ||, binary_operation[call[content.length, parameter[]], ==, literal[0]]]] begin[{] return[call[Collections.emptyList, parameter[]]] else begin[{] None end[}] local_variable[type[String], lines] return[call[Arrays.asList, parameter[member[.lines]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[String] operator[>] identifier[splitLines] operator[SEP] Keyword[final] identifier[String] identifier[content] operator[SEP] { Keyword[if] operator[SEP] identifier[content] operator[==] Other[null] operator[||] identifier[content] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] Keyword[return] identifier[Collections] operator[SEP] identifier[emptyList] operator[SEP] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[lines] operator[=] identifier[content] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[lines] operator[SEP] operator[SEP] }
public void setAtlasInformation(List<GVRAtlasInformation> atlasInformation) { if ((mImage != null) && (mImage instanceof GVRImageAtlas)) { ((GVRImageAtlas) mImage).setAtlasInformation(atlasInformation); } }
class class_name[name] begin[{] method[setAtlasInformation, return_type[void], modifier[public], parameter[atlasInformation]] begin[{] if[binary_operation[binary_operation[member[.mImage], !=, literal[null]], &&, binary_operation[member[.mImage], instanceof, type[GVRImageAtlas]]]] begin[{] Cast(expression=MemberReference(member=mImage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=GVRImageAtlas, sub_type=None)) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setAtlasInformation] operator[SEP] identifier[List] operator[<] identifier[GVRAtlasInformation] operator[>] identifier[atlasInformation] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[mImage] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[mImage] Keyword[instanceof] identifier[GVRImageAtlas] operator[SEP] operator[SEP] { operator[SEP] operator[SEP] identifier[GVRImageAtlas] operator[SEP] identifier[mImage] operator[SEP] operator[SEP] identifier[setAtlasInformation] operator[SEP] identifier[atlasInformation] operator[SEP] operator[SEP] } }
public void init(Record record, Record recordToSync, boolean bUpdateOnSelect) { super.init(record, null, recordToSync, bUpdateOnSelect, DBConstants.SELECT_TYPE); }
class class_name[name] begin[{] method[init, return_type[void], modifier[public], parameter[record, recordToSync, bUpdateOnSelect]] begin[{] SuperMethodInvocation(arguments=[MemberReference(member=record, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=recordToSync, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=bUpdateOnSelect, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=SELECT_TYPE, postfix_operators=[], prefix_operators=[], qualifier=DBConstants, selectors=[])], member=init, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[init] operator[SEP] identifier[Record] identifier[record] , identifier[Record] identifier[recordToSync] , Keyword[boolean] identifier[bUpdateOnSelect] operator[SEP] { Keyword[super] operator[SEP] identifier[init] operator[SEP] identifier[record] , Other[null] , identifier[recordToSync] , identifier[bUpdateOnSelect] , identifier[DBConstants] operator[SEP] identifier[SELECT_TYPE] operator[SEP] operator[SEP] }
public String logDirectoryStem() { if (tc.isEntryEnabled()) Tr.entry(tc, "logDirectoryStem", this); if (tc.isEntryEnabled()) Tr.exit(tc, "logDirectoryStem", _logDirectoryStem); return _logDirectoryStem; }
class class_name[name] begin[{] method[logDirectoryStem, return_type[type[String]], modifier[public], parameter[]] begin[{] if[call[tc.isEntryEnabled, parameter[]]] begin[{] call[Tr.entry, parameter[member[.tc], literal["logDirectoryStem"], THIS[]]] else begin[{] None end[}] if[call[tc.isEntryEnabled, parameter[]]] begin[{] call[Tr.exit, parameter[member[.tc], literal["logDirectoryStem"], member[._logDirectoryStem]]] else begin[{] None end[}] return[member[._logDirectoryStem]] end[}] END[}]
Keyword[public] identifier[String] identifier[logDirectoryStem] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] , Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , identifier[_logDirectoryStem] operator[SEP] operator[SEP] Keyword[return] identifier[_logDirectoryStem] operator[SEP] }
public String readString() throws IOException { StringBuilder result = new StringBuilder(); while (true) { int c = r.read(); if (c < 0) { throw new IllegalStateException("Premature end of stream"); } else if (c == '"') { break; } else if (c == '\\') { int c2 = r.read(); if (c2 == '"' || c2 == '\\' || c2 == '/') { result.append((char)c2); } else if (c2 == 'b') { result.append("\b"); } else if (c2 == 'f') { result.append("\f"); } else if (c2 == 'n') { result.append("\n"); } else if (c2 == 'r') { result.append("\r"); } else if (c2 == 't') { result.append("\t"); } else if (c2 == 'u') { int d1 = r.read(); int d2 = r.read(); int d3 = r.read(); int d4 = r.read(); checkHexDigit(d1); checkHexDigit(d2); checkHexDigit(d3); checkHexDigit(d4); int e = Character.digit(d1, 16); e = (e << 4) + Character.digit(d2, 16); e = (e << 4) + Character.digit(d3, 16); e = (e << 4) + Character.digit(d4, 16); result.append((char)e); } } else { result.append((char)c); } } return result.toString(); }
class class_name[name] begin[{] method[readString, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[StringBuilder], result] while[literal[true]] begin[{] local_variable[type[int], c] if[binary_operation[member[.c], <, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Premature end of stream")], 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[{] if[binary_operation[member[.c], ==, literal['"']]] begin[{] BreakStatement(goto=None, label=None) else begin[{] if[binary_operation[member[.c], ==, literal['\\']]] begin[{] local_variable[type[int], c2] if[binary_operation[binary_operation[binary_operation[member[.c2], ==, literal['"']], ||, binary_operation[member[.c2], ==, literal['\\']]], ||, binary_operation[member[.c2], ==, literal['/']]]] begin[{] call[result.append, parameter[Cast(expression=MemberReference(member=c2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=char))]] else begin[{] if[binary_operation[member[.c2], ==, literal['b']]] begin[{] call[result.append, parameter[literal["\b"]]] else begin[{] if[binary_operation[member[.c2], ==, literal['f']]] begin[{] call[result.append, parameter[literal["\f"]]] else begin[{] if[binary_operation[member[.c2], ==, literal['n']]] begin[{] call[result.append, parameter[literal["\n"]]] else begin[{] if[binary_operation[member[.c2], ==, literal['r']]] begin[{] call[result.append, parameter[literal["\r"]]] else begin[{] if[binary_operation[member[.c2], ==, literal['t']]] begin[{] call[result.append, parameter[literal["\t"]]] else begin[{] if[binary_operation[member[.c2], ==, literal['u']]] begin[{] local_variable[type[int], d1] local_variable[type[int], d2] local_variable[type[int], d3] local_variable[type[int], d4] call[.checkHexDigit, parameter[member[.d1]]] call[.checkHexDigit, parameter[member[.d2]]] call[.checkHexDigit, parameter[member[.d3]]] call[.checkHexDigit, parameter[member[.d4]]] local_variable[type[int], e] assign[member[.e], binary_operation[binary_operation[member[.e], <<, literal[4]], +, call[Character.digit, parameter[member[.d2], literal[16]]]]] assign[member[.e], binary_operation[binary_operation[member[.e], <<, literal[4]], +, call[Character.digit, parameter[member[.d3], literal[16]]]]] assign[member[.e], binary_operation[binary_operation[member[.e], <<, literal[4]], +, call[Character.digit, parameter[member[.d4], literal[16]]]]] call[result.append, parameter[Cast(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=char))]] else begin[{] None end[}] end[}] end[}] end[}] end[}] end[}] end[}] else begin[{] call[result.append, parameter[Cast(expression=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=char))]] end[}] end[}] end[}] end[}] return[call[result.toString, parameter[]]] end[}] END[}]
Keyword[public] identifier[String] identifier[readString] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[StringBuilder] identifier[result] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] literal[boolean] operator[SEP] { Keyword[int] identifier[c] operator[=] identifier[r] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[<] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[SEP] { Keyword[break] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[SEP] { Keyword[int] identifier[c2] operator[=] identifier[r] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c2] operator[==] literal[String] operator[||] identifier[c2] operator[==] literal[String] operator[||] identifier[c2] operator[==] literal[String] operator[SEP] { identifier[result] operator[SEP] identifier[append] operator[SEP] operator[SEP] Keyword[char] operator[SEP] identifier[c2] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[c2] operator[==] literal[String] operator[SEP] { identifier[result] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[c2] operator[==] literal[String] operator[SEP] { identifier[result] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[c2] operator[==] literal[String] operator[SEP] { identifier[result] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[c2] operator[==] literal[String] operator[SEP] { identifier[result] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[c2] operator[==] literal[String] operator[SEP] { identifier[result] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[c2] operator[==] literal[String] operator[SEP] { Keyword[int] identifier[d1] operator[=] identifier[r] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[d2] operator[=] identifier[r] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[d3] operator[=] identifier[r] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[d4] operator[=] identifier[r] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] identifier[checkHexDigit] operator[SEP] identifier[d1] operator[SEP] operator[SEP] identifier[checkHexDigit] operator[SEP] identifier[d2] operator[SEP] operator[SEP] identifier[checkHexDigit] operator[SEP] identifier[d3] operator[SEP] operator[SEP] identifier[checkHexDigit] operator[SEP] identifier[d4] operator[SEP] operator[SEP] Keyword[int] identifier[e] operator[=] identifier[Character] operator[SEP] identifier[digit] operator[SEP] identifier[d1] , Other[16] operator[SEP] operator[SEP] identifier[e] operator[=] operator[SEP] identifier[e] operator[<<] Other[4] operator[SEP] operator[+] identifier[Character] operator[SEP] identifier[digit] operator[SEP] identifier[d2] , Other[16] operator[SEP] operator[SEP] identifier[e] operator[=] operator[SEP] identifier[e] operator[<<] Other[4] operator[SEP] operator[+] identifier[Character] operator[SEP] identifier[digit] operator[SEP] identifier[d3] , Other[16] operator[SEP] operator[SEP] identifier[e] operator[=] operator[SEP] identifier[e] operator[<<] Other[4] operator[SEP] operator[+] identifier[Character] operator[SEP] identifier[digit] operator[SEP] identifier[d4] , Other[16] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[append] operator[SEP] operator[SEP] Keyword[char] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } Keyword[else] { identifier[result] operator[SEP] identifier[append] operator[SEP] operator[SEP] Keyword[char] operator[SEP] identifier[c] operator[SEP] operator[SEP] } } Keyword[return] identifier[result] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public static void cublasZswap(int n, Pointer x, int incx, Pointer y, int incy) { cublasZswapNative(n, x, incx, y, incy); checkResultBLAS(); }
class class_name[name] begin[{] method[cublasZswap, return_type[void], modifier[public static], parameter[n, x, incx, y, incy]] begin[{] call[.cublasZswapNative, parameter[member[.n], member[.x], member[.incx], member[.y], member[.incy]]] call[.checkResultBLAS, parameter[]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[cublasZswap] operator[SEP] Keyword[int] identifier[n] , identifier[Pointer] identifier[x] , Keyword[int] identifier[incx] , identifier[Pointer] identifier[y] , Keyword[int] identifier[incy] operator[SEP] { identifier[cublasZswapNative] operator[SEP] identifier[n] , identifier[x] , identifier[incx] , identifier[y] , identifier[incy] operator[SEP] operator[SEP] identifier[checkResultBLAS] operator[SEP] operator[SEP] operator[SEP] }
public static ModelLoader load(InputStream stream) throws IOException { JsonNode tree = MAPPER.readTree(stream); JsonNode version = tree.get("FormatVersion"); if (version == null || !version.isObject()) { throw new IllegalStateException("No FormatVersion found"); } JsonNode major = version.get("Major"); if (major == null || !major.isNumber()) { throw new IllegalStateException("No Major version found"); } int majorVersion = major.asInt(); switch (majorVersion) { case 1: return new ModelLoader(loadV1Model(tree, version)); default: throw new IllegalStateException( "Unknown major version " + majorVersion + ". Perhaps " + "you need a newer version of the resources runtime?"); } }
class class_name[name] begin[{] method[load, return_type[type[ModelLoader]], modifier[public static], parameter[stream]] begin[{] local_variable[type[JsonNode], tree] local_variable[type[JsonNode], version] if[binary_operation[binary_operation[member[.version], ==, literal[null]], ||, call[version.isObject, parameter[]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No FormatVersion found")], 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[JsonNode], major] if[binary_operation[binary_operation[member[.major], ==, literal[null]], ||, call[major.isNumber, parameter[]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No Major version found")], 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[int], majorVersion] SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[ReturnStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=tree, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=loadV1Model, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ModelLoader, sub_type=None)), label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unknown major version "), operandr=MemberReference(member=majorVersion, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=". Perhaps "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="you need a newer version of the resources runtime?"), 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)])], expression=MemberReference(member=majorVersion, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[ModelLoader] identifier[load] operator[SEP] identifier[InputStream] identifier[stream] operator[SEP] Keyword[throws] identifier[IOException] { identifier[JsonNode] identifier[tree] operator[=] identifier[MAPPER] operator[SEP] identifier[readTree] operator[SEP] identifier[stream] operator[SEP] operator[SEP] identifier[JsonNode] identifier[version] operator[=] identifier[tree] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[version] operator[==] Other[null] operator[||] operator[!] identifier[version] operator[SEP] identifier[isObject] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[JsonNode] identifier[major] operator[=] identifier[version] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[major] operator[==] Other[null] operator[||] operator[!] identifier[major] operator[SEP] identifier[isNumber] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[int] identifier[majorVersion] operator[=] identifier[major] operator[SEP] identifier[asInt] operator[SEP] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[majorVersion] operator[SEP] { Keyword[case] Other[1] operator[:] Keyword[return] Keyword[new] identifier[ModelLoader] operator[SEP] identifier[loadV1Model] operator[SEP] identifier[tree] , identifier[version] operator[SEP] operator[SEP] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[majorVersion] operator[+] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] } }
@Override public Set<URI> listInputs(URI operationUri) { if (operationUri == null || !operationUri.isAbsolute()) { log.warn("The Operation URI is either absent or relative. Provide an absolute URI"); return ImmutableSet.of(); } URI graphUri; try { graphUri = getGraphUriForElement(operationUri); } catch (URISyntaxException e) { log.warn("The namespace of the URI of the operation is incorrect.", e); return ImmutableSet.of(); } if (graphUri == null) { log.warn("Could not obtain a graph URI for the element. The URI may not be managed by the server - " + operationUri); return ImmutableSet.of(); } String queryStr = new StringBuilder() .append("SELECT DISTINCT ?input WHERE { \n") .append(" GRAPH <").append(graphUri.toASCIIString()).append("> { \n") .append("<").append(operationUri.toASCIIString()).append("> ").append("<").append(MSM.hasInput.getURI()).append(">").append(" ?input .") .append("?input ").append("<").append(RDF.type.getURI()).append(">").append(" ").append("<").append(MSM.MessageContent.getURI()).append("> .") .append(" } \n ") .append("} \n ") .toString(); return this.graphStoreManager.listResourcesByQuery(queryStr, "input"); }
class class_name[name] begin[{] method[listInputs, return_type[type[Set]], modifier[public], parameter[operationUri]] begin[{] if[binary_operation[binary_operation[member[.operationUri], ==, literal[null]], ||, call[operationUri.isAbsolute, parameter[]]]] begin[{] call[log.warn, parameter[literal["The Operation URI is either absent or relative. Provide an absolute URI"]]] return[call[ImmutableSet.of, parameter[]]] else begin[{] None end[}] local_variable[type[URI], graphUri] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=graphUri, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=operationUri, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getGraphUriForElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The namespace of the URI of the operation is incorrect."), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[], member=of, postfix_operators=[], prefix_operators=[], qualifier=ImmutableSet, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['URISyntaxException']))], finally_block=None, label=None, resources=None) if[binary_operation[member[.graphUri], ==, literal[null]]] begin[{] call[log.warn, parameter[binary_operation[literal["Could not obtain a graph URI for the element. The URI may not be managed by the server - "], +, member[.operationUri]]]] return[call[ImmutableSet.of, parameter[]]] else begin[{] None end[}] local_variable[type[String], queryStr] return[THIS[member[None.graphStoreManager]call[None.listResourcesByQuery, parameter[member[.queryStr], literal["input"]]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Set] operator[<] identifier[URI] operator[>] identifier[listInputs] operator[SEP] identifier[URI] identifier[operationUri] operator[SEP] { Keyword[if] operator[SEP] identifier[operationUri] operator[==] Other[null] operator[||] operator[!] identifier[operationUri] operator[SEP] identifier[isAbsolute] operator[SEP] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[ImmutableSet] operator[SEP] identifier[of] operator[SEP] operator[SEP] operator[SEP] } identifier[URI] identifier[graphUri] operator[SEP] Keyword[try] { identifier[graphUri] operator[=] identifier[getGraphUriForElement] operator[SEP] identifier[operationUri] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[URISyntaxException] identifier[e] operator[SEP] { identifier[log] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] Keyword[return] identifier[ImmutableSet] operator[SEP] identifier[of] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[graphUri] operator[==] Other[null] operator[SEP] { identifier[log] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[operationUri] operator[SEP] operator[SEP] Keyword[return] identifier[ImmutableSet] operator[SEP] identifier[of] operator[SEP] operator[SEP] operator[SEP] } identifier[String] identifier[queryStr] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[graphUri] operator[SEP] identifier[toASCIIString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[operationUri] operator[SEP] identifier[toASCIIString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[MSM] operator[SEP] identifier[hasInput] operator[SEP] identifier[getURI] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[RDF] operator[SEP] identifier[type] operator[SEP] identifier[getURI] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[MSM] operator[SEP] identifier[MessageContent] operator[SEP] identifier[getURI] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] identifier[graphStoreManager] operator[SEP] identifier[listResourcesByQuery] operator[SEP] identifier[queryStr] , literal[String] operator[SEP] operator[SEP] }
private MappingManager createMappingManager(String securityDomain) throws Exception { int i = mappingManagerClassName.lastIndexOf(":"); if (i == -1) throw SecurityLogger.ROOT_LOGGER.missingModuleName("mapping manager class"); String moduleSpec = mappingManagerClassName.substring(0, i); String className = mappingManagerClassName.substring(i + 1); Class<?> clazz = SecurityActions.getModuleClassLoader(loader, moduleSpec).loadClass(className); Constructor<?> ctr = clazz.getConstructor(new Class[] { String.class }); return (MappingManager) ctr.newInstance(new Object[] { securityDomain }); }
class class_name[name] begin[{] method[createMappingManager, return_type[type[MappingManager]], modifier[private], parameter[securityDomain]] begin[{] local_variable[type[int], i] if[binary_operation[member[.i], ==, literal[1]]] begin[{] ThrowStatement(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="mapping manager class")], member=missingModuleName, postfix_operators=[], prefix_operators=[], qualifier=SecurityLogger.ROOT_LOGGER, selectors=[], type_arguments=None), label=None) else begin[{] None end[}] local_variable[type[String], moduleSpec] local_variable[type[String], className] local_variable[type[Class], clazz] local_variable[type[Constructor], ctr] return[Cast(expression=MethodInvocation(arguments=[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=securityDomain, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=ctr, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=MappingManager, sub_type=None))] end[}] END[}]
Keyword[private] identifier[MappingManager] identifier[createMappingManager] operator[SEP] identifier[String] identifier[securityDomain] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[int] identifier[i] operator[=] identifier[mappingManagerClassName] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[i] operator[==] operator[-] Other[1] operator[SEP] Keyword[throw] identifier[SecurityLogger] operator[SEP] identifier[ROOT_LOGGER] operator[SEP] identifier[missingModuleName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[moduleSpec] operator[=] identifier[mappingManagerClassName] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[i] operator[SEP] operator[SEP] identifier[String] identifier[className] operator[=] identifier[mappingManagerClassName] operator[SEP] identifier[substring] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[=] identifier[SecurityActions] operator[SEP] identifier[getModuleClassLoader] operator[SEP] identifier[loader] , identifier[moduleSpec] operator[SEP] operator[SEP] identifier[loadClass] operator[SEP] identifier[className] operator[SEP] operator[SEP] identifier[Constructor] operator[<] operator[?] operator[>] identifier[ctr] operator[=] identifier[clazz] operator[SEP] identifier[getConstructor] operator[SEP] Keyword[new] identifier[Class] operator[SEP] operator[SEP] { identifier[String] operator[SEP] Keyword[class] } operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[MappingManager] operator[SEP] identifier[ctr] operator[SEP] identifier[newInstance] operator[SEP] Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[securityDomain] } operator[SEP] operator[SEP] }
public final void notifyReceiveExclusiveChange(boolean newValue) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "notifyReceiveExclusiveChange", new Boolean(newValue)); boolean notifyConsumers = true; synchronized (consumerPoints) { _cardinalityOne = newValue; _cardinalityChange = true; if (consumerPoints.size() == 0) { notifyConsumers = false; } // since we have set cardinalityChange to true, we will not allow any more consumers till we have // finished processing the cardinality change } // if there were consumers, we tell the CD to close all consumers. if (notifyConsumers) super.closeAllConsumersForReceiveExclusive(); else { // all consumers are gone so finish processing the cardinality change // NOTE: this causes us to flush the stream. // Any outstanding transactions will rollback try { cardinalityChangeConsumersDetached(); } catch(SIResourceException e) { // Exception shouldn't occur so FFDC and rethrow as runtime exception FFDCFilter.processException( e, "com.ibm.ws.sib.processor.impl.RemoteConsumerDispatcher.notifyReceiveExclusiveChange", "1:203:1.75", this); SIErrorException e2 = new SIErrorException( nls.getFormattedMessage( "INTERNAL_MESSAGING_ERROR_CWSIP0002", new Object[] { "com.ibm.ws.sib.processor.impl.RemoteConsumerDispatcher.notifyReceiveExclusiveChange", "1:211:1.75", e }, null)); SibTr.exception(tc, e); SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002", new Object[] { "com.ibm.ws.sib.processor.impl.RemoteConsumerDispatcher.notifyReceiveExclusiveChange", "1:219:1.75", e }); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "notifyReceiveExclusiveChange", e2); throw e2; } } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "notifyReceiveExclusiveChange"); }
class class_name[name] begin[{] method[notifyReceiveExclusiveChange, return_type[void], modifier[final public], parameter[newValue]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["notifyReceiveExclusiveChange"], ClassCreator(arguments=[MemberReference(member=newValue, 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=Boolean, sub_type=None))]] else begin[{] None end[}] local_variable[type[boolean], notifyConsumers] SYNCHRONIZED[member[.consumerPoints]] BEGIN[{] assign[member[._cardinalityOne], member[.newValue]] assign[member[._cardinalityChange], literal[true]] if[binary_operation[call[consumerPoints.size, parameter[]], ==, literal[0]]] begin[{] assign[member[.notifyConsumers], literal[false]] else begin[{] None end[}] END[}] if[member[.notifyConsumers]] begin[{] SuperMethodInvocation(arguments=[], member=closeAllConsumersForReceiveExclusive, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) else begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=cardinalityChangeConsumersDetached, postfix_operators=[], prefix_operators=[], qualifier=, 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.impl.RemoteConsumerDispatcher.notifyReceiveExclusiveChange"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1:203:1.75"), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="INTERNAL_MESSAGING_ERROR_CWSIP0002"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ws.sib.processor.impl.RemoteConsumerDispatcher.notifyReceiveExclusiveChange"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1:211:1.75"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=getFormattedMessage, postfix_operators=[], prefix_operators=[], qualifier=nls, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SIErrorException, sub_type=None)), name=e2)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SIErrorException, sub_type=None)), 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="INTERNAL_MESSAGING_ERROR_CWSIP0002"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ws.sib.processor.impl.RemoteConsumerDispatcher.notifyReceiveExclusiveChange"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1:219:1.75"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=error, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), 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=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="notifyReceiveExclusiveChange"), MemberReference(member=e2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=exit, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)), ThrowStatement(expression=MemberReference(member=e2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SIResourceException']))], finally_block=None, label=None, resources=None) end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["notifyReceiveExclusiveChange"]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[notifyReceiveExclusiveChange] operator[SEP] Keyword[boolean] identifier[newValue] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Boolean] operator[SEP] identifier[newValue] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[notifyConsumers] operator[=] literal[boolean] operator[SEP] Keyword[synchronized] operator[SEP] identifier[consumerPoints] operator[SEP] { identifier[_cardinalityOne] operator[=] identifier[newValue] operator[SEP] identifier[_cardinalityChange] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[consumerPoints] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[notifyConsumers] operator[=] literal[boolean] operator[SEP] } } Keyword[if] operator[SEP] identifier[notifyConsumers] operator[SEP] Keyword[super] operator[SEP] identifier[closeAllConsumersForReceiveExclusive] operator[SEP] operator[SEP] operator[SEP] Keyword[else] { Keyword[try] { identifier[cardinalityChangeConsumersDetached] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SIResourceException] 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[SIErrorException] identifier[e2] operator[=] Keyword[new] identifier[SIErrorException] operator[SEP] identifier[nls] operator[SEP] identifier[getFormattedMessage] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { literal[String] , literal[String] , identifier[e] } , Other[null] 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[error] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { literal[String] , literal[String] , identifier[e] } operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , identifier[e2] operator[SEP] operator[SEP] Keyword[throw] identifier[e2] operator[SEP] } } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] }
public String lset(Object key, long index, Object value) { Jedis jedis = getJedis(); try { return jedis.lset(keyToBytes(key), index, valueToBytes(value)); } finally {close(jedis);} }
class class_name[name] begin[{] method[lset, return_type[type[String]], modifier[public], parameter[key, index, value]] begin[{] local_variable[type[Jedis], jedis] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=keyToBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueToBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=lset, postfix_operators=[], prefix_operators=[], qualifier=jedis, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=jedis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=close, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] identifier[String] identifier[lset] operator[SEP] identifier[Object] identifier[key] , Keyword[long] identifier[index] , identifier[Object] identifier[value] operator[SEP] { identifier[Jedis] identifier[jedis] operator[=] identifier[getJedis] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[return] identifier[jedis] operator[SEP] identifier[lset] operator[SEP] identifier[keyToBytes] operator[SEP] identifier[key] operator[SEP] , identifier[index] , identifier[valueToBytes] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { identifier[close] operator[SEP] identifier[jedis] operator[SEP] operator[SEP] } }
public boolean isValidSignature(final Key key) { final byte[] computedHmac = key.sign(getVersion(), getTimestamp(), getInitializationVector(), getCipherText()); return Arrays.equals(getHmac(), computedHmac); }
class class_name[name] begin[{] method[isValidSignature, return_type[type[boolean]], modifier[public], parameter[key]] begin[{] local_variable[type[byte], computedHmac] return[call[Arrays.equals, parameter[call[.getHmac, parameter[]], member[.computedHmac]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isValidSignature] operator[SEP] Keyword[final] identifier[Key] identifier[key] operator[SEP] { Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[computedHmac] operator[=] identifier[key] operator[SEP] identifier[sign] operator[SEP] identifier[getVersion] operator[SEP] operator[SEP] , identifier[getTimestamp] operator[SEP] operator[SEP] , identifier[getInitializationVector] operator[SEP] operator[SEP] , identifier[getCipherText] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[Arrays] operator[SEP] identifier[equals] operator[SEP] identifier[getHmac] operator[SEP] operator[SEP] , identifier[computedHmac] operator[SEP] operator[SEP] }
public Observable<ServiceResponse<Page<ManagedBackupShortTermRetentionPolicyInner>>> listByDatabaseNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } String nextUrl = String.format("%s", nextPageLink); return service.listByDatabaseNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<ManagedBackupShortTermRetentionPolicyInner>>>>() { @Override public Observable<ServiceResponse<Page<ManagedBackupShortTermRetentionPolicyInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<ManagedBackupShortTermRetentionPolicyInner>> result = listByDatabaseNextDelegate(response); return Observable.just(new ServiceResponse<Page<ManagedBackupShortTermRetentionPolicyInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); }
class class_name[name] begin[{] method[listByDatabaseNextSinglePageAsync, return_type[type[Observable]], modifier[public], parameter[nextPageLink]] begin[{] if[binary_operation[member[.nextPageLink], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter nextPageLink is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[String], nextUrl] return[call[service.listByDatabaseNext, parameter[member[.nextUrl], THIS[member[None.client]call[None.acceptLanguage, parameter[]]], THIS[member[None.client]call[None.userAgent, parameter[]]]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[ManagedBackupShortTermRetentionPolicyInner] operator[>] operator[>] operator[>] identifier[listByDatabaseNextSinglePageAsync] operator[SEP] Keyword[final] identifier[String] identifier[nextPageLink] operator[SEP] { Keyword[if] operator[SEP] identifier[nextPageLink] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[String] identifier[nextUrl] operator[=] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[nextPageLink] operator[SEP] operator[SEP] Keyword[return] identifier[service] operator[SEP] identifier[listByDatabaseNext] operator[SEP] identifier[nextUrl] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[acceptLanguage] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[userAgent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[flatMap] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[Response] operator[<] identifier[ResponseBody] operator[>] , identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[ManagedBackupShortTermRetentionPolicyInner] operator[>] operator[>] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[ManagedBackupShortTermRetentionPolicyInner] operator[>] operator[>] operator[>] identifier[call] operator[SEP] identifier[Response] operator[<] identifier[ResponseBody] operator[>] identifier[response] operator[SEP] { Keyword[try] { identifier[ServiceResponse] operator[<] identifier[PageImpl] operator[<] identifier[ManagedBackupShortTermRetentionPolicyInner] operator[>] operator[>] identifier[result] operator[=] identifier[listByDatabaseNextDelegate] operator[SEP] identifier[response] operator[SEP] operator[SEP] Keyword[return] identifier[Observable] operator[SEP] identifier[just] operator[SEP] Keyword[new] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[ManagedBackupShortTermRetentionPolicyInner] operator[>] operator[>] operator[SEP] identifier[result] operator[SEP] identifier[body] operator[SEP] operator[SEP] , identifier[result] operator[SEP] identifier[response] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { Keyword[return] identifier[Observable] operator[SEP] identifier[error] operator[SEP] identifier[t] operator[SEP] operator[SEP] } } } operator[SEP] operator[SEP] }
public List<EntitySummary> getEntitiesFromApplication(String brooklynId) throws IOException { Invocation invocation = getJerseyClient().target(getEndpoint() + "/v1/applications/" + brooklynId + "/entities") .request().buildGet(); return invocation.invoke().readEntity(new GenericType<List<EntitySummary>>(){}); }
class class_name[name] begin[{] method[getEntitiesFromApplication, return_type[type[List]], modifier[public], parameter[brooklynId]] begin[{] local_variable[type[Invocation], invocation] return[call[invocation.invoke, parameter[]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[EntitySummary] operator[>] identifier[getEntitiesFromApplication] operator[SEP] identifier[String] identifier[brooklynId] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Invocation] identifier[invocation] operator[=] identifier[getJerseyClient] operator[SEP] operator[SEP] operator[SEP] identifier[target] operator[SEP] identifier[getEndpoint] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[brooklynId] operator[+] literal[String] operator[SEP] operator[SEP] identifier[request] operator[SEP] operator[SEP] operator[SEP] identifier[buildGet] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[invocation] operator[SEP] identifier[invoke] operator[SEP] operator[SEP] operator[SEP] identifier[readEntity] operator[SEP] Keyword[new] identifier[GenericType] operator[<] identifier[List] operator[<] identifier[EntitySummary] operator[>] operator[>] operator[SEP] operator[SEP] { } operator[SEP] operator[SEP] }
protected final boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata, Condition condition) { if (condition instanceof SpringBootCondition) { return ((SpringBootCondition) condition).getMatchOutcome(context, metadata) .isMatch(); } return condition.matches(context, metadata); }
class class_name[name] begin[{] method[matches, return_type[type[boolean]], modifier[final protected], parameter[context, metadata, condition]] begin[{] if[binary_operation[member[.condition], instanceof, type[SpringBootCondition]]] begin[{] return[Cast(expression=MemberReference(member=condition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=SpringBootCondition, sub_type=None))] else begin[{] None end[}] return[call[condition.matches, parameter[member[.context], member[.metadata]]]] end[}] END[}]
Keyword[protected] Keyword[final] Keyword[boolean] identifier[matches] operator[SEP] identifier[ConditionContext] identifier[context] , identifier[AnnotatedTypeMetadata] identifier[metadata] , identifier[Condition] identifier[condition] operator[SEP] { Keyword[if] operator[SEP] identifier[condition] Keyword[instanceof] identifier[SpringBootCondition] operator[SEP] { Keyword[return] operator[SEP] operator[SEP] identifier[SpringBootCondition] operator[SEP] identifier[condition] operator[SEP] operator[SEP] identifier[getMatchOutcome] operator[SEP] identifier[context] , identifier[metadata] operator[SEP] operator[SEP] identifier[isMatch] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[condition] operator[SEP] identifier[matches] operator[SEP] identifier[context] , identifier[metadata] operator[SEP] operator[SEP] }
@SuppressWarnings("signature") // conversion routine protected static @ClassGetName String typeToClassGetName(Type t) { if (t instanceof ObjectType) { return ((ObjectType) t).getClassName(); } else if (t instanceof BasicType) { // Use reserved keyword for basic type rather than signature to // avoid conflicts with user defined types. return t.toString(); } else { // Array type: just convert '/' to '.' return t.getSignature().replace('/', '.'); } }
class class_name[name] begin[{] method[typeToClassGetName, return_type[type[String]], modifier[static protected], parameter[t]] begin[{] if[binary_operation[member[.t], instanceof, type[ObjectType]]] begin[{] return[Cast(expression=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ObjectType, sub_type=None))] else begin[{] if[binary_operation[member[.t], instanceof, type[BasicType]]] begin[{] return[call[t.toString, parameter[]]] else begin[{] return[call[t.getSignature, parameter[]]] end[}] end[}] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] Keyword[static] annotation[@] identifier[ClassGetName] identifier[String] identifier[typeToClassGetName] operator[SEP] identifier[Type] identifier[t] operator[SEP] { Keyword[if] operator[SEP] identifier[t] Keyword[instanceof] identifier[ObjectType] operator[SEP] { Keyword[return] operator[SEP] operator[SEP] identifier[ObjectType] operator[SEP] identifier[t] operator[SEP] operator[SEP] identifier[getClassName] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[t] Keyword[instanceof] identifier[BasicType] operator[SEP] { Keyword[return] identifier[t] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[t] operator[SEP] identifier[getSignature] operator[SEP] operator[SEP] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] } }
public OkRequest<T> form(final Map.Entry<String, String> entry) { return form(entry, CHARSET_UTF8); }
class class_name[name] begin[{] method[form, return_type[type[OkRequest]], modifier[public], parameter[entry]] begin[{] return[call[.form, parameter[member[.entry], member[.CHARSET_UTF8]]]] end[}] END[}]
Keyword[public] identifier[OkRequest] operator[<] identifier[T] operator[>] identifier[form] operator[SEP] Keyword[final] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[String] operator[>] identifier[entry] operator[SEP] { Keyword[return] identifier[form] operator[SEP] identifier[entry] , identifier[CHARSET_UTF8] operator[SEP] operator[SEP] }
public final static double roundToDecimals(double d, int c) { if(c < 0) return d; double p = Math.pow(10,c); d = d * p; double tmp = Math.round(d); return tmp/p; }
class class_name[name] begin[{] method[roundToDecimals, return_type[type[double]], modifier[final public static], parameter[d, c]] begin[{] if[binary_operation[member[.c], <, literal[0]]] begin[{] return[member[.d]] else begin[{] None end[}] local_variable[type[double], p] assign[member[.d], binary_operation[member[.d], *, member[.p]]] local_variable[type[double], tmp] return[binary_operation[member[.tmp], /, member[.p]]] end[}] END[}]
Keyword[public] Keyword[final] Keyword[static] Keyword[double] identifier[roundToDecimals] operator[SEP] Keyword[double] identifier[d] , Keyword[int] identifier[c] operator[SEP] { Keyword[if] operator[SEP] identifier[c] operator[<] Other[0] operator[SEP] Keyword[return] identifier[d] operator[SEP] Keyword[double] identifier[p] operator[=] identifier[Math] operator[SEP] identifier[pow] operator[SEP] Other[10] , identifier[c] operator[SEP] operator[SEP] identifier[d] operator[=] identifier[d] operator[*] identifier[p] operator[SEP] Keyword[double] identifier[tmp] operator[=] identifier[Math] operator[SEP] identifier[round] operator[SEP] identifier[d] operator[SEP] operator[SEP] Keyword[return] identifier[tmp] operator[/] identifier[p] operator[SEP] }
private void setScrollbarVisible(boolean visible) { if (visible) { getElement().getStyle().clearWidth(); m_knob.getStyle().clearDisplay(); } else { getElement().getStyle().setWidth(0, Unit.PX); m_knob.getStyle().setDisplay(Display.NONE); } }
class class_name[name] begin[{] method[setScrollbarVisible, return_type[void], modifier[private], parameter[visible]] begin[{] if[member[.visible]] begin[{] call[.getElement, parameter[]] call[m_knob.getStyle, parameter[]] else begin[{] call[.getElement, parameter[]] call[m_knob.getStyle, parameter[]] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[setScrollbarVisible] operator[SEP] Keyword[boolean] identifier[visible] operator[SEP] { Keyword[if] operator[SEP] identifier[visible] operator[SEP] { identifier[getElement] operator[SEP] operator[SEP] operator[SEP] identifier[getStyle] operator[SEP] operator[SEP] operator[SEP] identifier[clearWidth] operator[SEP] operator[SEP] operator[SEP] identifier[m_knob] operator[SEP] identifier[getStyle] operator[SEP] operator[SEP] operator[SEP] identifier[clearDisplay] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[getElement] operator[SEP] operator[SEP] operator[SEP] identifier[getStyle] operator[SEP] operator[SEP] operator[SEP] identifier[setWidth] operator[SEP] Other[0] , identifier[Unit] operator[SEP] identifier[PX] operator[SEP] operator[SEP] identifier[m_knob] operator[SEP] identifier[getStyle] operator[SEP] operator[SEP] operator[SEP] identifier[setDisplay] operator[SEP] identifier[Display] operator[SEP] identifier[NONE] operator[SEP] operator[SEP] } }
public boolean prefixMatchLists( String[] prefixes, String[] keys ) { // The prefixes are part of the server resources. If none is given, // everything matches if ( prefixes == null ) { return true; } // If no os keyes was given, and the server resource is keyed of this, // then return false. if ( keys == null ) { return false; } // Check for a match on a key for ( String key : keys ) { if ( prefixMatchStringList( prefixes, key ) ) { return true; } } return false; }
class class_name[name] begin[{] method[prefixMatchLists, return_type[type[boolean]], modifier[public], parameter[prefixes, keys]] begin[{] if[binary_operation[member[.prefixes], ==, literal[null]]] begin[{] return[literal[true]] else begin[{] None end[}] if[binary_operation[member[.keys], ==, literal[null]]] begin[{] return[literal[false]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=prefixes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=prefixMatchStringList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=keys, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[literal[false]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[prefixMatchLists] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[prefixes] , identifier[String] operator[SEP] operator[SEP] identifier[keys] operator[SEP] { Keyword[if] operator[SEP] identifier[prefixes] operator[==] Other[null] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[keys] operator[==] Other[null] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[for] operator[SEP] identifier[String] identifier[key] operator[:] identifier[keys] operator[SEP] { Keyword[if] operator[SEP] identifier[prefixMatchStringList] operator[SEP] identifier[prefixes] , identifier[key] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
protected Class<?> determineContextClass(PortletContext portletContext) { String contextClassName = portletContext.getInitParameter(CONTEXT_CLASS_PARAM); if (contextClassName != null) { try { return ClassUtils.forName(contextClassName, ClassUtils.getDefaultClassLoader()); } catch (ClassNotFoundException ex) { throw new ApplicationContextException( "Failed to load custom context class [" + contextClassName + "]", ex); } } else { contextClassName = defaultStrategies.getProperty(PortletApplicationContext.class.getName()); try { return ClassUtils.forName(contextClassName, PortletContextLoader.class.getClassLoader()); } catch (ClassNotFoundException ex) { throw new ApplicationContextException( "Failed to load default context class [" + contextClassName + "]", ex); } } }
class class_name[name] begin[{] method[determineContextClass, return_type[type[Class]], modifier[protected], parameter[portletContext]] begin[{] local_variable[type[String], contextClassName] if[binary_operation[member[.contextClassName], !=, literal[null]]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=contextClassName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getDefaultClassLoader, postfix_operators=[], prefix_operators=[], qualifier=ClassUtils, selectors=[], type_arguments=None)], member=forName, postfix_operators=[], prefix_operators=[], qualifier=ClassUtils, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to load custom context class ["), operandr=MemberReference(member=contextClassName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]"), operator=+), MemberReference(member=ex, 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=ApplicationContextException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['ClassNotFoundException']))], finally_block=None, label=None, resources=None) else begin[{] assign[member[.contextClassName], call[defaultStrategies.getProperty, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=PortletApplicationContext, sub_type=None))]]] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=contextClassName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getClassLoader, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=PortletContextLoader, sub_type=None))], member=forName, postfix_operators=[], prefix_operators=[], qualifier=ClassUtils, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to load default context class ["), operandr=MemberReference(member=contextClassName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]"), operator=+), MemberReference(member=ex, 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=ApplicationContextException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['ClassNotFoundException']))], finally_block=None, label=None, resources=None) end[}] end[}] END[}]
Keyword[protected] identifier[Class] operator[<] operator[?] operator[>] identifier[determineContextClass] operator[SEP] identifier[PortletContext] identifier[portletContext] operator[SEP] { identifier[String] identifier[contextClassName] operator[=] identifier[portletContext] operator[SEP] identifier[getInitParameter] operator[SEP] identifier[CONTEXT_CLASS_PARAM] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[contextClassName] operator[!=] Other[null] operator[SEP] { Keyword[try] { Keyword[return] identifier[ClassUtils] operator[SEP] identifier[forName] operator[SEP] identifier[contextClassName] , identifier[ClassUtils] operator[SEP] identifier[getDefaultClassLoader] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ClassNotFoundException] identifier[ex] operator[SEP] { Keyword[throw] Keyword[new] identifier[ApplicationContextException] operator[SEP] literal[String] operator[+] identifier[contextClassName] operator[+] literal[String] , identifier[ex] operator[SEP] operator[SEP] } } Keyword[else] { identifier[contextClassName] operator[=] identifier[defaultStrategies] operator[SEP] identifier[getProperty] operator[SEP] identifier[PortletApplicationContext] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[return] identifier[ClassUtils] operator[SEP] identifier[forName] operator[SEP] identifier[contextClassName] , identifier[PortletContextLoader] operator[SEP] Keyword[class] operator[SEP] identifier[getClassLoader] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ClassNotFoundException] identifier[ex] operator[SEP] { Keyword[throw] Keyword[new] identifier[ApplicationContextException] operator[SEP] literal[String] operator[+] identifier[contextClassName] operator[+] literal[String] , identifier[ex] operator[SEP] operator[SEP] } } }
public <X> X get(String namespaceURI, String localPart){ return get(namespaceURI, localPart, (X)null); }
class class_name[name] begin[{] method[get, return_type[type[X]], modifier[public], parameter[namespaceURI, localPart]] begin[{] return[call[.get, parameter[member[.namespaceURI], member[.localPart], Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), type=ReferenceType(arguments=None, dimensions=[], name=X, sub_type=None))]]] end[}] END[}]
Keyword[public] operator[<] identifier[X] operator[>] identifier[X] identifier[get] operator[SEP] identifier[String] identifier[namespaceURI] , identifier[String] identifier[localPart] operator[SEP] { Keyword[return] identifier[get] operator[SEP] identifier[namespaceURI] , identifier[localPart] , operator[SEP] identifier[X] operator[SEP] Other[null] operator[SEP] operator[SEP] }
static public long writeFile(ucar.nc2.dt.GridDataset gds, List<String> gridList, LatLonRect llbb, ProjectionRect projRect, int horizStride, Range zRange, CalendarDateRange dateRange, int stride_time, boolean addLatLon, NetcdfFileWriter writer) throws IOException, InvalidRangeException { CFGridWriter2 writer2 = new CFGridWriter2(); return writer2.writeOrTestSize(gds, gridList, llbb, projRect, horizStride, zRange, dateRange, stride_time, addLatLon, false, writer); }
class class_name[name] begin[{] method[writeFile, return_type[type[long]], modifier[public static], parameter[gds, gridList, llbb, projRect, horizStride, zRange, dateRange, stride_time, addLatLon, writer]] begin[{] local_variable[type[CFGridWriter2], writer2] return[call[writer2.writeOrTestSize, parameter[member[.gds], member[.gridList], member[.llbb], member[.projRect], member[.horizStride], member[.zRange], member[.dateRange], member[.stride_time], member[.addLatLon], literal[false], member[.writer]]]] end[}] END[}]
Keyword[static] Keyword[public] Keyword[long] identifier[writeFile] operator[SEP] identifier[ucar] operator[SEP] identifier[nc2] operator[SEP] identifier[dt] operator[SEP] identifier[GridDataset] identifier[gds] , identifier[List] operator[<] identifier[String] operator[>] identifier[gridList] , identifier[LatLonRect] identifier[llbb] , identifier[ProjectionRect] identifier[projRect] , Keyword[int] identifier[horizStride] , identifier[Range] identifier[zRange] , identifier[CalendarDateRange] identifier[dateRange] , Keyword[int] identifier[stride_time] , Keyword[boolean] identifier[addLatLon] , identifier[NetcdfFileWriter] identifier[writer] operator[SEP] Keyword[throws] identifier[IOException] , identifier[InvalidRangeException] { identifier[CFGridWriter2] identifier[writer2] operator[=] Keyword[new] identifier[CFGridWriter2] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[writer2] operator[SEP] identifier[writeOrTestSize] operator[SEP] identifier[gds] , identifier[gridList] , identifier[llbb] , identifier[projRect] , identifier[horizStride] , identifier[zRange] , identifier[dateRange] , identifier[stride_time] , identifier[addLatLon] , literal[boolean] , identifier[writer] operator[SEP] operator[SEP] }
protected int rearrangePoints(int[] indices, final int startidx, final int endidx, final int splitDim, final double splitVal) { int tmp, left = startidx - 1; for (int i = startidx; i <= endidx; i++) { if (m_EuclideanDistance.valueIsSmallerEqual(m_Instances .instance(indices[i]), splitDim, splitVal)) { left++; tmp = indices[left]; indices[left] = indices[i]; indices[i] = tmp; }//end if valueIsSmallerEqual }//end for return left + 1; }
class class_name[name] begin[{] method[rearrangePoints, return_type[type[int]], modifier[protected], parameter[indices, startidx, endidx, splitDim, splitVal]] begin[{] local_variable[type[int], tmp] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=indices, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=instance, postfix_operators=[], prefix_operators=[], qualifier=m_Instances, selectors=[], type_arguments=None), MemberReference(member=splitDim, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=splitVal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueIsSmallerEqual, postfix_operators=[], prefix_operators=[], qualifier=m_EuclideanDistance, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=left, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=tmp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=indices, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=left, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=indices, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=left, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=indices, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=indices, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=tmp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=endidx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=startidx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[binary_operation[member[.left], +, literal[1]]] end[}] END[}]
Keyword[protected] Keyword[int] identifier[rearrangePoints] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[indices] , Keyword[final] Keyword[int] identifier[startidx] , Keyword[final] Keyword[int] identifier[endidx] , Keyword[final] Keyword[int] identifier[splitDim] , Keyword[final] Keyword[double] identifier[splitVal] operator[SEP] { Keyword[int] identifier[tmp] , identifier[left] operator[=] identifier[startidx] operator[-] Other[1] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[startidx] operator[SEP] identifier[i] operator[<=] identifier[endidx] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[m_EuclideanDistance] operator[SEP] identifier[valueIsSmallerEqual] operator[SEP] identifier[m_Instances] operator[SEP] identifier[instance] operator[SEP] identifier[indices] operator[SEP] identifier[i] operator[SEP] operator[SEP] , identifier[splitDim] , identifier[splitVal] operator[SEP] operator[SEP] { identifier[left] operator[++] operator[SEP] identifier[tmp] operator[=] identifier[indices] operator[SEP] identifier[left] operator[SEP] operator[SEP] identifier[indices] operator[SEP] identifier[left] operator[SEP] operator[=] identifier[indices] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[indices] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[tmp] operator[SEP] } } Keyword[return] identifier[left] operator[+] Other[1] operator[SEP] }
private void resizeElementArrays(int dataLength, int newLength) { Object temp; int usedLength = newLength > dataLength ? dataLength : newLength; if (isIntKey) { temp = intKeyTable; intKeyTable = new int[newLength]; System.arraycopy(temp, 0, intKeyTable, 0, usedLength); } if (isIntValue) { temp = intValueTable; intValueTable = new int[newLength]; System.arraycopy(temp, 0, intValueTable, 0, usedLength); } if (isLongKey) { temp = longKeyTable; longKeyTable = new long[newLength]; System.arraycopy(temp, 0, longKeyTable, 0, usedLength); } if (isLongValue) { temp = longValueTable; longValueTable = new long[newLength]; System.arraycopy(temp, 0, longValueTable, 0, usedLength); } if (isObjectKey) { temp = objectKeyTable; objectKeyTable = new Object[newLength]; System.arraycopy(temp, 0, objectKeyTable, 0, usedLength); } if (isObjectValue) { temp = objectValueTable; objectValueTable = new Object[newLength]; System.arraycopy(temp, 0, objectValueTable, 0, usedLength); } if (accessTable != null) { temp = accessTable; accessTable = new int[newLength]; System.arraycopy(temp, 0, accessTable, 0, usedLength); } if (multiValueTable != null) { temp = multiValueTable; multiValueTable = new boolean[newLength]; System.arraycopy(temp, 0, multiValueTable, 0, usedLength); } }
class class_name[name] begin[{] method[resizeElementArrays, return_type[void], modifier[private], parameter[dataLength, newLength]] begin[{] local_variable[type[Object], temp] local_variable[type[int], usedLength] if[member[.isIntKey]] begin[{] assign[member[.temp], member[.intKeyTable]] assign[member[.intKeyTable], ArrayCreator(dimensions=[MemberReference(member=newLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int))] call[System.arraycopy, parameter[member[.temp], literal[0], member[.intKeyTable], literal[0], member[.usedLength]]] else begin[{] None end[}] if[member[.isIntValue]] begin[{] assign[member[.temp], member[.intValueTable]] assign[member[.intValueTable], ArrayCreator(dimensions=[MemberReference(member=newLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int))] call[System.arraycopy, parameter[member[.temp], literal[0], member[.intValueTable], literal[0], member[.usedLength]]] else begin[{] None end[}] if[member[.isLongKey]] begin[{] assign[member[.temp], member[.longKeyTable]] assign[member[.longKeyTable], ArrayCreator(dimensions=[MemberReference(member=newLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=long))] call[System.arraycopy, parameter[member[.temp], literal[0], member[.longKeyTable], literal[0], member[.usedLength]]] else begin[{] None end[}] if[member[.isLongValue]] begin[{] assign[member[.temp], member[.longValueTable]] assign[member[.longValueTable], ArrayCreator(dimensions=[MemberReference(member=newLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=long))] call[System.arraycopy, parameter[member[.temp], literal[0], member[.longValueTable], literal[0], member[.usedLength]]] else begin[{] None end[}] if[member[.isObjectKey]] begin[{] assign[member[.temp], member[.objectKeyTable]] assign[member[.objectKeyTable], ArrayCreator(dimensions=[MemberReference(member=newLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))] call[System.arraycopy, parameter[member[.temp], literal[0], member[.objectKeyTable], literal[0], member[.usedLength]]] else begin[{] None end[}] if[member[.isObjectValue]] begin[{] assign[member[.temp], member[.objectValueTable]] assign[member[.objectValueTable], ArrayCreator(dimensions=[MemberReference(member=newLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))] call[System.arraycopy, parameter[member[.temp], literal[0], member[.objectValueTable], literal[0], member[.usedLength]]] else begin[{] None end[}] if[binary_operation[member[.accessTable], !=, literal[null]]] begin[{] assign[member[.temp], member[.accessTable]] assign[member[.accessTable], ArrayCreator(dimensions=[MemberReference(member=newLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int))] call[System.arraycopy, parameter[member[.temp], literal[0], member[.accessTable], literal[0], member[.usedLength]]] else begin[{] None end[}] if[binary_operation[member[.multiValueTable], !=, literal[null]]] begin[{] assign[member[.temp], member[.multiValueTable]] assign[member[.multiValueTable], ArrayCreator(dimensions=[MemberReference(member=newLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=boolean))] call[System.arraycopy, parameter[member[.temp], literal[0], member[.multiValueTable], literal[0], member[.usedLength]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[resizeElementArrays] operator[SEP] Keyword[int] identifier[dataLength] , Keyword[int] identifier[newLength] operator[SEP] { identifier[Object] identifier[temp] operator[SEP] Keyword[int] identifier[usedLength] operator[=] identifier[newLength] operator[>] identifier[dataLength] operator[?] identifier[dataLength] operator[:] identifier[newLength] operator[SEP] Keyword[if] operator[SEP] identifier[isIntKey] operator[SEP] { identifier[temp] operator[=] identifier[intKeyTable] operator[SEP] identifier[intKeyTable] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[newLength] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[temp] , Other[0] , identifier[intKeyTable] , Other[0] , identifier[usedLength] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[isIntValue] operator[SEP] { identifier[temp] operator[=] identifier[intValueTable] operator[SEP] identifier[intValueTable] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[newLength] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[temp] , Other[0] , identifier[intValueTable] , Other[0] , identifier[usedLength] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[isLongKey] operator[SEP] { identifier[temp] operator[=] identifier[longKeyTable] operator[SEP] identifier[longKeyTable] operator[=] Keyword[new] Keyword[long] operator[SEP] identifier[newLength] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[temp] , Other[0] , identifier[longKeyTable] , Other[0] , identifier[usedLength] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[isLongValue] operator[SEP] { identifier[temp] operator[=] identifier[longValueTable] operator[SEP] identifier[longValueTable] operator[=] Keyword[new] Keyword[long] operator[SEP] identifier[newLength] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[temp] , Other[0] , identifier[longValueTable] , Other[0] , identifier[usedLength] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[isObjectKey] operator[SEP] { identifier[temp] operator[=] identifier[objectKeyTable] operator[SEP] identifier[objectKeyTable] operator[=] Keyword[new] identifier[Object] operator[SEP] identifier[newLength] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[temp] , Other[0] , identifier[objectKeyTable] , Other[0] , identifier[usedLength] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[isObjectValue] operator[SEP] { identifier[temp] operator[=] identifier[objectValueTable] operator[SEP] identifier[objectValueTable] operator[=] Keyword[new] identifier[Object] operator[SEP] identifier[newLength] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[temp] , Other[0] , identifier[objectValueTable] , Other[0] , identifier[usedLength] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[accessTable] operator[!=] Other[null] operator[SEP] { identifier[temp] operator[=] identifier[accessTable] operator[SEP] identifier[accessTable] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[newLength] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[temp] , Other[0] , identifier[accessTable] , Other[0] , identifier[usedLength] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[multiValueTable] operator[!=] Other[null] operator[SEP] { identifier[temp] operator[=] identifier[multiValueTable] operator[SEP] identifier[multiValueTable] operator[=] Keyword[new] Keyword[boolean] operator[SEP] identifier[newLength] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[temp] , Other[0] , identifier[multiValueTable] , Other[0] , identifier[usedLength] operator[SEP] operator[SEP] } }
@Override public void writeGraphFiles(BenchmarkReport benchmarkReport) { List<Map<String, XYSeries>> constraintIdToWeightSeriesMapList = new ArrayList<>(BenchmarkReport.CHARTED_SCORE_LEVEL_SIZE); for (ConstraintMatchTotalBestScoreStatisticPoint point : getPointList()) { long timeMillisSpent = point.getTimeMillisSpent(); double[] levelValues = ScoreUtils.extractLevelDoubles(point.getScoreTotal()); for (int i = 0; i < levelValues.length && i < BenchmarkReport.CHARTED_SCORE_LEVEL_SIZE; i++) { if (i >= constraintIdToWeightSeriesMapList.size()) { constraintIdToWeightSeriesMapList.add(new LinkedHashMap<>()); } Map<String, XYSeries> constraintIdToWeightSeriesMap = constraintIdToWeightSeriesMapList.get(i); XYSeries weightSeries = constraintIdToWeightSeriesMap.computeIfAbsent(point.getConstraintId(), k -> new XYSeries(point.getConstraintName() + " weight")); // Only add changes if (levelValues[i] != ((weightSeries.getItemCount() == 0) ? 0.0 : weightSeries.getY(weightSeries.getItemCount() - 1).doubleValue())) { weightSeries.add(timeMillisSpent, levelValues[i]); } } } long timeMillisSpent = subSingleBenchmarkResult.getTimeMillisSpent(); for (Map<String, XYSeries> constraintIdToWeightSeriesMap : constraintIdToWeightSeriesMapList) { for (Iterator<Map.Entry<String, XYSeries>> it = constraintIdToWeightSeriesMap.entrySet().iterator(); it.hasNext(); ) { XYSeries weightSeries = it.next().getValue(); if (weightSeries.getItemCount() == 0) { // Only show the constraint type on the score levels that it affects it.remove(); } else { // Draw a horizontal line from the last new best step to how long the solver actually ran weightSeries.add(timeMillisSpent, weightSeries.getY(weightSeries.getItemCount() - 1).doubleValue()); } } } graphFileList = new ArrayList<>(constraintIdToWeightSeriesMapList.size()); for (int scoreLevelIndex = 0; scoreLevelIndex < constraintIdToWeightSeriesMapList.size(); scoreLevelIndex++) { XYPlot plot = createPlot(benchmarkReport, scoreLevelIndex); // No direct ascending lines between 2 points, but a stepping line instead XYItemRenderer renderer = new XYStepRenderer(); plot.setRenderer(renderer); XYSeriesCollection seriesCollection = new XYSeriesCollection(); for (XYSeries series : constraintIdToWeightSeriesMapList.get(scoreLevelIndex).values()) { seriesCollection.addSeries(series); } plot.setDataset(seriesCollection); String scoreLevelLabel = subSingleBenchmarkResult.getSingleBenchmarkResult().getProblemBenchmarkResult() .findScoreLevelLabel(scoreLevelIndex); JFreeChart chart = new JFreeChart(subSingleBenchmarkResult.getName() + " constraint match total best " + scoreLevelLabel + " diff statistic", JFreeChart.DEFAULT_TITLE_FONT, plot, true); graphFileList.add(writeChartToImageFile(chart, "ConstraintMatchTotalBestScoreStatisticLevel" + scoreLevelIndex)); } }
class class_name[name] begin[{] method[writeGraphFiles, return_type[void], modifier[public], parameter[benchmarkReport]] begin[{] local_variable[type[List], constraintIdToWeightSeriesMapList] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getTimeMillisSpent, postfix_operators=[], prefix_operators=[], qualifier=point, selectors=[], type_arguments=None), name=timeMillisSpent)], modifiers=set(), type=BasicType(dimensions=[], name=long)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getScoreTotal, postfix_operators=[], prefix_operators=[], qualifier=point, selectors=[], type_arguments=None)], member=extractLevelDoubles, postfix_operators=[], prefix_operators=[], qualifier=ScoreUtils, selectors=[], type_arguments=None), name=levelValues)], modifiers=set(), type=BasicType(dimensions=[None], name=double)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=constraintIdToWeightSeriesMapList, selectors=[], type_arguments=None), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=LinkedHashMap, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=constraintIdToWeightSeriesMapList, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=constraintIdToWeightSeriesMapList, selectors=[], type_arguments=None), name=constraintIdToWeightSeriesMap)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=XYSeries, sub_type=None))], dimensions=[], name=Map, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getConstraintId, postfix_operators=[], prefix_operators=[], qualifier=point, selectors=[], type_arguments=None), LambdaExpression(body=ClassCreator(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=getConstraintName, postfix_operators=[], prefix_operators=[], qualifier=point, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" weight"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=XYSeries, sub_type=None)), parameters=[MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])], member=computeIfAbsent, postfix_operators=[], prefix_operators=[], qualifier=constraintIdToWeightSeriesMap, selectors=[], type_arguments=None), name=weightSeries)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=XYSeries, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=levelValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getItemCount, postfix_operators=[], prefix_operators=[], qualifier=weightSeries, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), if_false=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=getItemCount, postfix_operators=[], prefix_operators=[], qualifier=weightSeries, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=getY, postfix_operators=[], prefix_operators=[], qualifier=weightSeries, selectors=[MethodInvocation(arguments=[], member=doubleValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.0)), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=timeMillisSpent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=levelValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=add, postfix_operators=[], prefix_operators=[], qualifier=weightSeries, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=levelValues, selectors=[]), operator=<), operandr=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=CHARTED_SCORE_LEVEL_SIZE, postfix_operators=[], prefix_operators=[], qualifier=BenchmarkReport, selectors=[]), operator=<), operator=&&), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getPointList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=point)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ConstraintMatchTotalBestScoreStatisticPoint, sub_type=None))), label=None) local_variable[type[long], timeMillisSpent] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[MethodInvocation(arguments=[], member=getValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=weightSeries)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=XYSeries, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getItemCount, postfix_operators=[], prefix_operators=[], qualifier=weightSeries, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=timeMillisSpent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=getItemCount, postfix_operators=[], prefix_operators=[], qualifier=weightSeries, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=getY, postfix_operators=[], prefix_operators=[], qualifier=weightSeries, selectors=[MethodInvocation(arguments=[], member=doubleValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=weightSeries, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=remove, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=constraintIdToWeightSeriesMap, selectors=[MethodInvocation(arguments=[], member=iterator, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=it)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=XYSeries, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))], dimensions=[], name=Iterator, sub_type=None)), update=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=constraintIdToWeightSeriesMapList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=constraintIdToWeightSeriesMap)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=XYSeries, sub_type=None))], dimensions=[], name=Map, sub_type=None))), label=None) assign[member[.graphFileList], ClassCreator(arguments=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=constraintIdToWeightSeriesMapList, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None))] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=benchmarkReport, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=scoreLevelIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createPlot, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=plot)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=XYPlot, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=XYStepRenderer, sub_type=None)), name=renderer)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=XYItemRenderer, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=renderer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setRenderer, postfix_operators=[], prefix_operators=[], qualifier=plot, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=XYSeriesCollection, sub_type=None)), name=seriesCollection)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=XYSeriesCollection, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=series, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addSeries, postfix_operators=[], prefix_operators=[], qualifier=seriesCollection, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=scoreLevelIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=constraintIdToWeightSeriesMapList, selectors=[MethodInvocation(arguments=[], member=values, 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=series)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=XYSeries, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=seriesCollection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setDataset, postfix_operators=[], prefix_operators=[], qualifier=plot, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getSingleBenchmarkResult, postfix_operators=[], prefix_operators=[], qualifier=subSingleBenchmarkResult, selectors=[MethodInvocation(arguments=[], member=getProblemBenchmarkResult, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=scoreLevelIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=findScoreLevelLabel, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=scoreLevelLabel)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=subSingleBenchmarkResult, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" constraint match total best "), operator=+), operandr=MemberReference(member=scoreLevelLabel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" diff statistic"), operator=+), MemberReference(member=DEFAULT_TITLE_FONT, postfix_operators=[], prefix_operators=[], qualifier=JFreeChart, selectors=[]), MemberReference(member=plot, 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=JFreeChart, sub_type=None)), name=chart)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JFreeChart, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=chart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ConstraintMatchTotalBestScoreStatisticLevel"), operandr=MemberReference(member=scoreLevelIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=writeChartToImageFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=graphFileList, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=scoreLevelIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=constraintIdToWeightSeriesMapList, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=scoreLevelIndex)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=scoreLevelIndex, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[writeGraphFiles] operator[SEP] identifier[BenchmarkReport] identifier[benchmarkReport] operator[SEP] { identifier[List] operator[<] identifier[Map] operator[<] identifier[String] , identifier[XYSeries] operator[>] operator[>] identifier[constraintIdToWeightSeriesMapList] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[BenchmarkReport] operator[SEP] identifier[CHARTED_SCORE_LEVEL_SIZE] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ConstraintMatchTotalBestScoreStatisticPoint] identifier[point] operator[:] identifier[getPointList] operator[SEP] operator[SEP] operator[SEP] { Keyword[long] identifier[timeMillisSpent] operator[=] identifier[point] operator[SEP] identifier[getTimeMillisSpent] operator[SEP] operator[SEP] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[levelValues] operator[=] identifier[ScoreUtils] operator[SEP] identifier[extractLevelDoubles] operator[SEP] identifier[point] operator[SEP] identifier[getScoreTotal] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[levelValues] operator[SEP] identifier[length] operator[&&] identifier[i] operator[<] identifier[BenchmarkReport] operator[SEP] identifier[CHARTED_SCORE_LEVEL_SIZE] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[i] operator[>=] identifier[constraintIdToWeightSeriesMapList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] { identifier[constraintIdToWeightSeriesMapList] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[LinkedHashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[Map] operator[<] identifier[String] , identifier[XYSeries] operator[>] identifier[constraintIdToWeightSeriesMap] operator[=] identifier[constraintIdToWeightSeriesMapList] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[XYSeries] identifier[weightSeries] operator[=] identifier[constraintIdToWeightSeriesMap] operator[SEP] identifier[computeIfAbsent] operator[SEP] identifier[point] operator[SEP] identifier[getConstraintId] operator[SEP] operator[SEP] , identifier[k] operator[->] Keyword[new] identifier[XYSeries] operator[SEP] identifier[point] operator[SEP] identifier[getConstraintName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[levelValues] operator[SEP] identifier[i] operator[SEP] operator[!=] operator[SEP] operator[SEP] identifier[weightSeries] operator[SEP] identifier[getItemCount] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] operator[?] literal[Float] operator[:] identifier[weightSeries] operator[SEP] identifier[getY] operator[SEP] identifier[weightSeries] operator[SEP] identifier[getItemCount] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] identifier[doubleValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[weightSeries] operator[SEP] identifier[add] operator[SEP] identifier[timeMillisSpent] , identifier[levelValues] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[long] identifier[timeMillisSpent] operator[=] identifier[subSingleBenchmarkResult] operator[SEP] identifier[getTimeMillisSpent] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[XYSeries] operator[>] identifier[constraintIdToWeightSeriesMap] operator[:] identifier[constraintIdToWeightSeriesMapList] operator[SEP] { Keyword[for] operator[SEP] identifier[Iterator] operator[<] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[XYSeries] operator[>] operator[>] identifier[it] operator[=] identifier[constraintIdToWeightSeriesMap] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[it] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[XYSeries] identifier[weightSeries] operator[=] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[weightSeries] operator[SEP] identifier[getItemCount] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[it] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[weightSeries] operator[SEP] identifier[add] operator[SEP] identifier[timeMillisSpent] , identifier[weightSeries] operator[SEP] identifier[getY] operator[SEP] identifier[weightSeries] operator[SEP] identifier[getItemCount] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] identifier[doubleValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } identifier[graphFileList] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[constraintIdToWeightSeriesMapList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[scoreLevelIndex] operator[=] Other[0] operator[SEP] identifier[scoreLevelIndex] operator[<] identifier[constraintIdToWeightSeriesMapList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[scoreLevelIndex] operator[++] operator[SEP] { identifier[XYPlot] identifier[plot] operator[=] identifier[createPlot] operator[SEP] identifier[benchmarkReport] , identifier[scoreLevelIndex] operator[SEP] operator[SEP] identifier[XYItemRenderer] identifier[renderer] operator[=] Keyword[new] identifier[XYStepRenderer] operator[SEP] operator[SEP] operator[SEP] identifier[plot] operator[SEP] identifier[setRenderer] operator[SEP] identifier[renderer] operator[SEP] operator[SEP] identifier[XYSeriesCollection] identifier[seriesCollection] operator[=] Keyword[new] identifier[XYSeriesCollection] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[XYSeries] identifier[series] operator[:] identifier[constraintIdToWeightSeriesMapList] operator[SEP] identifier[get] operator[SEP] identifier[scoreLevelIndex] operator[SEP] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { identifier[seriesCollection] operator[SEP] identifier[addSeries] operator[SEP] identifier[series] operator[SEP] operator[SEP] } identifier[plot] operator[SEP] identifier[setDataset] operator[SEP] identifier[seriesCollection] operator[SEP] operator[SEP] identifier[String] identifier[scoreLevelLabel] operator[=] identifier[subSingleBenchmarkResult] operator[SEP] identifier[getSingleBenchmarkResult] operator[SEP] operator[SEP] operator[SEP] identifier[getProblemBenchmarkResult] operator[SEP] operator[SEP] operator[SEP] identifier[findScoreLevelLabel] operator[SEP] identifier[scoreLevelIndex] operator[SEP] operator[SEP] identifier[JFreeChart] identifier[chart] operator[=] Keyword[new] identifier[JFreeChart] operator[SEP] identifier[subSingleBenchmarkResult] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[scoreLevelLabel] operator[+] literal[String] , identifier[JFreeChart] operator[SEP] identifier[DEFAULT_TITLE_FONT] , identifier[plot] , literal[boolean] operator[SEP] operator[SEP] identifier[graphFileList] operator[SEP] identifier[add] operator[SEP] identifier[writeChartToImageFile] operator[SEP] identifier[chart] , literal[String] operator[+] identifier[scoreLevelIndex] operator[SEP] operator[SEP] operator[SEP] } }