code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public synchronized void pushMetric(final MetricsRecord mr) { if (changed) { try { mr.setMetric(getName(), value); } catch (Exception e) { LOG.info("pushMetric failed for " + getName() + "\n" + StringUtils.stringifyException(e)); } } changed = false; }
class class_name[name] begin[{] method[pushMetric, return_type[void], modifier[synchronized public], parameter[mr]] begin[{] if[member[.changed]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setMetric, postfix_operators=[], prefix_operators=[], qualifier=mr, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="pushMetric failed for "), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n"), operator=+), operandr=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=stringifyException, postfix_operators=[], prefix_operators=[], qualifier=StringUtils, selectors=[], type_arguments=None), operator=+)], member=info, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] assign[member[.changed], literal[false]] end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[void] identifier[pushMetric] operator[SEP] Keyword[final] identifier[MetricsRecord] identifier[mr] operator[SEP] { Keyword[if] operator[SEP] identifier[changed] operator[SEP] { Keyword[try] { identifier[mr] operator[SEP] identifier[setMetric] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[value] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[StringUtils] operator[SEP] identifier[stringifyException] operator[SEP] identifier[e] operator[SEP] operator[SEP] operator[SEP] } } identifier[changed] operator[=] literal[boolean] operator[SEP] }
public synchronized boolean enableListener(boolean enable) { boolean success = true; if (enable && eventSource == null) { success = initEventSource(); } bEnableListener = enable; if (tc.isDebugEnabled()) { Tr.debug(tc, "enableListener() cacheName=" + this.cacheName + " enable=" + enable + " success=" + success + " ignoreValueInInvalidationEvent=" + this.ignoreValueInInvalidationEvent); } return success; }
class class_name[name] begin[{] method[enableListener, return_type[type[boolean]], modifier[synchronized public], parameter[enable]] begin[{] local_variable[type[boolean], success] if[binary_operation[member[.enable], &&, binary_operation[member[.eventSource], ==, literal[null]]]] begin[{] assign[member[.success], call[.initEventSource, parameter[]]] else begin[{] None end[}] assign[member[.bEnableListener], member[.enable]] if[call[tc.isDebugEnabled, parameter[]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["enableListener() cacheName="], +, THIS[member[None.cacheName]]], +, literal[" enable="]], +, member[.enable]], +, literal[" success="]], +, member[.success]], +, literal[" ignoreValueInInvalidationEvent="]], +, THIS[member[None.ignoreValueInInvalidationEvent]]]]] else begin[{] None end[}] return[member[.success]] end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[boolean] identifier[enableListener] operator[SEP] Keyword[boolean] identifier[enable] operator[SEP] { Keyword[boolean] identifier[success] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[enable] operator[&&] identifier[eventSource] operator[==] Other[null] operator[SEP] { identifier[success] operator[=] identifier[initEventSource] operator[SEP] operator[SEP] operator[SEP] } identifier[bEnableListener] operator[=] identifier[enable] operator[SEP] Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] Keyword[this] operator[SEP] identifier[cacheName] operator[+] literal[String] operator[+] identifier[enable] operator[+] literal[String] operator[+] identifier[success] operator[+] literal[String] operator[+] Keyword[this] operator[SEP] identifier[ignoreValueInInvalidationEvent] operator[SEP] operator[SEP] } Keyword[return] identifier[success] operator[SEP] }
public JsonObject newHar(String initialPageRef, boolean captureHeaders, boolean captureContent, boolean captureBinaryContent) { try { // Request BMP to create a new HAR for this Proxy HttpPut request = new HttpPut(requestURIBuilder() .setPath(proxyURIPath() + "/har") .build()); // Add form parameters to the request applyFormParamsToHttpRequest(request, new BasicNameValuePair("initialPageRef", initialPageRef), new BasicNameValuePair("captureHeaders", Boolean.toString(captureHeaders)), new BasicNameValuePair("captureContent", Boolean.toString(captureContent)), new BasicNameValuePair("captureBinaryContent", Boolean.toString(captureBinaryContent))); // Execute request CloseableHttpResponse response = HTTPclient.execute(request); // Parse response into JSON JsonObject previousHar = httpResponseToJsonObject(response); // Close HTTP Response response.close(); return previousHar; } catch (Exception e) { throw new BMPCUnableToCreateHarException(e); } }
class class_name[name] begin[{] method[newHar, return_type[type[JsonObject]], modifier[public], parameter[initialPageRef, captureHeaders, captureContent, captureBinaryContent]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=requestURIBuilder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=proxyURIPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/har"), operator=+)], member=setPath, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HttpPut, sub_type=None)), name=request)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=HttpPut, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=request, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="initialPageRef"), MemberReference(member=initialPageRef, 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=BasicNameValuePair, sub_type=None)), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="captureHeaders"), MethodInvocation(arguments=[MemberReference(member=captureHeaders, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Boolean, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BasicNameValuePair, sub_type=None)), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="captureContent"), MethodInvocation(arguments=[MemberReference(member=captureContent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Boolean, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BasicNameValuePair, sub_type=None)), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="captureBinaryContent"), MethodInvocation(arguments=[MemberReference(member=captureBinaryContent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Boolean, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BasicNameValuePair, sub_type=None))], member=applyFormParamsToHttpRequest, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=request, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=execute, postfix_operators=[], prefix_operators=[], qualifier=HTTPclient, selectors=[], type_arguments=None), name=response)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CloseableHttpResponse, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=response, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=httpResponseToJsonObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=previousHar)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JsonObject, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=previousHar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=BMPCUnableToCreateHarException, 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] identifier[JsonObject] identifier[newHar] operator[SEP] identifier[String] identifier[initialPageRef] , Keyword[boolean] identifier[captureHeaders] , Keyword[boolean] identifier[captureContent] , Keyword[boolean] identifier[captureBinaryContent] operator[SEP] { Keyword[try] { identifier[HttpPut] identifier[request] operator[=] Keyword[new] identifier[HttpPut] operator[SEP] identifier[requestURIBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setPath] operator[SEP] identifier[proxyURIPath] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[applyFormParamsToHttpRequest] operator[SEP] identifier[request] , Keyword[new] identifier[BasicNameValuePair] operator[SEP] literal[String] , identifier[initialPageRef] operator[SEP] , Keyword[new] identifier[BasicNameValuePair] operator[SEP] literal[String] , identifier[Boolean] operator[SEP] identifier[toString] operator[SEP] identifier[captureHeaders] operator[SEP] operator[SEP] , Keyword[new] identifier[BasicNameValuePair] operator[SEP] literal[String] , identifier[Boolean] operator[SEP] identifier[toString] operator[SEP] identifier[captureContent] operator[SEP] operator[SEP] , Keyword[new] identifier[BasicNameValuePair] operator[SEP] literal[String] , identifier[Boolean] operator[SEP] identifier[toString] operator[SEP] identifier[captureBinaryContent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[CloseableHttpResponse] identifier[response] operator[=] identifier[HTTPclient] operator[SEP] identifier[execute] operator[SEP] identifier[request] operator[SEP] operator[SEP] identifier[JsonObject] identifier[previousHar] operator[=] identifier[httpResponseToJsonObject] operator[SEP] identifier[response] operator[SEP] operator[SEP] identifier[response] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[previousHar] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[BMPCUnableToCreateHarException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
public Object invokeVisit(Object visitor, Object argument) { Assert.notNull(visitor, "The visitor to visit is required"); // Perform call back on the visitor through reflection. Method method = getMethod(visitor.getClass(), argument); if (method == null) { if (logger.isWarnEnabled()) { logger.warn("No method found by reflection for visitor class [" + visitor.getClass().getName() + "] and argument of type [" + (argument != null ? argument.getClass().getName() : "") + "]"); } return null; } try { Object[] args = null; if (argument != null) { args = new Object[] { argument }; } if (!Modifier.isPublic(method.getModifiers()) && !method.isAccessible()) { method.setAccessible(true); } return method.invoke(visitor, args); } catch (Exception ex) { ReflectionUtils.handleReflectionException(ex); throw new IllegalStateException("Should never get here"); } }
class class_name[name] begin[{] method[invokeVisit, return_type[type[Object]], modifier[public], parameter[visitor, argument]] begin[{] call[Assert.notNull, parameter[member[.visitor], literal["The visitor to visit is required"]]] local_variable[type[Method], method] if[binary_operation[member[.method], ==, literal[null]]] begin[{] if[call[logger.isWarnEnabled, parameter[]]] begin[{] call[logger.warn, parameter[binary_operation[binary_operation[binary_operation[binary_operation[literal["No method found by reflection for visitor class ["], +, call[visitor.getClass, parameter[]]], +, literal["] and argument of type ["]], +, TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=argument, 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=getClass, postfix_operators=[], prefix_operators=[], qualifier=argument, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None))], +, literal["]"]]]] else begin[{] None end[}] return[literal[null]] else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=args)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=Object, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=argument, 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=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=argument, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))), label=None)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getModifiers, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None)], member=isPublic, postfix_operators=[], prefix_operators=['!'], qualifier=Modifier, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isAccessible, postfix_operators=[], prefix_operators=['!'], qualifier=method, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setAccessible, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), label=None)])), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=visitor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=handleReflectionException, postfix_operators=[], prefix_operators=[], qualifier=ReflectionUtils, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Should never get here")], 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=ex, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] identifier[Object] identifier[invokeVisit] operator[SEP] identifier[Object] identifier[visitor] , identifier[Object] identifier[argument] operator[SEP] { identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] identifier[visitor] , literal[String] operator[SEP] operator[SEP] identifier[Method] identifier[method] operator[=] identifier[getMethod] operator[SEP] identifier[visitor] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] , identifier[argument] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[method] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isWarnEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[visitor] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] operator[SEP] identifier[argument] operator[!=] Other[null] operator[?] identifier[argument] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[:] literal[String] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] } Keyword[try] { identifier[Object] operator[SEP] operator[SEP] identifier[args] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[argument] operator[!=] Other[null] operator[SEP] { identifier[args] operator[=] Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[argument] } operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[Modifier] operator[SEP] identifier[isPublic] operator[SEP] identifier[method] operator[SEP] identifier[getModifiers] operator[SEP] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[method] operator[SEP] identifier[isAccessible] operator[SEP] operator[SEP] operator[SEP] { identifier[method] operator[SEP] identifier[setAccessible] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } Keyword[return] identifier[method] operator[SEP] identifier[invoke] operator[SEP] identifier[visitor] , identifier[args] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { identifier[ReflectionUtils] operator[SEP] identifier[handleReflectionException] operator[SEP] identifier[ex] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } }
protected void doMain(String... args) { properties = new MergeableProperties(); properties.putAll(System.getProperties()); for (String arg : args) { properties.merge(arg); } // Read event handling configuration Map<String, List<EventHandler>> eventHandlers = new LinkedHashMap<>(); MergeableProperties allProperties = properties.getPrefixed("willow-event-handler.handlers"); int i = 0; while (true) { MergeableProperties handlerProperties = allProperties.getPrefixed("[" + i++ + "]"); if (handlerProperties.isEmpty()) { break; } String handlerClassName = handlerProperties.getProperty("handler"); String eventClassName = handlerProperties.getProperty("event"); try { EventHandler eventHandler = (EventHandler) injector.getInstance(Class.forName(handlerClassName)); MergeableProperties beanProperties = handlerProperties.getPrefixed("properties"); for (String propertyName : beanProperties.stringPropertyNames()) { String propertyValue = beanProperties.getProperty(propertyName); BeanUtils.setProperty(eventHandler, propertyName, propertyValue); } List<EventHandler> eventHandlersForType = eventHandlers.get(eventClassName); if (eventHandlersForType == null) { eventHandlersForType = new ArrayList<>(); eventHandlers.put(eventClassName, eventHandlersForType); } eventHandlersForType.add(eventHandler); } catch (ClassNotFoundException | IllegalAccessException | InvocationTargetException e) { logger.log(Level.SEVERE, "Error instantiating handler", e); System.exit(1); } } if (eventHandlers .isEmpty()) { logger.info("No event handlers configured. Exiting."); System.exit(0); } Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { Main.this.stop(); } }); // Start polling events String uri = properties.getProperty("willow-event-handler.eventsUri"); try { logger.info("Initializing event poller"); eventPoller.initialize(eventHandlers, new URI(uri)); } catch (URISyntaxException e) { logger.log(Level.SEVERE, "Invalid URI: " + uri, e); System.exit(1); } }
class class_name[name] begin[{] method[doMain, return_type[void], modifier[protected], parameter[args]] begin[{] assign[member[.properties], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MergeableProperties, sub_type=None))] call[properties.putAll, parameter[call[System.getProperties, parameter[]]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=merge, postfix_operators=[], prefix_operators=[], qualifier=properties, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=arg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) local_variable[type[Map], eventHandlers] local_variable[type[MergeableProperties], allProperties] local_variable[type[int], i] while[literal[true]] begin[{] local_variable[type[MergeableProperties], handlerProperties] if[call[handlerProperties.isEmpty, parameter[]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] local_variable[type[String], handlerClassName] local_variable[type[String], eventClassName] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=handlerClassName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[], type_arguments=None)], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=injector, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=EventHandler, sub_type=None)), name=eventHandler)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=EventHandler, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="properties")], member=getPrefixed, postfix_operators=[], prefix_operators=[], qualifier=handlerProperties, selectors=[], type_arguments=None), name=beanProperties)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MergeableProperties, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=propertyName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getProperty, postfix_operators=[], prefix_operators=[], qualifier=beanProperties, selectors=[], type_arguments=None), name=propertyValue)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=eventHandler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=propertyName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=propertyValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setProperty, postfix_operators=[], prefix_operators=[], qualifier=BeanUtils, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=stringPropertyNames, postfix_operators=[], prefix_operators=[], qualifier=beanProperties, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=propertyName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=eventClassName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=eventHandlers, selectors=[], type_arguments=None), name=eventHandlersForType)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=EventHandler, sub_type=None))], dimensions=[], name=List, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=eventHandlersForType, 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=eventHandlersForType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=eventClassName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=eventHandlersForType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=eventHandlers, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=eventHandler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=eventHandlersForType, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SEVERE, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error instantiating handler"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=log, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=exit, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ClassNotFoundException', 'IllegalAccessException', 'InvocationTargetException']))], finally_block=None, label=None, resources=None) end[}] if[call[eventHandlers.isEmpty, parameter[]]] begin[{] call[logger.info, parameter[literal["No event handlers configured. Exiting."]]] call[System.exit, parameter[literal[0]]] else begin[{] None end[}] call[Runtime.getRuntime, parameter[]] local_variable[type[String], uri] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Initializing event poller")], member=info, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=eventHandlers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MemberReference(member=uri, 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=initialize, postfix_operators=[], prefix_operators=[], qualifier=eventPoller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SEVERE, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid URI: "), operandr=MemberReference(member=uri, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=log, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=exit, postfix_operators=[], prefix_operators=[], qualifier=System, 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) end[}] END[}]
Keyword[protected] Keyword[void] identifier[doMain] operator[SEP] identifier[String] operator[...] identifier[args] operator[SEP] { identifier[properties] operator[=] Keyword[new] identifier[MergeableProperties] operator[SEP] operator[SEP] operator[SEP] identifier[properties] operator[SEP] identifier[putAll] operator[SEP] identifier[System] operator[SEP] identifier[getProperties] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[arg] operator[:] identifier[args] operator[SEP] { identifier[properties] operator[SEP] identifier[merge] operator[SEP] identifier[arg] operator[SEP] operator[SEP] } identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[EventHandler] operator[>] operator[>] identifier[eventHandlers] operator[=] Keyword[new] identifier[LinkedHashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[MergeableProperties] identifier[allProperties] operator[=] identifier[properties] operator[SEP] identifier[getPrefixed] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] literal[boolean] operator[SEP] { identifier[MergeableProperties] identifier[handlerProperties] operator[=] identifier[allProperties] operator[SEP] identifier[getPrefixed] operator[SEP] literal[String] operator[+] identifier[i] operator[++] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[handlerProperties] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[break] operator[SEP] } identifier[String] identifier[handlerClassName] operator[=] identifier[handlerProperties] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[eventClassName] operator[=] identifier[handlerProperties] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[try] { identifier[EventHandler] identifier[eventHandler] operator[=] operator[SEP] identifier[EventHandler] operator[SEP] identifier[injector] operator[SEP] identifier[getInstance] operator[SEP] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[handlerClassName] operator[SEP] operator[SEP] operator[SEP] identifier[MergeableProperties] identifier[beanProperties] operator[=] identifier[handlerProperties] operator[SEP] identifier[getPrefixed] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[propertyName] operator[:] identifier[beanProperties] operator[SEP] identifier[stringPropertyNames] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[propertyValue] operator[=] identifier[beanProperties] operator[SEP] identifier[getProperty] operator[SEP] identifier[propertyName] operator[SEP] operator[SEP] identifier[BeanUtils] operator[SEP] identifier[setProperty] operator[SEP] identifier[eventHandler] , identifier[propertyName] , identifier[propertyValue] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[EventHandler] operator[>] identifier[eventHandlersForType] operator[=] identifier[eventHandlers] operator[SEP] identifier[get] operator[SEP] identifier[eventClassName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[eventHandlersForType] operator[==] Other[null] operator[SEP] { identifier[eventHandlersForType] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[eventHandlers] operator[SEP] identifier[put] operator[SEP] identifier[eventClassName] , identifier[eventHandlersForType] operator[SEP] operator[SEP] } identifier[eventHandlersForType] operator[SEP] identifier[add] operator[SEP] identifier[eventHandler] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ClassNotFoundException] operator[|] identifier[IllegalAccessException] operator[|] identifier[InvocationTargetException] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[SEVERE] , literal[String] , identifier[e] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[exit] operator[SEP] Other[1] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[eventHandlers] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[exit] operator[SEP] Other[0] operator[SEP] operator[SEP] } identifier[Runtime] operator[SEP] identifier[getRuntime] operator[SEP] operator[SEP] operator[SEP] identifier[addShutdownHook] operator[SEP] Keyword[new] identifier[Thread] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] { identifier[Main] operator[SEP] Keyword[this] operator[SEP] identifier[stop] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[String] identifier[uri] operator[=] identifier[properties] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[try] { identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[eventPoller] operator[SEP] identifier[initialize] operator[SEP] identifier[eventHandlers] , Keyword[new] identifier[URI] operator[SEP] identifier[uri] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[URISyntaxException] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[SEVERE] , literal[String] operator[+] identifier[uri] , identifier[e] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[exit] operator[SEP] Other[1] operator[SEP] operator[SEP] } }
public static boolean getBoolProperty(final MessageResources msg, final String pname, final boolean def) throws Throwable { String p = msg.getMessage(pname); if (p == null) { return def; } return Boolean.valueOf(p); }
class class_name[name] begin[{] method[getBoolProperty, return_type[type[boolean]], modifier[public static], parameter[msg, pname, def]] begin[{] local_variable[type[String], p] if[binary_operation[member[.p], ==, literal[null]]] begin[{] return[member[.def]] else begin[{] None end[}] return[call[Boolean.valueOf, parameter[member[.p]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[getBoolProperty] operator[SEP] Keyword[final] identifier[MessageResources] identifier[msg] , Keyword[final] identifier[String] identifier[pname] , Keyword[final] Keyword[boolean] identifier[def] operator[SEP] Keyword[throws] identifier[Throwable] { identifier[String] identifier[p] operator[=] identifier[msg] operator[SEP] identifier[getMessage] operator[SEP] identifier[pname] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[p] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[def] operator[SEP] } Keyword[return] identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[p] operator[SEP] operator[SEP] }
public void merge( Context context, Writer writer) throws ResourceNotFoundException, ParseErrorException, MethodInvocationException { merge(context, writer, null); }
class class_name[name] begin[{] method[merge, return_type[void], modifier[public], parameter[context, writer]] begin[{] call[.merge, parameter[member[.context], member[.writer], literal[null]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[merge] operator[SEP] identifier[Context] identifier[context] , identifier[Writer] identifier[writer] operator[SEP] Keyword[throws] identifier[ResourceNotFoundException] , identifier[ParseErrorException] , identifier[MethodInvocationException] { identifier[merge] operator[SEP] identifier[context] , identifier[writer] , Other[null] operator[SEP] operator[SEP] }
public long getInstantMillis(Object object, Chronology chrono) { Date date = (Date) object; return date.getTime(); }
class class_name[name] begin[{] method[getInstantMillis, return_type[type[long]], modifier[public], parameter[object, chrono]] begin[{] local_variable[type[Date], date] return[call[date.getTime, parameter[]]] end[}] END[}]
Keyword[public] Keyword[long] identifier[getInstantMillis] operator[SEP] identifier[Object] identifier[object] , identifier[Chronology] identifier[chrono] operator[SEP] { identifier[Date] identifier[date] operator[=] operator[SEP] identifier[Date] operator[SEP] identifier[object] operator[SEP] Keyword[return] identifier[date] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[SEP] }
public Observable<ExperimentInner> createAsync(String resourceGroupName, String workspaceName, String experimentName) { return createWithServiceResponseAsync(resourceGroupName, workspaceName, experimentName).map(new Func1<ServiceResponse<ExperimentInner>, ExperimentInner>() { @Override public ExperimentInner call(ServiceResponse<ExperimentInner> response) { return response.body(); } }); }
class class_name[name] begin[{] method[createAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, workspaceName, experimentName]] begin[{] return[call[.createWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.workspaceName], member[.experimentName]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[ExperimentInner] operator[>] identifier[createAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[workspaceName] , identifier[String] identifier[experimentName] operator[SEP] { Keyword[return] identifier[createWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[workspaceName] , identifier[experimentName] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[ExperimentInner] operator[>] , identifier[ExperimentInner] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[ExperimentInner] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[ExperimentInner] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
@Override public void onPreWindowOpen(ApplicationWindowConfigurer configurer) { configurer.setTitle(application.getName()); configurer.setImage(application.getImage()); }
class class_name[name] begin[{] method[onPreWindowOpen, return_type[void], modifier[public], parameter[configurer]] begin[{] call[configurer.setTitle, parameter[call[application.getName, parameter[]]]] call[configurer.setImage, parameter[call[application.getImage, parameter[]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onPreWindowOpen] operator[SEP] identifier[ApplicationWindowConfigurer] identifier[configurer] operator[SEP] { identifier[configurer] operator[SEP] identifier[setTitle] operator[SEP] identifier[application] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[configurer] operator[SEP] identifier[setImage] operator[SEP] identifier[application] operator[SEP] identifier[getImage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public Shape createFillableFocusRectangle(int x, int y, int w, int h) { final int left = x; final int top = y; final int right = x + w; final int bottom = y + h; path.reset(); path.moveTo(left, top); path.lineTo(left, bottom); path.lineTo(right, bottom); path.lineTo(right, top); final float offset = 1.4f; final float left2 = left + offset; final float top2 = top + offset; final float right2 = right - offset; final float bottom2 = bottom - offset; // TODO These two lines were curveTo in Nimbus. Perhaps we should // revisit this? path.lineTo(right2, top); path.lineTo(right2, bottom2); path.lineTo(left2, bottom2); path.lineTo(left2, top2); path.lineTo(right2, top2); path.lineTo(right2, top); path.closePath(); return path; }
class class_name[name] begin[{] method[createFillableFocusRectangle, return_type[type[Shape]], modifier[public], parameter[x, y, w, h]] begin[{] local_variable[type[int], left] local_variable[type[int], top] local_variable[type[int], right] local_variable[type[int], bottom] call[path.reset, parameter[]] call[path.moveTo, parameter[member[.left], member[.top]]] call[path.lineTo, parameter[member[.left], member[.bottom]]] call[path.lineTo, parameter[member[.right], member[.bottom]]] call[path.lineTo, parameter[member[.right], member[.top]]] local_variable[type[float], offset] local_variable[type[float], left2] local_variable[type[float], top2] local_variable[type[float], right2] local_variable[type[float], bottom2] call[path.lineTo, parameter[member[.right2], member[.top]]] call[path.lineTo, parameter[member[.right2], member[.bottom2]]] call[path.lineTo, parameter[member[.left2], member[.bottom2]]] call[path.lineTo, parameter[member[.left2], member[.top2]]] call[path.lineTo, parameter[member[.right2], member[.top2]]] call[path.lineTo, parameter[member[.right2], member[.top]]] call[path.closePath, parameter[]] return[member[.path]] end[}] END[}]
Keyword[public] identifier[Shape] identifier[createFillableFocusRectangle] operator[SEP] Keyword[int] identifier[x] , Keyword[int] identifier[y] , Keyword[int] identifier[w] , Keyword[int] identifier[h] operator[SEP] { Keyword[final] Keyword[int] identifier[left] operator[=] identifier[x] operator[SEP] Keyword[final] Keyword[int] identifier[top] operator[=] identifier[y] operator[SEP] Keyword[final] Keyword[int] identifier[right] operator[=] identifier[x] operator[+] identifier[w] operator[SEP] Keyword[final] Keyword[int] identifier[bottom] operator[=] identifier[y] operator[+] identifier[h] operator[SEP] identifier[path] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] identifier[path] operator[SEP] identifier[moveTo] operator[SEP] identifier[left] , identifier[top] operator[SEP] operator[SEP] identifier[path] operator[SEP] identifier[lineTo] operator[SEP] identifier[left] , identifier[bottom] operator[SEP] operator[SEP] identifier[path] operator[SEP] identifier[lineTo] operator[SEP] identifier[right] , identifier[bottom] operator[SEP] operator[SEP] identifier[path] operator[SEP] identifier[lineTo] operator[SEP] identifier[right] , identifier[top] operator[SEP] operator[SEP] Keyword[final] Keyword[float] identifier[offset] operator[=] literal[Float] operator[SEP] Keyword[final] Keyword[float] identifier[left2] operator[=] identifier[left] operator[+] identifier[offset] operator[SEP] Keyword[final] Keyword[float] identifier[top2] operator[=] identifier[top] operator[+] identifier[offset] operator[SEP] Keyword[final] Keyword[float] identifier[right2] operator[=] identifier[right] operator[-] identifier[offset] operator[SEP] Keyword[final] Keyword[float] identifier[bottom2] operator[=] identifier[bottom] operator[-] identifier[offset] operator[SEP] identifier[path] operator[SEP] identifier[lineTo] operator[SEP] identifier[right2] , identifier[top] operator[SEP] operator[SEP] identifier[path] operator[SEP] identifier[lineTo] operator[SEP] identifier[right2] , identifier[bottom2] operator[SEP] operator[SEP] identifier[path] operator[SEP] identifier[lineTo] operator[SEP] identifier[left2] , identifier[bottom2] operator[SEP] operator[SEP] identifier[path] operator[SEP] identifier[lineTo] operator[SEP] identifier[left2] , identifier[top2] operator[SEP] operator[SEP] identifier[path] operator[SEP] identifier[lineTo] operator[SEP] identifier[right2] , identifier[top2] operator[SEP] operator[SEP] identifier[path] operator[SEP] identifier[lineTo] operator[SEP] identifier[right2] , identifier[top] operator[SEP] operator[SEP] identifier[path] operator[SEP] identifier[closePath] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[path] operator[SEP] }
void addDimensionsToNetcdfFile(NetcdfFile ncfile, Group g) { if (dontUseVertical) { return; } int nlevs = levels.size(); ncfile.addDimension(g, new Dimension(verticalName, nlevs, true)); }
class class_name[name] begin[{] method[addDimensionsToNetcdfFile, return_type[void], modifier[default], parameter[ncfile, g]] begin[{] if[member[.dontUseVertical]] begin[{] return[None] else begin[{] None end[}] local_variable[type[int], nlevs] call[ncfile.addDimension, parameter[member[.g], ClassCreator(arguments=[MemberReference(member=verticalName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=nlevs, 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=Dimension, sub_type=None))]] end[}] END[}]
Keyword[void] identifier[addDimensionsToNetcdfFile] operator[SEP] identifier[NetcdfFile] identifier[ncfile] , identifier[Group] identifier[g] operator[SEP] { Keyword[if] operator[SEP] identifier[dontUseVertical] operator[SEP] { Keyword[return] operator[SEP] } Keyword[int] identifier[nlevs] operator[=] identifier[levels] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[ncfile] operator[SEP] identifier[addDimension] operator[SEP] identifier[g] , Keyword[new] identifier[Dimension] operator[SEP] identifier[verticalName] , identifier[nlevs] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] }
public AgentProperties findParametersFromUrl( String url, Logger logger ) { logger.info( "User data are being retrieved from URL: " + url ); AgentProperties result = null; try { URI uri = UriUtils.urlToUri( url ); Properties props = new Properties(); InputStream in = null; try { in = uri.toURL().openStream(); props.load( in ); } finally { Utils.closeQuietly( in ); } result = AgentProperties.readIaasProperties( props ); } catch( Exception e ) { logger.fine( "Agent parameters could not be read from " + url ); result = null; } return result; }
class class_name[name] begin[{] method[findParametersFromUrl, return_type[type[AgentProperties]], modifier[public], parameter[url, logger]] begin[{] call[logger.info, parameter[binary_operation[literal["User data are being retrieved from URL: "], +, member[.url]]]] local_variable[type[AgentProperties], result] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=urlToUri, postfix_operators=[], prefix_operators=[], qualifier=UriUtils, selectors=[], type_arguments=None), name=uri)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=URI, 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=Properties, sub_type=None)), name=props)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Properties, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=in)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=toURL, postfix_operators=[], prefix_operators=[], qualifier=uri, selectors=[MethodInvocation(arguments=[], member=openStream, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=load, postfix_operators=[], prefix_operators=[], qualifier=props, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=closeQuietly, postfix_operators=[], prefix_operators=[], qualifier=Utils, selectors=[], type_arguments=None), label=None)], label=None, resources=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=props, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readIaasProperties, postfix_operators=[], prefix_operators=[], qualifier=AgentProperties, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Agent parameters could not be read from "), operandr=MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=fine, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) return[member[.result]] end[}] END[}]
Keyword[public] identifier[AgentProperties] identifier[findParametersFromUrl] operator[SEP] identifier[String] identifier[url] , identifier[Logger] identifier[logger] operator[SEP] { identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[url] operator[SEP] operator[SEP] identifier[AgentProperties] identifier[result] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[URI] identifier[uri] operator[=] identifier[UriUtils] operator[SEP] identifier[urlToUri] operator[SEP] identifier[url] operator[SEP] operator[SEP] identifier[Properties] identifier[props] operator[=] Keyword[new] identifier[Properties] operator[SEP] operator[SEP] operator[SEP] identifier[InputStream] identifier[in] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[in] operator[=] identifier[uri] operator[SEP] identifier[toURL] operator[SEP] operator[SEP] operator[SEP] identifier[openStream] operator[SEP] operator[SEP] operator[SEP] identifier[props] operator[SEP] identifier[load] operator[SEP] identifier[in] operator[SEP] operator[SEP] } Keyword[finally] { identifier[Utils] operator[SEP] identifier[closeQuietly] operator[SEP] identifier[in] operator[SEP] operator[SEP] } identifier[result] operator[=] identifier[AgentProperties] operator[SEP] identifier[readIaasProperties] operator[SEP] identifier[props] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[fine] operator[SEP] literal[String] operator[+] identifier[url] operator[SEP] operator[SEP] identifier[result] operator[=] Other[null] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
static public Value intValue (String name, final int currentValue, final String description) { return new DefaultValue(name, String.valueOf(currentValue)) { public void showDialog () { JSpinner spinner = new JSpinner(new SpinnerNumberModel(currentValue, Short.MIN_VALUE, Short.MAX_VALUE, 1)); if (showValueDialog(spinner, description)) value = String.valueOf(spinner.getValue()); } public Object getObject () { return Integer.valueOf(value); } }; }
class class_name[name] begin[{] method[intValue, return_type[type[Value]], modifier[public static], parameter[name, currentValue, description]] begin[{] return[ClassCreator(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=currentValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], body=[MethodDeclaration(annotations=[], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=currentValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=MIN_VALUE, postfix_operators=[], prefix_operators=[], qualifier=Short, selectors=[]), MemberReference(member=MAX_VALUE, postfix_operators=[], prefix_operators=[], qualifier=Short, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SpinnerNumberModel, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JSpinner, sub_type=None)), name=spinner)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JSpinner, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=spinner, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=description, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=showValueDialog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=spinner, selectors=[], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)), label=None))], documentation=None, modifiers={'public'}, name=showDialog, parameters=[], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[], body=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=getObject, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DefaultValue, sub_type=None))] end[}] END[}]
Keyword[static] Keyword[public] identifier[Value] identifier[intValue] operator[SEP] identifier[String] identifier[name] , Keyword[final] Keyword[int] identifier[currentValue] , Keyword[final] identifier[String] identifier[description] operator[SEP] { Keyword[return] Keyword[new] identifier[DefaultValue] operator[SEP] identifier[name] , identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[currentValue] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[showDialog] operator[SEP] operator[SEP] { identifier[JSpinner] identifier[spinner] operator[=] Keyword[new] identifier[JSpinner] operator[SEP] Keyword[new] identifier[SpinnerNumberModel] operator[SEP] identifier[currentValue] , identifier[Short] operator[SEP] identifier[MIN_VALUE] , identifier[Short] operator[SEP] identifier[MAX_VALUE] , Other[1] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[showValueDialog] operator[SEP] identifier[spinner] , identifier[description] operator[SEP] operator[SEP] identifier[value] operator[=] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[spinner] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[public] identifier[Object] identifier[getObject] operator[SEP] operator[SEP] { Keyword[return] identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[value] operator[SEP] operator[SEP] } } operator[SEP] }
public void marshall(LoadBalancerTlsCertificate loadBalancerTlsCertificate, ProtocolMarshaller protocolMarshaller) { if (loadBalancerTlsCertificate == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(loadBalancerTlsCertificate.getName(), NAME_BINDING); protocolMarshaller.marshall(loadBalancerTlsCertificate.getArn(), ARN_BINDING); protocolMarshaller.marshall(loadBalancerTlsCertificate.getSupportCode(), SUPPORTCODE_BINDING); protocolMarshaller.marshall(loadBalancerTlsCertificate.getCreatedAt(), CREATEDAT_BINDING); protocolMarshaller.marshall(loadBalancerTlsCertificate.getLocation(), LOCATION_BINDING); protocolMarshaller.marshall(loadBalancerTlsCertificate.getResourceType(), RESOURCETYPE_BINDING); protocolMarshaller.marshall(loadBalancerTlsCertificate.getTags(), TAGS_BINDING); protocolMarshaller.marshall(loadBalancerTlsCertificate.getLoadBalancerName(), LOADBALANCERNAME_BINDING); protocolMarshaller.marshall(loadBalancerTlsCertificate.getIsAttached(), ISATTACHED_BINDING); protocolMarshaller.marshall(loadBalancerTlsCertificate.getStatus(), STATUS_BINDING); protocolMarshaller.marshall(loadBalancerTlsCertificate.getDomainName(), DOMAINNAME_BINDING); protocolMarshaller.marshall(loadBalancerTlsCertificate.getDomainValidationRecords(), DOMAINVALIDATIONRECORDS_BINDING); protocolMarshaller.marshall(loadBalancerTlsCertificate.getFailureReason(), FAILUREREASON_BINDING); protocolMarshaller.marshall(loadBalancerTlsCertificate.getIssuedAt(), ISSUEDAT_BINDING); protocolMarshaller.marshall(loadBalancerTlsCertificate.getIssuer(), ISSUER_BINDING); protocolMarshaller.marshall(loadBalancerTlsCertificate.getKeyAlgorithm(), KEYALGORITHM_BINDING); protocolMarshaller.marshall(loadBalancerTlsCertificate.getNotAfter(), NOTAFTER_BINDING); protocolMarshaller.marshall(loadBalancerTlsCertificate.getNotBefore(), NOTBEFORE_BINDING); protocolMarshaller.marshall(loadBalancerTlsCertificate.getRenewalSummary(), RENEWALSUMMARY_BINDING); protocolMarshaller.marshall(loadBalancerTlsCertificate.getRevocationReason(), REVOCATIONREASON_BINDING); protocolMarshaller.marshall(loadBalancerTlsCertificate.getRevokedAt(), REVOKEDAT_BINDING); protocolMarshaller.marshall(loadBalancerTlsCertificate.getSerial(), SERIAL_BINDING); protocolMarshaller.marshall(loadBalancerTlsCertificate.getSignatureAlgorithm(), SIGNATUREALGORITHM_BINDING); protocolMarshaller.marshall(loadBalancerTlsCertificate.getSubject(), SUBJECT_BINDING); protocolMarshaller.marshall(loadBalancerTlsCertificate.getSubjectAlternativeNames(), SUBJECTALTERNATIVENAMES_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[loadBalancerTlsCertificate, protocolMarshaller]] begin[{] if[binary_operation[member[.loadBalancerTlsCertificate], ==, 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=getName, postfix_operators=[], prefix_operators=[], qualifier=loadBalancerTlsCertificate, selectors=[], type_arguments=None), MemberReference(member=NAME_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=getArn, postfix_operators=[], prefix_operators=[], qualifier=loadBalancerTlsCertificate, selectors=[], type_arguments=None), MemberReference(member=ARN_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=getSupportCode, postfix_operators=[], prefix_operators=[], qualifier=loadBalancerTlsCertificate, selectors=[], type_arguments=None), MemberReference(member=SUPPORTCODE_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=getCreatedAt, postfix_operators=[], prefix_operators=[], qualifier=loadBalancerTlsCertificate, selectors=[], type_arguments=None), MemberReference(member=CREATEDAT_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=getLocation, postfix_operators=[], prefix_operators=[], qualifier=loadBalancerTlsCertificate, selectors=[], type_arguments=None), MemberReference(member=LOCATION_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=getResourceType, postfix_operators=[], prefix_operators=[], qualifier=loadBalancerTlsCertificate, selectors=[], type_arguments=None), MemberReference(member=RESOURCETYPE_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=getTags, postfix_operators=[], prefix_operators=[], qualifier=loadBalancerTlsCertificate, selectors=[], type_arguments=None), MemberReference(member=TAGS_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=getLoadBalancerName, postfix_operators=[], prefix_operators=[], qualifier=loadBalancerTlsCertificate, selectors=[], type_arguments=None), MemberReference(member=LOADBALANCERNAME_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=getIsAttached, postfix_operators=[], prefix_operators=[], qualifier=loadBalancerTlsCertificate, selectors=[], type_arguments=None), MemberReference(member=ISATTACHED_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=getStatus, postfix_operators=[], prefix_operators=[], qualifier=loadBalancerTlsCertificate, selectors=[], type_arguments=None), MemberReference(member=STATUS_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=getDomainName, postfix_operators=[], prefix_operators=[], qualifier=loadBalancerTlsCertificate, selectors=[], type_arguments=None), MemberReference(member=DOMAINNAME_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=getDomainValidationRecords, postfix_operators=[], prefix_operators=[], qualifier=loadBalancerTlsCertificate, selectors=[], type_arguments=None), MemberReference(member=DOMAINVALIDATIONRECORDS_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=getFailureReason, postfix_operators=[], prefix_operators=[], qualifier=loadBalancerTlsCertificate, selectors=[], type_arguments=None), MemberReference(member=FAILUREREASON_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=getIssuedAt, postfix_operators=[], prefix_operators=[], qualifier=loadBalancerTlsCertificate, selectors=[], type_arguments=None), MemberReference(member=ISSUEDAT_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=getIssuer, postfix_operators=[], prefix_operators=[], qualifier=loadBalancerTlsCertificate, selectors=[], type_arguments=None), MemberReference(member=ISSUER_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=getKeyAlgorithm, postfix_operators=[], prefix_operators=[], qualifier=loadBalancerTlsCertificate, selectors=[], type_arguments=None), MemberReference(member=KEYALGORITHM_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=getNotAfter, postfix_operators=[], prefix_operators=[], qualifier=loadBalancerTlsCertificate, selectors=[], type_arguments=None), MemberReference(member=NOTAFTER_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=getNotBefore, postfix_operators=[], prefix_operators=[], qualifier=loadBalancerTlsCertificate, selectors=[], type_arguments=None), MemberReference(member=NOTBEFORE_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=getRenewalSummary, postfix_operators=[], prefix_operators=[], qualifier=loadBalancerTlsCertificate, selectors=[], type_arguments=None), MemberReference(member=RENEWALSUMMARY_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=getRevocationReason, postfix_operators=[], prefix_operators=[], qualifier=loadBalancerTlsCertificate, selectors=[], type_arguments=None), MemberReference(member=REVOCATIONREASON_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=getRevokedAt, postfix_operators=[], prefix_operators=[], qualifier=loadBalancerTlsCertificate, selectors=[], type_arguments=None), MemberReference(member=REVOKEDAT_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=getSerial, postfix_operators=[], prefix_operators=[], qualifier=loadBalancerTlsCertificate, selectors=[], type_arguments=None), MemberReference(member=SERIAL_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=getSignatureAlgorithm, postfix_operators=[], prefix_operators=[], qualifier=loadBalancerTlsCertificate, selectors=[], type_arguments=None), MemberReference(member=SIGNATUREALGORITHM_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=getSubject, postfix_operators=[], prefix_operators=[], qualifier=loadBalancerTlsCertificate, selectors=[], type_arguments=None), MemberReference(member=SUBJECT_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=getSubjectAlternativeNames, postfix_operators=[], prefix_operators=[], qualifier=loadBalancerTlsCertificate, selectors=[], type_arguments=None), MemberReference(member=SUBJECTALTERNATIVENAMES_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[LoadBalancerTlsCertificate] identifier[loadBalancerTlsCertificate] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[loadBalancerTlsCertificate] 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[loadBalancerTlsCertificate] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[NAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[loadBalancerTlsCertificate] operator[SEP] identifier[getArn] operator[SEP] operator[SEP] , identifier[ARN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[loadBalancerTlsCertificate] operator[SEP] identifier[getSupportCode] operator[SEP] operator[SEP] , identifier[SUPPORTCODE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[loadBalancerTlsCertificate] operator[SEP] identifier[getCreatedAt] operator[SEP] operator[SEP] , identifier[CREATEDAT_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[loadBalancerTlsCertificate] operator[SEP] identifier[getLocation] operator[SEP] operator[SEP] , identifier[LOCATION_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[loadBalancerTlsCertificate] operator[SEP] identifier[getResourceType] operator[SEP] operator[SEP] , identifier[RESOURCETYPE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[loadBalancerTlsCertificate] operator[SEP] identifier[getTags] operator[SEP] operator[SEP] , identifier[TAGS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[loadBalancerTlsCertificate] operator[SEP] identifier[getLoadBalancerName] operator[SEP] operator[SEP] , identifier[LOADBALANCERNAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[loadBalancerTlsCertificate] operator[SEP] identifier[getIsAttached] operator[SEP] operator[SEP] , identifier[ISATTACHED_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[loadBalancerTlsCertificate] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] , identifier[STATUS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[loadBalancerTlsCertificate] operator[SEP] identifier[getDomainName] operator[SEP] operator[SEP] , identifier[DOMAINNAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[loadBalancerTlsCertificate] operator[SEP] identifier[getDomainValidationRecords] operator[SEP] operator[SEP] , identifier[DOMAINVALIDATIONRECORDS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[loadBalancerTlsCertificate] operator[SEP] identifier[getFailureReason] operator[SEP] operator[SEP] , identifier[FAILUREREASON_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[loadBalancerTlsCertificate] operator[SEP] identifier[getIssuedAt] operator[SEP] operator[SEP] , identifier[ISSUEDAT_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[loadBalancerTlsCertificate] operator[SEP] identifier[getIssuer] operator[SEP] operator[SEP] , identifier[ISSUER_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[loadBalancerTlsCertificate] operator[SEP] identifier[getKeyAlgorithm] operator[SEP] operator[SEP] , identifier[KEYALGORITHM_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[loadBalancerTlsCertificate] operator[SEP] identifier[getNotAfter] operator[SEP] operator[SEP] , identifier[NOTAFTER_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[loadBalancerTlsCertificate] operator[SEP] identifier[getNotBefore] operator[SEP] operator[SEP] , identifier[NOTBEFORE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[loadBalancerTlsCertificate] operator[SEP] identifier[getRenewalSummary] operator[SEP] operator[SEP] , identifier[RENEWALSUMMARY_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[loadBalancerTlsCertificate] operator[SEP] identifier[getRevocationReason] operator[SEP] operator[SEP] , identifier[REVOCATIONREASON_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[loadBalancerTlsCertificate] operator[SEP] identifier[getRevokedAt] operator[SEP] operator[SEP] , identifier[REVOKEDAT_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[loadBalancerTlsCertificate] operator[SEP] identifier[getSerial] operator[SEP] operator[SEP] , identifier[SERIAL_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[loadBalancerTlsCertificate] operator[SEP] identifier[getSignatureAlgorithm] operator[SEP] operator[SEP] , identifier[SIGNATUREALGORITHM_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[loadBalancerTlsCertificate] operator[SEP] identifier[getSubject] operator[SEP] operator[SEP] , identifier[SUBJECT_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[loadBalancerTlsCertificate] operator[SEP] identifier[getSubjectAlternativeNames] operator[SEP] operator[SEP] , identifier[SUBJECTALTERNATIVENAMES_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[] hydrate( final Tuple resultset, final Serializable id, final Object object, final Loadable rootLoadable, //We probably don't need suffixedColumns, use column names instead //final String[][] suffixedPropertyColumns, final boolean allProperties, final SharedSessionContractImplementor session) throws HibernateException { if ( log.isTraceEnabled() ) { log.trace( "Hydrating entity: " + MessageHelper.infoString( this, id, getFactory() ) ); } final OgmEntityPersister rootPersister = (OgmEntityPersister) rootLoadable; final boolean hasDeferred = rootPersister.hasSequentialSelect(); boolean sequentialSelectEmpty = false; if ( hasDeferred ) { //note: today we don't have sequential select in OGM //check AbstractEntityPersister#hydrate for the detail } final String[] propNames = getPropertyNames(); final Type[] types = getPropertyTypes(); final Object[] values = new Object[types.length]; final boolean[] laziness = getPropertyLaziness(); final String[] propSubclassNames = getSubclassPropertySubclassNameClosure(); final boolean[] propertySelectable = getPropertySelectable(); for ( int i = 0; i < types.length; i++ ) { values[i] = hydrateValue( resultset, session, object, i, propertySelectable, allProperties, laziness, hasDeferred, rootPersister, propNames, propSubclassNames, sequentialSelectEmpty ); } return values; }
class class_name[name] begin[{] method[hydrate, return_type[type[Object]], modifier[public], parameter[resultset, id, object, rootLoadable, allProperties, session]] begin[{] if[call[log.isTraceEnabled, parameter[]]] begin[{] call[log.trace, parameter[binary_operation[literal["Hydrating entity: "], +, call[MessageHelper.infoString, parameter[THIS[], member[.id], call[.getFactory, parameter[]]]]]]] else begin[{] None end[}] local_variable[type[OgmEntityPersister], rootPersister] local_variable[type[boolean], hasDeferred] local_variable[type[boolean], sequentialSelectEmpty] if[member[.hasDeferred]] begin[{] else begin[{] None end[}] local_variable[type[String], propNames] local_variable[type[Type], types] local_variable[type[Object], values] local_variable[type[boolean], laziness] local_variable[type[String], propSubclassNames] local_variable[type[boolean], propertySelectable] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[MemberReference(member=resultset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=propertySelectable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=allProperties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=laziness, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=hasDeferred, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rootPersister, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=propNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=propSubclassNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sequentialSelectEmpty, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=hydrateValue, 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=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=types, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.values]] end[}] END[}]
Keyword[public] identifier[Object] operator[SEP] operator[SEP] identifier[hydrate] operator[SEP] Keyword[final] identifier[Tuple] identifier[resultset] , Keyword[final] identifier[Serializable] identifier[id] , Keyword[final] identifier[Object] identifier[object] , Keyword[final] identifier[Loadable] identifier[rootLoadable] , Keyword[final] Keyword[boolean] identifier[allProperties] , Keyword[final] identifier[SharedSessionContractImplementor] identifier[session] operator[SEP] Keyword[throws] identifier[HibernateException] { Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isTraceEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[trace] operator[SEP] literal[String] operator[+] identifier[MessageHelper] operator[SEP] identifier[infoString] operator[SEP] Keyword[this] , identifier[id] , identifier[getFactory] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[OgmEntityPersister] identifier[rootPersister] operator[=] operator[SEP] identifier[OgmEntityPersister] operator[SEP] identifier[rootLoadable] operator[SEP] Keyword[final] Keyword[boolean] identifier[hasDeferred] operator[=] identifier[rootPersister] operator[SEP] identifier[hasSequentialSelect] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[sequentialSelectEmpty] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[hasDeferred] operator[SEP] { } Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[propNames] operator[=] identifier[getPropertyNames] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Type] operator[SEP] operator[SEP] identifier[types] operator[=] identifier[getPropertyTypes] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Object] operator[SEP] operator[SEP] identifier[values] operator[=] Keyword[new] identifier[Object] operator[SEP] identifier[types] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[final] Keyword[boolean] operator[SEP] operator[SEP] identifier[laziness] operator[=] identifier[getPropertyLaziness] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[propSubclassNames] operator[=] identifier[getSubclassPropertySubclassNameClosure] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[boolean] operator[SEP] operator[SEP] identifier[propertySelectable] operator[=] identifier[getPropertySelectable] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[types] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[values] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[hydrateValue] operator[SEP] identifier[resultset] , identifier[session] , identifier[object] , identifier[i] , identifier[propertySelectable] , identifier[allProperties] , identifier[laziness] , identifier[hasDeferred] , identifier[rootPersister] , identifier[propNames] , identifier[propSubclassNames] , identifier[sequentialSelectEmpty] operator[SEP] operator[SEP] } Keyword[return] identifier[values] operator[SEP] }
public static boolean recursiveDelete(VirtualFile root) { boolean ok = true; if (root.isDirectory()) { final List<VirtualFile> files = root.getChildren(); for (VirtualFile file : files) { ok &= recursiveDelete(file); } return ok && (root.delete() || !root.exists()); } else { ok &= root.delete() || !root.exists(); } return ok; }
class class_name[name] begin[{] method[recursiveDelete, return_type[type[boolean]], modifier[public static], parameter[root]] begin[{] local_variable[type[boolean], ok] if[call[root.isDirectory, parameter[]]] begin[{] local_variable[type[List], files] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=ok, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=&=, value=MethodInvocation(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recursiveDelete, 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=file)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=VirtualFile, sub_type=None))), label=None) return[binary_operation[member[.ok], &&, binary_operation[call[root.delete, parameter[]], ||, call[root.exists, parameter[]]]]] else begin[{] assign[member[.ok], binary_operation[call[root.delete, parameter[]], ||, call[root.exists, parameter[]]]] end[}] return[member[.ok]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[recursiveDelete] operator[SEP] identifier[VirtualFile] identifier[root] operator[SEP] { Keyword[boolean] identifier[ok] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[root] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[List] operator[<] identifier[VirtualFile] operator[>] identifier[files] operator[=] identifier[root] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[VirtualFile] identifier[file] operator[:] identifier[files] operator[SEP] { identifier[ok] operator[&=] identifier[recursiveDelete] operator[SEP] identifier[file] operator[SEP] operator[SEP] } Keyword[return] identifier[ok] operator[&&] operator[SEP] identifier[root] operator[SEP] identifier[delete] operator[SEP] operator[SEP] operator[||] operator[!] identifier[root] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[ok] operator[&=] identifier[root] operator[SEP] identifier[delete] operator[SEP] operator[SEP] operator[||] operator[!] identifier[root] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[ok] operator[SEP] }
public void transform(DataPipe cr) { Map<String, String> map = cr.getDataMap(); for (String key : map.keySet()) { String value = map.get(key); if (value.equals("#{customplaceholder}")) { // Generate a random number int ran = rand.nextInt(); map.put(key, String.valueOf(ran)); } else if (value.equals("#{divideBy2}")) { String i = map.get("var_out_V3"); String result = String.valueOf(Integer.valueOf(i) / 2); map.put(key, result); } } }
class class_name[name] begin[{] method[transform, return_type[void], modifier[public], parameter[cr]] begin[{] local_variable[type[Map], map] 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=map, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="#{customplaceholder}")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="#{divideBy2}")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="var_out_V3")], member=get, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), name=i)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=/)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None), name=result)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=nextInt, postfix_operators=[], prefix_operators=[], qualifier=rand, selectors=[], type_arguments=None), name=ran)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=ran, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), 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) end[}] END[}]
Keyword[public] Keyword[void] identifier[transform] operator[SEP] identifier[DataPipe] identifier[cr] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[map] operator[=] identifier[cr] operator[SEP] identifier[getDataMap] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[key] operator[:] identifier[map] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[value] operator[=] identifier[map] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[int] identifier[ran] operator[=] identifier[rand] operator[SEP] identifier[nextInt] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[ran] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[value] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[String] identifier[i] operator[=] identifier[map] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[result] operator[=] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[i] operator[SEP] operator[/] Other[2] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[result] operator[SEP] operator[SEP] } } }
public static List<CompiledAutomaton> createAutomata(String prefix, String regexp, Map<String, Automaton> automatonMap) throws IOException { List<CompiledAutomaton> list = new ArrayList<>(); Automaton automatonRegexp = null; if (regexp != null) { RegExp re = new RegExp(prefix + MtasToken.DELIMITER + regexp + "\u0000*"); automatonRegexp = re.toAutomaton(); } int step = 500; List<String> keyList = new ArrayList<>(automatonMap.keySet()); for (int i = 0; i < keyList.size(); i += step) { int localStep = step; boolean success = false; CompiledAutomaton compiledAutomaton = null; while (!success) { success = true; int next = Math.min(keyList.size(), i + localStep); List<Automaton> listAutomaton = new ArrayList<>(); for (int j = i; j < next; j++) { listAutomaton.add(automatonMap.get(keyList.get(j))); } Automaton automatonList = Operations.union(listAutomaton); Automaton automaton; if (automatonRegexp != null) { automaton = Operations.intersection(automatonList, automatonRegexp); } else { automaton = automatonList; } try { compiledAutomaton = new CompiledAutomaton(automaton); } catch (TooComplexToDeterminizeException e) { log.debug(e); success = false; if (localStep > 1) { localStep /= 2; } else { throw new IOException("TooComplexToDeterminizeException"); } } } list.add(compiledAutomaton); } return list; }
class class_name[name] begin[{] method[createAutomata, return_type[type[List]], modifier[public static], parameter[prefix, regexp, automatonMap]] begin[{] local_variable[type[List], list] local_variable[type[Automaton], automatonRegexp] if[binary_operation[member[.regexp], !=, literal[null]]] begin[{] local_variable[type[RegExp], re] assign[member[.automatonRegexp], call[re.toAutomaton, parameter[]]] else begin[{] None end[}] local_variable[type[int], step] local_variable[type[List], keyList] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=step, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=localStep)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=success)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=compiledAutomaton)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CompiledAutomaton, sub_type=None)), WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=success, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=keyList, selectors=[], type_arguments=None), BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=localStep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=min, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), name=next)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None)), name=listAutomaton)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Automaton, sub_type=None))], dimensions=[], name=List, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=keyList, selectors=[], type_arguments=None)], member=get, postfix_operators=[], prefix_operators=[], qualifier=automatonMap, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=listAutomaton, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=listAutomaton, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=union, postfix_operators=[], prefix_operators=[], qualifier=Operations, selectors=[], type_arguments=None), name=automatonList)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Automaton, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=automaton)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Automaton, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=automatonRegexp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=automaton, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=automatonList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=automaton, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=automatonList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=automatonRegexp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=intersection, postfix_operators=[], prefix_operators=[], qualifier=Operations, selectors=[], type_arguments=None)), label=None)])), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=compiledAutomaton, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=automaton, 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=CompiledAutomaton, sub_type=None))), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=success, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=localStep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>), else_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TooComplexToDeterminizeException")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=localStep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=/=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['TooComplexToDeterminizeException']))], finally_block=None, label=None, resources=None)]), condition=MemberReference(member=success, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=compiledAutomaton, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=keyList, 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=[Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=step, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), label=None) return[member[.list]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[CompiledAutomaton] operator[>] identifier[createAutomata] operator[SEP] identifier[String] identifier[prefix] , identifier[String] identifier[regexp] , identifier[Map] operator[<] identifier[String] , identifier[Automaton] operator[>] identifier[automatonMap] operator[SEP] Keyword[throws] identifier[IOException] { identifier[List] operator[<] identifier[CompiledAutomaton] operator[>] identifier[list] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Automaton] identifier[automatonRegexp] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[regexp] operator[!=] Other[null] operator[SEP] { identifier[RegExp] identifier[re] operator[=] Keyword[new] identifier[RegExp] operator[SEP] identifier[prefix] operator[+] identifier[MtasToken] operator[SEP] identifier[DELIMITER] operator[+] identifier[regexp] operator[+] literal[String] operator[SEP] operator[SEP] identifier[automatonRegexp] operator[=] identifier[re] operator[SEP] identifier[toAutomaton] operator[SEP] operator[SEP] operator[SEP] } Keyword[int] identifier[step] operator[=] Other[500] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[keyList] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[automatonMap] operator[SEP] identifier[keySet] 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[keyList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[+=] identifier[step] operator[SEP] { Keyword[int] identifier[localStep] operator[=] identifier[step] operator[SEP] Keyword[boolean] identifier[success] operator[=] literal[boolean] operator[SEP] identifier[CompiledAutomaton] identifier[compiledAutomaton] operator[=] Other[null] operator[SEP] Keyword[while] operator[SEP] operator[!] identifier[success] operator[SEP] { identifier[success] operator[=] literal[boolean] operator[SEP] Keyword[int] identifier[next] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[keyList] operator[SEP] identifier[size] operator[SEP] operator[SEP] , identifier[i] operator[+] identifier[localStep] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Automaton] operator[>] identifier[listAutomaton] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] identifier[i] operator[SEP] identifier[j] operator[<] identifier[next] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[listAutomaton] operator[SEP] identifier[add] operator[SEP] identifier[automatonMap] operator[SEP] identifier[get] operator[SEP] identifier[keyList] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[Automaton] identifier[automatonList] operator[=] identifier[Operations] operator[SEP] identifier[union] operator[SEP] identifier[listAutomaton] operator[SEP] operator[SEP] identifier[Automaton] identifier[automaton] operator[SEP] Keyword[if] operator[SEP] identifier[automatonRegexp] operator[!=] Other[null] operator[SEP] { identifier[automaton] operator[=] identifier[Operations] operator[SEP] identifier[intersection] operator[SEP] identifier[automatonList] , identifier[automatonRegexp] operator[SEP] operator[SEP] } Keyword[else] { identifier[automaton] operator[=] identifier[automatonList] operator[SEP] } Keyword[try] { identifier[compiledAutomaton] operator[=] Keyword[new] identifier[CompiledAutomaton] operator[SEP] identifier[automaton] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[TooComplexToDeterminizeException] identifier[e] operator[SEP] { identifier[log] operator[SEP] identifier[debug] operator[SEP] identifier[e] operator[SEP] operator[SEP] identifier[success] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[localStep] operator[>] Other[1] operator[SEP] { identifier[localStep] operator[/=] Other[2] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[SEP] operator[SEP] } } } identifier[list] operator[SEP] identifier[add] operator[SEP] identifier[compiledAutomaton] operator[SEP] operator[SEP] } Keyword[return] identifier[list] operator[SEP] }
@Override public StringWriter append(char c) { if (c == '\n') { if (!ignoreNewLine) { ++line; column = 0; } ignoreNewLine = false; } else if (c == '\r'){ // \r\n sequence should be treated as a single line feed so set a flag // to indicate that if the next character is a /n then we should ignore it ignoreNewLine = true; ++line; column = 0; } else { ignoreNewLine = false; ++column; } super.write(c); return this; }
class class_name[name] begin[{] method[append, return_type[type[StringWriter]], modifier[public], parameter[c]] begin[{] if[binary_operation[member[.c], ==, literal['\n']]] begin[{] if[member[.ignoreNewLine]] begin[{] member[.line] assign[member[.column], literal[0]] else begin[{] None end[}] assign[member[.ignoreNewLine], literal[false]] else begin[{] if[binary_operation[member[.c], ==, literal['\r']]] begin[{] assign[member[.ignoreNewLine], literal[true]] member[.line] assign[member[.column], literal[0]] else begin[{] assign[member[.ignoreNewLine], literal[false]] member[.column] end[}] end[}] SuperMethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) return[THIS[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[StringWriter] identifier[append] operator[SEP] Keyword[char] identifier[c] operator[SEP] { Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[ignoreNewLine] operator[SEP] { operator[++] identifier[line] operator[SEP] identifier[column] operator[=] Other[0] operator[SEP] } identifier[ignoreNewLine] operator[=] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[SEP] { identifier[ignoreNewLine] operator[=] literal[boolean] operator[SEP] operator[++] identifier[line] operator[SEP] identifier[column] operator[=] Other[0] operator[SEP] } Keyword[else] { identifier[ignoreNewLine] operator[=] literal[boolean] operator[SEP] operator[++] identifier[column] operator[SEP] } Keyword[super] operator[SEP] identifier[write] operator[SEP] identifier[c] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public Context getContext(String photoId) throws JinxException { JinxUtils.validateParams(photoId); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.photos.getContext"); params.put("photo_id", photoId); return jinx.flickrGet(params, Context.class); }
class class_name[name] begin[{] method[getContext, return_type[type[Context]], modifier[public], parameter[photoId]] begin[{] call[JinxUtils.validateParams, parameter[member[.photoId]]] local_variable[type[Map], params] call[params.put, parameter[literal["method"], literal["flickr.photos.getContext"]]] call[params.put, parameter[literal["photo_id"], member[.photoId]]] return[call[jinx.flickrGet, parameter[member[.params], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Context, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[Context] identifier[getContext] operator[SEP] identifier[String] identifier[photoId] operator[SEP] Keyword[throws] identifier[JinxException] { identifier[JinxUtils] operator[SEP] identifier[validateParams] operator[SEP] identifier[photoId] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[params] operator[=] Keyword[new] identifier[TreeMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[params] operator[SEP] identifier[put] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[params] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[photoId] operator[SEP] operator[SEP] Keyword[return] identifier[jinx] operator[SEP] identifier[flickrGet] operator[SEP] identifier[params] , identifier[Context] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public boolean offer(T element) { if (size < capacity) { put(element); return true; } else if (size > 0 && !lessThan(element, peek())) { heap[1] = element; adjustTop(); return true; } else { return false; } }
class class_name[name] begin[{] method[offer, return_type[type[boolean]], modifier[public], parameter[element]] begin[{] if[binary_operation[member[.size], <, member[.capacity]]] begin[{] call[.put, parameter[member[.element]]] return[literal[true]] else begin[{] if[binary_operation[binary_operation[member[.size], >, literal[0]], &&, call[.lessThan, parameter[member[.element], call[.peek, parameter[]]]]]] begin[{] assign[member[.heap], member[.element]] call[.adjustTop, parameter[]] return[literal[true]] else begin[{] return[literal[false]] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[offer] operator[SEP] identifier[T] identifier[element] operator[SEP] { Keyword[if] operator[SEP] identifier[size] operator[<] identifier[capacity] operator[SEP] { identifier[put] operator[SEP] identifier[element] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[size] operator[>] Other[0] operator[&&] operator[!] identifier[lessThan] operator[SEP] identifier[element] , identifier[peek] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[heap] operator[SEP] Other[1] operator[SEP] operator[=] identifier[element] operator[SEP] identifier[adjustTop] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { Keyword[return] literal[boolean] operator[SEP] } }
@Override public java.util.concurrent.Future<GetQueueUrlResult> getQueueUrlAsync(String queueName, com.amazonaws.handlers.AsyncHandler<GetQueueUrlRequest, GetQueueUrlResult> asyncHandler) { return getQueueUrlAsync(new GetQueueUrlRequest().withQueueName(queueName), asyncHandler); }
class class_name[name] begin[{] method[getQueueUrlAsync, return_type[type[java]], modifier[public], parameter[queueName, asyncHandler]] begin[{] return[call[.getQueueUrlAsync, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=queueName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withQueueName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=GetQueueUrlRequest, sub_type=None)), member[.asyncHandler]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[concurrent] operator[SEP] identifier[Future] operator[<] identifier[GetQueueUrlResult] operator[>] identifier[getQueueUrlAsync] operator[SEP] identifier[String] identifier[queueName] , identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[handlers] operator[SEP] identifier[AsyncHandler] operator[<] identifier[GetQueueUrlRequest] , identifier[GetQueueUrlResult] operator[>] identifier[asyncHandler] operator[SEP] { Keyword[return] identifier[getQueueUrlAsync] operator[SEP] Keyword[new] identifier[GetQueueUrlRequest] operator[SEP] operator[SEP] operator[SEP] identifier[withQueueName] operator[SEP] identifier[queueName] operator[SEP] , identifier[asyncHandler] operator[SEP] operator[SEP] }
public void marshall(UpdateInstanceCustomHealthStatusRequest updateInstanceCustomHealthStatusRequest, ProtocolMarshaller protocolMarshaller) { if (updateInstanceCustomHealthStatusRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(updateInstanceCustomHealthStatusRequest.getServiceId(), SERVICEID_BINDING); protocolMarshaller.marshall(updateInstanceCustomHealthStatusRequest.getInstanceId(), INSTANCEID_BINDING); protocolMarshaller.marshall(updateInstanceCustomHealthStatusRequest.getStatus(), STATUS_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[updateInstanceCustomHealthStatusRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.updateInstanceCustomHealthStatusRequest], ==, 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=getServiceId, postfix_operators=[], prefix_operators=[], qualifier=updateInstanceCustomHealthStatusRequest, selectors=[], type_arguments=None), MemberReference(member=SERVICEID_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=getInstanceId, postfix_operators=[], prefix_operators=[], qualifier=updateInstanceCustomHealthStatusRequest, selectors=[], type_arguments=None), MemberReference(member=INSTANCEID_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=getStatus, postfix_operators=[], prefix_operators=[], qualifier=updateInstanceCustomHealthStatusRequest, selectors=[], type_arguments=None), MemberReference(member=STATUS_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[UpdateInstanceCustomHealthStatusRequest] identifier[updateInstanceCustomHealthStatusRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[updateInstanceCustomHealthStatusRequest] 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[updateInstanceCustomHealthStatusRequest] operator[SEP] identifier[getServiceId] operator[SEP] operator[SEP] , identifier[SERVICEID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[updateInstanceCustomHealthStatusRequest] operator[SEP] identifier[getInstanceId] operator[SEP] operator[SEP] , identifier[INSTANCEID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[updateInstanceCustomHealthStatusRequest] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] , identifier[STATUS_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public static boolean intersectRaySphere(Vector3dc origin, Vector3dc dir, Vector3dc center, double radiusSquared, Vector2d result) { return intersectRaySphere(origin.x(), origin.y(), origin.z(), dir.x(), dir.y(), dir.z(), center.x(), center.y(), center.z(), radiusSquared, result); }
class class_name[name] begin[{] method[intersectRaySphere, return_type[type[boolean]], modifier[public static], parameter[origin, dir, center, radiusSquared, result]] begin[{] return[call[.intersectRaySphere, parameter[call[origin.x, parameter[]], call[origin.y, parameter[]], call[origin.z, parameter[]], call[dir.x, parameter[]], call[dir.y, parameter[]], call[dir.z, parameter[]], call[center.x, parameter[]], call[center.y, parameter[]], call[center.z, parameter[]], member[.radiusSquared], member[.result]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[intersectRaySphere] operator[SEP] identifier[Vector3dc] identifier[origin] , identifier[Vector3dc] identifier[dir] , identifier[Vector3dc] identifier[center] , Keyword[double] identifier[radiusSquared] , identifier[Vector2d] identifier[result] operator[SEP] { Keyword[return] identifier[intersectRaySphere] operator[SEP] identifier[origin] operator[SEP] identifier[x] operator[SEP] operator[SEP] , identifier[origin] operator[SEP] identifier[y] operator[SEP] operator[SEP] , identifier[origin] operator[SEP] identifier[z] operator[SEP] operator[SEP] , identifier[dir] operator[SEP] identifier[x] operator[SEP] operator[SEP] , identifier[dir] operator[SEP] identifier[y] operator[SEP] operator[SEP] , identifier[dir] operator[SEP] identifier[z] operator[SEP] operator[SEP] , identifier[center] operator[SEP] identifier[x] operator[SEP] operator[SEP] , identifier[center] operator[SEP] identifier[y] operator[SEP] operator[SEP] , identifier[center] operator[SEP] identifier[z] operator[SEP] operator[SEP] , identifier[radiusSquared] , identifier[result] operator[SEP] operator[SEP] }
@Override public int compareTo(Instant otherInstant) { int cmp = Jdk8Methods.compareLongs(seconds, otherInstant.seconds); if (cmp != 0) { return cmp; } return nanos - otherInstant.nanos; }
class class_name[name] begin[{] method[compareTo, return_type[type[int]], modifier[public], parameter[otherInstant]] begin[{] local_variable[type[int], cmp] if[binary_operation[member[.cmp], !=, literal[0]]] begin[{] return[member[.cmp]] else begin[{] None end[}] return[binary_operation[member[.nanos], -, member[otherInstant.nanos]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[compareTo] operator[SEP] identifier[Instant] identifier[otherInstant] operator[SEP] { Keyword[int] identifier[cmp] operator[=] identifier[Jdk8Methods] operator[SEP] identifier[compareLongs] operator[SEP] identifier[seconds] , identifier[otherInstant] operator[SEP] identifier[seconds] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cmp] operator[!=] Other[0] operator[SEP] { Keyword[return] identifier[cmp] operator[SEP] } Keyword[return] identifier[nanos] operator[-] identifier[otherInstant] operator[SEP] identifier[nanos] operator[SEP] }
public static boolean decomposeAbsDualQuadratic( DMatrix4x4 Q , DMatrix3x3 w , DMatrix3 p ) { DecomposeAbsoluteDualQuadratic alg = new DecomposeAbsoluteDualQuadratic(); if( !alg.decompose(Q) ) return false; w.set(alg.getW()); p.set(alg.getP()); return true; }
class class_name[name] begin[{] method[decomposeAbsDualQuadratic, return_type[type[boolean]], modifier[public static], parameter[Q, w, p]] begin[{] local_variable[type[DecomposeAbsoluteDualQuadratic], alg] if[call[alg.decompose, parameter[member[.Q]]]] begin[{] return[literal[false]] else begin[{] None end[}] call[w.set, parameter[call[alg.getW, parameter[]]]] call[p.set, parameter[call[alg.getP, parameter[]]]] return[literal[true]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[decomposeAbsDualQuadratic] operator[SEP] identifier[DMatrix4x4] identifier[Q] , identifier[DMatrix3x3] identifier[w] , identifier[DMatrix3] identifier[p] operator[SEP] { identifier[DecomposeAbsoluteDualQuadratic] identifier[alg] operator[=] Keyword[new] identifier[DecomposeAbsoluteDualQuadratic] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[alg] operator[SEP] identifier[decompose] operator[SEP] identifier[Q] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] identifier[w] operator[SEP] identifier[set] operator[SEP] identifier[alg] operator[SEP] identifier[getW] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[set] operator[SEP] identifier[alg] operator[SEP] identifier[getP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
protected void printStaticAccessors() { if (options.staticAccessorMethods()) { for (VariableDeclarationFragment fragment : getStaticFields()) { VariableElement var = fragment.getVariableElement(); TypeMirror type = var.asType(); String accessorName = nameTable.getStaticAccessorName(var); String objcType = nameTable.getObjCType(type); TypeElement declaringClass = ElementUtil.getDeclaringClass(var); String baseName = nameTable.getVariableBaseName(var); ExecutableElement getter = ElementUtil.findGetterMethod(baseName, type, declaringClass, /* isStatic = */ true); if (getter == null) { printf("\n+ (%s)%s;\n", objcType, accessorName); } ExecutableElement setter = ElementUtil.findSetterMethod(baseName, type, declaringClass, /* isStatic = */ true); if (setter == null && !ElementUtil.isFinal(var)) { printf("\n+ (void)set%s:(%s)value;\n", NameTable.capitalize(accessorName), objcType); } } if (typeNode instanceof EnumDeclaration) { for (EnumConstantDeclaration constant : ((EnumDeclaration) typeNode).getEnumConstants()) { String accessorName = nameTable.getStaticAccessorName(constant.getVariableElement()); if (options.nullability()) { printf("\n+ (%s * __nonnull)%s;\n", typeName, accessorName); } else { printf("\n+ (%s *)%s;\n", typeName, accessorName); } } } } }
class class_name[name] begin[{] method[printStaticAccessors, return_type[void], modifier[protected], parameter[]] begin[{] if[call[options.staticAccessorMethods, parameter[]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getVariableElement, postfix_operators=[], prefix_operators=[], qualifier=fragment, selectors=[], type_arguments=None), name=var)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=VariableElement, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=asType, postfix_operators=[], prefix_operators=[], qualifier=var, selectors=[], type_arguments=None), name=type)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TypeMirror, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=var, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getStaticAccessorName, postfix_operators=[], prefix_operators=[], qualifier=nameTable, selectors=[], type_arguments=None), name=accessorName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getObjCType, postfix_operators=[], prefix_operators=[], qualifier=nameTable, selectors=[], type_arguments=None), name=objcType)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=var, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDeclaringClass, postfix_operators=[], prefix_operators=[], qualifier=ElementUtil, selectors=[], type_arguments=None), name=declaringClass)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TypeElement, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=var, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getVariableBaseName, postfix_operators=[], prefix_operators=[], qualifier=nameTable, selectors=[], type_arguments=None), name=baseName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=baseName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=declaringClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=findGetterMethod, postfix_operators=[], prefix_operators=[], qualifier=ElementUtil, selectors=[], type_arguments=None), name=getter)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ExecutableElement, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=getter, 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=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n+ (%s)%s;\n"), MemberReference(member=objcType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=accessorName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=printf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=baseName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=declaringClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=findSetterMethod, postfix_operators=[], prefix_operators=[], qualifier=ElementUtil, selectors=[], type_arguments=None), name=setter)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ExecutableElement, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=setter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[MemberReference(member=var, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isFinal, postfix_operators=[], prefix_operators=['!'], qualifier=ElementUtil, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n+ (void)set%s:(%s)value;\n"), MethodInvocation(arguments=[MemberReference(member=accessorName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=capitalize, postfix_operators=[], prefix_operators=[], qualifier=NameTable, selectors=[], type_arguments=None), MemberReference(member=objcType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=printf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getStaticFields, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=fragment)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=VariableDeclarationFragment, sub_type=None))), label=None) if[binary_operation[member[.typeNode], instanceof, type[EnumDeclaration]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getVariableElement, postfix_operators=[], prefix_operators=[], qualifier=constant, selectors=[], type_arguments=None)], member=getStaticAccessorName, postfix_operators=[], prefix_operators=[], qualifier=nameTable, selectors=[], type_arguments=None), name=accessorName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=nullability, postfix_operators=[], prefix_operators=[], qualifier=options, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n+ (%s *)%s;\n"), MemberReference(member=typeName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=accessorName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=printf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n+ (%s * __nonnull)%s;\n"), MemberReference(member=typeName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=accessorName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=printf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=Cast(expression=MemberReference(member=typeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=EnumDeclaration, sub_type=None)), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=constant)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=EnumConstantDeclaration, sub_type=None))), label=None) else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[printStaticAccessors] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[options] operator[SEP] identifier[staticAccessorMethods] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[VariableDeclarationFragment] identifier[fragment] operator[:] identifier[getStaticFields] operator[SEP] operator[SEP] operator[SEP] { identifier[VariableElement] identifier[var] operator[=] identifier[fragment] operator[SEP] identifier[getVariableElement] operator[SEP] operator[SEP] operator[SEP] identifier[TypeMirror] identifier[type] operator[=] identifier[var] operator[SEP] identifier[asType] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[accessorName] operator[=] identifier[nameTable] operator[SEP] identifier[getStaticAccessorName] operator[SEP] identifier[var] operator[SEP] operator[SEP] identifier[String] identifier[objcType] operator[=] identifier[nameTable] operator[SEP] identifier[getObjCType] operator[SEP] identifier[type] operator[SEP] operator[SEP] identifier[TypeElement] identifier[declaringClass] operator[=] identifier[ElementUtil] operator[SEP] identifier[getDeclaringClass] operator[SEP] identifier[var] operator[SEP] operator[SEP] identifier[String] identifier[baseName] operator[=] identifier[nameTable] operator[SEP] identifier[getVariableBaseName] operator[SEP] identifier[var] operator[SEP] operator[SEP] identifier[ExecutableElement] identifier[getter] operator[=] identifier[ElementUtil] operator[SEP] identifier[findGetterMethod] operator[SEP] identifier[baseName] , identifier[type] , identifier[declaringClass] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[getter] operator[==] Other[null] operator[SEP] { identifier[printf] operator[SEP] literal[String] , identifier[objcType] , identifier[accessorName] operator[SEP] operator[SEP] } identifier[ExecutableElement] identifier[setter] operator[=] identifier[ElementUtil] operator[SEP] identifier[findSetterMethod] operator[SEP] identifier[baseName] , identifier[type] , identifier[declaringClass] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[setter] operator[==] Other[null] operator[&&] operator[!] identifier[ElementUtil] operator[SEP] identifier[isFinal] operator[SEP] identifier[var] operator[SEP] operator[SEP] { identifier[printf] operator[SEP] literal[String] , identifier[NameTable] operator[SEP] identifier[capitalize] operator[SEP] identifier[accessorName] operator[SEP] , identifier[objcType] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[typeNode] Keyword[instanceof] identifier[EnumDeclaration] operator[SEP] { Keyword[for] operator[SEP] identifier[EnumConstantDeclaration] identifier[constant] operator[:] operator[SEP] operator[SEP] identifier[EnumDeclaration] operator[SEP] identifier[typeNode] operator[SEP] operator[SEP] identifier[getEnumConstants] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[accessorName] operator[=] identifier[nameTable] operator[SEP] identifier[getStaticAccessorName] operator[SEP] identifier[constant] operator[SEP] identifier[getVariableElement] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[options] operator[SEP] identifier[nullability] operator[SEP] operator[SEP] operator[SEP] { identifier[printf] operator[SEP] literal[String] , identifier[typeName] , identifier[accessorName] operator[SEP] operator[SEP] } Keyword[else] { identifier[printf] operator[SEP] literal[String] , identifier[typeName] , identifier[accessorName] operator[SEP] operator[SEP] } } } } }
public static void checkCryptography(TokenBasedAuthConfiguration configuration) { try { Field field = Class.forName("javax.crypto.JceSecurity").getDeclaredField("isRestricted"); field.setAccessible(true); field.set(null, java.lang.Boolean.FALSE); } catch (ClassNotFoundException e) { StringBuilder builder = new StringBuilder("javax.crypto.JceSecurity class not found !\n" ); builder.append(getUpgradJceErrorMessage()); throw new RuntimeException(builder.toString(), e); } catch (final IllegalAccessException | NoSuchFieldException e) { try { if(BasicToken.getEncryptor().isInitialized()) { BasicToken.getEncryptor().encrypt("Sample Data"); } } catch (EncryptionOperationNotPossibleException ex) { StringBuilder builder = new StringBuilder(); builder .append(configuration.getAlgorithm()) .append(" not exist on Java Cryptography Extension (JCE)") .append(getUpgradJceErrorMessage()); LOGGER.error(builder.toString()); throw new RuntimeException(builder.toString(), ex); } } }
class class_name[name] begin[{] method[checkCryptography, return_type[void], modifier[public static], parameter[configuration]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="javax.crypto.JceSecurity")], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="isRestricted")], member=getDeclaredField, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=field)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Field, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setAccessible, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=FALSE, postfix_operators=[], prefix_operators=[], qualifier=java.lang.Boolean, selectors=[])], member=set, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="javax.crypto.JceSecurity class not found !\n")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuilder, sub_type=None)), name=builder)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuilder, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getUpgradJceErrorMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=builder, 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=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ClassNotFoundException'])), CatchClause(block=[TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[], member=getEncryptor, postfix_operators=[], prefix_operators=[], qualifier=BasicToken, selectors=[MethodInvocation(arguments=[], member=isInitialized, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getEncryptor, postfix_operators=[], prefix_operators=[], qualifier=BasicToken, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Sample Data")], member=encrypt, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]))], catches=[CatchClause(block=[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=StringBuilder, sub_type=None)), name=builder)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuilder, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAlgorithm, postfix_operators=[], prefix_operators=[], qualifier=configuration, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" not exist on Java Cryptography Extension (JCE)")], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getUpgradJceErrorMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None)], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), 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=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['EncryptionOperationNotPossibleException']))], finally_block=None, label=None, resources=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IllegalAccessException', 'NoSuchFieldException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[checkCryptography] operator[SEP] identifier[TokenBasedAuthConfiguration] identifier[configuration] operator[SEP] { Keyword[try] { identifier[Field] identifier[field] operator[=] identifier[Class] operator[SEP] identifier[forName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[getDeclaredField] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[field] operator[SEP] identifier[setAccessible] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[field] operator[SEP] identifier[set] operator[SEP] Other[null] , identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[Boolean] operator[SEP] identifier[FALSE] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ClassNotFoundException] identifier[e] operator[SEP] { identifier[StringBuilder] identifier[builder] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[append] operator[SEP] identifier[getUpgradJceErrorMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[builder] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[IllegalAccessException] operator[|] identifier[NoSuchFieldException] identifier[e] operator[SEP] { Keyword[try] { Keyword[if] operator[SEP] identifier[BasicToken] operator[SEP] identifier[getEncryptor] operator[SEP] operator[SEP] operator[SEP] identifier[isInitialized] operator[SEP] operator[SEP] operator[SEP] { identifier[BasicToken] operator[SEP] identifier[getEncryptor] operator[SEP] operator[SEP] operator[SEP] identifier[encrypt] operator[SEP] literal[String] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[EncryptionOperationNotPossibleException] identifier[ex] operator[SEP] { identifier[StringBuilder] identifier[builder] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[append] operator[SEP] identifier[configuration] operator[SEP] identifier[getAlgorithm] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[getUpgradJceErrorMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[error] operator[SEP] identifier[builder] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[builder] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[ex] operator[SEP] operator[SEP] } } }
public Point2 add(Point2 that) { return new Point2(x + that.x, y + that.y); }
class class_name[name] begin[{] method[add, return_type[type[Point2]], modifier[public], parameter[that]] begin[{] return[ClassCreator(arguments=[BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=that, selectors=[]), operator=+), BinaryOperation(operandl=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=that, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Point2, sub_type=None))] end[}] END[}]
Keyword[public] identifier[Point2] identifier[add] operator[SEP] identifier[Point2] identifier[that] operator[SEP] { Keyword[return] Keyword[new] identifier[Point2] operator[SEP] identifier[x] operator[+] identifier[that] operator[SEP] identifier[x] , identifier[y] operator[+] identifier[that] operator[SEP] identifier[y] operator[SEP] operator[SEP] }
public void initialize() throws SQLException { if (initialized) { // just skip it if already initialized return; } if (connectionSource == null) { throw new IllegalStateException("connectionSource was never set on " + getClass().getSimpleName()); } databaseType = connectionSource.getDatabaseType(); if (databaseType == null) { throw new IllegalStateException( "connectionSource is getting a null DatabaseType in " + getClass().getSimpleName()); } if (tableConfig == null) { tableInfo = new TableInfo<T, ID>(databaseType, dataClass); } else { tableConfig.extractFieldTypes(databaseType); tableInfo = new TableInfo<T, ID>(databaseType, tableConfig); } statementExecutor = new StatementExecutor<T, ID>(databaseType, tableInfo, this); /* * This is a bit complex. Initially, when we were configuring the field types, external DAO information would be * configured for auto-refresh, foreign BaseDaoEnabled classes, and foreign-collections. This would cause the * system to go recursive and for class loops, a stack overflow. * * Then we fixed this by putting a level counter in the FieldType constructor that would stop the configurations * when we reach some recursion level. But this created some bad problems because we were using the DaoManager * to cache the created DAOs that had been constructed already limited by the level. * * What we do now is have a 2 phase initialization. The constructor initializes most of the fields but then we * go back and call FieldType.configDaoInformation() after we are done. So for every DAO that is initialized * here, we have to see if it is the top DAO. If not we save it for dao configuration later. */ List<BaseDaoImpl<?, ?>> daoConfigList = daoConfigLevelLocal.get(); daoConfigList.add(this); if (daoConfigList.size() > 1) { // if we have recursed then just save the dao for later configuration return; } try { /* * WARNING: We do _not_ use an iterator here because we may be adding to the list as we process it and we'll * get exceptions otherwise. This is an ArrayList so the get(i) should be efficient. * * Also, do _not_ get a copy of daoConfigLevel.doArray because that array may be replaced by another, larger * one during the recursion. */ for (int i = 0; i < daoConfigList.size(); i++) { BaseDaoImpl<?, ?> dao = daoConfigList.get(i); /* * Here's another complex bit. The first DAO that is being constructed as part of a DAO chain is not yet * in the DaoManager cache. If we continue onward we might come back around and try to configure this * DAO again. Forcing it into the cache here makes sure it won't be configured twice. This will cause it * to be stuck in twice when it returns out to the DaoManager but that's a small price to pay. This also * applies to self-referencing classes. */ DaoManager.registerDao(connectionSource, dao); try { // config our fields which may go recursive for (FieldType fieldType : dao.getTableInfo().getFieldTypes()) { fieldType.configDaoInformation(connectionSource, dao.getDataClass()); } } catch (SQLException e) { // unregister the DAO we just pre-registered DaoManager.unregisterDao(connectionSource, dao); throw e; } // it's now been fully initialized dao.initialized = true; } } finally { // if we throw we want to clear our class hierarchy here daoConfigList.clear(); daoConfigLevelLocal.remove(); } }
class class_name[name] begin[{] method[initialize, return_type[void], modifier[public], parameter[]] begin[{] if[member[.initialized]] begin[{] return[None] else begin[{] None end[}] if[binary_operation[member[.connectionSource], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="connectionSource was never set on "), operandr=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] assign[member[.databaseType], call[connectionSource.getDatabaseType, parameter[]]] if[binary_operation[member[.databaseType], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="connectionSource is getting a null DatabaseType in "), operandr=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.tableConfig], ==, literal[null]]] begin[{] assign[member[.tableInfo], ClassCreator(arguments=[MemberReference(member=databaseType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=dataClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ID, sub_type=None))], dimensions=None, name=TableInfo, sub_type=None))] else begin[{] call[tableConfig.extractFieldTypes, parameter[member[.databaseType]]] assign[member[.tableInfo], ClassCreator(arguments=[MemberReference(member=databaseType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tableConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ID, sub_type=None))], dimensions=None, name=TableInfo, sub_type=None))] end[}] assign[member[.statementExecutor], ClassCreator(arguments=[MemberReference(member=databaseType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tableInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, 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)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ID, sub_type=None))], dimensions=None, name=StatementExecutor, sub_type=None))] local_variable[type[List], daoConfigList] call[daoConfigList.add, parameter[THIS[]]] if[binary_operation[call[daoConfigList.size, parameter[]], >, literal[1]]] begin[{] return[None] else begin[{] None end[}] TryStatement(block=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=daoConfigList, selectors=[], type_arguments=None), name=dao)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None), TypeArgument(pattern_type=?, type=None)], dimensions=[], name=BaseDaoImpl, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=connectionSource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=dao, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=registerDao, postfix_operators=[], prefix_operators=[], qualifier=DaoManager, selectors=[], type_arguments=None), label=None), TryStatement(block=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=connectionSource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getDataClass, postfix_operators=[], prefix_operators=[], qualifier=dao, selectors=[], type_arguments=None)], member=configDaoInformation, postfix_operators=[], prefix_operators=[], qualifier=fieldType, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getTableInfo, postfix_operators=[], prefix_operators=[], qualifier=dao, selectors=[MethodInvocation(arguments=[], member=getFieldTypes, 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=fieldType)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FieldType, sub_type=None))), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=connectionSource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=dao, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=unregisterDao, postfix_operators=[], prefix_operators=[], qualifier=DaoManager, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SQLException']))], finally_block=None, label=None, resources=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=initialized, postfix_operators=[], prefix_operators=[], qualifier=dao, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=daoConfigList, 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)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=clear, postfix_operators=[], prefix_operators=[], qualifier=daoConfigList, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=remove, postfix_operators=[], prefix_operators=[], qualifier=daoConfigLevelLocal, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[initialize] operator[SEP] operator[SEP] Keyword[throws] identifier[SQLException] { Keyword[if] operator[SEP] identifier[initialized] operator[SEP] { Keyword[return] operator[SEP] } Keyword[if] operator[SEP] identifier[connectionSource] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[databaseType] operator[=] identifier[connectionSource] operator[SEP] identifier[getDatabaseType] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[databaseType] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[tableConfig] operator[==] Other[null] operator[SEP] { identifier[tableInfo] operator[=] Keyword[new] identifier[TableInfo] operator[<] identifier[T] , identifier[ID] operator[>] operator[SEP] identifier[databaseType] , identifier[dataClass] operator[SEP] operator[SEP] } Keyword[else] { identifier[tableConfig] operator[SEP] identifier[extractFieldTypes] operator[SEP] identifier[databaseType] operator[SEP] operator[SEP] identifier[tableInfo] operator[=] Keyword[new] identifier[TableInfo] operator[<] identifier[T] , identifier[ID] operator[>] operator[SEP] identifier[databaseType] , identifier[tableConfig] operator[SEP] operator[SEP] } identifier[statementExecutor] operator[=] Keyword[new] identifier[StatementExecutor] operator[<] identifier[T] , identifier[ID] operator[>] operator[SEP] identifier[databaseType] , identifier[tableInfo] , Keyword[this] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[BaseDaoImpl] operator[<] operator[?] , operator[?] operator[>] operator[>] identifier[daoConfigList] operator[=] identifier[daoConfigLevelLocal] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[daoConfigList] operator[SEP] identifier[add] operator[SEP] Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[daoConfigList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[1] operator[SEP] { Keyword[return] operator[SEP] } Keyword[try] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[daoConfigList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[BaseDaoImpl] operator[<] operator[?] , operator[?] operator[>] identifier[dao] operator[=] identifier[daoConfigList] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[DaoManager] operator[SEP] identifier[registerDao] operator[SEP] identifier[connectionSource] , identifier[dao] operator[SEP] operator[SEP] Keyword[try] { Keyword[for] operator[SEP] identifier[FieldType] identifier[fieldType] operator[:] identifier[dao] operator[SEP] identifier[getTableInfo] operator[SEP] operator[SEP] operator[SEP] identifier[getFieldTypes] operator[SEP] operator[SEP] operator[SEP] { identifier[fieldType] operator[SEP] identifier[configDaoInformation] operator[SEP] identifier[connectionSource] , identifier[dao] operator[SEP] identifier[getDataClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[SQLException] identifier[e] operator[SEP] { identifier[DaoManager] operator[SEP] identifier[unregisterDao] operator[SEP] identifier[connectionSource] , identifier[dao] operator[SEP] operator[SEP] Keyword[throw] identifier[e] operator[SEP] } identifier[dao] operator[SEP] identifier[initialized] operator[=] literal[boolean] operator[SEP] } } Keyword[finally] { identifier[daoConfigList] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[daoConfigLevelLocal] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] } }
public static boolean reconnect(final Jedis jedis, final int reconAttempts, final long reconnectSleepTime) { int i = 1; do { try { jedis.disconnect(); try { Thread.sleep(reconnectSleepTime); } catch (Exception e2) { } jedis.connect(); } catch (JedisConnectionException jce) { } // Ignore bad connection attempts catch (Exception e3) { LOG.error("Unknown Exception while trying to reconnect to Redis", e3); } } while (++i <= reconAttempts && !testJedisConnection(jedis)); return testJedisConnection(jedis); }
class class_name[name] begin[{] method[reconnect, return_type[type[boolean]], modifier[public static], parameter[jedis, reconAttempts, reconnectSleepTime]] begin[{] local_variable[type[int], i] do[binary_operation[binary_operation[member[.i], <=, member[.reconAttempts]], &&, call[.testJedisConnection, parameter[member[.jedis]]]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=disconnect, postfix_operators=[], prefix_operators=[], qualifier=jedis, selectors=[], type_arguments=None), label=None), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=reconnectSleepTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sleep, postfix_operators=[], prefix_operators=[], qualifier=Thread, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e2, types=['Exception']))], finally_block=None, label=None, resources=None), StatementExpression(expression=MethodInvocation(arguments=[], member=connect, postfix_operators=[], prefix_operators=[], qualifier=jedis, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=jce, types=['JedisConnectionException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unknown Exception while trying to reconnect to Redis"), MemberReference(member=e3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e3, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] return[call[.testJedisConnection, parameter[member[.jedis]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[reconnect] operator[SEP] Keyword[final] identifier[Jedis] identifier[jedis] , Keyword[final] Keyword[int] identifier[reconAttempts] , Keyword[final] Keyword[long] identifier[reconnectSleepTime] operator[SEP] { Keyword[int] identifier[i] operator[=] Other[1] operator[SEP] Keyword[do] { Keyword[try] { identifier[jedis] operator[SEP] identifier[disconnect] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[Thread] operator[SEP] identifier[sleep] operator[SEP] identifier[reconnectSleepTime] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e2] operator[SEP] { } identifier[jedis] operator[SEP] identifier[connect] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[JedisConnectionException] identifier[jce] operator[SEP] { } Keyword[catch] operator[SEP] identifier[Exception] identifier[e3] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[e3] operator[SEP] operator[SEP] } } Keyword[while] operator[SEP] operator[++] identifier[i] operator[<=] identifier[reconAttempts] operator[&&] operator[!] identifier[testJedisConnection] operator[SEP] identifier[jedis] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[testJedisConnection] operator[SEP] identifier[jedis] operator[SEP] operator[SEP] }
public IfcReinforcingBarSurfaceEnum createIfcReinforcingBarSurfaceEnumFromString(EDataType eDataType, String initialValue) { IfcReinforcingBarSurfaceEnum result = IfcReinforcingBarSurfaceEnum.get(initialValue); if (result == null) throw new IllegalArgumentException( "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); return result; }
class class_name[name] begin[{] method[createIfcReinforcingBarSurfaceEnumFromString, return_type[type[IfcReinforcingBarSurfaceEnum]], modifier[public], parameter[eDataType, initialValue]] begin[{] local_variable[type[IfcReinforcingBarSurfaceEnum], result] if[binary_operation[member[.result], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The value '"), operandr=MemberReference(member=initialValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' is not a valid enumerator of '"), operator=+), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=eDataType, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] identifier[IfcReinforcingBarSurfaceEnum] identifier[createIfcReinforcingBarSurfaceEnumFromString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[String] identifier[initialValue] operator[SEP] { identifier[IfcReinforcingBarSurfaceEnum] identifier[result] operator[=] identifier[IfcReinforcingBarSurfaceEnum] operator[SEP] identifier[get] operator[SEP] identifier[initialValue] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[initialValue] operator[+] literal[String] operator[+] identifier[eDataType] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
public boolean remove(final WorkbenchEntry e) { // The starting point. int pos = hashCode(e.ipAddress) & mask; // There's always an unused entry. while (workbenchEntry[pos] != null) { if (workbenchEntry[pos] == e) { size--; shiftKeys(pos); // TODO: implement resize return true; } pos = (pos + 1) & mask; } return false; }
class class_name[name] begin[{] method[remove, return_type[type[boolean]], modifier[public], parameter[e]] begin[{] local_variable[type[int], pos] while[binary_operation[member[.workbenchEntry], !=, literal[null]]] begin[{] if[binary_operation[member[.workbenchEntry], ==, member[.e]]] begin[{] member[.size] call[.shiftKeys, parameter[member[.pos]]] return[literal[true]] else begin[{] None end[}] assign[member[.pos], binary_operation[binary_operation[member[.pos], +, literal[1]], &, member[.mask]]] end[}] return[literal[false]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[remove] operator[SEP] Keyword[final] identifier[WorkbenchEntry] identifier[e] operator[SEP] { Keyword[int] identifier[pos] operator[=] identifier[hashCode] operator[SEP] identifier[e] operator[SEP] identifier[ipAddress] operator[SEP] operator[&] identifier[mask] operator[SEP] Keyword[while] operator[SEP] identifier[workbenchEntry] operator[SEP] identifier[pos] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[workbenchEntry] operator[SEP] identifier[pos] operator[SEP] operator[==] identifier[e] operator[SEP] { identifier[size] operator[--] operator[SEP] identifier[shiftKeys] operator[SEP] identifier[pos] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } identifier[pos] operator[=] operator[SEP] identifier[pos] operator[+] Other[1] operator[SEP] operator[&] identifier[mask] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public void removeClientNotificationListener(RESTRequest request, ObjectName name) { NotificationTargetInformation nti = toNotificationTargetInformation(request, name.getCanonicalName()); // Remove locally ClientNotificationListener listener = listeners.remove(nti); // Check whether the producer of the notification is local or remote. if (nti.getRoutingInformation() == null) { // Remove the notification from the MBeanServer MBeanServerHelper.removeClientNotification(name, listener); } else { // Remove the notification listener from the Target-Client Manager through EventAdmin MBeanRoutedNotificationHelper helper = MBeanRoutedNotificationHelper.getMBeanRoutedNotificationHelper(); helper.removeRoutedNotificationListener(nti, listener); } }
class class_name[name] begin[{] method[removeClientNotificationListener, return_type[void], modifier[public], parameter[request, name]] begin[{] local_variable[type[NotificationTargetInformation], nti] local_variable[type[ClientNotificationListener], listener] if[binary_operation[call[nti.getRoutingInformation, parameter[]], ==, literal[null]]] begin[{] call[MBeanServerHelper.removeClientNotification, parameter[member[.name], member[.listener]]] else begin[{] local_variable[type[MBeanRoutedNotificationHelper], helper] call[helper.removeRoutedNotificationListener, parameter[member[.nti], member[.listener]]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[removeClientNotificationListener] operator[SEP] identifier[RESTRequest] identifier[request] , identifier[ObjectName] identifier[name] operator[SEP] { identifier[NotificationTargetInformation] identifier[nti] operator[=] identifier[toNotificationTargetInformation] operator[SEP] identifier[request] , identifier[name] operator[SEP] identifier[getCanonicalName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ClientNotificationListener] identifier[listener] operator[=] identifier[listeners] operator[SEP] identifier[remove] operator[SEP] identifier[nti] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nti] operator[SEP] identifier[getRoutingInformation] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[MBeanServerHelper] operator[SEP] identifier[removeClientNotification] operator[SEP] identifier[name] , identifier[listener] operator[SEP] operator[SEP] } Keyword[else] { identifier[MBeanRoutedNotificationHelper] identifier[helper] operator[=] identifier[MBeanRoutedNotificationHelper] operator[SEP] identifier[getMBeanRoutedNotificationHelper] operator[SEP] operator[SEP] operator[SEP] identifier[helper] operator[SEP] identifier[removeRoutedNotificationListener] operator[SEP] identifier[nti] , identifier[listener] operator[SEP] operator[SEP] } }
@Override public GetFileResult getFile(GetFileRequest request) { request = beforeClientExecution(request); return executeGetFile(request); }
class class_name[name] begin[{] method[getFile, return_type[type[GetFileResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeGetFile, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[GetFileResult] identifier[getFile] operator[SEP] identifier[GetFileRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeGetFile] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
@Override public String getExemplarLocationName(String tzID) { if (tzID == null || tzID.length() == 0) { return null; } String locName = loadTimeZoneNames(tzID).getName(NameType.EXEMPLAR_LOCATION); return locName; }
class class_name[name] begin[{] method[getExemplarLocationName, return_type[type[String]], modifier[public], parameter[tzID]] begin[{] if[binary_operation[binary_operation[member[.tzID], ==, literal[null]], ||, binary_operation[call[tzID.length, parameter[]], ==, literal[0]]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[String], locName] return[member[.locName]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[getExemplarLocationName] operator[SEP] identifier[String] identifier[tzID] operator[SEP] { Keyword[if] operator[SEP] identifier[tzID] operator[==] Other[null] operator[||] identifier[tzID] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[String] identifier[locName] operator[=] identifier[loadTimeZoneNames] operator[SEP] identifier[tzID] operator[SEP] operator[SEP] identifier[getName] operator[SEP] identifier[NameType] operator[SEP] identifier[EXEMPLAR_LOCATION] operator[SEP] operator[SEP] Keyword[return] identifier[locName] operator[SEP] }
public OutputStream getNamedPipeOutputStream() throws IOException { if( pipeOut == null ) { if(( pipeType & PIPE_TYPE_CALL ) == PIPE_TYPE_CALL || ( pipeType & PIPE_TYPE_TRANSACT ) == PIPE_TYPE_TRANSACT ) { pipeOut = new TransactNamedPipeOutputStream( this ); } else { pipeOut = new SmbFileOutputStream(this, false, (pipeType & 0xFFFF00FF) | SmbFile.O_EXCL ); } } return pipeOut; }
class class_name[name] begin[{] method[getNamedPipeOutputStream, return_type[type[OutputStream]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.pipeOut], ==, literal[null]]] begin[{] if[binary_operation[binary_operation[binary_operation[member[.pipeType], &, member[.PIPE_TYPE_CALL]], ==, member[.PIPE_TYPE_CALL]], ||, binary_operation[binary_operation[member[.pipeType], &, member[.PIPE_TYPE_TRANSACT]], ==, member[.PIPE_TYPE_TRANSACT]]]] begin[{] assign[member[.pipeOut], ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TransactNamedPipeOutputStream, sub_type=None))] else begin[{] assign[member[.pipeOut], ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=pipeType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xFFFF00FF), operator=&), operandr=MemberReference(member=O_EXCL, postfix_operators=[], prefix_operators=[], qualifier=SmbFile, selectors=[]), operator=|)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SmbFileOutputStream, sub_type=None))] end[}] else begin[{] None end[}] return[member[.pipeOut]] end[}] END[}]
Keyword[public] identifier[OutputStream] identifier[getNamedPipeOutputStream] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[pipeOut] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[pipeType] operator[&] identifier[PIPE_TYPE_CALL] operator[SEP] operator[==] identifier[PIPE_TYPE_CALL] operator[||] operator[SEP] identifier[pipeType] operator[&] identifier[PIPE_TYPE_TRANSACT] operator[SEP] operator[==] identifier[PIPE_TYPE_TRANSACT] operator[SEP] { identifier[pipeOut] operator[=] Keyword[new] identifier[TransactNamedPipeOutputStream] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } Keyword[else] { identifier[pipeOut] operator[=] Keyword[new] identifier[SmbFileOutputStream] operator[SEP] Keyword[this] , literal[boolean] , operator[SEP] identifier[pipeType] operator[&] literal[Integer] operator[SEP] operator[|] identifier[SmbFile] operator[SEP] identifier[O_EXCL] operator[SEP] operator[SEP] } } Keyword[return] identifier[pipeOut] operator[SEP] }
@Override public <T> T toObject(String json, Class<T> clazz) { return toObject(json, clazz, false); }
class class_name[name] begin[{] method[toObject, return_type[type[T]], modifier[public], parameter[json, clazz]] begin[{] return[call[.toObject, parameter[member[.json], member[.clazz], literal[false]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[toObject] operator[SEP] identifier[String] identifier[json] , identifier[Class] operator[<] identifier[T] operator[>] identifier[clazz] operator[SEP] { Keyword[return] identifier[toObject] operator[SEP] identifier[json] , identifier[clazz] , literal[boolean] operator[SEP] operator[SEP] }
private static boolean matchTokenFast(char[] buffer, int position, String lowercaseToken) { if (position != 0 && isIdentifierPartFast(buffer[position - 1])) { // character at position is preceded by a letter or digit return false; } int tokenLength = lowercaseToken.length(); if (position + tokenLength > buffer.length) { // Buffer not long enough to contain token. return false; } if (position + tokenLength < buffer.length && isIdentifierPartFast(buffer[position + tokenLength])) { // Character after where token would be is a letter return false; } for (int i = 0; i < tokenLength; ++i) { char c = buffer[position + i]; if (!isLetterFast(c) || (toLowerFast(c) != lowercaseToken.charAt(i))) { return false; } } return true; }
class class_name[name] begin[{] method[matchTokenFast, return_type[type[boolean]], modifier[private static], parameter[buffer, position, lowercaseToken]] begin[{] if[binary_operation[binary_operation[member[.position], !=, literal[0]], &&, call[.isIdentifierPartFast, parameter[member[.buffer]]]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[int], tokenLength] if[binary_operation[binary_operation[member[.position], +, member[.tokenLength]], >, member[buffer.length]]] begin[{] return[literal[false]] else begin[{] None end[}] if[binary_operation[binary_operation[binary_operation[member[.position], +, member[.tokenLength]], <, member[buffer.length]], &&, call[.isIdentifierPartFast, parameter[member[.buffer]]]]] begin[{] return[literal[false]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=position, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+))]), name=c)], modifiers=set(), type=BasicType(dimensions=[], name=char)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isLetterFast, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toLowerFast, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=lowercaseToken, selectors=[], type_arguments=None), operator=!=), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=tokenLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None) return[literal[true]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[boolean] identifier[matchTokenFast] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[buffer] , Keyword[int] identifier[position] , identifier[String] identifier[lowercaseToken] operator[SEP] { Keyword[if] operator[SEP] identifier[position] operator[!=] Other[0] operator[&&] identifier[isIdentifierPartFast] operator[SEP] identifier[buffer] operator[SEP] identifier[position] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[int] identifier[tokenLength] operator[=] identifier[lowercaseToken] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[position] operator[+] identifier[tokenLength] operator[>] identifier[buffer] operator[SEP] identifier[length] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[position] operator[+] identifier[tokenLength] operator[<] identifier[buffer] operator[SEP] identifier[length] operator[&&] identifier[isIdentifierPartFast] operator[SEP] identifier[buffer] operator[SEP] identifier[position] operator[+] identifier[tokenLength] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[tokenLength] operator[SEP] operator[++] identifier[i] operator[SEP] { Keyword[char] identifier[c] operator[=] identifier[buffer] operator[SEP] identifier[position] operator[+] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isLetterFast] operator[SEP] identifier[c] operator[SEP] operator[||] operator[SEP] identifier[toLowerFast] operator[SEP] identifier[c] operator[SEP] operator[!=] identifier[lowercaseToken] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
public static void writePrettyPrint(Writer writer, Object jsonObject) throws JsonGenerationException, IOException { final JsonGenerator jw = JSON_FACTORY.createGenerator(writer); jw.useDefaultPrettyPrinter(); jw.writeObject(jsonObject); }
class class_name[name] begin[{] method[writePrettyPrint, return_type[void], modifier[public static], parameter[writer, jsonObject]] begin[{] local_variable[type[JsonGenerator], jw] call[jw.useDefaultPrettyPrinter, parameter[]] call[jw.writeObject, parameter[member[.jsonObject]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[writePrettyPrint] operator[SEP] identifier[Writer] identifier[writer] , identifier[Object] identifier[jsonObject] operator[SEP] Keyword[throws] identifier[JsonGenerationException] , identifier[IOException] { Keyword[final] identifier[JsonGenerator] identifier[jw] operator[=] identifier[JSON_FACTORY] operator[SEP] identifier[createGenerator] operator[SEP] identifier[writer] operator[SEP] operator[SEP] identifier[jw] operator[SEP] identifier[useDefaultPrettyPrinter] operator[SEP] operator[SEP] operator[SEP] identifier[jw] operator[SEP] identifier[writeObject] operator[SEP] identifier[jsonObject] operator[SEP] operator[SEP] }
@Override @Transactional(enabled = false) public CommerceTierPriceEntry createCommerceTierPriceEntry( long commerceTierPriceEntryId) { return commerceTierPriceEntryPersistence.create(commerceTierPriceEntryId); }
class class_name[name] begin[{] method[createCommerceTierPriceEntry, return_type[type[CommerceTierPriceEntry]], modifier[public], parameter[commerceTierPriceEntryId]] begin[{] return[call[commerceTierPriceEntryPersistence.create, parameter[member[.commerceTierPriceEntryId]]]] end[}] END[}]
annotation[@] identifier[Override] annotation[@] identifier[Transactional] operator[SEP] identifier[enabled] operator[=] literal[boolean] operator[SEP] Keyword[public] identifier[CommerceTierPriceEntry] identifier[createCommerceTierPriceEntry] operator[SEP] Keyword[long] identifier[commerceTierPriceEntryId] operator[SEP] { Keyword[return] identifier[commerceTierPriceEntryPersistence] operator[SEP] identifier[create] operator[SEP] identifier[commerceTierPriceEntryId] operator[SEP] operator[SEP] }
@Override public final void close() throws JMSException { synchronized (closeLock) { if (closed) return; closed = true; } ActivityWatchdog.getInstance().unregister(this); synchronized (storeLock) { if (volatileStore != null) { volatileStore.close(); // Delete message store if the queue was temporary if (queueDef.isTemporary()) volatileStore.delete(); } if (persistentStore != null) { persistentStore.close(); // Delete message store if the queue was temporary if (queueDef.isTemporary()) persistentStore.delete(); } } // Create a snapshot to avoid concurrent modification List<LocalMessageConsumer> consumers; consumersLock.readLock().lock(); try { if (localConsumers.isEmpty()) return; consumers = new ArrayList<>(localConsumers); } finally { consumersLock.readLock().unlock(); } // Close all consumers for (int n=0;n<consumers.size();n++) { LocalMessageConsumer consumer = consumers.get(n); try { consumer.close(); } catch (JMSException e) { ErrorTools.log(e, log); } } }
class class_name[name] begin[{] method[close, return_type[void], modifier[final public], parameter[]] begin[{] SYNCHRONIZED[member[.closeLock]] BEGIN[{] if[member[.closed]] begin[{] return[None] else begin[{] None end[}] assign[member[.closed], literal[true]] END[}] call[ActivityWatchdog.getInstance, parameter[]] SYNCHRONIZED[member[.storeLock]] BEGIN[{] if[binary_operation[member[.volatileStore], !=, literal[null]]] begin[{] call[volatileStore.close, parameter[]] if[call[queueDef.isTemporary, parameter[]]] begin[{] call[volatileStore.delete, parameter[]] else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[member[.persistentStore], !=, literal[null]]] begin[{] call[persistentStore.close, parameter[]] if[call[queueDef.isTemporary, parameter[]]] begin[{] call[persistentStore.delete, parameter[]] else begin[{] None end[}] else begin[{] None end[}] END[}] local_variable[type[List], consumers] call[consumersLock.readLock, parameter[]] TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=localConsumers, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=consumers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=localConsumers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None))), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=readLock, postfix_operators=[], prefix_operators=[], qualifier=consumersLock, selectors=[MethodInvocation(arguments=[], member=unlock, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], label=None, resources=None) ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=consumers, selectors=[], type_arguments=None), name=consumer)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=LocalMessageConsumer, sub_type=None)), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=consumer, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=log, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=log, postfix_operators=[], prefix_operators=[], qualifier=ErrorTools, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['JMSException']))], finally_block=None, label=None, resources=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=consumers, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=n)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=n, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[close] operator[SEP] operator[SEP] Keyword[throws] identifier[JMSException] { Keyword[synchronized] operator[SEP] identifier[closeLock] operator[SEP] { Keyword[if] operator[SEP] identifier[closed] operator[SEP] Keyword[return] operator[SEP] identifier[closed] operator[=] literal[boolean] operator[SEP] } identifier[ActivityWatchdog] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[unregister] operator[SEP] Keyword[this] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] identifier[storeLock] operator[SEP] { Keyword[if] operator[SEP] identifier[volatileStore] operator[!=] Other[null] operator[SEP] { identifier[volatileStore] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[queueDef] operator[SEP] identifier[isTemporary] operator[SEP] operator[SEP] operator[SEP] identifier[volatileStore] operator[SEP] identifier[delete] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[persistentStore] operator[!=] Other[null] operator[SEP] { identifier[persistentStore] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[queueDef] operator[SEP] identifier[isTemporary] operator[SEP] operator[SEP] operator[SEP] identifier[persistentStore] operator[SEP] identifier[delete] operator[SEP] operator[SEP] operator[SEP] } } identifier[List] operator[<] identifier[LocalMessageConsumer] operator[>] identifier[consumers] operator[SEP] identifier[consumersLock] operator[SEP] identifier[readLock] operator[SEP] operator[SEP] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[localConsumers] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[consumers] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[localConsumers] operator[SEP] operator[SEP] } Keyword[finally] { identifier[consumersLock] operator[SEP] identifier[readLock] operator[SEP] operator[SEP] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[n] operator[=] Other[0] operator[SEP] identifier[n] operator[<] identifier[consumers] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[n] operator[++] operator[SEP] { identifier[LocalMessageConsumer] identifier[consumer] operator[=] identifier[consumers] operator[SEP] identifier[get] operator[SEP] identifier[n] operator[SEP] operator[SEP] Keyword[try] { identifier[consumer] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[JMSException] identifier[e] operator[SEP] { identifier[ErrorTools] operator[SEP] identifier[log] operator[SEP] identifier[e] , identifier[log] operator[SEP] operator[SEP] } } }
protected DoubleEditor getDoubleEditor(String key) { TypeEditor typeEditor = TYPE_EDITOR_MAP.get(key); if (typeEditor == null) { typeEditor = new DoubleEditor(this, sharedPreferences, key); TYPE_EDITOR_MAP.put(key, typeEditor); } else if (!(typeEditor instanceof DoubleEditor)) { throw new IllegalArgumentException(String.format("key %s is already used for other type", key)); } return (DoubleEditor) typeEditor; }
class class_name[name] begin[{] method[getDoubleEditor, return_type[type[DoubleEditor]], modifier[protected], parameter[key]] begin[{] local_variable[type[TypeEditor], typeEditor] if[binary_operation[member[.typeEditor], ==, literal[null]]] begin[{] assign[member[.typeEditor], ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=sharedPreferences, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=key, 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=DoubleEditor, sub_type=None))] call[TYPE_EDITOR_MAP.put, parameter[member[.key], member[.typeEditor]]] else begin[{] if[binary_operation[member[.typeEditor], instanceof, type[DoubleEditor]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="key %s is already used for other type"), MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] end[}] return[Cast(expression=MemberReference(member=typeEditor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=DoubleEditor, sub_type=None))] end[}] END[}]
Keyword[protected] identifier[DoubleEditor] identifier[getDoubleEditor] operator[SEP] identifier[String] identifier[key] operator[SEP] { identifier[TypeEditor] identifier[typeEditor] operator[=] identifier[TYPE_EDITOR_MAP] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[typeEditor] operator[==] Other[null] operator[SEP] { identifier[typeEditor] operator[=] Keyword[new] identifier[DoubleEditor] operator[SEP] Keyword[this] , identifier[sharedPreferences] , identifier[key] operator[SEP] operator[SEP] identifier[TYPE_EDITOR_MAP] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[typeEditor] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[typeEditor] Keyword[instanceof] identifier[DoubleEditor] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[key] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] identifier[DoubleEditor] operator[SEP] identifier[typeEditor] operator[SEP] }
public JMethod []getDeclaredMethods() { SoftReference<JMethod[]> jMethodsRef = _declaredMethodsRef; JMethod []jMethods = null; if (jMethodsRef != null) { jMethods = jMethodsRef.get(); if (jMethods != null) return jMethods; } Method []methods = _class.getDeclaredMethods(); jMethods = new JMethod[methods.length]; for (int i = 0; i < methods.length; i++) { jMethods[i] = new JMethodWrapper(methods[i], getClassLoader()); } _declaredMethodsRef = new SoftReference<JMethod[]>(jMethods); return jMethods; }
class class_name[name] begin[{] method[getDeclaredMethods, return_type[type[JMethod]], modifier[public], parameter[]] begin[{] local_variable[type[SoftReference], jMethodsRef] local_variable[type[JMethod], jMethods] if[binary_operation[member[.jMethodsRef], !=, literal[null]]] begin[{] assign[member[.jMethods], call[jMethodsRef.get, parameter[]]] if[binary_operation[member[.jMethods], !=, literal[null]]] begin[{] return[member[.jMethods]] else begin[{] None end[}] else begin[{] None end[}] local_variable[type[Method], methods] assign[member[.jMethods], ArrayCreator(dimensions=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=methods, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JMethod, sub_type=None))] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=jMethods, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=ClassCreator(arguments=[MemberReference(member=methods, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), MethodInvocation(arguments=[], member=getClassLoader, 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=JMethodWrapper, sub_type=None))), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=methods, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) assign[member[._declaredMethodsRef], ClassCreator(arguments=[MemberReference(member=jMethods, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[None], name=JMethod, sub_type=None))], dimensions=None, name=SoftReference, sub_type=None))] return[member[.jMethods]] end[}] END[}]
Keyword[public] identifier[JMethod] operator[SEP] operator[SEP] identifier[getDeclaredMethods] operator[SEP] operator[SEP] { identifier[SoftReference] operator[<] identifier[JMethod] operator[SEP] operator[SEP] operator[>] identifier[jMethodsRef] operator[=] identifier[_declaredMethodsRef] operator[SEP] identifier[JMethod] operator[SEP] operator[SEP] identifier[jMethods] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[jMethodsRef] operator[!=] Other[null] operator[SEP] { identifier[jMethods] operator[=] identifier[jMethodsRef] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[jMethods] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[jMethods] operator[SEP] } identifier[Method] operator[SEP] operator[SEP] identifier[methods] operator[=] identifier[_class] operator[SEP] identifier[getDeclaredMethods] operator[SEP] operator[SEP] operator[SEP] identifier[jMethods] operator[=] Keyword[new] identifier[JMethod] operator[SEP] identifier[methods] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[methods] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[jMethods] operator[SEP] identifier[i] operator[SEP] operator[=] Keyword[new] identifier[JMethodWrapper] operator[SEP] identifier[methods] operator[SEP] identifier[i] operator[SEP] , identifier[getClassLoader] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[_declaredMethodsRef] operator[=] Keyword[new] identifier[SoftReference] operator[<] identifier[JMethod] operator[SEP] operator[SEP] operator[>] operator[SEP] identifier[jMethods] operator[SEP] operator[SEP] Keyword[return] identifier[jMethods] operator[SEP] }
public ValidatorBuilderInteger<PARENT> range(int min, int max) { return range(new Range<>(Integer.valueOf(min), Integer.valueOf(max))); }
class class_name[name] begin[{] method[range, return_type[type[ValidatorBuilderInteger]], modifier[public], parameter[min, max]] begin[{] return[call[.range, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=min, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=max, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=Range, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[ValidatorBuilderInteger] operator[<] identifier[PARENT] operator[>] identifier[range] operator[SEP] Keyword[int] identifier[min] , Keyword[int] identifier[max] operator[SEP] { Keyword[return] identifier[range] operator[SEP] Keyword[new] identifier[Range] operator[<] operator[>] operator[SEP] identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[min] operator[SEP] , identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[max] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public GetRequestBuilder<T,ID> find(ID... ids) { return new GetRequestBuilder<T, ID>(version,type,entityName,ids); }
class class_name[name] begin[{] method[find, return_type[type[GetRequestBuilder]], modifier[public], parameter[ids]] begin[{] return[ClassCreator(arguments=[MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=entityName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ids, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ID, sub_type=None))], dimensions=None, name=GetRequestBuilder, sub_type=None))] end[}] END[}]
Keyword[public] identifier[GetRequestBuilder] operator[<] identifier[T] , identifier[ID] operator[>] identifier[find] operator[SEP] identifier[ID] operator[...] identifier[ids] operator[SEP] { Keyword[return] Keyword[new] identifier[GetRequestBuilder] operator[<] identifier[T] , identifier[ID] operator[>] operator[SEP] identifier[version] , identifier[type] , identifier[entityName] , identifier[ids] operator[SEP] operator[SEP] }
public DelaunayTriangle neighborCCW( TriangulationPoint point ) { if( point == points[0] ) { return neighbors[2]; } else if( point == points[1] ) { return neighbors[0]; } return neighbors[1]; }
class class_name[name] begin[{] method[neighborCCW, return_type[type[DelaunayTriangle]], modifier[public], parameter[point]] begin[{] if[binary_operation[member[.point], ==, member[.points]]] begin[{] return[member[.neighbors]] else begin[{] if[binary_operation[member[.point], ==, member[.points]]] begin[{] return[member[.neighbors]] else begin[{] None end[}] end[}] return[member[.neighbors]] end[}] END[}]
Keyword[public] identifier[DelaunayTriangle] identifier[neighborCCW] operator[SEP] identifier[TriangulationPoint] identifier[point] operator[SEP] { Keyword[if] operator[SEP] identifier[point] operator[==] identifier[points] operator[SEP] Other[0] operator[SEP] operator[SEP] { Keyword[return] identifier[neighbors] operator[SEP] Other[2] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[point] operator[==] identifier[points] operator[SEP] Other[1] operator[SEP] operator[SEP] { Keyword[return] identifier[neighbors] operator[SEP] Other[0] operator[SEP] operator[SEP] } Keyword[return] identifier[neighbors] operator[SEP] Other[1] operator[SEP] operator[SEP] }
public void invokeWithCallback(final Connection conn, final Object request, final InvokeContext invokeContext, final InvokeCallback invokeCallback, final int timeoutMillis) throws RemotingException { RemotingCommand requestCommand = toRemotingCommand(request, conn, invokeContext, timeoutMillis); preProcessInvokeContext(invokeContext, requestCommand, conn); super.invokeWithCallback(conn, requestCommand, invokeCallback, timeoutMillis); }
class class_name[name] begin[{] method[invokeWithCallback, return_type[void], modifier[public], parameter[conn, request, invokeContext, invokeCallback, timeoutMillis]] begin[{] local_variable[type[RemotingCommand], requestCommand] call[.preProcessInvokeContext, parameter[member[.invokeContext], member[.requestCommand], member[.conn]]] SuperMethodInvocation(arguments=[MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=requestCommand, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=invokeCallback, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=timeoutMillis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=invokeWithCallback, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[invokeWithCallback] operator[SEP] Keyword[final] identifier[Connection] identifier[conn] , Keyword[final] identifier[Object] identifier[request] , Keyword[final] identifier[InvokeContext] identifier[invokeContext] , Keyword[final] identifier[InvokeCallback] identifier[invokeCallback] , Keyword[final] Keyword[int] identifier[timeoutMillis] operator[SEP] Keyword[throws] identifier[RemotingException] { identifier[RemotingCommand] identifier[requestCommand] operator[=] identifier[toRemotingCommand] operator[SEP] identifier[request] , identifier[conn] , identifier[invokeContext] , identifier[timeoutMillis] operator[SEP] operator[SEP] identifier[preProcessInvokeContext] operator[SEP] identifier[invokeContext] , identifier[requestCommand] , identifier[conn] operator[SEP] operator[SEP] Keyword[super] operator[SEP] identifier[invokeWithCallback] operator[SEP] identifier[conn] , identifier[requestCommand] , identifier[invokeCallback] , identifier[timeoutMillis] operator[SEP] operator[SEP] }
protected boolean getBoolean(I_CmsXmlContentLocation parent, String name) { I_CmsXmlContentValueLocation location = parent.getSubValue(name); if (location == null) { return false; } String value = location.getValue().getStringValue(m_cms); return Boolean.parseBoolean(value); }
class class_name[name] begin[{] method[getBoolean, return_type[type[boolean]], modifier[protected], parameter[parent, name]] begin[{] local_variable[type[I_CmsXmlContentValueLocation], location] if[binary_operation[member[.location], ==, literal[null]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[String], value] return[call[Boolean.parseBoolean, parameter[member[.value]]]] end[}] END[}]
Keyword[protected] Keyword[boolean] identifier[getBoolean] operator[SEP] identifier[I_CmsXmlContentLocation] identifier[parent] , identifier[String] identifier[name] operator[SEP] { identifier[I_CmsXmlContentValueLocation] identifier[location] operator[=] identifier[parent] operator[SEP] identifier[getSubValue] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[location] operator[==] Other[null] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[String] identifier[value] operator[=] identifier[location] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[getStringValue] operator[SEP] identifier[m_cms] operator[SEP] operator[SEP] Keyword[return] identifier[Boolean] operator[SEP] identifier[parseBoolean] operator[SEP] identifier[value] operator[SEP] operator[SEP] }
@Override public CommercePriceEntry findByCPInstanceUuid_Last(String CPInstanceUuid, OrderByComparator<CommercePriceEntry> orderByComparator) throws NoSuchPriceEntryException { CommercePriceEntry commercePriceEntry = fetchByCPInstanceUuid_Last(CPInstanceUuid, orderByComparator); if (commercePriceEntry != null) { return commercePriceEntry; } StringBundler msg = new StringBundler(4); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("CPInstanceUuid="); msg.append(CPInstanceUuid); msg.append("}"); throw new NoSuchPriceEntryException(msg.toString()); }
class class_name[name] begin[{] method[findByCPInstanceUuid_Last, return_type[type[CommercePriceEntry]], modifier[public], parameter[CPInstanceUuid, orderByComparator]] begin[{] local_variable[type[CommercePriceEntry], commercePriceEntry] if[binary_operation[member[.commercePriceEntry], !=, literal[null]]] begin[{] return[member[.commercePriceEntry]] else begin[{] None end[}] local_variable[type[StringBundler], msg] call[msg.append, parameter[member[._NO_SUCH_ENTITY_WITH_KEY]]] call[msg.append, parameter[literal["CPInstanceUuid="]]] call[msg.append, parameter[member[.CPInstanceUuid]]] call[msg.append, parameter[literal["}"]]] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NoSuchPriceEntryException, sub_type=None)), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CommercePriceEntry] identifier[findByCPInstanceUuid_Last] operator[SEP] identifier[String] identifier[CPInstanceUuid] , identifier[OrderByComparator] operator[<] identifier[CommercePriceEntry] operator[>] identifier[orderByComparator] operator[SEP] Keyword[throws] identifier[NoSuchPriceEntryException] { identifier[CommercePriceEntry] identifier[commercePriceEntry] operator[=] identifier[fetchByCPInstanceUuid_Last] operator[SEP] identifier[CPInstanceUuid] , identifier[orderByComparator] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[commercePriceEntry] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[commercePriceEntry] operator[SEP] } identifier[StringBundler] identifier[msg] operator[=] Keyword[new] identifier[StringBundler] operator[SEP] Other[4] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] identifier[_NO_SUCH_ENTITY_WITH_KEY] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] identifier[CPInstanceUuid] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[NoSuchPriceEntryException] operator[SEP] identifier[msg] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void waitForElementToBeVisible(final By by, final int maximumSeconds) { WebDriverWait wait = new WebDriverWait(driver, maximumSeconds); wait.until(ExpectedConditions.visibilityOfElementLocated(by)); }
class class_name[name] begin[{] method[waitForElementToBeVisible, return_type[void], modifier[public], parameter[by, maximumSeconds]] begin[{] local_variable[type[WebDriverWait], wait] call[wait.until, parameter[call[ExpectedConditions.visibilityOfElementLocated, parameter[member[.by]]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[waitForElementToBeVisible] operator[SEP] Keyword[final] identifier[By] identifier[by] , Keyword[final] Keyword[int] identifier[maximumSeconds] operator[SEP] { identifier[WebDriverWait] identifier[wait] operator[=] Keyword[new] identifier[WebDriverWait] operator[SEP] identifier[driver] , identifier[maximumSeconds] operator[SEP] operator[SEP] identifier[wait] operator[SEP] identifier[until] operator[SEP] identifier[ExpectedConditions] operator[SEP] identifier[visibilityOfElementLocated] operator[SEP] identifier[by] operator[SEP] operator[SEP] operator[SEP] }
public int readUnsignedShort(final JBBPByteOrder byteOrder) throws IOException { final int b0 = this.read(); if (b0 < 0) { throw new EOFException(); } final int b1 = this.read(); if (b1 < 0) { throw new EOFException(); } return byteOrder == JBBPByteOrder.BIG_ENDIAN ? (b0 << 8) | b1 : (b1 << 8) | b0; }
class class_name[name] begin[{] method[readUnsignedShort, return_type[type[int]], modifier[public], parameter[byteOrder]] begin[{] local_variable[type[int], b0] if[binary_operation[member[.b0], <, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=EOFException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[int], b1] if[binary_operation[member[.b1], <, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=EOFException, sub_type=None)), label=None) else begin[{] None end[}] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=byteOrder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=BIG_ENDIAN, postfix_operators=[], prefix_operators=[], qualifier=JBBPByteOrder, selectors=[]), operator===), if_false=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=b1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=<<), operandr=MemberReference(member=b0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=|), if_true=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=b0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=<<), operandr=MemberReference(member=b1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=|))] end[}] END[}]
Keyword[public] Keyword[int] identifier[readUnsignedShort] operator[SEP] Keyword[final] identifier[JBBPByteOrder] identifier[byteOrder] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[final] Keyword[int] identifier[b0] operator[=] Keyword[this] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[b0] operator[<] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[EOFException] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] Keyword[int] identifier[b1] operator[=] Keyword[this] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[b1] operator[<] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[EOFException] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[byteOrder] operator[==] identifier[JBBPByteOrder] operator[SEP] identifier[BIG_ENDIAN] operator[?] operator[SEP] identifier[b0] operator[<<] Other[8] operator[SEP] operator[|] identifier[b1] operator[:] operator[SEP] identifier[b1] operator[<<] Other[8] operator[SEP] operator[|] identifier[b0] operator[SEP] }
public void setCustomerDnsIps(java.util.Collection<String> customerDnsIps) { if (customerDnsIps == null) { this.customerDnsIps = null; return; } this.customerDnsIps = new com.amazonaws.internal.SdkInternalList<String>(customerDnsIps); }
class class_name[name] begin[{] method[setCustomerDnsIps, return_type[void], modifier[public], parameter[customerDnsIps]] begin[{] if[binary_operation[member[.customerDnsIps], ==, literal[null]]] begin[{] assign[THIS[member[None.customerDnsIps]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.customerDnsIps]], ClassCreator(arguments=[MemberReference(member=customerDnsIps, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=amazonaws, sub_type=ReferenceType(arguments=None, dimensions=None, name=internal, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setCustomerDnsIps] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[customerDnsIps] operator[SEP] { Keyword[if] operator[SEP] identifier[customerDnsIps] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[customerDnsIps] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[customerDnsIps] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[String] operator[>] operator[SEP] identifier[customerDnsIps] operator[SEP] operator[SEP] }
private StringBuilder renderComponents() throws IOException { StringBuilder sb = new StringBuilder(); sb.append( renderTitle1( this.messages.get( "components" ))); //$NON-NLS-1$ sb.append( renderParagraph( this.messages.get( "components.intro" ))); //$NON-NLS-1$ List<String> sectionNames = new ArrayList<> (); List<Component> allComponents = ComponentHelpers.findAllComponents( this.applicationTemplate ); Collections.sort( allComponents, new AbstractTypeComparator()); for( Component comp : allComponents ) { // Start a new section final String sectionName = DocConstants.SECTION_COMPONENTS + comp.getName(); StringBuilder section = startSection( sectionName ); // Overview section.append( renderTitle2( comp.getName())); section.append( renderTitle3( this.messages.get( "overview" ))); //$NON-NLS-1$ String customInfo = readCustomInformation( this.applicationDirectory, comp.getName(), DocConstants.COMP_SUMMARY ); if( Utils.isEmptyOrWhitespaces( customInfo )) customInfo = this.typeAnnotations.get( comp.getName()); if( ! Utils.isEmptyOrWhitespaces( customInfo )) section.append( renderParagraph( customInfo )); String installerName = Utils.capitalize( ComponentHelpers.findComponentInstaller( comp )); installerName = applyBoldStyle( installerName, installerName ); String msg = MessageFormat.format( this.messages.get( "component.installer" ), installerName ); //$NON-NLS-1$ section.append( renderParagraph( msg )); // Facets Collection<Facet> facets = ComponentHelpers.findAllFacets( comp ); if( ! facets.isEmpty()) { section.append( renderTitle3( this.messages.get( "facets" ))); //$NON-NLS-1$ msg = MessageFormat.format(this.messages.get( "component.inherits.facets" ), comp ); section.append( renderParagraph( msg )); section.append( renderList( ComponentHelpers.extractNames( facets ))); } // Inheritance List<Component> extendedComponents = ComponentHelpers.findAllExtendedComponents( comp ); extendedComponents.remove( comp ); Collection<Component> extendingComponents = ComponentHelpers.findAllExtendingComponents( comp ); if( ! extendedComponents.isEmpty() || ! extendingComponents.isEmpty()) { section.append( renderTitle3( this.messages.get( "inheritance" ))); //$NON-NLS-1$ AbstractRoboconfTransformer transformer = new InheritanceTransformer( comp, comp.getExtendedComponent(), extendingComponents, 4 ); saveImage( comp, DiagramType.INHERITANCE, transformer, section ); } if( ! extendedComponents.isEmpty()) { msg = MessageFormat.format( this.messages.get( "component.inherits.properties" ), comp ); //$NON-NLS-1$ section.append( renderParagraph( msg )); section.append( renderListAsLinks( ComponentHelpers.extractNames( extendedComponents ))); } if( ! extendingComponents.isEmpty()) { msg = MessageFormat.format( this.messages.get( "component.is.extended.by" ), comp ); //$NON-NLS-1$ section.append( renderParagraph( msg )); section.append( renderListAsLinks( ComponentHelpers.extractNames( extendingComponents ))); } // Exported variables Map<String,String> exportedVariables = ComponentHelpers.findAllExportedVariables( comp ); section.append( renderTitle3( this.messages.get( "exports" ))); //$NON-NLS-1$ if( exportedVariables.isEmpty()) { msg = MessageFormat.format( this.messages.get( "component.no.export" ), comp ); //$NON-NLS-1$ section.append( renderParagraph( msg )); } else { msg = MessageFormat.format( this.messages.get( "component.exports" ), comp ); //$NON-NLS-1$ section.append( renderParagraph( msg )); section.append( renderList( convertExports( exportedVariables ))); } // Hierarchy section.append( renderTitle3( this.messages.get( "hierarchy" ))); //$NON-NLS-1$ Collection<AbstractType> ancestors = new ArrayList<>(); ancestors.addAll( ComponentHelpers.findAllAncestors( comp )); Set<AbstractType> children = new HashSet<>();; children.addAll( ComponentHelpers.findAllChildren( comp )); // For recipes, ancestors and children should include facets if( this.options.containsKey( DocConstants.OPTION_RECIPE )) { for( AbstractType type : comp.getAncestors()) { if( type instanceof Facet ) { ancestors.add( type ); ancestors.addAll( ComponentHelpers.findAllExtendingFacets((Facet) type)); } } for( AbstractType type : comp.getChildren()) { if( type instanceof Facet ) { children.add( type ); children.addAll( ComponentHelpers.findAllExtendingFacets((Facet) type)); } } } if( ! ancestors.isEmpty() || ! children.isEmpty()) { AbstractRoboconfTransformer transformer = new HierarchicalTransformer( comp, ancestors, children, 4 ); saveImage( comp, DiagramType.HIERARCHY, transformer, section ); } if( ancestors.isEmpty()) { msg = MessageFormat.format( this.messages.get( "component.is.root" ), comp ); //$NON-NLS-1$ section.append( renderParagraph( msg )); } else { msg = MessageFormat.format( this.messages.get( "component.over" ), comp ); //$NON-NLS-1$ section.append( renderParagraph( msg )); section.append( renderListAsLinks( ComponentHelpers.extractNames( ancestors ))); } if( ! children.isEmpty()) { msg = MessageFormat.format( this.messages.get( "component.children" ), comp ); //$NON-NLS-1$ section.append( renderParagraph( msg )); section.append( renderListAsLinks( ComponentHelpers.extractNames( children ))); } // Runtime section.append( renderTitle3( this.messages.get( "runtime" ))); //$NON-NLS-1$ Collection<ImportedVariable> imports = ComponentHelpers.findAllImportedVariables( comp ).values(); if( imports.isEmpty()) { msg = MessageFormat.format( this.messages.get( "component.no.dep" ), comp ); //$NON-NLS-1$ section.append( renderParagraph( msg )); } else { msg = MessageFormat.format( this.messages.get( "component.depends.on" ), comp ); //$NON-NLS-1$ section.append( renderParagraph( msg )); section.append( renderList( getImportComponents( comp ))); msg = MessageFormat.format( this.messages.get( "component.requires" ), comp ); //$NON-NLS-1$ section.append( renderParagraph( msg )); section.append( renderList( convertImports( imports ))); } // Extra String s = readCustomInformation( this.applicationDirectory, comp.getName(), DocConstants.COMP_EXTRA ); if( ! Utils.isEmptyOrWhitespaces( s )) { section.append( renderTitle3( this.messages.get( "extra" ))); //$NON-NLS-1$ section.append( renderParagraph( s )); } // End the section section = endSection( sectionName, section ); sb.append( section ); sectionNames.add( sectionName ); } sb.append( renderSections( sectionNames )); return sb; }
class class_name[name] begin[{] method[renderComponents, return_type[type[StringBuilder]], modifier[private], parameter[]] begin[{] local_variable[type[StringBuilder], sb] call[sb.append, parameter[call[.renderTitle1, parameter[THIS[member[None.messages]call[None.get, parameter[literal["components"]]]]]]]] call[sb.append, parameter[call[.renderParagraph, parameter[THIS[member[None.messages]call[None.get, parameter[literal["components.intro"]]]]]]]] local_variable[type[List], sectionNames] local_variable[type[List], allComponents] call[Collections.sort, parameter[member[.allComponents], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AbstractTypeComparator, sub_type=None))]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=SECTION_COMPONENTS, postfix_operators=[], prefix_operators=[], qualifier=DocConstants, selectors=[]), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=comp, selectors=[], type_arguments=None), operator=+), name=sectionName)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=sectionName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=startSection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=section)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuilder, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=comp, selectors=[], type_arguments=None)], member=renderTitle2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=messages, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="overview")], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], member=renderTitle3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=applicationDirectory, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=comp, selectors=[], type_arguments=None), MemberReference(member=COMP_SUMMARY, postfix_operators=[], prefix_operators=[], qualifier=DocConstants, selectors=[])], member=readCustomInformation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=customInfo)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=customInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isEmptyOrWhitespaces, postfix_operators=[], prefix_operators=[], qualifier=Utils, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=customInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=typeAnnotations, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=comp, selectors=[], type_arguments=None)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])), label=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=customInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isEmptyOrWhitespaces, postfix_operators=[], prefix_operators=['!'], qualifier=Utils, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=customInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=renderParagraph, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=comp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=findComponentInstaller, postfix_operators=[], prefix_operators=[], qualifier=ComponentHelpers, selectors=[], type_arguments=None)], member=capitalize, postfix_operators=[], prefix_operators=[], qualifier=Utils, selectors=[], type_arguments=None), name=installerName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=installerName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=installerName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=installerName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=applyBoldStyle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=messages, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="component.installer")], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), MemberReference(member=installerName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=MessageFormat, selectors=[], type_arguments=None), name=msg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=renderParagraph, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=comp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=findAllFacets, postfix_operators=[], prefix_operators=[], qualifier=ComponentHelpers, selectors=[], type_arguments=None), name=facets)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Facet, sub_type=None))], dimensions=[], name=Collection, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=facets, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=messages, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="facets")], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], member=renderTitle3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=messages, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="component.inherits.facets")], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), MemberReference(member=comp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=MessageFormat, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=renderParagraph, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=facets, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=extractNames, postfix_operators=[], prefix_operators=[], qualifier=ComponentHelpers, selectors=[], type_arguments=None)], member=renderList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=comp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=findAllExtendedComponents, postfix_operators=[], prefix_operators=[], qualifier=ComponentHelpers, selectors=[], type_arguments=None), name=extendedComponents)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Component, sub_type=None))], dimensions=[], name=List, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=comp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=extendedComponents, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=comp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=findAllExtendingComponents, postfix_operators=[], prefix_operators=[], qualifier=ComponentHelpers, selectors=[], type_arguments=None), name=extendingComponents)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Component, sub_type=None))], dimensions=[], name=Collection, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=extendedComponents, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=extendingComponents, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=messages, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="inheritance")], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], member=renderTitle3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=comp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getExtendedComponent, postfix_operators=[], prefix_operators=[], qualifier=comp, selectors=[], type_arguments=None), MemberReference(member=extendingComponents, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InheritanceTransformer, sub_type=None)), name=transformer)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AbstractRoboconfTransformer, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=comp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=INHERITANCE, postfix_operators=[], prefix_operators=[], qualifier=DiagramType, selectors=[]), MemberReference(member=transformer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=section, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=saveImage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=extendedComponents, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=messages, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="component.inherits.properties")], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), MemberReference(member=comp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=MessageFormat, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=renderParagraph, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=extendedComponents, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=extractNames, postfix_operators=[], prefix_operators=[], qualifier=ComponentHelpers, selectors=[], type_arguments=None)], member=renderListAsLinks, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=extendingComponents, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=messages, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="component.is.extended.by")], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), MemberReference(member=comp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=MessageFormat, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=renderParagraph, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=extendingComponents, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=extractNames, postfix_operators=[], prefix_operators=[], qualifier=ComponentHelpers, selectors=[], type_arguments=None)], member=renderListAsLinks, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=comp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=findAllExportedVariables, postfix_operators=[], prefix_operators=[], qualifier=ComponentHelpers, selectors=[], type_arguments=None), name=exportedVariables)], 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=String, sub_type=None))], dimensions=[], name=Map, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=messages, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="exports")], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], member=renderTitle3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=exportedVariables, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=messages, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="component.exports")], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), MemberReference(member=comp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=MessageFormat, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=renderParagraph, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=exportedVariables, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convertExports, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=renderList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=messages, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="component.no.export")], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), MemberReference(member=comp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=MessageFormat, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=renderParagraph, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=messages, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="hierarchy")], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], member=renderTitle3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=section, 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=[], dimensions=None, name=ArrayList, sub_type=None)), name=ancestors)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=AbstractType, sub_type=None))], dimensions=[], name=Collection, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=comp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=findAllAncestors, postfix_operators=[], prefix_operators=[], qualifier=ComponentHelpers, selectors=[], type_arguments=None)], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=ancestors, 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=[], dimensions=None, name=HashSet, sub_type=None)), name=children)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=AbstractType, sub_type=None))], dimensions=[], name=Set, sub_type=None)), Statement(label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=comp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=findAllChildren, postfix_operators=[], prefix_operators=[], qualifier=ComponentHelpers, selectors=[], type_arguments=None)], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=children, selectors=[], type_arguments=None), label=None), IfStatement(condition=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=options, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=OPTION_RECIPE, postfix_operators=[], prefix_operators=[], qualifier=DocConstants, selectors=[])], member=containsKey, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Facet, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=ancestors, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Cast(expression=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Facet, sub_type=None))], member=findAllExtendingFacets, postfix_operators=[], prefix_operators=[], qualifier=ComponentHelpers, selectors=[], type_arguments=None)], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=ancestors, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getAncestors, postfix_operators=[], prefix_operators=[], qualifier=comp, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=type)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AbstractType, sub_type=None))), label=None), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Facet, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=children, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Cast(expression=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Facet, sub_type=None))], member=findAllExtendingFacets, postfix_operators=[], prefix_operators=[], qualifier=ComponentHelpers, selectors=[], type_arguments=None)], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=children, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getChildren, postfix_operators=[], prefix_operators=[], qualifier=comp, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=type)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AbstractType, sub_type=None))), label=None)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=ancestors, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=children, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=comp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ancestors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=children, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HierarchicalTransformer, sub_type=None)), name=transformer)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AbstractRoboconfTransformer, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=comp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=HIERARCHY, postfix_operators=[], prefix_operators=[], qualifier=DiagramType, selectors=[]), MemberReference(member=transformer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=section, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=saveImage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=ancestors, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=messages, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="component.over")], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), MemberReference(member=comp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=MessageFormat, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=renderParagraph, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=ancestors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=extractNames, postfix_operators=[], prefix_operators=[], qualifier=ComponentHelpers, selectors=[], type_arguments=None)], member=renderListAsLinks, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=messages, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="component.is.root")], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), MemberReference(member=comp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=MessageFormat, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=renderParagraph, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=children, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=messages, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="component.children")], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), MemberReference(member=comp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=MessageFormat, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=renderParagraph, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=children, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=extractNames, postfix_operators=[], prefix_operators=[], qualifier=ComponentHelpers, selectors=[], type_arguments=None)], member=renderListAsLinks, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=messages, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="runtime")], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], member=renderTitle3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=comp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=findAllImportedVariables, postfix_operators=[], prefix_operators=[], qualifier=ComponentHelpers, selectors=[MethodInvocation(arguments=[], member=values, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=imports)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ImportedVariable, sub_type=None))], dimensions=[], name=Collection, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=imports, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=messages, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="component.depends.on")], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), MemberReference(member=comp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=MessageFormat, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=renderParagraph, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=comp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getImportComponents, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=renderList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=messages, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="component.requires")], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), MemberReference(member=comp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=MessageFormat, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=renderParagraph, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=imports, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convertImports, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=renderList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=messages, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="component.no.dep")], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), MemberReference(member=comp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=MessageFormat, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=renderParagraph, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=applicationDirectory, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=comp, selectors=[], type_arguments=None), MemberReference(member=COMP_EXTRA, postfix_operators=[], prefix_operators=[], qualifier=DocConstants, selectors=[])], member=readCustomInformation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=s)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isEmptyOrWhitespaces, postfix_operators=[], prefix_operators=['!'], qualifier=Utils, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=messages, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="extra")], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], member=renderTitle3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=renderParagraph, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=section, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=sectionName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=section, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=endSection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=section, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sectionName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=sectionNames, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=allComponents, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=comp)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Component, sub_type=None))), label=None) call[sb.append, parameter[call[.renderSections, parameter[member[.sectionNames]]]]] return[member[.sb]] end[}] END[}]
Keyword[private] identifier[StringBuilder] identifier[renderComponents] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[renderTitle1] operator[SEP] Keyword[this] operator[SEP] identifier[messages] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[renderParagraph] operator[SEP] Keyword[this] operator[SEP] identifier[messages] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[sectionNames] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Component] operator[>] identifier[allComponents] operator[=] identifier[ComponentHelpers] operator[SEP] identifier[findAllComponents] operator[SEP] Keyword[this] operator[SEP] identifier[applicationTemplate] operator[SEP] operator[SEP] identifier[Collections] operator[SEP] identifier[sort] operator[SEP] identifier[allComponents] , Keyword[new] identifier[AbstractTypeComparator] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Component] identifier[comp] operator[:] identifier[allComponents] operator[SEP] { Keyword[final] identifier[String] identifier[sectionName] operator[=] identifier[DocConstants] operator[SEP] identifier[SECTION_COMPONENTS] operator[+] identifier[comp] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[section] operator[=] identifier[startSection] operator[SEP] identifier[sectionName] operator[SEP] operator[SEP] identifier[section] operator[SEP] identifier[append] operator[SEP] identifier[renderTitle2] operator[SEP] identifier[comp] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[section] operator[SEP] identifier[append] operator[SEP] identifier[renderTitle3] operator[SEP] Keyword[this] operator[SEP] identifier[messages] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[customInfo] operator[=] identifier[readCustomInformation] operator[SEP] Keyword[this] operator[SEP] identifier[applicationDirectory] , identifier[comp] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[DocConstants] operator[SEP] identifier[COMP_SUMMARY] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Utils] operator[SEP] identifier[isEmptyOrWhitespaces] operator[SEP] identifier[customInfo] operator[SEP] operator[SEP] identifier[customInfo] operator[=] Keyword[this] operator[SEP] identifier[typeAnnotations] operator[SEP] identifier[get] operator[SEP] identifier[comp] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[Utils] operator[SEP] identifier[isEmptyOrWhitespaces] operator[SEP] identifier[customInfo] operator[SEP] operator[SEP] identifier[section] operator[SEP] identifier[append] operator[SEP] identifier[renderParagraph] operator[SEP] identifier[customInfo] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[installerName] operator[=] identifier[Utils] operator[SEP] identifier[capitalize] operator[SEP] identifier[ComponentHelpers] operator[SEP] identifier[findComponentInstaller] operator[SEP] identifier[comp] operator[SEP] operator[SEP] operator[SEP] identifier[installerName] operator[=] identifier[applyBoldStyle] operator[SEP] identifier[installerName] , identifier[installerName] operator[SEP] operator[SEP] identifier[String] identifier[msg] operator[=] identifier[MessageFormat] operator[SEP] identifier[format] operator[SEP] Keyword[this] operator[SEP] identifier[messages] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] , identifier[installerName] operator[SEP] operator[SEP] identifier[section] operator[SEP] identifier[append] operator[SEP] identifier[renderParagraph] operator[SEP] identifier[msg] operator[SEP] operator[SEP] operator[SEP] identifier[Collection] operator[<] identifier[Facet] operator[>] identifier[facets] operator[=] identifier[ComponentHelpers] operator[SEP] identifier[findAllFacets] operator[SEP] identifier[comp] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[facets] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[section] operator[SEP] identifier[append] operator[SEP] identifier[renderTitle3] operator[SEP] Keyword[this] operator[SEP] identifier[messages] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[msg] operator[=] identifier[MessageFormat] operator[SEP] identifier[format] operator[SEP] Keyword[this] operator[SEP] identifier[messages] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] , identifier[comp] operator[SEP] operator[SEP] identifier[section] operator[SEP] identifier[append] operator[SEP] identifier[renderParagraph] operator[SEP] identifier[msg] operator[SEP] operator[SEP] operator[SEP] identifier[section] operator[SEP] identifier[append] operator[SEP] identifier[renderList] operator[SEP] identifier[ComponentHelpers] operator[SEP] identifier[extractNames] operator[SEP] identifier[facets] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[Component] operator[>] identifier[extendedComponents] operator[=] identifier[ComponentHelpers] operator[SEP] identifier[findAllExtendedComponents] operator[SEP] identifier[comp] operator[SEP] operator[SEP] identifier[extendedComponents] operator[SEP] identifier[remove] operator[SEP] identifier[comp] operator[SEP] operator[SEP] identifier[Collection] operator[<] identifier[Component] operator[>] identifier[extendingComponents] operator[=] identifier[ComponentHelpers] operator[SEP] identifier[findAllExtendingComponents] operator[SEP] identifier[comp] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[extendedComponents] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[||] operator[!] identifier[extendingComponents] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[section] operator[SEP] identifier[append] operator[SEP] identifier[renderTitle3] operator[SEP] Keyword[this] operator[SEP] identifier[messages] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[AbstractRoboconfTransformer] identifier[transformer] operator[=] Keyword[new] identifier[InheritanceTransformer] operator[SEP] identifier[comp] , identifier[comp] operator[SEP] identifier[getExtendedComponent] operator[SEP] operator[SEP] , identifier[extendingComponents] , Other[4] operator[SEP] operator[SEP] identifier[saveImage] operator[SEP] identifier[comp] , identifier[DiagramType] operator[SEP] identifier[INHERITANCE] , identifier[transformer] , identifier[section] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[extendedComponents] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[msg] operator[=] identifier[MessageFormat] operator[SEP] identifier[format] operator[SEP] Keyword[this] operator[SEP] identifier[messages] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] , identifier[comp] operator[SEP] operator[SEP] identifier[section] operator[SEP] identifier[append] operator[SEP] identifier[renderParagraph] operator[SEP] identifier[msg] operator[SEP] operator[SEP] operator[SEP] identifier[section] operator[SEP] identifier[append] operator[SEP] identifier[renderListAsLinks] operator[SEP] identifier[ComponentHelpers] operator[SEP] identifier[extractNames] operator[SEP] identifier[extendedComponents] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[extendingComponents] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[msg] operator[=] identifier[MessageFormat] operator[SEP] identifier[format] operator[SEP] Keyword[this] operator[SEP] identifier[messages] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] , identifier[comp] operator[SEP] operator[SEP] identifier[section] operator[SEP] identifier[append] operator[SEP] identifier[renderParagraph] operator[SEP] identifier[msg] operator[SEP] operator[SEP] operator[SEP] identifier[section] operator[SEP] identifier[append] operator[SEP] identifier[renderListAsLinks] operator[SEP] identifier[ComponentHelpers] operator[SEP] identifier[extractNames] operator[SEP] identifier[extendingComponents] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[exportedVariables] operator[=] identifier[ComponentHelpers] operator[SEP] identifier[findAllExportedVariables] operator[SEP] identifier[comp] operator[SEP] operator[SEP] identifier[section] operator[SEP] identifier[append] operator[SEP] identifier[renderTitle3] operator[SEP] Keyword[this] operator[SEP] identifier[messages] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[exportedVariables] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[msg] operator[=] identifier[MessageFormat] operator[SEP] identifier[format] operator[SEP] Keyword[this] operator[SEP] identifier[messages] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] , identifier[comp] operator[SEP] operator[SEP] identifier[section] operator[SEP] identifier[append] operator[SEP] identifier[renderParagraph] operator[SEP] identifier[msg] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[msg] operator[=] identifier[MessageFormat] operator[SEP] identifier[format] operator[SEP] Keyword[this] operator[SEP] identifier[messages] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] , identifier[comp] operator[SEP] operator[SEP] identifier[section] operator[SEP] identifier[append] operator[SEP] identifier[renderParagraph] operator[SEP] identifier[msg] operator[SEP] operator[SEP] operator[SEP] identifier[section] operator[SEP] identifier[append] operator[SEP] identifier[renderList] operator[SEP] identifier[convertExports] operator[SEP] identifier[exportedVariables] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[section] operator[SEP] identifier[append] operator[SEP] identifier[renderTitle3] operator[SEP] Keyword[this] operator[SEP] identifier[messages] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Collection] operator[<] identifier[AbstractType] operator[>] identifier[ancestors] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[ancestors] operator[SEP] identifier[addAll] operator[SEP] identifier[ComponentHelpers] operator[SEP] identifier[findAllAncestors] operator[SEP] identifier[comp] operator[SEP] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[AbstractType] operator[>] identifier[children] operator[=] Keyword[new] identifier[HashSet] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[children] operator[SEP] identifier[addAll] operator[SEP] identifier[ComponentHelpers] operator[SEP] identifier[findAllChildren] operator[SEP] identifier[comp] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[options] operator[SEP] identifier[containsKey] operator[SEP] identifier[DocConstants] operator[SEP] identifier[OPTION_RECIPE] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[AbstractType] identifier[type] operator[:] identifier[comp] operator[SEP] identifier[getAncestors] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[type] Keyword[instanceof] identifier[Facet] operator[SEP] { identifier[ancestors] operator[SEP] identifier[add] operator[SEP] identifier[type] operator[SEP] operator[SEP] identifier[ancestors] operator[SEP] identifier[addAll] operator[SEP] identifier[ComponentHelpers] operator[SEP] identifier[findAllExtendingFacets] operator[SEP] operator[SEP] identifier[Facet] operator[SEP] identifier[type] operator[SEP] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] identifier[AbstractType] identifier[type] operator[:] identifier[comp] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[type] Keyword[instanceof] identifier[Facet] operator[SEP] { identifier[children] operator[SEP] identifier[add] operator[SEP] identifier[type] operator[SEP] operator[SEP] identifier[children] operator[SEP] identifier[addAll] operator[SEP] identifier[ComponentHelpers] operator[SEP] identifier[findAllExtendingFacets] operator[SEP] operator[SEP] identifier[Facet] operator[SEP] identifier[type] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] operator[!] identifier[ancestors] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[||] operator[!] identifier[children] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[AbstractRoboconfTransformer] identifier[transformer] operator[=] Keyword[new] identifier[HierarchicalTransformer] operator[SEP] identifier[comp] , identifier[ancestors] , identifier[children] , Other[4] operator[SEP] operator[SEP] identifier[saveImage] operator[SEP] identifier[comp] , identifier[DiagramType] operator[SEP] identifier[HIERARCHY] , identifier[transformer] , identifier[section] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[ancestors] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[msg] operator[=] identifier[MessageFormat] operator[SEP] identifier[format] operator[SEP] Keyword[this] operator[SEP] identifier[messages] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] , identifier[comp] operator[SEP] operator[SEP] identifier[section] operator[SEP] identifier[append] operator[SEP] identifier[renderParagraph] operator[SEP] identifier[msg] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[msg] operator[=] identifier[MessageFormat] operator[SEP] identifier[format] operator[SEP] Keyword[this] operator[SEP] identifier[messages] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] , identifier[comp] operator[SEP] operator[SEP] identifier[section] operator[SEP] identifier[append] operator[SEP] identifier[renderParagraph] operator[SEP] identifier[msg] operator[SEP] operator[SEP] operator[SEP] identifier[section] operator[SEP] identifier[append] operator[SEP] identifier[renderListAsLinks] operator[SEP] identifier[ComponentHelpers] operator[SEP] identifier[extractNames] operator[SEP] identifier[ancestors] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[children] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[msg] operator[=] identifier[MessageFormat] operator[SEP] identifier[format] operator[SEP] Keyword[this] operator[SEP] identifier[messages] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] , identifier[comp] operator[SEP] operator[SEP] identifier[section] operator[SEP] identifier[append] operator[SEP] identifier[renderParagraph] operator[SEP] identifier[msg] operator[SEP] operator[SEP] operator[SEP] identifier[section] operator[SEP] identifier[append] operator[SEP] identifier[renderListAsLinks] operator[SEP] identifier[ComponentHelpers] operator[SEP] identifier[extractNames] operator[SEP] identifier[children] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[section] operator[SEP] identifier[append] operator[SEP] identifier[renderTitle3] operator[SEP] Keyword[this] operator[SEP] identifier[messages] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Collection] operator[<] identifier[ImportedVariable] operator[>] identifier[imports] operator[=] identifier[ComponentHelpers] operator[SEP] identifier[findAllImportedVariables] operator[SEP] identifier[comp] operator[SEP] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[imports] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[msg] operator[=] identifier[MessageFormat] operator[SEP] identifier[format] operator[SEP] Keyword[this] operator[SEP] identifier[messages] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] , identifier[comp] operator[SEP] operator[SEP] identifier[section] operator[SEP] identifier[append] operator[SEP] identifier[renderParagraph] operator[SEP] identifier[msg] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[msg] operator[=] identifier[MessageFormat] operator[SEP] identifier[format] operator[SEP] Keyword[this] operator[SEP] identifier[messages] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] , identifier[comp] operator[SEP] operator[SEP] identifier[section] operator[SEP] identifier[append] operator[SEP] identifier[renderParagraph] operator[SEP] identifier[msg] operator[SEP] operator[SEP] operator[SEP] identifier[section] operator[SEP] identifier[append] operator[SEP] identifier[renderList] operator[SEP] identifier[getImportComponents] operator[SEP] identifier[comp] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[msg] operator[=] identifier[MessageFormat] operator[SEP] identifier[format] operator[SEP] Keyword[this] operator[SEP] identifier[messages] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] , identifier[comp] operator[SEP] operator[SEP] identifier[section] operator[SEP] identifier[append] operator[SEP] identifier[renderParagraph] operator[SEP] identifier[msg] operator[SEP] operator[SEP] operator[SEP] identifier[section] operator[SEP] identifier[append] operator[SEP] identifier[renderList] operator[SEP] identifier[convertImports] operator[SEP] identifier[imports] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[String] identifier[s] operator[=] identifier[readCustomInformation] operator[SEP] Keyword[this] operator[SEP] identifier[applicationDirectory] , identifier[comp] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[DocConstants] operator[SEP] identifier[COMP_EXTRA] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[Utils] operator[SEP] identifier[isEmptyOrWhitespaces] operator[SEP] identifier[s] operator[SEP] operator[SEP] { identifier[section] operator[SEP] identifier[append] operator[SEP] identifier[renderTitle3] operator[SEP] Keyword[this] operator[SEP] identifier[messages] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[section] operator[SEP] identifier[append] operator[SEP] identifier[renderParagraph] operator[SEP] identifier[s] operator[SEP] operator[SEP] operator[SEP] } identifier[section] operator[=] identifier[endSection] operator[SEP] identifier[sectionName] , identifier[section] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[section] operator[SEP] operator[SEP] identifier[sectionNames] operator[SEP] identifier[add] operator[SEP] identifier[sectionName] operator[SEP] operator[SEP] } identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[renderSections] operator[SEP] identifier[sectionNames] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[sb] operator[SEP] }
@Override public ResourceBundlePathsIterator getGlobalResourceBundlePaths(DebugMode debugMode, ConditionalCommentCallbackHandler commentCallbackHandler, Map<String, String> variants) { return getBundleIterator(debugMode, globalBundles, commentCallbackHandler, variants); }
class class_name[name] begin[{] method[getGlobalResourceBundlePaths, return_type[type[ResourceBundlePathsIterator]], modifier[public], parameter[debugMode, commentCallbackHandler, variants]] begin[{] return[call[.getBundleIterator, parameter[member[.debugMode], member[.globalBundles], member[.commentCallbackHandler], member[.variants]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ResourceBundlePathsIterator] identifier[getGlobalResourceBundlePaths] operator[SEP] identifier[DebugMode] identifier[debugMode] , identifier[ConditionalCommentCallbackHandler] identifier[commentCallbackHandler] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[variants] operator[SEP] { Keyword[return] identifier[getBundleIterator] operator[SEP] identifier[debugMode] , identifier[globalBundles] , identifier[commentCallbackHandler] , identifier[variants] operator[SEP] operator[SEP] }
private BeanDesc init() { for (Field field : ReflectUtil.getFields(this.beanClass)) { if(false == ModifierUtil.isStatic(field)) { //只针对非static属性 this.propMap.put(field.getName(), createProp(field)); } } return this; }
class class_name[name] begin[{] method[init, return_type[type[BeanDesc]], modifier[private], parameter[]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), operandr=MethodInvocation(arguments=[MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isStatic, postfix_operators=[], prefix_operators=[], qualifier=ModifierUtil, selectors=[], type_arguments=None), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=propMap, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createProp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=put, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=beanClass, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], member=getFields, postfix_operators=[], prefix_operators=[], qualifier=ReflectUtil, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=field)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Field, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[private] identifier[BeanDesc] identifier[init] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[Field] identifier[field] operator[:] identifier[ReflectUtil] operator[SEP] identifier[getFields] operator[SEP] Keyword[this] operator[SEP] identifier[beanClass] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] literal[boolean] operator[==] identifier[ModifierUtil] operator[SEP] identifier[isStatic] operator[SEP] identifier[field] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[propMap] operator[SEP] identifier[put] operator[SEP] identifier[field] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[createProp] operator[SEP] identifier[field] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] Keyword[this] operator[SEP] }
private MoneyFormatterBuilder appendInternal(MoneyPrinter printer, MoneyParser parser) { printers.add(printer); parsers.add(parser); return this; }
class class_name[name] begin[{] method[appendInternal, return_type[type[MoneyFormatterBuilder]], modifier[private], parameter[printer, parser]] begin[{] call[printers.add, parameter[member[.printer]]] call[parsers.add, parameter[member[.parser]]] return[THIS[]] end[}] END[}]
Keyword[private] identifier[MoneyFormatterBuilder] identifier[appendInternal] operator[SEP] identifier[MoneyPrinter] identifier[printer] , identifier[MoneyParser] identifier[parser] operator[SEP] { identifier[printers] operator[SEP] identifier[add] operator[SEP] identifier[printer] operator[SEP] operator[SEP] identifier[parsers] operator[SEP] identifier[add] operator[SEP] identifier[parser] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
private static void setTimeout(final Operation op, final boolean isTimeout) { Logger logger = LoggerFactory.getLogger(MemcachedConnection.class); try { if (op == null || op.isTimedOutUnsent()) { return; } MemcachedNode node = op.getHandlingNode(); if (node != null) { node.setContinuousTimeout(isTimeout); } } catch (Exception e) { logger.error(e.getMessage()); } }
class class_name[name] begin[{] method[setTimeout, return_type[void], modifier[private static], parameter[op, isTimeout]] begin[{] local_variable[type[Logger], logger] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=op, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[], member=isTimedOutUnsent, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getHandlingNode, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[], type_arguments=None), name=node)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MemcachedNode, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=node, 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=isTimeout, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setContinuousTimeout, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[setTimeout] operator[SEP] Keyword[final] identifier[Operation] identifier[op] , Keyword[final] Keyword[boolean] identifier[isTimeout] operator[SEP] { identifier[Logger] identifier[logger] operator[=] identifier[LoggerFactory] operator[SEP] identifier[getLogger] operator[SEP] identifier[MemcachedConnection] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[op] operator[==] Other[null] operator[||] identifier[op] operator[SEP] identifier[isTimedOutUnsent] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } identifier[MemcachedNode] identifier[node] operator[=] identifier[op] operator[SEP] identifier[getHandlingNode] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[node] operator[!=] Other[null] operator[SEP] { identifier[node] operator[SEP] identifier[setContinuousTimeout] operator[SEP] identifier[isTimeout] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
@Override public void formatMap(Map<Object,Object> map) throws FormatException { if (map == null || map.isEmpty()) return;// nothing to process // format properties Object key = null; Object value = null; String text = null; for (Map.Entry<Object, Object> entry :map.entrySet()) { key = entry.getKey(); value = entry.getValue(); if (!(value instanceof String)) continue; // skip text = (String) value; // overwrite value with formatted version if (text.indexOf(getTemplatePrefix()) > -1) map.put(key, format(text, map)); } }
class class_name[name] begin[{] method[formatMap, return_type[void], modifier[public], parameter[map]] begin[{] if[binary_operation[binary_operation[member[.map], ==, literal[null]], ||, call[map.isEmpty, parameter[]]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[Object], key] local_variable[type[Object], value] local_variable[type[String], text] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=ContinueStatement(goto=None, label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=text, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTemplatePrefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=text, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator=>), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=text, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=map, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), label=None))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[formatMap] operator[SEP] identifier[Map] operator[<] identifier[Object] , identifier[Object] operator[>] identifier[map] operator[SEP] Keyword[throws] identifier[FormatException] { Keyword[if] operator[SEP] identifier[map] operator[==] Other[null] operator[||] identifier[map] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[Object] identifier[key] operator[=] Other[null] operator[SEP] identifier[Object] identifier[value] operator[=] Other[null] operator[SEP] identifier[String] identifier[text] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[Object] , identifier[Object] operator[>] identifier[entry] operator[:] identifier[map] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[key] operator[=] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] identifier[value] operator[=] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[value] Keyword[instanceof] identifier[String] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] identifier[text] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[value] operator[SEP] Keyword[if] operator[SEP] identifier[text] operator[SEP] identifier[indexOf] operator[SEP] identifier[getTemplatePrefix] operator[SEP] operator[SEP] operator[SEP] operator[>] operator[-] Other[1] operator[SEP] identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[format] operator[SEP] identifier[text] , identifier[map] operator[SEP] operator[SEP] operator[SEP] } }
public void setLINEEND(Integer newLINEEND) { Integer oldLINEEND = lineend; lineend = newLINEEND; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.GSLE__LINEEND, oldLINEEND, lineend)); }
class class_name[name] begin[{] method[setLINEEND, return_type[void], modifier[public], parameter[newLINEEND]] begin[{] local_variable[type[Integer], oldLINEEND] assign[member[.lineend], member[.newLINEEND]] if[call[.eNotificationRequired, parameter[]]] begin[{] call[.eNotify, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=SET, postfix_operators=[], prefix_operators=[], qualifier=Notification, selectors=[]), MemberReference(member=GSLE__LINEEND, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[]), MemberReference(member=oldLINEEND, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lineend, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ENotificationImpl, sub_type=None))]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setLINEEND] operator[SEP] identifier[Integer] identifier[newLINEEND] operator[SEP] { identifier[Integer] identifier[oldLINEEND] operator[=] identifier[lineend] operator[SEP] identifier[lineend] operator[=] identifier[newLINEEND] operator[SEP] Keyword[if] operator[SEP] identifier[eNotificationRequired] operator[SEP] operator[SEP] operator[SEP] identifier[eNotify] operator[SEP] Keyword[new] identifier[ENotificationImpl] operator[SEP] Keyword[this] , identifier[Notification] operator[SEP] identifier[SET] , identifier[AfplibPackage] operator[SEP] identifier[GSLE__LINEEND] , identifier[oldLINEEND] , identifier[lineend] operator[SEP] operator[SEP] operator[SEP] }
public static void main(String[] args) { CifarDAO.init("/usr/local/Datasets"); // setup data try { CifarImageDisplayApp cifarImageDisplayApp = new CifarImageDisplayApp(); cifarImageDisplayApp.go(args); } catch (Exception e) { // eat it. } finally { CifarDAO.release();// release data resources } }
class class_name[name] begin[{] method[main, return_type[void], modifier[public static], parameter[args]] begin[{] call[CifarDAO.init, parameter[literal["/usr/local/Datasets"]]] TryStatement(block=[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=CifarImageDisplayApp, sub_type=None)), name=cifarImageDisplayApp)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CifarImageDisplayApp, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=go, postfix_operators=[], prefix_operators=[], qualifier=cifarImageDisplayApp, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=release, postfix_operators=[], prefix_operators=[], qualifier=CifarDAO, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] { identifier[CifarDAO] operator[SEP] identifier[init] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[try] { identifier[CifarImageDisplayApp] identifier[cifarImageDisplayApp] operator[=] Keyword[new] identifier[CifarImageDisplayApp] operator[SEP] operator[SEP] operator[SEP] identifier[cifarImageDisplayApp] operator[SEP] identifier[go] operator[SEP] identifier[args] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { } Keyword[finally] { identifier[CifarDAO] operator[SEP] identifier[release] operator[SEP] operator[SEP] operator[SEP] } }
public ParsedNode addChild(String namespace, String nodeName, Object value) throws ParsedNodeException { addChild(createNode(namespace, nodeName).setValue(value)); return this; }
class class_name[name] begin[{] method[addChild, return_type[type[ParsedNode]], modifier[public], parameter[namespace, nodeName, value]] begin[{] call[.addChild, parameter[call[.createNode, parameter[member[.namespace], member[.nodeName]]]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[ParsedNode] identifier[addChild] operator[SEP] identifier[String] identifier[namespace] , identifier[String] identifier[nodeName] , identifier[Object] identifier[value] operator[SEP] Keyword[throws] identifier[ParsedNodeException] { identifier[addChild] operator[SEP] identifier[createNode] operator[SEP] identifier[namespace] , identifier[nodeName] operator[SEP] operator[SEP] identifier[setValue] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public static void setInputPathFilter(JobConf conf, Class<? extends PathFilter> filter) { conf.setClass("mapred.input.pathFilter.class", filter, PathFilter.class); }
class class_name[name] begin[{] method[setInputPathFilter, return_type[void], modifier[public static], parameter[conf, filter]] begin[{] call[conf.setClass, parameter[literal["mapred.input.pathFilter.class"], member[.filter], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PathFilter, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[setInputPathFilter] operator[SEP] identifier[JobConf] identifier[conf] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[PathFilter] operator[>] identifier[filter] operator[SEP] { identifier[conf] operator[SEP] identifier[setClass] operator[SEP] literal[String] , identifier[filter] , identifier[PathFilter] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
@Override public void afterInitialized(BaseComponent comp) { root = (BaseUIComponent) comp; this.comp = root; comp.setAttribute(Constants.ATTR_COMPOSER, this); comp.addEventListener(ThreadEx.ON_THREAD_COMPLETE, threadCompletionListener); appContext = SpringUtil.getAppContext(); appFramework = FrameworkUtil.getAppFramework(); eventManager = EventManager.getInstance(); initialize(); }
class class_name[name] begin[{] method[afterInitialized, return_type[void], modifier[public], parameter[comp]] begin[{] assign[member[.root], Cast(expression=MemberReference(member=comp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=BaseUIComponent, sub_type=None))] assign[THIS[member[None.comp]], member[.root]] call[comp.setAttribute, parameter[member[Constants.ATTR_COMPOSER], THIS[]]] call[comp.addEventListener, parameter[member[ThreadEx.ON_THREAD_COMPLETE], member[.threadCompletionListener]]] assign[member[.appContext], call[SpringUtil.getAppContext, parameter[]]] assign[member[.appFramework], call[FrameworkUtil.getAppFramework, parameter[]]] assign[member[.eventManager], call[EventManager.getInstance, parameter[]]] call[.initialize, parameter[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[afterInitialized] operator[SEP] identifier[BaseComponent] identifier[comp] operator[SEP] { identifier[root] operator[=] operator[SEP] identifier[BaseUIComponent] operator[SEP] identifier[comp] operator[SEP] Keyword[this] operator[SEP] identifier[comp] operator[=] identifier[root] operator[SEP] identifier[comp] operator[SEP] identifier[setAttribute] operator[SEP] identifier[Constants] operator[SEP] identifier[ATTR_COMPOSER] , Keyword[this] operator[SEP] operator[SEP] identifier[comp] operator[SEP] identifier[addEventListener] operator[SEP] identifier[ThreadEx] operator[SEP] identifier[ON_THREAD_COMPLETE] , identifier[threadCompletionListener] operator[SEP] operator[SEP] identifier[appContext] operator[=] identifier[SpringUtil] operator[SEP] identifier[getAppContext] operator[SEP] operator[SEP] operator[SEP] identifier[appFramework] operator[=] identifier[FrameworkUtil] operator[SEP] identifier[getAppFramework] operator[SEP] operator[SEP] operator[SEP] identifier[eventManager] operator[=] identifier[EventManager] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[initialize] operator[SEP] operator[SEP] operator[SEP] }
@Override public com.liferay.commerce.product.model.CPOptionCategory updateCPOptionCategory( com.liferay.commerce.product.model.CPOptionCategory cpOptionCategory) { return _cpOptionCategoryLocalService.updateCPOptionCategory(cpOptionCategory); }
class class_name[name] begin[{] method[updateCPOptionCategory, return_type[type[com]], modifier[public], parameter[cpOptionCategory]] begin[{] return[call[_cpOptionCategoryLocalService.updateCPOptionCategory, parameter[member[.cpOptionCategory]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[product] operator[SEP] identifier[model] operator[SEP] identifier[CPOptionCategory] identifier[updateCPOptionCategory] operator[SEP] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[product] operator[SEP] identifier[model] operator[SEP] identifier[CPOptionCategory] identifier[cpOptionCategory] operator[SEP] { Keyword[return] identifier[_cpOptionCategoryLocalService] operator[SEP] identifier[updateCPOptionCategory] operator[SEP] identifier[cpOptionCategory] operator[SEP] operator[SEP] }
public List children() { if (value == null) { return new NodeList(); } if (value instanceof List) { return (List) value; } // we're probably just a String List result = new NodeList(); result.add(value); return result; }
class class_name[name] begin[{] method[children, return_type[type[List]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.value], ==, literal[null]]] begin[{] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NodeList, sub_type=None))] else begin[{] None end[}] if[binary_operation[member[.value], instanceof, type[List]]] begin[{] return[Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=List, sub_type=None))] else begin[{] None end[}] local_variable[type[List], result] call[result.add, parameter[member[.value]]] return[member[.result]] end[}] END[}]
Keyword[public] identifier[List] identifier[children] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] { Keyword[return] Keyword[new] identifier[NodeList] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[List] operator[SEP] { Keyword[return] operator[SEP] identifier[List] operator[SEP] identifier[value] operator[SEP] } identifier[List] identifier[result] operator[=] Keyword[new] identifier[NodeList] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[add] operator[SEP] identifier[value] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
InputStream parseResponse(final TokenProxy<?, ?> tokenProxy, final Response response) { checkRefresh(tokenProxy, response); try { return response.getBody().in(); } catch (final IOException e) { throw new RuntimeException(e); } }
class class_name[name] begin[{] method[parseResponse, return_type[type[InputStream]], modifier[default], parameter[tokenProxy, response]] begin[{] call[.checkRefresh, parameter[member[.tokenProxy], member[.response]]] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getBody, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[MethodInvocation(arguments=[], member=in, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
identifier[InputStream] identifier[parseResponse] operator[SEP] Keyword[final] identifier[TokenProxy] operator[<] operator[?] , operator[?] operator[>] identifier[tokenProxy] , Keyword[final] identifier[Response] identifier[response] operator[SEP] { identifier[checkRefresh] operator[SEP] identifier[tokenProxy] , identifier[response] operator[SEP] operator[SEP] Keyword[try] { Keyword[return] identifier[response] operator[SEP] identifier[getBody] operator[SEP] operator[SEP] operator[SEP] identifier[in] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
synchronized public Element remove(long index) { Element oldValue = get(index); if (oldValue != null) { int bind = ((int)index & Integer.MAX_VALUE) % buckets.length; Element[] bucket = buckets[bind]; int count = counts[bind]; int i = 0; while (bucket[i].getIndex() != index) i++; System.arraycopy(bucket, i+1, bucket, i, count-(i+1)); counts[bind] = count - 1; totalSize -= 1; } return oldValue; }
class class_name[name] begin[{] method[remove, return_type[type[Element]], modifier[synchronized public], parameter[index]] begin[{] local_variable[type[Element], oldValue] if[binary_operation[member[.oldValue], !=, literal[null]]] begin[{] local_variable[type[int], bind] local_variable[type[Element], bucket] local_variable[type[int], count] local_variable[type[int], i] while[binary_operation[member[.bucket], !=, member[.index]]] begin[{] member[.i] end[}] call[System.arraycopy, parameter[member[.bucket], binary_operation[member[.i], +, literal[1]], member[.bucket], member[.i], binary_operation[member[.count], -, binary_operation[member[.i], +, literal[1]]]]] assign[member[.counts], binary_operation[member[.count], -, literal[1]]] assign[member[.totalSize], literal[1]] else begin[{] None end[}] return[member[.oldValue]] end[}] END[}]
Keyword[synchronized] Keyword[public] identifier[Element] identifier[remove] operator[SEP] Keyword[long] identifier[index] operator[SEP] { identifier[Element] identifier[oldValue] operator[=] identifier[get] operator[SEP] identifier[index] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[oldValue] operator[!=] Other[null] operator[SEP] { Keyword[int] identifier[bind] operator[=] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[index] operator[&] identifier[Integer] operator[SEP] identifier[MAX_VALUE] operator[SEP] operator[%] identifier[buckets] operator[SEP] identifier[length] operator[SEP] identifier[Element] operator[SEP] operator[SEP] identifier[bucket] operator[=] identifier[buckets] operator[SEP] identifier[bind] operator[SEP] operator[SEP] Keyword[int] identifier[count] operator[=] identifier[counts] operator[SEP] identifier[bind] operator[SEP] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] identifier[bucket] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[getIndex] operator[SEP] operator[SEP] operator[!=] identifier[index] operator[SEP] identifier[i] operator[++] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[bucket] , identifier[i] operator[+] Other[1] , identifier[bucket] , identifier[i] , identifier[count] operator[-] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[counts] operator[SEP] identifier[bind] operator[SEP] operator[=] identifier[count] operator[-] Other[1] operator[SEP] identifier[totalSize] operator[-=] Other[1] operator[SEP] } Keyword[return] identifier[oldValue] operator[SEP] }
public String getLangDesc(String s) { if (s.equals("en")) return "English"; if (s.equals("nl")) return "Nederlands (Dutch)"; if (s.equals("de")) return "Deutsch (German)"; if (s.equals("ru")) return "\u0440\u0443\u0301\u0441\u0441\u043a\u0438\u0439 (Russian)"; return "\"" + s + "\""; }
class class_name[name] begin[{] method[getLangDesc, return_type[type[String]], modifier[public], parameter[s]] begin[{] if[call[s.equals, parameter[literal["en"]]]] begin[{] return[literal["English"]] else begin[{] None end[}] if[call[s.equals, parameter[literal["nl"]]]] begin[{] return[literal["Nederlands (Dutch)"]] else begin[{] None end[}] if[call[s.equals, parameter[literal["de"]]]] begin[{] return[literal["Deutsch (German)"]] else begin[{] None end[}] if[call[s.equals, parameter[literal["ru"]]]] begin[{] return[literal["ру́сский (Russian)"]] else begin[{] None end[}] return[binary_operation[binary_operation[literal["\""], +, member[.s]], +, literal["\""]]] end[}] END[}]
Keyword[public] identifier[String] identifier[getLangDesc] operator[SEP] identifier[String] identifier[s] operator[SEP] { Keyword[if] operator[SEP] identifier[s] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[s] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[s] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[s] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] literal[String] operator[SEP] Keyword[return] literal[String] operator[+] identifier[s] operator[+] literal[String] operator[SEP] }
private FastBlobStateEngine getDeserializedStateEngineWithObjects(A... objects) throws IOException { FastBlobStateEngine stateEngine = new FastBlobStateEngine(new ExampleSerializerFactory()); for(A object : objects) { stateEngine.add("A", object); } ByteArrayOutputStream baos = new ByteArrayOutputStream(); DataOutputStream dataOutputStream = new DataOutputStream(baos); stateEngine.prepareForWrite(); FastBlobWriter writer = new FastBlobWriter(stateEngine); writer.writeSnapshot(dataOutputStream); FastBlobReader reader = new FastBlobReader(stateEngine); reader.readSnapshot(new ByteArrayInputStream(baos.toByteArray())); return stateEngine; }
class class_name[name] begin[{] method[getDeserializedStateEngineWithObjects, return_type[type[FastBlobStateEngine]], modifier[private], parameter[objects]] begin[{] local_variable[type[FastBlobStateEngine], stateEngine] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="A"), MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=stateEngine, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=objects, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=object)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=A, sub_type=None))), label=None) local_variable[type[ByteArrayOutputStream], baos] local_variable[type[DataOutputStream], dataOutputStream] call[stateEngine.prepareForWrite, parameter[]] local_variable[type[FastBlobWriter], writer] call[writer.writeSnapshot, parameter[member[.dataOutputStream]]] local_variable[type[FastBlobReader], reader] call[reader.readSnapshot, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[], member=toByteArray, postfix_operators=[], prefix_operators=[], qualifier=baos, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ByteArrayInputStream, sub_type=None))]] return[member[.stateEngine]] end[}] END[}]
Keyword[private] identifier[FastBlobStateEngine] identifier[getDeserializedStateEngineWithObjects] operator[SEP] identifier[A] operator[...] identifier[objects] operator[SEP] Keyword[throws] identifier[IOException] { identifier[FastBlobStateEngine] identifier[stateEngine] operator[=] Keyword[new] identifier[FastBlobStateEngine] operator[SEP] Keyword[new] identifier[ExampleSerializerFactory] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[A] identifier[object] operator[:] identifier[objects] operator[SEP] { identifier[stateEngine] operator[SEP] identifier[add] operator[SEP] literal[String] , identifier[object] operator[SEP] operator[SEP] } identifier[ByteArrayOutputStream] identifier[baos] operator[=] Keyword[new] identifier[ByteArrayOutputStream] operator[SEP] operator[SEP] operator[SEP] identifier[DataOutputStream] identifier[dataOutputStream] operator[=] Keyword[new] identifier[DataOutputStream] operator[SEP] identifier[baos] operator[SEP] operator[SEP] identifier[stateEngine] operator[SEP] identifier[prepareForWrite] operator[SEP] operator[SEP] operator[SEP] identifier[FastBlobWriter] identifier[writer] operator[=] Keyword[new] identifier[FastBlobWriter] operator[SEP] identifier[stateEngine] operator[SEP] operator[SEP] identifier[writer] operator[SEP] identifier[writeSnapshot] operator[SEP] identifier[dataOutputStream] operator[SEP] operator[SEP] identifier[FastBlobReader] identifier[reader] operator[=] Keyword[new] identifier[FastBlobReader] operator[SEP] identifier[stateEngine] operator[SEP] operator[SEP] identifier[reader] operator[SEP] identifier[readSnapshot] operator[SEP] Keyword[new] identifier[ByteArrayInputStream] operator[SEP] identifier[baos] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[stateEngine] operator[SEP] }
@Pure @Inline(value = "PhysicsUtil.getPhysicsEngine().motionNewtonEuler1Law2D(($1), ($2), ($3), ($4), ($5))", imported = {PhysicsUtil.class}) public static void motionNewtonEuler1Law2D( Vector2D<?, ?> velocity, double minSpeed, double maxSpeed, double dt, Vector2D<?, ?> result) { engine.motionNewtonEuler1Law2D(velocity, minSpeed, maxSpeed, dt, result); }
class class_name[name] begin[{] method[motionNewtonEuler1Law2D, return_type[void], modifier[public static], parameter[velocity, minSpeed, maxSpeed, dt, result]] begin[{] call[engine.motionNewtonEuler1Law2D, parameter[member[.velocity], member[.minSpeed], member[.maxSpeed], member[.dt], member[.result]]] end[}] END[}]
annotation[@] identifier[Pure] annotation[@] identifier[Inline] operator[SEP] identifier[value] operator[=] literal[String] , identifier[imported] operator[=] { identifier[PhysicsUtil] operator[SEP] Keyword[class] } operator[SEP] Keyword[public] Keyword[static] Keyword[void] identifier[motionNewtonEuler1Law2D] operator[SEP] identifier[Vector2D] operator[<] operator[?] , operator[?] operator[>] identifier[velocity] , Keyword[double] identifier[minSpeed] , Keyword[double] identifier[maxSpeed] , Keyword[double] identifier[dt] , identifier[Vector2D] operator[<] operator[?] , operator[?] operator[>] identifier[result] operator[SEP] { identifier[engine] operator[SEP] identifier[motionNewtonEuler1Law2D] operator[SEP] identifier[velocity] , identifier[minSpeed] , identifier[maxSpeed] , identifier[dt] , identifier[result] operator[SEP] operator[SEP] }
public Observable<DetectedLanguage> detectLanguageAsync(String textContentType, byte[] textContent) { return detectLanguageWithServiceResponseAsync(textContentType, textContent).map(new Func1<ServiceResponse<DetectedLanguage>, DetectedLanguage>() { @Override public DetectedLanguage call(ServiceResponse<DetectedLanguage> response) { return response.body(); } }); }
class class_name[name] begin[{] method[detectLanguageAsync, return_type[type[Observable]], modifier[public], parameter[textContentType, textContent]] begin[{] return[call[.detectLanguageWithServiceResponseAsync, parameter[member[.textContentType], member[.textContent]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[DetectedLanguage] operator[>] identifier[detectLanguageAsync] operator[SEP] identifier[String] identifier[textContentType] , Keyword[byte] operator[SEP] operator[SEP] identifier[textContent] operator[SEP] { Keyword[return] identifier[detectLanguageWithServiceResponseAsync] operator[SEP] identifier[textContentType] , identifier[textContent] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[DetectedLanguage] operator[>] , identifier[DetectedLanguage] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[DetectedLanguage] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[DetectedLanguage] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public void destroy() { setState(STATE_STOPPED); if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) { Tr.event(tc, "destroy: " + this); } this.channelFactory.removeChannel(getName()); this.channelFactory = null; this.myConfig = null; this.myObjectFactory = null; }
class class_name[name] begin[{] method[destroy, return_type[void], modifier[public], parameter[]] begin[{] call[.setState, parameter[member[.STATE_STOPPED]]] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEventEnabled, parameter[]]]] begin[{] call[Tr.event, parameter[member[.tc], binary_operation[literal["destroy: "], +, THIS[]]]] else begin[{] None end[}] THIS[member[None.channelFactory]call[None.removeChannel, parameter[call[.getName, parameter[]]]]] assign[THIS[member[None.channelFactory]], literal[null]] assign[THIS[member[None.myConfig]], literal[null]] assign[THIS[member[None.myObjectFactory]], literal[null]] end[}] END[}]
Keyword[public] Keyword[void] identifier[destroy] operator[SEP] operator[SEP] { identifier[setState] operator[SEP] identifier[STATE_STOPPED] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEventEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[event] operator[SEP] identifier[tc] , literal[String] operator[+] Keyword[this] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[channelFactory] operator[SEP] identifier[removeChannel] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[channelFactory] operator[=] Other[null] operator[SEP] Keyword[this] operator[SEP] identifier[myConfig] operator[=] Other[null] operator[SEP] Keyword[this] operator[SEP] identifier[myObjectFactory] operator[=] Other[null] operator[SEP] }
public static <T> Optional<T> toBean(String json, Class<T> clazz) { if (StringUtils.isBlank(json)) { log.warn("json is blank. "); return Optional.empty(); } try { OBJECT_MAPPER.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); return Optional.of(OBJECT_MAPPER.readValue(json, clazz)); } catch (Exception e) { log.error(e.getMessage(), e); return Optional.empty(); } }
class class_name[name] begin[{] method[toBean, return_type[type[Optional]], modifier[public static], parameter[json, clazz]] begin[{] if[call[StringUtils.isBlank, parameter[member[.json]]]] begin[{] call[log.warn, parameter[literal["json is blank. "]]] return[call[Optional.empty, parameter[]]] else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FAIL_ON_UNKNOWN_PROPERTIES, postfix_operators=[], prefix_operators=[], qualifier=DeserializationFeature, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=configure, postfix_operators=[], prefix_operators=[], qualifier=OBJECT_MAPPER, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=json, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readValue, postfix_operators=[], prefix_operators=[], qualifier=OBJECT_MAPPER, selectors=[], type_arguments=None)], member=of, postfix_operators=[], prefix_operators=[], qualifier=Optional, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[], member=empty, postfix_operators=[], prefix_operators=[], qualifier=Optional, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Optional] operator[<] identifier[T] operator[>] identifier[toBean] operator[SEP] identifier[String] identifier[json] , identifier[Class] operator[<] identifier[T] operator[>] identifier[clazz] operator[SEP] { Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isBlank] operator[SEP] identifier[json] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[Optional] operator[SEP] identifier[empty] operator[SEP] operator[SEP] operator[SEP] } Keyword[try] { identifier[OBJECT_MAPPER] operator[SEP] identifier[configure] operator[SEP] identifier[DeserializationFeature] operator[SEP] identifier[FAIL_ON_UNKNOWN_PROPERTIES] , literal[boolean] operator[SEP] operator[SEP] Keyword[return] identifier[Optional] operator[SEP] identifier[of] operator[SEP] identifier[OBJECT_MAPPER] operator[SEP] identifier[readValue] operator[SEP] identifier[json] , identifier[clazz] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[log] operator[SEP] identifier[error] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] Keyword[return] identifier[Optional] operator[SEP] identifier[empty] operator[SEP] operator[SEP] operator[SEP] } }
public static String decodeString(String str) { try { return new String(Base64.decode(str)); } catch (IOException io) { throw new RuntimeException(io.getMessage(), io.getCause()); } }
class class_name[name] begin[{] method[decodeString, return_type[type[String]], modifier[public static], parameter[str]] begin[{] TryStatement(block=[ReturnStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=str, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=decode, postfix_operators=[], prefix_operators=[], qualifier=Base64, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=io, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getCause, postfix_operators=[], prefix_operators=[], qualifier=io, selectors=[], type_arguments=None)], 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=io, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[decodeString] operator[SEP] identifier[String] identifier[str] operator[SEP] { Keyword[try] { Keyword[return] Keyword[new] identifier[String] operator[SEP] identifier[Base64] operator[SEP] identifier[decode] operator[SEP] identifier[str] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[io] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[io] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[io] operator[SEP] identifier[getCause] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public static void putAt(MutableTreeNode self, int index, MutableTreeNode node) { self.insert(node, index); }
class class_name[name] begin[{] method[putAt, return_type[void], modifier[public static], parameter[self, index, node]] begin[{] call[self.insert, parameter[member[.node], member[.index]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[putAt] operator[SEP] identifier[MutableTreeNode] identifier[self] , Keyword[int] identifier[index] , identifier[MutableTreeNode] identifier[node] operator[SEP] { identifier[self] operator[SEP] identifier[insert] operator[SEP] identifier[node] , identifier[index] operator[SEP] operator[SEP] }
public static ContentType forFile(File file) { Params.notNull(file, "File"); ContentType contentType = FILE_TYPES.get(Files.getExtension(file)); if (contentType == null) { log.debug("Unknown content type for |%s|. Replace with default |%s|.", file, TEXT_HTML); contentType = TEXT_HTML; } return contentType; }
class class_name[name] begin[{] method[forFile, return_type[type[ContentType]], modifier[public static], parameter[file]] begin[{] call[Params.notNull, parameter[member[.file], literal["File"]]] local_variable[type[ContentType], contentType] if[binary_operation[member[.contentType], ==, literal[null]]] begin[{] call[log.debug, parameter[literal["Unknown content type for |%s|. Replace with default |%s|."], member[.file], member[.TEXT_HTML]]] assign[member[.contentType], member[.TEXT_HTML]] else begin[{] None end[}] return[member[.contentType]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ContentType] identifier[forFile] operator[SEP] identifier[File] identifier[file] operator[SEP] { identifier[Params] operator[SEP] identifier[notNull] operator[SEP] identifier[file] , literal[String] operator[SEP] operator[SEP] identifier[ContentType] identifier[contentType] operator[=] identifier[FILE_TYPES] operator[SEP] identifier[get] operator[SEP] identifier[Files] operator[SEP] identifier[getExtension] operator[SEP] identifier[file] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[contentType] operator[==] Other[null] operator[SEP] { identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[file] , identifier[TEXT_HTML] operator[SEP] operator[SEP] identifier[contentType] operator[=] identifier[TEXT_HTML] operator[SEP] } Keyword[return] identifier[contentType] operator[SEP] }
public static Calendar next(Calendar self) { Calendar result = (Calendar) self.clone(); result.add(Calendar.DAY_OF_YEAR, 1); return result; }
class class_name[name] begin[{] method[next, return_type[type[Calendar]], modifier[public static], parameter[self]] begin[{] local_variable[type[Calendar], result] call[result.add, parameter[member[Calendar.DAY_OF_YEAR], literal[1]]] return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Calendar] identifier[next] operator[SEP] identifier[Calendar] identifier[self] operator[SEP] { identifier[Calendar] identifier[result] operator[=] operator[SEP] identifier[Calendar] operator[SEP] identifier[self] operator[SEP] identifier[clone] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[add] operator[SEP] identifier[Calendar] operator[SEP] identifier[DAY_OF_YEAR] , Other[1] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
public void uninstallBean(J2EEName homeName) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) Tr.entry(tc, "uninstallBean " + homeName); BeanO cacheMember; J2EEName cacheHomeName; Iterator<?> statefulBeans; // d103404.1 int numEnumerated = 0, numRemoved = 0, numTimedout = 0; // d103404.2 // Enumerate through the bean cache, removing all instances // associated with the specified home. Enumeration<?> enumerate = beanCache.enumerateElements(); while (enumerate.hasMoreElements()) { cacheMember = (BeanO) ((CacheElement) enumerate.nextElement()).getObject(); BeanId cacheMemberBeanId = cacheMember.getId(); cacheHomeName = cacheMemberBeanId.getJ2EEName(); numEnumerated++; // If the cache has homeObj as it's home, remove it. // If the bean has been removed since it was found (above), // then the call to atUninstall() will just no-op. // Note that the enumeration can handle elements being removed // from the cache while enumerating. d103404.2 if (cacheHomeName.equals(homeName)) { HomeInternal home = cacheMember.getHome(); // On z/OS, the application might be stopping in a single SR // only. We can't tell, so assume the SFSB needs to remain // available for the application running in another SR, and // passivate the SFSB rather than uninstalling it. LIDB2775-23.4 BeanMetaData bmd = cacheMemberBeanId.getBeanMetaData(); if (EJSPlatformHelper.isZOS() && bmd.isPassivationCapable()) { try { home.getActivationStrategy().atPassivate(cacheMemberBeanId); } catch (Exception ex) { Tr.warning(tc, "UNABLE_TO_PASSIVATE_EJB_CNTR0005W", new Object[] { cacheMemberBeanId, this, ex }); } } else { home.getActivationStrategy().atUninstall(cacheMemberBeanId, cacheMember); } numRemoved++; } } if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { // d103404.1 d103404.2 Tr.debug(tc, beanCache.getName() + ": Uninstalled " + numRemoved + " bean instances (total = " + numEnumerated + ")"); } // Also, uninstall all passivated Stateful Session beans for the // specified home, regardless of whether they have timed out or not. // All of the beans for this home in the StatefulBeanReaper should // be in the passivated state (i.e. state written to a file), as the // above loop should have cleared all active ones from the EJB Cache. // Calling atUninstall on them will delete the file and remove them // from the reaper. d103404.1 statefulBeans = statefulBeanReaper.getPassivatedStatefulBeanIds(homeName); while (statefulBeans.hasNext()) { // Call atUninstall just like for those in the cache... atUninstall // will handle them not being in the cache and remove the file. // Note that atTimeout cannot be used, as the beans (though passivated) // may not be timed out, and atTimeout would skip them. d129562 BeanId beanId = (BeanId) statefulBeans.next(); // LIDB2775-23.4 Begins if (EJSPlatformHelper.isZOS()) { statefulBeanReaper.remove(beanId); } else // LIDB2775-23.4 Ends { beanId.getActivationStrategy().atUninstall(beanId, null); } numTimedout++; } if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { // d103404.2 Tr.debug(tc, "Passivated Beans: Uninstalled " + numTimedout + " bean instances"); } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) Tr.exit(tc, "uninstallBean"); }
class class_name[name] begin[{] method[uninstallBean, return_type[void], modifier[public], parameter[homeName]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.entry, parameter[member[.tc], binary_operation[literal["uninstallBean "], +, member[.homeName]]]] else begin[{] None end[}] local_variable[type[BeanO], cacheMember] local_variable[type[J2EEName], cacheHomeName] local_variable[type[Iterator], statefulBeans] local_variable[type[int], numEnumerated] local_variable[type[Enumeration], enumerate] while[call[enumerate.hasMoreElements, parameter[]]] begin[{] assign[member[.cacheMember], Cast(expression=Cast(expression=MethodInvocation(arguments=[], member=nextElement, postfix_operators=[], prefix_operators=[], qualifier=enumerate, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=CacheElement, sub_type=None)), type=ReferenceType(arguments=None, dimensions=[], name=BeanO, sub_type=None))] local_variable[type[BeanId], cacheMemberBeanId] assign[member[.cacheHomeName], call[cacheMemberBeanId.getJ2EEName, parameter[]]] member[.numEnumerated] if[call[cacheHomeName.equals, parameter[member[.homeName]]]] begin[{] local_variable[type[HomeInternal], home] local_variable[type[BeanMetaData], bmd] if[binary_operation[call[EJSPlatformHelper.isZOS, parameter[]], &&, call[bmd.isPassivationCapable, parameter[]]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=getActivationStrategy, postfix_operators=[], prefix_operators=[], qualifier=home, selectors=[MethodInvocation(arguments=[MemberReference(member=cacheMemberBeanId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=atPassivate, 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=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="UNABLE_TO_PASSIVATE_EJB_CNTR0005W"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=cacheMemberBeanId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=ex, 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=warning, postfix_operators=[], prefix_operators=[], qualifier=Tr, 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) else begin[{] call[home.getActivationStrategy, parameter[]] end[}] member[.numRemoved] else begin[{] None end[}] end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[call[beanCache.getName, parameter[]], +, literal[": Uninstalled "]], +, member[.numRemoved]], +, literal[" bean instances (total = "]], +, member[.numEnumerated]], +, literal[")"]]]] else begin[{] None end[}] assign[member[.statefulBeans], call[statefulBeanReaper.getPassivatedStatefulBeanIds, parameter[member[.homeName]]]] while[call[statefulBeans.hasNext, parameter[]]] begin[{] local_variable[type[BeanId], beanId] if[call[EJSPlatformHelper.isZOS, parameter[]]] begin[{] call[statefulBeanReaper.remove, parameter[member[.beanId]]] else begin[{] call[beanId.getActivationStrategy, parameter[]] end[}] member[.numTimedout] end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[binary_operation[literal["Passivated Beans: Uninstalled "], +, member[.numTimedout]], +, literal[" bean instances"]]]] else begin[{] None end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.exit, parameter[member[.tc], literal["uninstallBean"]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[uninstallBean] operator[SEP] identifier[J2EEName] identifier[homeName] 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[Tr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[homeName] operator[SEP] operator[SEP] identifier[BeanO] identifier[cacheMember] operator[SEP] identifier[J2EEName] identifier[cacheHomeName] operator[SEP] identifier[Iterator] operator[<] operator[?] operator[>] identifier[statefulBeans] operator[SEP] Keyword[int] identifier[numEnumerated] operator[=] Other[0] , identifier[numRemoved] operator[=] Other[0] , identifier[numTimedout] operator[=] Other[0] operator[SEP] identifier[Enumeration] operator[<] operator[?] operator[>] identifier[enumerate] operator[=] identifier[beanCache] operator[SEP] identifier[enumerateElements] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[enumerate] operator[SEP] identifier[hasMoreElements] operator[SEP] operator[SEP] operator[SEP] { identifier[cacheMember] operator[=] operator[SEP] identifier[BeanO] operator[SEP] operator[SEP] operator[SEP] identifier[CacheElement] operator[SEP] identifier[enumerate] operator[SEP] identifier[nextElement] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getObject] operator[SEP] operator[SEP] operator[SEP] identifier[BeanId] identifier[cacheMemberBeanId] operator[=] identifier[cacheMember] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] identifier[cacheHomeName] operator[=] identifier[cacheMemberBeanId] operator[SEP] identifier[getJ2EEName] operator[SEP] operator[SEP] operator[SEP] identifier[numEnumerated] operator[++] operator[SEP] Keyword[if] operator[SEP] identifier[cacheHomeName] operator[SEP] identifier[equals] operator[SEP] identifier[homeName] operator[SEP] operator[SEP] { identifier[HomeInternal] identifier[home] operator[=] identifier[cacheMember] operator[SEP] identifier[getHome] operator[SEP] operator[SEP] operator[SEP] identifier[BeanMetaData] identifier[bmd] operator[=] identifier[cacheMemberBeanId] operator[SEP] identifier[getBeanMetaData] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[EJSPlatformHelper] operator[SEP] identifier[isZOS] operator[SEP] operator[SEP] operator[&&] identifier[bmd] operator[SEP] identifier[isPassivationCapable] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { identifier[home] operator[SEP] identifier[getActivationStrategy] operator[SEP] operator[SEP] operator[SEP] identifier[atPassivate] operator[SEP] identifier[cacheMemberBeanId] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { identifier[Tr] operator[SEP] identifier[warning] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[cacheMemberBeanId] , Keyword[this] , identifier[ex] } operator[SEP] operator[SEP] } } Keyword[else] { identifier[home] operator[SEP] identifier[getActivationStrategy] operator[SEP] operator[SEP] operator[SEP] identifier[atUninstall] operator[SEP] identifier[cacheMemberBeanId] , identifier[cacheMember] operator[SEP] operator[SEP] } identifier[numRemoved] operator[++] operator[SEP] } } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , identifier[beanCache] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[numRemoved] operator[+] literal[String] operator[+] identifier[numEnumerated] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[statefulBeans] operator[=] identifier[statefulBeanReaper] operator[SEP] identifier[getPassivatedStatefulBeanIds] operator[SEP] identifier[homeName] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[statefulBeans] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[BeanId] identifier[beanId] operator[=] operator[SEP] identifier[BeanId] operator[SEP] identifier[statefulBeans] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[EJSPlatformHelper] operator[SEP] identifier[isZOS] operator[SEP] operator[SEP] operator[SEP] { identifier[statefulBeanReaper] operator[SEP] identifier[remove] operator[SEP] identifier[beanId] operator[SEP] operator[SEP] } Keyword[else] { identifier[beanId] operator[SEP] identifier[getActivationStrategy] operator[SEP] operator[SEP] operator[SEP] identifier[atUninstall] operator[SEP] identifier[beanId] , Other[null] operator[SEP] operator[SEP] } identifier[numTimedout] operator[++] operator[SEP] } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[numTimedout] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] }
public static String formatDurationWords( final long durationMillis, final boolean suppressLeadingZeroElements, final boolean suppressTrailingZeroElements) { // This method is generally replaceable by the format method, but // there are a series of tweaks and special cases that require // trickery to replicate. String duration = formatDuration(durationMillis, "d' days 'H' hours 'm' minutes 's' seconds'"); if (suppressLeadingZeroElements) { // this is a temporary marker on the front. Like ^ in regexp. duration = " " + duration; String tmp = StringUtils.replaceOnce(duration, " 0 days", StringUtils.EMPTY); if (tmp.length() != duration.length()) { duration = tmp; tmp = StringUtils.replaceOnce(duration, " 0 hours", StringUtils.EMPTY); if (tmp.length() != duration.length()) { duration = tmp; tmp = StringUtils.replaceOnce(duration, " 0 minutes", StringUtils.EMPTY); duration = tmp; if (tmp.length() != duration.length()) { duration = StringUtils.replaceOnce(tmp, " 0 seconds", StringUtils.EMPTY); } } } if (duration.length() != 0) { // strip the space off again duration = duration.substring(1); } } if (suppressTrailingZeroElements) { String tmp = StringUtils.replaceOnce(duration, " 0 seconds", StringUtils.EMPTY); if (tmp.length() != duration.length()) { duration = tmp; tmp = StringUtils.replaceOnce(duration, " 0 minutes", StringUtils.EMPTY); if (tmp.length() != duration.length()) { duration = tmp; tmp = StringUtils.replaceOnce(duration, " 0 hours", StringUtils.EMPTY); if (tmp.length() != duration.length()) { duration = StringUtils.replaceOnce(tmp, " 0 days", StringUtils.EMPTY); } } } } // handle plurals duration = " " + duration; duration = StringUtils.replaceOnce(duration, " 1 seconds", " 1 second"); duration = StringUtils.replaceOnce(duration, " 1 minutes", " 1 minute"); duration = StringUtils.replaceOnce(duration, " 1 hours", " 1 hour"); duration = StringUtils.replaceOnce(duration, " 1 days", " 1 day"); return duration.trim(); }
class class_name[name] begin[{] method[formatDurationWords, return_type[type[String]], modifier[public static], parameter[durationMillis, suppressLeadingZeroElements, suppressTrailingZeroElements]] begin[{] local_variable[type[String], duration] if[member[.suppressLeadingZeroElements]] begin[{] assign[member[.duration], binary_operation[literal[" "], +, member[.duration]]] local_variable[type[String], tmp] if[binary_operation[call[tmp.length, parameter[]], !=, call[duration.length, parameter[]]]] begin[{] assign[member[.duration], member[.tmp]] assign[member[.tmp], call[StringUtils.replaceOnce, parameter[member[.duration], literal[" 0 hours"], member[StringUtils.EMPTY]]]] if[binary_operation[call[tmp.length, parameter[]], !=, call[duration.length, parameter[]]]] begin[{] assign[member[.duration], member[.tmp]] assign[member[.tmp], call[StringUtils.replaceOnce, parameter[member[.duration], literal[" 0 minutes"], member[StringUtils.EMPTY]]]] assign[member[.duration], member[.tmp]] if[binary_operation[call[tmp.length, parameter[]], !=, call[duration.length, parameter[]]]] begin[{] assign[member[.duration], call[StringUtils.replaceOnce, parameter[member[.tmp], literal[" 0 seconds"], member[StringUtils.EMPTY]]]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[call[duration.length, parameter[]], !=, literal[0]]] begin[{] assign[member[.duration], call[duration.substring, parameter[literal[1]]]] else begin[{] None end[}] else begin[{] None end[}] if[member[.suppressTrailingZeroElements]] begin[{] local_variable[type[String], tmp] if[binary_operation[call[tmp.length, parameter[]], !=, call[duration.length, parameter[]]]] begin[{] assign[member[.duration], member[.tmp]] assign[member[.tmp], call[StringUtils.replaceOnce, parameter[member[.duration], literal[" 0 minutes"], member[StringUtils.EMPTY]]]] if[binary_operation[call[tmp.length, parameter[]], !=, call[duration.length, parameter[]]]] begin[{] assign[member[.duration], member[.tmp]] assign[member[.tmp], call[StringUtils.replaceOnce, parameter[member[.duration], literal[" 0 hours"], member[StringUtils.EMPTY]]]] if[binary_operation[call[tmp.length, parameter[]], !=, call[duration.length, parameter[]]]] begin[{] assign[member[.duration], call[StringUtils.replaceOnce, parameter[member[.tmp], literal[" 0 days"], member[StringUtils.EMPTY]]]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] assign[member[.duration], binary_operation[literal[" "], +, member[.duration]]] assign[member[.duration], call[StringUtils.replaceOnce, parameter[member[.duration], literal[" 1 seconds"], literal[" 1 second"]]]] assign[member[.duration], call[StringUtils.replaceOnce, parameter[member[.duration], literal[" 1 minutes"], literal[" 1 minute"]]]] assign[member[.duration], call[StringUtils.replaceOnce, parameter[member[.duration], literal[" 1 hours"], literal[" 1 hour"]]]] assign[member[.duration], call[StringUtils.replaceOnce, parameter[member[.duration], literal[" 1 days"], literal[" 1 day"]]]] return[call[duration.trim, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[formatDurationWords] operator[SEP] Keyword[final] Keyword[long] identifier[durationMillis] , Keyword[final] Keyword[boolean] identifier[suppressLeadingZeroElements] , Keyword[final] Keyword[boolean] identifier[suppressTrailingZeroElements] operator[SEP] { identifier[String] identifier[duration] operator[=] identifier[formatDuration] operator[SEP] identifier[durationMillis] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[suppressLeadingZeroElements] operator[SEP] { identifier[duration] operator[=] literal[String] operator[+] identifier[duration] operator[SEP] identifier[String] identifier[tmp] operator[=] identifier[StringUtils] operator[SEP] identifier[replaceOnce] operator[SEP] identifier[duration] , literal[String] , identifier[StringUtils] operator[SEP] identifier[EMPTY] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tmp] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[!=] identifier[duration] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] { identifier[duration] operator[=] identifier[tmp] operator[SEP] identifier[tmp] operator[=] identifier[StringUtils] operator[SEP] identifier[replaceOnce] operator[SEP] identifier[duration] , literal[String] , identifier[StringUtils] operator[SEP] identifier[EMPTY] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tmp] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[!=] identifier[duration] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] { identifier[duration] operator[=] identifier[tmp] operator[SEP] identifier[tmp] operator[=] identifier[StringUtils] operator[SEP] identifier[replaceOnce] operator[SEP] identifier[duration] , literal[String] , identifier[StringUtils] operator[SEP] identifier[EMPTY] operator[SEP] operator[SEP] identifier[duration] operator[=] identifier[tmp] operator[SEP] Keyword[if] operator[SEP] identifier[tmp] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[!=] identifier[duration] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] { identifier[duration] operator[=] identifier[StringUtils] operator[SEP] identifier[replaceOnce] operator[SEP] identifier[tmp] , literal[String] , identifier[StringUtils] operator[SEP] identifier[EMPTY] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[duration] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[!=] Other[0] operator[SEP] { identifier[duration] operator[=] identifier[duration] operator[SEP] identifier[substring] operator[SEP] Other[1] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[suppressTrailingZeroElements] operator[SEP] { identifier[String] identifier[tmp] operator[=] identifier[StringUtils] operator[SEP] identifier[replaceOnce] operator[SEP] identifier[duration] , literal[String] , identifier[StringUtils] operator[SEP] identifier[EMPTY] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tmp] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[!=] identifier[duration] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] { identifier[duration] operator[=] identifier[tmp] operator[SEP] identifier[tmp] operator[=] identifier[StringUtils] operator[SEP] identifier[replaceOnce] operator[SEP] identifier[duration] , literal[String] , identifier[StringUtils] operator[SEP] identifier[EMPTY] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tmp] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[!=] identifier[duration] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] { identifier[duration] operator[=] identifier[tmp] operator[SEP] identifier[tmp] operator[=] identifier[StringUtils] operator[SEP] identifier[replaceOnce] operator[SEP] identifier[duration] , literal[String] , identifier[StringUtils] operator[SEP] identifier[EMPTY] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tmp] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[!=] identifier[duration] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] { identifier[duration] operator[=] identifier[StringUtils] operator[SEP] identifier[replaceOnce] operator[SEP] identifier[tmp] , literal[String] , identifier[StringUtils] operator[SEP] identifier[EMPTY] operator[SEP] operator[SEP] } } } } identifier[duration] operator[=] literal[String] operator[+] identifier[duration] operator[SEP] identifier[duration] operator[=] identifier[StringUtils] operator[SEP] identifier[replaceOnce] operator[SEP] identifier[duration] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[duration] operator[=] identifier[StringUtils] operator[SEP] identifier[replaceOnce] operator[SEP] identifier[duration] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[duration] operator[=] identifier[StringUtils] operator[SEP] identifier[replaceOnce] operator[SEP] identifier[duration] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[duration] operator[=] identifier[StringUtils] operator[SEP] identifier[replaceOnce] operator[SEP] identifier[duration] , literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[duration] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] }
public static Iterator<Token[]> tokenIterator(ItemRule itemRule) { Iterator<Token[]> it = null; if (itemRule.isListableType()) { List<Token[]> list = itemRule.getTokensList(); if (list != null) { it = list.iterator(); } } else if (itemRule.isMappableType()) { Map<String, Token[]> map = itemRule.getTokensMap(); if (map != null) { it = map.values().iterator(); } } else { return new Iterator<Token[]>() { private int count = 0; @Override public boolean hasNext() { return (count++ < 1); } @Override public Token[] next() { return itemRule.getTokens(); } @Override public void remove() { throw new UnsupportedOperationException("Cannot remove an element of an array"); } }; } return it; }
class class_name[name] begin[{] method[tokenIterator, return_type[type[Iterator]], modifier[public static], parameter[itemRule]] begin[{] local_variable[type[Iterator], it] if[call[itemRule.isListableType, parameter[]]] begin[{] local_variable[type[List], list] if[binary_operation[member[.list], !=, literal[null]]] begin[{] assign[member[.it], call[list.iterator, parameter[]]] else begin[{] None end[}] else begin[{] if[call[itemRule.isMappableType, parameter[]]] begin[{] local_variable[type[Map], map] if[binary_operation[member[.map], !=, literal[null]]] begin[{] assign[member[.it], call[map.values, parameter[]]] else begin[{] None end[}] else begin[{] return[ClassCreator(arguments=[], body=[FieldDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=count)], documentation=None, modifiers={'private'}, type=BasicType(dimensions=[], name=int)), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=BinaryOperation(operandl=MemberReference(member=count, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=<), label=None)], documentation=None, modifiers={'public'}, name=hasNext, parameters=[], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getTokens, postfix_operators=[], prefix_operators=[], qualifier=itemRule, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=next, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[None], name=Token, sub_type=None), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot remove an element of an array")], 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)], documentation=None, modifiers={'public'}, name=remove, parameters=[], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[None], name=Token, sub_type=None))], dimensions=None, name=Iterator, sub_type=None))] end[}] end[}] return[member[.it]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Iterator] operator[<] identifier[Token] operator[SEP] operator[SEP] operator[>] identifier[tokenIterator] operator[SEP] identifier[ItemRule] identifier[itemRule] operator[SEP] { identifier[Iterator] operator[<] identifier[Token] operator[SEP] operator[SEP] operator[>] identifier[it] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[itemRule] operator[SEP] identifier[isListableType] operator[SEP] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[Token] operator[SEP] operator[SEP] operator[>] identifier[list] operator[=] identifier[itemRule] operator[SEP] identifier[getTokensList] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[list] operator[!=] Other[null] operator[SEP] { identifier[it] operator[=] identifier[list] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[itemRule] operator[SEP] identifier[isMappableType] operator[SEP] operator[SEP] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[Token] operator[SEP] operator[SEP] operator[>] identifier[map] operator[=] identifier[itemRule] operator[SEP] identifier[getTokensMap] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[map] operator[!=] Other[null] operator[SEP] { identifier[it] operator[=] identifier[map] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[return] Keyword[new] identifier[Iterator] operator[<] identifier[Token] operator[SEP] operator[SEP] operator[>] operator[SEP] operator[SEP] { Keyword[private] Keyword[int] identifier[count] operator[=] Other[0] operator[SEP] annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[hasNext] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] identifier[count] operator[++] operator[<] Other[1] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] identifier[Token] operator[SEP] operator[SEP] identifier[next] operator[SEP] operator[SEP] { Keyword[return] identifier[itemRule] operator[SEP] identifier[getTokens] operator[SEP] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[remove] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[UnsupportedOperationException] operator[SEP] literal[String] operator[SEP] operator[SEP] } } operator[SEP] } Keyword[return] identifier[it] operator[SEP] }
@Override public Map<Long, Double> mapping(Map<Long, Double> originalDatapoints, List<String> constants) { SystemAssert.requireArgument(constants != null, "This transform needs constants"); SystemAssert.requireArgument(constants.size() == 2, "This transform must provide exactly 2 constants."); this.threshold = getOffsetInSeconds(constants.get(0)) * 1000; this.connectDistance = getOffsetInSeconds(constants.get(1)) * 1000; Map<Long, Double> resultMetric = new TreeMap<>(); this.keyList = new ArrayList<Long>(); this.resultKeyList = new ArrayList<Long>(); keyList.addAll(originalDatapoints.keySet()); Collections.sort(keyList); if (keyList.size() > 0){ connect(0, new ArrayList<>(Arrays.asList(keyList.get(0)))); } for(Long resultKey : resultKeyList){ resultMetric.put(resultKey, originalDatapoints.get(resultKey)); } return resultMetric; }
class class_name[name] begin[{] method[mapping, return_type[type[Map]], modifier[public], parameter[originalDatapoints, constants]] begin[{] call[SystemAssert.requireArgument, parameter[binary_operation[member[.constants], !=, literal[null]], literal["This transform needs constants"]]] call[SystemAssert.requireArgument, parameter[binary_operation[call[constants.size, parameter[]], ==, literal[2]], literal["This transform must provide exactly 2 constants."]]] assign[THIS[member[None.threshold]], binary_operation[call[.getOffsetInSeconds, parameter[call[constants.get, parameter[literal[0]]]]], *, literal[1000]]] assign[THIS[member[None.connectDistance]], binary_operation[call[.getOffsetInSeconds, parameter[call[constants.get, parameter[literal[1]]]]], *, literal[1000]]] local_variable[type[Map], resultMetric] assign[THIS[member[None.keyList]], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Long, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))] assign[THIS[member[None.resultKeyList]], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Long, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))] call[keyList.addAll, parameter[call[originalDatapoints.keySet, parameter[]]]] call[Collections.sort, parameter[member[.keyList]]] if[binary_operation[call[keyList.size, parameter[]], >, literal[0]]] begin[{] call[.connect, parameter[literal[0], ClassCreator(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=keyList, selectors=[], type_arguments=None)], member=asList, postfix_operators=[], prefix_operators=[], qualifier=Arrays, 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))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=resultKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=resultKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=originalDatapoints, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=resultMetric, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=resultKeyList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=resultKey)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Long, sub_type=None))), label=None) return[member[.resultMetric]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Map] operator[<] identifier[Long] , identifier[Double] operator[>] identifier[mapping] operator[SEP] identifier[Map] operator[<] identifier[Long] , identifier[Double] operator[>] identifier[originalDatapoints] , identifier[List] operator[<] identifier[String] operator[>] identifier[constants] operator[SEP] { identifier[SystemAssert] operator[SEP] identifier[requireArgument] operator[SEP] identifier[constants] operator[!=] Other[null] , literal[String] operator[SEP] operator[SEP] identifier[SystemAssert] operator[SEP] identifier[requireArgument] operator[SEP] identifier[constants] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[2] , literal[String] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[threshold] operator[=] identifier[getOffsetInSeconds] operator[SEP] identifier[constants] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[*] Other[1000] operator[SEP] Keyword[this] operator[SEP] identifier[connectDistance] operator[=] identifier[getOffsetInSeconds] operator[SEP] identifier[constants] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[*] Other[1000] operator[SEP] identifier[Map] operator[<] identifier[Long] , identifier[Double] operator[>] identifier[resultMetric] operator[=] Keyword[new] identifier[TreeMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[keyList] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Long] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[resultKeyList] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Long] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[keyList] operator[SEP] identifier[addAll] operator[SEP] identifier[originalDatapoints] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Collections] operator[SEP] identifier[sort] operator[SEP] identifier[keyList] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[keyList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[connect] operator[SEP] Other[0] , Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[keyList] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[Long] identifier[resultKey] operator[:] identifier[resultKeyList] operator[SEP] { identifier[resultMetric] operator[SEP] identifier[put] operator[SEP] identifier[resultKey] , identifier[originalDatapoints] operator[SEP] identifier[get] operator[SEP] identifier[resultKey] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[resultMetric] operator[SEP] }
@SuppressWarnings("unchecked") protected final <T extends AmazonWebServiceRequest> T beforeMarshalling( T request) { T local = request; for (RequestHandler2 handler : requestHandler2s) { local = (T) handler.beforeMarshalling(local); } return local; }
class class_name[name] begin[{] method[beforeMarshalling, return_type[type[T]], modifier[final protected], parameter[request]] begin[{] local_variable[type[T], local] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=local, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=local, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=beforeMarshalling, postfix_operators=[], prefix_operators=[], qualifier=handler, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=requestHandler2s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=handler)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=RequestHandler2, sub_type=None))), label=None) return[member[.local]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] Keyword[final] operator[<] identifier[T] Keyword[extends] identifier[AmazonWebServiceRequest] operator[>] identifier[T] identifier[beforeMarshalling] operator[SEP] identifier[T] identifier[request] operator[SEP] { identifier[T] identifier[local] operator[=] identifier[request] operator[SEP] Keyword[for] operator[SEP] identifier[RequestHandler2] identifier[handler] operator[:] identifier[requestHandler2s] operator[SEP] { identifier[local] operator[=] operator[SEP] identifier[T] operator[SEP] identifier[handler] operator[SEP] identifier[beforeMarshalling] operator[SEP] identifier[local] operator[SEP] operator[SEP] } Keyword[return] identifier[local] operator[SEP] }
public static void setPreferredLineDrawingAlgorithm(BusLayerDrawerType algorithm) { final Preferences prefs = Preferences.userNodeForPackage(BusLayerConstants.class); if (prefs != null) { if (algorithm == null) { prefs.remove("DRAWING_ALGORITHM"); //$NON-NLS-1$ } else { prefs.put("DRAWING_ALGORITHM", algorithm.name()); //$NON-NLS-1$ } } }
class class_name[name] begin[{] method[setPreferredLineDrawingAlgorithm, return_type[void], modifier[public static], parameter[algorithm]] begin[{] local_variable[type[Preferences], prefs] if[binary_operation[member[.prefs], !=, literal[null]]] begin[{] if[binary_operation[member[.algorithm], ==, literal[null]]] begin[{] call[prefs.remove, parameter[literal["DRAWING_ALGORITHM"]]] else begin[{] call[prefs.put, parameter[literal["DRAWING_ALGORITHM"], call[algorithm.name, parameter[]]]] end[}] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[setPreferredLineDrawingAlgorithm] operator[SEP] identifier[BusLayerDrawerType] identifier[algorithm] operator[SEP] { Keyword[final] identifier[Preferences] identifier[prefs] operator[=] identifier[Preferences] operator[SEP] identifier[userNodeForPackage] operator[SEP] identifier[BusLayerConstants] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[prefs] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[algorithm] operator[==] Other[null] operator[SEP] { identifier[prefs] operator[SEP] identifier[remove] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[prefs] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[algorithm] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } }
@Override public String getUserFacingMessage() { final StringBuilder bldr = new StringBuilder(); String rl = getResourceLocation(); String pref = getPrefix(); String val = getValue(); bldr.append("symbol "); bldr.append(val); bldr.append(" does not exist in "); if (hasLength(pref)) { bldr.append(pref); } else { bldr.append(rl); } return bldr.toString(); }
class class_name[name] begin[{] method[getUserFacingMessage, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[StringBuilder], bldr] local_variable[type[String], rl] local_variable[type[String], pref] local_variable[type[String], val] call[bldr.append, parameter[literal["symbol "]]] call[bldr.append, parameter[member[.val]]] call[bldr.append, parameter[literal[" does not exist in "]]] if[call[.hasLength, parameter[member[.pref]]]] begin[{] call[bldr.append, parameter[member[.pref]]] else begin[{] call[bldr.append, parameter[member[.rl]]] end[}] return[call[bldr.toString, parameter[]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[getUserFacingMessage] operator[SEP] operator[SEP] { Keyword[final] identifier[StringBuilder] identifier[bldr] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[rl] operator[=] identifier[getResourceLocation] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[pref] operator[=] identifier[getPrefix] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[val] operator[=] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[bldr] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[bldr] operator[SEP] identifier[append] operator[SEP] identifier[val] operator[SEP] operator[SEP] identifier[bldr] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[hasLength] operator[SEP] identifier[pref] operator[SEP] operator[SEP] { identifier[bldr] operator[SEP] identifier[append] operator[SEP] identifier[pref] operator[SEP] operator[SEP] } Keyword[else] { identifier[bldr] operator[SEP] identifier[append] operator[SEP] identifier[rl] operator[SEP] operator[SEP] } Keyword[return] identifier[bldr] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public static MozuUrl getFacetCategoryListUrl(Integer categoryId, Boolean includeAvailable, String responseFields, Boolean validate) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/facets/category/{categoryId}?includeAvailable={includeAvailable}&validate={validate}&responseFields={responseFields}"); formatter.formatUrl("categoryId", categoryId); formatter.formatUrl("includeAvailable", includeAvailable); formatter.formatUrl("responseFields", responseFields); formatter.formatUrl("validate", validate); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
class class_name[name] begin[{] method[getFacetCategoryListUrl, return_type[type[MozuUrl]], modifier[public static], parameter[categoryId, includeAvailable, responseFields, validate]] begin[{] local_variable[type[UrlFormatter], formatter] call[formatter.formatUrl, parameter[literal["categoryId"], member[.categoryId]]] call[formatter.formatUrl, parameter[literal["includeAvailable"], member[.includeAvailable]]] call[formatter.formatUrl, parameter[literal["responseFields"], member[.responseFields]]] call[formatter.formatUrl, parameter[literal["validate"], member[.validate]]] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getResourceUrl, postfix_operators=[], prefix_operators=[], qualifier=formatter, selectors=[], type_arguments=None), MemberReference(member=TENANT_POD, postfix_operators=[], prefix_operators=[], qualifier=MozuUrl.UrlLocation, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MozuUrl, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[MozuUrl] identifier[getFacetCategoryListUrl] operator[SEP] identifier[Integer] identifier[categoryId] , identifier[Boolean] identifier[includeAvailable] , identifier[String] identifier[responseFields] , identifier[Boolean] identifier[validate] operator[SEP] { identifier[UrlFormatter] identifier[formatter] operator[=] Keyword[new] identifier[UrlFormatter] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[formatter] operator[SEP] identifier[formatUrl] operator[SEP] literal[String] , identifier[categoryId] operator[SEP] operator[SEP] identifier[formatter] operator[SEP] identifier[formatUrl] operator[SEP] literal[String] , identifier[includeAvailable] operator[SEP] operator[SEP] identifier[formatter] operator[SEP] identifier[formatUrl] operator[SEP] literal[String] , identifier[responseFields] operator[SEP] operator[SEP] identifier[formatter] operator[SEP] identifier[formatUrl] operator[SEP] literal[String] , identifier[validate] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[MozuUrl] operator[SEP] identifier[formatter] operator[SEP] identifier[getResourceUrl] operator[SEP] operator[SEP] , identifier[MozuUrl] operator[SEP] identifier[UrlLocation] operator[SEP] identifier[TENANT_POD] operator[SEP] operator[SEP] }
public static String[] split(String string, char delimiter) { int delimeterCount = 0; int start = 0; int end; while ((end = string.indexOf(delimiter, start)) != -1) { delimeterCount++; start = end + 1; } String[] result = new String[delimeterCount + 1]; start = 0; for (int i = 0; i < delimeterCount; i++) { end = string.indexOf(delimiter, start); result[i] = string.substring(start, end); start = end + 1; } result[delimeterCount] = string.substring(start, string.length()); return result; }
class class_name[name] begin[{] method[split, return_type[type[String]], modifier[public static], parameter[string, delimiter]] begin[{] local_variable[type[int], delimeterCount] local_variable[type[int], start] local_variable[type[int], end] while[binary_operation[assign[member[.end], call[string.indexOf, parameter[member[.delimiter], member[.start]]]], !=, literal[1]]] begin[{] member[.delimeterCount] assign[member[.start], binary_operation[member[.end], +, literal[1]]] end[}] local_variable[type[String], result] assign[member[.start], literal[0]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=delimiter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=string, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=string, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=delimeterCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) assign[member[.result], call[string.substring, parameter[member[.start], call[string.length, parameter[]]]]] return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] operator[SEP] operator[SEP] identifier[split] operator[SEP] identifier[String] identifier[string] , Keyword[char] identifier[delimiter] operator[SEP] { Keyword[int] identifier[delimeterCount] operator[=] Other[0] operator[SEP] Keyword[int] identifier[start] operator[=] Other[0] operator[SEP] Keyword[int] identifier[end] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[end] operator[=] identifier[string] operator[SEP] identifier[indexOf] operator[SEP] identifier[delimiter] , identifier[start] operator[SEP] operator[SEP] operator[!=] operator[-] Other[1] operator[SEP] { identifier[delimeterCount] operator[++] operator[SEP] identifier[start] operator[=] identifier[end] operator[+] Other[1] operator[SEP] } identifier[String] operator[SEP] operator[SEP] identifier[result] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[delimeterCount] operator[+] Other[1] operator[SEP] operator[SEP] identifier[start] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[delimeterCount] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[end] operator[=] identifier[string] operator[SEP] identifier[indexOf] operator[SEP] identifier[delimiter] , identifier[start] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[string] operator[SEP] identifier[substring] operator[SEP] identifier[start] , identifier[end] operator[SEP] operator[SEP] identifier[start] operator[=] identifier[end] operator[+] Other[1] operator[SEP] } identifier[result] operator[SEP] identifier[delimeterCount] operator[SEP] operator[=] identifier[string] operator[SEP] identifier[substring] operator[SEP] identifier[start] , identifier[string] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
@Nullable public static Bitmap mutable(Bitmap source) { if (source.isMutable()) { return source; } Config config = source.getConfig(); Bitmap bm = source.copy(config != null ? config : ARGB_8888, true); if (bm != null) { source.recycle(); } return bm; }
class class_name[name] begin[{] method[mutable, return_type[type[Bitmap]], modifier[public static], parameter[source]] begin[{] if[call[source.isMutable, parameter[]]] begin[{] return[member[.source]] else begin[{] None end[}] local_variable[type[Config], config] local_variable[type[Bitmap], bm] if[binary_operation[member[.bm], !=, literal[null]]] begin[{] call[source.recycle, parameter[]] else begin[{] None end[}] return[member[.bm]] end[}] END[}]
annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[Bitmap] identifier[mutable] operator[SEP] identifier[Bitmap] identifier[source] operator[SEP] { Keyword[if] operator[SEP] identifier[source] operator[SEP] identifier[isMutable] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[source] operator[SEP] } identifier[Config] identifier[config] operator[=] identifier[source] operator[SEP] identifier[getConfig] operator[SEP] operator[SEP] operator[SEP] identifier[Bitmap] identifier[bm] operator[=] identifier[source] operator[SEP] identifier[copy] operator[SEP] identifier[config] operator[!=] Other[null] operator[?] identifier[config] operator[:] identifier[ARGB_8888] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[bm] operator[!=] Other[null] operator[SEP] { identifier[source] operator[SEP] identifier[recycle] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[bm] operator[SEP] }
protected static void submitSuccessfulTableAlter(EventSubmitter eventSubmitter, HiveTable table) { eventSubmitter.submit(TABLE_ALTER+SUCCESS_POSTFIX, getAdditionalMetadata(table, Optional.<HivePartition> absent(), Optional.<Exception> absent())); }
class class_name[name] begin[{] method[submitSuccessfulTableAlter, return_type[void], modifier[static protected], parameter[eventSubmitter, table]] begin[{] call[eventSubmitter.submit, parameter[binary_operation[member[.TABLE_ALTER], +, member[.SUCCESS_POSTFIX]], call[.getAdditionalMetadata, parameter[member[.table], call[.Optional, parameter[]], call[.Optional, parameter[]]]]]] end[}] END[}]
Keyword[protected] Keyword[static] Keyword[void] identifier[submitSuccessfulTableAlter] operator[SEP] identifier[EventSubmitter] identifier[eventSubmitter] , identifier[HiveTable] identifier[table] operator[SEP] { identifier[eventSubmitter] operator[SEP] identifier[submit] operator[SEP] identifier[TABLE_ALTER] operator[+] identifier[SUCCESS_POSTFIX] , identifier[getAdditionalMetadata] operator[SEP] identifier[table] , identifier[Optional] operator[SEP] operator[<] identifier[HivePartition] operator[>] identifier[absent] operator[SEP] operator[SEP] , identifier[Optional] operator[SEP] operator[<] identifier[Exception] operator[>] identifier[absent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
static boolean matches(String template, String hostName) { if (template.startsWith("*.")) { return template.regionMatches(2, hostName, 0, hostName.length()) || commonSuffixOfLength(hostName, template, template.length() - 1); } return template.equals(hostName); }
class class_name[name] begin[{] method[matches, return_type[type[boolean]], modifier[static], parameter[template, hostName]] begin[{] if[call[template.startsWith, parameter[literal["*."]]]] begin[{] return[binary_operation[call[template.regionMatches, parameter[literal[2], member[.hostName], literal[0], call[hostName.length, parameter[]]]], ||, call[.commonSuffixOfLength, parameter[member[.hostName], member[.template], binary_operation[call[template.length, parameter[]], -, literal[1]]]]]] else begin[{] None end[}] return[call[template.equals, parameter[member[.hostName]]]] end[}] END[}]
Keyword[static] Keyword[boolean] identifier[matches] operator[SEP] identifier[String] identifier[template] , identifier[String] identifier[hostName] operator[SEP] { Keyword[if] operator[SEP] identifier[template] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] identifier[template] operator[SEP] identifier[regionMatches] operator[SEP] Other[2] , identifier[hostName] , Other[0] , identifier[hostName] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[||] identifier[commonSuffixOfLength] operator[SEP] identifier[hostName] , identifier[template] , identifier[template] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] } Keyword[return] identifier[template] operator[SEP] identifier[equals] operator[SEP] identifier[hostName] operator[SEP] operator[SEP] }
public String sendMessage(String gatewayId, Struct data) throws PageException, IOException { Gateway g = getGateway(gatewayId); if (g.getState() != Gateway.RUNNING) throw new GatewayException("Gateway [" + gatewayId + "] is not running"); return g.sendMessage(data); }
class class_name[name] begin[{] method[sendMessage, return_type[type[String]], modifier[public], parameter[gatewayId, data]] begin[{] local_variable[type[Gateway], g] if[binary_operation[call[g.getState, parameter[]], !=, member[Gateway.RUNNING]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Gateway ["), operandr=MemberReference(member=gatewayId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="] is not running"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GatewayException, sub_type=None)), label=None) else begin[{] None end[}] return[call[g.sendMessage, parameter[member[.data]]]] end[}] END[}]
Keyword[public] identifier[String] identifier[sendMessage] operator[SEP] identifier[String] identifier[gatewayId] , identifier[Struct] identifier[data] operator[SEP] Keyword[throws] identifier[PageException] , identifier[IOException] { identifier[Gateway] identifier[g] operator[=] identifier[getGateway] operator[SEP] identifier[gatewayId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[g] operator[SEP] identifier[getState] operator[SEP] operator[SEP] operator[!=] identifier[Gateway] operator[SEP] identifier[RUNNING] operator[SEP] Keyword[throw] Keyword[new] identifier[GatewayException] operator[SEP] literal[String] operator[+] identifier[gatewayId] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[g] operator[SEP] identifier[sendMessage] operator[SEP] identifier[data] operator[SEP] operator[SEP] }
public T resolve(final Class<? extends T> wrapperClass) { String wrapperClassName = wrapperClass.getName(); T wrapper = lookup(wrapperClassName); if (wrapper == null) { wrapper = createWrapper(wrapperClass); initializeWrapper(wrapper); wrappers.put(wrapperClassName, wrapper); } return wrapper; }
class class_name[name] begin[{] method[resolve, return_type[type[T]], modifier[public], parameter[wrapperClass]] begin[{] local_variable[type[String], wrapperClassName] local_variable[type[T], wrapper] if[binary_operation[member[.wrapper], ==, literal[null]]] begin[{] assign[member[.wrapper], call[.createWrapper, parameter[member[.wrapperClass]]]] call[.initializeWrapper, parameter[member[.wrapper]]] call[wrappers.put, parameter[member[.wrapperClassName], member[.wrapper]]] else begin[{] None end[}] return[member[.wrapper]] end[}] END[}]
Keyword[public] identifier[T] identifier[resolve] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] identifier[wrapperClass] operator[SEP] { identifier[String] identifier[wrapperClassName] operator[=] identifier[wrapperClass] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[T] identifier[wrapper] operator[=] identifier[lookup] operator[SEP] identifier[wrapperClassName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[wrapper] operator[==] Other[null] operator[SEP] { identifier[wrapper] operator[=] identifier[createWrapper] operator[SEP] identifier[wrapperClass] operator[SEP] operator[SEP] identifier[initializeWrapper] operator[SEP] identifier[wrapper] operator[SEP] operator[SEP] identifier[wrappers] operator[SEP] identifier[put] operator[SEP] identifier[wrapperClassName] , identifier[wrapper] operator[SEP] operator[SEP] } Keyword[return] identifier[wrapper] operator[SEP] }
public static <T> CloseableIterable<T> singleton(T value) { return fromIterable(Collections.singleton(value)); }
class class_name[name] begin[{] method[singleton, return_type[type[CloseableIterable]], modifier[public static], parameter[value]] begin[{] return[call[.fromIterable, parameter[call[Collections.singleton, parameter[member[.value]]]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[CloseableIterable] operator[<] identifier[T] operator[>] identifier[singleton] operator[SEP] identifier[T] identifier[value] operator[SEP] { Keyword[return] identifier[fromIterable] operator[SEP] identifier[Collections] operator[SEP] identifier[singleton] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] }
public final void synpred270_Java_fragment() throws RecognitionException { // src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1235:8: ( '[' expression ']' ) // src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1235:8: '[' expression ']' { match(input,59,FOLLOW_59_in_synpred270_Java5893); if (state.failed) return; pushFollow(FOLLOW_expression_in_synpred270_Java5895); expression(); state._fsp--; if (state.failed) return; match(input,60,FOLLOW_60_in_synpred270_Java5897); if (state.failed) return; } }
class class_name[name] begin[{] method[synpred270_Java_fragment, return_type[void], modifier[final public], parameter[]] begin[{] call[.match, parameter[member[.input], literal[59], member[.FOLLOW_59_in_synpred270_Java5893]]] if[member[state.failed]] begin[{] return[None] else begin[{] None end[}] call[.pushFollow, parameter[member[.FOLLOW_expression_in_synpred270_Java5895]]] call[.expression, parameter[]] member[state._fsp] if[member[state.failed]] begin[{] return[None] else begin[{] None end[}] call[.match, parameter[member[.input], literal[60], member[.FOLLOW_60_in_synpred270_Java5897]]] if[member[state.failed]] begin[{] return[None] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[synpred270_Java_fragment] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { { identifier[match] operator[SEP] identifier[input] , Other[59] , identifier[FOLLOW_59_in_synpred270_Java5893] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] identifier[pushFollow] operator[SEP] identifier[FOLLOW_expression_in_synpred270_Java5895] operator[SEP] operator[SEP] identifier[expression] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] identifier[match] operator[SEP] identifier[input] , Other[60] , identifier[FOLLOW_60_in_synpred270_Java5897] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } }
@Override public URL getResourceUrl(String fileName) { if (fileName == null) { return null; } URL resource = getClass().getResource(fileName); if (resource == null) { resource = Thread.currentThread().getContextClassLoader().getResource(fileName); if (resource == null) { resource = ClassLoader.getSystemResource(fileName); if (resource == null) { File file = new File(fileName); if (file.exists()) { try { resource = file.toURI().toURL(); } catch (MalformedURLException e) { throw new JKException(e); } } } } } return resource; }
class class_name[name] begin[{] method[getResourceUrl, return_type[type[URL]], modifier[public], parameter[fileName]] begin[{] if[binary_operation[member[.fileName], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[URL], resource] if[binary_operation[member[.resource], ==, literal[null]]] begin[{] assign[member[.resource], call[Thread.currentThread, parameter[]]] if[binary_operation[member[.resource], ==, literal[null]]] begin[{] assign[member[.resource], call[ClassLoader.getSystemResource, parameter[member[.fileName]]]] if[binary_operation[member[.resource], ==, literal[null]]] begin[{] local_variable[type[File], file] if[call[file.exists, parameter[]]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=resource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=toURI, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[MethodInvocation(arguments=[], member=toURL, 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=JKException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['MalformedURLException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] return[member[.resource]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[URL] identifier[getResourceUrl] operator[SEP] identifier[String] identifier[fileName] operator[SEP] { Keyword[if] operator[SEP] identifier[fileName] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[URL] identifier[resource] operator[=] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getResource] operator[SEP] identifier[fileName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[resource] operator[==] Other[null] operator[SEP] { identifier[resource] operator[=] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] identifier[getContextClassLoader] operator[SEP] operator[SEP] operator[SEP] identifier[getResource] operator[SEP] identifier[fileName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[resource] operator[==] Other[null] operator[SEP] { identifier[resource] operator[=] identifier[ClassLoader] operator[SEP] identifier[getSystemResource] operator[SEP] identifier[fileName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[resource] operator[==] Other[null] operator[SEP] { identifier[File] identifier[file] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[fileName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[file] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { identifier[resource] operator[=] identifier[file] operator[SEP] identifier[toURI] operator[SEP] operator[SEP] operator[SEP] identifier[toURL] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[MalformedURLException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[JKException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } } } } Keyword[return] identifier[resource] operator[SEP] }
public ColorPixel cross(double r, double g, double b){ return setRGB_fromDouble_preserveAlpha( (g_asDouble()*b)-(g*b_asDouble()), (b_asDouble()*r)-(b*r_asDouble()), (r_asDouble()*g)-(r*g_asDouble())); }
class class_name[name] begin[{] method[cross, return_type[type[ColorPixel]], modifier[public], parameter[r, g, b]] begin[{] return[call[.setRGB_fromDouble_preserveAlpha, parameter[binary_operation[binary_operation[call[.g_asDouble, parameter[]], *, member[.b]], -, binary_operation[member[.g], *, call[.b_asDouble, parameter[]]]], binary_operation[binary_operation[call[.b_asDouble, parameter[]], *, member[.r]], -, binary_operation[member[.b], *, call[.r_asDouble, parameter[]]]], binary_operation[binary_operation[call[.r_asDouble, parameter[]], *, member[.g]], -, binary_operation[member[.r], *, call[.g_asDouble, parameter[]]]]]]] end[}] END[}]
Keyword[public] identifier[ColorPixel] identifier[cross] operator[SEP] Keyword[double] identifier[r] , Keyword[double] identifier[g] , Keyword[double] identifier[b] operator[SEP] { Keyword[return] identifier[setRGB_fromDouble_preserveAlpha] operator[SEP] operator[SEP] identifier[g_asDouble] operator[SEP] operator[SEP] operator[*] identifier[b] operator[SEP] operator[-] operator[SEP] identifier[g] operator[*] identifier[b_asDouble] operator[SEP] operator[SEP] operator[SEP] , operator[SEP] identifier[b_asDouble] operator[SEP] operator[SEP] operator[*] identifier[r] operator[SEP] operator[-] operator[SEP] identifier[b] operator[*] identifier[r_asDouble] operator[SEP] operator[SEP] operator[SEP] , operator[SEP] identifier[r_asDouble] operator[SEP] operator[SEP] operator[*] identifier[g] operator[SEP] operator[-] operator[SEP] identifier[r] operator[*] identifier[g_asDouble] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public Termination withCidrAllowedList(String... cidrAllowedList) { if (this.cidrAllowedList == null) { setCidrAllowedList(new java.util.ArrayList<String>(cidrAllowedList.length)); } for (String ele : cidrAllowedList) { this.cidrAllowedList.add(ele); } return this; }
class class_name[name] begin[{] method[withCidrAllowedList, return_type[type[Termination]], modifier[public], parameter[cidrAllowedList]] begin[{] if[binary_operation[THIS[member[None.cidrAllowedList]], ==, literal[null]]] begin[{] call[.setCidrAllowedList, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=cidrAllowedList, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=cidrAllowedList, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=cidrAllowedList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ele)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[Termination] identifier[withCidrAllowedList] operator[SEP] identifier[String] operator[...] identifier[cidrAllowedList] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[cidrAllowedList] operator[==] Other[null] operator[SEP] { identifier[setCidrAllowedList] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] identifier[cidrAllowedList] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[String] identifier[ele] operator[:] identifier[cidrAllowedList] operator[SEP] { Keyword[this] operator[SEP] identifier[cidrAllowedList] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public static CPAttachmentFileEntry fetchByC_C_Last(long classNameId, long classPK, OrderByComparator<CPAttachmentFileEntry> orderByComparator) { return getPersistence() .fetchByC_C_Last(classNameId, classPK, orderByComparator); }
class class_name[name] begin[{] method[fetchByC_C_Last, return_type[type[CPAttachmentFileEntry]], modifier[public static], parameter[classNameId, classPK, orderByComparator]] begin[{] return[call[.getPersistence, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[CPAttachmentFileEntry] identifier[fetchByC_C_Last] operator[SEP] Keyword[long] identifier[classNameId] , Keyword[long] identifier[classPK] , identifier[OrderByComparator] operator[<] identifier[CPAttachmentFileEntry] operator[>] identifier[orderByComparator] operator[SEP] { Keyword[return] identifier[getPersistence] operator[SEP] operator[SEP] operator[SEP] identifier[fetchByC_C_Last] operator[SEP] identifier[classNameId] , identifier[classPK] , identifier[orderByComparator] operator[SEP] operator[SEP] }
protected void appendArgOrValue(DatabaseType databaseType, FieldType fieldType, StringBuilder sb, List<ArgumentHolder> argList, Object argOrValue) throws SQLException { boolean appendSpace = true; if (argOrValue == null) { throw new SQLException("argument for '" + fieldType.getFieldName() + "' is null"); } else if (argOrValue instanceof ArgumentHolder) { sb.append('?'); ArgumentHolder argHolder = (ArgumentHolder) argOrValue; argHolder.setMetaInfo(columnName, fieldType); argList.add(argHolder); } else if (argOrValue instanceof ColumnArg) { ColumnArg columnArg = (ColumnArg) argOrValue; String tableName = columnArg.getTableName(); if (tableName != null) { databaseType.appendEscapedEntityName(sb, tableName); sb.append('.'); } databaseType.appendEscapedEntityName(sb, columnArg.getColumnName()); } else if (fieldType.isArgumentHolderRequired()) { sb.append('?'); ArgumentHolder argHolder = new SelectArg(); argHolder.setMetaInfo(columnName, fieldType); // conversion is done when the getValue() is called argHolder.setValue(argOrValue); argList.add(argHolder); } else if (fieldType.isForeign() && fieldType.getType().isAssignableFrom(argOrValue.getClass())) { /* * If we have a foreign field and our argument is an instance of the foreign object (i.e. not its id), then * we need to extract the id. We allow super-classes of the field but not sub-classes. */ FieldType idFieldType = fieldType.getForeignIdField(); appendArgOrValue(databaseType, idFieldType, sb, argList, idFieldType.extractJavaFieldValue(argOrValue)); // no need for the space since it was done in the recursion appendSpace = false; } else if (fieldType.isEscapedValue()) { databaseType.appendEscapedWord(sb, fieldType.convertJavaFieldToSqlArgValue(argOrValue).toString()); } else if (fieldType.isForeign()) { /* * I'm not entirely sure this is correct. This is trying to protect against someone trying to pass an object * into a comparison with a foreign field. Typically if they pass the same field type, then ORMLite will * extract the ID of the foreign. */ String value = fieldType.convertJavaFieldToSqlArgValue(argOrValue).toString(); if (value.length() > 0) { if (NUMBER_CHARACTERS.indexOf(value.charAt(0)) < 0) { throw new SQLException("Foreign field " + fieldType + " does not seem to be producing a numerical value '" + value + "'. Maybe you are passing the wrong object to comparison: " + this); } } sb.append(value); } else { // numbers can't have quotes around them in derby sb.append(fieldType.convertJavaFieldToSqlArgValue(argOrValue)); } if (appendSpace) { sb.append(' '); } }
class class_name[name] begin[{] method[appendArgOrValue, return_type[void], modifier[protected], parameter[databaseType, fieldType, sb, argList, argOrValue]] begin[{] local_variable[type[boolean], appendSpace] if[binary_operation[member[.argOrValue], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="argument for '"), operandr=MethodInvocation(arguments=[], member=getFieldName, postfix_operators=[], prefix_operators=[], qualifier=fieldType, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' is null"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SQLException, sub_type=None)), label=None) else begin[{] if[binary_operation[member[.argOrValue], instanceof, type[ArgumentHolder]]] begin[{] call[sb.append, parameter[literal['?']]] local_variable[type[ArgumentHolder], argHolder] call[argHolder.setMetaInfo, parameter[member[.columnName], member[.fieldType]]] call[argList.add, parameter[member[.argHolder]]] else begin[{] if[binary_operation[member[.argOrValue], instanceof, type[ColumnArg]]] begin[{] local_variable[type[ColumnArg], columnArg] local_variable[type[String], tableName] if[binary_operation[member[.tableName], !=, literal[null]]] begin[{] call[databaseType.appendEscapedEntityName, parameter[member[.sb], member[.tableName]]] call[sb.append, parameter[literal['.']]] else begin[{] None end[}] call[databaseType.appendEscapedEntityName, parameter[member[.sb], call[columnArg.getColumnName, parameter[]]]] else begin[{] if[call[fieldType.isArgumentHolderRequired, parameter[]]] begin[{] call[sb.append, parameter[literal['?']]] local_variable[type[ArgumentHolder], argHolder] call[argHolder.setMetaInfo, parameter[member[.columnName], member[.fieldType]]] call[argHolder.setValue, parameter[member[.argOrValue]]] call[argList.add, parameter[member[.argHolder]]] else begin[{] if[binary_operation[call[fieldType.isForeign, parameter[]], &&, call[fieldType.getType, parameter[]]]] begin[{] local_variable[type[FieldType], idFieldType] call[.appendArgOrValue, parameter[member[.databaseType], member[.idFieldType], member[.sb], member[.argList], call[idFieldType.extractJavaFieldValue, parameter[member[.argOrValue]]]]] assign[member[.appendSpace], literal[false]] else begin[{] if[call[fieldType.isEscapedValue, parameter[]]] begin[{] call[databaseType.appendEscapedWord, parameter[member[.sb], call[fieldType.convertJavaFieldToSqlArgValue, parameter[member[.argOrValue]]]]] else begin[{] if[call[fieldType.isForeign, parameter[]]] begin[{] local_variable[type[String], value] if[binary_operation[call[value.length, parameter[]], >, literal[0]]] begin[{] if[binary_operation[call[NUMBER_CHARACTERS.indexOf, parameter[call[value.charAt, parameter[literal[0]]]]], <, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Foreign field "), operandr=MemberReference(member=fieldType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" does not seem to be producing a numerical value '"), operator=+), operandr=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'. Maybe you are passing the wrong object to comparison: "), operator=+), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SQLException, sub_type=None)), label=None) else begin[{] None end[}] else begin[{] None end[}] call[sb.append, parameter[member[.value]]] else begin[{] call[sb.append, parameter[call[fieldType.convertJavaFieldToSqlArgValue, parameter[member[.argOrValue]]]]] end[}] end[}] end[}] end[}] end[}] end[}] end[}] if[member[.appendSpace]] begin[{] call[sb.append, parameter[literal[' ']]] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[appendArgOrValue] operator[SEP] identifier[DatabaseType] identifier[databaseType] , identifier[FieldType] identifier[fieldType] , identifier[StringBuilder] identifier[sb] , identifier[List] operator[<] identifier[ArgumentHolder] operator[>] identifier[argList] , identifier[Object] identifier[argOrValue] operator[SEP] Keyword[throws] identifier[SQLException] { Keyword[boolean] identifier[appendSpace] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[argOrValue] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SQLException] operator[SEP] literal[String] operator[+] identifier[fieldType] operator[SEP] identifier[getFieldName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[argOrValue] Keyword[instanceof] identifier[ArgumentHolder] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[ArgumentHolder] identifier[argHolder] operator[=] operator[SEP] identifier[ArgumentHolder] operator[SEP] identifier[argOrValue] operator[SEP] identifier[argHolder] operator[SEP] identifier[setMetaInfo] operator[SEP] identifier[columnName] , identifier[fieldType] operator[SEP] operator[SEP] identifier[argList] operator[SEP] identifier[add] operator[SEP] identifier[argHolder] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[argOrValue] Keyword[instanceof] identifier[ColumnArg] operator[SEP] { identifier[ColumnArg] identifier[columnArg] operator[=] operator[SEP] identifier[ColumnArg] operator[SEP] identifier[argOrValue] operator[SEP] identifier[String] identifier[tableName] operator[=] identifier[columnArg] operator[SEP] identifier[getTableName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tableName] operator[!=] Other[null] operator[SEP] { identifier[databaseType] operator[SEP] identifier[appendEscapedEntityName] operator[SEP] identifier[sb] , identifier[tableName] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[databaseType] operator[SEP] identifier[appendEscapedEntityName] operator[SEP] identifier[sb] , identifier[columnArg] operator[SEP] identifier[getColumnName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[fieldType] operator[SEP] identifier[isArgumentHolderRequired] operator[SEP] operator[SEP] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[ArgumentHolder] identifier[argHolder] operator[=] Keyword[new] identifier[SelectArg] operator[SEP] operator[SEP] operator[SEP] identifier[argHolder] operator[SEP] identifier[setMetaInfo] operator[SEP] identifier[columnName] , identifier[fieldType] operator[SEP] operator[SEP] identifier[argHolder] operator[SEP] identifier[setValue] operator[SEP] identifier[argOrValue] operator[SEP] operator[SEP] identifier[argList] operator[SEP] identifier[add] operator[SEP] identifier[argHolder] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[fieldType] operator[SEP] identifier[isForeign] operator[SEP] operator[SEP] operator[&&] identifier[fieldType] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[argOrValue] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[FieldType] identifier[idFieldType] operator[=] identifier[fieldType] operator[SEP] identifier[getForeignIdField] operator[SEP] operator[SEP] operator[SEP] identifier[appendArgOrValue] operator[SEP] identifier[databaseType] , identifier[idFieldType] , identifier[sb] , identifier[argList] , identifier[idFieldType] operator[SEP] identifier[extractJavaFieldValue] operator[SEP] identifier[argOrValue] operator[SEP] operator[SEP] operator[SEP] identifier[appendSpace] operator[=] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[fieldType] operator[SEP] identifier[isEscapedValue] operator[SEP] operator[SEP] operator[SEP] { identifier[databaseType] operator[SEP] identifier[appendEscapedWord] operator[SEP] identifier[sb] , identifier[fieldType] operator[SEP] identifier[convertJavaFieldToSqlArgValue] operator[SEP] identifier[argOrValue] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[fieldType] operator[SEP] identifier[isForeign] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[value] operator[=] identifier[fieldType] operator[SEP] identifier[convertJavaFieldToSqlArgValue] operator[SEP] identifier[argOrValue] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[NUMBER_CHARACTERS] operator[SEP] identifier[indexOf] operator[SEP] identifier[value] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[<] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[SQLException] operator[SEP] literal[String] operator[+] identifier[fieldType] operator[+] literal[String] operator[+] identifier[value] operator[+] literal[String] operator[+] Keyword[this] operator[SEP] operator[SEP] } } identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[value] operator[SEP] operator[SEP] } Keyword[else] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[fieldType] operator[SEP] identifier[convertJavaFieldToSqlArgValue] operator[SEP] identifier[argOrValue] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[appendSpace] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } }