code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public boolean isNodeType(InternalQName qName) throws RepositoryException { checkValid(); return session.getWorkspace().getNodeTypesHolder().isNodeType(qName, nodeData().getPrimaryTypeName(), nodeData().getMixinTypeNames()); }
class class_name[name] begin[{] method[isNodeType, return_type[type[boolean]], modifier[public], parameter[qName]] begin[{] call[.checkValid, parameter[]] return[call[session.getWorkspace, parameter[]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isNodeType] operator[SEP] identifier[InternalQName] identifier[qName] operator[SEP] Keyword[throws] identifier[RepositoryException] { identifier[checkValid] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[session] operator[SEP] identifier[getWorkspace] operator[SEP] operator[SEP] operator[SEP] identifier[getNodeTypesHolder] operator[SEP] operator[SEP] operator[SEP] identifier[isNodeType] operator[SEP] identifier[qName] , identifier[nodeData] operator[SEP] operator[SEP] operator[SEP] identifier[getPrimaryTypeName] operator[SEP] operator[SEP] , identifier[nodeData] operator[SEP] operator[SEP] operator[SEP] identifier[getMixinTypeNames] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public BatchGetItemResult withResponses(java.util.Map<String,BatchResponse> responses) { setResponses(responses); return this; }
class class_name[name] begin[{] method[withResponses, return_type[type[BatchGetItemResult]], modifier[public], parameter[responses]] begin[{] call[.setResponses, parameter[member[.responses]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[BatchGetItemResult] identifier[withResponses] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[BatchResponse] operator[>] identifier[responses] operator[SEP] { identifier[setResponses] operator[SEP] identifier[responses] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
protected void renderItemIcon(AbstractRenderAppender writer, TreeElement node, AttributeRenderer attrs, InheritableState state) { renderItemIconPrefix(writer, node); // There should always be one unless the tree turns off default // icons by setting the useDefaultIcons attribute to false. String icon = node.getIcon(); if (icon == null) { icon = state.getIconRoot() + "/" + state.getItemIcon(); } else { icon = state.getIconRoot() + "/" + icon; } // write out the icon if (icon != null) { _imgState.clear(); _imgState.src = icon; _imgState.style = "vertical-align:text-top"; String alt = null; String label = node.getLabel(); if (label != null && node.isLabelLegalAsAlt()) alt = label; else alt = node.getTitle(); if (alt == null) alt = Bundle.getString("Tags_TreeAltText", null); _imgState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, ALT, alt, false); _imgState.registerAttribute(AbstractHtmlState.ATTR_GENERAL, BORDER, "0"); // set the inheritted attributes attrs.renderIconImage(_imgState, node); _imageRenderer.doStartTag(writer, _imgState); _imageRenderer.doEndTag(writer); renderItemIconSuffix(writer, node); } }
class class_name[name] begin[{] method[renderItemIcon, return_type[void], modifier[protected], parameter[writer, node, attrs, state]] begin[{] call[.renderItemIconPrefix, parameter[member[.writer], member[.node]]] local_variable[type[String], icon] if[binary_operation[member[.icon], ==, literal[null]]] begin[{] assign[member[.icon], binary_operation[binary_operation[call[state.getIconRoot, parameter[]], +, literal["/"]], +, call[state.getItemIcon, parameter[]]]] else begin[{] assign[member[.icon], binary_operation[binary_operation[call[state.getIconRoot, parameter[]], +, literal["/"]], +, member[.icon]]] end[}] if[binary_operation[member[.icon], !=, literal[null]]] begin[{] call[_imgState.clear, parameter[]] assign[member[_imgState.src], member[.icon]] assign[member[_imgState.style], literal["vertical-align:text-top"]] local_variable[type[String], alt] local_variable[type[String], label] if[binary_operation[binary_operation[member[.label], !=, literal[null]], &&, call[node.isLabelLegalAsAlt, parameter[]]]] begin[{] assign[member[.alt], member[.label]] else begin[{] assign[member[.alt], call[node.getTitle, parameter[]]] end[}] if[binary_operation[member[.alt], ==, literal[null]]] begin[{] assign[member[.alt], call[Bundle.getString, parameter[literal["Tags_TreeAltText"], literal[null]]]] else begin[{] None end[}] call[_imgState.registerAttribute, parameter[member[AbstractHtmlState.ATTR_GENERAL], member[.ALT], member[.alt], literal[false]]] call[_imgState.registerAttribute, parameter[member[AbstractHtmlState.ATTR_GENERAL], member[.BORDER], literal["0"]]] call[attrs.renderIconImage, parameter[member[._imgState], member[.node]]] call[_imageRenderer.doStartTag, parameter[member[.writer], member[._imgState]]] call[_imageRenderer.doEndTag, parameter[member[.writer]]] call[.renderItemIconSuffix, parameter[member[.writer], member[.node]]] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[renderItemIcon] operator[SEP] identifier[AbstractRenderAppender] identifier[writer] , identifier[TreeElement] identifier[node] , identifier[AttributeRenderer] identifier[attrs] , identifier[InheritableState] identifier[state] operator[SEP] { identifier[renderItemIconPrefix] operator[SEP] identifier[writer] , identifier[node] operator[SEP] operator[SEP] identifier[String] identifier[icon] operator[=] identifier[node] operator[SEP] identifier[getIcon] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[icon] operator[==] Other[null] operator[SEP] { identifier[icon] operator[=] identifier[state] operator[SEP] identifier[getIconRoot] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[state] operator[SEP] identifier[getItemIcon] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[icon] operator[=] identifier[state] operator[SEP] identifier[getIconRoot] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[icon] operator[SEP] } Keyword[if] operator[SEP] identifier[icon] operator[!=] Other[null] operator[SEP] { identifier[_imgState] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[_imgState] operator[SEP] identifier[src] operator[=] identifier[icon] operator[SEP] identifier[_imgState] operator[SEP] identifier[style] operator[=] literal[String] operator[SEP] identifier[String] identifier[alt] operator[=] Other[null] operator[SEP] identifier[String] identifier[label] operator[=] identifier[node] operator[SEP] identifier[getLabel] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[label] operator[!=] Other[null] operator[&&] identifier[node] operator[SEP] identifier[isLabelLegalAsAlt] operator[SEP] operator[SEP] operator[SEP] identifier[alt] operator[=] identifier[label] operator[SEP] Keyword[else] identifier[alt] operator[=] identifier[node] operator[SEP] identifier[getTitle] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[alt] operator[==] Other[null] operator[SEP] identifier[alt] operator[=] identifier[Bundle] operator[SEP] identifier[getString] operator[SEP] literal[String] , Other[null] operator[SEP] operator[SEP] identifier[_imgState] operator[SEP] identifier[registerAttribute] operator[SEP] identifier[AbstractHtmlState] operator[SEP] identifier[ATTR_GENERAL] , identifier[ALT] , identifier[alt] , literal[boolean] operator[SEP] operator[SEP] identifier[_imgState] operator[SEP] identifier[registerAttribute] operator[SEP] identifier[AbstractHtmlState] operator[SEP] identifier[ATTR_GENERAL] , identifier[BORDER] , literal[String] operator[SEP] operator[SEP] identifier[attrs] operator[SEP] identifier[renderIconImage] operator[SEP] identifier[_imgState] , identifier[node] operator[SEP] operator[SEP] identifier[_imageRenderer] operator[SEP] identifier[doStartTag] operator[SEP] identifier[writer] , identifier[_imgState] operator[SEP] operator[SEP] identifier[_imageRenderer] operator[SEP] identifier[doEndTag] operator[SEP] identifier[writer] operator[SEP] operator[SEP] identifier[renderItemIconSuffix] operator[SEP] identifier[writer] , identifier[node] operator[SEP] operator[SEP] } }
private Properties getHotRodConfiguration(Map<?, ?> configurationMap, ConfigurationPropertyReader propertyReader, URL configurationResourceUrl) { Properties hotRodConfiguration = new Properties(); loadResourceFile( configurationResourceUrl, hotRodConfiguration ); setAdditionalProperties( configurationMap, propertyReader, hotRodConfiguration ); setExpectedPropertiesIfNull( hotRodConfiguration ); validate( hotRodConfiguration ); return hotRodConfiguration; }
class class_name[name] begin[{] method[getHotRodConfiguration, return_type[type[Properties]], modifier[private], parameter[configurationMap, propertyReader, configurationResourceUrl]] begin[{] local_variable[type[Properties], hotRodConfiguration] call[.loadResourceFile, parameter[member[.configurationResourceUrl], member[.hotRodConfiguration]]] call[.setAdditionalProperties, parameter[member[.configurationMap], member[.propertyReader], member[.hotRodConfiguration]]] call[.setExpectedPropertiesIfNull, parameter[member[.hotRodConfiguration]]] call[.validate, parameter[member[.hotRodConfiguration]]] return[member[.hotRodConfiguration]] end[}] END[}]
Keyword[private] identifier[Properties] identifier[getHotRodConfiguration] operator[SEP] identifier[Map] operator[<] operator[?] , operator[?] operator[>] identifier[configurationMap] , identifier[ConfigurationPropertyReader] identifier[propertyReader] , identifier[URL] identifier[configurationResourceUrl] operator[SEP] { identifier[Properties] identifier[hotRodConfiguration] operator[=] Keyword[new] identifier[Properties] operator[SEP] operator[SEP] operator[SEP] identifier[loadResourceFile] operator[SEP] identifier[configurationResourceUrl] , identifier[hotRodConfiguration] operator[SEP] operator[SEP] identifier[setAdditionalProperties] operator[SEP] identifier[configurationMap] , identifier[propertyReader] , identifier[hotRodConfiguration] operator[SEP] operator[SEP] identifier[setExpectedPropertiesIfNull] operator[SEP] identifier[hotRodConfiguration] operator[SEP] operator[SEP] identifier[validate] operator[SEP] identifier[hotRodConfiguration] operator[SEP] operator[SEP] Keyword[return] identifier[hotRodConfiguration] operator[SEP] }
public List findUndeliveredList(long tick, JsMessage message) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry( tc, "findUndeliveredList", new Object[] { Long.valueOf(tick), message }); int priority = message.getPriority().intValue(); // The priority to compare against _targetStream.setCursor(_latestTick); TickRange tr2 = null; TickRange tr1 = _targetStream.getPrev(); ArrayList<AIValueTick> temp = null; boolean startNewList = true; do { if (tr1.type == TickRange.Value) { AIValueTick valueTick = (AIValueTick) tr1.value; boolean delivered = valueTick.isDelivered(); int currentPriority = valueTick.getMsgPriority(); // If we did not follow a prevTick link, we need to make sure we use the correct priority // only assured messages can be undelivered, so we need not check for reliability if (!delivered && (currentPriority == priority)) { //JsMessage currentMsg = valueTick.getMsg(); long prevTick = valueTick.getMsg().getMessage().getGuaranteedRemoteGetPrevTick(); if (startNewList) { temp = new ArrayList<AIValueTick>(10); // this code is typically not executed since messages usually arrive in order startNewList = false; } temp.add(valueTick); //targetStream.setCursor(currentMsg.getGuaranteedRemoteGetPrevTick()); _targetStream.setCursor(prevTick); tr2 = tr1; tr1 = _targetStream.getPrev(); continue; } } // We've hit a gap in the requests (an unknown/unsatisfied request), blank out the list built so far as // those cannot be delivered yet. startNewList = true; temp = null; tr2 = tr1; tr1 = _targetStream.getPrev(); } while ((tr1.endstamp > tick) && (tr1 != tr2)); // turn the list around before returning ArrayList<AIValueTick> undeliveredList = null; if (temp != null) { undeliveredList = new ArrayList<AIValueTick>(temp.size()); for (int i = temp.size() - 1; i >= 0; i--) { undeliveredList.add(temp.get(i)); } } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "findUndeliveredList", undeliveredList); return undeliveredList; }
class class_name[name] begin[{] method[findUndeliveredList, return_type[type[List]], modifier[public], parameter[tick, message]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["findUndeliveredList"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[MemberReference(member=tick, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[], type_arguments=None), MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]] else begin[{] None end[}] local_variable[type[int], priority] call[_targetStream.setCursor, parameter[member[._latestTick]]] local_variable[type[TickRange], tr2] local_variable[type[TickRange], tr1] local_variable[type[ArrayList], temp] local_variable[type[boolean], startNewList] do[binary_operation[binary_operation[member[tr1.endstamp], >, member[.tick]], &&, binary_operation[member[.tr1], !=, member[.tr2]]]] begin[{] if[binary_operation[member[tr1.type], ==, member[TickRange.Value]]] begin[{] local_variable[type[AIValueTick], valueTick] local_variable[type[boolean], delivered] local_variable[type[int], currentPriority] if[binary_operation[member[.delivered], &&, binary_operation[member[.currentPriority], ==, member[.priority]]]] begin[{] local_variable[type[long], prevTick] if[member[.startNewList]] begin[{] assign[member[.temp], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10)], 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=AIValueTick, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))] assign[member[.startNewList], literal[false]] else begin[{] None end[}] call[temp.add, parameter[member[.valueTick]]] call[_targetStream.setCursor, parameter[member[.prevTick]]] assign[member[.tr2], member[.tr1]] assign[member[.tr1], call[_targetStream.getPrev, parameter[]]] ContinueStatement(goto=None, label=None) else begin[{] None end[}] else begin[{] None end[}] assign[member[.startNewList], literal[true]] assign[member[.temp], literal[null]] assign[member[.tr2], member[.tr1]] assign[member[.tr1], call[_targetStream.getPrev, parameter[]]] end[}] local_variable[type[ArrayList], undeliveredList] if[binary_operation[member[.temp], !=, literal[null]]] begin[{] assign[member[.undeliveredList], ClassCreator(arguments=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=temp, selectors=[], type_arguments=None)], 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=AIValueTick, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=temp, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=undeliveredList, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=temp, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[])]), label=None) else begin[{] None end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["findUndeliveredList"], member[.undeliveredList]]] else begin[{] None end[}] return[member[.undeliveredList]] end[}] END[}]
Keyword[public] identifier[List] identifier[findUndeliveredList] operator[SEP] Keyword[long] identifier[tick] , identifier[JsMessage] identifier[message] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[Long] operator[SEP] identifier[valueOf] operator[SEP] identifier[tick] operator[SEP] , identifier[message] } operator[SEP] operator[SEP] Keyword[int] identifier[priority] operator[=] identifier[message] operator[SEP] identifier[getPriority] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] identifier[_targetStream] operator[SEP] identifier[setCursor] operator[SEP] identifier[_latestTick] operator[SEP] operator[SEP] identifier[TickRange] identifier[tr2] operator[=] Other[null] operator[SEP] identifier[TickRange] identifier[tr1] operator[=] identifier[_targetStream] operator[SEP] identifier[getPrev] operator[SEP] operator[SEP] operator[SEP] identifier[ArrayList] operator[<] identifier[AIValueTick] operator[>] identifier[temp] operator[=] Other[null] operator[SEP] Keyword[boolean] identifier[startNewList] operator[=] literal[boolean] operator[SEP] Keyword[do] { Keyword[if] operator[SEP] identifier[tr1] operator[SEP] identifier[type] operator[==] identifier[TickRange] operator[SEP] identifier[Value] operator[SEP] { identifier[AIValueTick] identifier[valueTick] operator[=] operator[SEP] identifier[AIValueTick] operator[SEP] identifier[tr1] operator[SEP] identifier[value] operator[SEP] Keyword[boolean] identifier[delivered] operator[=] identifier[valueTick] operator[SEP] identifier[isDelivered] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[currentPriority] operator[=] identifier[valueTick] operator[SEP] identifier[getMsgPriority] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[delivered] operator[&&] operator[SEP] identifier[currentPriority] operator[==] identifier[priority] operator[SEP] operator[SEP] { Keyword[long] identifier[prevTick] operator[=] identifier[valueTick] operator[SEP] identifier[getMsg] operator[SEP] operator[SEP] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] identifier[getGuaranteedRemoteGetPrevTick] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[startNewList] operator[SEP] { identifier[temp] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[AIValueTick] operator[>] operator[SEP] Other[10] operator[SEP] operator[SEP] identifier[startNewList] operator[=] literal[boolean] operator[SEP] } identifier[temp] operator[SEP] identifier[add] operator[SEP] identifier[valueTick] operator[SEP] operator[SEP] identifier[_targetStream] operator[SEP] identifier[setCursor] operator[SEP] identifier[prevTick] operator[SEP] operator[SEP] identifier[tr2] operator[=] identifier[tr1] operator[SEP] identifier[tr1] operator[=] identifier[_targetStream] operator[SEP] identifier[getPrev] operator[SEP] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] } } identifier[startNewList] operator[=] literal[boolean] operator[SEP] identifier[temp] operator[=] Other[null] operator[SEP] identifier[tr2] operator[=] identifier[tr1] operator[SEP] identifier[tr1] operator[=] identifier[_targetStream] operator[SEP] identifier[getPrev] operator[SEP] operator[SEP] operator[SEP] } Keyword[while] operator[SEP] operator[SEP] identifier[tr1] operator[SEP] identifier[endstamp] operator[>] identifier[tick] operator[SEP] operator[&&] operator[SEP] identifier[tr1] operator[!=] identifier[tr2] operator[SEP] operator[SEP] operator[SEP] identifier[ArrayList] operator[<] identifier[AIValueTick] operator[>] identifier[undeliveredList] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[temp] operator[!=] Other[null] operator[SEP] { identifier[undeliveredList] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[AIValueTick] operator[>] operator[SEP] identifier[temp] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[temp] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] identifier[i] operator[>=] Other[0] operator[SEP] identifier[i] operator[--] operator[SEP] { identifier[undeliveredList] operator[SEP] identifier[add] operator[SEP] identifier[temp] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , identifier[undeliveredList] operator[SEP] operator[SEP] Keyword[return] identifier[undeliveredList] operator[SEP] }
@Override public Object invoke(MethodInvocation invocation) throws Throwable { if (isNestedInvoke(invocation)) { return invocation.proceed(); } if (isOutOfPointcut(invocation)) { return invocation.proceed(); } return doAllowedInvoke(invocation); }
class class_name[name] begin[{] method[invoke, return_type[type[Object]], modifier[public], parameter[invocation]] begin[{] if[call[.isNestedInvoke, parameter[member[.invocation]]]] begin[{] return[call[invocation.proceed, parameter[]]] else begin[{] None end[}] if[call[.isOutOfPointcut, parameter[member[.invocation]]]] begin[{] return[call[invocation.proceed, parameter[]]] else begin[{] None end[}] return[call[.doAllowedInvoke, parameter[member[.invocation]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[invoke] operator[SEP] identifier[MethodInvocation] identifier[invocation] operator[SEP] Keyword[throws] identifier[Throwable] { Keyword[if] operator[SEP] identifier[isNestedInvoke] operator[SEP] identifier[invocation] operator[SEP] operator[SEP] { Keyword[return] identifier[invocation] operator[SEP] identifier[proceed] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[isOutOfPointcut] operator[SEP] identifier[invocation] operator[SEP] operator[SEP] { Keyword[return] identifier[invocation] operator[SEP] identifier[proceed] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[doAllowedInvoke] operator[SEP] identifier[invocation] operator[SEP] operator[SEP] }
public static ScheduledExecutorService defaultExecutorService() { ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(getCpuCount()); Runtime.getRuntime().addShutdownHook(new Thread(() -> shutdown(scheduledExecutorService))); return scheduledExecutorService; }
class class_name[name] begin[{] method[defaultExecutorService, return_type[type[ScheduledExecutorService]], modifier[public static], parameter[]] begin[{] local_variable[type[ScheduledExecutorService], scheduledExecutorService] call[Runtime.getRuntime, parameter[]] return[member[.scheduledExecutorService]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ScheduledExecutorService] identifier[defaultExecutorService] operator[SEP] operator[SEP] { identifier[ScheduledExecutorService] identifier[scheduledExecutorService] operator[=] identifier[Executors] operator[SEP] identifier[newScheduledThreadPool] operator[SEP] identifier[getCpuCount] operator[SEP] operator[SEP] 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] operator[SEP] operator[->] identifier[shutdown] operator[SEP] identifier[scheduledExecutorService] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[scheduledExecutorService] operator[SEP] }
@Override public Relationship createRelationship(Node first, Node second) { return first.createRelationshipTo(second, relationshipType); }
class class_name[name] begin[{] method[createRelationship, return_type[type[Relationship]], modifier[public], parameter[first, second]] begin[{] return[call[first.createRelationshipTo, parameter[member[.second], member[.relationshipType]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Relationship] identifier[createRelationship] operator[SEP] identifier[Node] identifier[first] , identifier[Node] identifier[second] operator[SEP] { Keyword[return] identifier[first] operator[SEP] identifier[createRelationshipTo] operator[SEP] identifier[second] , identifier[relationshipType] operator[SEP] operator[SEP] }
static float powerOfTwoF(int n) { assert(n >= FloatConsts.MIN_EXPONENT && n <= FloatConsts.MAX_EXPONENT); return Float.intBitsToFloat(((n + FloatConsts.EXP_BIAS) << (FloatConsts.SIGNIFICAND_WIDTH-1)) & FloatConsts.EXP_BIT_MASK); }
class class_name[name] begin[{] method[powerOfTwoF, return_type[type[float]], modifier[static], parameter[n]] begin[{] AssertStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=MIN_EXPONENT, postfix_operators=[], prefix_operators=[], qualifier=FloatConsts, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=MAX_EXPONENT, postfix_operators=[], prefix_operators=[], qualifier=FloatConsts, selectors=[]), operator=<=), operator=&&), label=None, value=None) return[call[Float.intBitsToFloat, parameter[binary_operation[binary_operation[binary_operation[member[.n], +, member[FloatConsts.EXP_BIAS]], <<, binary_operation[member[FloatConsts.SIGNIFICAND_WIDTH], -, literal[1]]], &, member[FloatConsts.EXP_BIT_MASK]]]]] end[}] END[}]
Keyword[static] Keyword[float] identifier[powerOfTwoF] operator[SEP] Keyword[int] identifier[n] operator[SEP] { Keyword[assert] operator[SEP] identifier[n] operator[>=] identifier[FloatConsts] operator[SEP] identifier[MIN_EXPONENT] operator[&&] identifier[n] operator[<=] identifier[FloatConsts] operator[SEP] identifier[MAX_EXPONENT] operator[SEP] operator[SEP] Keyword[return] identifier[Float] operator[SEP] identifier[intBitsToFloat] operator[SEP] operator[SEP] operator[SEP] identifier[n] operator[+] identifier[FloatConsts] operator[SEP] identifier[EXP_BIAS] operator[SEP] operator[<<] operator[SEP] identifier[FloatConsts] operator[SEP] identifier[SIGNIFICAND_WIDTH] operator[-] Other[1] operator[SEP] operator[SEP] operator[&] identifier[FloatConsts] operator[SEP] identifier[EXP_BIT_MASK] operator[SEP] operator[SEP] }
private String serializePostParam(IExtendedRequest req, String reqURL, boolean keepInput) throws IOException, UnsupportedEncodingException, IllegalStateException { String output = null; HashMap params = req.getInputStreamData(); if (params != null) { long size = req.sizeInputStreamData(params); byte[] reqURLBytes = reqURL.getBytes("UTF-8"); long total = size + reqURLBytes.length + LENGTH_INT; long postParamSaveSize = webAppSecurityConfig.getPostParamCookieSize(); if (tc.isDebugEnabled()) { Tr.debug(tc, "length:" + total + " maximum length:" + postParamSaveSize); } if (total < postParamSaveSize) { // give up to enocde if the data is too large (>16K) byte[][] data = req.serializeInputStreamData(params); StringBuffer sb = new StringBuffer(); sb.append(StringUtil.toString(Base64Coder.base64Encode(reqURLBytes))); for (int i = 0; i < data.length; i++) { sb.append(".").append(StringUtil.toString(Base64Coder.base64Encode(data[i]))); } output = sb.toString(); if (tc.isDebugEnabled()) { Tr.debug(tc, "encoded length:" + output.length()); } if (keepInput) { // push back the data. req.setInputStreamData(params); } } else { Tr.warning(tc, "SEC_FORM_POST_NULL_OR_TOO_LARGE"); } if (tc.isDebugEnabled()) { Tr.debug(tc, "encoded POST parameters: " + output); } } else { Tr.warning(tc, "SEC_FORM_POST_NULL_OR_TOO_LARGE"); } return output; }
class class_name[name] begin[{] method[serializePostParam, return_type[type[String]], modifier[private], parameter[req, reqURL, keepInput]] begin[{] local_variable[type[String], output] local_variable[type[HashMap], params] if[binary_operation[member[.params], !=, literal[null]]] begin[{] local_variable[type[long], size] local_variable[type[byte], reqURLBytes] local_variable[type[long], total] local_variable[type[long], postParamSaveSize] if[call[tc.isDebugEnabled, parameter[]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[binary_operation[binary_operation[literal["length:"], +, member[.total]], +, literal[" maximum length:"]], +, member[.postParamSaveSize]]]] else begin[{] None end[}] if[binary_operation[member[.total], <, member[.postParamSaveSize]]] begin[{] local_variable[type[byte], data] local_variable[type[StringBuffer], sb] call[sb.append, parameter[call[StringUtil.toString, parameter[call[Base64Coder.base64Encode, parameter[member[.reqURLBytes]]]]]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=base64Encode, postfix_operators=[], prefix_operators=[], qualifier=Base64Coder, selectors=[], type_arguments=None)], member=toString, postfix_operators=[], prefix_operators=[], qualifier=StringUtil, selectors=[], type_arguments=None)], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) assign[member[.output], call[sb.toString, parameter[]]] if[call[tc.isDebugEnabled, parameter[]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[literal["encoded length:"], +, call[output.length, parameter[]]]]] else begin[{] None end[}] if[member[.keepInput]] begin[{] call[req.setInputStreamData, parameter[member[.params]]] else begin[{] None end[}] else begin[{] call[Tr.warning, parameter[member[.tc], literal["SEC_FORM_POST_NULL_OR_TOO_LARGE"]]] end[}] if[call[tc.isDebugEnabled, parameter[]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[literal["encoded POST parameters: "], +, member[.output]]]] else begin[{] None end[}] else begin[{] call[Tr.warning, parameter[member[.tc], literal["SEC_FORM_POST_NULL_OR_TOO_LARGE"]]] end[}] return[member[.output]] end[}] END[}]
Keyword[private] identifier[String] identifier[serializePostParam] operator[SEP] identifier[IExtendedRequest] identifier[req] , identifier[String] identifier[reqURL] , Keyword[boolean] identifier[keepInput] operator[SEP] Keyword[throws] identifier[IOException] , identifier[UnsupportedEncodingException] , identifier[IllegalStateException] { identifier[String] identifier[output] operator[=] Other[null] operator[SEP] identifier[HashMap] identifier[params] operator[=] identifier[req] operator[SEP] identifier[getInputStreamData] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[params] operator[!=] Other[null] operator[SEP] { Keyword[long] identifier[size] operator[=] identifier[req] operator[SEP] identifier[sizeInputStreamData] operator[SEP] identifier[params] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[reqURLBytes] operator[=] identifier[reqURL] operator[SEP] identifier[getBytes] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[long] identifier[total] operator[=] identifier[size] operator[+] identifier[reqURLBytes] operator[SEP] identifier[length] operator[+] identifier[LENGTH_INT] operator[SEP] Keyword[long] identifier[postParamSaveSize] operator[=] identifier[webAppSecurityConfig] operator[SEP] identifier[getPostParamCookieSize] operator[SEP] operator[SEP] 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[+] identifier[total] operator[+] literal[String] operator[+] identifier[postParamSaveSize] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[total] operator[<] identifier[postParamSaveSize] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[data] operator[=] identifier[req] operator[SEP] identifier[serializeInputStreamData] operator[SEP] identifier[params] operator[SEP] operator[SEP] identifier[StringBuffer] identifier[sb] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[StringUtil] operator[SEP] identifier[toString] operator[SEP] identifier[Base64Coder] operator[SEP] identifier[base64Encode] operator[SEP] identifier[reqURLBytes] 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[data] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[StringUtil] operator[SEP] identifier[toString] operator[SEP] identifier[Base64Coder] operator[SEP] identifier[base64Encode] operator[SEP] identifier[data] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[output] operator[=] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] 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[+] identifier[output] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[keepInput] operator[SEP] { identifier[req] operator[SEP] identifier[setInputStreamData] operator[SEP] identifier[params] operator[SEP] operator[SEP] } } Keyword[else] { identifier[Tr] operator[SEP] identifier[warning] operator[SEP] identifier[tc] , literal[String] operator[SEP] 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[+] identifier[output] operator[SEP] operator[SEP] } } Keyword[else] { identifier[Tr] operator[SEP] identifier[warning] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[output] operator[SEP] }
public void setEncoding(String enc) throws IOException { if (source != null) //applicapble to URL streams only { String current = encoding; if (current == null) current = Charset.defaultCharset().name(); if (!current.equalsIgnoreCase(enc)) { int oldindex = input.index(); source.close(); encoding = enc; CSSInputStream newstream = urlStream(url, network, encoding); input = newstream.input; input.seek(oldindex); } } }
class class_name[name] begin[{] method[setEncoding, return_type[void], modifier[public], parameter[enc]] begin[{] if[binary_operation[member[.source], !=, literal[null]]] begin[{] local_variable[type[String], current] if[binary_operation[member[.current], ==, literal[null]]] begin[{] assign[member[.current], call[Charset.defaultCharset, parameter[]]] else begin[{] None end[}] if[call[current.equalsIgnoreCase, parameter[member[.enc]]]] begin[{] local_variable[type[int], oldindex] call[source.close, parameter[]] assign[member[.encoding], member[.enc]] local_variable[type[CSSInputStream], newstream] assign[member[.input], member[newstream.input]] call[input.seek, parameter[member[.oldindex]]] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setEncoding] operator[SEP] identifier[String] identifier[enc] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[source] operator[!=] Other[null] operator[SEP] { identifier[String] identifier[current] operator[=] identifier[encoding] operator[SEP] Keyword[if] operator[SEP] identifier[current] operator[==] Other[null] operator[SEP] identifier[current] operator[=] identifier[Charset] operator[SEP] identifier[defaultCharset] operator[SEP] operator[SEP] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[current] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[enc] operator[SEP] operator[SEP] { Keyword[int] identifier[oldindex] operator[=] identifier[input] operator[SEP] identifier[index] operator[SEP] operator[SEP] operator[SEP] identifier[source] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[encoding] operator[=] identifier[enc] operator[SEP] identifier[CSSInputStream] identifier[newstream] operator[=] identifier[urlStream] operator[SEP] identifier[url] , identifier[network] , identifier[encoding] operator[SEP] operator[SEP] identifier[input] operator[=] identifier[newstream] operator[SEP] identifier[input] operator[SEP] identifier[input] operator[SEP] identifier[seek] operator[SEP] identifier[oldindex] operator[SEP] operator[SEP] } } }
@Override protected void initGraphics() { // Set initial size if (Double.compare(clock.getPrefWidth(), 0.0) <= 0 || Double.compare(clock.getPrefHeight(), 0.0) <= 0 || Double.compare(clock.getWidth(), 0.0) <= 0 || Double.compare(clock.getHeight(), 0.0) <= 0) { if (clock.getPrefWidth() > 0 && clock.getPrefHeight() > 0) { clock.setPrefSize(clock.getPrefWidth(), clock.getPrefHeight()); } else { clock.setPrefSize(PREFERRED_WIDTH, PREFERRED_HEIGHT); } } canvas = new Canvas(PREFERRED_WIDTH, PREFERRED_HEIGHT); ctx = canvas.getGraphicsContext2D(); pane = new Pane(canvas); pane.setBorder(new Border(new BorderStroke(clock.getBorderPaint(), BorderStrokeStyle.SOLID, CornerRadii.EMPTY, new BorderWidths(clock.getBorderWidth())))); pane.setBackground(new Background(new BackgroundFill(clock.getBackgroundPaint(), CornerRadii.EMPTY, Insets.EMPTY))); getChildren().setAll(pane); }
class class_name[name] begin[{] method[initGraphics, return_type[void], modifier[protected], parameter[]] begin[{] if[binary_operation[binary_operation[binary_operation[binary_operation[call[Double.compare, parameter[call[clock.getPrefWidth, parameter[]], literal[0.0]]], <=, literal[0]], ||, binary_operation[call[Double.compare, parameter[call[clock.getPrefHeight, parameter[]], literal[0.0]]], <=, literal[0]]], ||, binary_operation[call[Double.compare, parameter[call[clock.getWidth, parameter[]], literal[0.0]]], <=, literal[0]]], ||, binary_operation[call[Double.compare, parameter[call[clock.getHeight, parameter[]], literal[0.0]]], <=, literal[0]]]] begin[{] if[binary_operation[binary_operation[call[clock.getPrefWidth, parameter[]], >, literal[0]], &&, binary_operation[call[clock.getPrefHeight, parameter[]], >, literal[0]]]] begin[{] call[clock.setPrefSize, parameter[call[clock.getPrefWidth, parameter[]], call[clock.getPrefHeight, parameter[]]]] else begin[{] call[clock.setPrefSize, parameter[member[.PREFERRED_WIDTH], member[.PREFERRED_HEIGHT]]] end[}] else begin[{] None end[}] assign[member[.canvas], ClassCreator(arguments=[MemberReference(member=PREFERRED_WIDTH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=PREFERRED_HEIGHT, 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=Canvas, sub_type=None))] assign[member[.ctx], call[canvas.getGraphicsContext2D, parameter[]]] assign[member[.pane], ClassCreator(arguments=[MemberReference(member=canvas, 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=Pane, sub_type=None))] call[pane.setBorder, parameter[ClassCreator(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getBorderPaint, postfix_operators=[], prefix_operators=[], qualifier=clock, selectors=[], type_arguments=None), MemberReference(member=SOLID, postfix_operators=[], prefix_operators=[], qualifier=BorderStrokeStyle, selectors=[]), MemberReference(member=EMPTY, postfix_operators=[], prefix_operators=[], qualifier=CornerRadii, selectors=[]), ClassCreator(arguments=[MethodInvocation(arguments=[], member=getBorderWidth, postfix_operators=[], prefix_operators=[], qualifier=clock, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BorderWidths, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BorderStroke, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Border, sub_type=None))]] call[pane.setBackground, parameter[ClassCreator(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getBackgroundPaint, postfix_operators=[], prefix_operators=[], qualifier=clock, selectors=[], type_arguments=None), MemberReference(member=EMPTY, postfix_operators=[], prefix_operators=[], qualifier=CornerRadii, selectors=[]), MemberReference(member=EMPTY, postfix_operators=[], prefix_operators=[], qualifier=Insets, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BackgroundFill, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Background, sub_type=None))]] call[.getChildren, parameter[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[initGraphics] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[clock] operator[SEP] identifier[getPrefWidth] operator[SEP] operator[SEP] , literal[Float] operator[SEP] operator[<=] Other[0] operator[||] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[clock] operator[SEP] identifier[getPrefHeight] operator[SEP] operator[SEP] , literal[Float] operator[SEP] operator[<=] Other[0] operator[||] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[clock] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] , literal[Float] operator[SEP] operator[<=] Other[0] operator[||] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[clock] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] , literal[Float] operator[SEP] operator[<=] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[clock] operator[SEP] identifier[getPrefWidth] operator[SEP] operator[SEP] operator[>] Other[0] operator[&&] identifier[clock] operator[SEP] identifier[getPrefHeight] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[clock] operator[SEP] identifier[setPrefSize] operator[SEP] identifier[clock] operator[SEP] identifier[getPrefWidth] operator[SEP] operator[SEP] , identifier[clock] operator[SEP] identifier[getPrefHeight] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[clock] operator[SEP] identifier[setPrefSize] operator[SEP] identifier[PREFERRED_WIDTH] , identifier[PREFERRED_HEIGHT] operator[SEP] operator[SEP] } } identifier[canvas] operator[=] Keyword[new] identifier[Canvas] operator[SEP] identifier[PREFERRED_WIDTH] , identifier[PREFERRED_HEIGHT] operator[SEP] operator[SEP] identifier[ctx] operator[=] identifier[canvas] operator[SEP] identifier[getGraphicsContext2D] operator[SEP] operator[SEP] operator[SEP] identifier[pane] operator[=] Keyword[new] identifier[Pane] operator[SEP] identifier[canvas] operator[SEP] operator[SEP] identifier[pane] operator[SEP] identifier[setBorder] operator[SEP] Keyword[new] identifier[Border] operator[SEP] Keyword[new] identifier[BorderStroke] operator[SEP] identifier[clock] operator[SEP] identifier[getBorderPaint] operator[SEP] operator[SEP] , identifier[BorderStrokeStyle] operator[SEP] identifier[SOLID] , identifier[CornerRadii] operator[SEP] identifier[EMPTY] , Keyword[new] identifier[BorderWidths] operator[SEP] identifier[clock] operator[SEP] identifier[getBorderWidth] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[pane] operator[SEP] identifier[setBackground] operator[SEP] Keyword[new] identifier[Background] operator[SEP] Keyword[new] identifier[BackgroundFill] operator[SEP] identifier[clock] operator[SEP] identifier[getBackgroundPaint] operator[SEP] operator[SEP] , identifier[CornerRadii] operator[SEP] identifier[EMPTY] , identifier[Insets] operator[SEP] identifier[EMPTY] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] identifier[setAll] operator[SEP] identifier[pane] operator[SEP] operator[SEP] }
private void updateClusterRoot() { ArrayList<ServerHeartbeat> serverList = new ArrayList<>(); for (ServerHeartbeat server : _serverSelf.getCluster().getServers()) { serverList.add(server); } Collections.sort(serverList, (x,y)->compareClusterRoot(x,y)); UpdatePodBuilder builder = new UpdatePodBuilder(); builder.name("cluster_root"); builder.cluster(_serverSelf.getCluster()); builder.type(PodType.solo); builder.depth(16); for (ServerHeartbeat server : serverList) { builder.server(server.getAddress(), server.port()); } long sequence = CurrentTime.currentTime(); sequence = Math.max(sequence, _clusterRoot.getSequence() + 1); builder.sequence(sequence); UpdatePod update = builder.build(); updatePodProxy(update); }
class class_name[name] begin[{] method[updateClusterRoot, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[ArrayList], serverList] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=server, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=serverList, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getCluster, postfix_operators=[], prefix_operators=[], qualifier=_serverSelf, selectors=[MethodInvocation(arguments=[], member=getServers, 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=server)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ServerHeartbeat, sub_type=None))), label=None) call[Collections.sort, parameter[member[.serverList], LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compareClusterRoot, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), parameters=[InferredFormalParameter(name=x), InferredFormalParameter(name=y)])]] local_variable[type[UpdatePodBuilder], builder] call[builder.name, parameter[literal["cluster_root"]]] call[builder.cluster, parameter[call[_serverSelf.getCluster, parameter[]]]] call[builder.type, parameter[member[PodType.solo]]] call[builder.depth, parameter[literal[16]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAddress, postfix_operators=[], prefix_operators=[], qualifier=server, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=port, postfix_operators=[], prefix_operators=[], qualifier=server, selectors=[], type_arguments=None)], member=server, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=serverList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=server)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ServerHeartbeat, sub_type=None))), label=None) local_variable[type[long], sequence] assign[member[.sequence], call[Math.max, parameter[member[.sequence], binary_operation[call[_clusterRoot.getSequence, parameter[]], +, literal[1]]]]] call[builder.sequence, parameter[member[.sequence]]] local_variable[type[UpdatePod], update] call[.updatePodProxy, parameter[member[.update]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[updateClusterRoot] operator[SEP] operator[SEP] { identifier[ArrayList] operator[<] identifier[ServerHeartbeat] operator[>] identifier[serverList] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ServerHeartbeat] identifier[server] operator[:] identifier[_serverSelf] operator[SEP] identifier[getCluster] operator[SEP] operator[SEP] operator[SEP] identifier[getServers] operator[SEP] operator[SEP] operator[SEP] { identifier[serverList] operator[SEP] identifier[add] operator[SEP] identifier[server] operator[SEP] operator[SEP] } identifier[Collections] operator[SEP] identifier[sort] operator[SEP] identifier[serverList] , operator[SEP] identifier[x] , identifier[y] operator[SEP] operator[->] identifier[compareClusterRoot] operator[SEP] identifier[x] , identifier[y] operator[SEP] operator[SEP] operator[SEP] identifier[UpdatePodBuilder] identifier[builder] operator[=] Keyword[new] identifier[UpdatePodBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[name] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[cluster] operator[SEP] identifier[_serverSelf] operator[SEP] identifier[getCluster] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[type] operator[SEP] identifier[PodType] operator[SEP] identifier[solo] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[depth] operator[SEP] Other[16] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ServerHeartbeat] identifier[server] operator[:] identifier[serverList] operator[SEP] { identifier[builder] operator[SEP] identifier[server] operator[SEP] identifier[server] operator[SEP] identifier[getAddress] operator[SEP] operator[SEP] , identifier[server] operator[SEP] identifier[port] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[long] identifier[sequence] operator[=] identifier[CurrentTime] operator[SEP] identifier[currentTime] operator[SEP] operator[SEP] operator[SEP] identifier[sequence] operator[=] identifier[Math] operator[SEP] identifier[max] operator[SEP] identifier[sequence] , identifier[_clusterRoot] operator[SEP] identifier[getSequence] operator[SEP] operator[SEP] operator[+] Other[1] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[sequence] operator[SEP] identifier[sequence] operator[SEP] operator[SEP] identifier[UpdatePod] identifier[update] operator[=] identifier[builder] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[updatePodProxy] operator[SEP] identifier[update] operator[SEP] operator[SEP] }
public static void unescapeUriPathSegment(final String text, final Writer writer, final String encoding) throws IOException { if (writer == null) { throw new IllegalArgumentException("Argument 'writer' cannot be null"); } if (encoding == null) { throw new IllegalArgumentException("Argument 'encoding' cannot be null"); } UriEscapeUtil.unescape(new InternalStringReader(text), writer, UriEscapeUtil.UriEscapeType.PATH_SEGMENT, encoding); }
class class_name[name] begin[{] method[unescapeUriPathSegment, return_type[void], modifier[public static], parameter[text, writer, encoding]] begin[{] if[binary_operation[member[.writer], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Argument 'writer' cannot be null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.encoding], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Argument 'encoding' cannot be null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] call[UriEscapeUtil.unescape, parameter[ClassCreator(arguments=[MemberReference(member=text, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InternalStringReader, sub_type=None)), member[.writer], member[UriEscapeUtil.UriEscapeType.PATH_SEGMENT], member[.encoding]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[unescapeUriPathSegment] operator[SEP] Keyword[final] identifier[String] identifier[text] , Keyword[final] identifier[Writer] identifier[writer] , Keyword[final] identifier[String] identifier[encoding] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[writer] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[encoding] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[UriEscapeUtil] operator[SEP] identifier[unescape] operator[SEP] Keyword[new] identifier[InternalStringReader] operator[SEP] identifier[text] operator[SEP] , identifier[writer] , identifier[UriEscapeUtil] operator[SEP] identifier[UriEscapeType] operator[SEP] identifier[PATH_SEGMENT] , identifier[encoding] operator[SEP] operator[SEP] }
public Set<Privilege> scan() { StopWatch stopWatch = StopWatch.createStarted(); Set<Privilege> preAuthPrivileges = reflections.getMethodsAnnotatedWith(PreAuthorize.class).stream() .map(element -> element.getAnnotation(PreAuthorize.class)) .map(PreAuthorize::value) .map(this::parse) .collect(Collectors.toSet()); Set<Privilege> postAuthPrivileges = reflections.getMethodsAnnotatedWith(PostAuthorize.class).stream() .map(element -> element.getAnnotation(PostAuthorize.class)) .map(PostAuthorize::value) .map(this::parse) .collect(Collectors.toSet()); Set<Privilege> findPrivileges = reflections.getMethodsAnnotatedWith(FindWithPermission.class).stream() .map(element -> element.getAnnotation(FindWithPermission.class)) .map(FindWithPermission::value) .map(this::parse) .peek(privilege -> privilege.getResources().add("returnObject")) .collect(Collectors.toSet()); Set<Privilege> postFilterPrivileges = reflections.getMethodsAnnotatedWith(PostFilter.class).stream() .map(element -> element.getAnnotation(PostFilter.class)) .map(PostFilter::value) .map(this::parse) .peek(privilege -> privilege.getResources().add("returnObject")) .collect(Collectors.toSet()); preAuthPrivileges.addAll(postAuthPrivileges); preAuthPrivileges.addAll(findPrivileges); preAuthPrivileges.addAll(postFilterPrivileges); log.info("Found {} privileges in {} ms", preAuthPrivileges.size(), stopWatch.getTime()); return preAuthPrivileges; }
class class_name[name] begin[{] method[scan, return_type[type[Set]], modifier[public], parameter[]] begin[{] local_variable[type[StopWatch], stopWatch] local_variable[type[Set], preAuthPrivileges] local_variable[type[Set], postAuthPrivileges] local_variable[type[Set], findPrivileges] local_variable[type[Set], postFilterPrivileges] call[preAuthPrivileges.addAll, parameter[member[.postAuthPrivileges]]] call[preAuthPrivileges.addAll, parameter[member[.findPrivileges]]] call[preAuthPrivileges.addAll, parameter[member[.postFilterPrivileges]]] call[log.info, parameter[literal["Found {} privileges in {} ms"], call[preAuthPrivileges.size, parameter[]], call[stopWatch.getTime, parameter[]]]] return[member[.preAuthPrivileges]] end[}] END[}]
Keyword[public] identifier[Set] operator[<] identifier[Privilege] operator[>] identifier[scan] operator[SEP] operator[SEP] { identifier[StopWatch] identifier[stopWatch] operator[=] identifier[StopWatch] operator[SEP] identifier[createStarted] operator[SEP] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[Privilege] operator[>] identifier[preAuthPrivileges] operator[=] identifier[reflections] operator[SEP] identifier[getMethodsAnnotatedWith] operator[SEP] identifier[PreAuthorize] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[element] operator[->] identifier[element] operator[SEP] identifier[getAnnotation] operator[SEP] identifier[PreAuthorize] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[PreAuthorize] operator[::] identifier[value] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[this] operator[::] identifier[parse] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[toSet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[Privilege] operator[>] identifier[postAuthPrivileges] operator[=] identifier[reflections] operator[SEP] identifier[getMethodsAnnotatedWith] operator[SEP] identifier[PostAuthorize] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[element] operator[->] identifier[element] operator[SEP] identifier[getAnnotation] operator[SEP] identifier[PostAuthorize] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[PostAuthorize] operator[::] identifier[value] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[this] operator[::] identifier[parse] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[toSet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[Privilege] operator[>] identifier[findPrivileges] operator[=] identifier[reflections] operator[SEP] identifier[getMethodsAnnotatedWith] operator[SEP] identifier[FindWithPermission] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[element] operator[->] identifier[element] operator[SEP] identifier[getAnnotation] operator[SEP] identifier[FindWithPermission] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[FindWithPermission] operator[::] identifier[value] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[this] operator[::] identifier[parse] operator[SEP] operator[SEP] identifier[peek] operator[SEP] identifier[privilege] operator[->] identifier[privilege] operator[SEP] identifier[getResources] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[toSet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[Privilege] operator[>] identifier[postFilterPrivileges] operator[=] identifier[reflections] operator[SEP] identifier[getMethodsAnnotatedWith] operator[SEP] identifier[PostFilter] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[element] operator[->] identifier[element] operator[SEP] identifier[getAnnotation] operator[SEP] identifier[PostFilter] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[PostFilter] operator[::] identifier[value] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[this] operator[::] identifier[parse] operator[SEP] operator[SEP] identifier[peek] operator[SEP] identifier[privilege] operator[->] identifier[privilege] operator[SEP] identifier[getResources] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[toSet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[preAuthPrivileges] operator[SEP] identifier[addAll] operator[SEP] identifier[postAuthPrivileges] operator[SEP] operator[SEP] identifier[preAuthPrivileges] operator[SEP] identifier[addAll] operator[SEP] identifier[findPrivileges] operator[SEP] operator[SEP] identifier[preAuthPrivileges] operator[SEP] identifier[addAll] operator[SEP] identifier[postFilterPrivileges] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[preAuthPrivileges] operator[SEP] identifier[size] operator[SEP] operator[SEP] , identifier[stopWatch] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[preAuthPrivileges] operator[SEP] }
public static Subject getSubject() { if (SUBJECT.get() != null) { return SUBJECT.get().peek(); } else { AccessControlContext acc = AccessController.getContext(); if (System.getSecurityManager() == null) { return Subject.getSubject(acc); } else { return AccessController.doPrivileged((PrivilegedAction<Subject>) () -> Subject.getSubject(acc)); } } }
class class_name[name] begin[{] method[getSubject, return_type[type[Subject]], modifier[public static], parameter[]] begin[{] if[binary_operation[call[SUBJECT.get, parameter[]], !=, literal[null]]] begin[{] return[call[SUBJECT.get, parameter[]]] else begin[{] local_variable[type[AccessControlContext], acc] if[binary_operation[call[System.getSecurityManager, parameter[]], ==, literal[null]]] begin[{] return[call[Subject.getSubject, parameter[member[.acc]]]] else begin[{] return[call[AccessController.doPrivileged, parameter[Cast(expression=LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=acc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getSubject, postfix_operators=[], prefix_operators=[], qualifier=Subject, selectors=[], type_arguments=None), parameters=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Subject, sub_type=None))], dimensions=[], name=PrivilegedAction, sub_type=None))]]] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[Subject] identifier[getSubject] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[SUBJECT] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[SUBJECT] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[peek] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[AccessControlContext] identifier[acc] operator[=] identifier[AccessController] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[System] operator[SEP] identifier[getSecurityManager] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[Subject] operator[SEP] identifier[getSubject] operator[SEP] identifier[acc] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[AccessController] operator[SEP] identifier[doPrivileged] operator[SEP] operator[SEP] identifier[PrivilegedAction] operator[<] identifier[Subject] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[->] identifier[Subject] operator[SEP] identifier[getSubject] operator[SEP] identifier[acc] operator[SEP] operator[SEP] operator[SEP] } } }
public MultiChangeBuilder<PS, SEG, S> deleteText(int start, int end) { return replaceText(start, end, ""); }
class class_name[name] begin[{] method[deleteText, return_type[type[MultiChangeBuilder]], modifier[public], parameter[start, end]] begin[{] return[call[.replaceText, parameter[member[.start], member[.end], literal[""]]]] end[}] END[}]
Keyword[public] identifier[MultiChangeBuilder] operator[<] identifier[PS] , identifier[SEG] , identifier[S] operator[>] identifier[deleteText] operator[SEP] Keyword[int] identifier[start] , Keyword[int] identifier[end] operator[SEP] { Keyword[return] identifier[replaceText] operator[SEP] identifier[start] , identifier[end] , literal[String] operator[SEP] operator[SEP] }
public KeyStoreCredentialResolverBuilder addKeyPassword(String name, String password) { requireNonNull(name, "name"); requireNonNull(password, "password"); checkArgument(!keyPasswords.containsKey(name), "key already exists: %s", name); keyPasswords.put(name, password); return this; }
class class_name[name] begin[{] method[addKeyPassword, return_type[type[KeyStoreCredentialResolverBuilder]], modifier[public], parameter[name, password]] begin[{] call[.requireNonNull, parameter[member[.name], literal["name"]]] call[.requireNonNull, parameter[member[.password], literal["password"]]] call[.checkArgument, parameter[call[keyPasswords.containsKey, parameter[member[.name]]], literal["key already exists: %s"], member[.name]]] call[keyPasswords.put, parameter[member[.name], member[.password]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[KeyStoreCredentialResolverBuilder] identifier[addKeyPassword] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[password] operator[SEP] { identifier[requireNonNull] operator[SEP] identifier[name] , literal[String] operator[SEP] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[password] , literal[String] operator[SEP] operator[SEP] identifier[checkArgument] operator[SEP] operator[!] identifier[keyPasswords] operator[SEP] identifier[containsKey] operator[SEP] identifier[name] operator[SEP] , literal[String] , identifier[name] operator[SEP] operator[SEP] identifier[keyPasswords] operator[SEP] identifier[put] operator[SEP] identifier[name] , identifier[password] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
@XmlElementDecl(namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", name = "extension", scope = ApplyACL.class) public JAXBElement<CmisExtensionType> createApplyACLExtension( CmisExtensionType value) { return new JAXBElement<CmisExtensionType>( _GetPropertiesExtension_QNAME, CmisExtensionType.class, ApplyACL.class, value); }
class class_name[name] begin[{] method[createApplyACLExtension, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=_GetPropertiesExtension_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CmisExtensionType, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ApplyACL, sub_type=None)), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=CmisExtensionType, sub_type=None))], dimensions=None, name=JAXBElement, sub_type=None))] end[}] END[}]
annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] , identifier[scope] operator[=] identifier[ApplyACL] operator[SEP] Keyword[class] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[CmisExtensionType] operator[>] identifier[createApplyACLExtension] operator[SEP] identifier[CmisExtensionType] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[CmisExtensionType] operator[>] operator[SEP] identifier[_GetPropertiesExtension_QNAME] , identifier[CmisExtensionType] operator[SEP] Keyword[class] , identifier[ApplyACL] operator[SEP] Keyword[class] , identifier[value] operator[SEP] operator[SEP] }
private Map<Invariant, SortedSet<Integer>> getInvariants(Partition partition, Set<Integer> targetBlock) { Map<Invariant, SortedSet<Integer>> setList = new HashMap<Invariant, SortedSet<Integer>>(); for (int u : partition.getCell(currentBlockIndex)) { Invariant h = refinable.neighboursInBlock(targetBlock, u); if (setList.containsKey(h)) { setList.get(h).add(u); } else { SortedSet<Integer> set = new TreeSet<Integer>(); set.add(u); setList.put(h, set); } } return setList; }
class class_name[name] begin[{] method[getInvariants, return_type[type[Map]], modifier[private], parameter[partition, targetBlock]] begin[{] local_variable[type[Map], setList] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=targetBlock, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=u, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=neighboursInBlock, postfix_operators=[], prefix_operators=[], qualifier=refinable, selectors=[], type_arguments=None), name=h)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Invariant, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=h, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=setList, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=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=Integer, sub_type=None))], dimensions=None, name=TreeSet, sub_type=None)), name=set)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))], dimensions=[], name=SortedSet, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=u, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=set, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=h, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=set, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=setList, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=h, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=setList, selectors=[MethodInvocation(arguments=[MemberReference(member=u, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=currentBlockIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getCell, postfix_operators=[], prefix_operators=[], qualifier=partition, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=u)], modifiers=set(), type=BasicType(dimensions=[], name=int))), label=None) return[member[.setList]] end[}] END[}]
Keyword[private] identifier[Map] operator[<] identifier[Invariant] , identifier[SortedSet] operator[<] identifier[Integer] operator[>] operator[>] identifier[getInvariants] operator[SEP] identifier[Partition] identifier[partition] , identifier[Set] operator[<] identifier[Integer] operator[>] identifier[targetBlock] operator[SEP] { identifier[Map] operator[<] identifier[Invariant] , identifier[SortedSet] operator[<] identifier[Integer] operator[>] operator[>] identifier[setList] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[Invariant] , identifier[SortedSet] operator[<] identifier[Integer] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[u] operator[:] identifier[partition] operator[SEP] identifier[getCell] operator[SEP] identifier[currentBlockIndex] operator[SEP] operator[SEP] { identifier[Invariant] identifier[h] operator[=] identifier[refinable] operator[SEP] identifier[neighboursInBlock] operator[SEP] identifier[targetBlock] , identifier[u] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[setList] operator[SEP] identifier[containsKey] operator[SEP] identifier[h] operator[SEP] operator[SEP] { identifier[setList] operator[SEP] identifier[get] operator[SEP] identifier[h] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[u] operator[SEP] operator[SEP] } Keyword[else] { identifier[SortedSet] operator[<] identifier[Integer] operator[>] identifier[set] operator[=] Keyword[new] identifier[TreeSet] operator[<] identifier[Integer] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[set] operator[SEP] identifier[add] operator[SEP] identifier[u] operator[SEP] operator[SEP] identifier[setList] operator[SEP] identifier[put] operator[SEP] identifier[h] , identifier[set] operator[SEP] operator[SEP] } } Keyword[return] identifier[setList] operator[SEP] }
public void pushLoop(List<String> labelNames) { pushState(); continueLabel = new Label(); breakLabel = new Label(); if (labelNames != null) { for (String labelName : labelNames) { initLoopLabels(labelName); } } }
class class_name[name] begin[{] method[pushLoop, return_type[void], modifier[public], parameter[labelNames]] begin[{] call[.pushState, parameter[]] assign[member[.continueLabel], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Label, sub_type=None))] assign[member[.breakLabel], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Label, sub_type=None))] if[binary_operation[member[.labelNames], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=labelName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=initLoopLabels, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=labelNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=labelName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[pushLoop] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[labelNames] operator[SEP] { identifier[pushState] operator[SEP] operator[SEP] operator[SEP] identifier[continueLabel] operator[=] Keyword[new] identifier[Label] operator[SEP] operator[SEP] operator[SEP] identifier[breakLabel] operator[=] Keyword[new] identifier[Label] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[labelNames] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[String] identifier[labelName] operator[:] identifier[labelNames] operator[SEP] { identifier[initLoopLabels] operator[SEP] identifier[labelName] operator[SEP] operator[SEP] } } }
public static Pointer retrieveDevicePointer(DataBuffer buffer, CudaContext context) { return allocator.getPointer(buffer, context); }
class class_name[name] begin[{] method[retrieveDevicePointer, return_type[type[Pointer]], modifier[public static], parameter[buffer, context]] begin[{] return[call[allocator.getPointer, parameter[member[.buffer], member[.context]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Pointer] identifier[retrieveDevicePointer] operator[SEP] identifier[DataBuffer] identifier[buffer] , identifier[CudaContext] identifier[context] operator[SEP] { Keyword[return] identifier[allocator] operator[SEP] identifier[getPointer] operator[SEP] identifier[buffer] , identifier[context] operator[SEP] operator[SEP] }
public void setNextTimeout(Date next) { if(next == null) { setTimerState(TimerState.EXPIRED, null); } this.nextExpiration = next; }
class class_name[name] begin[{] method[setNextTimeout, return_type[void], modifier[public], parameter[next]] begin[{] if[binary_operation[member[.next], ==, literal[null]]] begin[{] call[.setTimerState, parameter[member[TimerState.EXPIRED], literal[null]]] else begin[{] None end[}] assign[THIS[member[None.nextExpiration]], member[.next]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setNextTimeout] operator[SEP] identifier[Date] identifier[next] operator[SEP] { Keyword[if] operator[SEP] identifier[next] operator[==] Other[null] operator[SEP] { identifier[setTimerState] operator[SEP] identifier[TimerState] operator[SEP] identifier[EXPIRED] , Other[null] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[nextExpiration] operator[=] identifier[next] operator[SEP] }
public void debug(Object m, Throwable t) { logger.debug(String.valueOf(m), t); }
class class_name[name] begin[{] method[debug, return_type[void], modifier[public], parameter[m, t]] begin[{] call[logger.debug, parameter[call[String.valueOf, parameter[member[.m]]], member[.t]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[debug] operator[SEP] identifier[Object] identifier[m] , identifier[Throwable] identifier[t] operator[SEP] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[m] operator[SEP] , identifier[t] operator[SEP] operator[SEP] }
protected long readTerminalCount(final BitInputStream in, final long size) throws IOException { if (SERIALIZATION_CHECKS) { in.expect(SerializationChecks.BeforeTerminal); } final long readBoundedLong = in.readBoundedLong(1 + size); if (SERIALIZATION_CHECKS) { in.expect(SerializationChecks.AfterTerminal); } return readBoundedLong; }
class class_name[name] begin[{] method[readTerminalCount, return_type[type[long]], modifier[protected], parameter[in, size]] begin[{] if[member[.SERIALIZATION_CHECKS]] begin[{] call[in.expect, parameter[member[SerializationChecks.BeforeTerminal]]] else begin[{] None end[}] local_variable[type[long], readBoundedLong] if[member[.SERIALIZATION_CHECKS]] begin[{] call[in.expect, parameter[member[SerializationChecks.AfterTerminal]]] else begin[{] None end[}] return[member[.readBoundedLong]] end[}] END[}]
Keyword[protected] Keyword[long] identifier[readTerminalCount] operator[SEP] Keyword[final] identifier[BitInputStream] identifier[in] , Keyword[final] Keyword[long] identifier[size] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[SERIALIZATION_CHECKS] operator[SEP] { identifier[in] operator[SEP] identifier[expect] operator[SEP] identifier[SerializationChecks] operator[SEP] identifier[BeforeTerminal] operator[SEP] operator[SEP] } Keyword[final] Keyword[long] identifier[readBoundedLong] operator[=] identifier[in] operator[SEP] identifier[readBoundedLong] operator[SEP] Other[1] operator[+] identifier[size] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[SERIALIZATION_CHECKS] operator[SEP] { identifier[in] operator[SEP] identifier[expect] operator[SEP] identifier[SerializationChecks] operator[SEP] identifier[AfterTerminal] operator[SEP] operator[SEP] } Keyword[return] identifier[readBoundedLong] operator[SEP] }
public ClosableIterator<NodeWithEmbeddedNodes> findEntities(HttpNeo4jClient executionEngine, EntityKey[] keys, Long txId) { if ( singlePropertyKey ) { return singlePropertyIdFindEntities( executionEngine, keys, txId ); } else { return multiPropertiesIdFindEntities( executionEngine, keys, txId ); } }
class class_name[name] begin[{] method[findEntities, return_type[type[ClosableIterator]], modifier[public], parameter[executionEngine, keys, txId]] begin[{] if[member[.singlePropertyKey]] begin[{] return[call[.singlePropertyIdFindEntities, parameter[member[.executionEngine], member[.keys], member[.txId]]]] else begin[{] return[call[.multiPropertiesIdFindEntities, parameter[member[.executionEngine], member[.keys], member[.txId]]]] end[}] end[}] END[}]
Keyword[public] identifier[ClosableIterator] operator[<] identifier[NodeWithEmbeddedNodes] operator[>] identifier[findEntities] operator[SEP] identifier[HttpNeo4jClient] identifier[executionEngine] , identifier[EntityKey] operator[SEP] operator[SEP] identifier[keys] , identifier[Long] identifier[txId] operator[SEP] { Keyword[if] operator[SEP] identifier[singlePropertyKey] operator[SEP] { Keyword[return] identifier[singlePropertyIdFindEntities] operator[SEP] identifier[executionEngine] , identifier[keys] , identifier[txId] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[multiPropertiesIdFindEntities] operator[SEP] identifier[executionEngine] , identifier[keys] , identifier[txId] operator[SEP] operator[SEP] } }
@Nullable private Module getModuleFromScopeRoot(Node moduleBody) { if (moduleBody.isModuleBody()) { // TODO(b/128633181): handle ES modules here Node scriptNode = moduleBody.getParent(); checkState( scriptNode.getBooleanProp(Node.GOOG_MODULE), "Typechecking of non-goog-modules not supported"); Node googModuleCall = moduleBody.getFirstChild(); String namespace = googModuleCall.getFirstChild().getSecondChild().getString(); return moduleMap.getClosureModule(namespace); } else if (isGoogLoadModuleBlock(moduleBody)) { Node googModuleCall = moduleBody.getFirstChild(); String namespace = googModuleCall.getFirstChild().getSecondChild().getString(); return moduleMap.getClosureModule(namespace); } return null; }
class class_name[name] begin[{] method[getModuleFromScopeRoot, return_type[type[Module]], modifier[private], parameter[moduleBody]] begin[{] if[call[moduleBody.isModuleBody, parameter[]]] begin[{] local_variable[type[Node], scriptNode] call[.checkState, parameter[call[scriptNode.getBooleanProp, parameter[member[Node.GOOG_MODULE]]], literal["Typechecking of non-goog-modules not supported"]]] local_variable[type[Node], googModuleCall] local_variable[type[String], namespace] return[call[moduleMap.getClosureModule, parameter[member[.namespace]]]] else begin[{] if[call[.isGoogLoadModuleBlock, parameter[member[.moduleBody]]]] begin[{] local_variable[type[Node], googModuleCall] local_variable[type[String], namespace] return[call[moduleMap.getClosureModule, parameter[member[.namespace]]]] else begin[{] None end[}] end[}] return[literal[null]] end[}] END[}]
annotation[@] identifier[Nullable] Keyword[private] identifier[Module] identifier[getModuleFromScopeRoot] operator[SEP] identifier[Node] identifier[moduleBody] operator[SEP] { Keyword[if] operator[SEP] identifier[moduleBody] operator[SEP] identifier[isModuleBody] operator[SEP] operator[SEP] operator[SEP] { identifier[Node] identifier[scriptNode] operator[=] identifier[moduleBody] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[SEP] identifier[checkState] operator[SEP] identifier[scriptNode] operator[SEP] identifier[getBooleanProp] operator[SEP] identifier[Node] operator[SEP] identifier[GOOG_MODULE] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[Node] identifier[googModuleCall] operator[=] identifier[moduleBody] operator[SEP] identifier[getFirstChild] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[namespace] operator[=] identifier[googModuleCall] operator[SEP] identifier[getFirstChild] operator[SEP] operator[SEP] operator[SEP] identifier[getSecondChild] operator[SEP] operator[SEP] operator[SEP] identifier[getString] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[moduleMap] operator[SEP] identifier[getClosureModule] operator[SEP] identifier[namespace] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[isGoogLoadModuleBlock] operator[SEP] identifier[moduleBody] operator[SEP] operator[SEP] { identifier[Node] identifier[googModuleCall] operator[=] identifier[moduleBody] operator[SEP] identifier[getFirstChild] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[namespace] operator[=] identifier[googModuleCall] operator[SEP] identifier[getFirstChild] operator[SEP] operator[SEP] operator[SEP] identifier[getSecondChild] operator[SEP] operator[SEP] operator[SEP] identifier[getString] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[moduleMap] operator[SEP] identifier[getClosureModule] operator[SEP] identifier[namespace] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public static void writeShortBigEndian(ByteBuffer io, short value) { io.put((byte)((value >> 8) & 0xFF)); io.put((byte)(value & 0xFF)); }
class class_name[name] begin[{] method[writeShortBigEndian, return_type[void], modifier[public static], parameter[io, value]] begin[{] call[io.put, parameter[Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=>>), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xFF), operator=&), type=BasicType(dimensions=[], name=byte))]] call[io.put, parameter[Cast(expression=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xFF), operator=&), type=BasicType(dimensions=[], name=byte))]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[writeShortBigEndian] operator[SEP] identifier[ByteBuffer] identifier[io] , Keyword[short] identifier[value] operator[SEP] { identifier[io] operator[SEP] identifier[put] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] identifier[value] operator[>] operator[>] Other[8] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[SEP] operator[SEP] identifier[io] operator[SEP] identifier[put] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[value] operator[&] literal[Integer] operator[SEP] operator[SEP] operator[SEP] }
@Override public boolean reschedule() { if (swappedIn != null && swappedIn.getRunState() == RunState.TIMESTEP) { return false; // Can't schedule anything else and we're idle. } if (policy.reschedule()) { ISchedulableThread best = policy.getThread(); if (swappedIn != best) { if (swappedIn != null) { RTLogger.log(new RTThreadSwapMessage(SwapType.Out, swappedIn, this, 0, 0)); } long delay = SystemClock.getWallTime() - best.getSwapInBy(); if (best.getSwapInBy() > 0 && delay > 0) { RTLogger.log(new RTThreadSwapMessage(SwapType.DelayedIn, best, this, 0, delay)); } else { RTLogger.log(new RTThreadSwapMessage(SwapType.In, best, this, 0, 0)); } } swappedIn = best; swappedIn.runslice(policy.getTimeslice()); switch (swappedIn.getRunState()) { case COMPLETE: RTLogger.log(new RTThreadSwapMessage(SwapType.Out, swappedIn, this, 0, 0)); RTLogger.log(new RTThreadKillMessage(swappedIn, this)); swappedIn = null; return true; // We may be able to run other threads case TIMESTEP: return false; // We're definitely idle default: return true; // We may be able to run other threads } } else { return false; } }
class class_name[name] begin[{] method[reschedule, return_type[type[boolean]], modifier[public], parameter[]] begin[{] if[binary_operation[binary_operation[member[.swappedIn], !=, literal[null]], &&, binary_operation[call[swappedIn.getRunState, parameter[]], ==, member[RunState.TIMESTEP]]]] begin[{] return[literal[false]] else begin[{] None end[}] if[call[policy.reschedule, parameter[]]] begin[{] local_variable[type[ISchedulableThread], best] if[binary_operation[member[.swappedIn], !=, member[.best]]] begin[{] if[binary_operation[member[.swappedIn], !=, literal[null]]] begin[{] call[RTLogger.log, parameter[ClassCreator(arguments=[MemberReference(member=Out, postfix_operators=[], prefix_operators=[], qualifier=SwapType, selectors=[]), MemberReference(member=swappedIn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RTThreadSwapMessage, sub_type=None))]] else begin[{] None end[}] local_variable[type[long], delay] if[binary_operation[binary_operation[call[best.getSwapInBy, parameter[]], >, literal[0]], &&, binary_operation[member[.delay], >, literal[0]]]] begin[{] call[RTLogger.log, parameter[ClassCreator(arguments=[MemberReference(member=DelayedIn, postfix_operators=[], prefix_operators=[], qualifier=SwapType, selectors=[]), MemberReference(member=best, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=delay, 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=RTThreadSwapMessage, sub_type=None))]] else begin[{] call[RTLogger.log, parameter[ClassCreator(arguments=[MemberReference(member=In, postfix_operators=[], prefix_operators=[], qualifier=SwapType, selectors=[]), MemberReference(member=best, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RTThreadSwapMessage, sub_type=None))]] end[}] else begin[{] None end[}] assign[member[.swappedIn], member[.best]] call[swappedIn.runslice, parameter[call[policy.getTimeslice, parameter[]]]] SwitchStatement(cases=[SwitchStatementCase(case=['COMPLETE'], statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=Out, postfix_operators=[], prefix_operators=[], qualifier=SwapType, selectors=[]), MemberReference(member=swappedIn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RTThreadSwapMessage, sub_type=None))], member=log, postfix_operators=[], prefix_operators=[], qualifier=RTLogger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=swappedIn, 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=None, dimensions=None, name=RTThreadKillMessage, sub_type=None))], member=log, postfix_operators=[], prefix_operators=[], qualifier=RTLogger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=swappedIn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]), SwitchStatementCase(case=['TIMESTEP'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)]), SwitchStatementCase(case=[], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])], expression=MethodInvocation(arguments=[], member=getRunState, postfix_operators=[], prefix_operators=[], qualifier=swappedIn, selectors=[], type_arguments=None), label=None) else begin[{] return[literal[false]] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[reschedule] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[swappedIn] operator[!=] Other[null] operator[&&] identifier[swappedIn] operator[SEP] identifier[getRunState] operator[SEP] operator[SEP] operator[==] identifier[RunState] operator[SEP] identifier[TIMESTEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[policy] operator[SEP] identifier[reschedule] operator[SEP] operator[SEP] operator[SEP] { identifier[ISchedulableThread] identifier[best] operator[=] identifier[policy] operator[SEP] identifier[getThread] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[swappedIn] operator[!=] identifier[best] operator[SEP] { Keyword[if] operator[SEP] identifier[swappedIn] operator[!=] Other[null] operator[SEP] { identifier[RTLogger] operator[SEP] identifier[log] operator[SEP] Keyword[new] identifier[RTThreadSwapMessage] operator[SEP] identifier[SwapType] operator[SEP] identifier[Out] , identifier[swappedIn] , Keyword[this] , Other[0] , Other[0] operator[SEP] operator[SEP] operator[SEP] } Keyword[long] identifier[delay] operator[=] identifier[SystemClock] operator[SEP] identifier[getWallTime] operator[SEP] operator[SEP] operator[-] identifier[best] operator[SEP] identifier[getSwapInBy] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[best] operator[SEP] identifier[getSwapInBy] operator[SEP] operator[SEP] operator[>] Other[0] operator[&&] identifier[delay] operator[>] Other[0] operator[SEP] { identifier[RTLogger] operator[SEP] identifier[log] operator[SEP] Keyword[new] identifier[RTThreadSwapMessage] operator[SEP] identifier[SwapType] operator[SEP] identifier[DelayedIn] , identifier[best] , Keyword[this] , Other[0] , identifier[delay] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[RTLogger] operator[SEP] identifier[log] operator[SEP] Keyword[new] identifier[RTThreadSwapMessage] operator[SEP] identifier[SwapType] operator[SEP] identifier[In] , identifier[best] , Keyword[this] , Other[0] , Other[0] operator[SEP] operator[SEP] operator[SEP] } } identifier[swappedIn] operator[=] identifier[best] operator[SEP] identifier[swappedIn] operator[SEP] identifier[runslice] operator[SEP] identifier[policy] operator[SEP] identifier[getTimeslice] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[swappedIn] operator[SEP] identifier[getRunState] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] identifier[COMPLETE] operator[:] identifier[RTLogger] operator[SEP] identifier[log] operator[SEP] Keyword[new] identifier[RTThreadSwapMessage] operator[SEP] identifier[SwapType] operator[SEP] identifier[Out] , identifier[swappedIn] , Keyword[this] , Other[0] , Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[RTLogger] operator[SEP] identifier[log] operator[SEP] Keyword[new] identifier[RTThreadKillMessage] operator[SEP] identifier[swappedIn] , Keyword[this] operator[SEP] operator[SEP] operator[SEP] identifier[swappedIn] operator[=] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[case] identifier[TIMESTEP] operator[:] Keyword[return] literal[boolean] operator[SEP] Keyword[default] operator[:] Keyword[return] literal[boolean] operator[SEP] } } Keyword[else] { Keyword[return] literal[boolean] operator[SEP] } }
public static THttpService of(Object implementation, SerializationFormat defaultSerializationFormat) { return new THttpService(ThriftCallService.of(implementation), newAllowedSerializationFormats(defaultSerializationFormat, ThriftSerializationFormats.values())); }
class class_name[name] begin[{] method[of, return_type[type[THttpService]], modifier[public static], parameter[implementation, defaultSerializationFormat]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=implementation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=of, postfix_operators=[], prefix_operators=[], qualifier=ThriftCallService, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=defaultSerializationFormat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=ThriftSerializationFormats, selectors=[], type_arguments=None)], member=newAllowedSerializationFormats, 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=THttpService, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[THttpService] identifier[of] operator[SEP] identifier[Object] identifier[implementation] , identifier[SerializationFormat] identifier[defaultSerializationFormat] operator[SEP] { Keyword[return] Keyword[new] identifier[THttpService] operator[SEP] identifier[ThriftCallService] operator[SEP] identifier[of] operator[SEP] identifier[implementation] operator[SEP] , identifier[newAllowedSerializationFormats] operator[SEP] identifier[defaultSerializationFormat] , identifier[ThriftSerializationFormats] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static Boolean toBooleanObject(String str, Boolean defaultValue) { return str != null ? Boolean.valueOf(str) : defaultValue; }
class class_name[name] begin[{] method[toBooleanObject, return_type[type[Boolean]], modifier[public static], parameter[str, defaultValue]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=str, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MemberReference(member=defaultValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[MemberReference(member=str, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Boolean, selectors=[], type_arguments=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Boolean] identifier[toBooleanObject] operator[SEP] identifier[String] identifier[str] , identifier[Boolean] identifier[defaultValue] operator[SEP] { Keyword[return] identifier[str] operator[!=] Other[null] operator[?] identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[str] operator[SEP] operator[:] identifier[defaultValue] operator[SEP] }
@Api public void setUseCache(boolean useCache) { if (null == cacheManagerService && useCache) { log.warn("The caching plugin needs to be available to cache WMS requests. Not setting useCache."); } else { this.useCache = useCache; } }
class class_name[name] begin[{] method[setUseCache, return_type[void], modifier[public], parameter[useCache]] begin[{] if[binary_operation[binary_operation[literal[null], ==, member[.cacheManagerService]], &&, member[.useCache]]] begin[{] call[log.warn, parameter[literal["The caching plugin needs to be available to cache WMS requests. Not setting useCache."]]] else begin[{] assign[THIS[member[None.useCache]], member[.useCache]] end[}] end[}] END[}]
annotation[@] identifier[Api] Keyword[public] Keyword[void] identifier[setUseCache] operator[SEP] Keyword[boolean] identifier[useCache] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[cacheManagerService] operator[&&] identifier[useCache] operator[SEP] { identifier[log] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] { Keyword[this] operator[SEP] identifier[useCache] operator[=] identifier[useCache] operator[SEP] } }
public FaunusPipeline back(final String step) { this.state.assertNotLocked(); this.state.assertNoProperty(); this.compiler.addMapReduce(BackFilterMapReduce.Map.class, BackFilterMapReduce.Combiner.class, BackFilterMapReduce.Reduce.class, LongWritable.class, Holder.class, NullWritable.class, FaunusVertex.class, BackFilterMapReduce.createConfiguration(this.state.getElementType(), this.state.getStep(step))); makeMapReduceString(BackFilterMapReduce.class, step); return this; }
class class_name[name] begin[{] method[back, return_type[type[FaunusPipeline]], modifier[public], parameter[step]] begin[{] THIS[member[None.state]call[None.assertNotLocked, parameter[]]] THIS[member[None.state]call[None.assertNoProperty, parameter[]]] THIS[member[None.compiler]call[None.addMapReduce, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=BackFilterMapReduce, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Map, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=BackFilterMapReduce, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Combiner, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=BackFilterMapReduce, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Reduce, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LongWritable, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Holder, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NullWritable, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FaunusVertex, sub_type=None)), call[BackFilterMapReduce.createConfiguration, parameter[THIS[member[None.state]call[None.getElementType, parameter[]]], THIS[member[None.state]call[None.getStep, parameter[member[.step]]]]]]]]] call[.makeMapReduceString, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BackFilterMapReduce, sub_type=None)), member[.step]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[FaunusPipeline] identifier[back] operator[SEP] Keyword[final] identifier[String] identifier[step] operator[SEP] { Keyword[this] operator[SEP] identifier[state] operator[SEP] identifier[assertNotLocked] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[state] operator[SEP] identifier[assertNoProperty] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[compiler] operator[SEP] identifier[addMapReduce] operator[SEP] identifier[BackFilterMapReduce] operator[SEP] identifier[Map] operator[SEP] Keyword[class] , identifier[BackFilterMapReduce] operator[SEP] identifier[Combiner] operator[SEP] Keyword[class] , identifier[BackFilterMapReduce] operator[SEP] identifier[Reduce] operator[SEP] Keyword[class] , identifier[LongWritable] operator[SEP] Keyword[class] , identifier[Holder] operator[SEP] Keyword[class] , identifier[NullWritable] operator[SEP] Keyword[class] , identifier[FaunusVertex] operator[SEP] Keyword[class] , identifier[BackFilterMapReduce] operator[SEP] identifier[createConfiguration] operator[SEP] Keyword[this] operator[SEP] identifier[state] operator[SEP] identifier[getElementType] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[state] operator[SEP] identifier[getStep] operator[SEP] identifier[step] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[makeMapReduceString] operator[SEP] identifier[BackFilterMapReduce] operator[SEP] Keyword[class] , identifier[step] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public static EntryElement makeEntryElement(Object value) { Class<?> type = ClassUtils.primitiveToWrapper(value.getClass()); return new EntryElement(type.getName(), value.toString()); }
class class_name[name] begin[{] method[makeEntryElement, return_type[type[EntryElement]], modifier[public static], parameter[value]] begin[{] local_variable[type[Class], type] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=type, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=EntryElement, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[EntryElement] identifier[makeEntryElement] operator[SEP] identifier[Object] identifier[value] operator[SEP] { identifier[Class] operator[<] operator[?] operator[>] identifier[type] operator[=] identifier[ClassUtils] operator[SEP] identifier[primitiveToWrapper] operator[SEP] identifier[value] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[EntryElement] operator[SEP] identifier[type] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[value] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static ClassLoader getClassLoader(final Class<?> clazz) { // Context class loader can be null final ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); if (contextClassLoader != null) { return contextClassLoader; } if (clazz != null) { // The class loader for a specific class can also be null final ClassLoader clazzClassLoader = clazz.getClassLoader(); if (clazzClassLoader != null) { return clazzClassLoader; } } // The only class loader we can rely on for not being null is the system // one return ClassLoader.getSystemClassLoader(); }
class class_name[name] begin[{] method[getClassLoader, return_type[type[ClassLoader]], modifier[public static], parameter[clazz]] begin[{] local_variable[type[ClassLoader], contextClassLoader] if[binary_operation[member[.contextClassLoader], !=, literal[null]]] begin[{] return[member[.contextClassLoader]] else begin[{] None end[}] if[binary_operation[member[.clazz], !=, literal[null]]] begin[{] local_variable[type[ClassLoader], clazzClassLoader] if[binary_operation[member[.clazzClassLoader], !=, literal[null]]] begin[{] return[member[.clazzClassLoader]] else begin[{] None end[}] else begin[{] None end[}] return[call[ClassLoader.getSystemClassLoader, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ClassLoader] identifier[getClassLoader] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[SEP] { Keyword[final] identifier[ClassLoader] identifier[contextClassLoader] operator[=] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] identifier[getContextClassLoader] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[contextClassLoader] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[contextClassLoader] operator[SEP] } Keyword[if] operator[SEP] identifier[clazz] operator[!=] Other[null] operator[SEP] { Keyword[final] identifier[ClassLoader] identifier[clazzClassLoader] operator[=] identifier[clazz] operator[SEP] identifier[getClassLoader] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[clazzClassLoader] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[clazzClassLoader] operator[SEP] } } Keyword[return] identifier[ClassLoader] operator[SEP] identifier[getSystemClassLoader] operator[SEP] operator[SEP] operator[SEP] }
private StringBuilder renderFacets() throws IOException { StringBuilder sb = new StringBuilder(); if( ! this.applicationTemplate.getGraphs().getFacetNameToFacet().isEmpty()) { sb.append( renderTitle1( this.messages.get( "facets" ))); //$NON-NLS-1$ sb.append( renderParagraph( this.messages.get( "facets.intro" ))); //$NON-NLS-1$ List<String> sectionNames = new ArrayList<> (); List<Facet> allFacets = new ArrayList<>( this.applicationTemplate.getGraphs().getFacetNameToFacet().values()); Collections.sort( allFacets, new AbstractTypeComparator()); for( Facet facet : allFacets ) { // Start a new section final String sectionName = DocConstants.SECTION_FACETS + facet.getName(); StringBuilder section = startSection( sectionName ); // Overview section.append( renderTitle2( facet.getName())); String customInfo = readCustomInformation( this.applicationDirectory, facet.getName(), DocConstants.FACET_DETAILS ); if( Utils.isEmptyOrWhitespaces( customInfo )) customInfo = this.typeAnnotations.get( facet.getName()); if( ! Utils.isEmptyOrWhitespaces( customInfo )) { section.append( renderTitle3( this.messages.get( "overview" ))); //$NON-NLS-1$ section.append( renderParagraph( customInfo )); } // Exported variables Map<String,String> exportedVariables = ComponentHelpers.findAllExportedVariables( facet ); section.append( renderTitle3( this.messages.get( "exports" ))); //$NON-NLS-1$ if( exportedVariables.isEmpty()) { String msg = MessageFormat.format( this.messages.get( "facet.no.export" ), facet ); //$NON-NLS-1$ section.append( renderParagraph( msg )); } else { String msg = MessageFormat.format( this.messages.get( "facet.exports" ), facet ); //$NON-NLS-1$ section.append( renderParagraph( msg )); section.append( renderList( convertExports( exportedVariables ))); } // 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[renderFacets, return_type[type[StringBuilder]], modifier[private], parameter[]] begin[{] local_variable[type[StringBuilder], sb] if[THIS[member[None.applicationTemplate]call[None.getGraphs, parameter[]]call[None.getFacetNameToFacet, parameter[]]call[None.isEmpty, parameter[]]]] begin[{] call[sb.append, parameter[call[.renderTitle1, parameter[THIS[member[None.messages]call[None.get, parameter[literal["facets"]]]]]]]] call[sb.append, parameter[call[.renderParagraph, parameter[THIS[member[None.messages]call[None.get, parameter[literal["facets.intro"]]]]]]]] local_variable[type[List], sectionNames] local_variable[type[List], allFacets] call[Collections.sort, parameter[member[.allFacets], 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_FACETS, postfix_operators=[], prefix_operators=[], qualifier=DocConstants, selectors=[]), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=facet, 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=facet, 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), 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=facet, selectors=[], type_arguments=None), MemberReference(member=FACET_DETAILS, 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=facet, 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=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="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), 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=[MemberReference(member=facet, 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=[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="facet.exports")], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), MemberReference(member=facet, 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), 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=[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="facet.no.export")], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), MemberReference(member=facet, 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)])), 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=allFacets, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=facet)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Facet, sub_type=None))), label=None) call[sb.append, parameter[call[.renderSections, parameter[member[.sectionNames]]]]] else begin[{] None end[}] return[member[.sb]] end[}] END[}]
Keyword[private] identifier[StringBuilder] identifier[renderFacets] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] Keyword[this] operator[SEP] identifier[applicationTemplate] operator[SEP] identifier[getGraphs] operator[SEP] operator[SEP] operator[SEP] identifier[getFacetNameToFacet] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] 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[Facet] operator[>] identifier[allFacets] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] Keyword[this] operator[SEP] identifier[applicationTemplate] operator[SEP] identifier[getGraphs] operator[SEP] operator[SEP] operator[SEP] identifier[getFacetNameToFacet] operator[SEP] operator[SEP] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Collections] operator[SEP] identifier[sort] operator[SEP] identifier[allFacets] , Keyword[new] identifier[AbstractTypeComparator] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Facet] identifier[facet] operator[:] identifier[allFacets] operator[SEP] { Keyword[final] identifier[String] identifier[sectionName] operator[=] identifier[DocConstants] operator[SEP] identifier[SECTION_FACETS] operator[+] identifier[facet] 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[facet] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[customInfo] operator[=] identifier[readCustomInformation] operator[SEP] Keyword[this] operator[SEP] identifier[applicationDirectory] , identifier[facet] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[DocConstants] operator[SEP] identifier[FACET_DETAILS] 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[facet] 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[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[customInfo] 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[facet] 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[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[facet] 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[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[facet] 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[=] 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] }
@Trivial @Reference(name = "remoteIp", service = ChannelConfiguration.class, policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY, cardinality = ReferenceCardinality.MANDATORY) protected void setRemoteIp(ChannelConfiguration config) { if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) { Tr.event(this, tc, "set remote ip " + config.getProperty("id"), this); } this.remoteIpConfig = config; if (remoteIpConfig != null) { performAction(updateAction); } }
class class_name[name] begin[{] method[setRemoteIp, return_type[void], modifier[protected], parameter[config]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEventEnabled, parameter[]]]] begin[{] call[Tr.event, parameter[THIS[], member[.tc], binary_operation[literal["set remote ip "], +, call[config.getProperty, parameter[literal["id"]]]], THIS[]]] else begin[{] None end[}] assign[THIS[member[None.remoteIpConfig]], member[.config]] if[binary_operation[member[.remoteIpConfig], !=, literal[null]]] begin[{] call[.performAction, parameter[member[.updateAction]]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Trivial] annotation[@] identifier[Reference] operator[SEP] identifier[name] operator[=] literal[String] , identifier[service] operator[=] identifier[ChannelConfiguration] operator[SEP] Keyword[class] , identifier[policy] operator[=] identifier[ReferencePolicy] operator[SEP] identifier[DYNAMIC] , identifier[policyOption] operator[=] identifier[ReferencePolicyOption] operator[SEP] identifier[GREEDY] , identifier[cardinality] operator[=] identifier[ReferenceCardinality] operator[SEP] identifier[MANDATORY] operator[SEP] Keyword[protected] Keyword[void] identifier[setRemoteIp] operator[SEP] identifier[ChannelConfiguration] identifier[config] 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] Keyword[this] , identifier[tc] , literal[String] operator[+] identifier[config] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] , Keyword[this] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[remoteIpConfig] operator[=] identifier[config] operator[SEP] Keyword[if] operator[SEP] identifier[remoteIpConfig] operator[!=] Other[null] operator[SEP] { identifier[performAction] operator[SEP] identifier[updateAction] operator[SEP] operator[SEP] } }
@Override protected String doBuildColumnString(String dm) { StringBuilder sb = new StringBuilder(); sb.append(dm).append(authRealm); sb.append(dm).append(createdBy); sb.append(dm).append(createdTime); sb.append(dm).append(hostname); sb.append(dm).append(parameters); sb.append(dm).append(password); sb.append(dm).append(port); sb.append(dm).append(protocolScheme); sb.append(dm).append(updatedBy); sb.append(dm).append(updatedTime); sb.append(dm).append(username); sb.append(dm).append(webConfigId); if (sb.length() > dm.length()) { sb.delete(0, dm.length()); } sb.insert(0, "{").append("}"); return sb.toString(); }
class class_name[name] begin[{] method[doBuildColumnString, return_type[type[String]], modifier[protected], parameter[dm]] begin[{] local_variable[type[StringBuilder], sb] call[sb.append, parameter[member[.dm]]] call[sb.append, parameter[member[.dm]]] call[sb.append, parameter[member[.dm]]] call[sb.append, parameter[member[.dm]]] call[sb.append, parameter[member[.dm]]] call[sb.append, parameter[member[.dm]]] call[sb.append, parameter[member[.dm]]] call[sb.append, parameter[member[.dm]]] call[sb.append, parameter[member[.dm]]] call[sb.append, parameter[member[.dm]]] call[sb.append, parameter[member[.dm]]] call[sb.append, parameter[member[.dm]]] if[binary_operation[call[sb.length, parameter[]], >, call[dm.length, parameter[]]]] begin[{] call[sb.delete, parameter[literal[0], call[dm.length, parameter[]]]] else begin[{] None end[}] call[sb.insert, parameter[literal[0], literal["{"]]] return[call[sb.toString, parameter[]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] identifier[String] identifier[doBuildColumnString] operator[SEP] identifier[String] identifier[dm] operator[SEP] { identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[dm] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[authRealm] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[dm] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[createdBy] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[dm] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[createdTime] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[dm] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[hostname] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[dm] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[parameters] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[dm] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[password] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[dm] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[port] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[dm] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[protocolScheme] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[dm] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[updatedBy] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[dm] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[updatedTime] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[dm] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[username] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[dm] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[webConfigId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sb] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] identifier[dm] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] { identifier[sb] operator[SEP] identifier[delete] operator[SEP] Other[0] , identifier[dm] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[sb] operator[SEP] identifier[insert] operator[SEP] Other[0] , literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
@Override public void store(DefaultExternalIssue externalIssue) { if (externalIssue.primaryLocation().inputComponent() instanceof DefaultInputFile) { DefaultInputFile defaultInputFile = (DefaultInputFile) externalIssue.primaryLocation().inputComponent(); defaultInputFile.setPublished(true); } moduleIssues.initAndAddExternalIssue(externalIssue); }
class class_name[name] begin[{] method[store, return_type[void], modifier[public], parameter[externalIssue]] begin[{] if[binary_operation[call[externalIssue.primaryLocation, parameter[]], instanceof, type[DefaultInputFile]]] begin[{] local_variable[type[DefaultInputFile], defaultInputFile] call[defaultInputFile.setPublished, parameter[literal[true]]] else begin[{] None end[}] call[moduleIssues.initAndAddExternalIssue, parameter[member[.externalIssue]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[store] operator[SEP] identifier[DefaultExternalIssue] identifier[externalIssue] operator[SEP] { Keyword[if] operator[SEP] identifier[externalIssue] operator[SEP] identifier[primaryLocation] operator[SEP] operator[SEP] operator[SEP] identifier[inputComponent] operator[SEP] operator[SEP] Keyword[instanceof] identifier[DefaultInputFile] operator[SEP] { identifier[DefaultInputFile] identifier[defaultInputFile] operator[=] operator[SEP] identifier[DefaultInputFile] operator[SEP] identifier[externalIssue] operator[SEP] identifier[primaryLocation] operator[SEP] operator[SEP] operator[SEP] identifier[inputComponent] operator[SEP] operator[SEP] operator[SEP] identifier[defaultInputFile] operator[SEP] identifier[setPublished] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } identifier[moduleIssues] operator[SEP] identifier[initAndAddExternalIssue] operator[SEP] identifier[externalIssue] operator[SEP] operator[SEP] }
public static String replaceResources(String string, ResourceBundle reg, Map<String, Object> map, PropertyOwner propertyOwner, boolean systemProperties) { if (string != null) if (string.indexOf('{') == -1) return string; return Utility.replaceResources(new StringBuilder(string), reg, map, propertyOwner, systemProperties).toString(); }
class class_name[name] begin[{] method[replaceResources, return_type[type[String]], modifier[public static], parameter[string, reg, map, propertyOwner, systemProperties]] begin[{] if[binary_operation[member[.string], !=, literal[null]]] begin[{] if[binary_operation[call[string.indexOf, parameter[literal['{']]], ==, literal[1]]] begin[{] return[member[.string]] else begin[{] None end[}] else begin[{] None end[}] return[call[Utility.replaceResources, parameter[ClassCreator(arguments=[MemberReference(member=string, 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=StringBuilder, sub_type=None)), member[.reg], member[.map], member[.propertyOwner], member[.systemProperties]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[replaceResources] operator[SEP] identifier[String] identifier[string] , identifier[ResourceBundle] identifier[reg] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[map] , identifier[PropertyOwner] identifier[propertyOwner] , Keyword[boolean] identifier[systemProperties] operator[SEP] { Keyword[if] operator[SEP] identifier[string] operator[!=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[string] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[==] operator[-] Other[1] operator[SEP] Keyword[return] identifier[string] operator[SEP] Keyword[return] identifier[Utility] operator[SEP] identifier[replaceResources] operator[SEP] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[string] operator[SEP] , identifier[reg] , identifier[map] , identifier[propertyOwner] , identifier[systemProperties] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
@TargetApi(VERSION_CODES.KITKAT) public static void hideSystemUI(Activity activity) { // Set the IMMERSIVE flag. // Set the content to appear under the system bars so that the content // doesn't resize when the system bars hideSelf and show. View decorView = activity.getWindow().getDecorView(); decorView.setSystemUiVisibility( View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // hideSelf nav bar | View.SYSTEM_UI_FLAG_FULLSCREEN // hideSelf status bar | View.SYSTEM_UI_FLAG_IMMERSIVE ); }
class class_name[name] begin[{] method[hideSystemUI, return_type[void], modifier[public static], parameter[activity]] begin[{] local_variable[type[View], decorView] call[decorView.setSystemUiVisibility, parameter[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[member[View.SYSTEM_UI_FLAG_LAYOUT_STABLE], |, member[View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION]], |, member[View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN]], |, member[View.SYSTEM_UI_FLAG_HIDE_NAVIGATION]], |, member[View.SYSTEM_UI_FLAG_FULLSCREEN]], |, member[View.SYSTEM_UI_FLAG_IMMERSIVE]]]] end[}] END[}]
annotation[@] identifier[TargetApi] operator[SEP] identifier[VERSION_CODES] operator[SEP] identifier[KITKAT] operator[SEP] Keyword[public] Keyword[static] Keyword[void] identifier[hideSystemUI] operator[SEP] identifier[Activity] identifier[activity] operator[SEP] { identifier[View] identifier[decorView] operator[=] identifier[activity] operator[SEP] identifier[getWindow] operator[SEP] operator[SEP] operator[SEP] identifier[getDecorView] operator[SEP] operator[SEP] operator[SEP] identifier[decorView] operator[SEP] identifier[setSystemUiVisibility] operator[SEP] identifier[View] operator[SEP] identifier[SYSTEM_UI_FLAG_LAYOUT_STABLE] operator[|] identifier[View] operator[SEP] identifier[SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION] operator[|] identifier[View] operator[SEP] identifier[SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN] operator[|] identifier[View] operator[SEP] identifier[SYSTEM_UI_FLAG_HIDE_NAVIGATION] operator[|] identifier[View] operator[SEP] identifier[SYSTEM_UI_FLAG_FULLSCREEN] operator[|] identifier[View] operator[SEP] identifier[SYSTEM_UI_FLAG_IMMERSIVE] operator[SEP] operator[SEP] }
public final void entryRuleAbstractTokenWithCardinality() throws RecognitionException { try { // InternalXtext.g:446:1: ( ruleAbstractTokenWithCardinality EOF ) // InternalXtext.g:447:1: ruleAbstractTokenWithCardinality EOF { before(grammarAccess.getAbstractTokenWithCardinalityRule()); pushFollow(FollowSets000.FOLLOW_1); ruleAbstractTokenWithCardinality(); state._fsp--; after(grammarAccess.getAbstractTokenWithCardinalityRule()); match(input,EOF,FollowSets000.FOLLOW_2); } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return ; }
class class_name[name] begin[{] method[entryRuleAbstractTokenWithCardinality, return_type[void], modifier[final public], parameter[]] begin[{] TryStatement(block=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAbstractTokenWithCardinalityRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=before, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_1, postfix_operators=[], prefix_operators=[], qualifier=FollowSets000, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=ruleAbstractTokenWithCardinality, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAbstractTokenWithCardinalityRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=after, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=EOF, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=FOLLOW_2, postfix_operators=[], prefix_operators=[], qualifier=FollowSets000, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=reportError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=[], label=None, resources=None) return[None] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[entryRuleAbstractTokenWithCardinality] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { Keyword[try] { { identifier[before] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getAbstractTokenWithCardinalityRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[pushFollow] operator[SEP] identifier[FollowSets000] operator[SEP] identifier[FOLLOW_1] operator[SEP] operator[SEP] identifier[ruleAbstractTokenWithCardinality] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] identifier[after] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getAbstractTokenWithCardinalityRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[match] operator[SEP] identifier[input] , identifier[EOF] , identifier[FollowSets000] operator[SEP] identifier[FOLLOW_2] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[re] operator[SEP] { identifier[reportError] operator[SEP] identifier[re] operator[SEP] operator[SEP] identifier[recover] operator[SEP] identifier[input] , identifier[re] operator[SEP] operator[SEP] } Keyword[finally] { } Keyword[return] operator[SEP] }
public static BenchmarkExecutor getExecutor(final BenchmarkElement meth) { if (BENCHRES == null) { throw new IllegalStateException("Call initialize method first!"); } // check if new instance needs to be created if (!EXECUTOR.containsKey(meth.getMeth())) { EXECUTOR.put(meth.getMeth(), new BenchmarkExecutor(meth.getMeth())); int runsOnAnno = BenchmarkMethod.getNumberOfAnnotatedRuns(meth.getMeth().getMethodToBench()); if (runsOnAnno < 0) { runsOnAnno = CONFIG.getRuns(); } RUNS.put(meth.getMeth(), runsOnAnno); } // returning the executor return EXECUTOR.get(meth.getMeth()); }
class class_name[name] begin[{] method[getExecutor, return_type[type[BenchmarkExecutor]], modifier[public static], parameter[meth]] begin[{] if[binary_operation[member[.BENCHRES], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Call initialize method first!")], 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[call[EXECUTOR.containsKey, parameter[call[meth.getMeth, parameter[]]]]] begin[{] call[EXECUTOR.put, parameter[call[meth.getMeth, parameter[]], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMeth, postfix_operators=[], prefix_operators=[], qualifier=meth, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BenchmarkExecutor, sub_type=None))]] local_variable[type[int], runsOnAnno] if[binary_operation[member[.runsOnAnno], <, literal[0]]] begin[{] assign[member[.runsOnAnno], call[CONFIG.getRuns, parameter[]]] else begin[{] None end[}] call[RUNS.put, parameter[call[meth.getMeth, parameter[]], member[.runsOnAnno]]] else begin[{] None end[}] return[call[EXECUTOR.get, parameter[call[meth.getMeth, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[BenchmarkExecutor] identifier[getExecutor] operator[SEP] Keyword[final] identifier[BenchmarkElement] identifier[meth] operator[SEP] { Keyword[if] operator[SEP] identifier[BENCHRES] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[EXECUTOR] operator[SEP] identifier[containsKey] operator[SEP] identifier[meth] operator[SEP] identifier[getMeth] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[EXECUTOR] operator[SEP] identifier[put] operator[SEP] identifier[meth] operator[SEP] identifier[getMeth] operator[SEP] operator[SEP] , Keyword[new] identifier[BenchmarkExecutor] operator[SEP] identifier[meth] operator[SEP] identifier[getMeth] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[runsOnAnno] operator[=] identifier[BenchmarkMethod] operator[SEP] identifier[getNumberOfAnnotatedRuns] operator[SEP] identifier[meth] operator[SEP] identifier[getMeth] operator[SEP] operator[SEP] operator[SEP] identifier[getMethodToBench] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[runsOnAnno] operator[<] Other[0] operator[SEP] { identifier[runsOnAnno] operator[=] identifier[CONFIG] operator[SEP] identifier[getRuns] operator[SEP] operator[SEP] operator[SEP] } identifier[RUNS] operator[SEP] identifier[put] operator[SEP] identifier[meth] operator[SEP] identifier[getMeth] operator[SEP] operator[SEP] , identifier[runsOnAnno] operator[SEP] operator[SEP] } Keyword[return] identifier[EXECUTOR] operator[SEP] identifier[get] operator[SEP] identifier[meth] operator[SEP] identifier[getMeth] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public TransparentDataEncryptionInner createOrUpdate(String resourceGroupName, String serverName, String databaseName) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, databaseName).toBlocking().single().body(); }
class class_name[name] begin[{] method[createOrUpdate, return_type[type[TransparentDataEncryptionInner]], modifier[public], parameter[resourceGroupName, serverName, databaseName]] begin[{] return[call[.createOrUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.serverName], member[.databaseName]]]] end[}] END[}]
Keyword[public] identifier[TransparentDataEncryptionInner] identifier[createOrUpdate] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[serverName] , identifier[String] identifier[databaseName] operator[SEP] { Keyword[return] identifier[createOrUpdateWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[serverName] , identifier[databaseName] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[single] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] }
public Set<WebSocketChannel> getChannels(String uri) { Objects.requireNonNull(uri, Required.URI.toString()); final Set<WebSocketChannel> channels = this.cache.get(Default.WSS_CACHE_PREFIX.toString() + uri); return (channels == null) ? new HashSet<>() : channels; }
class class_name[name] begin[{] method[getChannels, return_type[type[Set]], modifier[public], parameter[uri]] begin[{] call[Objects.requireNonNull, parameter[member[.uri], call[Required.URI.toString, parameter[]]]] local_variable[type[Set], channels] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=channels, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MemberReference(member=channels, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=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)))] end[}] END[}]
Keyword[public] identifier[Set] operator[<] identifier[WebSocketChannel] operator[>] identifier[getChannels] operator[SEP] identifier[String] identifier[uri] operator[SEP] { identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[uri] , identifier[Required] operator[SEP] identifier[URI] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Set] operator[<] identifier[WebSocketChannel] operator[>] identifier[channels] operator[=] Keyword[this] operator[SEP] identifier[cache] operator[SEP] identifier[get] operator[SEP] identifier[Default] operator[SEP] identifier[WSS_CACHE_PREFIX] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[+] identifier[uri] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[channels] operator[==] Other[null] operator[SEP] operator[?] Keyword[new] identifier[HashSet] operator[<] operator[>] operator[SEP] operator[SEP] operator[:] identifier[channels] operator[SEP] }
@Override public CompletableFuture<RegistrationResponse> registerJobManager( final JobMasterId jobMasterId, final ResourceID jobManagerResourceId, final String jobManagerAddress, final JobID jobId, final Time timeout) { checkNotNull(jobMasterId); checkNotNull(jobManagerResourceId); checkNotNull(jobManagerAddress); checkNotNull(jobId); if (!jobLeaderIdService.containsJob(jobId)) { try { jobLeaderIdService.addJob(jobId); } catch (Exception e) { ResourceManagerException exception = new ResourceManagerException("Could not add the job " + jobId + " to the job id leader service.", e); onFatalError(exception); log.error("Could not add job {} to job leader id service.", jobId, e); return FutureUtils.completedExceptionally(exception); } } log.info("Registering job manager {}@{} for job {}.", jobMasterId, jobManagerAddress, jobId); CompletableFuture<JobMasterId> jobMasterIdFuture; try { jobMasterIdFuture = jobLeaderIdService.getLeaderId(jobId); } catch (Exception e) { // we cannot check the job leader id so let's fail // TODO: Maybe it's also ok to skip this check in case that we cannot check the leader id ResourceManagerException exception = new ResourceManagerException("Cannot obtain the " + "job leader id future to verify the correct job leader.", e); onFatalError(exception); log.debug("Could not obtain the job leader id future to verify the correct job leader."); return FutureUtils.completedExceptionally(exception); } CompletableFuture<JobMasterGateway> jobMasterGatewayFuture = getRpcService().connect(jobManagerAddress, jobMasterId, JobMasterGateway.class); CompletableFuture<RegistrationResponse> registrationResponseFuture = jobMasterGatewayFuture.thenCombineAsync( jobMasterIdFuture, (JobMasterGateway jobMasterGateway, JobMasterId leadingJobMasterId) -> { if (Objects.equals(leadingJobMasterId, jobMasterId)) { return registerJobMasterInternal( jobMasterGateway, jobId, jobManagerAddress, jobManagerResourceId); } else { final String declineMessage = String.format( "The leading JobMaster id %s did not match the received JobMaster id %s. " + "This indicates that a JobMaster leader change has happened.", leadingJobMasterId, jobMasterId); log.debug(declineMessage); return new RegistrationResponse.Decline(declineMessage); } }, getMainThreadExecutor()); // handle exceptions which might have occurred in one of the futures inputs of combine return registrationResponseFuture.handleAsync( (RegistrationResponse registrationResponse, Throwable throwable) -> { if (throwable != null) { if (log.isDebugEnabled()) { log.debug("Registration of job manager {}@{} failed.", jobMasterId, jobManagerAddress, throwable); } else { log.info("Registration of job manager {}@{} failed.", jobMasterId, jobManagerAddress); } return new RegistrationResponse.Decline(throwable.getMessage()); } else { return registrationResponse; } }, getRpcService().getExecutor()); }
class class_name[name] begin[{] method[registerJobManager, return_type[type[CompletableFuture]], modifier[public], parameter[jobMasterId, jobManagerResourceId, jobManagerAddress, jobId, timeout]] begin[{] call[.checkNotNull, parameter[member[.jobMasterId]]] call[.checkNotNull, parameter[member[.jobManagerResourceId]]] call[.checkNotNull, parameter[member[.jobManagerAddress]]] call[.checkNotNull, parameter[member[.jobId]]] if[call[jobLeaderIdService.containsJob, parameter[member[.jobId]]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=jobId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addJob, postfix_operators=[], prefix_operators=[], qualifier=jobLeaderIdService, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not add the job "), operandr=MemberReference(member=jobId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" to the job id leader service."), 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=ResourceManagerException, sub_type=None)), name=exception)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ResourceManagerException, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onFatalError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not add job {} to job leader id service."), MemberReference(member=jobId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=[MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=completedExceptionally, postfix_operators=[], prefix_operators=[], qualifier=FutureUtils, 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[}] call[log.info, parameter[literal["Registering job manager {}@{} for job {}."], member[.jobMasterId], member[.jobManagerAddress], member[.jobId]]] local_variable[type[CompletableFuture], jobMasterIdFuture] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=jobMasterIdFuture, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=jobId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getLeaderId, postfix_operators=[], prefix_operators=[], qualifier=jobLeaderIdService, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot obtain the "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="job leader id future to verify the correct job leader."), 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=ResourceManagerException, sub_type=None)), name=exception)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ResourceManagerException, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onFatalError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not obtain the job leader id future to verify the correct job leader.")], member=debug, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=completedExceptionally, postfix_operators=[], prefix_operators=[], qualifier=FutureUtils, 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) local_variable[type[CompletableFuture], jobMasterGatewayFuture] local_variable[type[CompletableFuture], registrationResponseFuture] return[call[registrationResponseFuture.handleAsync, parameter[LambdaExpression(body=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=throwable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=registrationResponse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Registration of job manager {}@{} failed."), MemberReference(member=jobMasterId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=jobManagerAddress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=info, postfix_operators=[], prefix_operators=[], qualifier=log, 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="Registration of job manager {}@{} failed."), MemberReference(member=jobMasterId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=jobManagerAddress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=throwable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)])), ReturnStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=throwable, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RegistrationResponse, sub_type=ReferenceType(arguments=None, dimensions=None, name=Decline, sub_type=None))), label=None)]))], parameters=[FormalParameter(annotations=[], modifiers=set(), name=registrationResponse, type=ReferenceType(arguments=None, dimensions=[], name=RegistrationResponse, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=throwable, type=ReferenceType(arguments=None, dimensions=[], name=Throwable, sub_type=None), varargs=False)]), call[.getRpcService, parameter[]]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CompletableFuture] operator[<] identifier[RegistrationResponse] operator[>] identifier[registerJobManager] operator[SEP] Keyword[final] identifier[JobMasterId] identifier[jobMasterId] , Keyword[final] identifier[ResourceID] identifier[jobManagerResourceId] , Keyword[final] identifier[String] identifier[jobManagerAddress] , Keyword[final] identifier[JobID] identifier[jobId] , Keyword[final] identifier[Time] identifier[timeout] operator[SEP] { identifier[checkNotNull] operator[SEP] identifier[jobMasterId] operator[SEP] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[jobManagerResourceId] operator[SEP] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[jobManagerAddress] operator[SEP] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[jobId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[jobLeaderIdService] operator[SEP] identifier[containsJob] operator[SEP] identifier[jobId] operator[SEP] operator[SEP] { Keyword[try] { identifier[jobLeaderIdService] operator[SEP] identifier[addJob] operator[SEP] identifier[jobId] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[ResourceManagerException] identifier[exception] operator[=] Keyword[new] identifier[ResourceManagerException] operator[SEP] literal[String] operator[+] identifier[jobId] operator[+] literal[String] , identifier[e] operator[SEP] operator[SEP] identifier[onFatalError] operator[SEP] identifier[exception] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[jobId] , identifier[e] operator[SEP] operator[SEP] Keyword[return] identifier[FutureUtils] operator[SEP] identifier[completedExceptionally] operator[SEP] identifier[exception] operator[SEP] operator[SEP] } } identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[jobMasterId] , identifier[jobManagerAddress] , identifier[jobId] operator[SEP] operator[SEP] identifier[CompletableFuture] operator[<] identifier[JobMasterId] operator[>] identifier[jobMasterIdFuture] operator[SEP] Keyword[try] { identifier[jobMasterIdFuture] operator[=] identifier[jobLeaderIdService] operator[SEP] identifier[getLeaderId] operator[SEP] identifier[jobId] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[ResourceManagerException] identifier[exception] operator[=] Keyword[new] identifier[ResourceManagerException] operator[SEP] literal[String] operator[+] literal[String] , identifier[e] operator[SEP] operator[SEP] identifier[onFatalError] operator[SEP] identifier[exception] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[FutureUtils] operator[SEP] identifier[completedExceptionally] operator[SEP] identifier[exception] operator[SEP] operator[SEP] } identifier[CompletableFuture] operator[<] identifier[JobMasterGateway] operator[>] identifier[jobMasterGatewayFuture] operator[=] identifier[getRpcService] operator[SEP] operator[SEP] operator[SEP] identifier[connect] operator[SEP] identifier[jobManagerAddress] , identifier[jobMasterId] , identifier[JobMasterGateway] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[CompletableFuture] operator[<] identifier[RegistrationResponse] operator[>] identifier[registrationResponseFuture] operator[=] identifier[jobMasterGatewayFuture] operator[SEP] identifier[thenCombineAsync] operator[SEP] identifier[jobMasterIdFuture] , operator[SEP] identifier[JobMasterGateway] identifier[jobMasterGateway] , identifier[JobMasterId] identifier[leadingJobMasterId] operator[SEP] operator[->] { Keyword[if] operator[SEP] identifier[Objects] operator[SEP] identifier[equals] operator[SEP] identifier[leadingJobMasterId] , identifier[jobMasterId] operator[SEP] operator[SEP] { Keyword[return] identifier[registerJobMasterInternal] operator[SEP] identifier[jobMasterGateway] , identifier[jobId] , identifier[jobManagerAddress] , identifier[jobManagerResourceId] operator[SEP] operator[SEP] } Keyword[else] { Keyword[final] identifier[String] identifier[declineMessage] operator[=] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] operator[+] literal[String] , identifier[leadingJobMasterId] , identifier[jobMasterId] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[debug] operator[SEP] identifier[declineMessage] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[RegistrationResponse] operator[SEP] identifier[Decline] operator[SEP] identifier[declineMessage] operator[SEP] operator[SEP] } } , identifier[getMainThreadExecutor] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[registrationResponseFuture] operator[SEP] identifier[handleAsync] operator[SEP] operator[SEP] identifier[RegistrationResponse] identifier[registrationResponse] , identifier[Throwable] identifier[throwable] operator[SEP] operator[->] { Keyword[if] operator[SEP] identifier[throwable] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[jobMasterId] , identifier[jobManagerAddress] , identifier[throwable] operator[SEP] operator[SEP] } Keyword[else] { identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[jobMasterId] , identifier[jobManagerAddress] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[RegistrationResponse] operator[SEP] identifier[Decline] operator[SEP] identifier[throwable] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[registrationResponse] operator[SEP] } } , identifier[getRpcService] operator[SEP] operator[SEP] operator[SEP] identifier[getExecutor] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static double elementMax( DMatrix3x3 a ) { double max = a.a11; if( a.a12 > max ) max = a.a12; if( a.a13 > max ) max = a.a13; if( a.a21 > max ) max = a.a21; if( a.a22 > max ) max = a.a22; if( a.a23 > max ) max = a.a23; if( a.a31 > max ) max = a.a31; if( a.a32 > max ) max = a.a32; if( a.a33 > max ) max = a.a33; return max; }
class class_name[name] begin[{] method[elementMax, return_type[type[double]], modifier[public static], parameter[a]] begin[{] local_variable[type[double], max] if[binary_operation[member[a.a12], >, member[.max]]] begin[{] assign[member[.max], member[a.a12]] else begin[{] None end[}] if[binary_operation[member[a.a13], >, member[.max]]] begin[{] assign[member[.max], member[a.a13]] else begin[{] None end[}] if[binary_operation[member[a.a21], >, member[.max]]] begin[{] assign[member[.max], member[a.a21]] else begin[{] None end[}] if[binary_operation[member[a.a22], >, member[.max]]] begin[{] assign[member[.max], member[a.a22]] else begin[{] None end[}] if[binary_operation[member[a.a23], >, member[.max]]] begin[{] assign[member[.max], member[a.a23]] else begin[{] None end[}] if[binary_operation[member[a.a31], >, member[.max]]] begin[{] assign[member[.max], member[a.a31]] else begin[{] None end[}] if[binary_operation[member[a.a32], >, member[.max]]] begin[{] assign[member[.max], member[a.a32]] else begin[{] None end[}] if[binary_operation[member[a.a33], >, member[.max]]] begin[{] assign[member[.max], member[a.a33]] else begin[{] None end[}] return[member[.max]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[elementMax] operator[SEP] identifier[DMatrix3x3] identifier[a] operator[SEP] { Keyword[double] identifier[max] operator[=] identifier[a] operator[SEP] identifier[a11] operator[SEP] Keyword[if] operator[SEP] identifier[a] operator[SEP] identifier[a12] operator[>] identifier[max] operator[SEP] identifier[max] operator[=] identifier[a] operator[SEP] identifier[a12] operator[SEP] Keyword[if] operator[SEP] identifier[a] operator[SEP] identifier[a13] operator[>] identifier[max] operator[SEP] identifier[max] operator[=] identifier[a] operator[SEP] identifier[a13] operator[SEP] Keyword[if] operator[SEP] identifier[a] operator[SEP] identifier[a21] operator[>] identifier[max] operator[SEP] identifier[max] operator[=] identifier[a] operator[SEP] identifier[a21] operator[SEP] Keyword[if] operator[SEP] identifier[a] operator[SEP] identifier[a22] operator[>] identifier[max] operator[SEP] identifier[max] operator[=] identifier[a] operator[SEP] identifier[a22] operator[SEP] Keyword[if] operator[SEP] identifier[a] operator[SEP] identifier[a23] operator[>] identifier[max] operator[SEP] identifier[max] operator[=] identifier[a] operator[SEP] identifier[a23] operator[SEP] Keyword[if] operator[SEP] identifier[a] operator[SEP] identifier[a31] operator[>] identifier[max] operator[SEP] identifier[max] operator[=] identifier[a] operator[SEP] identifier[a31] operator[SEP] Keyword[if] operator[SEP] identifier[a] operator[SEP] identifier[a32] operator[>] identifier[max] operator[SEP] identifier[max] operator[=] identifier[a] operator[SEP] identifier[a32] operator[SEP] Keyword[if] operator[SEP] identifier[a] operator[SEP] identifier[a33] operator[>] identifier[max] operator[SEP] identifier[max] operator[=] identifier[a] operator[SEP] identifier[a33] operator[SEP] Keyword[return] identifier[max] operator[SEP] }
public static Button createPhoneNumberButton(String title, String phoneNumber) { return new PostbackButton(title, ButtonType.PHONE_NUMBER, phoneNumber); }
class class_name[name] begin[{] method[createPhoneNumberButton, return_type[type[Button]], modifier[public static], parameter[title, phoneNumber]] begin[{] return[ClassCreator(arguments=[MemberReference(member=title, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=PHONE_NUMBER, postfix_operators=[], prefix_operators=[], qualifier=ButtonType, selectors=[]), MemberReference(member=phoneNumber, 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=PostbackButton, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Button] identifier[createPhoneNumberButton] operator[SEP] identifier[String] identifier[title] , identifier[String] identifier[phoneNumber] operator[SEP] { Keyword[return] Keyword[new] identifier[PostbackButton] operator[SEP] identifier[title] , identifier[ButtonType] operator[SEP] identifier[PHONE_NUMBER] , identifier[phoneNumber] operator[SEP] operator[SEP] }
public void printInputControl(PrintWriter out, String strFieldDesc, String strFieldName, String strSize, String strMaxSize, String strValue, String strControlType, int iHtmlAttributes) { if (!HtmlConstants.BUTTON.equalsIgnoreCase(strControlType)) { strFieldName = DBParams.COMMAND; strControlType = HtmlConstants.SUBMIT; } String strButtonDesc = ((SButtonBox)this.getScreenField()).getButtonDesc(); if ((strButtonDesc == null) && (((SButtonBox)this.getScreenField()).getImageButtonName() != null)) { if (this.getScreenField().getParentScreen() instanceof GridScreen) { // These are command buttons such as "Form" or "Detail" GridScreen gridScreen = (GridScreen)this.getScreenField().getParentScreen(); Record record = gridScreen.getMainRecord(); String strRecordClass = record.getClass().getName(); String strBookmark = DBConstants.BLANK; try { strBookmark = record.getHandle(DBConstants.OBJECT_ID_HANDLE).toString(); } catch (DBException ex) { ex.printStackTrace(); } String strImage = "form"; if (((SButtonBox)this.getScreenField()).getImageButtonName() != null) strImage = ((SButtonBox)this.getScreenField()).getImageButtonName(); String strButtonCommand = ((SButtonBox)this.getScreenField()).getButtonCommand(); if ((strButtonCommand == null) || (strButtonCommand.length() == 0)) strButtonCommand = ThinMenuConstants.FORM; String strCommand = "&" + DBParams.COMMAND + "=" + strButtonCommand; try { out.println("<td align=\"center\" valign=\"center\"><a href=\"" + "?record=" + strRecordClass + strCommand + "&" + DBConstants.STRING_OBJECT_ID_HANDLE + "=" + URLEncoder.encode(strBookmark, DBConstants.URL_ENCODING) + "\"><IMG SRC=\"" + HtmlConstants.IMAGE_DIR + "buttons/" + strImage + ".gif\" width=\"16\" height=\"16\" alt=\"Open this record\"></a></td>"); } catch (java.io.UnsupportedEncodingException ex) { ex.printStackTrace(); } } else { strButtonDesc = ((SButtonBox)this.getScreenField()).getImageButtonName(); String strCommand = "<td><img src=\"" + HtmlConstants.IMAGE_DIR + "buttons/" + ((SButtonBox)this.getScreenField()).getImageButtonName() + ".gif\" width=\"16\" height=\"16\" border=\"0\"></td>"; out.println(strCommand); } } else { if (strButtonDesc == null) strButtonDesc = ((SButtonBox)this.getScreenField()).getButtonCommand(); out.println("<td><input type=\"" + strControlType + "\" name=\"" + strFieldName + "\" value=\"" + strButtonDesc + "\"/></td>"); } }
class class_name[name] begin[{] method[printInputControl, return_type[void], modifier[public], parameter[out, strFieldDesc, strFieldName, strSize, strMaxSize, strValue, strControlType, iHtmlAttributes]] begin[{] if[call[HtmlConstants.BUTTON.equalsIgnoreCase, parameter[member[.strControlType]]]] begin[{] assign[member[.strFieldName], member[DBParams.COMMAND]] assign[member[.strControlType], member[HtmlConstants.SUBMIT]] else begin[{] None end[}] local_variable[type[String], strButtonDesc] if[binary_operation[binary_operation[member[.strButtonDesc], ==, literal[null]], &&, binary_operation[Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getScreenField, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), type=ReferenceType(arguments=None, dimensions=[], name=SButtonBox, sub_type=None)), !=, literal[null]]]] begin[{] if[binary_operation[THIS[call[None.getScreenField, parameter[]]call[None.getParentScreen, parameter[]]], instanceof, type[GridScreen]]] begin[{] local_variable[type[GridScreen], gridScreen] local_variable[type[Record], record] local_variable[type[String], strRecordClass] local_variable[type[String], strBookmark] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=strBookmark, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=OBJECT_ID_HANDLE, postfix_operators=[], prefix_operators=[], qualifier=DBConstants, selectors=[])], member=getHandle, postfix_operators=[], prefix_operators=[], qualifier=record, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['DBException']))], finally_block=None, label=None, resources=None) local_variable[type[String], strImage] if[binary_operation[Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getScreenField, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), type=ReferenceType(arguments=None, dimensions=[], name=SButtonBox, sub_type=None)), !=, literal[null]]] begin[{] assign[member[.strImage], Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getScreenField, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), type=ReferenceType(arguments=None, dimensions=[], name=SButtonBox, sub_type=None))] else begin[{] None end[}] local_variable[type[String], strButtonCommand] if[binary_operation[binary_operation[member[.strButtonCommand], ==, literal[null]], ||, binary_operation[call[strButtonCommand.length, parameter[]], ==, literal[0]]]] begin[{] assign[member[.strButtonCommand], member[ThinMenuConstants.FORM]] else begin[{] None end[}] local_variable[type[String], strCommand] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="<td align=\"center\" valign=\"center\"><a href=\""), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="?record="), operator=+), operandr=MemberReference(member=strRecordClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=strCommand, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="&"), operator=+), operandr=MemberReference(member=STRING_OBJECT_ID_HANDLE, postfix_operators=[], prefix_operators=[], qualifier=DBConstants, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="="), operator=+), operandr=MethodInvocation(arguments=[MemberReference(member=strBookmark, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=URL_ENCODING, postfix_operators=[], prefix_operators=[], qualifier=DBConstants, selectors=[])], member=encode, postfix_operators=[], prefix_operators=[], qualifier=URLEncoder, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\"><IMG SRC=\""), operator=+), operandr=MemberReference(member=IMAGE_DIR, postfix_operators=[], prefix_operators=[], qualifier=HtmlConstants, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="buttons/"), operator=+), operandr=MemberReference(member=strImage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".gif\" width=\"16\" height=\"16\" alt=\"Open this record\"></a></td>"), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['java.io.UnsupportedEncodingException']))], finally_block=None, label=None, resources=None) else begin[{] assign[member[.strButtonDesc], Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getScreenField, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), type=ReferenceType(arguments=None, dimensions=[], name=SButtonBox, sub_type=None))] local_variable[type[String], strCommand] call[out.println, parameter[member[.strCommand]]] end[}] else begin[{] if[binary_operation[member[.strButtonDesc], ==, literal[null]]] begin[{] assign[member[.strButtonDesc], Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getScreenField, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), type=ReferenceType(arguments=None, dimensions=[], name=SButtonBox, sub_type=None))] else begin[{] None end[}] call[out.println, parameter[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["<td><input type=\""], +, member[.strControlType]], +, literal["\" name=\""]], +, member[.strFieldName]], +, literal["\" value=\""]], +, member[.strButtonDesc]], +, literal["\"/></td>"]]]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[printInputControl] operator[SEP] identifier[PrintWriter] identifier[out] , identifier[String] identifier[strFieldDesc] , identifier[String] identifier[strFieldName] , identifier[String] identifier[strSize] , identifier[String] identifier[strMaxSize] , identifier[String] identifier[strValue] , identifier[String] identifier[strControlType] , Keyword[int] identifier[iHtmlAttributes] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[HtmlConstants] operator[SEP] identifier[BUTTON] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[strControlType] operator[SEP] operator[SEP] { identifier[strFieldName] operator[=] identifier[DBParams] operator[SEP] identifier[COMMAND] operator[SEP] identifier[strControlType] operator[=] identifier[HtmlConstants] operator[SEP] identifier[SUBMIT] operator[SEP] } identifier[String] identifier[strButtonDesc] operator[=] operator[SEP] operator[SEP] identifier[SButtonBox] operator[SEP] Keyword[this] operator[SEP] identifier[getScreenField] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getButtonDesc] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[strButtonDesc] operator[==] Other[null] operator[SEP] operator[&&] operator[SEP] operator[SEP] operator[SEP] identifier[SButtonBox] operator[SEP] Keyword[this] operator[SEP] identifier[getScreenField] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getImageButtonName] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[getScreenField] operator[SEP] operator[SEP] operator[SEP] identifier[getParentScreen] operator[SEP] operator[SEP] Keyword[instanceof] identifier[GridScreen] operator[SEP] { identifier[GridScreen] identifier[gridScreen] operator[=] operator[SEP] identifier[GridScreen] operator[SEP] Keyword[this] operator[SEP] identifier[getScreenField] operator[SEP] operator[SEP] operator[SEP] identifier[getParentScreen] operator[SEP] operator[SEP] operator[SEP] identifier[Record] identifier[record] operator[=] identifier[gridScreen] operator[SEP] identifier[getMainRecord] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[strRecordClass] operator[=] identifier[record] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[strBookmark] operator[=] identifier[DBConstants] operator[SEP] identifier[BLANK] operator[SEP] Keyword[try] { identifier[strBookmark] operator[=] identifier[record] operator[SEP] identifier[getHandle] operator[SEP] identifier[DBConstants] operator[SEP] identifier[OBJECT_ID_HANDLE] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[DBException] identifier[ex] operator[SEP] { identifier[ex] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } identifier[String] identifier[strImage] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] operator[SEP] operator[SEP] identifier[SButtonBox] operator[SEP] Keyword[this] operator[SEP] identifier[getScreenField] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getImageButtonName] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] identifier[strImage] operator[=] operator[SEP] operator[SEP] identifier[SButtonBox] operator[SEP] Keyword[this] operator[SEP] identifier[getScreenField] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getImageButtonName] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[strButtonCommand] operator[=] operator[SEP] operator[SEP] identifier[SButtonBox] operator[SEP] Keyword[this] operator[SEP] identifier[getScreenField] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getButtonCommand] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[strButtonCommand] operator[==] Other[null] operator[SEP] operator[||] operator[SEP] identifier[strButtonCommand] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] operator[SEP] identifier[strButtonCommand] operator[=] identifier[ThinMenuConstants] operator[SEP] identifier[FORM] operator[SEP] identifier[String] identifier[strCommand] operator[=] literal[String] operator[+] identifier[DBParams] operator[SEP] identifier[COMMAND] operator[+] literal[String] operator[+] identifier[strButtonCommand] operator[SEP] Keyword[try] { identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] literal[String] operator[+] identifier[strRecordClass] operator[+] identifier[strCommand] operator[+] literal[String] operator[+] identifier[DBConstants] operator[SEP] identifier[STRING_OBJECT_ID_HANDLE] operator[+] literal[String] operator[+] identifier[URLEncoder] operator[SEP] identifier[encode] operator[SEP] identifier[strBookmark] , identifier[DBConstants] operator[SEP] identifier[URL_ENCODING] operator[SEP] operator[+] literal[String] operator[+] identifier[HtmlConstants] operator[SEP] identifier[IMAGE_DIR] operator[+] literal[String] operator[+] identifier[strImage] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[UnsupportedEncodingException] identifier[ex] operator[SEP] { identifier[ex] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[strButtonDesc] operator[=] operator[SEP] operator[SEP] identifier[SButtonBox] operator[SEP] Keyword[this] operator[SEP] identifier[getScreenField] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getImageButtonName] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[strCommand] operator[=] literal[String] operator[+] identifier[HtmlConstants] operator[SEP] identifier[IMAGE_DIR] operator[+] literal[String] operator[+] operator[SEP] operator[SEP] identifier[SButtonBox] operator[SEP] Keyword[this] operator[SEP] identifier[getScreenField] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getImageButtonName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[strCommand] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[if] operator[SEP] identifier[strButtonDesc] operator[==] Other[null] operator[SEP] identifier[strButtonDesc] operator[=] operator[SEP] operator[SEP] identifier[SButtonBox] operator[SEP] Keyword[this] operator[SEP] identifier[getScreenField] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getButtonCommand] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[strControlType] operator[+] literal[String] operator[+] identifier[strFieldName] operator[+] literal[String] operator[+] identifier[strButtonDesc] operator[+] literal[String] operator[SEP] operator[SEP] } }
@Nonnull public DescribeCommand apply(@Nullable GitDescribeConfig config) { if (config != null) { always(config.isAlways()); dirty(config.getDirty()); abbrev(config.getAbbrev()); forceLongFormat(config.getForceLongFormat()); tags(config.getTags()); match(config.getMatch()); } return this; }
class class_name[name] begin[{] method[apply, return_type[type[DescribeCommand]], modifier[public], parameter[config]] begin[{] if[binary_operation[member[.config], !=, literal[null]]] begin[{] call[.always, parameter[call[config.isAlways, parameter[]]]] call[.dirty, parameter[call[config.getDirty, parameter[]]]] call[.abbrev, parameter[call[config.getAbbrev, parameter[]]]] call[.forceLongFormat, parameter[call[config.getForceLongFormat, parameter[]]]] call[.tags, parameter[call[config.getTags, parameter[]]]] call[.match, parameter[call[config.getMatch, parameter[]]]] else begin[{] None end[}] return[THIS[]] end[}] END[}]
annotation[@] identifier[Nonnull] Keyword[public] identifier[DescribeCommand] identifier[apply] operator[SEP] annotation[@] identifier[Nullable] identifier[GitDescribeConfig] identifier[config] operator[SEP] { Keyword[if] operator[SEP] identifier[config] operator[!=] Other[null] operator[SEP] { identifier[always] operator[SEP] identifier[config] operator[SEP] identifier[isAlways] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[dirty] operator[SEP] identifier[config] operator[SEP] identifier[getDirty] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[abbrev] operator[SEP] identifier[config] operator[SEP] identifier[getAbbrev] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[forceLongFormat] operator[SEP] identifier[config] operator[SEP] identifier[getForceLongFormat] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[tags] operator[SEP] identifier[config] operator[SEP] identifier[getTags] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[match] operator[SEP] identifier[config] operator[SEP] identifier[getMatch] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public int getNumberOfCategorizedArticles(Wikipedia pWiki, CategoryGraph catGraph) throws WikiApiException{ if (categorizedArticleSet == null) { // has not been initialized yet iterateCategoriesGetArticles(pWiki, catGraph); } return categorizedArticleSet.size(); }
class class_name[name] begin[{] method[getNumberOfCategorizedArticles, return_type[type[int]], modifier[public], parameter[pWiki, catGraph]] begin[{] if[binary_operation[member[.categorizedArticleSet], ==, literal[null]]] begin[{] call[.iterateCategoriesGetArticles, parameter[member[.pWiki], member[.catGraph]]] else begin[{] None end[}] return[call[categorizedArticleSet.size, parameter[]]] end[}] END[}]
Keyword[public] Keyword[int] identifier[getNumberOfCategorizedArticles] operator[SEP] identifier[Wikipedia] identifier[pWiki] , identifier[CategoryGraph] identifier[catGraph] operator[SEP] Keyword[throws] identifier[WikiApiException] { Keyword[if] operator[SEP] identifier[categorizedArticleSet] operator[==] Other[null] operator[SEP] { identifier[iterateCategoriesGetArticles] operator[SEP] identifier[pWiki] , identifier[catGraph] operator[SEP] operator[SEP] } Keyword[return] identifier[categorizedArticleSet] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] }
protected PredicateLevelProposal proposeForGroupingMap( ImmutableMultimap<ImmutableList<VariableOrGroundTerm>, ExtensionalDataNode> groupingMap) throws AtomUnificationException { ImmutableCollection<Collection<ExtensionalDataNode>> dataNodeGroups = groupingMap.asMap().values(); try { /* * Collection of unifying substitutions */ ImmutableSet<ImmutableSubstitution<VariableOrGroundTerm>> unifyingSubstitutions = dataNodeGroups.stream() .filter(g -> g.size() > 1) .map(redundantNodes -> { try { return unifyRedundantNodes(redundantNodes); } catch (AtomUnificationException e) { throw new AtomUnificationRuntimeException(e); } }) .filter(s -> !s.isEmpty()) .collect(ImmutableCollectors.toSet()); /* * All the nodes that have been at least once dominated (--> could thus be removed). * * Not parallellizable */ ImmutableSet<ExtensionalDataNode> removableNodes = ImmutableSet.copyOf(dataNodeGroups.stream() .filter(sameRowDataNodes -> sameRowDataNodes.size() > 1) .reduce( new Dominance(), Dominance::update, (dom1, dom2) -> { throw new IllegalStateException("Cannot be run in parallel"); }) .getRemovalNodes()); return new PredicateLevelProposal(unifyingSubstitutions, removableNodes); /* * Trick: rethrow the exception */ } catch (AtomUnificationRuntimeException e) { throw e.checkedException; } }
class class_name[name] begin[{] method[proposeForGroupingMap, return_type[type[PredicateLevelProposal]], modifier[protected], parameter[groupingMap]] begin[{] local_variable[type[ImmutableCollection], dataNodeGroups] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=stream, postfix_operators=[], prefix_operators=[], qualifier=dataNodeGroups, selectors=[MethodInvocation(arguments=[LambdaExpression(body=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=g, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>), parameters=[MemberReference(member=g, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])], member=filter, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[LambdaExpression(body=[TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=redundantNodes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=unifyRedundantNodes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AtomUnificationRuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['AtomUnificationException']))], finally_block=None, label=None, resources=None)], parameters=[MemberReference(member=redundantNodes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])], member=map, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[LambdaExpression(body=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=s, selectors=[], type_arguments=None), parameters=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])], member=filter, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toSet, postfix_operators=[], prefix_operators=[], qualifier=ImmutableCollectors, selectors=[], type_arguments=None)], member=collect, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=unifyingSubstitutions)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=VariableOrGroundTerm, sub_type=None))], dimensions=[], name=ImmutableSubstitution, sub_type=None))], dimensions=[], name=ImmutableSet, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=stream, postfix_operators=[], prefix_operators=[], qualifier=dataNodeGroups, selectors=[MethodInvocation(arguments=[LambdaExpression(body=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=sameRowDataNodes, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>), parameters=[MemberReference(member=sameRowDataNodes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])], member=filter, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Dominance, sub_type=None)), MethodReference(expression=MemberReference(member=Dominance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), method=MemberReference(member=update, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[]), LambdaExpression(body=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot be run in parallel")], 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)], parameters=[InferredFormalParameter(name=dom1), InferredFormalParameter(name=dom2)])], member=reduce, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getRemovalNodes, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=copyOf, postfix_operators=[], prefix_operators=[], qualifier=ImmutableSet, selectors=[], type_arguments=None), name=removableNodes)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ExtensionalDataNode, sub_type=None))], dimensions=[], name=ImmutableSet, sub_type=None)), ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=unifyingSubstitutions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=removableNodes, 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=PredicateLevelProposal, sub_type=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MemberReference(member=checkedException, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['AtomUnificationRuntimeException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[protected] identifier[PredicateLevelProposal] identifier[proposeForGroupingMap] operator[SEP] identifier[ImmutableMultimap] operator[<] identifier[ImmutableList] operator[<] identifier[VariableOrGroundTerm] operator[>] , identifier[ExtensionalDataNode] operator[>] identifier[groupingMap] operator[SEP] Keyword[throws] identifier[AtomUnificationException] { identifier[ImmutableCollection] operator[<] identifier[Collection] operator[<] identifier[ExtensionalDataNode] operator[>] operator[>] identifier[dataNodeGroups] operator[=] identifier[groupingMap] operator[SEP] identifier[asMap] operator[SEP] operator[SEP] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[ImmutableSet] operator[<] identifier[ImmutableSubstitution] operator[<] identifier[VariableOrGroundTerm] operator[>] operator[>] identifier[unifyingSubstitutions] operator[=] identifier[dataNodeGroups] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[g] operator[->] identifier[g] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[1] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[redundantNodes] operator[->] { Keyword[try] { Keyword[return] identifier[unifyRedundantNodes] operator[SEP] identifier[redundantNodes] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[AtomUnificationException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[AtomUnificationRuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[s] operator[->] operator[!] identifier[s] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[ImmutableCollectors] operator[SEP] identifier[toSet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ImmutableSet] operator[<] identifier[ExtensionalDataNode] operator[>] identifier[removableNodes] operator[=] identifier[ImmutableSet] operator[SEP] identifier[copyOf] operator[SEP] identifier[dataNodeGroups] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[sameRowDataNodes] operator[->] identifier[sameRowDataNodes] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[1] operator[SEP] operator[SEP] identifier[reduce] operator[SEP] Keyword[new] identifier[Dominance] operator[SEP] operator[SEP] , identifier[Dominance] operator[::] identifier[update] , operator[SEP] identifier[dom1] , identifier[dom2] operator[SEP] operator[->] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] identifier[getRemovalNodes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[PredicateLevelProposal] operator[SEP] identifier[unifyingSubstitutions] , identifier[removableNodes] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[AtomUnificationRuntimeException] identifier[e] operator[SEP] { Keyword[throw] identifier[e] operator[SEP] identifier[checkedException] operator[SEP] } }
@Override public VoltTable runDML(String dml) { String modifiedDml = transformDML(dml); printTransformedSql(dml, modifiedDml); return super.runDML(modifiedDml, false); }
class class_name[name] begin[{] method[runDML, return_type[type[VoltTable]], modifier[public], parameter[dml]] begin[{] local_variable[type[String], modifiedDml] call[.printTransformedSql, parameter[member[.dml], member[.modifiedDml]]] return[SuperMethodInvocation(arguments=[MemberReference(member=modifiedDml, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=runDML, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[VoltTable] identifier[runDML] operator[SEP] identifier[String] identifier[dml] operator[SEP] { identifier[String] identifier[modifiedDml] operator[=] identifier[transformDML] operator[SEP] identifier[dml] operator[SEP] operator[SEP] identifier[printTransformedSql] operator[SEP] identifier[dml] , identifier[modifiedDml] operator[SEP] operator[SEP] Keyword[return] Keyword[super] operator[SEP] identifier[runDML] operator[SEP] identifier[modifiedDml] , literal[boolean] operator[SEP] operator[SEP] }
public static <E> Iterator<E> drop(long howMany, E... array) { return new FilteringIterator<E>(new ArrayIterator<E>(array), new DropWhile<E>(new UntilCount<E>(howMany))); }
class class_name[name] begin[{] method[drop, return_type[type[Iterator]], modifier[public static], parameter[howMany, array]] begin[{] return[ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=array, 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=E, sub_type=None))], dimensions=None, name=ArrayIterator, sub_type=None)), ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=howMany, 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=E, sub_type=None))], dimensions=None, name=UntilCount, sub_type=None))], 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=E, sub_type=None))], dimensions=None, name=DropWhile, sub_type=None))], 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=E, sub_type=None))], dimensions=None, name=FilteringIterator, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[E] operator[>] identifier[Iterator] operator[<] identifier[E] operator[>] identifier[drop] operator[SEP] Keyword[long] identifier[howMany] , identifier[E] operator[...] identifier[array] operator[SEP] { Keyword[return] Keyword[new] identifier[FilteringIterator] operator[<] identifier[E] operator[>] operator[SEP] Keyword[new] identifier[ArrayIterator] operator[<] identifier[E] operator[>] operator[SEP] identifier[array] operator[SEP] , Keyword[new] identifier[DropWhile] operator[<] identifier[E] operator[>] operator[SEP] Keyword[new] identifier[UntilCount] operator[<] identifier[E] operator[>] operator[SEP] identifier[howMany] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private void clearStoreNFC( final Set<String> sourcePaths, ArtifactStore store ) throws IndyDataException { Set<String> paths = sourcePaths.stream() .map( sp -> sp.startsWith( "/" ) && sp.length() > 1 ? sp.substring( 1 ) : sp ) .collect( Collectors.toSet() ); paths.forEach( path -> { ConcreteResource resource = new ConcreteResource( LocationUtils.toLocation( store ), path ); logger.debug( "Clearing NFC path: {} from: {}\n\tResource: {}", path, store.getKey(), resource ); nfc.clearMissing( resource ); } ); Set<Group> groups = storeManager.query().getGroupsAffectedBy( store.getKey() ); if ( groups != null ) { groups.forEach( group -> paths.forEach( path -> { ConcreteResource resource = new ConcreteResource( LocationUtils.toLocation( group ), path ); logger.debug( "Clearing NFC path: {} from: {}\n\tResource: {}", path, group.getKey(), resource ); nfc.clearMissing( resource ); } ) ); } }
class class_name[name] begin[{] method[clearStoreNFC, return_type[void], modifier[private], parameter[sourcePaths, store]] begin[{] local_variable[type[Set], paths] call[paths.forEach, parameter[LambdaExpression(body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=store, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toLocation, postfix_operators=[], prefix_operators=[], qualifier=LocationUtils, selectors=[], type_arguments=None), MemberReference(member=path, 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=ConcreteResource, sub_type=None)), name=resource)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ConcreteResource, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Clearing NFC path: {} from: {}\n\tResource: {}"), MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=store, selectors=[], type_arguments=None), MemberReference(member=resource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=resource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=clearMissing, postfix_operators=[], prefix_operators=[], qualifier=nfc, selectors=[], type_arguments=None), label=None)], parameters=[MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]] local_variable[type[Set], groups] if[binary_operation[member[.groups], !=, literal[null]]] begin[{] call[groups.forEach, parameter[LambdaExpression(body=MethodInvocation(arguments=[LambdaExpression(body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=group, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toLocation, postfix_operators=[], prefix_operators=[], qualifier=LocationUtils, selectors=[], type_arguments=None), MemberReference(member=path, 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=ConcreteResource, sub_type=None)), name=resource)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ConcreteResource, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Clearing NFC path: {} from: {}\n\tResource: {}"), MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=group, selectors=[], type_arguments=None), MemberReference(member=resource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=resource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=clearMissing, postfix_operators=[], prefix_operators=[], qualifier=nfc, selectors=[], type_arguments=None), label=None)], parameters=[MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])], member=forEach, postfix_operators=[], prefix_operators=[], qualifier=paths, selectors=[], type_arguments=None), parameters=[MemberReference(member=group, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[clearStoreNFC] operator[SEP] Keyword[final] identifier[Set] operator[<] identifier[String] operator[>] identifier[sourcePaths] , identifier[ArtifactStore] identifier[store] operator[SEP] Keyword[throws] identifier[IndyDataException] { identifier[Set] operator[<] identifier[String] operator[>] identifier[paths] operator[=] identifier[sourcePaths] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[sp] operator[->] identifier[sp] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[&&] identifier[sp] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[1] operator[?] identifier[sp] operator[SEP] identifier[substring] operator[SEP] Other[1] operator[SEP] operator[:] identifier[sp] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[toSet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[paths] operator[SEP] identifier[forEach] operator[SEP] identifier[path] operator[->] { identifier[ConcreteResource] identifier[resource] operator[=] Keyword[new] identifier[ConcreteResource] operator[SEP] identifier[LocationUtils] operator[SEP] identifier[toLocation] operator[SEP] identifier[store] operator[SEP] , identifier[path] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[path] , identifier[store] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] , identifier[resource] operator[SEP] operator[SEP] identifier[nfc] operator[SEP] identifier[clearMissing] operator[SEP] identifier[resource] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[Group] operator[>] identifier[groups] operator[=] identifier[storeManager] operator[SEP] identifier[query] operator[SEP] operator[SEP] operator[SEP] identifier[getGroupsAffectedBy] operator[SEP] identifier[store] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[groups] operator[!=] Other[null] operator[SEP] { identifier[groups] operator[SEP] identifier[forEach] operator[SEP] identifier[group] operator[->] identifier[paths] operator[SEP] identifier[forEach] operator[SEP] identifier[path] operator[->] { identifier[ConcreteResource] identifier[resource] operator[=] Keyword[new] identifier[ConcreteResource] operator[SEP] identifier[LocationUtils] operator[SEP] identifier[toLocation] operator[SEP] identifier[group] operator[SEP] , identifier[path] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[path] , identifier[group] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] , identifier[resource] operator[SEP] operator[SEP] identifier[nfc] operator[SEP] identifier[clearMissing] operator[SEP] identifier[resource] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] operator[SEP] } }
public void start(BundleContext context) throws Exception { super.start(context); repositoryAdmin = this.getRepositoryAdmin(context, this); if (repositoryAdmin != null) { // The repository is up, I can get to work (otherwise, I'll be waiting) this.addBootstrapRepository(repositoryAdmin, context); this.registerClassFinder(context); } }
class class_name[name] begin[{] method[start, return_type[void], modifier[public], parameter[context]] begin[{] SuperMethodInvocation(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=start, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) assign[member[.repositoryAdmin], THIS[call[None.getRepositoryAdmin, parameter[member[.context], THIS[]]]]] if[binary_operation[member[.repositoryAdmin], !=, literal[null]]] begin[{] THIS[call[None.addBootstrapRepository, parameter[member[.repositoryAdmin], member[.context]]]] THIS[call[None.registerClassFinder, parameter[member[.context]]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[start] operator[SEP] identifier[BundleContext] identifier[context] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[super] operator[SEP] identifier[start] operator[SEP] identifier[context] operator[SEP] operator[SEP] identifier[repositoryAdmin] operator[=] Keyword[this] operator[SEP] identifier[getRepositoryAdmin] operator[SEP] identifier[context] , Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[repositoryAdmin] operator[!=] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[addBootstrapRepository] operator[SEP] identifier[repositoryAdmin] , identifier[context] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[registerClassFinder] operator[SEP] identifier[context] operator[SEP] operator[SEP] } }
public String binaryToString(Object objData) { initGlobals(); if (objData == null) return Constants.BLANK; String strReturn = null; synchronized (gIntegerFormat) { strReturn = gIntegerFormat.format(((Short)objData).shortValue()); } return strReturn; }
class class_name[name] begin[{] method[binaryToString, return_type[type[String]], modifier[public], parameter[objData]] begin[{] call[.initGlobals, parameter[]] if[binary_operation[member[.objData], ==, literal[null]]] begin[{] return[member[Constants.BLANK]] else begin[{] None end[}] local_variable[type[String], strReturn] SYNCHRONIZED[member[.gIntegerFormat]] BEGIN[{] assign[member[.strReturn], call[gIntegerFormat.format, parameter[Cast(expression=MemberReference(member=objData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Short, sub_type=None))]]] END[}] return[member[.strReturn]] end[}] END[}]
Keyword[public] identifier[String] identifier[binaryToString] operator[SEP] identifier[Object] identifier[objData] operator[SEP] { identifier[initGlobals] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[objData] operator[==] Other[null] operator[SEP] Keyword[return] identifier[Constants] operator[SEP] identifier[BLANK] operator[SEP] identifier[String] identifier[strReturn] operator[=] Other[null] operator[SEP] Keyword[synchronized] operator[SEP] identifier[gIntegerFormat] operator[SEP] { identifier[strReturn] operator[=] identifier[gIntegerFormat] operator[SEP] identifier[format] operator[SEP] operator[SEP] operator[SEP] identifier[Short] operator[SEP] identifier[objData] operator[SEP] operator[SEP] identifier[shortValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[strReturn] operator[SEP] }
@Override public EClass getIfcWarpingConstantMeasure() { if (ifcWarpingConstantMeasureEClass == null) { ifcWarpingConstantMeasureEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) .getEClassifiers().get(893); } return ifcWarpingConstantMeasureEClass; }
class class_name[name] begin[{] method[getIfcWarpingConstantMeasure, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcWarpingConstantMeasureEClass], ==, literal[null]]] begin[{] assign[member[.ifcWarpingConstantMeasureEClass], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=Ifc4Package, selectors=[])], member=getEPackage, postfix_operators=[], prefix_operators=[], qualifier=EPackage.Registry.INSTANCE, selectors=[MethodInvocation(arguments=[], member=getEClassifiers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=893)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=EClass, sub_type=None))] else begin[{] None end[}] return[member[.ifcWarpingConstantMeasureEClass]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcWarpingConstantMeasure] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcWarpingConstantMeasureEClass] operator[==] Other[null] operator[SEP] { identifier[ifcWarpingConstantMeasureEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[Ifc4Package] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[893] operator[SEP] operator[SEP] } Keyword[return] identifier[ifcWarpingConstantMeasureEClass] operator[SEP] }
public void unsetAsynchConsumer(boolean stoppable) //SIB0115d.comms throws SISessionUnavailableException, SISessionDroppedException, SIConnectionUnavailableException, SIConnectionDroppedException, SIErrorException, SIIncorrectCallException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "unsetAsynchConsumer"); if (sessionId == 0) { // If the session Id = 0, then no one called setSessionId(). As such we are unable to flow // to the server as we do not know which session to instruct the server to use. SIErrorException e = new SIErrorException( nls.getFormattedMessage("SESSION_ID_HAS_NOT_BEEN_SET_SICO1043", null, null) ); FFDCFilter.processException(e, CLASS_NAME + ".unsetAsyncConsumer", CommsConstants.CONVERSATIONHELPERIMPL_01, this); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, e.getMessage(), e); throw e; } CommsByteBuffer request = getCommsByteBuffer(); // Connection object id request.putShort(connectionObjectId); // Consumer session id request.putShort(sessionId); // Pass on call to server CommsByteBuffer reply = null; try { reply = jfapExchange(request, (stoppable ? JFapChannelConstants.SEG_DEREGISTER_STOPPABLE_ASYNC_CONSUMER : JFapChannelConstants.SEG_DEREGISTER_ASYNC_CONSUMER), //SIB0115d.comms JFapChannelConstants.PRIORITY_MEDIUM, true); } catch (SIConnectionLostException e) { // No FFDC Code needed // Converting this to a connection dropped as that is all we can throw if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Connection was lost", e); throw new SIConnectionDroppedException(e.getMessage(), e); } // Confirm appropriate data returned try { short err = reply.getCommandCompletionCode(JFapChannelConstants.SEG_DEREGISTER_ASYNC_CONSUMER_R); if (err != CommsConstants.SI_NO_EXCEPTION) { checkFor_SISessionUnavailableException(reply, err); checkFor_SISessionDroppedException(reply, err); checkFor_SIConnectionUnavailableException(reply, err); checkFor_SIConnectionDroppedException(reply, err); checkFor_SIIncorrectCallException(reply, err); checkFor_SIErrorException(reply, err); defaultChecker(reply, err); } } finally { if (reply != null) reply.release(); } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "unsetAsynchConsumer"); }
class class_name[name] begin[{] method[unsetAsynchConsumer, return_type[void], modifier[public], parameter[stoppable]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[THIS[], member[.tc], literal["unsetAsynchConsumer"]]] else begin[{] None end[}] if[binary_operation[member[.sessionId], ==, literal[0]]] begin[{] local_variable[type[SIErrorException], e] call[FFDCFilter.processException, parameter[member[.e], binary_operation[member[.CLASS_NAME], +, literal[".unsetAsyncConsumer"]], member[CommsConstants.CONVERSATIONHELPERIMPL_01], THIS[]]] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[SibTr.debug, parameter[THIS[], member[.tc], call[e.getMessage, parameter[]], member[.e]]] else begin[{] None end[}] ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) else begin[{] None end[}] local_variable[type[CommsByteBuffer], request] call[request.putShort, parameter[member[.connectionObjectId]]] call[request.putShort, parameter[member[.sessionId]]] local_variable[type[CommsByteBuffer], reply] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=reply, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=request, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), TernaryExpression(condition=MemberReference(member=stoppable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=MemberReference(member=SEG_DEREGISTER_ASYNC_CONSUMER, postfix_operators=[], prefix_operators=[], qualifier=JFapChannelConstants, selectors=[]), if_true=MemberReference(member=SEG_DEREGISTER_STOPPABLE_ASYNC_CONSUMER, postfix_operators=[], prefix_operators=[], qualifier=JFapChannelConstants, selectors=[])), MemberReference(member=PRIORITY_MEDIUM, postfix_operators=[], prefix_operators=[], qualifier=JFapChannelConstants, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=jfapExchange, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Connection was lost"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)), ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SIConnectionDroppedException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SIConnectionLostException']))], finally_block=None, label=None, resources=None) TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=SEG_DEREGISTER_ASYNC_CONSUMER_R, postfix_operators=[], prefix_operators=[], qualifier=JFapChannelConstants, selectors=[])], member=getCommandCompletionCode, postfix_operators=[], prefix_operators=[], qualifier=reply, selectors=[], type_arguments=None), name=err)], modifiers=set(), type=BasicType(dimensions=[], name=short)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=err, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=SI_NO_EXCEPTION, postfix_operators=[], prefix_operators=[], qualifier=CommsConstants, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=reply, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=err, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkFor_SISessionUnavailableException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=reply, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=err, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkFor_SISessionDroppedException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=reply, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=err, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkFor_SIConnectionUnavailableException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=reply, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=err, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkFor_SIConnectionDroppedException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=reply, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=err, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkFor_SIIncorrectCallException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=reply, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=err, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkFor_SIErrorException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=reply, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=err, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=defaultChecker, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], catches=None, finally_block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=reply, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[], member=release, postfix_operators=[], prefix_operators=[], qualifier=reply, selectors=[], type_arguments=None), label=None))], label=None, resources=None) if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[THIS[], member[.tc], literal["unsetAsynchConsumer"]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[unsetAsynchConsumer] operator[SEP] Keyword[boolean] identifier[stoppable] operator[SEP] Keyword[throws] identifier[SISessionUnavailableException] , identifier[SISessionDroppedException] , identifier[SIConnectionUnavailableException] , identifier[SIConnectionDroppedException] , identifier[SIErrorException] , identifier[SIIncorrectCallException] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sessionId] operator[==] Other[0] operator[SEP] { identifier[SIErrorException] identifier[e] operator[=] Keyword[new] identifier[SIErrorException] operator[SEP] identifier[nls] operator[SEP] identifier[getFormattedMessage] operator[SEP] literal[String] , Other[null] , Other[null] operator[SEP] operator[SEP] operator[SEP] identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[e] , identifier[CLASS_NAME] operator[+] literal[String] , identifier[CommsConstants] operator[SEP] identifier[CONVERSATIONHELPERIMPL_01] , Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] identifier[e] operator[SEP] } identifier[CommsByteBuffer] identifier[request] operator[=] identifier[getCommsByteBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[request] operator[SEP] identifier[putShort] operator[SEP] identifier[connectionObjectId] operator[SEP] operator[SEP] identifier[request] operator[SEP] identifier[putShort] operator[SEP] identifier[sessionId] operator[SEP] operator[SEP] identifier[CommsByteBuffer] identifier[reply] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[reply] operator[=] identifier[jfapExchange] operator[SEP] identifier[request] , operator[SEP] identifier[stoppable] operator[?] identifier[JFapChannelConstants] operator[SEP] identifier[SEG_DEREGISTER_STOPPABLE_ASYNC_CONSUMER] operator[:] identifier[JFapChannelConstants] operator[SEP] identifier[SEG_DEREGISTER_ASYNC_CONSUMER] operator[SEP] , identifier[JFapChannelConstants] operator[SEP] identifier[PRIORITY_MEDIUM] , literal[boolean] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SIConnectionLostException] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[SIConnectionDroppedException] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } Keyword[try] { Keyword[short] identifier[err] operator[=] identifier[reply] operator[SEP] identifier[getCommandCompletionCode] operator[SEP] identifier[JFapChannelConstants] operator[SEP] identifier[SEG_DEREGISTER_ASYNC_CONSUMER_R] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[err] operator[!=] identifier[CommsConstants] operator[SEP] identifier[SI_NO_EXCEPTION] operator[SEP] { identifier[checkFor_SISessionUnavailableException] operator[SEP] identifier[reply] , identifier[err] operator[SEP] operator[SEP] identifier[checkFor_SISessionDroppedException] operator[SEP] identifier[reply] , identifier[err] operator[SEP] operator[SEP] identifier[checkFor_SIConnectionUnavailableException] operator[SEP] identifier[reply] , identifier[err] operator[SEP] operator[SEP] identifier[checkFor_SIConnectionDroppedException] operator[SEP] identifier[reply] , identifier[err] operator[SEP] operator[SEP] identifier[checkFor_SIIncorrectCallException] operator[SEP] identifier[reply] , identifier[err] operator[SEP] operator[SEP] identifier[checkFor_SIErrorException] operator[SEP] identifier[reply] , identifier[err] operator[SEP] operator[SEP] identifier[defaultChecker] operator[SEP] identifier[reply] , identifier[err] operator[SEP] operator[SEP] } } Keyword[finally] { Keyword[if] operator[SEP] identifier[reply] operator[!=] Other[null] operator[SEP] identifier[reply] operator[SEP] identifier[release] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] }
public final boolean isItemInsideView(int position) { float x = (getXForItemAtPosition(position) + offsetX); float y = (getYForItemAtPosition(position) + offsetY); float itemSize = getNoxItemSize(); int viewWidth = shapeConfig.getViewWidth(); boolean matchesHorizontally = x + itemSize >= 0 && x <= viewWidth; float viewHeight = shapeConfig.getViewHeight(); boolean matchesVertically = y + itemSize >= 0 && y <= viewHeight; return matchesHorizontally && matchesVertically; }
class class_name[name] begin[{] method[isItemInsideView, return_type[type[boolean]], modifier[final public], parameter[position]] begin[{] local_variable[type[float], x] local_variable[type[float], y] local_variable[type[float], itemSize] local_variable[type[int], viewWidth] local_variable[type[boolean], matchesHorizontally] local_variable[type[float], viewHeight] local_variable[type[boolean], matchesVertically] return[binary_operation[member[.matchesHorizontally], &&, member[.matchesVertically]]] end[}] END[}]
Keyword[public] Keyword[final] Keyword[boolean] identifier[isItemInsideView] operator[SEP] Keyword[int] identifier[position] operator[SEP] { Keyword[float] identifier[x] operator[=] operator[SEP] identifier[getXForItemAtPosition] operator[SEP] identifier[position] operator[SEP] operator[+] identifier[offsetX] operator[SEP] operator[SEP] Keyword[float] identifier[y] operator[=] operator[SEP] identifier[getYForItemAtPosition] operator[SEP] identifier[position] operator[SEP] operator[+] identifier[offsetY] operator[SEP] operator[SEP] Keyword[float] identifier[itemSize] operator[=] identifier[getNoxItemSize] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[viewWidth] operator[=] identifier[shapeConfig] operator[SEP] identifier[getViewWidth] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[matchesHorizontally] operator[=] identifier[x] operator[+] identifier[itemSize] operator[>=] Other[0] operator[&&] identifier[x] operator[<=] identifier[viewWidth] operator[SEP] Keyword[float] identifier[viewHeight] operator[=] identifier[shapeConfig] operator[SEP] identifier[getViewHeight] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[matchesVertically] operator[=] identifier[y] operator[+] identifier[itemSize] operator[>=] Other[0] operator[&&] identifier[y] operator[<=] identifier[viewHeight] operator[SEP] Keyword[return] identifier[matchesHorizontally] operator[&&] identifier[matchesVertically] operator[SEP] }
public void assertNotGreaterThan(Description description, Character actual, char other) { assertNotNull(description, actual); if (isGreaterThan(actual, other)) { throw failures.failure(description, shouldNotBeGreaterThan(actual, other)); } }
class class_name[name] begin[{] method[assertNotGreaterThan, return_type[void], modifier[public], parameter[description, actual, other]] begin[{] call[.assertNotNull, parameter[member[.description], member[.actual]]] if[call[.isGreaterThan, parameter[member[.actual], member[.other]]]] begin[{] ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=description, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=actual, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=other, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=shouldNotBeGreaterThan, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=failure, postfix_operators=[], prefix_operators=[], qualifier=failures, selectors=[], type_arguments=None), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[assertNotGreaterThan] operator[SEP] identifier[Description] identifier[description] , identifier[Character] identifier[actual] , Keyword[char] identifier[other] operator[SEP] { identifier[assertNotNull] operator[SEP] identifier[description] , identifier[actual] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isGreaterThan] operator[SEP] identifier[actual] , identifier[other] operator[SEP] operator[SEP] { Keyword[throw] identifier[failures] operator[SEP] identifier[failure] operator[SEP] identifier[description] , identifier[shouldNotBeGreaterThan] operator[SEP] identifier[actual] , identifier[other] operator[SEP] operator[SEP] operator[SEP] } }
public static byte[] dec(Pointer _s, final int _len) { int len = _len; byte[] sb = _s.buffer; int s = _s.start; int a = -1,b = -1,c = 0,d; byte[] ptrb = new byte[len]; System.arraycopy(sb, s, ptrb, 0, len); int ptr = 0; int end = 0; int send = s + len; while(s < send) { while(sb[s] == '\r' || sb[s] == '\n') { s++; } if((a = b64_xtable[(int)sb[s+0]]) == -1) break; if((b = b64_xtable[(int)sb[s+1]]) == -1) break; if((c = b64_xtable[(int)sb[s+2]]) == -1) break; if((d = b64_xtable[(int)sb[s+3]]) == -1) break; ptrb[end++] = (byte)((a << 2) | (b >> 4)); ptrb[end++] = (byte)((b << 4) | (c >> 2)); ptrb[end++] = (byte)((c << 6) | d); s += 4; } if(a != -1 && b != -1) { if(s + 2 < send && sb[s+2] == '=') ptrb[end++] = (byte)((a << 2) | (b >> 4)); if(c != -1 && s + 3 < send && sb[s+3] == '=') { ptrb[end++] = (byte)((a << 2) | (b >> 4)); ptrb[end++] = (byte)((b << 4) | (c >> 2)); } } ptrb[end] = '\0'; return ptrb; }
class class_name[name] begin[{] method[dec, return_type[type[byte]], modifier[public static], parameter[_s, _len]] begin[{] local_variable[type[int], len] local_variable[type[byte], sb] local_variable[type[int], s] local_variable[type[int], a] local_variable[type[byte], ptrb] call[System.arraycopy, parameter[member[.sb], member[.s], member[.ptrb], literal[0], member[.len]]] local_variable[type[int], ptr] local_variable[type[int], end] local_variable[type[int], send] while[binary_operation[member[.s], <, member[.send]]] begin[{] while[binary_operation[binary_operation[member[.sb], ==, literal['\r']], ||, binary_operation[member[.sb], ==, literal['\n']]]] begin[{] member[.s] end[}] if[binary_operation[assign[member[.a], member[.b64_xtable]], ==, literal[1]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] if[binary_operation[assign[member[.b], member[.b64_xtable]], ==, literal[1]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] if[binary_operation[assign[member[.c], member[.b64_xtable]], ==, literal[1]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] if[binary_operation[assign[member[.d], member[.b64_xtable]], ==, literal[1]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] assign[member[.ptrb], Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=<<), operandr=BinaryOperation(operandl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=>>), operator=|), type=BasicType(dimensions=[], name=byte))] assign[member[.ptrb], Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=<<), operandr=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=>>), operator=|), type=BasicType(dimensions=[], name=byte))] assign[member[.ptrb], Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6), operator=<<), operandr=MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=|), type=BasicType(dimensions=[], name=byte))] assign[member[.s], literal[4]] end[}] if[binary_operation[binary_operation[member[.a], !=, literal[1]], &&, binary_operation[member[.b], !=, literal[1]]]] begin[{] if[binary_operation[binary_operation[binary_operation[member[.s], +, literal[2]], <, member[.send]], &&, binary_operation[member[.sb], ==, literal['=']]]] begin[{] assign[member[.ptrb], Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=<<), operandr=BinaryOperation(operandl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=>>), operator=|), type=BasicType(dimensions=[], name=byte))] else begin[{] None end[}] if[binary_operation[binary_operation[binary_operation[member[.c], !=, literal[1]], &&, binary_operation[binary_operation[member[.s], +, literal[3]], <, member[.send]]], &&, binary_operation[member[.sb], ==, literal['=']]]] begin[{] assign[member[.ptrb], Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=<<), operandr=BinaryOperation(operandl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=>>), operator=|), type=BasicType(dimensions=[], name=byte))] assign[member[.ptrb], Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=<<), operandr=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=>>), operator=|), type=BasicType(dimensions=[], name=byte))] else begin[{] None end[}] else begin[{] None end[}] assign[member[.ptrb], literal['\0']] return[member[.ptrb]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[dec] operator[SEP] identifier[Pointer] identifier[_s] , Keyword[final] Keyword[int] identifier[_len] operator[SEP] { Keyword[int] identifier[len] operator[=] identifier[_len] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[sb] operator[=] identifier[_s] operator[SEP] identifier[buffer] operator[SEP] Keyword[int] identifier[s] operator[=] identifier[_s] operator[SEP] identifier[start] operator[SEP] Keyword[int] identifier[a] operator[=] operator[-] Other[1] , identifier[b] operator[=] operator[-] Other[1] , identifier[c] operator[=] Other[0] , identifier[d] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[ptrb] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[len] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[sb] , identifier[s] , identifier[ptrb] , Other[0] , identifier[len] operator[SEP] operator[SEP] Keyword[int] identifier[ptr] operator[=] Other[0] operator[SEP] Keyword[int] identifier[end] operator[=] Other[0] operator[SEP] Keyword[int] identifier[send] operator[=] identifier[s] operator[+] identifier[len] operator[SEP] Keyword[while] operator[SEP] identifier[s] operator[<] identifier[send] operator[SEP] { Keyword[while] operator[SEP] identifier[sb] operator[SEP] identifier[s] operator[SEP] operator[==] literal[String] operator[||] identifier[sb] operator[SEP] identifier[s] operator[SEP] operator[==] literal[String] operator[SEP] { identifier[s] operator[++] operator[SEP] } Keyword[if] operator[SEP] operator[SEP] identifier[a] operator[=] identifier[b64_xtable] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[sb] operator[SEP] identifier[s] operator[+] Other[0] operator[SEP] operator[SEP] operator[SEP] operator[==] operator[-] Other[1] operator[SEP] Keyword[break] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[b] operator[=] identifier[b64_xtable] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[sb] operator[SEP] identifier[s] operator[+] Other[1] operator[SEP] operator[SEP] operator[SEP] operator[==] operator[-] Other[1] operator[SEP] Keyword[break] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[c] operator[=] identifier[b64_xtable] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[sb] operator[SEP] identifier[s] operator[+] Other[2] operator[SEP] operator[SEP] operator[SEP] operator[==] operator[-] Other[1] operator[SEP] Keyword[break] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[d] operator[=] identifier[b64_xtable] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[sb] operator[SEP] identifier[s] operator[+] Other[3] operator[SEP] operator[SEP] operator[SEP] operator[==] operator[-] Other[1] operator[SEP] Keyword[break] operator[SEP] identifier[ptrb] operator[SEP] identifier[end] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] identifier[a] operator[<<] Other[2] operator[SEP] operator[|] operator[SEP] identifier[b] operator[>] operator[>] Other[4] operator[SEP] operator[SEP] operator[SEP] identifier[ptrb] operator[SEP] identifier[end] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] identifier[b] operator[<<] Other[4] operator[SEP] operator[|] operator[SEP] identifier[c] operator[>] operator[>] Other[2] operator[SEP] operator[SEP] operator[SEP] identifier[ptrb] operator[SEP] identifier[end] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] identifier[c] operator[<<] Other[6] operator[SEP] operator[|] identifier[d] operator[SEP] operator[SEP] identifier[s] operator[+=] Other[4] operator[SEP] } Keyword[if] operator[SEP] identifier[a] operator[!=] operator[-] Other[1] operator[&&] identifier[b] operator[!=] operator[-] Other[1] operator[SEP] { Keyword[if] operator[SEP] identifier[s] operator[+] Other[2] operator[<] identifier[send] operator[&&] identifier[sb] operator[SEP] identifier[s] operator[+] Other[2] operator[SEP] operator[==] literal[String] operator[SEP] identifier[ptrb] operator[SEP] identifier[end] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] identifier[a] operator[<<] Other[2] operator[SEP] operator[|] operator[SEP] identifier[b] operator[>] operator[>] Other[4] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[!=] operator[-] Other[1] operator[&&] identifier[s] operator[+] Other[3] operator[<] identifier[send] operator[&&] identifier[sb] operator[SEP] identifier[s] operator[+] Other[3] operator[SEP] operator[==] literal[String] operator[SEP] { identifier[ptrb] operator[SEP] identifier[end] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] identifier[a] operator[<<] Other[2] operator[SEP] operator[|] operator[SEP] identifier[b] operator[>] operator[>] Other[4] operator[SEP] operator[SEP] operator[SEP] identifier[ptrb] operator[SEP] identifier[end] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] identifier[b] operator[<<] Other[4] operator[SEP] operator[|] operator[SEP] identifier[c] operator[>] operator[>] Other[2] operator[SEP] operator[SEP] operator[SEP] } } identifier[ptrb] operator[SEP] identifier[end] operator[SEP] operator[=] literal[String] operator[SEP] Keyword[return] identifier[ptrb] operator[SEP] }
void formatMonth(StringBuilder b, ZonedDateTime d, int width, FieldVariants months) { int month = d.getMonth().getValue(); switch (width) { case 5: b.append(months.narrow[month-1]); break; case 4: b.append(months.wide[month-1]); break; case 3: b.append(months.abbreviated[month-1]); break; case 2: if (month < 10) { b.append('0'); } // fall through case 1: b.append(month); break; } }
class class_name[name] begin[{] method[formatMonth, return_type[void], modifier[default], parameter[b, d, width, months]] begin[{] local_variable[type[int], month] SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5)], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=narrow, postfix_operators=[], prefix_operators=[], qualifier=months, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=month, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))])], member=append, postfix_operators=[], prefix_operators=[], qualifier=b, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=wide, postfix_operators=[], prefix_operators=[], qualifier=months, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=month, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))])], member=append, postfix_operators=[], prefix_operators=[], qualifier=b, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=abbreviated, postfix_operators=[], prefix_operators=[], qualifier=months, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=month, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))])], member=append, postfix_operators=[], prefix_operators=[], qualifier=b, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=month, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10), 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='0')], member=append, postfix_operators=[], prefix_operators=[], qualifier=b, selectors=[], type_arguments=None), label=None)]))]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=month, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=b, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
Keyword[void] identifier[formatMonth] operator[SEP] identifier[StringBuilder] identifier[b] , identifier[ZonedDateTime] identifier[d] , Keyword[int] identifier[width] , identifier[FieldVariants] identifier[months] operator[SEP] { Keyword[int] identifier[month] operator[=] identifier[d] operator[SEP] identifier[getMonth] operator[SEP] operator[SEP] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[width] operator[SEP] { Keyword[case] Other[5] operator[:] identifier[b] operator[SEP] identifier[append] operator[SEP] identifier[months] operator[SEP] identifier[narrow] operator[SEP] identifier[month] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] Other[4] operator[:] identifier[b] operator[SEP] identifier[append] operator[SEP] identifier[months] operator[SEP] identifier[wide] operator[SEP] identifier[month] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] Other[3] operator[:] identifier[b] operator[SEP] identifier[append] operator[SEP] identifier[months] operator[SEP] identifier[abbreviated] operator[SEP] identifier[month] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] Other[2] operator[:] Keyword[if] operator[SEP] identifier[month] operator[<] Other[10] operator[SEP] { identifier[b] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[case] Other[1] operator[:] identifier[b] operator[SEP] identifier[append] operator[SEP] identifier[month] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } }
public static com.liferay.commerce.model.CommerceSubscriptionEntry fetchCommerceSubscriptionEntryByUuidAndGroupId( String uuid, long groupId) { return getService() .fetchCommerceSubscriptionEntryByUuidAndGroupId(uuid, groupId); }
class class_name[name] begin[{] method[fetchCommerceSubscriptionEntryByUuidAndGroupId, return_type[type[com]], modifier[public static], parameter[uuid, groupId]] begin[{] return[call[.getService, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[model] operator[SEP] identifier[CommerceSubscriptionEntry] identifier[fetchCommerceSubscriptionEntryByUuidAndGroupId] operator[SEP] identifier[String] identifier[uuid] , Keyword[long] identifier[groupId] operator[SEP] { Keyword[return] identifier[getService] operator[SEP] operator[SEP] operator[SEP] identifier[fetchCommerceSubscriptionEntryByUuidAndGroupId] operator[SEP] identifier[uuid] , identifier[groupId] operator[SEP] operator[SEP] }
protected boolean editorErrorMatches(final EditorError perror) { return perror != null && perror.getEditor() != null && (equals(perror.getEditor()) || perror.getEditor().equals(editor)); }
class class_name[name] begin[{] method[editorErrorMatches, return_type[type[boolean]], modifier[protected], parameter[perror]] begin[{] return[binary_operation[binary_operation[binary_operation[member[.perror], !=, literal[null]], &&, binary_operation[call[perror.getEditor, parameter[]], !=, literal[null]]], &&, binary_operation[call[.equals, parameter[call[perror.getEditor, parameter[]]]], ||, call[perror.getEditor, parameter[]]]]] end[}] END[}]
Keyword[protected] Keyword[boolean] identifier[editorErrorMatches] operator[SEP] Keyword[final] identifier[EditorError] identifier[perror] operator[SEP] { Keyword[return] identifier[perror] operator[!=] Other[null] operator[&&] identifier[perror] operator[SEP] identifier[getEditor] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] operator[SEP] identifier[equals] operator[SEP] identifier[perror] operator[SEP] identifier[getEditor] operator[SEP] operator[SEP] operator[SEP] operator[||] identifier[perror] operator[SEP] identifier[getEditor] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[editor] operator[SEP] operator[SEP] operator[SEP] }
public static <T> long addCap(AtomicLongFieldUpdater<T> updater, T instance, long toAdd) { long r, u; for (;;) { r = updater.get(instance); if (r == Long.MAX_VALUE) { return Long.MAX_VALUE; } u = addCap(r, toAdd); if (updater.compareAndSet(instance, r, u)) { return r; } } }
class class_name[name] begin[{] method[addCap, return_type[type[long]], modifier[public static], parameter[updater, instance, toAdd]] begin[{] local_variable[type[long], r] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=instance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=updater, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=MAX_VALUE, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=MAX_VALUE, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[]), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=u, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=toAdd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addCap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=instance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=u, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compareAndSet, postfix_operators=[], prefix_operators=[], qualifier=updater, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=ForControl(condition=None, init=None, update=None), label=None) end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] Keyword[long] identifier[addCap] operator[SEP] identifier[AtomicLongFieldUpdater] operator[<] identifier[T] operator[>] identifier[updater] , identifier[T] identifier[instance] , Keyword[long] identifier[toAdd] operator[SEP] { Keyword[long] identifier[r] , identifier[u] operator[SEP] Keyword[for] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[r] operator[=] identifier[updater] operator[SEP] identifier[get] operator[SEP] identifier[instance] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[r] operator[==] identifier[Long] operator[SEP] identifier[MAX_VALUE] operator[SEP] { Keyword[return] identifier[Long] operator[SEP] identifier[MAX_VALUE] operator[SEP] } identifier[u] operator[=] identifier[addCap] operator[SEP] identifier[r] , identifier[toAdd] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[updater] operator[SEP] identifier[compareAndSet] operator[SEP] identifier[instance] , identifier[r] , identifier[u] operator[SEP] operator[SEP] { Keyword[return] identifier[r] operator[SEP] } } }
public static ns_cluster[] get_filtered(nitro_service service, String filter) throws Exception { ns_cluster obj = new ns_cluster(); options option = new options(); option.set_filter(filter); ns_cluster[] response = (ns_cluster[]) obj.getfiltered(service, option); return response; }
class class_name[name] begin[{] method[get_filtered, return_type[type[ns_cluster]], modifier[public static], parameter[service, filter]] begin[{] local_variable[type[ns_cluster], obj] local_variable[type[options], option] call[option.set_filter, parameter[member[.filter]]] local_variable[type[ns_cluster], response] return[member[.response]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ns_cluster] operator[SEP] operator[SEP] identifier[get_filtered] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[filter] operator[SEP] Keyword[throws] identifier[Exception] { identifier[ns_cluster] identifier[obj] operator[=] Keyword[new] identifier[ns_cluster] operator[SEP] operator[SEP] operator[SEP] identifier[options] identifier[option] operator[=] Keyword[new] identifier[options] operator[SEP] operator[SEP] operator[SEP] identifier[option] operator[SEP] identifier[set_filter] operator[SEP] identifier[filter] operator[SEP] operator[SEP] identifier[ns_cluster] operator[SEP] operator[SEP] identifier[response] operator[=] operator[SEP] identifier[ns_cluster] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[getfiltered] operator[SEP] identifier[service] , identifier[option] operator[SEP] operator[SEP] Keyword[return] identifier[response] operator[SEP] }
public Set<Map.Entry<K,V>> entrySet() { return SyncUtils.synchronizeRead(lock, new Callback<Set<Map.Entry<K,V>>>() { @Override protected void doAction() { FilterableSet<Map.Entry<K,V>> _set = (FilterableSet<Map.Entry<K,V>>)map.entrySet(); _return(new SynchronizedFilterableSet<Map.Entry<K,V>>(_set, lock)); } }); }
class class_name[name] begin[{] method[entrySet, return_type[type[Set]], modifier[public], parameter[]] begin[{] return[call[SyncUtils.synchronizeRead, parameter[member[.lock], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=K, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))], dimensions=[], name=FilterableSet, sub_type=None)), name=_set)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=K, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))], dimensions=[], name=FilterableSet, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=_set, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lock, 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=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=K, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))], dimensions=None, name=SynchronizedFilterableSet, sub_type=None))], member=_return, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'protected'}, name=doAction, 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=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=K, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))], dimensions=[], name=Set, sub_type=None))], dimensions=None, name=Callback, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[Set] operator[<] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[K] , identifier[V] operator[>] operator[>] identifier[entrySet] operator[SEP] operator[SEP] { Keyword[return] identifier[SyncUtils] operator[SEP] identifier[synchronizeRead] operator[SEP] identifier[lock] , Keyword[new] identifier[Callback] operator[<] identifier[Set] operator[<] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[K] , identifier[V] operator[>] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[doAction] operator[SEP] operator[SEP] { identifier[FilterableSet] operator[<] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[K] , identifier[V] operator[>] operator[>] identifier[_set] operator[=] operator[SEP] identifier[FilterableSet] operator[<] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[K] , identifier[V] operator[>] operator[>] operator[SEP] identifier[map] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] identifier[_return] operator[SEP] Keyword[new] identifier[SynchronizedFilterableSet] operator[<] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[K] , identifier[V] operator[>] operator[>] operator[SEP] identifier[_set] , identifier[lock] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public String asString() throws TwitterException { if (null == responseAsString) { BufferedReader br = null; InputStream stream = null; try { stream = asStream(); if (null == stream) { return null; } br = new BufferedReader(new InputStreamReader(stream, "UTF-8")); StringBuilder buf = new StringBuilder(); String line; while ((line = br.readLine()) != null) { buf.append(line).append("\n"); } this.responseAsString = buf.toString(); logger.debug(responseAsString); stream.close(); streamConsumed = true; } catch (IOException ioe) { throw new TwitterException(ioe.getMessage(), ioe); } finally { if (stream != null) { try { stream.close(); } catch (IOException ignore) { } } if (br != null) { try { br.close(); } catch (IOException ignore) { } } disconnectForcibly(); } } return responseAsString; }
class class_name[name] begin[{] method[asString, return_type[type[String]], modifier[public], parameter[]] begin[{] if[binary_operation[literal[null], ==, member[.responseAsString]]] begin[{] local_variable[type[BufferedReader], br] local_variable[type[InputStream], stream] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=stream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=asStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=stream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=br, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=stream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="UTF-8")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InputStreamReader, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BufferedReader, sub_type=None))), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuilder, sub_type=None)), name=buf)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuilder, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=line)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=buf, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n")], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), condition=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=readLine, postfix_operators=[], prefix_operators=[], qualifier=br, selectors=[], type_arguments=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None), StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=responseAsString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=buf, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=responseAsString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=stream, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=streamConsumed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=ioe, selectors=[], type_arguments=None), MemberReference(member=ioe, 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=TwitterException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ioe, types=['IOException']))], finally_block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=stream, 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=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=stream, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ignore, types=['IOException']))], finally_block=None, label=None, resources=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=br, 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=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=br, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ignore, types=['IOException']))], finally_block=None, label=None, resources=None)])), StatementExpression(expression=MethodInvocation(arguments=[], member=disconnectForcibly, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, resources=None) else begin[{] None end[}] return[member[.responseAsString]] end[}] END[}]
Keyword[public] identifier[String] identifier[asString] operator[SEP] operator[SEP] Keyword[throws] identifier[TwitterException] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[responseAsString] operator[SEP] { identifier[BufferedReader] identifier[br] operator[=] Other[null] operator[SEP] identifier[InputStream] identifier[stream] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[stream] operator[=] identifier[asStream] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[==] identifier[stream] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[br] operator[=] Keyword[new] identifier[BufferedReader] operator[SEP] Keyword[new] identifier[InputStreamReader] operator[SEP] identifier[stream] , literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[buf] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[line] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[line] operator[=] identifier[br] operator[SEP] identifier[readLine] operator[SEP] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[buf] operator[SEP] identifier[append] operator[SEP] identifier[line] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[responseAsString] operator[=] identifier[buf] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[debug] operator[SEP] identifier[responseAsString] operator[SEP] operator[SEP] identifier[stream] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[streamConsumed] operator[=] literal[boolean] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[ioe] operator[SEP] { Keyword[throw] Keyword[new] identifier[TwitterException] operator[SEP] identifier[ioe] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[ioe] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[if] operator[SEP] identifier[stream] operator[!=] Other[null] operator[SEP] { Keyword[try] { identifier[stream] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[ignore] operator[SEP] { } } Keyword[if] operator[SEP] identifier[br] operator[!=] Other[null] operator[SEP] { Keyword[try] { identifier[br] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[ignore] operator[SEP] { } } identifier[disconnectForcibly] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[responseAsString] operator[SEP] }
@Override public void shutdown() throws BatchContainerServiceException { logger.entering(CLASSNAME, "shutdown"); logger.fine("do nothing"); logger.exiting(CLASSNAME, "shutdown"); }
class class_name[name] begin[{] method[shutdown, return_type[void], modifier[public], parameter[]] begin[{] call[logger.entering, parameter[member[.CLASSNAME], literal["shutdown"]]] call[logger.fine, parameter[literal["do nothing"]]] call[logger.exiting, parameter[member[.CLASSNAME], literal["shutdown"]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[shutdown] operator[SEP] operator[SEP] Keyword[throws] identifier[BatchContainerServiceException] { identifier[logger] operator[SEP] identifier[entering] operator[SEP] identifier[CLASSNAME] , literal[String] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[fine] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[exiting] operator[SEP] identifier[CLASSNAME] , literal[String] operator[SEP] operator[SEP] }
public static <T extends Comparable<? super T>> void descDeep(final T[] comparableArray) { if (ArrayUtils.isEmpty(comparableArray)) { return; } descByReflex(comparableArray); }
class class_name[name] begin[{] method[descDeep, return_type[void], modifier[public static], parameter[comparableArray]] begin[{] if[call[ArrayUtils.isEmpty, parameter[member[.comparableArray]]]] begin[{] return[None] else begin[{] None end[}] call[.descByReflex, parameter[member[.comparableArray]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Comparable] operator[<] operator[?] Keyword[super] identifier[T] operator[>] operator[>] Keyword[void] identifier[descDeep] operator[SEP] Keyword[final] identifier[T] operator[SEP] operator[SEP] identifier[comparableArray] operator[SEP] { Keyword[if] operator[SEP] identifier[ArrayUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[comparableArray] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } identifier[descByReflex] operator[SEP] identifier[comparableArray] operator[SEP] operator[SEP] }
public final void init(int opmode, Key key) throws InvalidKeyException { init(opmode, key, JceSecurity.RANDOM); }
class class_name[name] begin[{] method[init, return_type[void], modifier[final public], parameter[opmode, key]] begin[{] call[.init, parameter[member[.opmode], member[.key], member[JceSecurity.RANDOM]]] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[init] operator[SEP] Keyword[int] identifier[opmode] , identifier[Key] identifier[key] operator[SEP] Keyword[throws] identifier[InvalidKeyException] { identifier[init] operator[SEP] identifier[opmode] , identifier[key] , identifier[JceSecurity] operator[SEP] identifier[RANDOM] operator[SEP] operator[SEP] }
private void addAttributeInternal(EntityType entityType, Attribute attr) { if (!isPersisted(attr)) { return; } if (isMultipleReferenceType(attr)) { createJunctionTable(entityType, attr); if (attr.getDefaultValue() != null && !attr.isNillable()) { @SuppressWarnings("unchecked") Iterable<Entity> defaultRefEntities = (Iterable<Entity>) AttributeUtils.getDefaultTypedValue(attr); if (!Iterables.isEmpty(defaultRefEntities)) { createJunctionTableRows(entityType, attr, defaultRefEntities); } } } else { createColumn(entityType, attr); } }
class class_name[name] begin[{] method[addAttributeInternal, return_type[void], modifier[private], parameter[entityType, attr]] begin[{] if[call[.isPersisted, parameter[member[.attr]]]] begin[{] return[None] else begin[{] None end[}] if[call[.isMultipleReferenceType, parameter[member[.attr]]]] begin[{] call[.createJunctionTable, parameter[member[.entityType], member[.attr]]] if[binary_operation[binary_operation[call[attr.getDefaultValue, parameter[]], !=, literal[null]], &&, call[attr.isNillable, parameter[]]]] begin[{] local_variable[type[Iterable], defaultRefEntities] if[call[Iterables.isEmpty, parameter[member[.defaultRefEntities]]]] begin[{] call[.createJunctionTableRows, parameter[member[.entityType], member[.attr], member[.defaultRefEntities]]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] call[.createColumn, parameter[member[.entityType], member[.attr]]] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[addAttributeInternal] operator[SEP] identifier[EntityType] identifier[entityType] , identifier[Attribute] identifier[attr] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[isPersisted] operator[SEP] identifier[attr] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } Keyword[if] operator[SEP] identifier[isMultipleReferenceType] operator[SEP] identifier[attr] operator[SEP] operator[SEP] { identifier[createJunctionTable] operator[SEP] identifier[entityType] , identifier[attr] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[attr] operator[SEP] identifier[getDefaultValue] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] operator[!] identifier[attr] operator[SEP] identifier[isNillable] operator[SEP] operator[SEP] operator[SEP] { annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[Iterable] operator[<] identifier[Entity] operator[>] identifier[defaultRefEntities] operator[=] operator[SEP] identifier[Iterable] operator[<] identifier[Entity] operator[>] operator[SEP] identifier[AttributeUtils] operator[SEP] identifier[getDefaultTypedValue] operator[SEP] identifier[attr] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[Iterables] operator[SEP] identifier[isEmpty] operator[SEP] identifier[defaultRefEntities] operator[SEP] operator[SEP] { identifier[createJunctionTableRows] operator[SEP] identifier[entityType] , identifier[attr] , identifier[defaultRefEntities] operator[SEP] operator[SEP] } } } Keyword[else] { identifier[createColumn] operator[SEP] identifier[entityType] , identifier[attr] operator[SEP] operator[SEP] } }
public void updateChannelConfiguration(UpdateChannelConfiguration updateChannelConfiguration, Orderer orderer, byte[]... signers) throws TransactionException, InvalidArgumentException { checkChannelState(); checkOrderer(orderer); try { final long startLastConfigIndex = getLastConfigIndex(orderer); logger.trace(format("startLastConfigIndex: %d. Channel config wait time is: %d", startLastConfigIndex, CHANNEL_CONFIG_WAIT_TIME)); sendUpdateChannel(updateChannelConfiguration.getUpdateChannelConfigurationAsBytes(), signers, orderer); long currentLastConfigIndex = -1; final long nanoTimeStart = System.nanoTime(); //Try to wait to see the channel got updated but don't fail if we don't see it. do { currentLastConfigIndex = getLastConfigIndex(orderer); if (currentLastConfigIndex == startLastConfigIndex) { final long duration = TimeUnit.MILLISECONDS.convert(System.nanoTime() - nanoTimeStart, TimeUnit.NANOSECONDS); if (duration > CHANNEL_CONFIG_WAIT_TIME) { logger.warn(format("Channel %s did not get updated last config after %d ms, Config wait time: %d ms. startLastConfigIndex: %d, currentLastConfigIndex: %d ", name, duration, CHANNEL_CONFIG_WAIT_TIME, startLastConfigIndex, currentLastConfigIndex)); //waited long enough .. currentLastConfigIndex = startLastConfigIndex - 1L; // just bail don't throw exception. } else { try { Thread.sleep(ORDERER_RETRY_WAIT_TIME); //try again sleep } catch (InterruptedException e) { TransactionException te = new TransactionException("update channel thread Sleep", e); logger.warn(te.getMessage(), te); } } } logger.trace(format("currentLastConfigIndex: %d", currentLastConfigIndex)); } while (currentLastConfigIndex == startLastConfigIndex); } catch (TransactionException e) { logger.error(format("Channel %s error: %s", name, e.getMessage()), e); throw e; } catch (Exception e) { String msg = format("Channel %s error: %s", name, e.getMessage()); logger.error(msg, e); throw new TransactionException(msg, e); } }
class class_name[name] begin[{] method[updateChannelConfiguration, return_type[void], modifier[public], parameter[updateChannelConfiguration, orderer, signers]] begin[{] call[.checkChannelState, parameter[]] call[.checkOrderer, parameter[member[.orderer]]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=orderer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getLastConfigIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=startLastConfigIndex)], modifiers={'final'}, type=BasicType(dimensions=[], name=long)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="startLastConfigIndex: %d. Channel config wait time is: %d"), MemberReference(member=startLastConfigIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=CHANNEL_CONFIG_WAIT_TIME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=trace, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getUpdateChannelConfigurationAsBytes, postfix_operators=[], prefix_operators=[], qualifier=updateChannelConfiguration, selectors=[], type_arguments=None), MemberReference(member=signers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=orderer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sendUpdateChannel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), name=currentLastConfigIndex)], modifiers=set(), type=BasicType(dimensions=[], name=long)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=nanoTime, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), name=nanoTimeStart)], modifiers={'final'}, type=BasicType(dimensions=[], name=long)), DoStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=currentLastConfigIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=orderer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getLastConfigIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=currentLastConfigIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=startLastConfigIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=nanoTime, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), operandr=MemberReference(member=nanoTimeStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), MemberReference(member=NANOSECONDS, postfix_operators=[], prefix_operators=[], qualifier=TimeUnit, selectors=[])], member=convert, postfix_operators=[], prefix_operators=[], qualifier=TimeUnit.MILLISECONDS, selectors=[], type_arguments=None), name=duration)], modifiers={'final'}, type=BasicType(dimensions=[], name=long)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=duration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=CHANNEL_CONFIG_WAIT_TIME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ORDERER_RETRY_WAIT_TIME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sleep, postfix_operators=[], prefix_operators=[], qualifier=Thread, 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="update channel thread Sleep"), 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=TransactionException, sub_type=None)), name=te)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TransactionException, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=te, selectors=[], type_arguments=None), MemberReference(member=te, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InterruptedException']))], finally_block=None, label=None, resources=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Channel %s did not get updated last config after %d ms, Config wait time: %d ms. startLastConfigIndex: %d, currentLastConfigIndex: %d "), MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=duration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=CHANNEL_CONFIG_WAIT_TIME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=startLastConfigIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=currentLastConfigIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=currentLastConfigIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=startLastConfigIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1L), operator=-)), label=None)]))])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="currentLastConfigIndex: %d"), MemberReference(member=currentLastConfigIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=trace, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)]), condition=BinaryOperation(operandl=MemberReference(member=currentLastConfigIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=startLastConfigIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Channel %s error: %s"), MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=format, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, 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=['TransactionException'])), CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Channel %s error: %s"), MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=format, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=msg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TransactionException, 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[updateChannelConfiguration] operator[SEP] identifier[UpdateChannelConfiguration] identifier[updateChannelConfiguration] , identifier[Orderer] identifier[orderer] , Keyword[byte] operator[SEP] operator[SEP] operator[...] identifier[signers] operator[SEP] Keyword[throws] identifier[TransactionException] , identifier[InvalidArgumentException] { identifier[checkChannelState] operator[SEP] operator[SEP] operator[SEP] identifier[checkOrderer] operator[SEP] identifier[orderer] operator[SEP] operator[SEP] Keyword[try] { Keyword[final] Keyword[long] identifier[startLastConfigIndex] operator[=] identifier[getLastConfigIndex] operator[SEP] identifier[orderer] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[trace] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[startLastConfigIndex] , identifier[CHANNEL_CONFIG_WAIT_TIME] operator[SEP] operator[SEP] operator[SEP] identifier[sendUpdateChannel] operator[SEP] identifier[updateChannelConfiguration] operator[SEP] identifier[getUpdateChannelConfigurationAsBytes] operator[SEP] operator[SEP] , identifier[signers] , identifier[orderer] operator[SEP] operator[SEP] Keyword[long] identifier[currentLastConfigIndex] operator[=] operator[-] Other[1] operator[SEP] Keyword[final] Keyword[long] identifier[nanoTimeStart] operator[=] identifier[System] operator[SEP] identifier[nanoTime] operator[SEP] operator[SEP] operator[SEP] Keyword[do] { identifier[currentLastConfigIndex] operator[=] identifier[getLastConfigIndex] operator[SEP] identifier[orderer] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[currentLastConfigIndex] operator[==] identifier[startLastConfigIndex] operator[SEP] { Keyword[final] Keyword[long] identifier[duration] operator[=] identifier[TimeUnit] operator[SEP] identifier[MILLISECONDS] operator[SEP] identifier[convert] operator[SEP] identifier[System] operator[SEP] identifier[nanoTime] operator[SEP] operator[SEP] operator[-] identifier[nanoTimeStart] , identifier[TimeUnit] operator[SEP] identifier[NANOSECONDS] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[duration] operator[>] identifier[CHANNEL_CONFIG_WAIT_TIME] operator[SEP] { identifier[logger] operator[SEP] identifier[warn] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[name] , identifier[duration] , identifier[CHANNEL_CONFIG_WAIT_TIME] , identifier[startLastConfigIndex] , identifier[currentLastConfigIndex] operator[SEP] operator[SEP] operator[SEP] identifier[currentLastConfigIndex] operator[=] identifier[startLastConfigIndex] operator[-] Other[1L] operator[SEP] } Keyword[else] { Keyword[try] { identifier[Thread] operator[SEP] identifier[sleep] operator[SEP] identifier[ORDERER_RETRY_WAIT_TIME] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InterruptedException] identifier[e] operator[SEP] { identifier[TransactionException] identifier[te] operator[=] Keyword[new] identifier[TransactionException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[warn] operator[SEP] identifier[te] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[te] operator[SEP] operator[SEP] } } } identifier[logger] operator[SEP] identifier[trace] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[currentLastConfigIndex] operator[SEP] operator[SEP] operator[SEP] } Keyword[while] operator[SEP] identifier[currentLastConfigIndex] operator[==] identifier[startLastConfigIndex] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[TransactionException] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[name] , identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] identifier[e] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[String] identifier[msg] operator[=] identifier[format] operator[SEP] literal[String] , identifier[name] , identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[error] operator[SEP] identifier[msg] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[TransactionException] operator[SEP] identifier[msg] , identifier[e] operator[SEP] operator[SEP] } }
public void marshall(DeleteNotebookInstanceRequest deleteNotebookInstanceRequest, ProtocolMarshaller protocolMarshaller) { if (deleteNotebookInstanceRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(deleteNotebookInstanceRequest.getNotebookInstanceName(), NOTEBOOKINSTANCENAME_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[deleteNotebookInstanceRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.deleteNotebookInstanceRequest], ==, 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=getNotebookInstanceName, postfix_operators=[], prefix_operators=[], qualifier=deleteNotebookInstanceRequest, selectors=[], type_arguments=None), MemberReference(member=NOTEBOOKINSTANCENAME_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[DeleteNotebookInstanceRequest] identifier[deleteNotebookInstanceRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[deleteNotebookInstanceRequest] 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[deleteNotebookInstanceRequest] operator[SEP] identifier[getNotebookInstanceName] operator[SEP] operator[SEP] , identifier[NOTEBOOKINSTANCENAME_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 synchronized final V get(K key) { if (key == null) { throw new NullPointerException("key == null"); } V result = map.get(key); if (result != null) { return result; } result = create(key); if (result != null) { map.put(key, result); trimToSize(maxSize); } return result; }
class class_name[name] begin[{] method[get, return_type[type[V]], modifier[synchronized final public], parameter[key]] begin[{] if[binary_operation[member[.key], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="key == null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NullPointerException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[V], result] if[binary_operation[member[.result], !=, literal[null]]] begin[{] return[member[.result]] else begin[{] None end[}] assign[member[.result], call[.create, parameter[member[.key]]]] if[binary_operation[member[.result], !=, literal[null]]] begin[{] call[map.put, parameter[member[.key], member[.result]]] call[.trimToSize, parameter[member[.maxSize]]] else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[final] identifier[V] identifier[get] operator[SEP] identifier[K] identifier[key] operator[SEP] { Keyword[if] operator[SEP] identifier[key] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[V] identifier[result] operator[=] identifier[map] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[result] operator[SEP] } identifier[result] operator[=] identifier[create] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[!=] Other[null] operator[SEP] { identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[result] operator[SEP] operator[SEP] identifier[trimToSize] operator[SEP] identifier[maxSize] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public static String hump2Underline(String string) { if (string == null) return null; if (string.trim().length() == 0) return ""; string = toFirstLower(string); StringBuilder sb = new StringBuilder(); char[] arr = string.toCharArray(); for (char c : arr) { if (c >= 65 && c <=90) { c += 32; sb.append("_").append(String.valueOf(c).toLowerCase()); } else { sb.append(c); } } return sb.toString(); }
class class_name[name] begin[{] method[hump2Underline, return_type[type[String]], modifier[public static], parameter[string]] begin[{] if[binary_operation[member[.string], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] if[binary_operation[call[string.trim, parameter[]], ==, literal[0]]] begin[{] return[literal[""]] else begin[{] None end[}] assign[member[.string], call[.toFirstLower, parameter[member[.string]]]] local_variable[type[StringBuilder], sb] local_variable[type[char], arr] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=65), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=90), operator=<=), operator=&&), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32)), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="_")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[MethodInvocation(arguments=[], member=toLowerCase, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=arr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=c)], modifiers=set(), type=BasicType(dimensions=[], name=char))), label=None) return[call[sb.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[hump2Underline] operator[SEP] identifier[String] identifier[string] operator[SEP] { Keyword[if] operator[SEP] identifier[string] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[string] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] Keyword[return] literal[String] operator[SEP] identifier[string] operator[=] identifier[toFirstLower] operator[SEP] identifier[string] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[arr] operator[=] identifier[string] operator[SEP] identifier[toCharArray] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[char] identifier[c] operator[:] identifier[arr] operator[SEP] { Keyword[if] operator[SEP] identifier[c] operator[>=] Other[65] operator[&&] identifier[c] operator[<=] Other[90] operator[SEP] { identifier[c] operator[+=] Other[32] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[c] operator[SEP] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[c] operator[SEP] operator[SEP] } } Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public void startTaskForm() { Map<String, String> requestParameterMap = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap(); String taskId = requestParameterMap.get("taskId"); String callbackUrl = requestParameterMap.get("callbackUrl"); if (taskId==null || callbackUrl == null) { if (FacesContext.getCurrentInstance().isPostback()) { // if this is an AJAX request ignore it, since we will receive multiple calls to this bean if it is added // as preRenderView event // see http://stackoverflow.com/questions/2830834/jsf-fevent-prerenderview-is-triggered-by-fajax-calls-and-partial-renders-some return; } // return it anyway but log an info message log.log(Level.INFO, "Called startTask method without proper parameter (taskId='"+taskId+"'; callbackUrl='"+callbackUrl+"') even if it seems we are not called by an AJAX Postback. Are you using the camundaTaskForm bean correctly?"); return; } // Note that we always run in a conversation this.url = callbackUrl; businessProcess.startTask(taskId, true); }
class class_name[name] begin[{] method[startTaskForm, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[Map], requestParameterMap] local_variable[type[String], taskId] local_variable[type[String], callbackUrl] if[binary_operation[binary_operation[member[.taskId], ==, literal[null]], ||, binary_operation[member[.callbackUrl], ==, literal[null]]]] begin[{] if[call[FacesContext.getCurrentInstance, parameter[]]] begin[{] return[None] else begin[{] None end[}] call[log.log, parameter[member[Level.INFO], binary_operation[binary_operation[binary_operation[binary_operation[literal["Called startTask method without proper parameter (taskId='"], +, member[.taskId]], +, literal["'; callbackUrl='"]], +, member[.callbackUrl]], +, literal["') even if it seems we are not called by an AJAX Postback. Are you using the camundaTaskForm bean correctly?"]]]] return[None] else begin[{] None end[}] assign[THIS[member[None.url]], member[.callbackUrl]] call[businessProcess.startTask, parameter[member[.taskId], literal[true]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[startTaskForm] operator[SEP] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[requestParameterMap] operator[=] identifier[FacesContext] operator[SEP] identifier[getCurrentInstance] operator[SEP] operator[SEP] operator[SEP] identifier[getExternalContext] operator[SEP] operator[SEP] operator[SEP] identifier[getRequestParameterMap] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[taskId] operator[=] identifier[requestParameterMap] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[callbackUrl] operator[=] identifier[requestParameterMap] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[taskId] operator[==] Other[null] operator[||] identifier[callbackUrl] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[FacesContext] operator[SEP] identifier[getCurrentInstance] operator[SEP] operator[SEP] operator[SEP] identifier[isPostback] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } identifier[log] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[INFO] , literal[String] operator[+] identifier[taskId] operator[+] literal[String] operator[+] identifier[callbackUrl] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[url] operator[=] identifier[callbackUrl] operator[SEP] identifier[businessProcess] operator[SEP] identifier[startTask] operator[SEP] identifier[taskId] , literal[boolean] operator[SEP] operator[SEP] }
public static boolean delete(Path targetPath) { debug(log, "delete", targetPath); try { Files.delete(targetPath); return true; } catch (Exception e) { return JMExceptionManager.handleExceptionAndReturnFalse(log, e, "delete", targetPath); } }
class class_name[name] begin[{] method[delete, return_type[type[boolean]], modifier[public static], parameter[targetPath]] begin[{] call[.debug, parameter[member[.log], literal["delete"], member[.targetPath]]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=targetPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=delete, postfix_operators=[], prefix_operators=[], qualifier=Files, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=log, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="delete"), MemberReference(member=targetPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=handleExceptionAndReturnFalse, postfix_operators=[], prefix_operators=[], qualifier=JMExceptionManager, 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] Keyword[boolean] identifier[delete] operator[SEP] identifier[Path] identifier[targetPath] operator[SEP] { identifier[debug] operator[SEP] identifier[log] , literal[String] , identifier[targetPath] operator[SEP] operator[SEP] Keyword[try] { identifier[Files] operator[SEP] identifier[delete] operator[SEP] identifier[targetPath] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[return] identifier[JMExceptionManager] operator[SEP] identifier[handleExceptionAndReturnFalse] operator[SEP] identifier[log] , identifier[e] , literal[String] , identifier[targetPath] operator[SEP] operator[SEP] } }
public void put_property(String name, DbDatum[] properties) throws DevFailed { databaseDAO.put_property(this, name, properties); }
class class_name[name] begin[{] method[put_property, return_type[void], modifier[public], parameter[name, properties]] begin[{] call[databaseDAO.put_property, parameter[THIS[], member[.name], member[.properties]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[put_property] operator[SEP] identifier[String] identifier[name] , identifier[DbDatum] operator[SEP] operator[SEP] identifier[properties] operator[SEP] Keyword[throws] identifier[DevFailed] { identifier[databaseDAO] operator[SEP] identifier[put_property] operator[SEP] Keyword[this] , identifier[name] , identifier[properties] operator[SEP] operator[SEP] }
public void computeCoarsestStablePartition() { Block curr; while ((curr = poll()) != null) { int blockRange = curr.high - curr.low; // copy blockData, because #moveLeft() may change its data while we iterate over it // TODO maybe find an implementation that does not need to workaround this concurrent modification int[] blockCopy = new int[blockRange]; System.arraycopy(blockData, curr.low, blockCopy, 0, blockRange); int predOfsBase = predOfsDataLow; for (int i = 0; i < numInputs; i++) { for (int j = 0; j < blockRange; j++) { int state = blockCopy[j]; int predOfsIdx = predOfsBase + state; int predLow = predOfsData[predOfsIdx], predHigh = predOfsData[predOfsIdx + 1]; for (int k = predLow; k < predHigh; k++) { int pred = predData[k]; moveLeft(pred); } } predOfsBase += numStates; processTouched(); } } }
class class_name[name] begin[{] method[computeCoarsestStablePartition, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[Block], curr] while[binary_operation[assign[member[.curr], call[.poll, parameter[]]], !=, literal[null]]] begin[{] local_variable[type[int], blockRange] local_variable[type[int], blockCopy] call[System.arraycopy, parameter[member[.blockData], member[curr.low], member[.blockCopy], literal[0], member[.blockRange]]] local_variable[type[int], predOfsBase] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=blockCopy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=state)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=predOfsBase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), name=predOfsIdx)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=predOfsData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=predOfsIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=predLow), VariableDeclarator(dimensions=[], initializer=MemberReference(member=predOfsData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=predOfsIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), name=predHigh)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=predData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=pred)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=pred, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=moveLeft, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=predHigh, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=predLow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=k)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=k, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=blockRange, 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=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=predOfsBase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=numStates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=processTouched, 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=numInputs, 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) end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[computeCoarsestStablePartition] operator[SEP] operator[SEP] { identifier[Block] identifier[curr] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[curr] operator[=] identifier[poll] operator[SEP] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[int] identifier[blockRange] operator[=] identifier[curr] operator[SEP] identifier[high] operator[-] identifier[curr] operator[SEP] identifier[low] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[blockCopy] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[blockRange] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[blockData] , identifier[curr] operator[SEP] identifier[low] , identifier[blockCopy] , Other[0] , identifier[blockRange] operator[SEP] operator[SEP] Keyword[int] identifier[predOfsBase] operator[=] identifier[predOfsDataLow] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[numInputs] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[blockRange] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[int] identifier[state] operator[=] identifier[blockCopy] operator[SEP] identifier[j] operator[SEP] operator[SEP] Keyword[int] identifier[predOfsIdx] operator[=] identifier[predOfsBase] operator[+] identifier[state] operator[SEP] Keyword[int] identifier[predLow] operator[=] identifier[predOfsData] operator[SEP] identifier[predOfsIdx] operator[SEP] , identifier[predHigh] operator[=] identifier[predOfsData] operator[SEP] identifier[predOfsIdx] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[k] operator[=] identifier[predLow] operator[SEP] identifier[k] operator[<] identifier[predHigh] operator[SEP] identifier[k] operator[++] operator[SEP] { Keyword[int] identifier[pred] operator[=] identifier[predData] operator[SEP] identifier[k] operator[SEP] operator[SEP] identifier[moveLeft] operator[SEP] identifier[pred] operator[SEP] operator[SEP] } } identifier[predOfsBase] operator[+=] identifier[numStates] operator[SEP] identifier[processTouched] operator[SEP] operator[SEP] operator[SEP] } } }
public static ECKey fromNodeId(byte[] nodeId) { check(nodeId.length == 64, "Expected a 64 byte node id"); byte[] pubBytes = new byte[65]; System.arraycopy(nodeId, 0, pubBytes, 1, nodeId.length); pubBytes[0] = 0x04; // uncompressed return ECKey.fromPublicOnly(pubBytes); }
class class_name[name] begin[{] method[fromNodeId, return_type[type[ECKey]], modifier[public static], parameter[nodeId]] begin[{] call[.check, parameter[binary_operation[member[nodeId.length], ==, literal[64]], literal["Expected a 64 byte node id"]]] local_variable[type[byte], pubBytes] call[System.arraycopy, parameter[member[.nodeId], literal[0], member[.pubBytes], literal[1], member[nodeId.length]]] assign[member[.pubBytes], literal[0x04]] return[call[ECKey.fromPublicOnly, parameter[member[.pubBytes]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ECKey] identifier[fromNodeId] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[nodeId] operator[SEP] { identifier[check] operator[SEP] identifier[nodeId] operator[SEP] identifier[length] operator[==] Other[64] , literal[String] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[pubBytes] operator[=] Keyword[new] Keyword[byte] operator[SEP] Other[65] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[nodeId] , Other[0] , identifier[pubBytes] , Other[1] , identifier[nodeId] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[pubBytes] operator[SEP] Other[0] operator[SEP] operator[=] literal[Integer] operator[SEP] Keyword[return] identifier[ECKey] operator[SEP] identifier[fromPublicOnly] operator[SEP] identifier[pubBytes] operator[SEP] operator[SEP] }
@Override public ResourceSet<Day> read(final TwilioRestClient client) { return new ResourceSet<>(this, client, firstPage(client)); }
class class_name[name] begin[{] method[read, return_type[type[ResourceSet]], modifier[public], parameter[client]] begin[{] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=client, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=client, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=firstPage, 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=[], dimensions=None, name=ResourceSet, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ResourceSet] operator[<] identifier[Day] operator[>] identifier[read] operator[SEP] Keyword[final] identifier[TwilioRestClient] identifier[client] operator[SEP] { Keyword[return] Keyword[new] identifier[ResourceSet] operator[<] operator[>] operator[SEP] Keyword[this] , identifier[client] , identifier[firstPage] operator[SEP] identifier[client] operator[SEP] operator[SEP] operator[SEP] }
protected void _format(EObject obj, IFormattableDocument document) { for (EObject child : obj.eContents()) document.format(child); }
class class_name[name] begin[{] method[_format, return_type[void], modifier[protected], parameter[obj, document]] begin[{] ForStatement(body=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=document, selectors=[], type_arguments=None), label=None), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=eContents, postfix_operators=[], prefix_operators=[], qualifier=obj, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=child)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=EObject, sub_type=None))), label=None) end[}] END[}]
Keyword[protected] Keyword[void] identifier[_format] operator[SEP] identifier[EObject] identifier[obj] , identifier[IFormattableDocument] identifier[document] operator[SEP] { Keyword[for] operator[SEP] identifier[EObject] identifier[child] operator[:] identifier[obj] operator[SEP] identifier[eContents] operator[SEP] operator[SEP] operator[SEP] identifier[document] operator[SEP] identifier[format] operator[SEP] identifier[child] operator[SEP] operator[SEP] }
private boolean isDecompYesAndZeroCC(int norm16) { return norm16<minYesNo || norm16==JAMO_VT || (minMaybeYes<=norm16 && norm16<=MIN_NORMAL_MAYBE_YES); }
class class_name[name] begin[{] method[isDecompYesAndZeroCC, return_type[type[boolean]], modifier[private], parameter[norm16]] begin[{] return[binary_operation[binary_operation[binary_operation[member[.norm16], <, member[.minYesNo]], ||, binary_operation[member[.norm16], ==, member[.JAMO_VT]]], ||, binary_operation[binary_operation[member[.minMaybeYes], <=, member[.norm16]], &&, binary_operation[member[.norm16], <=, member[.MIN_NORMAL_MAYBE_YES]]]]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[isDecompYesAndZeroCC] operator[SEP] Keyword[int] identifier[norm16] operator[SEP] { Keyword[return] identifier[norm16] operator[<] identifier[minYesNo] operator[||] identifier[norm16] operator[==] identifier[JAMO_VT] operator[||] operator[SEP] identifier[minMaybeYes] operator[<=] identifier[norm16] operator[&&] identifier[norm16] operator[<=] identifier[MIN_NORMAL_MAYBE_YES] operator[SEP] operator[SEP] }
public Prop setProp() { Assert.isTrue(getFirstChild(root, new String[] {"allprop", "propname"}) == null); //$NON-NLS-1$ //$NON-NLS-2$ Element prop = setChild(root, "prop", new String[] {"prop"}, true); //$NON-NLS-1$ //$NON-NLS-2$ try { return new Prop(prop); } catch (MalformedElementException e) { Assert.isTrue(false, Policy.bind("assert.internalError")); //$NON-NLS-1$ return null; // Never reached. } }
class class_name[name] begin[{] method[setProp, return_type[type[Prop]], modifier[public], parameter[]] begin[{] call[Assert.isTrue, parameter[binary_operation[call[.getFirstChild, parameter[member[.root], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="allprop"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="propname")]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))]], ==, literal[null]]]] local_variable[type[Element], prop] TryStatement(block=[ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=prop, 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=Prop, sub_type=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="assert.internalError")], member=bind, postfix_operators=[], prefix_operators=[], qualifier=Policy, selectors=[], type_arguments=None)], member=isTrue, postfix_operators=[], prefix_operators=[], qualifier=Assert, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['MalformedElementException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] identifier[Prop] identifier[setProp] operator[SEP] operator[SEP] { identifier[Assert] operator[SEP] identifier[isTrue] operator[SEP] identifier[getFirstChild] operator[SEP] identifier[root] , Keyword[new] identifier[String] operator[SEP] operator[SEP] { literal[String] , literal[String] } operator[SEP] operator[==] Other[null] operator[SEP] operator[SEP] identifier[Element] identifier[prop] operator[=] identifier[setChild] operator[SEP] identifier[root] , literal[String] , Keyword[new] identifier[String] operator[SEP] operator[SEP] { literal[String] } , literal[boolean] operator[SEP] operator[SEP] Keyword[try] { Keyword[return] Keyword[new] identifier[Prop] operator[SEP] identifier[prop] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[MalformedElementException] identifier[e] operator[SEP] { identifier[Assert] operator[SEP] identifier[isTrue] operator[SEP] literal[boolean] , identifier[Policy] operator[SEP] identifier[bind] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } }
@Pure public static int getSelectionColor() { final Preferences prefs = Preferences.userNodeForPackage(BusLayerConstants.class); if (prefs != null) { final String str = prefs.get("SELECTION_COLOR", null); //$NON-NLS-1$ if (str != null) { try { return Integer.valueOf(str); } catch (Throwable exception) { // } } } return DEFAULT_SELECTION_COLOR; }
class class_name[name] begin[{] method[getSelectionColor, return_type[type[int]], modifier[public static], parameter[]] begin[{] local_variable[type[Preferences], prefs] if[binary_operation[member[.prefs], !=, literal[null]]] begin[{] local_variable[type[String], str] if[binary_operation[member[.str], !=, literal[null]]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=str, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=exception, types=['Throwable']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] else begin[{] None end[}] return[member[.DEFAULT_SELECTION_COLOR]] end[}] END[}]
annotation[@] identifier[Pure] Keyword[public] Keyword[static] Keyword[int] identifier[getSelectionColor] operator[SEP] 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[final] identifier[String] identifier[str] operator[=] identifier[prefs] operator[SEP] identifier[get] operator[SEP] literal[String] , Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[str] operator[!=] Other[null] operator[SEP] { Keyword[try] { Keyword[return] identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[str] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[exception] operator[SEP] { } } } Keyword[return] identifier[DEFAULT_SELECTION_COLOR] operator[SEP] }
public void concatCTM(float a, float b, float c, float d, float e, float f) { content.append(a).append(' ').append(b).append(' ').append(c).append(' '); content.append(d).append(' ').append(e).append(' ').append(f).append(" cm").append_i(separator); }
class class_name[name] begin[{] method[concatCTM, return_type[void], modifier[public], parameter[a, b, c, d, e, f]] begin[{] call[content.append, parameter[member[.a]]] call[content.append, parameter[member[.d]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[concatCTM] operator[SEP] Keyword[float] identifier[a] , Keyword[float] identifier[b] , Keyword[float] identifier[c] , Keyword[float] identifier[d] , Keyword[float] identifier[e] , Keyword[float] identifier[f] operator[SEP] { identifier[content] operator[SEP] identifier[append] operator[SEP] identifier[a] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[b] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[c] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[content] operator[SEP] identifier[append] operator[SEP] identifier[d] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[e] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[f] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append_i] operator[SEP] identifier[separator] operator[SEP] operator[SEP] }
public static String getMD5Hash(final String input) throws HibiscusException { String hashValue = null; try { final MessageDigest messageDigest = MessageDigest.getInstance(MESSAGE_DIGEST_ALGORITHM_MD5); byte[] md5Hash = new byte[BYTE_LENGTH_MD5]; messageDigest.update(input.getBytes(ENCODING_CHARSET_NAME), MESSAGE_DIGEST_UPDATE_OFFSET, input.length()); md5Hash = messageDigest.digest(); hashValue = convertToHex(md5Hash); } catch (NoSuchAlgorithmException e) { throw new HibiscusException("Unsupported Message Digest Algorithm " + MESSAGE_DIGEST_ALGORITHM_MD5, e); } catch (UnsupportedEncodingException e) { throw new HibiscusException("Unsupported Encoding " + ENCODING_CHARSET_NAME , e); } return hashValue; }
class class_name[name] begin[{] method[getMD5Hash, return_type[type[String]], modifier[public static], parameter[input]] begin[{] local_variable[type[String], hashValue] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=MESSAGE_DIGEST_ALGORITHM_MD5, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=MessageDigest, selectors=[], type_arguments=None), name=messageDigest)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=MessageDigest, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[MemberReference(member=BYTE_LENGTH_MD5, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte)), name=md5Hash)], modifiers=set(), type=BasicType(dimensions=[None], name=byte)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=ENCODING_CHARSET_NAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getBytes, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), MemberReference(member=MESSAGE_DIGEST_UPDATE_OFFSET, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None)], member=update, postfix_operators=[], prefix_operators=[], qualifier=messageDigest, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=md5Hash, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=digest, postfix_operators=[], prefix_operators=[], qualifier=messageDigest, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=hashValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=md5Hash, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convertToHex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unsupported Message Digest Algorithm "), operandr=MemberReference(member=MESSAGE_DIGEST_ALGORITHM_MD5, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=HibiscusException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['NoSuchAlgorithmException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unsupported Encoding "), operandr=MemberReference(member=ENCODING_CHARSET_NAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=HibiscusException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['UnsupportedEncodingException']))], finally_block=None, label=None, resources=None) return[member[.hashValue]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getMD5Hash] operator[SEP] Keyword[final] identifier[String] identifier[input] operator[SEP] Keyword[throws] identifier[HibiscusException] { identifier[String] identifier[hashValue] operator[=] Other[null] operator[SEP] Keyword[try] { Keyword[final] identifier[MessageDigest] identifier[messageDigest] operator[=] identifier[MessageDigest] operator[SEP] identifier[getInstance] operator[SEP] identifier[MESSAGE_DIGEST_ALGORITHM_MD5] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[md5Hash] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[BYTE_LENGTH_MD5] operator[SEP] operator[SEP] identifier[messageDigest] operator[SEP] identifier[update] operator[SEP] identifier[input] operator[SEP] identifier[getBytes] operator[SEP] identifier[ENCODING_CHARSET_NAME] operator[SEP] , identifier[MESSAGE_DIGEST_UPDATE_OFFSET] , identifier[input] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[md5Hash] operator[=] identifier[messageDigest] operator[SEP] identifier[digest] operator[SEP] operator[SEP] operator[SEP] identifier[hashValue] operator[=] identifier[convertToHex] operator[SEP] identifier[md5Hash] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NoSuchAlgorithmException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[HibiscusException] operator[SEP] literal[String] operator[+] identifier[MESSAGE_DIGEST_ALGORITHM_MD5] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[UnsupportedEncodingException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[HibiscusException] operator[SEP] literal[String] operator[+] identifier[ENCODING_CHARSET_NAME] , identifier[e] operator[SEP] operator[SEP] } Keyword[return] identifier[hashValue] operator[SEP] }
@Override protected Component newListComponent(final String id, final ListItem<ResourceBundleKey> item) { return ComponentFactory.newLabel(id, ResourceModelFactory.newResourceModel(item.getModel().getObject(), this)); }
class class_name[name] begin[{] method[newListComponent, return_type[type[Component]], modifier[protected], parameter[id, item]] begin[{] return[call[ComponentFactory.newLabel, parameter[member[.id], call[ResourceModelFactory.newResourceModel, parameter[call[item.getModel, parameter[]], THIS[]]]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] identifier[Component] identifier[newListComponent] operator[SEP] Keyword[final] identifier[String] identifier[id] , Keyword[final] identifier[ListItem] operator[<] identifier[ResourceBundleKey] operator[>] identifier[item] operator[SEP] { Keyword[return] identifier[ComponentFactory] operator[SEP] identifier[newLabel] operator[SEP] identifier[id] , identifier[ResourceModelFactory] operator[SEP] identifier[newResourceModel] operator[SEP] identifier[item] operator[SEP] identifier[getModel] operator[SEP] operator[SEP] operator[SEP] identifier[getObject] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] operator[SEP] operator[SEP] }
@SuppressWarnings("deprecation") public <T> ResourceLeakDetector<T> newResourceLeakDetector(Class<T> resource, int samplingInterval) { return newResourceLeakDetector(resource, ResourceLeakDetector.SAMPLING_INTERVAL, Long.MAX_VALUE); }
class class_name[name] begin[{] method[newResourceLeakDetector, return_type[type[ResourceLeakDetector]], modifier[public], parameter[resource, samplingInterval]] begin[{] return[call[.newResourceLeakDetector, parameter[member[.resource], member[ResourceLeakDetector.SAMPLING_INTERVAL], member[Long.MAX_VALUE]]]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] operator[<] identifier[T] operator[>] identifier[ResourceLeakDetector] operator[<] identifier[T] operator[>] identifier[newResourceLeakDetector] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[resource] , Keyword[int] identifier[samplingInterval] operator[SEP] { Keyword[return] identifier[newResourceLeakDetector] operator[SEP] identifier[resource] , identifier[ResourceLeakDetector] operator[SEP] identifier[SAMPLING_INTERVAL] , identifier[Long] operator[SEP] identifier[MAX_VALUE] operator[SEP] operator[SEP] }
public static void deleteFeatureTileLinkExtension(GeoPackageCore geoPackage) { FeatureTileLinkDao featureTileLinkDao = geoPackage .getFeatureTileLinkDao(); ExtensionsDao extensionsDao = geoPackage.getExtensionsDao(); try { if (featureTileLinkDao.isTableExists()) { geoPackage.dropTable(featureTileLinkDao.getTableName()); } if (extensionsDao.isTableExists()) { extensionsDao .deleteByExtension(FeatureTileTableCoreLinker.EXTENSION_NAME); } } catch (SQLException e) { throw new GeoPackageException( "Failed to delete Feature Tile Link extension and table. GeoPackage: " + geoPackage.getName(), e); } }
class class_name[name] begin[{] method[deleteFeatureTileLinkExtension, return_type[void], modifier[public static], parameter[geoPackage]] begin[{] local_variable[type[FeatureTileLinkDao], featureTileLinkDao] local_variable[type[ExtensionsDao], extensionsDao] TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isTableExists, postfix_operators=[], prefix_operators=[], qualifier=featureTileLinkDao, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTableName, postfix_operators=[], prefix_operators=[], qualifier=featureTileLinkDao, selectors=[], type_arguments=None)], member=dropTable, postfix_operators=[], prefix_operators=[], qualifier=geoPackage, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MethodInvocation(arguments=[], member=isTableExists, postfix_operators=[], prefix_operators=[], qualifier=extensionsDao, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=EXTENSION_NAME, postfix_operators=[], prefix_operators=[], qualifier=FeatureTileTableCoreLinker, selectors=[])], member=deleteByExtension, postfix_operators=[], prefix_operators=[], qualifier=extensionsDao, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to delete Feature Tile Link extension and table. GeoPackage: "), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=geoPackage, 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=GeoPackageException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SQLException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[deleteFeatureTileLinkExtension] operator[SEP] identifier[GeoPackageCore] identifier[geoPackage] operator[SEP] { identifier[FeatureTileLinkDao] identifier[featureTileLinkDao] operator[=] identifier[geoPackage] operator[SEP] identifier[getFeatureTileLinkDao] operator[SEP] operator[SEP] operator[SEP] identifier[ExtensionsDao] identifier[extensionsDao] operator[=] identifier[geoPackage] operator[SEP] identifier[getExtensionsDao] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[featureTileLinkDao] operator[SEP] identifier[isTableExists] operator[SEP] operator[SEP] operator[SEP] { identifier[geoPackage] operator[SEP] identifier[dropTable] operator[SEP] identifier[featureTileLinkDao] operator[SEP] identifier[getTableName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[extensionsDao] operator[SEP] identifier[isTableExists] operator[SEP] operator[SEP] operator[SEP] { identifier[extensionsDao] operator[SEP] identifier[deleteByExtension] operator[SEP] identifier[FeatureTileTableCoreLinker] operator[SEP] identifier[EXTENSION_NAME] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[SQLException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[GeoPackageException] operator[SEP] literal[String] operator[+] identifier[geoPackage] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public Collection<Story> getStories(StoryFilter filter, boolean includeSubprojects) { filter = (filter != null) ? filter : new StoryFilter(); return getInstance().get().story( getFilter(filter, includeSubprojects)); }
class class_name[name] begin[{] method[getStories, return_type[type[Collection]], modifier[public], parameter[filter, includeSubprojects]] begin[{] assign[member[.filter], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=filter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StoryFilter, sub_type=None)), if_true=MemberReference(member=filter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] return[call[.getInstance, parameter[]]] end[}] END[}]
Keyword[public] identifier[Collection] operator[<] identifier[Story] operator[>] identifier[getStories] operator[SEP] identifier[StoryFilter] identifier[filter] , Keyword[boolean] identifier[includeSubprojects] operator[SEP] { identifier[filter] operator[=] operator[SEP] identifier[filter] operator[!=] Other[null] operator[SEP] operator[?] identifier[filter] operator[:] Keyword[new] identifier[StoryFilter] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[story] operator[SEP] identifier[getFilter] operator[SEP] identifier[filter] , identifier[includeSubprojects] operator[SEP] operator[SEP] operator[SEP] }
@Pure @SuppressWarnings("unchecked") protected static <VALUET> VALUET maskNull(VALUET value) { return (value == null) ? (VALUET) NULL_VALUE : value; }
class class_name[name] begin[{] method[maskNull, return_type[type[VALUET]], modifier[static protected], parameter[value]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=Cast(expression=MemberReference(member=NULL_VALUE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=VALUET, sub_type=None)))] end[}] END[}]
annotation[@] identifier[Pure] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] Keyword[static] operator[<] identifier[VALUET] operator[>] identifier[VALUET] identifier[maskNull] operator[SEP] identifier[VALUET] identifier[value] operator[SEP] { Keyword[return] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] operator[?] operator[SEP] identifier[VALUET] operator[SEP] identifier[NULL_VALUE] operator[:] identifier[value] operator[SEP] }
@Override public final DataSource getJtaDataSource() { if (ivJtaDataSource == null || ivJtaDataSource instanceof GenericDataSource) { // d455055 ivJtaDataSource = getJPADataSource(ivJtaDataSourceJNDIName); } return ivJtaDataSource; }
class class_name[name] begin[{] method[getJtaDataSource, return_type[type[DataSource]], modifier[final public], parameter[]] begin[{] if[binary_operation[binary_operation[member[.ivJtaDataSource], ==, literal[null]], ||, binary_operation[member[.ivJtaDataSource], instanceof, type[GenericDataSource]]]] begin[{] assign[member[.ivJtaDataSource], call[.getJPADataSource, parameter[member[.ivJtaDataSourceJNDIName]]]] else begin[{] None end[}] return[member[.ivJtaDataSource]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[final] identifier[DataSource] identifier[getJtaDataSource] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ivJtaDataSource] operator[==] Other[null] operator[||] identifier[ivJtaDataSource] Keyword[instanceof] identifier[GenericDataSource] operator[SEP] { identifier[ivJtaDataSource] operator[=] identifier[getJPADataSource] operator[SEP] identifier[ivJtaDataSourceJNDIName] operator[SEP] operator[SEP] } Keyword[return] identifier[ivJtaDataSource] operator[SEP] }
public WriteSegmentRequest withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
class class_name[name] begin[{] method[withTags, return_type[type[WriteSegmentRequest]], modifier[public], parameter[tags]] begin[{] call[.setTags, parameter[member[.tags]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[WriteSegmentRequest] identifier[withTags] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[tags] operator[SEP] { identifier[setTags] operator[SEP] identifier[tags] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public <T> MutateInBuilder arrayPrepend(String path, T value) { asyncBuilder.arrayPrepend(path, value); return this; }
class class_name[name] begin[{] method[arrayPrepend, return_type[type[MutateInBuilder]], modifier[public], parameter[path, value]] begin[{] call[asyncBuilder.arrayPrepend, parameter[member[.path], member[.value]]] return[THIS[]] end[}] END[}]
Keyword[public] operator[<] identifier[T] operator[>] identifier[MutateInBuilder] identifier[arrayPrepend] operator[SEP] identifier[String] identifier[path] , identifier[T] identifier[value] operator[SEP] { identifier[asyncBuilder] operator[SEP] identifier[arrayPrepend] operator[SEP] identifier[path] , identifier[value] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public static Set<String> scanClassPathWithExcludes(final String classPath, final Set<String> excludeJarSet, final Set<String> excludePrefixes) { final Set<String> pathSet = new HashSet<String>(); // Defer to JDKPaths to do the actual classpath scanning. __JDKPaths.processClassPathItem(classPath, excludeJarSet, pathSet); return filterPathSet(pathSet, excludePrefixes, Collections.<String>emptySet()); }
class class_name[name] begin[{] method[scanClassPathWithExcludes, return_type[type[Set]], modifier[public static], parameter[classPath, excludeJarSet, excludePrefixes]] begin[{] local_variable[type[Set], pathSet] call[__JDKPaths.processClassPathItem, parameter[member[.classPath], member[.excludeJarSet], member[.pathSet]]] return[call[.filterPathSet, parameter[member[.pathSet], member[.excludePrefixes], call[.Collections, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Set] operator[<] identifier[String] operator[>] identifier[scanClassPathWithExcludes] operator[SEP] Keyword[final] identifier[String] identifier[classPath] , Keyword[final] identifier[Set] operator[<] identifier[String] operator[>] identifier[excludeJarSet] , Keyword[final] identifier[Set] operator[<] identifier[String] operator[>] identifier[excludePrefixes] operator[SEP] { Keyword[final] identifier[Set] operator[<] identifier[String] operator[>] identifier[pathSet] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[__JDKPaths] operator[SEP] identifier[processClassPathItem] operator[SEP] identifier[classPath] , identifier[excludeJarSet] , identifier[pathSet] operator[SEP] operator[SEP] Keyword[return] identifier[filterPathSet] operator[SEP] identifier[pathSet] , identifier[excludePrefixes] , identifier[Collections] operator[SEP] operator[<] identifier[String] operator[>] identifier[emptySet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private void rePrimeNF7(AxiomSet as, IConceptMap<IConceptSet> subsumptions) { int size = as.getNf7Axioms().size(); if (size == 0) return; IConceptMap<MonotonicCollection<NF7>> deltaNF7 = new SparseConceptMap<MonotonicCollection<NF7>>(size); for (NF7 nf7 : as.getNf7Axioms()) { int a = nf7.lhsA; MonotonicCollection<NF7> list = deltaNF7.get(a); if(list == null) { list = new MonotonicCollection<NF7>(2); deltaNF7.put(a, list); } list.add(nf7); } // Get all the subsumptions a [ x for (final IntIterator aItr = subsumptions.keyIterator(); aItr.hasNext();) { final int a = aItr.next(); final IConceptSet Sa = subsumptions.get(a); for (final IntIterator xItr = Sa.iterator(); xItr.hasNext();) { final int x = xItr.next(); // If any of the new axioms is of the form x [ y then add // an entry if (deltaNF7.containsKey(x)) { final IMonotonicCollection<NF7> set = deltaNF7.get(x); for (final NF7 entry : set) { // Add to corresponding context and activate Context ctx = contextIndex.get(a); ctx.addFeatureQueueEntry(entry); affectedContexts.add(ctx); ctx.startTracking(); if (ctx.activate()) { todo.add(ctx); } } } } } }
class class_name[name] begin[{] method[rePrimeNF7, return_type[void], modifier[private], parameter[as, subsumptions]] begin[{] local_variable[type[int], size] if[binary_operation[member[.size], ==, literal[0]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[IConceptMap], deltaNF7] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=lhsA, postfix_operators=[], prefix_operators=[], qualifier=nf7, selectors=[]), name=a)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=deltaNF7, selectors=[], type_arguments=None), name=list)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=NF7, sub_type=None))], dimensions=[], name=MonotonicCollection, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=list, 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=list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], 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=NF7, sub_type=None))], dimensions=None, name=MonotonicCollection, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=deltaNF7, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=nf7, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getNf7Axioms, postfix_operators=[], prefix_operators=[], qualifier=as, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=nf7)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NF7, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=aItr, selectors=[], type_arguments=None), name=a)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=subsumptions, selectors=[], type_arguments=None), name=Sa)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=IConceptSet, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=xItr, selectors=[], type_arguments=None), name=x)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=deltaNF7, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=deltaNF7, selectors=[], type_arguments=None), name=set)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=NF7, sub_type=None))], dimensions=[], name=IMonotonicCollection, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=contextIndex, selectors=[], type_arguments=None), name=ctx)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Context, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=entry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addFeatureQueueEntry, postfix_operators=[], prefix_operators=[], qualifier=ctx, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ctx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=affectedContexts, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=startTracking, postfix_operators=[], prefix_operators=[], qualifier=ctx, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=activate, postfix_operators=[], prefix_operators=[], qualifier=ctx, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ctx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=todo, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=set, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=NF7, sub_type=None))), label=None)]))]), control=ForControl(condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=xItr, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=iterator, postfix_operators=[], prefix_operators=[], qualifier=Sa, selectors=[], type_arguments=None), name=xItr)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=IntIterator, sub_type=None)), update=None), label=None)]), control=ForControl(condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=aItr, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=keyIterator, postfix_operators=[], prefix_operators=[], qualifier=subsumptions, selectors=[], type_arguments=None), name=aItr)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=IntIterator, sub_type=None)), update=None), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[rePrimeNF7] operator[SEP] identifier[AxiomSet] identifier[as] , identifier[IConceptMap] operator[<] identifier[IConceptSet] operator[>] identifier[subsumptions] operator[SEP] { Keyword[int] identifier[size] operator[=] identifier[as] operator[SEP] identifier[getNf7Axioms] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[size] operator[==] Other[0] operator[SEP] Keyword[return] operator[SEP] identifier[IConceptMap] operator[<] identifier[MonotonicCollection] operator[<] identifier[NF7] operator[>] operator[>] identifier[deltaNF7] operator[=] Keyword[new] identifier[SparseConceptMap] operator[<] identifier[MonotonicCollection] operator[<] identifier[NF7] operator[>] operator[>] operator[SEP] identifier[size] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[NF7] identifier[nf7] operator[:] identifier[as] operator[SEP] identifier[getNf7Axioms] operator[SEP] operator[SEP] operator[SEP] { Keyword[int] identifier[a] operator[=] identifier[nf7] operator[SEP] identifier[lhsA] operator[SEP] identifier[MonotonicCollection] operator[<] identifier[NF7] operator[>] identifier[list] operator[=] identifier[deltaNF7] operator[SEP] identifier[get] operator[SEP] identifier[a] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[list] operator[==] Other[null] operator[SEP] { identifier[list] operator[=] Keyword[new] identifier[MonotonicCollection] operator[<] identifier[NF7] operator[>] operator[SEP] Other[2] operator[SEP] operator[SEP] identifier[deltaNF7] operator[SEP] identifier[put] operator[SEP] identifier[a] , identifier[list] operator[SEP] operator[SEP] } identifier[list] operator[SEP] identifier[add] operator[SEP] identifier[nf7] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] Keyword[final] identifier[IntIterator] identifier[aItr] operator[=] identifier[subsumptions] operator[SEP] identifier[keyIterator] operator[SEP] operator[SEP] operator[SEP] identifier[aItr] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] Keyword[int] identifier[a] operator[=] identifier[aItr] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[IConceptSet] identifier[Sa] operator[=] identifier[subsumptions] operator[SEP] identifier[get] operator[SEP] identifier[a] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[IntIterator] identifier[xItr] operator[=] identifier[Sa] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[xItr] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] Keyword[int] identifier[x] operator[=] identifier[xItr] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[deltaNF7] operator[SEP] identifier[containsKey] operator[SEP] identifier[x] operator[SEP] operator[SEP] { Keyword[final] identifier[IMonotonicCollection] operator[<] identifier[NF7] operator[>] identifier[set] operator[=] identifier[deltaNF7] operator[SEP] identifier[get] operator[SEP] identifier[x] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[NF7] identifier[entry] operator[:] identifier[set] operator[SEP] { identifier[Context] identifier[ctx] operator[=] identifier[contextIndex] operator[SEP] identifier[get] operator[SEP] identifier[a] operator[SEP] operator[SEP] identifier[ctx] operator[SEP] identifier[addFeatureQueueEntry] operator[SEP] identifier[entry] operator[SEP] operator[SEP] identifier[affectedContexts] operator[SEP] identifier[add] operator[SEP] identifier[ctx] operator[SEP] operator[SEP] identifier[ctx] operator[SEP] identifier[startTracking] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ctx] operator[SEP] identifier[activate] operator[SEP] operator[SEP] operator[SEP] { identifier[todo] operator[SEP] identifier[add] operator[SEP] identifier[ctx] operator[SEP] operator[SEP] } } } } } }
public <T1> Mutable<T1> mapInputToObj(final Function<T1, Float> fn) { final MutableFloat host = this; return new Mutable<T1>() { @Override public Mutable<T1> set(final T1 value) { host.set(fn.apply(value)); return this; } }; }
class class_name[name] begin[{] method[mapInputToObj, return_type[type[Mutable]], modifier[public], parameter[fn]] begin[{] local_variable[type[MutableFloat], host] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=apply, postfix_operators=[], prefix_operators=[], qualifier=fn, selectors=[], type_arguments=None)], member=set, postfix_operators=[], prefix_operators=[], qualifier=host, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), label=None)], documentation=None, modifiers={'public'}, name=set, parameters=[FormalParameter(annotations=[], modifiers={'final'}, name=value, type=ReferenceType(arguments=None, dimensions=[], name=T1, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T1, sub_type=None))], dimensions=[], name=Mutable, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T1, sub_type=None))], dimensions=None, name=Mutable, sub_type=None))] end[}] END[}]
Keyword[public] operator[<] identifier[T1] operator[>] identifier[Mutable] operator[<] identifier[T1] operator[>] identifier[mapInputToObj] operator[SEP] Keyword[final] identifier[Function] operator[<] identifier[T1] , identifier[Float] operator[>] identifier[fn] operator[SEP] { Keyword[final] identifier[MutableFloat] identifier[host] operator[=] Keyword[this] operator[SEP] Keyword[return] Keyword[new] identifier[Mutable] operator[<] identifier[T1] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Mutable] operator[<] identifier[T1] operator[>] identifier[set] operator[SEP] Keyword[final] identifier[T1] identifier[value] operator[SEP] { identifier[host] operator[SEP] identifier[set] operator[SEP] identifier[fn] operator[SEP] identifier[apply] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] } } operator[SEP] }