code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
@Override public Optional<EventSelectionResult> select(BProgramSyncSnapshot bpss, Set<BEvent> selectableEvents) { if (selectableEvents.isEmpty()) { return Optional.empty(); } BEvent chosen = new ArrayList<>(selectableEvents).get(rnd.nextInt(selectableEvents.size())); Set<BEvent> requested = bpss.getStatements().stream() .filter((SyncStatement stmt) -> stmt != null) .flatMap((SyncStatement stmt) -> stmt.getRequest().stream()) .collect(Collectors.toSet()); if (requested.contains(chosen)) { return Optional.of(new EventSelectionResult(chosen)); } else { // that was an external event, need to find the first index return Optional.of(new EventSelectionResult(chosen, singleton(bpss.getExternalEvents().indexOf(chosen)))); } }
class class_name[name] begin[{] method[select, return_type[type[Optional]], modifier[public], parameter[bpss, selectableEvents]] begin[{] if[call[selectableEvents.isEmpty, parameter[]]] begin[{] return[call[Optional.empty, parameter[]]] else begin[{] None end[}] local_variable[type[BEvent], chosen] local_variable[type[Set], requested] if[call[requested.contains, parameter[member[.chosen]]]] begin[{] return[call[Optional.of, parameter[ClassCreator(arguments=[MemberReference(member=chosen, 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=EventSelectionResult, sub_type=None))]]] else begin[{] return[call[Optional.of, parameter[ClassCreator(arguments=[MemberReference(member=chosen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getExternalEvents, postfix_operators=[], prefix_operators=[], qualifier=bpss, selectors=[MethodInvocation(arguments=[MemberReference(member=chosen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=indexOf, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=singleton, 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=EventSelectionResult, sub_type=None))]]] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Optional] operator[<] identifier[EventSelectionResult] operator[>] identifier[select] operator[SEP] identifier[BProgramSyncSnapshot] identifier[bpss] , identifier[Set] operator[<] identifier[BEvent] operator[>] identifier[selectableEvents] operator[SEP] { Keyword[if] operator[SEP] identifier[selectableEvents] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[Optional] operator[SEP] identifier[empty] operator[SEP] operator[SEP] operator[SEP] } identifier[BEvent] identifier[chosen] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[selectableEvents] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[rnd] operator[SEP] identifier[nextInt] operator[SEP] identifier[selectableEvents] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[BEvent] operator[>] identifier[requested] operator[=] identifier[bpss] operator[SEP] identifier[getStatements] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] operator[SEP] identifier[SyncStatement] identifier[stmt] operator[SEP] operator[->] identifier[stmt] operator[!=] Other[null] operator[SEP] operator[SEP] identifier[flatMap] operator[SEP] operator[SEP] identifier[SyncStatement] identifier[stmt] operator[SEP] operator[->] identifier[stmt] operator[SEP] identifier[getRequest] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[toSet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[requested] operator[SEP] identifier[contains] operator[SEP] identifier[chosen] operator[SEP] operator[SEP] { Keyword[return] identifier[Optional] operator[SEP] identifier[of] operator[SEP] Keyword[new] identifier[EventSelectionResult] operator[SEP] identifier[chosen] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[Optional] operator[SEP] identifier[of] operator[SEP] Keyword[new] identifier[EventSelectionResult] operator[SEP] identifier[chosen] , identifier[singleton] operator[SEP] identifier[bpss] operator[SEP] identifier[getExternalEvents] operator[SEP] operator[SEP] operator[SEP] identifier[indexOf] operator[SEP] identifier[chosen] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public static HttpTransport newTransport(String proxyUrl, String portStr) throws NumberFormatException, GeneralSecurityException, IOException { if (!StringUtils.isEmpty(proxyUrl) && !StringUtils.isEmpty(portStr)) { return new NetHttpTransport.Builder() .trustCertificates(GoogleUtils.getCertificateTrustStore()) .setProxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxyUrl, Integer.parseInt(portStr)))) .build(); } return GoogleNetHttpTransport.newTrustedTransport(); }
class class_name[name] begin[{] method[newTransport, return_type[type[HttpTransport]], modifier[public static], parameter[proxyUrl, portStr]] begin[{] if[binary_operation[call[StringUtils.isEmpty, parameter[member[.proxyUrl]]], &&, call[StringUtils.isEmpty, parameter[member[.portStr]]]]] begin[{] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getCertificateTrustStore, postfix_operators=[], prefix_operators=[], qualifier=GoogleUtils, selectors=[], type_arguments=None)], member=trustCertificates, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=HTTP, postfix_operators=[], prefix_operators=[], qualifier=Proxy.Type, selectors=[]), ClassCreator(arguments=[MemberReference(member=proxyUrl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=portStr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InetSocketAddress, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Proxy, sub_type=None))], member=setProxy, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=NetHttpTransport, sub_type=ReferenceType(arguments=None, dimensions=None, name=Builder, sub_type=None)))] else begin[{] None end[}] return[call[GoogleNetHttpTransport.newTrustedTransport, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[HttpTransport] identifier[newTransport] operator[SEP] identifier[String] identifier[proxyUrl] , identifier[String] identifier[portStr] operator[SEP] Keyword[throws] identifier[NumberFormatException] , identifier[GeneralSecurityException] , identifier[IOException] { Keyword[if] operator[SEP] operator[!] identifier[StringUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[proxyUrl] operator[SEP] operator[&&] operator[!] identifier[StringUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[portStr] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[NetHttpTransport] operator[SEP] identifier[Builder] operator[SEP] operator[SEP] operator[SEP] identifier[trustCertificates] operator[SEP] identifier[GoogleUtils] operator[SEP] identifier[getCertificateTrustStore] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setProxy] operator[SEP] Keyword[new] identifier[Proxy] operator[SEP] identifier[Proxy] operator[SEP] identifier[Type] operator[SEP] identifier[HTTP] , Keyword[new] identifier[InetSocketAddress] operator[SEP] identifier[proxyUrl] , identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[portStr] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[GoogleNetHttpTransport] operator[SEP] identifier[newTrustedTransport] operator[SEP] operator[SEP] operator[SEP] }
private static String evaluateExpressionStack(final Deque<String> operators, final Deque<String> values) { while (!operators.isEmpty()) { values.push(getBooleanResultAsString(operators.pop(), values.pop(), values.pop())); } return replaceIntegerStringByBooleanRepresentation(values.pop()); }
class class_name[name] begin[{] method[evaluateExpressionStack, return_type[type[String]], modifier[private static], parameter[operators, values]] begin[{] while[call[operators.isEmpty, parameter[]]] begin[{] call[values.push, parameter[call[.getBooleanResultAsString, parameter[call[operators.pop, parameter[]], call[values.pop, parameter[]], call[values.pop, parameter[]]]]]] end[}] return[call[.replaceIntegerStringByBooleanRepresentation, parameter[call[values.pop, parameter[]]]]] end[}] END[}]
Keyword[private] Keyword[static] identifier[String] identifier[evaluateExpressionStack] operator[SEP] Keyword[final] identifier[Deque] operator[<] identifier[String] operator[>] identifier[operators] , Keyword[final] identifier[Deque] operator[<] identifier[String] operator[>] identifier[values] operator[SEP] { Keyword[while] operator[SEP] operator[!] identifier[operators] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[values] operator[SEP] identifier[push] operator[SEP] identifier[getBooleanResultAsString] operator[SEP] identifier[operators] operator[SEP] identifier[pop] operator[SEP] operator[SEP] , identifier[values] operator[SEP] identifier[pop] operator[SEP] operator[SEP] , identifier[values] operator[SEP] identifier[pop] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[replaceIntegerStringByBooleanRepresentation] operator[SEP] identifier[values] operator[SEP] identifier[pop] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public int getAttributeNode(int nodeHandle, String namespaceURI, String name) { // %OPT% This is probably slower than it needs to be. if (null == namespaceURI) namespaceURI = ""; int type = getNodeType(nodeHandle); if (DTM.ELEMENT_NODE == type) { // Assume that attributes immediately follow the element. int identity = makeNodeIdentity(nodeHandle); while (DTM.NULL != (identity = getNextNodeIdentity(identity))) { // Assume this can not be null. type = _type(identity); // %REVIEW% // Should namespace nodes be retrievable DOM-style as attrs? // If not we need a separate function... which may be desirable // architecturally, but which is ugly from a code point of view. // (If we REALLY insist on it, this code should become a subroutine // of both -- retrieve the node, then test if the type matches // what you're looking for.) if (type == DTM.ATTRIBUTE_NODE || type==DTM.NAMESPACE_NODE) { Node node = lookupNode(identity); String nodeuri = node.getNamespaceURI(); if (null == nodeuri) nodeuri = ""; String nodelocalname = node.getLocalName(); if (nodeuri.equals(namespaceURI) && name.equals(nodelocalname)) return makeNodeHandle(identity); } else // if (DTM.NAMESPACE_NODE != type) { break; } } } return DTM.NULL; }
class class_name[name] begin[{] method[getAttributeNode, return_type[type[int]], modifier[public], parameter[nodeHandle, namespaceURI, name]] begin[{] if[binary_operation[literal[null], ==, member[.namespaceURI]]] begin[{] assign[member[.namespaceURI], literal[""]] else begin[{] None end[}] local_variable[type[int], type] if[binary_operation[member[DTM.ELEMENT_NODE], ==, member[.type]]] begin[{] local_variable[type[int], identity] while[binary_operation[member[DTM.NULL], !=, assign[member[.identity], call[.getNextNodeIdentity, parameter[member[.identity]]]]]] begin[{] assign[member[.type], call[._type, parameter[member[.identity]]]] if[binary_operation[binary_operation[member[.type], ==, member[DTM.ATTRIBUTE_NODE]], ||, binary_operation[member[.type], ==, member[DTM.NAMESPACE_NODE]]]] begin[{] local_variable[type[Node], node] local_variable[type[String], nodeuri] if[binary_operation[literal[null], ==, member[.nodeuri]]] begin[{] assign[member[.nodeuri], literal[""]] else begin[{] None end[}] local_variable[type[String], nodelocalname] if[binary_operation[call[nodeuri.equals, parameter[member[.namespaceURI]]], &&, call[name.equals, parameter[member[.nodelocalname]]]]] begin[{] return[call[.makeNodeHandle, parameter[member[.identity]]]] else begin[{] None end[}] else begin[{] BreakStatement(goto=None, label=None) end[}] end[}] else begin[{] None end[}] return[member[DTM.NULL]] end[}] END[}]
Keyword[public] Keyword[int] identifier[getAttributeNode] operator[SEP] Keyword[int] identifier[nodeHandle] , identifier[String] identifier[namespaceURI] , identifier[String] identifier[name] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[namespaceURI] operator[SEP] identifier[namespaceURI] operator[=] literal[String] operator[SEP] Keyword[int] identifier[type] operator[=] identifier[getNodeType] operator[SEP] identifier[nodeHandle] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[DTM] operator[SEP] identifier[ELEMENT_NODE] operator[==] identifier[type] operator[SEP] { Keyword[int] identifier[identity] operator[=] identifier[makeNodeIdentity] operator[SEP] identifier[nodeHandle] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[DTM] operator[SEP] identifier[NULL] operator[!=] operator[SEP] identifier[identity] operator[=] identifier[getNextNodeIdentity] operator[SEP] identifier[identity] operator[SEP] operator[SEP] operator[SEP] { identifier[type] operator[=] identifier[_type] operator[SEP] identifier[identity] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[type] operator[==] identifier[DTM] operator[SEP] identifier[ATTRIBUTE_NODE] operator[||] identifier[type] operator[==] identifier[DTM] operator[SEP] identifier[NAMESPACE_NODE] operator[SEP] { identifier[Node] identifier[node] operator[=] identifier[lookupNode] operator[SEP] identifier[identity] operator[SEP] operator[SEP] identifier[String] identifier[nodeuri] operator[=] identifier[node] operator[SEP] identifier[getNamespaceURI] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[==] identifier[nodeuri] operator[SEP] identifier[nodeuri] operator[=] literal[String] operator[SEP] identifier[String] identifier[nodelocalname] operator[=] identifier[node] operator[SEP] identifier[getLocalName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nodeuri] operator[SEP] identifier[equals] operator[SEP] identifier[namespaceURI] operator[SEP] operator[&&] identifier[name] operator[SEP] identifier[equals] operator[SEP] identifier[nodelocalname] operator[SEP] operator[SEP] Keyword[return] identifier[makeNodeHandle] operator[SEP] identifier[identity] operator[SEP] operator[SEP] } Keyword[else] { Keyword[break] operator[SEP] } } } Keyword[return] identifier[DTM] operator[SEP] identifier[NULL] operator[SEP] }
public void marshall(PartListElement partListElement, ProtocolMarshaller protocolMarshaller) { if (partListElement == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(partListElement.getRangeInBytes(), RANGEINBYTES_BINDING); protocolMarshaller.marshall(partListElement.getSHA256TreeHash(), SHA256TREEHASH_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[partListElement, protocolMarshaller]] begin[{] if[binary_operation[member[.partListElement], ==, 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=getRangeInBytes, postfix_operators=[], prefix_operators=[], qualifier=partListElement, selectors=[], type_arguments=None), MemberReference(member=RANGEINBYTES_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSHA256TreeHash, postfix_operators=[], prefix_operators=[], qualifier=partListElement, selectors=[], type_arguments=None), MemberReference(member=SHA256TREEHASH_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[PartListElement] identifier[partListElement] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[partListElement] 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[partListElement] operator[SEP] identifier[getRangeInBytes] operator[SEP] operator[SEP] , identifier[RANGEINBYTES_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[partListElement] operator[SEP] identifier[getSHA256TreeHash] operator[SEP] operator[SEP] , identifier[SHA256TREEHASH_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public void deleteAtManagementGroup(String policyDefinitionName, String managementGroupId) { deleteAtManagementGroupWithServiceResponseAsync(policyDefinitionName, managementGroupId).toBlocking().single().body(); }
class class_name[name] begin[{] method[deleteAtManagementGroup, return_type[void], modifier[public], parameter[policyDefinitionName, managementGroupId]] begin[{] call[.deleteAtManagementGroupWithServiceResponseAsync, parameter[member[.policyDefinitionName], member[.managementGroupId]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[deleteAtManagementGroup] operator[SEP] identifier[String] identifier[policyDefinitionName] , identifier[String] identifier[managementGroupId] operator[SEP] { identifier[deleteAtManagementGroupWithServiceResponseAsync] operator[SEP] identifier[policyDefinitionName] , identifier[managementGroupId] 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 GetDocumentAnalysisResult withBlocks(Block... blocks) { if (this.blocks == null) { setBlocks(new java.util.ArrayList<Block>(blocks.length)); } for (Block ele : blocks) { this.blocks.add(ele); } return this; }
class class_name[name] begin[{] method[withBlocks, return_type[type[GetDocumentAnalysisResult]], modifier[public], parameter[blocks]] begin[{] if[binary_operation[THIS[member[None.blocks]], ==, literal[null]]] begin[{] call[.setBlocks, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=blocks, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Block, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=blocks, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=blocks, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ele)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Block, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[GetDocumentAnalysisResult] identifier[withBlocks] operator[SEP] identifier[Block] operator[...] identifier[blocks] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[blocks] operator[==] Other[null] operator[SEP] { identifier[setBlocks] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[Block] operator[>] operator[SEP] identifier[blocks] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[Block] identifier[ele] operator[:] identifier[blocks] operator[SEP] { Keyword[this] operator[SEP] identifier[blocks] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public static int median(ArrayModifiableDBIDs data, Comparator<? super DBIDRef> comparator, int begin, int end) { final int length = end - begin; assert (length > 0); // Integer division is "floor" since we are non-negative. final int left = begin + ((length - 1) >> 1); quickSelect(data, comparator, begin, end, left); return left; }
class class_name[name] begin[{] method[median, return_type[type[int]], modifier[public static], parameter[data, comparator, begin, end]] begin[{] local_variable[type[int], length] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), label=None, value=None) local_variable[type[int], left] call[.quickSelect, parameter[member[.data], member[.comparator], member[.begin], member[.end], member[.left]]] return[member[.left]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[median] operator[SEP] identifier[ArrayModifiableDBIDs] identifier[data] , identifier[Comparator] operator[<] operator[?] Keyword[super] identifier[DBIDRef] operator[>] identifier[comparator] , Keyword[int] identifier[begin] , Keyword[int] identifier[end] operator[SEP] { Keyword[final] Keyword[int] identifier[length] operator[=] identifier[end] operator[-] identifier[begin] operator[SEP] Keyword[assert] operator[SEP] identifier[length] operator[>] Other[0] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[left] operator[=] identifier[begin] operator[+] operator[SEP] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] operator[>] operator[>] Other[1] operator[SEP] operator[SEP] identifier[quickSelect] operator[SEP] identifier[data] , identifier[comparator] , identifier[begin] , identifier[end] , identifier[left] operator[SEP] operator[SEP] Keyword[return] identifier[left] operator[SEP] }
public static String renderHTML(Graph graph, String mapName, String imgUrl, String targets[], String titles[]) { StringBuilder sb = new StringBuilder(); sb.append("<map name=\"").append(mapName).append("\">"); RegionGraphElement rge[] = graph.getRegions(); int count = rge.length; for(int i = 0; i < count; i++) { if(targets[i] != null) { Rectangle r = rge[i].getBoundingRectangle(); sb.append("<area href=\"").append(targets[i]).append("\""); if(titles[i] != null) { sb.append(" title=\"").append(titles[i]).append("\""); } sb.append(" shape=\"rect\" coords=\""); sb.append(r.x).append(","); sb.append(r.y).append(","); sb.append(r.x+r.width).append(","); sb.append(r.y+r.height).append("\" border=\"1\" />"); } } sb.append("</map>"); sb.append("<image src=\"").append(imgUrl).append("\""); sb.append(" border=\"0\" width=\"").append(graph.width).append("\""); sb.append(" height=\"").append(graph.height).append("\""); sb.append(" usemap=\"#").append(mapName).append("\" />"); return sb.toString(); }
class class_name[name] begin[{] method[renderHTML, return_type[type[String]], modifier[public static], parameter[graph, mapName, imgUrl, targets, titles]] begin[{] local_variable[type[StringBuilder], sb] call[sb.append, parameter[literal["<map name=\""]]] local_variable[type[RegionGraphElement], rge] local_variable[type[int], count] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=targets, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=rge, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=getBoundingRectangle, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=r)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Rectangle, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="<area href=\"")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[MethodInvocation(arguments=[MemberReference(member=targets, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\"")], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=titles, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" title=\"")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[MethodInvocation(arguments=[MemberReference(member=titles, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\"")], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" shape=\"rect\" coords=\"")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=r, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=",")], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=r, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=",")], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=r, selectors=[]), operandr=MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=r, selectors=[]), operator=+)], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=",")], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=r, selectors=[]), operandr=MemberReference(member=height, postfix_operators=[], prefix_operators=[], qualifier=r, selectors=[]), operator=+)], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\" border=\"1\" />")], 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=count, 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) call[sb.append, parameter[literal["</map>"]]] call[sb.append, parameter[literal["<image src=\""]]] call[sb.append, parameter[literal[" border=\"0\" width=\""]]] call[sb.append, parameter[literal[" height=\""]]] call[sb.append, parameter[literal[" usemap=\"#"]]] return[call[sb.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[renderHTML] operator[SEP] identifier[Graph] identifier[graph] , identifier[String] identifier[mapName] , identifier[String] identifier[imgUrl] , identifier[String] identifier[targets] operator[SEP] operator[SEP] , identifier[String] identifier[titles] operator[SEP] operator[SEP] operator[SEP] { identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[mapName] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[RegionGraphElement] identifier[rge] operator[SEP] operator[SEP] operator[=] identifier[graph] operator[SEP] identifier[getRegions] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[count] operator[=] identifier[rge] operator[SEP] identifier[length] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[count] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[targets] operator[SEP] identifier[i] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[Rectangle] identifier[r] operator[=] identifier[rge] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[getBoundingRectangle] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[targets] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[titles] operator[SEP] identifier[i] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[titles] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[r] operator[SEP] identifier[x] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[r] operator[SEP] identifier[y] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[r] operator[SEP] identifier[x] operator[+] identifier[r] operator[SEP] identifier[width] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[r] operator[SEP] identifier[y] operator[+] identifier[r] operator[SEP] identifier[height] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } } identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[imgUrl] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[graph] operator[SEP] identifier[width] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[graph] operator[SEP] identifier[height] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[mapName] 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] }
public List<Friend> getFriends() { return getFriends(new Filter<Friend>() { public boolean accept(Friend e) { return true; } }); }
class class_name[name] begin[{] method[getFriends, return_type[type[List]], modifier[public], parameter[]] begin[{] return[call[.getFriends, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)], documentation=None, modifiers={'public'}, name=accept, parameters=[FormalParameter(annotations=[], modifiers=set(), name=e, type=ReferenceType(arguments=None, dimensions=[], name=Friend, sub_type=None), varargs=False)], return_type=BasicType(dimensions=[], name=boolean), 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=Friend, sub_type=None))], dimensions=None, name=Filter, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[Friend] operator[>] identifier[getFriends] operator[SEP] operator[SEP] { Keyword[return] identifier[getFriends] operator[SEP] Keyword[new] identifier[Filter] operator[<] identifier[Friend] operator[>] operator[SEP] operator[SEP] { Keyword[public] Keyword[boolean] identifier[accept] operator[SEP] identifier[Friend] identifier[e] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } operator[SEP] operator[SEP] }
public <T> AsyncMutateInBuilder arrayAddUnique(String path, T value) { this.mutationSpecs.add(new MutationSpec(Mutation.ARRAY_ADD_UNIQUE, path, value)); return this; }
class class_name[name] begin[{] method[arrayAddUnique, return_type[type[AsyncMutateInBuilder]], modifier[public], parameter[path, value]] begin[{] THIS[member[None.mutationSpecs]call[None.add, parameter[ClassCreator(arguments=[MemberReference(member=ARRAY_ADD_UNIQUE, postfix_operators=[], prefix_operators=[], qualifier=Mutation, selectors=[]), MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=None, dimensions=None, name=MutationSpec, sub_type=None))]]] return[THIS[]] end[}] END[}]
Keyword[public] operator[<] identifier[T] operator[>] identifier[AsyncMutateInBuilder] identifier[arrayAddUnique] operator[SEP] identifier[String] identifier[path] , identifier[T] identifier[value] operator[SEP] { Keyword[this] operator[SEP] identifier[mutationSpecs] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[MutationSpec] operator[SEP] identifier[Mutation] operator[SEP] identifier[ARRAY_ADD_UNIQUE] , identifier[path] , identifier[value] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public @NotNull OptionalDouble findOptionalDouble(@NotNull SqlQuery query) { Optional<Double> value = findOptional(Double.class, query); return value.isPresent() ? OptionalDouble.of(value.get()) : OptionalDouble.empty(); }
class class_name[name] begin[{] method[findOptionalDouble, return_type[type[OptionalDouble]], modifier[public], parameter[query]] begin[{] local_variable[type[Optional], value] return[TernaryExpression(condition=MethodInvocation(arguments=[], member=isPresent, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), if_false=MethodInvocation(arguments=[], member=empty, postfix_operators=[], prefix_operators=[], qualifier=OptionalDouble, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None)], member=of, postfix_operators=[], prefix_operators=[], qualifier=OptionalDouble, selectors=[], type_arguments=None))] end[}] END[}]
Keyword[public] annotation[@] identifier[NotNull] identifier[OptionalDouble] identifier[findOptionalDouble] operator[SEP] annotation[@] identifier[NotNull] identifier[SqlQuery] identifier[query] operator[SEP] { identifier[Optional] operator[<] identifier[Double] operator[>] identifier[value] operator[=] identifier[findOptional] operator[SEP] identifier[Double] operator[SEP] Keyword[class] , identifier[query] operator[SEP] operator[SEP] Keyword[return] identifier[value] operator[SEP] identifier[isPresent] operator[SEP] operator[SEP] operator[?] identifier[OptionalDouble] operator[SEP] identifier[of] operator[SEP] identifier[value] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] operator[:] identifier[OptionalDouble] operator[SEP] identifier[empty] operator[SEP] operator[SEP] operator[SEP] }
public void start(Consumer<UpdateRackHeartbeat> consumer, Result<Integer> result) { if (_selfServer.port() < 0) { result.ok(0); return; } // boolean isPendingStart = false; ArrayList<ClusterHeartbeat> clusterList = new ArrayList<>(); for (ClusterHeartbeat cluster : _root.getClusters()) { clusterList.add(cluster); } if (clusterList.size() == 0) { result.ok(0); return; } /* Result<Integer>[]resultFork = result.fork(clusterList.size(), (x,r)->addInt(x,null,r), (x,y,r)->addInt(x,y,r)); */ Fork<Integer,Integer> fork = result.fork(); for (int i = 0; i < clusterList.size(); i++) { ClusterHeartbeat cluster = clusterList.get(i); startCluster(cluster, consumer, fork.branch()); // resultFork[i]); } fork.fail((v,f,r)->addInt(v,f,r)); fork.join((v,r)->addInt(v,null,r)); /* for (ClusterHeartbeat cluster : _root.getClusters()) { if (! _selfServer.getClusterId().equals(cluster.getId())) { startCluster(cluster, cont); } } */ }
class class_name[name] begin[{] method[start, return_type[void], modifier[public], parameter[consumer, result]] begin[{] if[binary_operation[call[_selfServer.port, parameter[]], <, literal[0]]] begin[{] call[result.ok, parameter[literal[0]]] return[None] else begin[{] None end[}] local_variable[type[ArrayList], clusterList] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=cluster, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=clusterList, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getClusters, postfix_operators=[], prefix_operators=[], qualifier=_root, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=cluster)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ClusterHeartbeat, sub_type=None))), label=None) if[binary_operation[call[clusterList.size, parameter[]], ==, literal[0]]] begin[{] call[result.ok, parameter[literal[0]]] return[None] else begin[{] None end[}] local_variable[type[Fork], fork] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=clusterList, selectors=[], type_arguments=None), name=cluster)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ClusterHeartbeat, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=cluster, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=consumer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=branch, postfix_operators=[], prefix_operators=[], qualifier=fork, selectors=[], type_arguments=None)], member=startCluster, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=clusterList, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) call[fork.fail, parameter[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addInt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), parameters=[InferredFormalParameter(name=v), InferredFormalParameter(name=f), InferredFormalParameter(name=r)])]] call[fork.join, parameter[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addInt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), parameters=[InferredFormalParameter(name=v), InferredFormalParameter(name=r)])]] end[}] END[}]
Keyword[public] Keyword[void] identifier[start] operator[SEP] identifier[Consumer] operator[<] identifier[UpdateRackHeartbeat] operator[>] identifier[consumer] , identifier[Result] operator[<] identifier[Integer] operator[>] identifier[result] operator[SEP] { Keyword[if] operator[SEP] identifier[_selfServer] operator[SEP] identifier[port] operator[SEP] operator[SEP] operator[<] Other[0] operator[SEP] { identifier[result] operator[SEP] identifier[ok] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[ArrayList] operator[<] identifier[ClusterHeartbeat] operator[>] identifier[clusterList] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ClusterHeartbeat] identifier[cluster] operator[:] identifier[_root] operator[SEP] identifier[getClusters] operator[SEP] operator[SEP] operator[SEP] { identifier[clusterList] operator[SEP] identifier[add] operator[SEP] identifier[cluster] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[clusterList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[result] operator[SEP] identifier[ok] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[Fork] operator[<] identifier[Integer] , identifier[Integer] operator[>] identifier[fork] operator[=] identifier[result] operator[SEP] identifier[fork] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[clusterList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[ClusterHeartbeat] identifier[cluster] operator[=] identifier[clusterList] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[startCluster] operator[SEP] identifier[cluster] , identifier[consumer] , identifier[fork] operator[SEP] identifier[branch] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[fork] operator[SEP] identifier[fail] operator[SEP] operator[SEP] identifier[v] , identifier[f] , identifier[r] operator[SEP] operator[->] identifier[addInt] operator[SEP] identifier[v] , identifier[f] , identifier[r] operator[SEP] operator[SEP] operator[SEP] identifier[fork] operator[SEP] identifier[join] operator[SEP] operator[SEP] identifier[v] , identifier[r] operator[SEP] operator[->] identifier[addInt] operator[SEP] identifier[v] , Other[null] , identifier[r] operator[SEP] operator[SEP] operator[SEP] }
@NotNull public LongStream filterIndexed(int from, int step, @NotNull IndexedLongPredicate predicate) { return new LongStream(params, new LongFilterIndexed( new PrimitiveIndexedIterator.OfLong(from, step, iterator), predicate)); }
class class_name[name] begin[{] method[filterIndexed, return_type[type[LongStream]], modifier[public], parameter[from, step, predicate]] begin[{] return[ClassCreator(arguments=[MemberReference(member=params, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=from, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=step, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=iterator, 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=PrimitiveIndexedIterator, sub_type=ReferenceType(arguments=None, dimensions=None, name=OfLong, sub_type=None))), MemberReference(member=predicate, 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=LongFilterIndexed, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LongStream, sub_type=None))] end[}] END[}]
annotation[@] identifier[NotNull] Keyword[public] identifier[LongStream] identifier[filterIndexed] operator[SEP] Keyword[int] identifier[from] , Keyword[int] identifier[step] , annotation[@] identifier[NotNull] identifier[IndexedLongPredicate] identifier[predicate] operator[SEP] { Keyword[return] Keyword[new] identifier[LongStream] operator[SEP] identifier[params] , Keyword[new] identifier[LongFilterIndexed] operator[SEP] Keyword[new] identifier[PrimitiveIndexedIterator] operator[SEP] identifier[OfLong] operator[SEP] identifier[from] , identifier[step] , identifier[iterator] operator[SEP] , identifier[predicate] operator[SEP] operator[SEP] operator[SEP] }
public void marshall(Credentials credentials, ProtocolMarshaller protocolMarshaller) { if (credentials == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(credentials.getAccessToken(), ACCESSTOKEN_BINDING); protocolMarshaller.marshall(credentials.getAccessTokenExpiration(), ACCESSTOKENEXPIRATION_BINDING); protocolMarshaller.marshall(credentials.getRefreshToken(), REFRESHTOKEN_BINDING); protocolMarshaller.marshall(credentials.getRefreshTokenExpiration(), REFRESHTOKENEXPIRATION_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[credentials, protocolMarshaller]] begin[{] if[binary_operation[member[.credentials], ==, 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=getAccessToken, postfix_operators=[], prefix_operators=[], qualifier=credentials, selectors=[], type_arguments=None), MemberReference(member=ACCESSTOKEN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAccessTokenExpiration, postfix_operators=[], prefix_operators=[], qualifier=credentials, selectors=[], type_arguments=None), MemberReference(member=ACCESSTOKENEXPIRATION_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getRefreshToken, postfix_operators=[], prefix_operators=[], qualifier=credentials, selectors=[], type_arguments=None), MemberReference(member=REFRESHTOKEN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getRefreshTokenExpiration, postfix_operators=[], prefix_operators=[], qualifier=credentials, selectors=[], type_arguments=None), MemberReference(member=REFRESHTOKENEXPIRATION_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[Credentials] identifier[credentials] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[credentials] 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[credentials] operator[SEP] identifier[getAccessToken] operator[SEP] operator[SEP] , identifier[ACCESSTOKEN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[credentials] operator[SEP] identifier[getAccessTokenExpiration] operator[SEP] operator[SEP] , identifier[ACCESSTOKENEXPIRATION_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[credentials] operator[SEP] identifier[getRefreshToken] operator[SEP] operator[SEP] , identifier[REFRESHTOKEN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[credentials] operator[SEP] identifier[getRefreshTokenExpiration] operator[SEP] operator[SEP] , identifier[REFRESHTOKENEXPIRATION_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 Observable<ApplicationInsightsComponentAPIKeyInner> getAsync(String resourceGroupName, String resourceName, String keyId) { return getWithServiceResponseAsync(resourceGroupName, resourceName, keyId).map(new Func1<ServiceResponse<ApplicationInsightsComponentAPIKeyInner>, ApplicationInsightsComponentAPIKeyInner>() { @Override public ApplicationInsightsComponentAPIKeyInner call(ServiceResponse<ApplicationInsightsComponentAPIKeyInner> response) { return response.body(); } }); }
class class_name[name] begin[{] method[getAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, resourceName, keyId]] begin[{] return[call[.getWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.resourceName], member[.keyId]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[ApplicationInsightsComponentAPIKeyInner] operator[>] identifier[getAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[resourceName] , identifier[String] identifier[keyId] operator[SEP] { Keyword[return] identifier[getWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[resourceName] , identifier[keyId] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[ApplicationInsightsComponentAPIKeyInner] operator[>] , identifier[ApplicationInsightsComponentAPIKeyInner] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[ApplicationInsightsComponentAPIKeyInner] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[ApplicationInsightsComponentAPIKeyInner] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
protected FlushStrategy elementAsFlushStrategy(XMLStreamReader reader, Map<String, String> expressions) throws XMLStreamException, ParserException { String elementtext = rawElementText(reader); if (expressions != null && elementtext != null && elementtext.indexOf("${") != -1) expressions.put(CommonXML.ELEMENT_FLUSH_STRATEGY, elementtext); FlushStrategy result = FlushStrategy.forName(getSubstitutionValue(elementtext)); if (result != FlushStrategy.UNKNOWN) return result; throw new ParserException(bundle.notValidFlushStrategy(elementtext)); }
class class_name[name] begin[{] method[elementAsFlushStrategy, return_type[type[FlushStrategy]], modifier[protected], parameter[reader, expressions]] begin[{] local_variable[type[String], elementtext] if[binary_operation[binary_operation[binary_operation[member[.expressions], !=, literal[null]], &&, binary_operation[member[.elementtext], !=, literal[null]]], &&, binary_operation[call[elementtext.indexOf, parameter[literal["${"]]], !=, literal[1]]]] begin[{] call[expressions.put, parameter[member[CommonXML.ELEMENT_FLUSH_STRATEGY], member[.elementtext]]] else begin[{] None end[}] local_variable[type[FlushStrategy], result] if[binary_operation[member[.result], !=, member[FlushStrategy.UNKNOWN]]] begin[{] return[member[.result]] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=elementtext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=notValidFlushStrategy, postfix_operators=[], prefix_operators=[], qualifier=bundle, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ParserException, sub_type=None)), label=None) end[}] END[}]
Keyword[protected] identifier[FlushStrategy] identifier[elementAsFlushStrategy] operator[SEP] identifier[XMLStreamReader] identifier[reader] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[expressions] operator[SEP] Keyword[throws] identifier[XMLStreamException] , identifier[ParserException] { identifier[String] identifier[elementtext] operator[=] identifier[rawElementText] operator[SEP] identifier[reader] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[expressions] operator[!=] Other[null] operator[&&] identifier[elementtext] operator[!=] Other[null] operator[&&] identifier[elementtext] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[!=] operator[-] Other[1] operator[SEP] identifier[expressions] operator[SEP] identifier[put] operator[SEP] identifier[CommonXML] operator[SEP] identifier[ELEMENT_FLUSH_STRATEGY] , identifier[elementtext] operator[SEP] operator[SEP] identifier[FlushStrategy] identifier[result] operator[=] identifier[FlushStrategy] operator[SEP] identifier[forName] operator[SEP] identifier[getSubstitutionValue] operator[SEP] identifier[elementtext] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[!=] identifier[FlushStrategy] operator[SEP] identifier[UNKNOWN] operator[SEP] Keyword[return] identifier[result] operator[SEP] Keyword[throw] Keyword[new] identifier[ParserException] operator[SEP] identifier[bundle] operator[SEP] identifier[notValidFlushStrategy] operator[SEP] identifier[elementtext] operator[SEP] operator[SEP] operator[SEP] }
public void marshall(GatewaySummary gatewaySummary, ProtocolMarshaller protocolMarshaller) { if (gatewaySummary == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(gatewaySummary.getArn(), ARN_BINDING); protocolMarshaller.marshall(gatewaySummary.getName(), NAME_BINDING); protocolMarshaller.marshall(gatewaySummary.getDescription(), DESCRIPTION_BINDING); protocolMarshaller.marshall(gatewaySummary.getGatewayGroupArn(), GATEWAYGROUPARN_BINDING); protocolMarshaller.marshall(gatewaySummary.getSoftwareVersion(), SOFTWAREVERSION_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[gatewaySummary, protocolMarshaller]] begin[{] if[binary_operation[member[.gatewaySummary], ==, 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=getArn, postfix_operators=[], prefix_operators=[], qualifier=gatewaySummary, selectors=[], type_arguments=None), MemberReference(member=ARN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=gatewaySummary, selectors=[], type_arguments=None), MemberReference(member=NAME_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDescription, postfix_operators=[], prefix_operators=[], qualifier=gatewaySummary, selectors=[], type_arguments=None), MemberReference(member=DESCRIPTION_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getGatewayGroupArn, postfix_operators=[], prefix_operators=[], qualifier=gatewaySummary, selectors=[], type_arguments=None), MemberReference(member=GATEWAYGROUPARN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSoftwareVersion, postfix_operators=[], prefix_operators=[], qualifier=gatewaySummary, selectors=[], type_arguments=None), MemberReference(member=SOFTWAREVERSION_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[GatewaySummary] identifier[gatewaySummary] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[gatewaySummary] 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[gatewaySummary] operator[SEP] identifier[getArn] operator[SEP] operator[SEP] , identifier[ARN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[gatewaySummary] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[NAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[gatewaySummary] operator[SEP] identifier[getDescription] operator[SEP] operator[SEP] , identifier[DESCRIPTION_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[gatewaySummary] operator[SEP] identifier[getGatewayGroupArn] operator[SEP] operator[SEP] , identifier[GATEWAYGROUPARN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[gatewaySummary] operator[SEP] identifier[getSoftwareVersion] operator[SEP] operator[SEP] , identifier[SOFTWAREVERSION_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public void stopStoppableSession () { //471642 if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "stopStoppableSession"); stoppableSessionStopped = true; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "stopStoppableSession"); }
class class_name[name] begin[{] method[stopStoppableSession, return_type[void], modifier[public], parameter[]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[THIS[], member[.tc], literal["stopStoppableSession"]]] else begin[{] None end[}] assign[member[.stoppableSessionStopped], literal[true]] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[THIS[], member[.tc], literal["stopStoppableSession"]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[stopStoppableSession] 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[entry] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] identifier[stoppableSessionStopped] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] }
public static List<String> asListLines(String content) { List<String> retorno = new ArrayList<String>(); content = content.replace(CARRIAGE_RETURN, RETURN); content = content.replace(RETURN, CARRIAGE_RETURN); for (String str : content.split(CARRIAGE_RETURN)) { retorno.add(str); } return retorno; }
class class_name[name] begin[{] method[asListLines, return_type[type[List]], modifier[public static], parameter[content]] begin[{] local_variable[type[List], retorno] assign[member[.content], call[content.replace, parameter[member[.CARRIAGE_RETURN], member[.RETURN]]]] assign[member[.content], call[content.replace, parameter[member[.RETURN], member[.CARRIAGE_RETURN]]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=str, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=retorno, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=CARRIAGE_RETURN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=split, postfix_operators=[], prefix_operators=[], qualifier=content, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=str)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[member[.retorno]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[String] operator[>] identifier[asListLines] operator[SEP] identifier[String] identifier[content] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[retorno] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[content] operator[=] identifier[content] operator[SEP] identifier[replace] operator[SEP] identifier[CARRIAGE_RETURN] , identifier[RETURN] operator[SEP] operator[SEP] identifier[content] operator[=] identifier[content] operator[SEP] identifier[replace] operator[SEP] identifier[RETURN] , identifier[CARRIAGE_RETURN] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[str] operator[:] identifier[content] operator[SEP] identifier[split] operator[SEP] identifier[CARRIAGE_RETURN] operator[SEP] operator[SEP] { identifier[retorno] operator[SEP] identifier[add] operator[SEP] identifier[str] operator[SEP] operator[SEP] } Keyword[return] identifier[retorno] operator[SEP] }
private FeatureInfo getFeatureInfo(String name, Map<String, ProductInfo> productInfos, Map<String, FeatureInfo> featuresBySymbolicName) { String productName, featureName; int index = name.indexOf(':'); if (index == -1) { FeatureInfo featureInfo = featuresBySymbolicName.get(name); if (featureInfo != null) { return featureInfo; } productName = ManifestFileProcessor.CORE_PRODUCT_NAME; featureName = name; } else { productName = name.substring(0, index); featureName = name.substring(index + 1); } ProductInfo product = productInfos.get(productName); return product == null ? null : product.featuresByShortName.get(featureName); }
class class_name[name] begin[{] method[getFeatureInfo, return_type[type[FeatureInfo]], modifier[private], parameter[name, productInfos, featuresBySymbolicName]] begin[{] local_variable[type[String], productName] local_variable[type[int], index] if[binary_operation[member[.index], ==, literal[1]]] begin[{] local_variable[type[FeatureInfo], featureInfo] if[binary_operation[member[.featureInfo], !=, literal[null]]] begin[{] return[member[.featureInfo]] else begin[{] None end[}] assign[member[.productName], member[ManifestFileProcessor.CORE_PRODUCT_NAME]] assign[member[.featureName], member[.name]] else begin[{] assign[member[.productName], call[name.substring, parameter[literal[0], member[.index]]]] assign[member[.featureName], call[name.substring, parameter[binary_operation[member[.index], +, literal[1]]]]] end[}] local_variable[type[ProductInfo], product] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=product, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[MemberReference(member=featureName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=product.featuresByShortName, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))] end[}] END[}]
Keyword[private] identifier[FeatureInfo] identifier[getFeatureInfo] operator[SEP] identifier[String] identifier[name] , identifier[Map] operator[<] identifier[String] , identifier[ProductInfo] operator[>] identifier[productInfos] , identifier[Map] operator[<] identifier[String] , identifier[FeatureInfo] operator[>] identifier[featuresBySymbolicName] operator[SEP] { identifier[String] identifier[productName] , identifier[featureName] operator[SEP] Keyword[int] identifier[index] operator[=] identifier[name] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[index] operator[==] operator[-] Other[1] operator[SEP] { identifier[FeatureInfo] identifier[featureInfo] operator[=] identifier[featuresBySymbolicName] operator[SEP] identifier[get] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[featureInfo] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[featureInfo] operator[SEP] } identifier[productName] operator[=] identifier[ManifestFileProcessor] operator[SEP] identifier[CORE_PRODUCT_NAME] operator[SEP] identifier[featureName] operator[=] identifier[name] operator[SEP] } Keyword[else] { identifier[productName] operator[=] identifier[name] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[index] operator[SEP] operator[SEP] identifier[featureName] operator[=] identifier[name] operator[SEP] identifier[substring] operator[SEP] identifier[index] operator[+] Other[1] operator[SEP] operator[SEP] } identifier[ProductInfo] identifier[product] operator[=] identifier[productInfos] operator[SEP] identifier[get] operator[SEP] identifier[productName] operator[SEP] operator[SEP] Keyword[return] identifier[product] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[product] operator[SEP] identifier[featuresByShortName] operator[SEP] identifier[get] operator[SEP] identifier[featureName] operator[SEP] operator[SEP] }
private OAuthServiceEntity filterByEndpoint(OAuthServiceEntity entity, final String redirectUri) { if (entity != null) { if (redirectUri == null) return entity; // If there's no redirectUri supplied then allow it // N.B. database can have \r\n so we need to normalise this final List<String> endpoints = Arrays .stream(StringUtils .trimToEmpty(entity.getEndpoints()) .replace('\r', '\n') .split("\n")).map(StringUtils:: trimToEmpty) .filter(s -> s.length() > 0) .collect(Collectors.toList()); if (log.isDebugEnabled()) log.debug("Check endpoint " + redirectUri + " against " + Arrays.asList(endpoints)); // Now check if the redirectUri matches any of the registered endpoints // N.B. don't allow arbitrary startsWith (security issue if the redirectUri can be pointed at a resource in the app that redirects elsewhere) for (String endpoint : endpoints) { if (StringUtils.equals(endpoint, redirectUri)) { if (log.isDebugEnabled()) log.debug("Exact match to endpoint: " + endpoint); return entity; // exact match } else { // Allow database to hold a base service endpoint and for the client to supply the oauth2 callback resource of that service final String withCallbackEndpointAdded = endpoint + (endpoint.endsWith("/") ? "" : "/") + "oauth2/client/cb"; if (StringUtils.equals(withCallbackEndpointAdded, redirectUri)) { if (log.isDebugEnabled()) log.debug("Match to endpoint with added /oauth2/client/cb suffix: " + endpoint); return entity; } } } } // Default: no match found return null; }
class class_name[name] begin[{] method[filterByEndpoint, return_type[type[OAuthServiceEntity]], modifier[private], parameter[entity, redirectUri]] begin[{] if[binary_operation[member[.entity], !=, literal[null]]] begin[{] if[binary_operation[member[.redirectUri], ==, literal[null]]] begin[{] return[member[.entity]] else begin[{] None end[}] local_variable[type[List], endpoints] if[call[log.isDebugEnabled, parameter[]]] begin[{] call[log.debug, parameter[binary_operation[binary_operation[binary_operation[literal["Check endpoint "], +, member[.redirectUri]], +, literal[" against "]], +, call[Arrays.asList, parameter[member[.endpoints]]]]]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=endpoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=redirectUri, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=StringUtils, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=endpoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=TernaryExpression(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/")], member=endsWith, postfix_operators=[], prefix_operators=[], qualifier=endpoint, selectors=[], type_arguments=None), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/"), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="oauth2/client/cb"), operator=+), name=withCallbackEndpointAdded)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=withCallbackEndpointAdded, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=redirectUri, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=StringUtils, selectors=[], type_arguments=None), else_statement=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=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Match to endpoint with added /oauth2/client/cb suffix: "), operandr=MemberReference(member=endpoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)), ReturnStatement(expression=MemberReference(member=entity, 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=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Exact match to endpoint: "), operandr=MemberReference(member=endpoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)), ReturnStatement(expression=MemberReference(member=entity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=endpoints, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=endpoint)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[private] identifier[OAuthServiceEntity] identifier[filterByEndpoint] operator[SEP] identifier[OAuthServiceEntity] identifier[entity] , Keyword[final] identifier[String] identifier[redirectUri] operator[SEP] { Keyword[if] operator[SEP] identifier[entity] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[redirectUri] operator[==] Other[null] operator[SEP] Keyword[return] identifier[entity] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[endpoints] operator[=] identifier[Arrays] operator[SEP] identifier[stream] operator[SEP] identifier[StringUtils] operator[SEP] identifier[trimToEmpty] operator[SEP] identifier[entity] operator[SEP] identifier[getEndpoints] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[StringUtils] operator[::] identifier[trimToEmpty] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[s] operator[->] identifier[s] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[toList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[redirectUri] operator[+] literal[String] operator[+] identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[endpoints] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[endpoint] operator[:] identifier[endpoints] operator[SEP] { Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[equals] operator[SEP] identifier[endpoint] , identifier[redirectUri] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[endpoint] operator[SEP] operator[SEP] Keyword[return] identifier[entity] operator[SEP] } Keyword[else] { Keyword[final] identifier[String] identifier[withCallbackEndpointAdded] operator[=] identifier[endpoint] operator[+] operator[SEP] identifier[endpoint] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[?] literal[String] operator[:] literal[String] operator[SEP] operator[+] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[equals] operator[SEP] identifier[withCallbackEndpointAdded] , identifier[redirectUri] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[endpoint] operator[SEP] operator[SEP] Keyword[return] identifier[entity] operator[SEP] } } } } Keyword[return] Other[null] operator[SEP] }
public NotifMessagesResponse getMessages(String notifId, Integer offset, Integer count, String order) throws ApiException { ApiResponse<NotifMessagesResponse> resp = getMessagesWithHttpInfo(notifId, offset, count, order); return resp.getData(); }
class class_name[name] begin[{] method[getMessages, return_type[type[NotifMessagesResponse]], modifier[public], parameter[notifId, offset, count, order]] begin[{] local_variable[type[ApiResponse], resp] return[call[resp.getData, parameter[]]] end[}] END[}]
Keyword[public] identifier[NotifMessagesResponse] identifier[getMessages] operator[SEP] identifier[String] identifier[notifId] , identifier[Integer] identifier[offset] , identifier[Integer] identifier[count] , identifier[String] identifier[order] operator[SEP] Keyword[throws] identifier[ApiException] { identifier[ApiResponse] operator[<] identifier[NotifMessagesResponse] operator[>] identifier[resp] operator[=] identifier[getMessagesWithHttpInfo] operator[SEP] identifier[notifId] , identifier[offset] , identifier[count] , identifier[order] operator[SEP] operator[SEP] Keyword[return] identifier[resp] operator[SEP] identifier[getData] operator[SEP] operator[SEP] operator[SEP] }
public UserInterfaceAction<IconLocationType> create(String label, String description, String keyboardShortcut, IconLocationType iconForMenu, IconLocationType iconForButton, Locale locale, Functor callback) throws FactoryNotReadyException { checkIfReady(); UserInterfaceAction<IconLocationType> _action = new AdaptedAction<IconLocationType>(callback, myMessageProvider, myIconProvider); _action.setLabelMessage(label); _action.setLabelDescription(description); _action.setKeyboardShortcut(keyboardShortcut); _action.setIconForMenu(iconForMenu); _action.setIconForButton(iconForButton); _action.setLocale(locale); return _action; }
class class_name[name] begin[{] method[create, return_type[type[UserInterfaceAction]], modifier[public], parameter[label, description, keyboardShortcut, iconForMenu, iconForButton, locale, callback]] begin[{] call[.checkIfReady, parameter[]] local_variable[type[UserInterfaceAction], _action] call[_action.setLabelMessage, parameter[member[.label]]] call[_action.setLabelDescription, parameter[member[.description]]] call[_action.setKeyboardShortcut, parameter[member[.keyboardShortcut]]] call[_action.setIconForMenu, parameter[member[.iconForMenu]]] call[_action.setIconForButton, parameter[member[.iconForButton]]] call[_action.setLocale, parameter[member[.locale]]] return[member[._action]] end[}] END[}]
Keyword[public] identifier[UserInterfaceAction] operator[<] identifier[IconLocationType] operator[>] identifier[create] operator[SEP] identifier[String] identifier[label] , identifier[String] identifier[description] , identifier[String] identifier[keyboardShortcut] , identifier[IconLocationType] identifier[iconForMenu] , identifier[IconLocationType] identifier[iconForButton] , identifier[Locale] identifier[locale] , identifier[Functor] identifier[callback] operator[SEP] Keyword[throws] identifier[FactoryNotReadyException] { identifier[checkIfReady] operator[SEP] operator[SEP] operator[SEP] identifier[UserInterfaceAction] operator[<] identifier[IconLocationType] operator[>] identifier[_action] operator[=] Keyword[new] identifier[AdaptedAction] operator[<] identifier[IconLocationType] operator[>] operator[SEP] identifier[callback] , identifier[myMessageProvider] , identifier[myIconProvider] operator[SEP] operator[SEP] identifier[_action] operator[SEP] identifier[setLabelMessage] operator[SEP] identifier[label] operator[SEP] operator[SEP] identifier[_action] operator[SEP] identifier[setLabelDescription] operator[SEP] identifier[description] operator[SEP] operator[SEP] identifier[_action] operator[SEP] identifier[setKeyboardShortcut] operator[SEP] identifier[keyboardShortcut] operator[SEP] operator[SEP] identifier[_action] operator[SEP] identifier[setIconForMenu] operator[SEP] identifier[iconForMenu] operator[SEP] operator[SEP] identifier[_action] operator[SEP] identifier[setIconForButton] operator[SEP] identifier[iconForButton] operator[SEP] operator[SEP] identifier[_action] operator[SEP] identifier[setLocale] operator[SEP] identifier[locale] operator[SEP] operator[SEP] Keyword[return] identifier[_action] operator[SEP] }
public Disjunction add( IDisjunct disjunct) { for( Iterator<IAssertion> assertions = disjunct.getAssertions(); assertions.hasNext();) { add( assertions.next()); } return this; }
class class_name[name] begin[{] method[add, return_type[type[Disjunction]], modifier[public], parameter[disjunct]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=assertions, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=assertions, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=getAssertions, postfix_operators=[], prefix_operators=[], qualifier=disjunct, selectors=[], type_arguments=None), name=assertions)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=IAssertion, sub_type=None))], dimensions=[], name=Iterator, sub_type=None)), update=None), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[Disjunction] identifier[add] operator[SEP] identifier[IDisjunct] identifier[disjunct] operator[SEP] { Keyword[for] operator[SEP] identifier[Iterator] operator[<] identifier[IAssertion] operator[>] identifier[assertions] operator[=] identifier[disjunct] operator[SEP] identifier[getAssertions] operator[SEP] operator[SEP] operator[SEP] identifier[assertions] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[add] operator[SEP] identifier[assertions] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public HollowHashIndexResult findMatches(Object... query) { int hashCode = 0; for(int i=0;i<query.length;i++) { if(query[i] == null) throw new IllegalArgumentException("querying by null unsupported; i=" + i); hashCode ^= HashCodes.hashInt(keyHashCode(query[i], i)); } HollowHashIndexResult result; HollowHashIndexState hashState; do { result = null; hashState = hashStateVolatile; long bucket = hashCode & hashState.getMatchHashMask(); long hashBucketBit = bucket * hashState.getBitsPerMatchHashEntry(); boolean bucketIsEmpty = hashState.getMatchHashTable().getElementValue(hashBucketBit, hashState.getBitsPerTraverserField()[0]) == 0; while (!bucketIsEmpty) { if (matchIsEqual(hashState.getMatchHashTable(), hashBucketBit, query)) { int selectSize = (int) hashState.getMatchHashTable().getElementValue(hashBucketBit + hashState.getBitsPerMatchHashKey(), hashState.getBitsPerSelectTableSize()); long selectBucketPointer = hashState.getMatchHashTable().getElementValue(hashBucketBit + hashState.getBitsPerMatchHashKey() + hashState.getBitsPerSelectTableSize(), hashState.getBitsPerSelectTablePointer()); result = new HollowHashIndexResult(hashState, selectBucketPointer, selectSize); break; } bucket = (bucket + 1) & hashState.getMatchHashMask(); hashBucketBit = bucket * hashState.getBitsPerMatchHashEntry(); bucketIsEmpty = hashState.getMatchHashTable().getElementValue(hashBucketBit, hashState.getBitsPerTraverserField()[0]) == 0; } } while (hashState != hashStateVolatile); return result; }
class class_name[name] begin[{] method[findMatches, return_type[type[HollowHashIndexResult]], modifier[public], parameter[query]] begin[{] local_variable[type[int], hashCode] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=query, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="querying by null unsupported; i="), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=hashCode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=^=, value=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=query, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=keyHashCode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=hashInt, postfix_operators=[], prefix_operators=[], qualifier=HashCodes, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=query, 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) local_variable[type[HollowHashIndexResult], result] local_variable[type[HollowHashIndexState], hashState] do[binary_operation[member[.hashState], !=, member[.hashStateVolatile]]] begin[{] assign[member[.result], literal[null]] assign[member[.hashState], member[.hashStateVolatile]] local_variable[type[long], bucket] local_variable[type[long], hashBucketBit] local_variable[type[boolean], bucketIsEmpty] while[member[.bucketIsEmpty]] begin[{] if[call[.matchIsEqual, parameter[call[hashState.getMatchHashTable, parameter[]], member[.hashBucketBit], member[.query]]]] begin[{] local_variable[type[int], selectSize] local_variable[type[long], selectBucketPointer] assign[member[.result], ClassCreator(arguments=[MemberReference(member=hashState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=selectBucketPointer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=selectSize, 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=HollowHashIndexResult, sub_type=None))] BreakStatement(goto=None, label=None) else begin[{] None end[}] assign[member[.bucket], binary_operation[binary_operation[member[.bucket], +, literal[1]], &, call[hashState.getMatchHashMask, parameter[]]]] assign[member[.hashBucketBit], binary_operation[member[.bucket], *, call[hashState.getBitsPerMatchHashEntry, parameter[]]]] assign[member[.bucketIsEmpty], binary_operation[call[hashState.getMatchHashTable, parameter[]], ==, literal[0]]] end[}] end[}] return[member[.result]] end[}] END[}]
Keyword[public] identifier[HollowHashIndexResult] identifier[findMatches] operator[SEP] identifier[Object] operator[...] identifier[query] operator[SEP] { Keyword[int] identifier[hashCode] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[query] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[query] operator[SEP] identifier[i] operator[SEP] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[i] operator[SEP] operator[SEP] identifier[hashCode] operator[^=] identifier[HashCodes] operator[SEP] identifier[hashInt] operator[SEP] identifier[keyHashCode] operator[SEP] identifier[query] operator[SEP] identifier[i] operator[SEP] , identifier[i] operator[SEP] operator[SEP] operator[SEP] } identifier[HollowHashIndexResult] identifier[result] operator[SEP] identifier[HollowHashIndexState] identifier[hashState] operator[SEP] Keyword[do] { identifier[result] operator[=] Other[null] operator[SEP] identifier[hashState] operator[=] identifier[hashStateVolatile] operator[SEP] Keyword[long] identifier[bucket] operator[=] identifier[hashCode] operator[&] identifier[hashState] operator[SEP] identifier[getMatchHashMask] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[hashBucketBit] operator[=] identifier[bucket] operator[*] identifier[hashState] operator[SEP] identifier[getBitsPerMatchHashEntry] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[bucketIsEmpty] operator[=] identifier[hashState] operator[SEP] identifier[getMatchHashTable] operator[SEP] operator[SEP] operator[SEP] identifier[getElementValue] operator[SEP] identifier[hashBucketBit] , identifier[hashState] operator[SEP] identifier[getBitsPerTraverserField] operator[SEP] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] Keyword[while] operator[SEP] operator[!] identifier[bucketIsEmpty] operator[SEP] { Keyword[if] operator[SEP] identifier[matchIsEqual] operator[SEP] identifier[hashState] operator[SEP] identifier[getMatchHashTable] operator[SEP] operator[SEP] , identifier[hashBucketBit] , identifier[query] operator[SEP] operator[SEP] { Keyword[int] identifier[selectSize] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[hashState] operator[SEP] identifier[getMatchHashTable] operator[SEP] operator[SEP] operator[SEP] identifier[getElementValue] operator[SEP] identifier[hashBucketBit] operator[+] identifier[hashState] operator[SEP] identifier[getBitsPerMatchHashKey] operator[SEP] operator[SEP] , identifier[hashState] operator[SEP] identifier[getBitsPerSelectTableSize] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[selectBucketPointer] operator[=] identifier[hashState] operator[SEP] identifier[getMatchHashTable] operator[SEP] operator[SEP] operator[SEP] identifier[getElementValue] operator[SEP] identifier[hashBucketBit] operator[+] identifier[hashState] operator[SEP] identifier[getBitsPerMatchHashKey] operator[SEP] operator[SEP] operator[+] identifier[hashState] operator[SEP] identifier[getBitsPerSelectTableSize] operator[SEP] operator[SEP] , identifier[hashState] operator[SEP] identifier[getBitsPerSelectTablePointer] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[=] Keyword[new] identifier[HollowHashIndexResult] operator[SEP] identifier[hashState] , identifier[selectBucketPointer] , identifier[selectSize] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } identifier[bucket] operator[=] operator[SEP] identifier[bucket] operator[+] Other[1] operator[SEP] operator[&] identifier[hashState] operator[SEP] identifier[getMatchHashMask] operator[SEP] operator[SEP] operator[SEP] identifier[hashBucketBit] operator[=] identifier[bucket] operator[*] identifier[hashState] operator[SEP] identifier[getBitsPerMatchHashEntry] operator[SEP] operator[SEP] operator[SEP] identifier[bucketIsEmpty] operator[=] identifier[hashState] operator[SEP] identifier[getMatchHashTable] operator[SEP] operator[SEP] operator[SEP] identifier[getElementValue] operator[SEP] identifier[hashBucketBit] , identifier[hashState] operator[SEP] identifier[getBitsPerTraverserField] operator[SEP] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] } } Keyword[while] operator[SEP] identifier[hashState] operator[!=] identifier[hashStateVolatile] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
@Override public StringBuffer format(BigInteger number, StringBuffer toAppendTo, FieldPosition pos) { return format(new android.icu.math.BigDecimal(number), toAppendTo, pos); }
class class_name[name] begin[{] method[format, return_type[type[StringBuffer]], modifier[public], parameter[number, toAppendTo, pos]] begin[{] return[call[.format, parameter[ClassCreator(arguments=[MemberReference(member=number, 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=android, sub_type=ReferenceType(arguments=None, dimensions=None, name=icu, sub_type=ReferenceType(arguments=None, dimensions=None, name=math, sub_type=ReferenceType(arguments=None, dimensions=None, name=BigDecimal, sub_type=None))))), member[.toAppendTo], member[.pos]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[StringBuffer] identifier[format] operator[SEP] identifier[BigInteger] identifier[number] , identifier[StringBuffer] identifier[toAppendTo] , identifier[FieldPosition] identifier[pos] operator[SEP] { Keyword[return] identifier[format] operator[SEP] Keyword[new] identifier[android] operator[SEP] identifier[icu] operator[SEP] identifier[math] operator[SEP] identifier[BigDecimal] operator[SEP] identifier[number] operator[SEP] , identifier[toAppendTo] , identifier[pos] operator[SEP] operator[SEP] }
public CoreLabel makeToken(String tokenText, int begin, int length) { return makeToken(tokenText, tokenText, begin, length); }
class class_name[name] begin[{] method[makeToken, return_type[type[CoreLabel]], modifier[public], parameter[tokenText, begin, length]] begin[{] return[call[.makeToken, parameter[member[.tokenText], member[.tokenText], member[.begin], member[.length]]]] end[}] END[}]
Keyword[public] identifier[CoreLabel] identifier[makeToken] operator[SEP] identifier[String] identifier[tokenText] , Keyword[int] identifier[begin] , Keyword[int] identifier[length] operator[SEP] { Keyword[return] identifier[makeToken] operator[SEP] identifier[tokenText] , identifier[tokenText] , identifier[begin] , identifier[length] operator[SEP] operator[SEP] }
public void init(ServletConfig config) throws ServletException { super.init(config); mServletConfig = config; config.getServletContext().log("Initializing TeaServlet..."); String ver = System.getProperty("java.version"); if (ver.startsWith("0.") || ver.startsWith("1.2") || ver.startsWith("1.3")) { config.getServletContext() .log("The TeaServlet requires Java 1.4 or higher to run properly"); } mServletContext = setServletContext(config); mServletName = setServletName(config); mProperties = new PropertyMap(); mSubstitutions = SubstitutionFactory.getDefaults(); mResourceFactory = new TeaServletResourceFactory(config.getServletContext(), mSubstitutions); Enumeration<?> e = config.getInitParameterNames(); while (e.hasMoreElements()) { String key = (String) e.nextElement(); String value = SubstitutionFactory.substitute(config.getInitParameter(key)); if (key.equals("debug")) { mDebugEnabled = Boolean.parseBoolean(value); continue; } mProperties.put(key, value); } loadDefaults(); discoverProperties(); createListeners(); createLog(mServletContext); mLog.applyProperties(mProperties.subMap("log")); createMemoryLog(mLog); mInstrumentationEnabled = mProperties.getBoolean("instrumentation.enabled", true); Initializer initializer = new Initializer(); if (mProperties.getBoolean("startup.background", false)) { mInitializer = Executors.newSingleThreadExecutor().submit(initializer); } else { initializer.call(); } }
class class_name[name] begin[{] method[init, return_type[void], modifier[public], parameter[config]] begin[{] SuperMethodInvocation(arguments=[MemberReference(member=config, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=init, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) assign[member[.mServletConfig], member[.config]] call[config.getServletContext, parameter[]] local_variable[type[String], ver] if[binary_operation[binary_operation[call[ver.startsWith, parameter[literal["0."]]], ||, call[ver.startsWith, parameter[literal["1.2"]]]], ||, call[ver.startsWith, parameter[literal["1.3"]]]]] begin[{] call[config.getServletContext, parameter[]] else begin[{] None end[}] assign[member[.mServletContext], call[.setServletContext, parameter[member[.config]]]] assign[member[.mServletName], call[.setServletName, parameter[member[.config]]]] assign[member[.mProperties], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PropertyMap, sub_type=None))] assign[member[.mSubstitutions], call[SubstitutionFactory.getDefaults, parameter[]]] assign[member[.mResourceFactory], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getServletContext, postfix_operators=[], prefix_operators=[], qualifier=config, selectors=[], type_arguments=None), MemberReference(member=mSubstitutions, 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=TeaServletResourceFactory, sub_type=None))] local_variable[type[Enumeration], e] while[call[e.hasMoreElements, parameter[]]] begin[{] local_variable[type[String], key] local_variable[type[String], value] if[call[key.equals, parameter[literal["debug"]]]] begin[{] assign[member[.mDebugEnabled], call[Boolean.parseBoolean, parameter[member[.value]]]] ContinueStatement(goto=None, label=None) else begin[{] None end[}] call[mProperties.put, parameter[member[.key], member[.value]]] end[}] call[.loadDefaults, parameter[]] call[.discoverProperties, parameter[]] call[.createListeners, parameter[]] call[.createLog, parameter[member[.mServletContext]]] call[mLog.applyProperties, parameter[call[mProperties.subMap, parameter[literal["log"]]]]] call[.createMemoryLog, parameter[member[.mLog]]] assign[member[.mInstrumentationEnabled], call[mProperties.getBoolean, parameter[literal["instrumentation.enabled"], literal[true]]]] local_variable[type[Initializer], initializer] if[call[mProperties.getBoolean, parameter[literal["startup.background"], literal[false]]]] begin[{] assign[member[.mInitializer], call[Executors.newSingleThreadExecutor, parameter[]]] else begin[{] call[initializer.call, parameter[]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[init] operator[SEP] identifier[ServletConfig] identifier[config] operator[SEP] Keyword[throws] identifier[ServletException] { Keyword[super] operator[SEP] identifier[init] operator[SEP] identifier[config] operator[SEP] operator[SEP] identifier[mServletConfig] operator[=] identifier[config] operator[SEP] identifier[config] operator[SEP] identifier[getServletContext] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[ver] operator[=] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ver] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[ver] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[ver] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[config] operator[SEP] identifier[getServletContext] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[mServletContext] operator[=] identifier[setServletContext] operator[SEP] identifier[config] operator[SEP] operator[SEP] identifier[mServletName] operator[=] identifier[setServletName] operator[SEP] identifier[config] operator[SEP] operator[SEP] identifier[mProperties] operator[=] Keyword[new] identifier[PropertyMap] operator[SEP] operator[SEP] operator[SEP] identifier[mSubstitutions] operator[=] identifier[SubstitutionFactory] operator[SEP] identifier[getDefaults] operator[SEP] operator[SEP] operator[SEP] identifier[mResourceFactory] operator[=] Keyword[new] identifier[TeaServletResourceFactory] operator[SEP] identifier[config] operator[SEP] identifier[getServletContext] operator[SEP] operator[SEP] , identifier[mSubstitutions] operator[SEP] operator[SEP] identifier[Enumeration] operator[<] operator[?] operator[>] identifier[e] operator[=] identifier[config] operator[SEP] identifier[getInitParameterNames] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[e] operator[SEP] identifier[hasMoreElements] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[key] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[e] operator[SEP] identifier[nextElement] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[value] operator[=] identifier[SubstitutionFactory] operator[SEP] identifier[substitute] operator[SEP] identifier[config] operator[SEP] identifier[getInitParameter] operator[SEP] identifier[key] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[key] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[mDebugEnabled] operator[=] identifier[Boolean] operator[SEP] identifier[parseBoolean] operator[SEP] identifier[value] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] } identifier[mProperties] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[value] operator[SEP] operator[SEP] } identifier[loadDefaults] operator[SEP] operator[SEP] operator[SEP] identifier[discoverProperties] operator[SEP] operator[SEP] operator[SEP] identifier[createListeners] operator[SEP] operator[SEP] operator[SEP] identifier[createLog] operator[SEP] identifier[mServletContext] operator[SEP] operator[SEP] identifier[mLog] operator[SEP] identifier[applyProperties] operator[SEP] identifier[mProperties] operator[SEP] identifier[subMap] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[createMemoryLog] operator[SEP] identifier[mLog] operator[SEP] operator[SEP] identifier[mInstrumentationEnabled] operator[=] identifier[mProperties] operator[SEP] identifier[getBoolean] operator[SEP] literal[String] , literal[boolean] operator[SEP] operator[SEP] identifier[Initializer] identifier[initializer] operator[=] Keyword[new] identifier[Initializer] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mProperties] operator[SEP] identifier[getBoolean] operator[SEP] literal[String] , literal[boolean] operator[SEP] operator[SEP] { identifier[mInitializer] operator[=] identifier[Executors] operator[SEP] identifier[newSingleThreadExecutor] operator[SEP] operator[SEP] operator[SEP] identifier[submit] operator[SEP] identifier[initializer] operator[SEP] operator[SEP] } Keyword[else] { identifier[initializer] operator[SEP] identifier[call] operator[SEP] operator[SEP] operator[SEP] } }
public static com.liferay.commerce.product.model.CPDefinitionLink createCPDefinitionLink( long CPDefinitionLinkId) { return getService().createCPDefinitionLink(CPDefinitionLinkId); }
class class_name[name] begin[{] method[createCPDefinitionLink, return_type[type[com]], modifier[public static], parameter[CPDefinitionLinkId]] begin[{] return[call[.getService, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[product] operator[SEP] identifier[model] operator[SEP] identifier[CPDefinitionLink] identifier[createCPDefinitionLink] operator[SEP] Keyword[long] identifier[CPDefinitionLinkId] operator[SEP] { Keyword[return] identifier[getService] operator[SEP] operator[SEP] operator[SEP] identifier[createCPDefinitionLink] operator[SEP] identifier[CPDefinitionLinkId] operator[SEP] operator[SEP] }
public LogBuilder append (Object... args) { if (args != null && args.length > 1) { for (int ii = 0, nn = args.length - (args.length % 2); ii < nn; ii += 2) { if (_hasArgs) { _log.append(", "); } else { if (_log.length() > 0) { // only need a space if we have a message _log.append(' '); } _log.append('['); _hasArgs = true; } _log.append(args[ii]).append('='); try { _log.append(StringUtil.toString(args[ii + 1])); } catch (Throwable t) { _log.append("<toString() failure: ").append(t).append('>'); } } } return this; }
class class_name[name] begin[{] method[append, return_type[type[LogBuilder]], modifier[public], parameter[args]] begin[{] if[binary_operation[binary_operation[member[.args], !=, literal[null]], &&, binary_operation[member[args.length], >, literal[1]]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=_hasArgs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=_log, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=' ')], member=append, postfix_operators=[], prefix_operators=[], qualifier=_log, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='[')], member=append, postfix_operators=[], prefix_operators=[], qualifier=_log, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=_hasArgs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=_log, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=ii, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=append, postfix_operators=[], prefix_operators=[], qualifier=_log, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='=')], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=ii, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=StringUtil, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=_log, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="<toString() failure: ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=_log, selectors=[MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='>')], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=None, label=None, resources=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=ii, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=nn, 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=ii), VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=args, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=args, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=%), operator=-), name=nn)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[Assignment(expressionl=MemberReference(member=ii, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2))]), label=None) else begin[{] None end[}] return[THIS[]] end[}] END[}]
Keyword[public] identifier[LogBuilder] identifier[append] operator[SEP] identifier[Object] operator[...] identifier[args] operator[SEP] { Keyword[if] operator[SEP] identifier[args] operator[!=] Other[null] operator[&&] identifier[args] operator[SEP] identifier[length] operator[>] Other[1] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[ii] operator[=] Other[0] , identifier[nn] operator[=] identifier[args] operator[SEP] identifier[length] operator[-] operator[SEP] identifier[args] operator[SEP] identifier[length] operator[%] Other[2] operator[SEP] operator[SEP] identifier[ii] operator[<] identifier[nn] operator[SEP] identifier[ii] operator[+=] Other[2] operator[SEP] { Keyword[if] operator[SEP] identifier[_hasArgs] operator[SEP] { identifier[_log] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[_log] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[_log] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[_log] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[_hasArgs] operator[=] literal[boolean] operator[SEP] } identifier[_log] operator[SEP] identifier[append] operator[SEP] identifier[args] operator[SEP] identifier[ii] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[try] { identifier[_log] operator[SEP] identifier[append] operator[SEP] identifier[StringUtil] operator[SEP] identifier[toString] operator[SEP] identifier[args] operator[SEP] identifier[ii] operator[+] Other[1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { identifier[_log] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[t] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } } } Keyword[return] Keyword[this] operator[SEP] }
@Override public void afterPropertiesSet() throws Exception { Assert.notNull(this.sessionManager, "Property 'sessionManager' must be assigned"); Assert.notNull(this.authnContextService, "Property 'authnContextService' must be assigned"); Assert.notNull(this.signSupportService, "Property 'signSupportService' must be assigned"); Assert.notNull(this.attributeToIdMapping, "Property 'attributeToIdMapping' must be assigned"); Assert.notNull(this.flowName, "Property 'flowName' must be assigned"); }
class class_name[name] begin[{] method[afterPropertiesSet, return_type[void], modifier[public], parameter[]] begin[{] call[Assert.notNull, parameter[THIS[member[None.sessionManager]], literal["Property 'sessionManager' must be assigned"]]] call[Assert.notNull, parameter[THIS[member[None.authnContextService]], literal["Property 'authnContextService' must be assigned"]]] call[Assert.notNull, parameter[THIS[member[None.signSupportService]], literal["Property 'signSupportService' must be assigned"]]] call[Assert.notNull, parameter[THIS[member[None.attributeToIdMapping]], literal["Property 'attributeToIdMapping' must be assigned"]]] call[Assert.notNull, parameter[THIS[member[None.flowName]], literal["Property 'flowName' must be assigned"]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[afterPropertiesSet] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] Keyword[this] operator[SEP] identifier[sessionManager] , literal[String] operator[SEP] operator[SEP] identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] Keyword[this] operator[SEP] identifier[authnContextService] , literal[String] operator[SEP] operator[SEP] identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] Keyword[this] operator[SEP] identifier[signSupportService] , literal[String] operator[SEP] operator[SEP] identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] Keyword[this] operator[SEP] identifier[attributeToIdMapping] , literal[String] operator[SEP] operator[SEP] identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] Keyword[this] operator[SEP] identifier[flowName] , literal[String] operator[SEP] operator[SEP] }
public static int sum(int[] x) { double sum = 0.0; for (int n : x) { sum += n; } if (sum > Integer.MAX_VALUE || sum < -Integer.MAX_VALUE) { throw new ArithmeticException("Sum overflow: " + sum); } return (int) sum; }
class class_name[name] begin[{] method[sum, return_type[type[int]], modifier[public static], parameter[x]] begin[{] local_variable[type[double], sum] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=sum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=n)], modifiers=set(), type=BasicType(dimensions=[], name=int))), label=None) if[binary_operation[binary_operation[member[.sum], >, member[Integer.MAX_VALUE]], ||, binary_operation[member[.sum], <, member[Integer.MAX_VALUE]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Sum overflow: "), operandr=MemberReference(member=sum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ArithmeticException, sub_type=None)), label=None) else begin[{] None end[}] return[Cast(expression=MemberReference(member=sum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int))] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[sum] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[x] operator[SEP] { Keyword[double] identifier[sum] operator[=] literal[Float] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[n] operator[:] identifier[x] operator[SEP] { identifier[sum] operator[+=] identifier[n] operator[SEP] } Keyword[if] operator[SEP] identifier[sum] operator[>] identifier[Integer] operator[SEP] identifier[MAX_VALUE] operator[||] identifier[sum] operator[<] operator[-] identifier[Integer] operator[SEP] identifier[MAX_VALUE] operator[SEP] { Keyword[throw] Keyword[new] identifier[ArithmeticException] operator[SEP] literal[String] operator[+] identifier[sum] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] Keyword[int] operator[SEP] identifier[sum] operator[SEP] }
public int[] fractionPlaceGroups() { Object[] boxedArray = decimalGroups.toArray(); int len = boxedArray.length + 1; int[] array = new int[len]; array[0] = minimumFractionDigits; for (int i = 1; i < len; i++) { array[i] = (Integer) boxedArray[i-1]; } return array; }
class class_name[name] begin[{] method[fractionPlaceGroups, return_type[type[int]], modifier[public], parameter[]] begin[{] local_variable[type[Object], boxedArray] local_variable[type[int], len] local_variable[type[int], array] assign[member[.array], member[.minimumFractionDigits]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Cast(expression=MemberReference(member=boxedArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))]), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.array]] end[}] END[}]
Keyword[public] Keyword[int] operator[SEP] operator[SEP] identifier[fractionPlaceGroups] operator[SEP] operator[SEP] { identifier[Object] operator[SEP] operator[SEP] identifier[boxedArray] operator[=] identifier[decimalGroups] operator[SEP] identifier[toArray] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[len] operator[=] identifier[boxedArray] operator[SEP] identifier[length] operator[+] Other[1] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[array] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[len] operator[SEP] operator[SEP] identifier[array] operator[SEP] Other[0] operator[SEP] operator[=] identifier[minimumFractionDigits] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[1] operator[SEP] identifier[i] operator[<] identifier[len] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[array] operator[SEP] identifier[i] operator[SEP] operator[=] operator[SEP] identifier[Integer] operator[SEP] identifier[boxedArray] operator[SEP] identifier[i] operator[-] Other[1] operator[SEP] operator[SEP] } Keyword[return] identifier[array] operator[SEP] }
public static MozuUrl removeUserRoleAsyncUrl(Integer accountId, Integer roleId, String userId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/customer/b2baccounts/{accountId}/user/{userId}/roles/{roleId}"); formatter.formatUrl("accountId", accountId); formatter.formatUrl("roleId", roleId); formatter.formatUrl("userId", userId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
class class_name[name] begin[{] method[removeUserRoleAsyncUrl, return_type[type[MozuUrl]], modifier[public static], parameter[accountId, roleId, userId]] begin[{] local_variable[type[UrlFormatter], formatter] call[formatter.formatUrl, parameter[literal["accountId"], member[.accountId]]] call[formatter.formatUrl, parameter[literal["roleId"], member[.roleId]]] call[formatter.formatUrl, parameter[literal["userId"], member[.userId]]] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getResourceUrl, postfix_operators=[], prefix_operators=[], qualifier=formatter, selectors=[], type_arguments=None), MemberReference(member=TENANT_POD, postfix_operators=[], prefix_operators=[], qualifier=MozuUrl.UrlLocation, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MozuUrl, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[MozuUrl] identifier[removeUserRoleAsyncUrl] operator[SEP] identifier[Integer] identifier[accountId] , identifier[Integer] identifier[roleId] , identifier[String] identifier[userId] operator[SEP] { identifier[UrlFormatter] identifier[formatter] operator[=] Keyword[new] identifier[UrlFormatter] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[formatter] operator[SEP] identifier[formatUrl] operator[SEP] literal[String] , identifier[accountId] operator[SEP] operator[SEP] identifier[formatter] operator[SEP] identifier[formatUrl] operator[SEP] literal[String] , identifier[roleId] operator[SEP] operator[SEP] identifier[formatter] operator[SEP] identifier[formatUrl] operator[SEP] literal[String] , identifier[userId] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[MozuUrl] operator[SEP] identifier[formatter] operator[SEP] identifier[getResourceUrl] operator[SEP] operator[SEP] , identifier[MozuUrl] operator[SEP] identifier[UrlLocation] operator[SEP] identifier[TENANT_POD] operator[SEP] operator[SEP] }
public static void addCronJobForInterval(ExecutableJobQueue executableJobQueue, CronJobQueue cronJobQueue, int scheduleIntervalMinute, final JobPo finalJobPo, Date lastGenerateTime) { JobPo jobPo = JobUtils.copy(finalJobPo); String cronExpression = jobPo.getCronExpression(); long endTime = DateUtils.addMinute(lastGenerateTime, scheduleIntervalMinute).getTime(); Date timeAfter = lastGenerateTime; boolean stop = false; while (!stop) { Date nextTriggerTime = CronExpressionUtils.getNextTriggerTime(cronExpression, timeAfter); if (nextTriggerTime == null) { stop = true; } else { if (nextTriggerTime.getTime() <= endTime) { // 添加任务 jobPo.setTriggerTime(nextTriggerTime.getTime()); jobPo.setJobId(JobUtils.generateJobId()); jobPo.setTaskId(finalJobPo.getTaskId() + "_" + DateUtils.format(nextTriggerTime, "MMdd-HHmmss")); jobPo.setInternalExtParam(Constants.ONCE, Boolean.TRUE.toString()); try { jobPo.setInternalExtParam(Constants.EXE_SEQ_ID, JobUtils.generateExeSeqId(jobPo)); executableJobQueue.add(jobPo); } catch (DupEntryException e) { LOGGER.warn("Cron Job[taskId={}, taskTrackerNodeGroup={}] Already Exist in ExecutableJobQueue", jobPo.getTaskId(), jobPo.getTaskTrackerNodeGroup()); } } else { stop = true; } } timeAfter = nextTriggerTime; } cronJobQueue.updateLastGenerateTriggerTime(finalJobPo.getJobId(), endTime); if (LOGGER.isDebugEnabled()) { LOGGER.debug("Add CronJob {} to {}", jobPo, DateUtils.formatYMD_HMS(new Date(endTime))); } }
class class_name[name] begin[{] method[addCronJobForInterval, return_type[void], modifier[public static], parameter[executableJobQueue, cronJobQueue, scheduleIntervalMinute, finalJobPo, lastGenerateTime]] begin[{] local_variable[type[JobPo], jobPo] local_variable[type[String], cronExpression] local_variable[type[long], endTime] local_variable[type[Date], timeAfter] local_variable[type[boolean], stop] while[member[.stop]] begin[{] local_variable[type[Date], nextTriggerTime] if[binary_operation[member[.nextTriggerTime], ==, literal[null]]] begin[{] assign[member[.stop], literal[true]] else begin[{] if[binary_operation[call[nextTriggerTime.getTime, parameter[]], <=, member[.endTime]]] begin[{] call[jobPo.setTriggerTime, parameter[call[nextTriggerTime.getTime, parameter[]]]] call[jobPo.setJobId, parameter[call[JobUtils.generateJobId, parameter[]]]] call[jobPo.setTaskId, parameter[binary_operation[binary_operation[call[finalJobPo.getTaskId, parameter[]], +, literal["_"]], +, call[DateUtils.format, parameter[member[.nextTriggerTime], literal["MMdd-HHmmss"]]]]]] call[jobPo.setInternalExtParam, parameter[member[Constants.ONCE], call[Boolean.TRUE.toString, parameter[]]]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=EXE_SEQ_ID, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[]), MethodInvocation(arguments=[MemberReference(member=jobPo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=generateExeSeqId, postfix_operators=[], prefix_operators=[], qualifier=JobUtils, selectors=[], type_arguments=None)], member=setInternalExtParam, postfix_operators=[], prefix_operators=[], qualifier=jobPo, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=jobPo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=executableJobQueue, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cron Job[taskId={}, taskTrackerNodeGroup={}] Already Exist in ExecutableJobQueue"), MethodInvocation(arguments=[], member=getTaskId, postfix_operators=[], prefix_operators=[], qualifier=jobPo, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getTaskTrackerNodeGroup, postfix_operators=[], prefix_operators=[], qualifier=jobPo, selectors=[], type_arguments=None)], 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=['DupEntryException']))], finally_block=None, label=None, resources=None) else begin[{] assign[member[.stop], literal[true]] end[}] end[}] assign[member[.timeAfter], member[.nextTriggerTime]] end[}] call[cronJobQueue.updateLastGenerateTriggerTime, parameter[call[finalJobPo.getJobId, parameter[]], member[.endTime]]] if[call[LOGGER.isDebugEnabled, parameter[]]] begin[{] call[LOGGER.debug, parameter[literal["Add CronJob {} to {}"], member[.jobPo], call[DateUtils.formatYMD_HMS, parameter[ClassCreator(arguments=[MemberReference(member=endTime, 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=Date, sub_type=None))]]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[addCronJobForInterval] operator[SEP] identifier[ExecutableJobQueue] identifier[executableJobQueue] , identifier[CronJobQueue] identifier[cronJobQueue] , Keyword[int] identifier[scheduleIntervalMinute] , Keyword[final] identifier[JobPo] identifier[finalJobPo] , identifier[Date] identifier[lastGenerateTime] operator[SEP] { identifier[JobPo] identifier[jobPo] operator[=] identifier[JobUtils] operator[SEP] identifier[copy] operator[SEP] identifier[finalJobPo] operator[SEP] operator[SEP] identifier[String] identifier[cronExpression] operator[=] identifier[jobPo] operator[SEP] identifier[getCronExpression] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[endTime] operator[=] identifier[DateUtils] operator[SEP] identifier[addMinute] operator[SEP] identifier[lastGenerateTime] , identifier[scheduleIntervalMinute] operator[SEP] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[SEP] identifier[Date] identifier[timeAfter] operator[=] identifier[lastGenerateTime] operator[SEP] Keyword[boolean] identifier[stop] operator[=] literal[boolean] operator[SEP] Keyword[while] operator[SEP] operator[!] identifier[stop] operator[SEP] { identifier[Date] identifier[nextTriggerTime] operator[=] identifier[CronExpressionUtils] operator[SEP] identifier[getNextTriggerTime] operator[SEP] identifier[cronExpression] , identifier[timeAfter] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nextTriggerTime] operator[==] Other[null] operator[SEP] { identifier[stop] operator[=] literal[boolean] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[nextTriggerTime] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[<=] identifier[endTime] operator[SEP] { identifier[jobPo] operator[SEP] identifier[setTriggerTime] operator[SEP] identifier[nextTriggerTime] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[jobPo] operator[SEP] identifier[setJobId] operator[SEP] identifier[JobUtils] operator[SEP] identifier[generateJobId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[jobPo] operator[SEP] identifier[setTaskId] operator[SEP] identifier[finalJobPo] operator[SEP] identifier[getTaskId] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[DateUtils] operator[SEP] identifier[format] operator[SEP] identifier[nextTriggerTime] , literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[jobPo] operator[SEP] identifier[setInternalExtParam] operator[SEP] identifier[Constants] operator[SEP] identifier[ONCE] , identifier[Boolean] operator[SEP] identifier[TRUE] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[jobPo] operator[SEP] identifier[setInternalExtParam] operator[SEP] identifier[Constants] operator[SEP] identifier[EXE_SEQ_ID] , identifier[JobUtils] operator[SEP] identifier[generateExeSeqId] operator[SEP] identifier[jobPo] operator[SEP] operator[SEP] operator[SEP] identifier[executableJobQueue] operator[SEP] identifier[add] operator[SEP] identifier[jobPo] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[DupEntryException] identifier[e] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[jobPo] operator[SEP] identifier[getTaskId] operator[SEP] operator[SEP] , identifier[jobPo] operator[SEP] identifier[getTaskTrackerNodeGroup] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[stop] operator[=] literal[boolean] operator[SEP] } } identifier[timeAfter] operator[=] identifier[nextTriggerTime] operator[SEP] } identifier[cronJobQueue] operator[SEP] identifier[updateLastGenerateTriggerTime] operator[SEP] identifier[finalJobPo] operator[SEP] identifier[getJobId] operator[SEP] operator[SEP] , identifier[endTime] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[LOGGER] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[jobPo] , identifier[DateUtils] operator[SEP] identifier[formatYMD_HMS] operator[SEP] Keyword[new] identifier[Date] operator[SEP] identifier[endTime] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
@Override public void onManagerWarning(String warning, Exception cause) { logger.log(level, "SIMON WARNING: " + warning, cause); }
class class_name[name] begin[{] method[onManagerWarning, return_type[void], modifier[public], parameter[warning, cause]] begin[{] call[logger.log, parameter[member[.level], binary_operation[literal["SIMON WARNING: "], +, member[.warning]], member[.cause]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onManagerWarning] operator[SEP] identifier[String] identifier[warning] , identifier[Exception] identifier[cause] operator[SEP] { identifier[logger] operator[SEP] identifier[log] operator[SEP] identifier[level] , literal[String] operator[+] identifier[warning] , identifier[cause] operator[SEP] operator[SEP] }
@SuppressWarnings("Duplicates") protected static void write(WisItDocument doc, OutputStream output) { LOGGER.info("writing document"); try { doc.toXml(output, PRETTY_PRINT); LOGGER.info("> written to a java.io.OutputStream"); } catch (Exception ex) { LOGGER.error("Can't write document into an OutputStream!"); LOGGER.error("> " + ex.getLocalizedMessage(), ex); System.exit(1); } }
class class_name[name] begin[{] method[write, return_type[void], modifier[static protected], parameter[doc, output]] begin[{] call[LOGGER.info, parameter[literal["writing document"]]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=output, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=PRETTY_PRINT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toXml, postfix_operators=[], prefix_operators=[], qualifier=doc, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="> written to a java.io.OutputStream")], member=info, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Can't write document into an OutputStream!")], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="> "), operandr=MethodInvocation(arguments=[], member=getLocalizedMessage, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None), operator=+), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=exit, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] Keyword[static] Keyword[void] identifier[write] operator[SEP] identifier[WisItDocument] identifier[doc] , identifier[OutputStream] identifier[output] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[try] { identifier[doc] operator[SEP] identifier[toXml] operator[SEP] identifier[output] , identifier[PRETTY_PRINT] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[error] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[ex] operator[SEP] identifier[getLocalizedMessage] operator[SEP] operator[SEP] , identifier[ex] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[exit] operator[SEP] Other[1] operator[SEP] operator[SEP] } }
protected String parseOptionalStringValue(final String path) { final I_CmsXmlContentValue value = m_xml.getValue(path, m_locale); if (value == null) { return null; } else { return value.getStringValue(null); } }
class class_name[name] begin[{] method[parseOptionalStringValue, return_type[type[String]], modifier[protected], parameter[path]] begin[{] local_variable[type[I_CmsXmlContentValue], value] if[binary_operation[member[.value], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] return[call[value.getStringValue, parameter[literal[null]]]] end[}] end[}] END[}]
Keyword[protected] identifier[String] identifier[parseOptionalStringValue] operator[SEP] Keyword[final] identifier[String] identifier[path] operator[SEP] { Keyword[final] identifier[I_CmsXmlContentValue] identifier[value] operator[=] identifier[m_xml] operator[SEP] identifier[getValue] operator[SEP] identifier[path] , identifier[m_locale] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[else] { Keyword[return] identifier[value] operator[SEP] identifier[getStringValue] operator[SEP] Other[null] operator[SEP] operator[SEP] } }
public static char getOrder(INDArray arr) { return getOrder(arr.shape(), arr.stride(), arr.elementStride()); }
class class_name[name] begin[{] method[getOrder, return_type[type[char]], modifier[public static], parameter[arr]] begin[{] return[call[.getOrder, parameter[call[arr.shape, parameter[]], call[arr.stride, parameter[]], call[arr.elementStride, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[char] identifier[getOrder] operator[SEP] identifier[INDArray] identifier[arr] operator[SEP] { Keyword[return] identifier[getOrder] operator[SEP] identifier[arr] operator[SEP] identifier[shape] operator[SEP] operator[SEP] , identifier[arr] operator[SEP] identifier[stride] operator[SEP] operator[SEP] , identifier[arr] operator[SEP] identifier[elementStride] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override public void orderRows(final OrderBy ob) { if (ob != null) { ob.setMetaData(getMetaData()); ob.setParser(parser); Collections.sort(rows, ob); goTop(); } }
class class_name[name] begin[{] method[orderRows, return_type[void], modifier[public], parameter[ob]] begin[{] if[binary_operation[member[.ob], !=, literal[null]]] begin[{] call[ob.setMetaData, parameter[call[.getMetaData, parameter[]]]] call[ob.setParser, parameter[member[.parser]]] call[Collections.sort, parameter[member[.rows], member[.ob]]] call[.goTop, parameter[]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[orderRows] operator[SEP] Keyword[final] identifier[OrderBy] identifier[ob] operator[SEP] { Keyword[if] operator[SEP] identifier[ob] operator[!=] Other[null] operator[SEP] { identifier[ob] operator[SEP] identifier[setMetaData] operator[SEP] identifier[getMetaData] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ob] operator[SEP] identifier[setParser] operator[SEP] identifier[parser] operator[SEP] operator[SEP] identifier[Collections] operator[SEP] identifier[sort] operator[SEP] identifier[rows] , identifier[ob] operator[SEP] operator[SEP] identifier[goTop] operator[SEP] operator[SEP] operator[SEP] } }
@Override public void removeXAttr(Path path, String name) throws IOException { logger.atFine().log("GHFS.removeXAttr: %s, %s", path, name); checkNotNull(path, "path should not be null"); checkNotNull(name, "name should not be null"); FileInfo fileInfo = getGcsFs().getFileInfo(getGcsPath(path)); Map<String, byte[]> xAttrToRemove = new HashMap<>(); xAttrToRemove.put(getXAttrKey(name), null); UpdatableItemInfo updateInfo = new UpdatableItemInfo(fileInfo.getItemInfo().getResourceId(), xAttrToRemove); getGcsFs().getGcs().updateItems(ImmutableList.of(updateInfo)); logger.atFine().log("GHFS.removeXAttr:=> "); }
class class_name[name] begin[{] method[removeXAttr, return_type[void], modifier[public], parameter[path, name]] begin[{] call[logger.atFine, parameter[]] call[.checkNotNull, parameter[member[.path], literal["path should not be null"]]] call[.checkNotNull, parameter[member[.name], literal["name should not be null"]]] local_variable[type[FileInfo], fileInfo] local_variable[type[Map], xAttrToRemove] call[xAttrToRemove.put, parameter[call[.getXAttrKey, parameter[member[.name]]], literal[null]]] local_variable[type[UpdatableItemInfo], updateInfo] call[.getGcsFs, parameter[]] call[logger.atFine, parameter[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[removeXAttr] operator[SEP] identifier[Path] identifier[path] , identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[IOException] { identifier[logger] operator[SEP] identifier[atFine] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] literal[String] , identifier[path] , identifier[name] operator[SEP] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[path] , literal[String] operator[SEP] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[name] , literal[String] operator[SEP] operator[SEP] identifier[FileInfo] identifier[fileInfo] operator[=] identifier[getGcsFs] operator[SEP] operator[SEP] operator[SEP] identifier[getFileInfo] operator[SEP] identifier[getGcsPath] operator[SEP] identifier[path] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , Keyword[byte] operator[SEP] operator[SEP] operator[>] identifier[xAttrToRemove] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[xAttrToRemove] operator[SEP] identifier[put] operator[SEP] identifier[getXAttrKey] operator[SEP] identifier[name] operator[SEP] , Other[null] operator[SEP] operator[SEP] identifier[UpdatableItemInfo] identifier[updateInfo] operator[=] Keyword[new] identifier[UpdatableItemInfo] operator[SEP] identifier[fileInfo] operator[SEP] identifier[getItemInfo] operator[SEP] operator[SEP] operator[SEP] identifier[getResourceId] operator[SEP] operator[SEP] , identifier[xAttrToRemove] operator[SEP] operator[SEP] identifier[getGcsFs] operator[SEP] operator[SEP] operator[SEP] identifier[getGcs] operator[SEP] operator[SEP] operator[SEP] identifier[updateItems] operator[SEP] identifier[ImmutableList] operator[SEP] identifier[of] operator[SEP] identifier[updateInfo] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[atFine] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] literal[String] operator[SEP] operator[SEP] }
public void clearUnused(ConfigImpl config) { SystemOut.printDate(config.getOutWriter(), "PagePool: " + size() + ">(" + maxSize + ")"); if (size() > maxSize) { String[] keys = keys(); LongKeyList list = new LongKeyList(); for (int i = 0; i < keys.length; i++) { PageSource ps = getPageSource(keys[i], false); long updateTime = ps.getLastAccessTime(); if (updateTime + timeout < System.currentTimeMillis()) { long add = ((ps.getAccessCount() - 1) * 10000); if (add > timeout) add = timeout; list.add(updateTime + add, keys[i]); } } while (size() > maxSize) { Object key = list.shift(); if (key == null) break; remove(key.toString()); } } }
class class_name[name] begin[{] method[clearUnused, return_type[void], modifier[public], parameter[config]] begin[{] call[SystemOut.printDate, parameter[call[config.getOutWriter, parameter[]], binary_operation[binary_operation[binary_operation[binary_operation[literal["PagePool: "], +, call[.size, parameter[]]], +, literal[">("]], +, member[.maxSize]], +, literal[")"]]]] if[binary_operation[call[.size, parameter[]], >, member[.maxSize]]] begin[{] local_variable[type[String], keys] local_variable[type[LongKeyList], list] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=keys, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=getPageSource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=ps)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PageSource, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getLastAccessTime, postfix_operators=[], prefix_operators=[], qualifier=ps, selectors=[], type_arguments=None), name=updateTime)], modifiers=set(), type=BasicType(dimensions=[], name=long)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=updateTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=timeout, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MethodInvocation(arguments=[], member=currentTimeMillis, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getAccessCount, postfix_operators=[], prefix_operators=[], qualifier=ps, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10000), operator=*), name=add)], modifiers=set(), type=BasicType(dimensions=[], name=long)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=add, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=timeout, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=add, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=timeout, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=updateTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=add, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=keys, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=add, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=keys, 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) while[binary_operation[call[.size, parameter[]], >, member[.maxSize]]] begin[{] local_variable[type[Object], key] if[binary_operation[member[.key], ==, literal[null]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] call[.remove, parameter[call[key.toString, parameter[]]]] end[}] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[clearUnused] operator[SEP] identifier[ConfigImpl] identifier[config] operator[SEP] { identifier[SystemOut] operator[SEP] identifier[printDate] operator[SEP] identifier[config] operator[SEP] identifier[getOutWriter] operator[SEP] operator[SEP] , literal[String] operator[+] identifier[size] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[maxSize] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] identifier[maxSize] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[keys] operator[=] identifier[keys] operator[SEP] operator[SEP] operator[SEP] identifier[LongKeyList] identifier[list] operator[=] Keyword[new] identifier[LongKeyList] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[keys] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[PageSource] identifier[ps] operator[=] identifier[getPageSource] operator[SEP] identifier[keys] operator[SEP] identifier[i] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] Keyword[long] identifier[updateTime] operator[=] identifier[ps] operator[SEP] identifier[getLastAccessTime] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[updateTime] operator[+] identifier[timeout] operator[<] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] { Keyword[long] identifier[add] operator[=] operator[SEP] operator[SEP] identifier[ps] operator[SEP] identifier[getAccessCount] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[*] Other[10000] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[add] operator[>] identifier[timeout] operator[SEP] identifier[add] operator[=] identifier[timeout] operator[SEP] identifier[list] operator[SEP] identifier[add] operator[SEP] identifier[updateTime] operator[+] identifier[add] , identifier[keys] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } } Keyword[while] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] identifier[maxSize] operator[SEP] { identifier[Object] identifier[key] operator[=] identifier[list] operator[SEP] identifier[shift] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[key] operator[==] Other[null] operator[SEP] Keyword[break] operator[SEP] identifier[remove] operator[SEP] identifier[key] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } }
@Override public void close(final String subPath) throws ExecutionTargetCloseException { StringBuilder sb = new StringBuilder(); if (algorithms.size() != 1) throw new ExecutionTargetCloseException("Must use only one type of hash"); // shasum entires are traditionally written in sorted order (per globing argument) @SuppressWarnings("unchecked") Map.Entry<ChecksumFile, Map<String, String>>[] entries = filesHashcodes.entrySet().toArray((Map.Entry<ChecksumFile, Map<String, String>>[]) new Map.Entry[0] ); Arrays.sort(entries, new Comparator<Map.Entry<ChecksumFile, Map<String, String>>>() { @Override public int compare(Map.Entry<ChecksumFile, Map<String, String>> o1, Map.Entry<ChecksumFile, Map<String, String>> o2) { ChecksumFile f1 = o1.getKey(); ChecksumFile f2 = o2.getKey(); return f1.getRelativePath(f1, subPath).compareTo(f2.getRelativePath(f2, subPath)); } }); // Write a line for each file. for ( Map.Entry<ChecksumFile, Map<String, String>> entry : entries ) { ChecksumFile file = entry.getKey(); Map<String, String> fileHashcodes = entry.getValue(); for ( String algorithm : algorithms ) { if ( fileHashcodes.containsKey( algorithm ) ) { sb.append( fileHashcodes.get( algorithm ) ); } } sb.append(SHASUM_FIELD_SEPARATOR) .append( file.getRelativePath(entry.getKey(), subPath)) .append( LINE_SEPARATOR ); } // Make sure the parent directory exists. FileUtils.mkdir( summaryFile.getParent() ); // Write the result to the summary file. try { FileUtils.fileWrite( summaryFile.getPath(), "US-ASCII", sb.toString() ); for (ArtifactListener artifactListener : artifactListeners) { artifactListener.artifactCreated(summaryFile, "sum", null, null); } } catch ( IOException e ) { throw new ExecutionTargetCloseException( e.getMessage() ); } }
class class_name[name] begin[{] method[close, return_type[void], modifier[public], parameter[subPath]] begin[{] local_variable[type[StringBuilder], sb] if[binary_operation[call[algorithms.size, parameter[]], !=, literal[1]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Must use only one type of hash")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ExecutionTargetCloseException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[Map], entries] call[Arrays.sort, parameter[member[.entries], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=o1, selectors=[], type_arguments=None), name=f1)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ChecksumFile, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=o2, selectors=[], type_arguments=None), name=f2)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ChecksumFile, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=f1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=subPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getRelativePath, postfix_operators=[], prefix_operators=[], qualifier=f1, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=f2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=subPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getRelativePath, postfix_operators=[], prefix_operators=[], qualifier=f2, selectors=[], type_arguments=None)], member=compareTo, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=compare, parameters=[FormalParameter(annotations=[], modifiers=set(), name=o1, type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ChecksumFile, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=Map, sub_type=None))], dimensions=None, name=Entry, sub_type=None)), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=o2, type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ChecksumFile, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=Map, sub_type=None))], dimensions=None, name=Entry, sub_type=None)), varargs=False)], return_type=BasicType(dimensions=[], name=int), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ChecksumFile, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=Map, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))], dimensions=None, name=Comparator, sub_type=None))]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), name=file)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ChecksumFile, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), name=fileHashcodes)], 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)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=algorithm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=fileHashcodes, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=algorithm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=fileHashcodes, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=algorithms, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=algorithm)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SHASUM_FIELD_SEPARATOR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), MemberReference(member=subPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getRelativePath, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[], type_arguments=None)], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=LINE_SEPARATOR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], 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=entries, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ChecksumFile, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=Map, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None) call[FileUtils.mkdir, parameter[call[summaryFile.getParent, parameter[]]]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getPath, postfix_operators=[], prefix_operators=[], qualifier=summaryFile, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="US-ASCII"), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None)], member=fileWrite, postfix_operators=[], prefix_operators=[], qualifier=FileUtils, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=summaryFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="sum"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=artifactCreated, postfix_operators=[], prefix_operators=[], qualifier=artifactListener, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=artifactListeners, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=artifactListener)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ArtifactListener, sub_type=None))), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ExecutionTargetCloseException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[close] operator[SEP] Keyword[final] identifier[String] identifier[subPath] operator[SEP] Keyword[throws] identifier[ExecutionTargetCloseException] { identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[algorithms] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[!=] Other[1] operator[SEP] Keyword[throw] Keyword[new] identifier[ExecutionTargetCloseException] operator[SEP] literal[String] operator[SEP] operator[SEP] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[ChecksumFile] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] operator[>] operator[SEP] operator[SEP] identifier[entries] operator[=] identifier[filesHashcodes] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] identifier[toArray] operator[SEP] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[ChecksumFile] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[new] identifier[Map] operator[SEP] identifier[Entry] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[Arrays] operator[SEP] identifier[sort] operator[SEP] identifier[entries] , Keyword[new] identifier[Comparator] operator[<] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[ChecksumFile] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[compare] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[ChecksumFile] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] operator[>] identifier[o1] , identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[ChecksumFile] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] operator[>] identifier[o2] operator[SEP] { identifier[ChecksumFile] identifier[f1] operator[=] identifier[o1] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] identifier[ChecksumFile] identifier[f2] operator[=] identifier[o2] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[f1] operator[SEP] identifier[getRelativePath] operator[SEP] identifier[f1] , identifier[subPath] operator[SEP] operator[SEP] identifier[compareTo] operator[SEP] identifier[f2] operator[SEP] identifier[getRelativePath] operator[SEP] identifier[f2] , identifier[subPath] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[ChecksumFile] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] operator[>] identifier[entry] operator[:] identifier[entries] operator[SEP] { identifier[ChecksumFile] identifier[file] operator[=] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[fileHashcodes] operator[=] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[algorithm] operator[:] identifier[algorithms] operator[SEP] { Keyword[if] operator[SEP] identifier[fileHashcodes] operator[SEP] identifier[containsKey] operator[SEP] identifier[algorithm] operator[SEP] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[fileHashcodes] operator[SEP] identifier[get] operator[SEP] identifier[algorithm] operator[SEP] operator[SEP] operator[SEP] } } identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[SHASUM_FIELD_SEPARATOR] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[file] operator[SEP] identifier[getRelativePath] operator[SEP] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] , identifier[subPath] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[LINE_SEPARATOR] operator[SEP] operator[SEP] } identifier[FileUtils] operator[SEP] identifier[mkdir] operator[SEP] identifier[summaryFile] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[FileUtils] operator[SEP] identifier[fileWrite] operator[SEP] identifier[summaryFile] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] , literal[String] , identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ArtifactListener] identifier[artifactListener] operator[:] identifier[artifactListeners] operator[SEP] { identifier[artifactListener] operator[SEP] identifier[artifactCreated] operator[SEP] identifier[summaryFile] , literal[String] , Other[null] , Other[null] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ExecutionTargetCloseException] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public static void triangulatePoints(SceneStructureMetric structure , SceneObservations observations ) { TriangulateNViewsMetric triangulation = FactoryMultiView. triangulateNViewCalibrated(ConfigTriangulation.GEOMETRIC); List<RemoveBrownPtoN_F64> list_p_to_n = new ArrayList<>(); for (int i = 0; i < structure.cameras.length; i++) { RemoveBrownPtoN_F64 p2n = new RemoveBrownPtoN_F64(); if( structure.cameras[i].model instanceof BundlePinholeSimplified ) { BundlePinholeSimplified cam = (BundlePinholeSimplified) structure.cameras[i].model; p2n.setK(cam.f, cam.f, 0, 0, 0).setDistortion(new double[]{cam.k1, cam.k2}, 0, 0); } else if( structure.cameras[i].model instanceof BundlePinhole) { BundlePinhole cam = (BundlePinhole) structure.cameras[i].model; p2n.setK(cam.fx, cam.fy, cam.skew, cam.cx, cam.cy).setDistortion(new double[]{0,0}, 0,0); } else if( structure.cameras[i].model instanceof BundlePinholeBrown) { BundlePinholeBrown cam = (BundlePinholeBrown) structure.cameras[i].model; p2n.setK(cam.fx, cam.fy, cam.skew, cam.cx, cam.cy).setDistortion(cam.radial, cam.t1, cam.t2); } else { throw new RuntimeException("Unknown camera model!"); } list_p_to_n.add(p2n); } FastQueue<Point2D_F64> normObs = new FastQueue<>(Point2D_F64.class,true); normObs.resize(3); Point3D_F64 X = new Point3D_F64(); List<Se3_F64> worldToViews = new ArrayList<>(); for (int i = 0; i < structure.points.length; i++) { normObs.reset(); worldToViews.clear(); SceneStructureMetric.Point sp = structure.points[i]; for (int j = 0; j < sp.views.size; j++) { int viewIdx = sp.views.get(j); SceneStructureMetric.View v = structure.views[viewIdx]; worldToViews.add(v.worldToView); // get the observation in pixels Point2D_F64 n = normObs.grow(); int pointidx = observations.views[viewIdx].point.indexOf(i); observations.views[viewIdx].get(pointidx,n); // convert to normalized image coordinates list_p_to_n.get(v.camera).compute(n.x,n.y,n); } triangulation.triangulate(normObs.toList(),worldToViews,X); sp.set(X.x,X.y,X.z); } }
class class_name[name] begin[{] method[triangulatePoints, return_type[void], modifier[public static], parameter[structure, observations]] begin[{] local_variable[type[TriangulateNViewsMetric], triangulation] local_variable[type[List], list_p_to_n] ForStatement(body=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=None, dimensions=None, name=RemoveBrownPtoN_F64, sub_type=None)), name=p2n)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=RemoveBrownPtoN_F64, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=cameras, postfix_operators=[], prefix_operators=[], qualifier=structure, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=model, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operandr=ReferenceType(arguments=None, dimensions=[], name=BundlePinholeSimplified, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=cameras, postfix_operators=[], prefix_operators=[], qualifier=structure, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=model, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operandr=ReferenceType(arguments=None, dimensions=[], name=BundlePinhole, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=cameras, postfix_operators=[], prefix_operators=[], qualifier=structure, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=model, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operandr=ReferenceType(arguments=None, dimensions=[], name=BundlePinholeBrown, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unknown camera model!")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=cameras, postfix_operators=[], prefix_operators=[], qualifier=structure, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=model, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type=ReferenceType(arguments=None, dimensions=[], name=BundlePinholeBrown, sub_type=None)), name=cam)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BundlePinholeBrown, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=fx, postfix_operators=[], prefix_operators=[], qualifier=cam, selectors=[]), MemberReference(member=fy, postfix_operators=[], prefix_operators=[], qualifier=cam, selectors=[]), MemberReference(member=skew, postfix_operators=[], prefix_operators=[], qualifier=cam, selectors=[]), MemberReference(member=cx, postfix_operators=[], prefix_operators=[], qualifier=cam, selectors=[]), MemberReference(member=cy, postfix_operators=[], prefix_operators=[], qualifier=cam, selectors=[])], member=setK, postfix_operators=[], prefix_operators=[], qualifier=p2n, selectors=[MethodInvocation(arguments=[MemberReference(member=radial, postfix_operators=[], prefix_operators=[], qualifier=cam, selectors=[]), MemberReference(member=t1, postfix_operators=[], prefix_operators=[], qualifier=cam, selectors=[]), MemberReference(member=t2, postfix_operators=[], prefix_operators=[], qualifier=cam, selectors=[])], member=setDistortion, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=cameras, postfix_operators=[], prefix_operators=[], qualifier=structure, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=model, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type=ReferenceType(arguments=None, dimensions=[], name=BundlePinhole, sub_type=None)), name=cam)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BundlePinhole, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=fx, postfix_operators=[], prefix_operators=[], qualifier=cam, selectors=[]), MemberReference(member=fy, postfix_operators=[], prefix_operators=[], qualifier=cam, selectors=[]), MemberReference(member=skew, postfix_operators=[], prefix_operators=[], qualifier=cam, selectors=[]), MemberReference(member=cx, postfix_operators=[], prefix_operators=[], qualifier=cam, selectors=[]), MemberReference(member=cy, postfix_operators=[], prefix_operators=[], qualifier=cam, selectors=[])], member=setK, postfix_operators=[], prefix_operators=[], qualifier=p2n, selectors=[MethodInvocation(arguments=[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=double)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=setDistortion, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=cameras, postfix_operators=[], prefix_operators=[], qualifier=structure, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=model, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type=ReferenceType(arguments=None, dimensions=[], name=BundlePinholeSimplified, sub_type=None)), name=cam)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BundlePinholeSimplified, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=cam, selectors=[]), MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=cam, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=setK, postfix_operators=[], prefix_operators=[], qualifier=p2n, selectors=[MethodInvocation(arguments=[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=k1, postfix_operators=[], prefix_operators=[], qualifier=cam, selectors=[]), MemberReference(member=k2, postfix_operators=[], prefix_operators=[], qualifier=cam, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=double)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=setDistortion, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=p2n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=list_p_to_n, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=structure.cameras, 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) local_variable[type[FastQueue], normObs] call[normObs.resize, parameter[literal[3]]] local_variable[type[Point3D_F64], X] local_variable[type[List], worldToViews] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=reset, postfix_operators=[], prefix_operators=[], qualifier=normObs, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=clear, postfix_operators=[], prefix_operators=[], qualifier=worldToViews, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=points, postfix_operators=[], prefix_operators=[], qualifier=structure, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=sp)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SceneStructureMetric, sub_type=ReferenceType(arguments=None, dimensions=None, name=Point, sub_type=None))), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=sp.views, selectors=[], type_arguments=None), name=viewIdx)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=views, postfix_operators=[], prefix_operators=[], qualifier=structure, selectors=[ArraySelector(index=MemberReference(member=viewIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=v)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SceneStructureMetric, sub_type=ReferenceType(arguments=None, dimensions=None, name=View, sub_type=None))), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=worldToView, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=worldToViews, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=grow, postfix_operators=[], prefix_operators=[], qualifier=normObs, selectors=[], type_arguments=None), name=n)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Point2D_F64, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=views, postfix_operators=[], prefix_operators=[], qualifier=observations, selectors=[ArraySelector(index=MemberReference(member=viewIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=point, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=indexOf, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=pointidx)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=MemberReference(member=views, postfix_operators=[], prefix_operators=[], qualifier=observations, selectors=[ArraySelector(index=MemberReference(member=viewIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[MemberReference(member=pointidx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=camera, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=list_p_to_n, selectors=[MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=n, selectors=[]), MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=n, selectors=[]), MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compute, 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=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=sp.views, 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=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toList, postfix_operators=[], prefix_operators=[], qualifier=normObs, selectors=[], type_arguments=None), MemberReference(member=worldToViews, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=X, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=triangulate, postfix_operators=[], prefix_operators=[], qualifier=triangulation, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=X, selectors=[]), MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=X, selectors=[]), MemberReference(member=z, postfix_operators=[], prefix_operators=[], qualifier=X, selectors=[])], member=set, postfix_operators=[], prefix_operators=[], qualifier=sp, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=structure.points, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[triangulatePoints] operator[SEP] identifier[SceneStructureMetric] identifier[structure] , identifier[SceneObservations] identifier[observations] operator[SEP] { identifier[TriangulateNViewsMetric] identifier[triangulation] operator[=] identifier[FactoryMultiView] operator[SEP] identifier[triangulateNViewCalibrated] operator[SEP] identifier[ConfigTriangulation] operator[SEP] identifier[GEOMETRIC] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[RemoveBrownPtoN_F64] operator[>] identifier[list_p_to_n] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[structure] operator[SEP] identifier[cameras] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[RemoveBrownPtoN_F64] identifier[p2n] operator[=] Keyword[new] identifier[RemoveBrownPtoN_F64] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[structure] operator[SEP] identifier[cameras] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[model] Keyword[instanceof] identifier[BundlePinholeSimplified] operator[SEP] { identifier[BundlePinholeSimplified] identifier[cam] operator[=] operator[SEP] identifier[BundlePinholeSimplified] operator[SEP] identifier[structure] operator[SEP] identifier[cameras] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[model] operator[SEP] identifier[p2n] operator[SEP] identifier[setK] operator[SEP] identifier[cam] operator[SEP] identifier[f] , identifier[cam] operator[SEP] identifier[f] , Other[0] , Other[0] , Other[0] operator[SEP] operator[SEP] identifier[setDistortion] operator[SEP] Keyword[new] Keyword[double] operator[SEP] operator[SEP] { identifier[cam] operator[SEP] identifier[k1] , identifier[cam] operator[SEP] identifier[k2] } , Other[0] , Other[0] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[structure] operator[SEP] identifier[cameras] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[model] Keyword[instanceof] identifier[BundlePinhole] operator[SEP] { identifier[BundlePinhole] identifier[cam] operator[=] operator[SEP] identifier[BundlePinhole] operator[SEP] identifier[structure] operator[SEP] identifier[cameras] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[model] operator[SEP] identifier[p2n] operator[SEP] identifier[setK] operator[SEP] identifier[cam] operator[SEP] identifier[fx] , identifier[cam] operator[SEP] identifier[fy] , identifier[cam] operator[SEP] identifier[skew] , identifier[cam] operator[SEP] identifier[cx] , identifier[cam] operator[SEP] identifier[cy] operator[SEP] operator[SEP] identifier[setDistortion] operator[SEP] Keyword[new] Keyword[double] operator[SEP] operator[SEP] { Other[0] , Other[0] } , Other[0] , Other[0] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[structure] operator[SEP] identifier[cameras] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[model] Keyword[instanceof] identifier[BundlePinholeBrown] operator[SEP] { identifier[BundlePinholeBrown] identifier[cam] operator[=] operator[SEP] identifier[BundlePinholeBrown] operator[SEP] identifier[structure] operator[SEP] identifier[cameras] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[model] operator[SEP] identifier[p2n] operator[SEP] identifier[setK] operator[SEP] identifier[cam] operator[SEP] identifier[fx] , identifier[cam] operator[SEP] identifier[fy] , identifier[cam] operator[SEP] identifier[skew] , identifier[cam] operator[SEP] identifier[cx] , identifier[cam] operator[SEP] identifier[cy] operator[SEP] operator[SEP] identifier[setDistortion] operator[SEP] identifier[cam] operator[SEP] identifier[radial] , identifier[cam] operator[SEP] identifier[t1] , identifier[cam] operator[SEP] identifier[t2] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[list_p_to_n] operator[SEP] identifier[add] operator[SEP] identifier[p2n] operator[SEP] operator[SEP] } identifier[FastQueue] operator[<] identifier[Point2D_F64] operator[>] identifier[normObs] operator[=] Keyword[new] identifier[FastQueue] operator[<] operator[>] operator[SEP] identifier[Point2D_F64] operator[SEP] Keyword[class] , literal[boolean] operator[SEP] operator[SEP] identifier[normObs] operator[SEP] identifier[resize] operator[SEP] Other[3] operator[SEP] operator[SEP] identifier[Point3D_F64] identifier[X] operator[=] Keyword[new] identifier[Point3D_F64] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Se3_F64] operator[>] identifier[worldToViews] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[structure] operator[SEP] identifier[points] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[normObs] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] identifier[worldToViews] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[SceneStructureMetric] operator[SEP] identifier[Point] identifier[sp] operator[=] identifier[structure] operator[SEP] identifier[points] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[sp] operator[SEP] identifier[views] operator[SEP] identifier[size] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[int] identifier[viewIdx] operator[=] identifier[sp] operator[SEP] identifier[views] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[SceneStructureMetric] operator[SEP] identifier[View] identifier[v] operator[=] identifier[structure] operator[SEP] identifier[views] operator[SEP] identifier[viewIdx] operator[SEP] operator[SEP] identifier[worldToViews] operator[SEP] identifier[add] operator[SEP] identifier[v] operator[SEP] identifier[worldToView] operator[SEP] operator[SEP] identifier[Point2D_F64] identifier[n] operator[=] identifier[normObs] operator[SEP] identifier[grow] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[pointidx] operator[=] identifier[observations] operator[SEP] identifier[views] operator[SEP] identifier[viewIdx] operator[SEP] operator[SEP] identifier[point] operator[SEP] identifier[indexOf] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[observations] operator[SEP] identifier[views] operator[SEP] identifier[viewIdx] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[pointidx] , identifier[n] operator[SEP] operator[SEP] identifier[list_p_to_n] operator[SEP] identifier[get] operator[SEP] identifier[v] operator[SEP] identifier[camera] operator[SEP] operator[SEP] identifier[compute] operator[SEP] identifier[n] operator[SEP] identifier[x] , identifier[n] operator[SEP] identifier[y] , identifier[n] operator[SEP] operator[SEP] } identifier[triangulation] operator[SEP] identifier[triangulate] operator[SEP] identifier[normObs] operator[SEP] identifier[toList] operator[SEP] operator[SEP] , identifier[worldToViews] , identifier[X] operator[SEP] operator[SEP] identifier[sp] operator[SEP] identifier[set] operator[SEP] identifier[X] operator[SEP] identifier[x] , identifier[X] operator[SEP] identifier[y] , identifier[X] operator[SEP] identifier[z] operator[SEP] operator[SEP] } }
public final EObject entryRuleRichStringPart() throws RecognitionException { EObject current = null; EObject iv_ruleRichStringPart = null; try { // InternalSARL.g:11119:55: (iv_ruleRichStringPart= ruleRichStringPart EOF ) // InternalSARL.g:11120:2: iv_ruleRichStringPart= ruleRichStringPart EOF { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getRichStringPartRule()); } pushFollow(FOLLOW_1); iv_ruleRichStringPart=ruleRichStringPart(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { current =iv_ruleRichStringPart; } match(input,EOF,FOLLOW_2); if (state.failed) return current; } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; }
class class_name[name] begin[{] method[entryRuleRichStringPart, return_type[type[EObject]], modifier[final public], parameter[]] begin[{] local_variable[type[EObject], current] local_variable[type[EObject], iv_ruleRichStringPart] TryStatement(block=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getRichStringPartRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=iv_ruleRichStringPart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=ruleRichStringPart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=iv_ruleRichStringPart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), 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=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None))])], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=appendSkippedTokens, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=[], label=None, resources=None) return[member[.current]] end[}] END[}]
Keyword[public] Keyword[final] identifier[EObject] identifier[entryRuleRichStringPart] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { identifier[EObject] identifier[current] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[iv_ruleRichStringPart] operator[=] Other[null] operator[SEP] Keyword[try] { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getRichStringPartRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_1] operator[SEP] operator[SEP] identifier[iv_ruleRichStringPart] operator[=] identifier[ruleRichStringPart] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[current] operator[=] identifier[iv_ruleRichStringPart] operator[SEP] } identifier[match] operator[SEP] identifier[input] , identifier[EOF] , identifier[FOLLOW_2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] } } Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[re] operator[SEP] { identifier[recover] operator[SEP] identifier[input] , identifier[re] operator[SEP] operator[SEP] identifier[appendSkippedTokens] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { } Keyword[return] identifier[current] operator[SEP] }
private void adjustChecksumBytes(int dataLen) { int requiredSize = ((dataLen + bytesPerChecksum - 1)/bytesPerChecksum)*checksumSize; if (checksumBytes == null || requiredSize > checksumBytes.capacity()) { checksumBytes = ByteBuffer.wrap(new byte[requiredSize]); } else { checksumBytes.clear(); } checksumBytes.limit(requiredSize); }
class class_name[name] begin[{] method[adjustChecksumBytes, return_type[void], modifier[private], parameter[dataLen]] begin[{] local_variable[type[int], requiredSize] if[binary_operation[binary_operation[member[.checksumBytes], ==, literal[null]], ||, binary_operation[member[.requiredSize], >, call[checksumBytes.capacity, parameter[]]]]] begin[{] assign[member[.checksumBytes], call[ByteBuffer.wrap, parameter[ArrayCreator(dimensions=[MemberReference(member=requiredSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte))]]] else begin[{] call[checksumBytes.clear, parameter[]] end[}] call[checksumBytes.limit, parameter[member[.requiredSize]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[adjustChecksumBytes] operator[SEP] Keyword[int] identifier[dataLen] operator[SEP] { Keyword[int] identifier[requiredSize] operator[=] operator[SEP] operator[SEP] identifier[dataLen] operator[+] identifier[bytesPerChecksum] operator[-] Other[1] operator[SEP] operator[/] identifier[bytesPerChecksum] operator[SEP] operator[*] identifier[checksumSize] operator[SEP] Keyword[if] operator[SEP] identifier[checksumBytes] operator[==] Other[null] operator[||] identifier[requiredSize] operator[>] identifier[checksumBytes] operator[SEP] identifier[capacity] operator[SEP] operator[SEP] operator[SEP] { identifier[checksumBytes] operator[=] identifier[ByteBuffer] operator[SEP] identifier[wrap] operator[SEP] Keyword[new] Keyword[byte] operator[SEP] identifier[requiredSize] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[checksumBytes] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] } identifier[checksumBytes] operator[SEP] identifier[limit] operator[SEP] identifier[requiredSize] operator[SEP] operator[SEP] }
static ObjectName getMBeanObject(String serverName, String jmsResourceName) { ObjectName jmsMBeanObjectName = null; Hashtable<String, String> properties = new Hashtable<String, String>(); //construct JMSProvider MBean object name. properties.put(KEY_J2EETYPE, KEY_JMSRESOURCE); //as per JSR 77 spec,J2EEServer(i.e server name) is parent for JMSResource. properties.put(KEY_JMS_PARENT, serverName); //actual JMSResource name properties.put(KEY_NAME, jmsResourceName); try { jmsMBeanObjectName = new ObjectName(DOMAIN_NAME, properties); } catch (MalformedObjectNameException e) { // ignore exceptions - This will never happen if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "getMBeanObject", e); } return jmsMBeanObjectName; }
class class_name[name] begin[{] method[getMBeanObject, return_type[type[ObjectName]], modifier[static], parameter[serverName, jmsResourceName]] begin[{] local_variable[type[ObjectName], jmsMBeanObjectName] local_variable[type[Hashtable], properties] call[properties.put, parameter[member[.KEY_J2EETYPE], member[.KEY_JMSRESOURCE]]] call[properties.put, parameter[member[.KEY_JMS_PARENT], member[.serverName]]] call[properties.put, parameter[member[.KEY_NAME], member[.jmsResourceName]]] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=jmsMBeanObjectName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=DOMAIN_NAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=properties, 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=ObjectName, sub_type=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=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="getMBeanObject"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['MalformedObjectNameException']))], finally_block=None, label=None, resources=None) return[member[.jmsMBeanObjectName]] end[}] END[}]
Keyword[static] identifier[ObjectName] identifier[getMBeanObject] operator[SEP] identifier[String] identifier[serverName] , identifier[String] identifier[jmsResourceName] operator[SEP] { identifier[ObjectName] identifier[jmsMBeanObjectName] operator[=] Other[null] operator[SEP] identifier[Hashtable] operator[<] identifier[String] , identifier[String] operator[>] identifier[properties] operator[=] Keyword[new] identifier[Hashtable] operator[<] identifier[String] , identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[properties] operator[SEP] identifier[put] operator[SEP] identifier[KEY_J2EETYPE] , identifier[KEY_JMSRESOURCE] operator[SEP] operator[SEP] identifier[properties] operator[SEP] identifier[put] operator[SEP] identifier[KEY_JMS_PARENT] , identifier[serverName] operator[SEP] operator[SEP] identifier[properties] operator[SEP] identifier[put] operator[SEP] identifier[KEY_NAME] , identifier[jmsResourceName] operator[SEP] operator[SEP] Keyword[try] { identifier[jmsMBeanObjectName] operator[=] Keyword[new] identifier[ObjectName] operator[SEP] identifier[DOMAIN_NAME] , identifier[properties] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[MalformedObjectNameException] 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[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[return] identifier[jmsMBeanObjectName] operator[SEP] }
@Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case AfplibPackage.PPORG__RG_LENGTH: return getRGLength(); case AfplibPackage.PPORG__OBJ_TYPE: return getObjType(); case AfplibPackage.PPORG__PROC_FLGS: return getProcFlgs(); case AfplibPackage.PPORG__XOCA_OSET: return getXocaOset(); case AfplibPackage.PPORG__YOCA_OSET: return getYocaOset(); case AfplibPackage.PPORG__TRIPLETS: return getTriplets(); } return super.eGet(featureID, resolve, coreType); }
class class_name[name] begin[{] method[eGet, return_type[type[Object]], modifier[public], parameter[featureID, resolve, coreType]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=PPORG__RG_LENGTH, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getRGLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=[MemberReference(member=PPORG__OBJ_TYPE, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getObjType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=[MemberReference(member=PPORG__PROC_FLGS, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getProcFlgs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=[MemberReference(member=PPORG__XOCA_OSET, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getXocaOset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=[MemberReference(member=PPORG__YOCA_OSET, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getYocaOset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=[MemberReference(member=PPORG__TRIPLETS, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getTriplets, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])], expression=MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) return[SuperMethodInvocation(arguments=[MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=resolve, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=coreType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=eGet, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[eGet] operator[SEP] Keyword[int] identifier[featureID] , Keyword[boolean] identifier[resolve] , Keyword[boolean] identifier[coreType] operator[SEP] { Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] { Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[PPORG__RG_LENGTH] operator[:] Keyword[return] identifier[getRGLength] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[PPORG__OBJ_TYPE] operator[:] Keyword[return] identifier[getObjType] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[PPORG__PROC_FLGS] operator[:] Keyword[return] identifier[getProcFlgs] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[PPORG__XOCA_OSET] operator[:] Keyword[return] identifier[getXocaOset] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[PPORG__YOCA_OSET] operator[:] Keyword[return] identifier[getYocaOset] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[PPORG__TRIPLETS] operator[:] Keyword[return] identifier[getTriplets] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[super] operator[SEP] identifier[eGet] operator[SEP] identifier[featureID] , identifier[resolve] , identifier[coreType] operator[SEP] operator[SEP] }
public static double calculateGroundResolutionWithScaleFactor(double latitude, double scaleFactor, int tileSize) { long mapSize = getMapSizeWithScaleFactor(scaleFactor, tileSize); return Math.cos(latitude * (Math.PI / 180)) * EARTH_CIRCUMFERENCE / mapSize; }
class class_name[name] begin[{] method[calculateGroundResolutionWithScaleFactor, return_type[type[double]], modifier[public static], parameter[latitude, scaleFactor, tileSize]] begin[{] local_variable[type[long], mapSize] return[binary_operation[binary_operation[call[Math.cos, parameter[binary_operation[member[.latitude], *, binary_operation[member[Math.PI], /, literal[180]]]]], *, member[.EARTH_CIRCUMFERENCE]], /, member[.mapSize]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[calculateGroundResolutionWithScaleFactor] operator[SEP] Keyword[double] identifier[latitude] , Keyword[double] identifier[scaleFactor] , Keyword[int] identifier[tileSize] operator[SEP] { Keyword[long] identifier[mapSize] operator[=] identifier[getMapSizeWithScaleFactor] operator[SEP] identifier[scaleFactor] , identifier[tileSize] operator[SEP] operator[SEP] Keyword[return] identifier[Math] operator[SEP] identifier[cos] operator[SEP] identifier[latitude] operator[*] operator[SEP] identifier[Math] operator[SEP] identifier[PI] operator[/] Other[180] operator[SEP] operator[SEP] operator[*] identifier[EARTH_CIRCUMFERENCE] operator[/] identifier[mapSize] operator[SEP] }
@Around("anyPublicMethod() && @annotation(requestMapping)") public Object decideAccess(ProceedingJoinPoint pjp, RequestMapping requestMapping) throws Throwable { Object rtnOb = null; try { // 执行方法 rtnOb = pjp.proceed(); } catch (Throwable t) { LOG.info(t.getMessage()); throw t; } return rtnOb; }
class class_name[name] begin[{] method[decideAccess, return_type[type[Object]], modifier[public], parameter[pjp, requestMapping]] begin[{] local_variable[type[Object], rtnOb] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=rtnOb, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=proceed, postfix_operators=[], prefix_operators=[], qualifier=pjp, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None)], member=info, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=None, label=None, resources=None) return[member[.rtnOb]] end[}] END[}]
annotation[@] identifier[Around] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[Object] identifier[decideAccess] operator[SEP] identifier[ProceedingJoinPoint] identifier[pjp] , identifier[RequestMapping] identifier[requestMapping] operator[SEP] Keyword[throws] identifier[Throwable] { identifier[Object] identifier[rtnOb] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[rtnOb] operator[=] identifier[pjp] operator[SEP] identifier[proceed] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] identifier[t] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] identifier[t] operator[SEP] } Keyword[return] identifier[rtnOb] operator[SEP] }
protected Integer getNextDevice(long threadId) { Integer device = null; if (!CudaEnvironment.getInstance().getConfiguration().isForcedSingleGPU() && getNumberOfDevices() > 0) { // simple round-robin here synchronized (this) { device = CudaEnvironment.getInstance().getConfiguration().getAvailableDevices().get(devPtr.getAndIncrement()); // We check only for number of entries here, not their actual values if (devPtr.get() >= CudaEnvironment.getInstance().getConfiguration().getAvailableDevices().size()) devPtr.set(0); logger.debug("Mapping thread [{}] to device [{}], out of [{}] devices...", threadId, device, CudaEnvironment.getInstance().getConfiguration().getAvailableDevices().size()); } } else { device = CudaEnvironment.getInstance().getConfiguration().getAvailableDevices().get(0); logger.debug("Single device is forced, mapping to device [{}]", device); } return device; }
class class_name[name] begin[{] method[getNextDevice, return_type[type[Integer]], modifier[protected], parameter[threadId]] begin[{] local_variable[type[Integer], device] if[binary_operation[call[CudaEnvironment.getInstance, parameter[]], &&, binary_operation[call[.getNumberOfDevices, parameter[]], >, literal[0]]]] begin[{] SYNCHRONIZED[THIS[]] BEGIN[{] assign[member[.device], call[CudaEnvironment.getInstance, parameter[]]] if[binary_operation[call[devPtr.get, parameter[]], >=, call[CudaEnvironment.getInstance, parameter[]]]] begin[{] call[devPtr.set, parameter[literal[0]]] else begin[{] None end[}] call[logger.debug, parameter[literal["Mapping thread [{}] to device [{}], out of [{}] devices..."], member[.threadId], member[.device], call[CudaEnvironment.getInstance, parameter[]]]] END[}] else begin[{] assign[member[.device], call[CudaEnvironment.getInstance, parameter[]]] call[logger.debug, parameter[literal["Single device is forced, mapping to device [{}]"], member[.device]]] end[}] return[member[.device]] end[}] END[}]
Keyword[protected] identifier[Integer] identifier[getNextDevice] operator[SEP] Keyword[long] identifier[threadId] operator[SEP] { identifier[Integer] identifier[device] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[CudaEnvironment] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[getConfiguration] operator[SEP] operator[SEP] operator[SEP] identifier[isForcedSingleGPU] operator[SEP] operator[SEP] operator[&&] identifier[getNumberOfDevices] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] { identifier[device] operator[=] identifier[CudaEnvironment] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[getConfiguration] operator[SEP] operator[SEP] operator[SEP] identifier[getAvailableDevices] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[devPtr] operator[SEP] identifier[getAndIncrement] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[devPtr] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[>=] identifier[CudaEnvironment] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[getConfiguration] operator[SEP] operator[SEP] operator[SEP] identifier[getAvailableDevices] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[devPtr] operator[SEP] identifier[set] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[threadId] , identifier[device] , identifier[CudaEnvironment] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[getConfiguration] operator[SEP] operator[SEP] operator[SEP] identifier[getAvailableDevices] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[device] operator[=] identifier[CudaEnvironment] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[getConfiguration] operator[SEP] operator[SEP] operator[SEP] identifier[getAvailableDevices] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[device] operator[SEP] operator[SEP] } Keyword[return] identifier[device] operator[SEP] }
public PropertyConstraint ifTrue(PropertyConstraint ifConstraint, PropertyConstraint thenConstraint, PropertyConstraint elseConstraint) { return new ConditionalPropertyConstraint(ifConstraint, thenConstraint, elseConstraint); }
class class_name[name] begin[{] method[ifTrue, return_type[type[PropertyConstraint]], modifier[public], parameter[ifConstraint, thenConstraint, elseConstraint]] begin[{] return[ClassCreator(arguments=[MemberReference(member=ifConstraint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=thenConstraint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=elseConstraint, 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=ConditionalPropertyConstraint, sub_type=None))] end[}] END[}]
Keyword[public] identifier[PropertyConstraint] identifier[ifTrue] operator[SEP] identifier[PropertyConstraint] identifier[ifConstraint] , identifier[PropertyConstraint] identifier[thenConstraint] , identifier[PropertyConstraint] identifier[elseConstraint] operator[SEP] { Keyword[return] Keyword[new] identifier[ConditionalPropertyConstraint] operator[SEP] identifier[ifConstraint] , identifier[thenConstraint] , identifier[elseConstraint] operator[SEP] operator[SEP] }
public static void resizingBehaviorApply(ResizingBehavior behavior, RectF rect, RectF target, RectF result) { if (rect.equals(target) || target == null) { result.set(rect); return; } if (behavior == ResizingBehavior.Stretch) { result.set(target); return; } float xRatio = Math.abs(target.width() / rect.width()); float yRatio = Math.abs(target.height() / rect.height()); float scale = 0f; switch (behavior) { case AspectFit: { scale = Math.min(xRatio, yRatio); break; } case AspectFill: { scale = Math.max(xRatio, yRatio); break; } case Center: { scale = 1f; break; } default: break; } float newWidth = Math.abs(rect.width() * scale); float newHeight = Math.abs(rect.height() * scale); result.set(target.centerX() - newWidth / 2, target.centerY() - newHeight / 2, target.centerX() + newWidth / 2, target.centerY() + newHeight / 2); }
class class_name[name] begin[{] method[resizingBehaviorApply, return_type[void], modifier[public static], parameter[behavior, rect, target, result]] begin[{] if[binary_operation[call[rect.equals, parameter[member[.target]]], ||, binary_operation[member[.target], ==, literal[null]]]] begin[{] call[result.set, parameter[member[.rect]]] return[None] else begin[{] None end[}] if[binary_operation[member[.behavior], ==, member[ResizingBehavior.Stretch]]] begin[{] call[result.set, parameter[member[.target]]] return[None] else begin[{] None end[}] local_variable[type[float], xRatio] local_variable[type[float], yRatio] local_variable[type[float], scale] SwitchStatement(cases=[SwitchStatementCase(case=['AspectFit'], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=scale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=xRatio, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=yRatio, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=min, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=['AspectFill'], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=scale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=xRatio, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=yRatio, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=max, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=['Center'], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=scale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1f)), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=None, label=None)])], expression=MemberReference(member=behavior, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) local_variable[type[float], newWidth] local_variable[type[float], newHeight] call[result.set, parameter[binary_operation[call[target.centerX, parameter[]], -, binary_operation[member[.newWidth], /, literal[2]]], binary_operation[call[target.centerY, parameter[]], -, binary_operation[member[.newHeight], /, literal[2]]], binary_operation[call[target.centerX, parameter[]], +, binary_operation[member[.newWidth], /, literal[2]]], binary_operation[call[target.centerY, parameter[]], +, binary_operation[member[.newHeight], /, literal[2]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[resizingBehaviorApply] operator[SEP] identifier[ResizingBehavior] identifier[behavior] , identifier[RectF] identifier[rect] , identifier[RectF] identifier[target] , identifier[RectF] identifier[result] operator[SEP] { Keyword[if] operator[SEP] identifier[rect] operator[SEP] identifier[equals] operator[SEP] identifier[target] operator[SEP] operator[||] identifier[target] operator[==] Other[null] operator[SEP] { identifier[result] operator[SEP] identifier[set] operator[SEP] identifier[rect] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[if] operator[SEP] identifier[behavior] operator[==] identifier[ResizingBehavior] operator[SEP] identifier[Stretch] operator[SEP] { identifier[result] operator[SEP] identifier[set] operator[SEP] identifier[target] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[float] identifier[xRatio] operator[=] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[target] operator[SEP] identifier[width] operator[SEP] operator[SEP] operator[/] identifier[rect] operator[SEP] identifier[width] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[yRatio] operator[=] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[target] operator[SEP] identifier[height] operator[SEP] operator[SEP] operator[/] identifier[rect] operator[SEP] identifier[height] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[scale] operator[=] literal[Float] operator[SEP] Keyword[switch] operator[SEP] identifier[behavior] operator[SEP] { Keyword[case] identifier[AspectFit] operator[:] { identifier[scale] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[xRatio] , identifier[yRatio] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } Keyword[case] identifier[AspectFill] operator[:] { identifier[scale] operator[=] identifier[Math] operator[SEP] identifier[max] operator[SEP] identifier[xRatio] , identifier[yRatio] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } Keyword[case] identifier[Center] operator[:] { identifier[scale] operator[=] literal[Float] operator[SEP] Keyword[break] operator[SEP] } Keyword[default] operator[:] Keyword[break] operator[SEP] } Keyword[float] identifier[newWidth] operator[=] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[rect] operator[SEP] identifier[width] operator[SEP] operator[SEP] operator[*] identifier[scale] operator[SEP] operator[SEP] Keyword[float] identifier[newHeight] operator[=] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[rect] operator[SEP] identifier[height] operator[SEP] operator[SEP] operator[*] identifier[scale] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[set] operator[SEP] identifier[target] operator[SEP] identifier[centerX] operator[SEP] operator[SEP] operator[-] identifier[newWidth] operator[/] Other[2] , identifier[target] operator[SEP] identifier[centerY] operator[SEP] operator[SEP] operator[-] identifier[newHeight] operator[/] Other[2] , identifier[target] operator[SEP] identifier[centerX] operator[SEP] operator[SEP] operator[+] identifier[newWidth] operator[/] Other[2] , identifier[target] operator[SEP] identifier[centerY] operator[SEP] operator[SEP] operator[+] identifier[newHeight] operator[/] Other[2] operator[SEP] operator[SEP] }
@Override public List<CPDefinitionOptionRel> findByGroupId(long groupId, int start, int end) { return findByGroupId(groupId, start, end, null); }
class class_name[name] begin[{] method[findByGroupId, return_type[type[List]], modifier[public], parameter[groupId, start, end]] begin[{] return[call[.findByGroupId, parameter[member[.groupId], member[.start], member[.end], literal[null]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[CPDefinitionOptionRel] operator[>] identifier[findByGroupId] operator[SEP] Keyword[long] identifier[groupId] , Keyword[int] identifier[start] , Keyword[int] identifier[end] operator[SEP] { Keyword[return] identifier[findByGroupId] operator[SEP] identifier[groupId] , identifier[start] , identifier[end] , Other[null] operator[SEP] operator[SEP] }
protected void executeJob(CmsScheduledJobInfo jobInfo) { if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_JOB_STARTING_1, jobInfo.getJobName())); } I_CmsScheduledJob job = jobInfo.getJobInstance(); if (job != null) { // launch the job try { CmsObject cms = null; // update the request time in the job info to the current time jobInfo.updateContextRequestTime(); // some simple test cases might run below this runlevel if (OpenCms.getRunLevel() >= OpenCms.RUNLEVEL_3_SHELL_ACCESS) { // generate a CmsObject for the job context // must access the scheduler manager instance from the OpenCms singleton // to get the initialized CmsObject cms = OpenCms.initCmsObject(OpenCms.getScheduleManager().getAdminCms(), jobInfo.getContextInfo()); } String result = job.launch(cms, jobInfo.getParameters()); if (CmsStringUtil.isNotEmpty(result) && LOG.isInfoEnabled()) { LOG.info( Messages.get().getBundle().key(Messages.LOG_JOB_EXECUTION_OK_2, jobInfo.getJobName(), result)); } } catch (Throwable t) { LOG.error(Messages.get().getBundle().key(Messages.LOG_JOB_EXECUTION_ERROR_1, jobInfo.getJobName()), t); } } if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_JOB_EXECUTED_1, jobInfo.getJobName())); Date nextExecution = jobInfo.getExecutionTimeNext(); if (nextExecution != null) { LOG.info( Messages.get().getBundle().key( Messages.LOG_JOB_NEXT_EXECUTION_2, jobInfo.getJobName(), nextExecution)); } } }
class class_name[name] begin[{] method[executeJob, return_type[void], modifier[protected], parameter[jobInfo]] begin[{] if[call[LOG.isDebugEnabled, parameter[]]] begin[{] call[LOG.debug, parameter[call[Messages.get, parameter[]]]] else begin[{] None end[}] local_variable[type[I_CmsScheduledJob], job] if[binary_operation[member[.job], !=, literal[null]]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=cms)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsObject, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=updateContextRequestTime, postfix_operators=[], prefix_operators=[], qualifier=jobInfo, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getRunLevel, postfix_operators=[], prefix_operators=[], qualifier=OpenCms, selectors=[], type_arguments=None), operandr=MemberReference(member=RUNLEVEL_3_SHELL_ACCESS, postfix_operators=[], prefix_operators=[], qualifier=OpenCms, selectors=[]), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=cms, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getScheduleManager, postfix_operators=[], prefix_operators=[], qualifier=OpenCms, selectors=[MethodInvocation(arguments=[], member=getAdminCms, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MethodInvocation(arguments=[], member=getContextInfo, postfix_operators=[], prefix_operators=[], qualifier=jobInfo, selectors=[], type_arguments=None)], member=initCmsObject, postfix_operators=[], prefix_operators=[], qualifier=OpenCms, selectors=[], type_arguments=None)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=cms, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getParameters, postfix_operators=[], prefix_operators=[], qualifier=jobInfo, selectors=[], type_arguments=None)], member=launch, postfix_operators=[], prefix_operators=[], qualifier=job, selectors=[], type_arguments=None), name=result)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isNotEmpty, postfix_operators=[], prefix_operators=[], qualifier=CmsStringUtil, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isInfoEnabled, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[MethodInvocation(arguments=[], member=getBundle, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=LOG_JOB_EXECUTION_OK_2, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[]), MethodInvocation(arguments=[], member=getJobName, postfix_operators=[], prefix_operators=[], qualifier=jobInfo, selectors=[], type_arguments=None), MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=key, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=info, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[MethodInvocation(arguments=[], member=getBundle, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=LOG_JOB_EXECUTION_ERROR_1, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[]), MethodInvocation(arguments=[], member=getJobName, postfix_operators=[], prefix_operators=[], qualifier=jobInfo, selectors=[], type_arguments=None)], member=key, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] if[call[LOG.isDebugEnabled, parameter[]]] begin[{] call[LOG.debug, parameter[call[Messages.get, parameter[]]]] local_variable[type[Date], nextExecution] if[binary_operation[member[.nextExecution], !=, literal[null]]] begin[{] call[LOG.info, parameter[call[Messages.get, parameter[]]]] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[executeJob] operator[SEP] identifier[CmsScheduledJobInfo] identifier[jobInfo] 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] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[getBundle] operator[SEP] operator[SEP] operator[SEP] identifier[key] operator[SEP] identifier[Messages] operator[SEP] identifier[LOG_JOB_STARTING_1] , identifier[jobInfo] operator[SEP] identifier[getJobName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[I_CmsScheduledJob] identifier[job] operator[=] identifier[jobInfo] operator[SEP] identifier[getJobInstance] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[job] operator[!=] Other[null] operator[SEP] { Keyword[try] { identifier[CmsObject] identifier[cms] operator[=] Other[null] operator[SEP] identifier[jobInfo] operator[SEP] identifier[updateContextRequestTime] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[OpenCms] operator[SEP] identifier[getRunLevel] operator[SEP] operator[SEP] operator[>=] identifier[OpenCms] operator[SEP] identifier[RUNLEVEL_3_SHELL_ACCESS] operator[SEP] { identifier[cms] operator[=] identifier[OpenCms] operator[SEP] identifier[initCmsObject] operator[SEP] identifier[OpenCms] operator[SEP] identifier[getScheduleManager] operator[SEP] operator[SEP] operator[SEP] identifier[getAdminCms] operator[SEP] operator[SEP] , identifier[jobInfo] operator[SEP] identifier[getContextInfo] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[String] identifier[result] operator[=] identifier[job] operator[SEP] identifier[launch] operator[SEP] identifier[cms] , identifier[jobInfo] operator[SEP] identifier[getParameters] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[CmsStringUtil] operator[SEP] identifier[isNotEmpty] operator[SEP] identifier[result] operator[SEP] operator[&&] identifier[LOG] operator[SEP] identifier[isInfoEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[getBundle] operator[SEP] operator[SEP] operator[SEP] identifier[key] operator[SEP] identifier[Messages] operator[SEP] identifier[LOG_JOB_EXECUTION_OK_2] , identifier[jobInfo] operator[SEP] identifier[getJobName] operator[SEP] operator[SEP] , identifier[result] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[getBundle] operator[SEP] operator[SEP] operator[SEP] identifier[key] operator[SEP] identifier[Messages] operator[SEP] identifier[LOG_JOB_EXECUTION_ERROR_1] , identifier[jobInfo] operator[SEP] identifier[getJobName] operator[SEP] operator[SEP] operator[SEP] , identifier[t] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[LOG] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[getBundle] operator[SEP] operator[SEP] operator[SEP] identifier[key] operator[SEP] identifier[Messages] operator[SEP] identifier[LOG_JOB_EXECUTED_1] , identifier[jobInfo] operator[SEP] identifier[getJobName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Date] identifier[nextExecution] operator[=] identifier[jobInfo] operator[SEP] identifier[getExecutionTimeNext] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nextExecution] operator[!=] Other[null] operator[SEP] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[getBundle] operator[SEP] operator[SEP] operator[SEP] identifier[key] operator[SEP] identifier[Messages] operator[SEP] identifier[LOG_JOB_NEXT_EXECUTION_2] , identifier[jobInfo] operator[SEP] identifier[getJobName] operator[SEP] operator[SEP] , identifier[nextExecution] operator[SEP] operator[SEP] operator[SEP] } } }
public static Object getOccurrencesTableLine(final ErrorOccurrence pError) { final SimpleDateFormat format = new SimpleDateFormat(OCCURRENCE_DATE_FORMAT); return String.format(OCCURRENCES_TABLE_LINE_FORMAT, pError.getReportId(), format.format(pError.getCrashDate()), RunningTimeUtils.toString(pError.getRunFor()), pError.getAndroidVersion(), pError.getVersionCode(), pError.getVersionName(), pError.getDevice()); }
class class_name[name] begin[{] method[getOccurrencesTableLine, return_type[type[Object]], modifier[public static], parameter[pError]] begin[{] local_variable[type[SimpleDateFormat], format] return[call[String.format, parameter[member[.OCCURRENCES_TABLE_LINE_FORMAT], call[pError.getReportId, parameter[]], call[format.format, parameter[call[pError.getCrashDate, parameter[]]]], call[RunningTimeUtils.toString, parameter[call[pError.getRunFor, parameter[]]]], call[pError.getAndroidVersion, parameter[]], call[pError.getVersionCode, parameter[]], call[pError.getVersionName, parameter[]], call[pError.getDevice, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Object] identifier[getOccurrencesTableLine] operator[SEP] Keyword[final] identifier[ErrorOccurrence] identifier[pError] operator[SEP] { Keyword[final] identifier[SimpleDateFormat] identifier[format] operator[=] Keyword[new] identifier[SimpleDateFormat] operator[SEP] identifier[OCCURRENCE_DATE_FORMAT] operator[SEP] operator[SEP] Keyword[return] identifier[String] operator[SEP] identifier[format] operator[SEP] identifier[OCCURRENCES_TABLE_LINE_FORMAT] , identifier[pError] operator[SEP] identifier[getReportId] operator[SEP] operator[SEP] , identifier[format] operator[SEP] identifier[format] operator[SEP] identifier[pError] operator[SEP] identifier[getCrashDate] operator[SEP] operator[SEP] operator[SEP] , identifier[RunningTimeUtils] operator[SEP] identifier[toString] operator[SEP] identifier[pError] operator[SEP] identifier[getRunFor] operator[SEP] operator[SEP] operator[SEP] , identifier[pError] operator[SEP] identifier[getAndroidVersion] operator[SEP] operator[SEP] , identifier[pError] operator[SEP] identifier[getVersionCode] operator[SEP] operator[SEP] , identifier[pError] operator[SEP] identifier[getVersionName] operator[SEP] operator[SEP] , identifier[pError] operator[SEP] identifier[getDevice] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private void outputResult() throws DITAOTException { try { tempFileNameScheme = (TempFileNameScheme) Class.forName(job.getProperty("temp-file-name-scheme")).newInstance(); } catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) { throw new RuntimeException(e); } tempFileNameScheme.setBaseDir(baseInputDir); // assume empty Job final URI rootTemp = tempFileNameScheme.generateTempFileName(rootFile); final File relativeRootFile = toFile(rootTemp); job.setInputDir(baseInputDir); job.setInputMap(rootTemp); //If root input file is marked resource only due to conref or other feature, remove that designation if (resourceOnlySet.contains(rootFile)) { resourceOnlySet.remove(rootFile); } job.setProperty(INPUT_DITAMAP_LIST_FILE_LIST, USER_INPUT_FILE_LIST_FILE); final File inputfile = new File(job.tempDir, USER_INPUT_FILE_LIST_FILE); writeListFile(inputfile, relativeRootFile.toString()); job.setProperty("tempdirToinputmapdir.relative.value", StringUtils.escapeRegExp(getPrefix(relativeRootFile))); job.setProperty("uplevels", getLevelsPath(rootTemp)); resourceOnlySet.addAll(listFilter.getResourceOnlySet()); if (job.getOnlyTopicInMap() || !job.crawlTopics()) { resourceOnlySet.addAll(listFilter.getNonTopicrefReferenceSet()); } for (final URI file: outDitaFilesSet) { getOrCreateFileInfo(fileinfos, file).isOutDita = true; } for (final URI file: fullTopicSet) { final FileInfo ff = getOrCreateFileInfo(fileinfos, file); if (ff.format == null) { ff.format = sourceFormat.getOrDefault(ff.src, ATTR_FORMAT_VALUE_DITA); } } for (final URI file: fullMapSet) { final FileInfo ff = getOrCreateFileInfo(fileinfos, file); if (ff.format == null) { ff.format = ATTR_FORMAT_VALUE_DITAMAP; } } for (final URI file: hrefTopicSet) { final FileInfo f = getOrCreateFileInfo(fileinfos, file); f.hasLink = true; if (f.format == null && sourceFormat.containsKey(f.src)) { f.format = sourceFormat.get(f.src); } } for (final URI file: conrefSet) { getOrCreateFileInfo(fileinfos, file).hasConref = true; } for (final Reference file: formatSet) { getOrCreateFileInfo(fileinfos, file.filename).format = file.format; } for (final URI file: flagImageSet) { final FileInfo f = getOrCreateFileInfo(fileinfos, file); f.isFlagImage = true; f.format = ATTR_FORMAT_VALUE_IMAGE; } for (final String format: htmlSet.keySet()) { for (final URI file : htmlSet.get(format)) { getOrCreateFileInfo(fileinfos, file).format = format; } } for (final URI file: hrefTargetSet) { final FileInfo f = getOrCreateFileInfo(fileinfos, file); f.isTarget = true; if (f.format == null && sourceFormat.containsKey(f.src)) { f.format = sourceFormat.get(f.src); } } for (final URI file: schemeSet) { getOrCreateFileInfo(fileinfos, file).isSubjectScheme = true; } for (final URI file: coderefTargetSet) { final FileInfo f = getOrCreateFileInfo(fileinfos, file); f.isSubtarget = true; if (f.format == null) { f.format = PR_D_CODEREF.localName; } } for (final URI file: conrefpushSet) { getOrCreateFileInfo(fileinfos, file).isConrefPush = true; } for (final URI file: keyrefSet) { getOrCreateFileInfo(fileinfos, file).hasKeyref = true; } for (final URI file: coderefSet) { getOrCreateFileInfo(fileinfos, file).hasCoderef = true; } for (final URI file: resourceOnlySet) { getOrCreateFileInfo(fileinfos, file).isResourceOnly = true; } addFlagImagesSetToProperties(job, relFlagImagesSet); final Map<URI, URI> filteredCopyTo = filterConflictingCopyTo(copyTo, fileinfos.values()); for (final FileInfo fs: fileinfos.values()) { if (!failureList.contains(fs.src)) { final URI src = filteredCopyTo.get(fs.src); // correct copy-to if (src != null) { final FileInfo corr = new FileInfo.Builder(fs).src(src).build(); job.add(corr); } else { job.add(fs); } } } for (final URI target : filteredCopyTo.keySet()) { final URI tmp = tempFileNameScheme.generateTempFileName(target); final FileInfo fi = new FileInfo.Builder().result(target).uri(tmp).build(); job.add(fi); } final FileInfo root = job.getFileInfo(rootFile); if (root == null) { throw new RuntimeException("Unable to set input file to job configuration"); } job.add(new FileInfo.Builder(root) .isInput(true) .build()); try { logger.info("Serializing job specification"); if (!job.tempDir.exists() && !job.tempDir.mkdirs()) { throw new DITAOTException("Failed to create " + job.tempDir + " directory"); } job.write(); } catch (final IOException e) { throw new DITAOTException("Failed to serialize job configuration files: " + e.getMessage(), e); } try { SubjectSchemeReader.writeMapToXML(addMapFilePrefix(listFilter.getRelationshipGrap()), new File(job.tempDir, FILE_NAME_SUBJECT_RELATION)); SubjectSchemeReader.writeMapToXML(addMapFilePrefix(schemeDictionary), new File(job.tempDir, FILE_NAME_SUBJECT_DICTIONARY)); } catch (final IOException e) { throw new DITAOTException("Failed to serialize subject scheme files: " + e.getMessage(), e); } if (INDEX_TYPE_ECLIPSEHELP.equals(transtype)) { final DelayConrefUtils delayConrefUtils = new DelayConrefUtils(); delayConrefUtils.setLogger(logger); delayConrefUtils.setJob(job); delayConrefUtils.writeMapToXML(exportAnchorsFilter.getPluginMap()); delayConrefUtils.writeExportAnchors(exportAnchorsFilter, tempFileNameScheme); } KeyDef.writeKeydef(new File(job.tempDir, SUBJECT_SCHEME_KEYDEF_LIST_FILE), addFilePrefix(schemekeydefMap.values())); }
class class_name[name] begin[{] method[outputResult, return_type[void], modifier[private], parameter[]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=tempFileNameScheme, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="temp-file-name-scheme")], member=getProperty, postfix_operators=[], prefix_operators=[], qualifier=job, selectors=[], type_arguments=None)], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[MethodInvocation(arguments=[], member=newInstance, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=TempFileNameScheme, sub_type=None))), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InstantiationException', 'IllegalAccessException', 'ClassNotFoundException']))], finally_block=None, label=None, resources=None) call[tempFileNameScheme.setBaseDir, parameter[member[.baseInputDir]]] local_variable[type[URI], rootTemp] local_variable[type[File], relativeRootFile] call[job.setInputDir, parameter[member[.baseInputDir]]] call[job.setInputMap, parameter[member[.rootTemp]]] if[call[resourceOnlySet.contains, parameter[member[.rootFile]]]] begin[{] call[resourceOnlySet.remove, parameter[member[.rootFile]]] else begin[{] None end[}] call[job.setProperty, parameter[member[.INPUT_DITAMAP_LIST_FILE_LIST], member[.USER_INPUT_FILE_LIST_FILE]]] local_variable[type[File], inputfile] call[.writeListFile, parameter[member[.inputfile], call[relativeRootFile.toString, parameter[]]]] call[job.setProperty, parameter[literal["tempdirToinputmapdir.relative.value"], call[StringUtils.escapeRegExp, parameter[call[.getPrefix, parameter[member[.relativeRootFile]]]]]]] call[job.setProperty, parameter[literal["uplevels"], call[.getLevelsPath, parameter[member[.rootTemp]]]]] call[resourceOnlySet.addAll, parameter[call[listFilter.getResourceOnlySet, parameter[]]]] if[binary_operation[call[job.getOnlyTopicInMap, parameter[]], ||, call[job.crawlTopics, parameter[]]]] begin[{] call[resourceOnlySet.addAll, parameter[call[listFilter.getNonTopicrefReferenceSet, parameter[]]]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MethodInvocation(arguments=[MemberReference(member=fileinfos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getOrCreateFileInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MemberReference(member=isOutDita, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=outDitaFilesSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=file)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=URI, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=fileinfos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getOrCreateFileInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=ff)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=FileInfo, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=format, postfix_operators=[], prefix_operators=[], qualifier=ff, 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=format, postfix_operators=[], prefix_operators=[], qualifier=ff, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=src, postfix_operators=[], prefix_operators=[], qualifier=ff, selectors=[]), MemberReference(member=ATTR_FORMAT_VALUE_DITA, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getOrDefault, postfix_operators=[], prefix_operators=[], qualifier=sourceFormat, selectors=[], type_arguments=None)), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=fullTopicSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=file)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=URI, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=fileinfos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getOrCreateFileInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=ff)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=FileInfo, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=format, postfix_operators=[], prefix_operators=[], qualifier=ff, 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=format, postfix_operators=[], prefix_operators=[], qualifier=ff, selectors=[]), type==, value=MemberReference(member=ATTR_FORMAT_VALUE_DITAMAP, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=fullMapSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=file)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=URI, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=fileinfos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getOrCreateFileInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=f)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=FileInfo, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=hasLink, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=format, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[MemberReference(member=src, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=sourceFormat, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=format, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=src, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=sourceFormat, selectors=[], type_arguments=None)), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=hrefTopicSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=file)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=URI, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MethodInvocation(arguments=[MemberReference(member=fileinfos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getOrCreateFileInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MemberReference(member=hasConref, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=conrefSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=file)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=URI, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MethodInvocation(arguments=[MemberReference(member=fileinfos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=filename, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[])], member=getOrCreateFileInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MemberReference(member=format, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), type==, value=MemberReference(member=format, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[])), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=formatSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=file)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Reference, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=fileinfos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getOrCreateFileInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=f)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=FileInfo, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=isFlagImage, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=format, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[]), type==, value=MemberReference(member=ATTR_FORMAT_VALUE_IMAGE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=flagImageSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=file)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=URI, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MethodInvocation(arguments=[MemberReference(member=fileinfos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getOrCreateFileInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MemberReference(member=format, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), type==, value=MemberReference(member=format, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=format, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=htmlSet, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=file)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=URI, sub_type=None))), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=htmlSet, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=format)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=fileinfos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getOrCreateFileInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=f)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=FileInfo, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=isTarget, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=format, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[MemberReference(member=src, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=sourceFormat, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=format, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=src, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=sourceFormat, selectors=[], type_arguments=None)), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=hrefTargetSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=file)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=URI, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MethodInvocation(arguments=[MemberReference(member=fileinfos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getOrCreateFileInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MemberReference(member=isSubjectScheme, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=schemeSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=file)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=URI, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=fileinfos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getOrCreateFileInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=f)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=FileInfo, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=isSubtarget, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=format, postfix_operators=[], prefix_operators=[], qualifier=f, 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=format, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[]), type==, value=MemberReference(member=localName, postfix_operators=[], prefix_operators=[], qualifier=PR_D_CODEREF, selectors=[])), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=coderefTargetSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=file)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=URI, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MethodInvocation(arguments=[MemberReference(member=fileinfos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getOrCreateFileInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MemberReference(member=isConrefPush, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=conrefpushSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=file)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=URI, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MethodInvocation(arguments=[MemberReference(member=fileinfos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getOrCreateFileInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MemberReference(member=hasKeyref, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=keyrefSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=file)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=URI, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MethodInvocation(arguments=[MemberReference(member=fileinfos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getOrCreateFileInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MemberReference(member=hasCoderef, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=coderefSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=file)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=URI, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MethodInvocation(arguments=[MemberReference(member=fileinfos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getOrCreateFileInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MemberReference(member=isResourceOnly, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=resourceOnlySet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=file)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=URI, sub_type=None))), label=None) call[.addFlagImagesSetToProperties, parameter[member[.job], member[.relFlagImagesSet]]] local_variable[type[Map], filteredCopyTo] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=src, postfix_operators=[], prefix_operators=[], qualifier=fs, selectors=[])], member=contains, postfix_operators=[], prefix_operators=['!'], qualifier=failureList, 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=src, postfix_operators=[], prefix_operators=[], qualifier=fs, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=filteredCopyTo, selectors=[], type_arguments=None), name=src)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=URI, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=src, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=fs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=job, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=fs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=src, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=src, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=FileInfo, sub_type=ReferenceType(arguments=None, dimensions=None, name=Builder, sub_type=None))), name=corr)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=FileInfo, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=corr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=job, selectors=[], type_arguments=None), label=None)]))]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=fileinfos, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=fs)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=FileInfo, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=target, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=generateTempFileName, postfix_operators=[], prefix_operators=[], qualifier=tempFileNameScheme, selectors=[], type_arguments=None), name=tmp)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=URI, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=target, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=result, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=tmp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=uri, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=FileInfo, sub_type=ReferenceType(arguments=None, dimensions=None, name=Builder, sub_type=None))), name=fi)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=FileInfo, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=fi, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=job, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=filteredCopyTo, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=target)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=URI, sub_type=None))), label=None) local_variable[type[FileInfo], root] if[binary_operation[member[.root], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to set input file to job configuration")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None) else begin[{] None end[}] call[job.add, parameter[ClassCreator(arguments=[MemberReference(member=root, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=isInput, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=FileInfo, sub_type=ReferenceType(arguments=None, dimensions=None, name=Builder, sub_type=None)))]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Serializing job specification")], member=info, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=exists, postfix_operators=[], prefix_operators=['!'], qualifier=job.tempDir, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=mkdirs, postfix_operators=[], prefix_operators=['!'], qualifier=job.tempDir, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to create "), operandr=MemberReference(member=tempDir, postfix_operators=[], prefix_operators=[], qualifier=job, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" directory"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DITAOTException, sub_type=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[], member=write, postfix_operators=[], prefix_operators=[], qualifier=job, 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 serialize job configuration files: "), 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=DITAOTException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getRelationshipGrap, postfix_operators=[], prefix_operators=[], qualifier=listFilter, selectors=[], type_arguments=None)], member=addMapFilePrefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), ClassCreator(arguments=[MemberReference(member=tempDir, postfix_operators=[], prefix_operators=[], qualifier=job, selectors=[]), MemberReference(member=FILE_NAME_SUBJECT_RELATION, 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=File, sub_type=None))], member=writeMapToXML, postfix_operators=[], prefix_operators=[], qualifier=SubjectSchemeReader, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=schemeDictionary, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addMapFilePrefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), ClassCreator(arguments=[MemberReference(member=tempDir, postfix_operators=[], prefix_operators=[], qualifier=job, selectors=[]), MemberReference(member=FILE_NAME_SUBJECT_DICTIONARY, 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=File, sub_type=None))], member=writeMapToXML, postfix_operators=[], prefix_operators=[], qualifier=SubjectSchemeReader, 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 serialize subject scheme files: "), 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=DITAOTException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) if[call[INDEX_TYPE_ECLIPSEHELP.equals, parameter[member[.transtype]]]] begin[{] local_variable[type[DelayConrefUtils], delayConrefUtils] call[delayConrefUtils.setLogger, parameter[member[.logger]]] call[delayConrefUtils.setJob, parameter[member[.job]]] call[delayConrefUtils.writeMapToXML, parameter[call[exportAnchorsFilter.getPluginMap, parameter[]]]] call[delayConrefUtils.writeExportAnchors, parameter[member[.exportAnchorsFilter], member[.tempFileNameScheme]]] else begin[{] None end[}] call[KeyDef.writeKeydef, parameter[ClassCreator(arguments=[MemberReference(member=tempDir, postfix_operators=[], prefix_operators=[], qualifier=job, selectors=[]), MemberReference(member=SUBJECT_SCHEME_KEYDEF_LIST_FILE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None)), call[.addFilePrefix, parameter[call[schemekeydefMap.values, parameter[]]]]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[outputResult] operator[SEP] operator[SEP] Keyword[throws] identifier[DITAOTException] { Keyword[try] { identifier[tempFileNameScheme] operator[=] operator[SEP] identifier[TempFileNameScheme] operator[SEP] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[job] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InstantiationException] operator[|] identifier[IllegalAccessException] operator[|] identifier[ClassNotFoundException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } identifier[tempFileNameScheme] operator[SEP] identifier[setBaseDir] operator[SEP] identifier[baseInputDir] operator[SEP] operator[SEP] Keyword[final] identifier[URI] identifier[rootTemp] operator[=] identifier[tempFileNameScheme] operator[SEP] identifier[generateTempFileName] operator[SEP] identifier[rootFile] operator[SEP] operator[SEP] Keyword[final] identifier[File] identifier[relativeRootFile] operator[=] identifier[toFile] operator[SEP] identifier[rootTemp] operator[SEP] operator[SEP] identifier[job] operator[SEP] identifier[setInputDir] operator[SEP] identifier[baseInputDir] operator[SEP] operator[SEP] identifier[job] operator[SEP] identifier[setInputMap] operator[SEP] identifier[rootTemp] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[resourceOnlySet] operator[SEP] identifier[contains] operator[SEP] identifier[rootFile] operator[SEP] operator[SEP] { identifier[resourceOnlySet] operator[SEP] identifier[remove] operator[SEP] identifier[rootFile] operator[SEP] operator[SEP] } identifier[job] operator[SEP] identifier[setProperty] operator[SEP] identifier[INPUT_DITAMAP_LIST_FILE_LIST] , identifier[USER_INPUT_FILE_LIST_FILE] operator[SEP] operator[SEP] Keyword[final] identifier[File] identifier[inputfile] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[job] operator[SEP] identifier[tempDir] , identifier[USER_INPUT_FILE_LIST_FILE] operator[SEP] operator[SEP] identifier[writeListFile] operator[SEP] identifier[inputfile] , identifier[relativeRootFile] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[job] operator[SEP] identifier[setProperty] operator[SEP] literal[String] , identifier[StringUtils] operator[SEP] identifier[escapeRegExp] operator[SEP] identifier[getPrefix] operator[SEP] identifier[relativeRootFile] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[job] operator[SEP] identifier[setProperty] operator[SEP] literal[String] , identifier[getLevelsPath] operator[SEP] identifier[rootTemp] operator[SEP] operator[SEP] operator[SEP] identifier[resourceOnlySet] operator[SEP] identifier[addAll] operator[SEP] identifier[listFilter] operator[SEP] identifier[getResourceOnlySet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[job] operator[SEP] identifier[getOnlyTopicInMap] operator[SEP] operator[SEP] operator[||] operator[!] identifier[job] operator[SEP] identifier[crawlTopics] operator[SEP] operator[SEP] operator[SEP] { identifier[resourceOnlySet] operator[SEP] identifier[addAll] operator[SEP] identifier[listFilter] operator[SEP] identifier[getNonTopicrefReferenceSet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] Keyword[final] identifier[URI] identifier[file] operator[:] identifier[outDitaFilesSet] operator[SEP] { identifier[getOrCreateFileInfo] operator[SEP] identifier[fileinfos] , identifier[file] operator[SEP] operator[SEP] identifier[isOutDita] operator[=] literal[boolean] operator[SEP] } Keyword[for] operator[SEP] Keyword[final] identifier[URI] identifier[file] operator[:] identifier[fullTopicSet] operator[SEP] { Keyword[final] identifier[FileInfo] identifier[ff] operator[=] identifier[getOrCreateFileInfo] operator[SEP] identifier[fileinfos] , identifier[file] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ff] operator[SEP] identifier[format] operator[==] Other[null] operator[SEP] { identifier[ff] operator[SEP] identifier[format] operator[=] identifier[sourceFormat] operator[SEP] identifier[getOrDefault] operator[SEP] identifier[ff] operator[SEP] identifier[src] , identifier[ATTR_FORMAT_VALUE_DITA] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] Keyword[final] identifier[URI] identifier[file] operator[:] identifier[fullMapSet] operator[SEP] { Keyword[final] identifier[FileInfo] identifier[ff] operator[=] identifier[getOrCreateFileInfo] operator[SEP] identifier[fileinfos] , identifier[file] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ff] operator[SEP] identifier[format] operator[==] Other[null] operator[SEP] { identifier[ff] operator[SEP] identifier[format] operator[=] identifier[ATTR_FORMAT_VALUE_DITAMAP] operator[SEP] } } Keyword[for] operator[SEP] Keyword[final] identifier[URI] identifier[file] operator[:] identifier[hrefTopicSet] operator[SEP] { Keyword[final] identifier[FileInfo] identifier[f] operator[=] identifier[getOrCreateFileInfo] operator[SEP] identifier[fileinfos] , identifier[file] operator[SEP] operator[SEP] identifier[f] operator[SEP] identifier[hasLink] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[f] operator[SEP] identifier[format] operator[==] Other[null] operator[&&] identifier[sourceFormat] operator[SEP] identifier[containsKey] operator[SEP] identifier[f] operator[SEP] identifier[src] operator[SEP] operator[SEP] { identifier[f] operator[SEP] identifier[format] operator[=] identifier[sourceFormat] operator[SEP] identifier[get] operator[SEP] identifier[f] operator[SEP] identifier[src] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] Keyword[final] identifier[URI] identifier[file] operator[:] identifier[conrefSet] operator[SEP] { identifier[getOrCreateFileInfo] operator[SEP] identifier[fileinfos] , identifier[file] operator[SEP] operator[SEP] identifier[hasConref] operator[=] literal[boolean] operator[SEP] } Keyword[for] operator[SEP] Keyword[final] identifier[Reference] identifier[file] operator[:] identifier[formatSet] operator[SEP] { identifier[getOrCreateFileInfo] operator[SEP] identifier[fileinfos] , identifier[file] operator[SEP] identifier[filename] operator[SEP] operator[SEP] identifier[format] operator[=] identifier[file] operator[SEP] identifier[format] operator[SEP] } Keyword[for] operator[SEP] Keyword[final] identifier[URI] identifier[file] operator[:] identifier[flagImageSet] operator[SEP] { Keyword[final] identifier[FileInfo] identifier[f] operator[=] identifier[getOrCreateFileInfo] operator[SEP] identifier[fileinfos] , identifier[file] operator[SEP] operator[SEP] identifier[f] operator[SEP] identifier[isFlagImage] operator[=] literal[boolean] operator[SEP] identifier[f] operator[SEP] identifier[format] operator[=] identifier[ATTR_FORMAT_VALUE_IMAGE] operator[SEP] } Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[format] operator[:] identifier[htmlSet] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] identifier[URI] identifier[file] operator[:] identifier[htmlSet] operator[SEP] identifier[get] operator[SEP] identifier[format] operator[SEP] operator[SEP] { identifier[getOrCreateFileInfo] operator[SEP] identifier[fileinfos] , identifier[file] operator[SEP] operator[SEP] identifier[format] operator[=] identifier[format] operator[SEP] } } Keyword[for] operator[SEP] Keyword[final] identifier[URI] identifier[file] operator[:] identifier[hrefTargetSet] operator[SEP] { Keyword[final] identifier[FileInfo] identifier[f] operator[=] identifier[getOrCreateFileInfo] operator[SEP] identifier[fileinfos] , identifier[file] operator[SEP] operator[SEP] identifier[f] operator[SEP] identifier[isTarget] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[f] operator[SEP] identifier[format] operator[==] Other[null] operator[&&] identifier[sourceFormat] operator[SEP] identifier[containsKey] operator[SEP] identifier[f] operator[SEP] identifier[src] operator[SEP] operator[SEP] { identifier[f] operator[SEP] identifier[format] operator[=] identifier[sourceFormat] operator[SEP] identifier[get] operator[SEP] identifier[f] operator[SEP] identifier[src] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] Keyword[final] identifier[URI] identifier[file] operator[:] identifier[schemeSet] operator[SEP] { identifier[getOrCreateFileInfo] operator[SEP] identifier[fileinfos] , identifier[file] operator[SEP] operator[SEP] identifier[isSubjectScheme] operator[=] literal[boolean] operator[SEP] } Keyword[for] operator[SEP] Keyword[final] identifier[URI] identifier[file] operator[:] identifier[coderefTargetSet] operator[SEP] { Keyword[final] identifier[FileInfo] identifier[f] operator[=] identifier[getOrCreateFileInfo] operator[SEP] identifier[fileinfos] , identifier[file] operator[SEP] operator[SEP] identifier[f] operator[SEP] identifier[isSubtarget] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[f] operator[SEP] identifier[format] operator[==] Other[null] operator[SEP] { identifier[f] operator[SEP] identifier[format] operator[=] identifier[PR_D_CODEREF] operator[SEP] identifier[localName] operator[SEP] } } Keyword[for] operator[SEP] Keyword[final] identifier[URI] identifier[file] operator[:] identifier[conrefpushSet] operator[SEP] { identifier[getOrCreateFileInfo] operator[SEP] identifier[fileinfos] , identifier[file] operator[SEP] operator[SEP] identifier[isConrefPush] operator[=] literal[boolean] operator[SEP] } Keyword[for] operator[SEP] Keyword[final] identifier[URI] identifier[file] operator[:] identifier[keyrefSet] operator[SEP] { identifier[getOrCreateFileInfo] operator[SEP] identifier[fileinfos] , identifier[file] operator[SEP] operator[SEP] identifier[hasKeyref] operator[=] literal[boolean] operator[SEP] } Keyword[for] operator[SEP] Keyword[final] identifier[URI] identifier[file] operator[:] identifier[coderefSet] operator[SEP] { identifier[getOrCreateFileInfo] operator[SEP] identifier[fileinfos] , identifier[file] operator[SEP] operator[SEP] identifier[hasCoderef] operator[=] literal[boolean] operator[SEP] } Keyword[for] operator[SEP] Keyword[final] identifier[URI] identifier[file] operator[:] identifier[resourceOnlySet] operator[SEP] { identifier[getOrCreateFileInfo] operator[SEP] identifier[fileinfos] , identifier[file] operator[SEP] operator[SEP] identifier[isResourceOnly] operator[=] literal[boolean] operator[SEP] } identifier[addFlagImagesSetToProperties] operator[SEP] identifier[job] , identifier[relFlagImagesSet] operator[SEP] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[URI] , identifier[URI] operator[>] identifier[filteredCopyTo] operator[=] identifier[filterConflictingCopyTo] operator[SEP] identifier[copyTo] , identifier[fileinfos] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[FileInfo] identifier[fs] operator[:] identifier[fileinfos] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[failureList] operator[SEP] identifier[contains] operator[SEP] identifier[fs] operator[SEP] identifier[src] operator[SEP] operator[SEP] { Keyword[final] identifier[URI] identifier[src] operator[=] identifier[filteredCopyTo] operator[SEP] identifier[get] operator[SEP] identifier[fs] operator[SEP] identifier[src] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[src] operator[!=] Other[null] operator[SEP] { Keyword[final] identifier[FileInfo] identifier[corr] operator[=] Keyword[new] identifier[FileInfo] operator[SEP] identifier[Builder] operator[SEP] identifier[fs] operator[SEP] operator[SEP] identifier[src] operator[SEP] identifier[src] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[job] operator[SEP] identifier[add] operator[SEP] identifier[corr] operator[SEP] operator[SEP] } Keyword[else] { identifier[job] operator[SEP] identifier[add] operator[SEP] identifier[fs] operator[SEP] operator[SEP] } } } Keyword[for] operator[SEP] Keyword[final] identifier[URI] identifier[target] operator[:] identifier[filteredCopyTo] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[URI] identifier[tmp] operator[=] identifier[tempFileNameScheme] operator[SEP] identifier[generateTempFileName] operator[SEP] identifier[target] operator[SEP] operator[SEP] Keyword[final] identifier[FileInfo] identifier[fi] operator[=] Keyword[new] identifier[FileInfo] operator[SEP] identifier[Builder] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[target] operator[SEP] operator[SEP] identifier[uri] operator[SEP] identifier[tmp] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[job] operator[SEP] identifier[add] operator[SEP] identifier[fi] operator[SEP] operator[SEP] } Keyword[final] identifier[FileInfo] identifier[root] operator[=] identifier[job] operator[SEP] identifier[getFileInfo] operator[SEP] identifier[rootFile] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[root] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[job] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[FileInfo] operator[SEP] identifier[Builder] operator[SEP] identifier[root] operator[SEP] operator[SEP] identifier[isInput] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[job] operator[SEP] identifier[tempDir] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[job] operator[SEP] identifier[tempDir] operator[SEP] identifier[mkdirs] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[DITAOTException] operator[SEP] literal[String] operator[+] identifier[job] operator[SEP] identifier[tempDir] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[job] operator[SEP] identifier[write] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[DITAOTException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } Keyword[try] { identifier[SubjectSchemeReader] operator[SEP] identifier[writeMapToXML] operator[SEP] identifier[addMapFilePrefix] operator[SEP] identifier[listFilter] operator[SEP] identifier[getRelationshipGrap] operator[SEP] operator[SEP] operator[SEP] , Keyword[new] identifier[File] operator[SEP] identifier[job] operator[SEP] identifier[tempDir] , identifier[FILE_NAME_SUBJECT_RELATION] operator[SEP] operator[SEP] operator[SEP] identifier[SubjectSchemeReader] operator[SEP] identifier[writeMapToXML] operator[SEP] identifier[addMapFilePrefix] operator[SEP] identifier[schemeDictionary] operator[SEP] , Keyword[new] identifier[File] operator[SEP] identifier[job] operator[SEP] identifier[tempDir] , identifier[FILE_NAME_SUBJECT_DICTIONARY] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[DITAOTException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[INDEX_TYPE_ECLIPSEHELP] operator[SEP] identifier[equals] operator[SEP] identifier[transtype] operator[SEP] operator[SEP] { Keyword[final] identifier[DelayConrefUtils] identifier[delayConrefUtils] operator[=] Keyword[new] identifier[DelayConrefUtils] operator[SEP] operator[SEP] operator[SEP] identifier[delayConrefUtils] operator[SEP] identifier[setLogger] operator[SEP] identifier[logger] operator[SEP] operator[SEP] identifier[delayConrefUtils] operator[SEP] identifier[setJob] operator[SEP] identifier[job] operator[SEP] operator[SEP] identifier[delayConrefUtils] operator[SEP] identifier[writeMapToXML] operator[SEP] identifier[exportAnchorsFilter] operator[SEP] identifier[getPluginMap] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[delayConrefUtils] operator[SEP] identifier[writeExportAnchors] operator[SEP] identifier[exportAnchorsFilter] , identifier[tempFileNameScheme] operator[SEP] operator[SEP] } identifier[KeyDef] operator[SEP] identifier[writeKeydef] operator[SEP] Keyword[new] identifier[File] operator[SEP] identifier[job] operator[SEP] identifier[tempDir] , identifier[SUBJECT_SCHEME_KEYDEF_LIST_FILE] operator[SEP] , identifier[addFilePrefix] operator[SEP] identifier[schemekeydefMap] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private static Set<String> populateTickets(Set<String> source, Set<String> destination) { for (String ticket : source) { if (destination.contains(ticket)) { LOGGER.info("The ticket {} is already present in the collection and is ingored", ticket); } else { destination.add(ticket); } } return destination; }
class class_name[name] begin[{] method[populateTickets, return_type[type[Set]], modifier[private static], parameter[source, destination]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=ticket, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=[], qualifier=destination, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ticket, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=destination, 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="The ticket {} is already present in the collection and is ingored"), MemberReference(member=ticket, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=info, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=source, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ticket)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[member[.destination]] end[}] END[}]
Keyword[private] Keyword[static] identifier[Set] operator[<] identifier[String] operator[>] identifier[populateTickets] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[source] , identifier[Set] operator[<] identifier[String] operator[>] identifier[destination] operator[SEP] { Keyword[for] operator[SEP] identifier[String] identifier[ticket] operator[:] identifier[source] operator[SEP] { Keyword[if] operator[SEP] identifier[destination] operator[SEP] identifier[contains] operator[SEP] identifier[ticket] operator[SEP] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[ticket] operator[SEP] operator[SEP] } Keyword[else] { identifier[destination] operator[SEP] identifier[add] operator[SEP] identifier[ticket] operator[SEP] operator[SEP] } } Keyword[return] identifier[destination] operator[SEP] }
public Matrix4x3d lookAt(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ, Matrix4x3d dest) { if ((properties & PROPERTY_IDENTITY) != 0) return dest.setLookAt(eyeX, eyeY, eyeZ, centerX, centerY, centerZ, upX, upY, upZ); return lookAtGeneric(eyeX, eyeY, eyeZ, centerX, centerY, centerZ, upX, upY, upZ, dest); }
class class_name[name] begin[{] method[lookAt, return_type[type[Matrix4x3d]], modifier[public], parameter[eyeX, eyeY, eyeZ, centerX, centerY, centerZ, upX, upY, upZ, dest]] begin[{] if[binary_operation[binary_operation[member[.properties], &, member[.PROPERTY_IDENTITY]], !=, literal[0]]] begin[{] return[call[dest.setLookAt, parameter[member[.eyeX], member[.eyeY], member[.eyeZ], member[.centerX], member[.centerY], member[.centerZ], member[.upX], member[.upY], member[.upZ]]]] else begin[{] None end[}] return[call[.lookAtGeneric, parameter[member[.eyeX], member[.eyeY], member[.eyeZ], member[.centerX], member[.centerY], member[.centerZ], member[.upX], member[.upY], member[.upZ], member[.dest]]]] end[}] END[}]
Keyword[public] identifier[Matrix4x3d] identifier[lookAt] operator[SEP] Keyword[double] identifier[eyeX] , Keyword[double] identifier[eyeY] , Keyword[double] identifier[eyeZ] , Keyword[double] identifier[centerX] , Keyword[double] identifier[centerY] , Keyword[double] identifier[centerZ] , Keyword[double] identifier[upX] , Keyword[double] identifier[upY] , Keyword[double] identifier[upZ] , identifier[Matrix4x3d] identifier[dest] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[properties] operator[&] identifier[PROPERTY_IDENTITY] operator[SEP] operator[!=] Other[0] operator[SEP] Keyword[return] identifier[dest] operator[SEP] identifier[setLookAt] operator[SEP] identifier[eyeX] , identifier[eyeY] , identifier[eyeZ] , identifier[centerX] , identifier[centerY] , identifier[centerZ] , identifier[upX] , identifier[upY] , identifier[upZ] operator[SEP] operator[SEP] Keyword[return] identifier[lookAtGeneric] operator[SEP] identifier[eyeX] , identifier[eyeY] , identifier[eyeZ] , identifier[centerX] , identifier[centerY] , identifier[centerZ] , identifier[upX] , identifier[upY] , identifier[upZ] , identifier[dest] operator[SEP] operator[SEP] }
public List<I_CmsXmlSchemaType> getRegisteredSchemaTypes() { List<I_CmsXmlSchemaType> result = new ArrayList<I_CmsXmlSchemaType>(m_registeredTypes.values()); Collections.sort(result); return result; }
class class_name[name] begin[{] method[getRegisteredSchemaTypes, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[List], result] call[Collections.sort, parameter[member[.result]]] return[member[.result]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[I_CmsXmlSchemaType] operator[>] identifier[getRegisteredSchemaTypes] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[I_CmsXmlSchemaType] operator[>] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[I_CmsXmlSchemaType] operator[>] operator[SEP] identifier[m_registeredTypes] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Collections] operator[SEP] identifier[sort] operator[SEP] identifier[result] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
public Matrix4f scale(Vector3fc xyz, Matrix4f dest) { return scale(xyz.x(), xyz.y(), xyz.z(), dest); }
class class_name[name] begin[{] method[scale, return_type[type[Matrix4f]], modifier[public], parameter[xyz, dest]] begin[{] return[call[.scale, parameter[call[xyz.x, parameter[]], call[xyz.y, parameter[]], call[xyz.z, parameter[]], member[.dest]]]] end[}] END[}]
Keyword[public] identifier[Matrix4f] identifier[scale] operator[SEP] identifier[Vector3fc] identifier[xyz] , identifier[Matrix4f] identifier[dest] operator[SEP] { Keyword[return] identifier[scale] operator[SEP] identifier[xyz] operator[SEP] identifier[x] operator[SEP] operator[SEP] , identifier[xyz] operator[SEP] identifier[y] operator[SEP] operator[SEP] , identifier[xyz] operator[SEP] identifier[z] operator[SEP] operator[SEP] , identifier[dest] operator[SEP] operator[SEP] }
@Override public ExitStatus afterStep(StepExecution stepExecution) { ExitStatus status = stepExecution.getExitStatus(); List<String> errors = getErrors(); if (errors.size() > 0) { status = status.and(ExitStatus.FAILED); for (String error : errors) { status = status.addExitDescription(error); } resetContextState(); stepExecution.upgradeStatus(BatchStatus.FAILED); stepExecution.setTerminateOnly(); log.error("manifest verification finished: step_execution_id={} " + "job_execution_id={} restore_id={} exit_status=\"{}\"", stepExecution.getId(), stepExecution.getJobExecutionId(), restorationId, status); } else { log.info("manifest verification finished:step_execution_id={} " + "job_execution_id={} restore_id={} exit_status=\"{}\"", stepExecution.getId(), stepExecution.getJobExecutionId(), restorationId, status); status = status.and(ExitStatus.COMPLETED); } return status; }
class class_name[name] begin[{] method[afterStep, return_type[type[ExitStatus]], modifier[public], parameter[stepExecution]] begin[{] local_variable[type[ExitStatus], status] local_variable[type[List], errors] if[binary_operation[call[errors.size, parameter[]], >, literal[0]]] begin[{] assign[member[.status], call[status.and, parameter[member[ExitStatus.FAILED]]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=status, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=error, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addExitDescription, postfix_operators=[], prefix_operators=[], qualifier=status, selectors=[], type_arguments=None)), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=errors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=error)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) call[.resetContextState, parameter[]] call[stepExecution.upgradeStatus, parameter[member[BatchStatus.FAILED]]] call[stepExecution.setTerminateOnly, parameter[]] call[log.error, parameter[binary_operation[literal["manifest verification finished: step_execution_id={} "], +, literal["job_execution_id={} restore_id={} exit_status=\"{}\""]], call[stepExecution.getId, parameter[]], call[stepExecution.getJobExecutionId, parameter[]], member[.restorationId], member[.status]]] else begin[{] call[log.info, parameter[binary_operation[literal["manifest verification finished:step_execution_id={} "], +, literal["job_execution_id={} restore_id={} exit_status=\"{}\""]], call[stepExecution.getId, parameter[]], call[stepExecution.getJobExecutionId, parameter[]], member[.restorationId], member[.status]]] assign[member[.status], call[status.and, parameter[member[ExitStatus.COMPLETED]]]] end[}] return[member[.status]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ExitStatus] identifier[afterStep] operator[SEP] identifier[StepExecution] identifier[stepExecution] operator[SEP] { identifier[ExitStatus] identifier[status] operator[=] identifier[stepExecution] operator[SEP] identifier[getExitStatus] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[errors] operator[=] identifier[getErrors] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[errors] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[status] operator[=] identifier[status] operator[SEP] identifier[and] operator[SEP] identifier[ExitStatus] operator[SEP] identifier[FAILED] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[error] operator[:] identifier[errors] operator[SEP] { identifier[status] operator[=] identifier[status] operator[SEP] identifier[addExitDescription] operator[SEP] identifier[error] operator[SEP] operator[SEP] } identifier[resetContextState] operator[SEP] operator[SEP] operator[SEP] identifier[stepExecution] operator[SEP] identifier[upgradeStatus] operator[SEP] identifier[BatchStatus] operator[SEP] identifier[FAILED] operator[SEP] operator[SEP] identifier[stepExecution] operator[SEP] identifier[setTerminateOnly] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] literal[String] , identifier[stepExecution] operator[SEP] identifier[getId] operator[SEP] operator[SEP] , identifier[stepExecution] operator[SEP] identifier[getJobExecutionId] operator[SEP] operator[SEP] , identifier[restorationId] , identifier[status] operator[SEP] operator[SEP] } Keyword[else] { identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] literal[String] , identifier[stepExecution] operator[SEP] identifier[getId] operator[SEP] operator[SEP] , identifier[stepExecution] operator[SEP] identifier[getJobExecutionId] operator[SEP] operator[SEP] , identifier[restorationId] , identifier[status] operator[SEP] operator[SEP] identifier[status] operator[=] identifier[status] operator[SEP] identifier[and] operator[SEP] identifier[ExitStatus] operator[SEP] identifier[COMPLETED] operator[SEP] operator[SEP] } Keyword[return] identifier[status] operator[SEP] }
public void resetBuffer() throws IllegalStateException { // Shutdown filters without observation if (_out!=null && _out!=_realOut) { ArrayList save_observers=_observers; _observers=null; _nulled=true; try { // discard current buffer and set it to output if (_bufferedOut!=null) { _bufferedOut.resetStream(); if (_bufferedOut instanceof ChunkingOutputStream) ((ChunkingOutputStream)_bufferedOut).setChunking(false); } } catch(Exception e) { LogSupport.ignore(log,e); } finally { _observers=save_observers; } } _contentLength=-1; _nulled=false; _bytes=0; _written=false; _out=_realOut; try { notify(OutputObserver.__RESET_BUFFER); } catch(IOException e) { LogSupport.ignore(log,e); } }
class class_name[name] begin[{] method[resetBuffer, return_type[void], modifier[public], parameter[]] begin[{] if[binary_operation[binary_operation[member[._out], !=, literal[null]], &&, binary_operation[member[._out], !=, member[._realOut]]]] begin[{] local_variable[type[ArrayList], save_observers] assign[member[._observers], literal[null]] assign[member[._nulled], literal[true]] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=_bufferedOut, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=resetStream, postfix_operators=[], prefix_operators=[], qualifier=_bufferedOut, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=_bufferedOut, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=ChunkingOutputStream, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=StatementExpression(expression=Cast(expression=MemberReference(member=_bufferedOut, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ChunkingOutputStream, sub_type=None)), label=None))]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=log, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=ignore, postfix_operators=[], prefix_operators=[], qualifier=LogSupport, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=_observers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=save_observers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)], label=None, resources=None) else begin[{] None end[}] assign[member[._contentLength], literal[1]] assign[member[._nulled], literal[false]] assign[member[._bytes], literal[0]] assign[member[._written], literal[false]] assign[member[._out], member[._realOut]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=__RESET_BUFFER, postfix_operators=[], prefix_operators=[], qualifier=OutputObserver, selectors=[])], member=notify, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=log, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=ignore, postfix_operators=[], prefix_operators=[], qualifier=LogSupport, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[resetBuffer] operator[SEP] operator[SEP] Keyword[throws] identifier[IllegalStateException] { Keyword[if] operator[SEP] identifier[_out] operator[!=] Other[null] operator[&&] identifier[_out] operator[!=] identifier[_realOut] operator[SEP] { identifier[ArrayList] identifier[save_observers] operator[=] identifier[_observers] operator[SEP] identifier[_observers] operator[=] Other[null] operator[SEP] identifier[_nulled] operator[=] literal[boolean] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[_bufferedOut] operator[!=] Other[null] operator[SEP] { identifier[_bufferedOut] operator[SEP] identifier[resetStream] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_bufferedOut] Keyword[instanceof] identifier[ChunkingOutputStream] operator[SEP] operator[SEP] operator[SEP] identifier[ChunkingOutputStream] operator[SEP] identifier[_bufferedOut] operator[SEP] operator[SEP] identifier[setChunking] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[LogSupport] operator[SEP] identifier[ignore] operator[SEP] identifier[log] , identifier[e] operator[SEP] operator[SEP] } Keyword[finally] { identifier[_observers] operator[=] identifier[save_observers] operator[SEP] } } identifier[_contentLength] operator[=] operator[-] Other[1] operator[SEP] identifier[_nulled] operator[=] literal[boolean] operator[SEP] identifier[_bytes] operator[=] Other[0] operator[SEP] identifier[_written] operator[=] literal[boolean] operator[SEP] identifier[_out] operator[=] identifier[_realOut] operator[SEP] Keyword[try] { identifier[notify] operator[SEP] identifier[OutputObserver] operator[SEP] identifier[__RESET_BUFFER] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[LogSupport] operator[SEP] identifier[ignore] operator[SEP] identifier[log] , identifier[e] operator[SEP] operator[SEP] } }
@Override public Atom getAtom(String name) { if ( atomNameLookup != null) return atomNameLookup.get(name); else { /** This is the performance penalty we pay for NOT using the atomnameLookup in PerformanceBehaviour.LESS_MEMORY_SLOWER_PERFORMANCE */ for (Atom a : atoms) { if (a.getName().equals(name)) { return a; } } return null; } }
class class_name[name] begin[{] method[getAtom, return_type[type[Atom]], modifier[public], parameter[name]] begin[{] if[binary_operation[member[.atomNameLookup], !=, literal[null]]] begin[{] return[call[atomNameLookup.get, parameter[member[.name]]]] else begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=a, selectors=[MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=atoms, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=a)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Atom, sub_type=None))), label=None) return[literal[null]] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Atom] identifier[getAtom] operator[SEP] identifier[String] identifier[name] operator[SEP] { Keyword[if] operator[SEP] identifier[atomNameLookup] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[atomNameLookup] operator[SEP] identifier[get] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[else] { Keyword[for] operator[SEP] identifier[Atom] identifier[a] operator[:] identifier[atoms] operator[SEP] { Keyword[if] operator[SEP] identifier[a] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] operator[SEP] { Keyword[return] identifier[a] operator[SEP] } } Keyword[return] Other[null] operator[SEP] } }
public void join(SelectableBySelector ch1, SelectableBySelector ch2) throws IOException { join(ch1.getSelector(), ch2.getSelector(), (ByteChannel)ch1, (ByteChannel)ch2); }
class class_name[name] begin[{] method[join, return_type[void], modifier[public], parameter[ch1, ch2]] begin[{] call[.join, parameter[call[ch1.getSelector, parameter[]], call[ch2.getSelector, parameter[]], Cast(expression=MemberReference(member=ch1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ByteChannel, sub_type=None)), Cast(expression=MemberReference(member=ch2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ByteChannel, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[void] identifier[join] operator[SEP] identifier[SelectableBySelector] identifier[ch1] , identifier[SelectableBySelector] identifier[ch2] operator[SEP] Keyword[throws] identifier[IOException] { identifier[join] operator[SEP] identifier[ch1] operator[SEP] identifier[getSelector] operator[SEP] operator[SEP] , identifier[ch2] operator[SEP] identifier[getSelector] operator[SEP] operator[SEP] , operator[SEP] identifier[ByteChannel] operator[SEP] identifier[ch1] , operator[SEP] identifier[ByteChannel] operator[SEP] identifier[ch2] operator[SEP] operator[SEP] }
private static List<String> expandRange(String expression) throws IllegalArgumentException { int first = 0; int last = 0; try { String[] range = expression.split("-"); first = Integer.parseInt(range[0]); last = Integer.parseInt(range[1]); } catch (Exception e) { throw new IllegalArgumentException("Invalid range specification in oper_expression: " + expression); } List<String> expandedExpression = new ArrayList<String>(last-first+1); for (int i = first; i <= last; i++) { expandedExpression.add(String.valueOf(i)); } return expandedExpression; }
class class_name[name] begin[{] method[expandRange, return_type[type[List]], modifier[private static], parameter[expression]] begin[{] local_variable[type[int], first] local_variable[type[int], last] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="-")], member=split, postfix_operators=[], prefix_operators=[], qualifier=expression, selectors=[], type_arguments=None), name=range)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=first, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=range, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))])], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=last, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=range, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))])], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid range specification in oper_expression: "), operandr=MemberReference(member=expression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=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[List], expandedExpression] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=expandedExpression, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=last, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=first, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.expandedExpression]] end[}] END[}]
Keyword[private] Keyword[static] identifier[List] operator[<] identifier[String] operator[>] identifier[expandRange] operator[SEP] identifier[String] identifier[expression] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] { Keyword[int] identifier[first] operator[=] Other[0] operator[SEP] Keyword[int] identifier[last] operator[=] Other[0] operator[SEP] Keyword[try] { identifier[String] operator[SEP] operator[SEP] identifier[range] operator[=] identifier[expression] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[first] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[range] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[last] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[range] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[expression] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[String] operator[>] identifier[expandedExpression] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] identifier[last] operator[-] identifier[first] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[first] operator[SEP] identifier[i] operator[<=] identifier[last] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[expandedExpression] operator[SEP] identifier[add] operator[SEP] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[expandedExpression] operator[SEP] }
public static Pair<INDArray,int[]> pullLastTimeSteps(INDArray pullFrom, INDArray mask){ //Then: work out, from the mask array, which time step of activations we want, extract activations //Also: record where they came from (so we can do errors later) int[] fwdPassTimeSteps; INDArray out; if (mask == null) { // FIXME: int cast //No mask array -> extract same (last) column for all int lastTS = (int) pullFrom.size(2) - 1; out = pullFrom.get(NDArrayIndex.all(), NDArrayIndex.all(), NDArrayIndex.point(lastTS)); fwdPassTimeSteps = null; //Null -> last time step for all examples } else { val outShape = new long[] {pullFrom.size(0), pullFrom.size(1)}; out = Nd4j.create(outShape); //Want the index of the last non-zero entry in the mask array INDArray lastStepArr = BooleanIndexing.lastIndex(mask, Conditions.epsNotEquals(0.0), 1); fwdPassTimeSteps = lastStepArr.data().asInt(); //Now, get and assign the corresponding subsets of 3d activations: for (int i = 0; i < fwdPassTimeSteps.length; i++) { //TODO can optimize using reshape + pullRows out.putRow(i, pullFrom.get(NDArrayIndex.point(i), NDArrayIndex.all(), NDArrayIndex.point(fwdPassTimeSteps[i]))); } } return new Pair<>(out, fwdPassTimeSteps); }
class class_name[name] begin[{] method[pullLastTimeSteps, return_type[type[Pair]], modifier[public static], parameter[pullFrom, mask]] begin[{] local_variable[type[int], fwdPassTimeSteps] local_variable[type[INDArray], out] if[binary_operation[member[.mask], ==, literal[null]]] begin[{] local_variable[type[int], lastTS] assign[member[.out], call[pullFrom.get, parameter[call[NDArrayIndex.all, parameter[]], call[NDArrayIndex.all, parameter[]], call[NDArrayIndex.point, parameter[member[.lastTS]]]]]] assign[member[.fwdPassTimeSteps], literal[null]] else begin[{] local_variable[type[val], outShape] assign[member[.out], call[Nd4j.create, parameter[member[.outShape]]]] local_variable[type[INDArray], lastStepArr] assign[member[.fwdPassTimeSteps], call[lastStepArr.data, parameter[]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=point, postfix_operators=[], prefix_operators=[], qualifier=NDArrayIndex, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=all, postfix_operators=[], prefix_operators=[], qualifier=NDArrayIndex, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=fwdPassTimeSteps, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=point, postfix_operators=[], prefix_operators=[], qualifier=NDArrayIndex, selectors=[], type_arguments=None)], member=get, postfix_operators=[], prefix_operators=[], qualifier=pullFrom, selectors=[], type_arguments=None)], member=putRow, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=fwdPassTimeSteps, 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[}] return[ClassCreator(arguments=[MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fwdPassTimeSteps, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=Pair, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Pair] operator[<] identifier[INDArray] , Keyword[int] operator[SEP] operator[SEP] operator[>] identifier[pullLastTimeSteps] operator[SEP] identifier[INDArray] identifier[pullFrom] , identifier[INDArray] identifier[mask] operator[SEP] { Keyword[int] operator[SEP] operator[SEP] identifier[fwdPassTimeSteps] operator[SEP] identifier[INDArray] identifier[out] operator[SEP] Keyword[if] operator[SEP] identifier[mask] operator[==] Other[null] operator[SEP] { Keyword[int] identifier[lastTS] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[pullFrom] operator[SEP] identifier[size] operator[SEP] Other[2] operator[SEP] operator[-] Other[1] operator[SEP] identifier[out] operator[=] identifier[pullFrom] operator[SEP] identifier[get] operator[SEP] identifier[NDArrayIndex] operator[SEP] identifier[all] operator[SEP] operator[SEP] , identifier[NDArrayIndex] operator[SEP] identifier[all] operator[SEP] operator[SEP] , identifier[NDArrayIndex] operator[SEP] identifier[point] operator[SEP] identifier[lastTS] operator[SEP] operator[SEP] operator[SEP] identifier[fwdPassTimeSteps] operator[=] Other[null] operator[SEP] } Keyword[else] { identifier[val] identifier[outShape] operator[=] Keyword[new] Keyword[long] operator[SEP] operator[SEP] { identifier[pullFrom] operator[SEP] identifier[size] operator[SEP] Other[0] operator[SEP] , identifier[pullFrom] operator[SEP] identifier[size] operator[SEP] Other[1] operator[SEP] } operator[SEP] identifier[out] operator[=] identifier[Nd4j] operator[SEP] identifier[create] operator[SEP] identifier[outShape] operator[SEP] operator[SEP] identifier[INDArray] identifier[lastStepArr] operator[=] identifier[BooleanIndexing] operator[SEP] identifier[lastIndex] operator[SEP] identifier[mask] , identifier[Conditions] operator[SEP] identifier[epsNotEquals] operator[SEP] literal[Float] operator[SEP] , Other[1] operator[SEP] operator[SEP] identifier[fwdPassTimeSteps] operator[=] identifier[lastStepArr] operator[SEP] identifier[data] operator[SEP] operator[SEP] operator[SEP] identifier[asInt] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[fwdPassTimeSteps] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[out] operator[SEP] identifier[putRow] operator[SEP] identifier[i] , identifier[pullFrom] operator[SEP] identifier[get] operator[SEP] identifier[NDArrayIndex] operator[SEP] identifier[point] operator[SEP] identifier[i] operator[SEP] , identifier[NDArrayIndex] operator[SEP] identifier[all] operator[SEP] operator[SEP] , identifier[NDArrayIndex] operator[SEP] identifier[point] operator[SEP] identifier[fwdPassTimeSteps] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] Keyword[new] identifier[Pair] operator[<] operator[>] operator[SEP] identifier[out] , identifier[fwdPassTimeSteps] operator[SEP] operator[SEP] }
public static List<Class<?>> getParameterizedType(final Class<?> ownerClass, Class<?> genericSuperClass) { Type[] types = null; if (genericSuperClass.isInterface()) { types = ownerClass.getGenericInterfaces(); } else { types = new Type[] { ownerClass.getGenericSuperclass() }; } List<Class<?>> classes = new ArrayList<>(); for (Type type : types) { if (!ParameterizedType.class.isAssignableFrom(type.getClass())) { // the field is it a raw type and does not have generic type // argument. Return empty list. return new ArrayList<Class<?>>(); } ParameterizedType ptype = (ParameterizedType) type; Type[] targs = ptype.getActualTypeArguments(); for (Type aType : targs) { classes.add(extractClass(ownerClass, aType)); } } return classes; }
class class_name[name] begin[{] method[getParameterizedType, return_type[type[List]], modifier[public static], parameter[ownerClass, genericSuperClass]] begin[{] local_variable[type[Type], types] if[call[genericSuperClass.isInterface, parameter[]]] begin[{] assign[member[.types], call[ownerClass.getGenericInterfaces, parameter[]]] else begin[{] assign[member[.types], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[], member=getGenericSuperclass, postfix_operators=[], prefix_operators=[], qualifier=ownerClass, selectors=[], type_arguments=None)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Type, sub_type=None))] end[}] local_variable[type[List], classes] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=ClassReference(postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=type, selectors=[], type_arguments=None)], member=isAssignableFrom, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=ParameterizedType, sub_type=None)), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=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=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ParameterizedType, sub_type=None)), name=ptype)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ParameterizedType, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getActualTypeArguments, postfix_operators=[], prefix_operators=[], qualifier=ptype, selectors=[], type_arguments=None), name=targs)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=Type, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=ownerClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=aType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=extractClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=classes, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=targs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=aType)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Type, sub_type=None))), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=types, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=type)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Type, sub_type=None))), label=None) return[member[.classes]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[getParameterizedType] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[ownerClass] , identifier[Class] operator[<] operator[?] operator[>] identifier[genericSuperClass] operator[SEP] { identifier[Type] operator[SEP] operator[SEP] identifier[types] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[genericSuperClass] operator[SEP] identifier[isInterface] operator[SEP] operator[SEP] operator[SEP] { identifier[types] operator[=] identifier[ownerClass] operator[SEP] identifier[getGenericInterfaces] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[types] operator[=] Keyword[new] identifier[Type] operator[SEP] operator[SEP] { identifier[ownerClass] operator[SEP] identifier[getGenericSuperclass] operator[SEP] operator[SEP] } operator[SEP] } identifier[List] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[classes] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Type] identifier[type] operator[:] identifier[types] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[ParameterizedType] operator[SEP] Keyword[class] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[type] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[ArrayList] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] } identifier[ParameterizedType] identifier[ptype] operator[=] operator[SEP] identifier[ParameterizedType] operator[SEP] identifier[type] operator[SEP] identifier[Type] operator[SEP] operator[SEP] identifier[targs] operator[=] identifier[ptype] operator[SEP] identifier[getActualTypeArguments] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Type] identifier[aType] operator[:] identifier[targs] operator[SEP] { identifier[classes] operator[SEP] identifier[add] operator[SEP] identifier[extractClass] operator[SEP] identifier[ownerClass] , identifier[aType] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[classes] operator[SEP] }
public static String decodeCookie(String string) { if (string == null) { return null; } string = string.replaceAll("%2C", ","); string = string.replaceAll("%3B", ";"); string = string.replaceAll("%25", "%"); return string; }
class class_name[name] begin[{] method[decodeCookie, 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[}] assign[member[.string], call[string.replaceAll, parameter[literal["%2C"], literal[","]]]] assign[member[.string], call[string.replaceAll, parameter[literal["%3B"], literal[";"]]]] assign[member[.string], call[string.replaceAll, parameter[literal["%25"], literal["%"]]]] return[member[.string]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[decodeCookie] 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] } identifier[string] operator[=] identifier[string] operator[SEP] identifier[replaceAll] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[string] operator[=] identifier[string] operator[SEP] identifier[replaceAll] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[string] operator[=] identifier[string] operator[SEP] identifier[replaceAll] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[string] operator[SEP] }
@SuppressWarnings("unchecked") public EList<IfcDocumentReference> getDocumentReferences() { return (EList<IfcDocumentReference>) eGet( Ifc2x3tc1Package.Literals.IFC_DOCUMENT_INFORMATION__DOCUMENT_REFERENCES, true); }
class class_name[name] begin[{] method[getDocumentReferences, return_type[type[EList]], modifier[public], parameter[]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=IFC_DOCUMENT_INFORMATION__DOCUMENT_REFERENCES, postfix_operators=[], prefix_operators=[], qualifier=Ifc2x3tc1Package.Literals, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=eGet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=IfcDocumentReference, sub_type=None))], dimensions=[], name=EList, sub_type=None))] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[EList] operator[<] identifier[IfcDocumentReference] operator[>] identifier[getDocumentReferences] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] identifier[EList] operator[<] identifier[IfcDocumentReference] operator[>] operator[SEP] identifier[eGet] operator[SEP] identifier[Ifc2x3tc1Package] operator[SEP] identifier[Literals] operator[SEP] identifier[IFC_DOCUMENT_INFORMATION__DOCUMENT_REFERENCES] , literal[boolean] operator[SEP] operator[SEP] }
public Observable<FileServerInner> getByResourceGroupAsync(String resourceGroupName, String fileServerName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, fileServerName).map(new Func1<ServiceResponse<FileServerInner>, FileServerInner>() { @Override public FileServerInner call(ServiceResponse<FileServerInner> response) { return response.body(); } }); }
class class_name[name] begin[{] method[getByResourceGroupAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, fileServerName]] begin[{] return[call[.getByResourceGroupWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.fileServerName]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[FileServerInner] operator[>] identifier[getByResourceGroupAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[fileServerName] operator[SEP] { Keyword[return] identifier[getByResourceGroupWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[fileServerName] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[FileServerInner] operator[>] , identifier[FileServerInner] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[FileServerInner] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[FileServerInner] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public List<TypeLiteral<?>> getParameterTypes(Member methodOrConstructor) { Type[] genericParameterTypes; if (methodOrConstructor instanceof Method) { Method method = (Method) methodOrConstructor; checkArgument( method.getDeclaringClass().isAssignableFrom(rawType), "%s is not defined by a supertype of %s", method, type); genericParameterTypes = method.getGenericParameterTypes(); } else if (methodOrConstructor instanceof Constructor) { Constructor<?> constructor = (Constructor<?>) methodOrConstructor; checkArgument( constructor.getDeclaringClass().isAssignableFrom(rawType), "%s does not construct a supertype of %s", constructor, type); genericParameterTypes = constructor.getGenericParameterTypes(); } else { throw new IllegalArgumentException("Not a method or a constructor: " + methodOrConstructor); } return resolveAll(genericParameterTypes); }
class class_name[name] begin[{] method[getParameterTypes, return_type[type[List]], modifier[public], parameter[methodOrConstructor]] begin[{] local_variable[type[Type], genericParameterTypes] if[binary_operation[member[.methodOrConstructor], instanceof, type[Method]]] begin[{] local_variable[type[Method], method] call[.checkArgument, parameter[call[method.getDeclaringClass, parameter[]], literal["%s is not defined by a supertype of %s"], member[.method], member[.type]]] assign[member[.genericParameterTypes], call[method.getGenericParameterTypes, parameter[]]] else begin[{] if[binary_operation[member[.methodOrConstructor], instanceof, type[Constructor]]] begin[{] local_variable[type[Constructor], constructor] call[.checkArgument, parameter[call[constructor.getDeclaringClass, parameter[]], literal["%s does not construct a supertype of %s"], member[.constructor], member[.type]]] assign[member[.genericParameterTypes], call[constructor.getGenericParameterTypes, parameter[]]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Not a method or a constructor: "), operandr=MemberReference(member=methodOrConstructor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) end[}] end[}] return[call[.resolveAll, parameter[member[.genericParameterTypes]]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[TypeLiteral] operator[<] operator[?] operator[>] operator[>] identifier[getParameterTypes] operator[SEP] identifier[Member] identifier[methodOrConstructor] operator[SEP] { identifier[Type] operator[SEP] operator[SEP] identifier[genericParameterTypes] operator[SEP] Keyword[if] operator[SEP] identifier[methodOrConstructor] Keyword[instanceof] identifier[Method] operator[SEP] { identifier[Method] identifier[method] operator[=] operator[SEP] identifier[Method] operator[SEP] identifier[methodOrConstructor] operator[SEP] identifier[checkArgument] operator[SEP] identifier[method] operator[SEP] identifier[getDeclaringClass] operator[SEP] operator[SEP] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[rawType] operator[SEP] , literal[String] , identifier[method] , identifier[type] operator[SEP] operator[SEP] identifier[genericParameterTypes] operator[=] identifier[method] operator[SEP] identifier[getGenericParameterTypes] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[methodOrConstructor] Keyword[instanceof] identifier[Constructor] operator[SEP] { identifier[Constructor] operator[<] operator[?] operator[>] identifier[constructor] operator[=] operator[SEP] identifier[Constructor] operator[<] operator[?] operator[>] operator[SEP] identifier[methodOrConstructor] operator[SEP] identifier[checkArgument] operator[SEP] identifier[constructor] operator[SEP] identifier[getDeclaringClass] operator[SEP] operator[SEP] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[rawType] operator[SEP] , literal[String] , identifier[constructor] , identifier[type] operator[SEP] operator[SEP] identifier[genericParameterTypes] operator[=] identifier[constructor] operator[SEP] identifier[getGenericParameterTypes] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[methodOrConstructor] operator[SEP] operator[SEP] } Keyword[return] identifier[resolveAll] operator[SEP] identifier[genericParameterTypes] operator[SEP] operator[SEP] }
static JMethod getter(FieldOutline fieldOutline) { final JDefinedClass theClass = fieldOutline.parent().implClass; final String publicName = fieldOutline.getPropertyInfo().getName(true); final JMethod getgetter = theClass.getMethod("get" + publicName, NONE); if (getgetter != null) { return getgetter; } else { final JMethod isgetter = theClass .getMethod("is" + publicName, NONE); if (isgetter != null) { return isgetter; } else { return null; } } }
class class_name[name] begin[{] method[getter, return_type[type[JMethod]], modifier[static], parameter[fieldOutline]] begin[{] local_variable[type[JDefinedClass], theClass] local_variable[type[String], publicName] local_variable[type[JMethod], getgetter] if[binary_operation[member[.getgetter], !=, literal[null]]] begin[{] return[member[.getgetter]] else begin[{] local_variable[type[JMethod], isgetter] if[binary_operation[member[.isgetter], !=, literal[null]]] begin[{] return[member[.isgetter]] else begin[{] return[literal[null]] end[}] end[}] end[}] END[}]
Keyword[static] identifier[JMethod] identifier[getter] operator[SEP] identifier[FieldOutline] identifier[fieldOutline] operator[SEP] { Keyword[final] identifier[JDefinedClass] identifier[theClass] operator[=] identifier[fieldOutline] operator[SEP] identifier[parent] operator[SEP] operator[SEP] operator[SEP] identifier[implClass] operator[SEP] Keyword[final] identifier[String] identifier[publicName] operator[=] identifier[fieldOutline] operator[SEP] identifier[getPropertyInfo] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[final] identifier[JMethod] identifier[getgetter] operator[=] identifier[theClass] operator[SEP] identifier[getMethod] operator[SEP] literal[String] operator[+] identifier[publicName] , identifier[NONE] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[getgetter] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[getgetter] operator[SEP] } Keyword[else] { Keyword[final] identifier[JMethod] identifier[isgetter] operator[=] identifier[theClass] operator[SEP] identifier[getMethod] operator[SEP] literal[String] operator[+] identifier[publicName] , identifier[NONE] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isgetter] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[isgetter] operator[SEP] } Keyword[else] { Keyword[return] Other[null] operator[SEP] } } }
static <E> void remove(E[] d, int pos) { for (;;) { int next = getMovedPosition(d, pos); E moved = d[pos] = d[next]; if (moved == null) return; // else pos = next; } }
class class_name[name] begin[{] method[remove, return_type[void], modifier[static], parameter[d, pos]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getMovedPosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=next)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Assignment(expressionl=MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), name=moved)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=E, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=moved, 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=ReturnStatement(expression=None, label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), control=ForControl(condition=None, init=None, update=None), label=None) end[}] END[}]
Keyword[static] operator[<] identifier[E] operator[>] Keyword[void] identifier[remove] operator[SEP] identifier[E] operator[SEP] operator[SEP] identifier[d] , Keyword[int] identifier[pos] operator[SEP] { Keyword[for] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[int] identifier[next] operator[=] identifier[getMovedPosition] operator[SEP] identifier[d] , identifier[pos] operator[SEP] operator[SEP] identifier[E] identifier[moved] operator[=] identifier[d] operator[SEP] identifier[pos] operator[SEP] operator[=] identifier[d] operator[SEP] identifier[next] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[moved] operator[==] Other[null] operator[SEP] Keyword[return] operator[SEP] identifier[pos] operator[=] identifier[next] operator[SEP] } }
protected <T> Iterator<T> providers(Class<T> pCategory) { return getRegistry(pCategory).providers(); }
class class_name[name] begin[{] method[providers, return_type[type[Iterator]], modifier[protected], parameter[pCategory]] begin[{] return[call[.getRegistry, parameter[member[.pCategory]]]] end[}] END[}]
Keyword[protected] operator[<] identifier[T] operator[>] identifier[Iterator] operator[<] identifier[T] operator[>] identifier[providers] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[pCategory] operator[SEP] { Keyword[return] identifier[getRegistry] operator[SEP] identifier[pCategory] operator[SEP] operator[SEP] identifier[providers] operator[SEP] operator[SEP] operator[SEP] }
public <RESP extends J4pResponse<REQ>, REQ extends J4pRequest> RESP execute(REQ pRequest,String pMethod, Map<J4pQueryParameter,String> pProcessingOptions) throws J4pException { return this.<RESP, REQ>execute(pRequest,pMethod,pProcessingOptions,responseExtractor); }
class class_name[name] begin[{] method[execute, return_type[type[RESP]], modifier[public], parameter[pRequest, pMethod, pProcessingOptions]] begin[{] return[THIS[call[None.execute, parameter[member[.pRequest], member[.pMethod], member[.pProcessingOptions], member[.responseExtractor]]]]] end[}] END[}]
Keyword[public] operator[<] identifier[RESP] Keyword[extends] identifier[J4pResponse] operator[<] identifier[REQ] operator[>] , identifier[REQ] Keyword[extends] identifier[J4pRequest] operator[>] identifier[RESP] identifier[execute] operator[SEP] identifier[REQ] identifier[pRequest] , identifier[String] identifier[pMethod] , identifier[Map] operator[<] identifier[J4pQueryParameter] , identifier[String] operator[>] identifier[pProcessingOptions] operator[SEP] Keyword[throws] identifier[J4pException] { Keyword[return] Keyword[this] operator[SEP] operator[<] identifier[RESP] , identifier[REQ] operator[>] identifier[execute] operator[SEP] identifier[pRequest] , identifier[pMethod] , identifier[pProcessingOptions] , identifier[responseExtractor] operator[SEP] operator[SEP] }
private File updateMonitoredDirectory(String newMonitoredFolder) { File oldDir = monitoredDirectory.get(); File newDir = new File(newMonitoredFolder); // If it is relative, resolve against server dir if (!!!newDir.isAbsolute()) { newMonitoredFolder = locationService.resolveString(WsLocationConstants.SYMBOL_SERVER_CONFIG_DIR + newMonitoredFolder); newDir = new File(newMonitoredFolder); } if (!!!newDir.equals(oldDir)) { if (monitoredDirectory.compareAndSet(oldDir, newDir)) { for (ServiceReg<FileMonitor> mon : _monitors.values()) { mon.unregister(); } _monitors.clear(); if (!!!newDir.exists()) { createdMonitoredDir.set(newDir.mkdirs()); } } else { oldDir = null; } } else { oldDir = null; } return oldDir; }
class class_name[name] begin[{] method[updateMonitoredDirectory, return_type[type[File]], modifier[private], parameter[newMonitoredFolder]] begin[{] local_variable[type[File], oldDir] local_variable[type[File], newDir] if[call[newDir.isAbsolute, parameter[]]] begin[{] assign[member[.newMonitoredFolder], call[locationService.resolveString, parameter[binary_operation[member[WsLocationConstants.SYMBOL_SERVER_CONFIG_DIR], +, member[.newMonitoredFolder]]]]] assign[member[.newDir], ClassCreator(arguments=[MemberReference(member=newMonitoredFolder, 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=File, sub_type=None))] else begin[{] None end[}] if[call[newDir.equals, parameter[member[.oldDir]]]] begin[{] if[call[monitoredDirectory.compareAndSet, parameter[member[.oldDir], member[.newDir]]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=unregister, postfix_operators=[], prefix_operators=[], qualifier=mon, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=_monitors, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=mon)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=FileMonitor, sub_type=None))], dimensions=[], name=ServiceReg, sub_type=None))), label=None) call[_monitors.clear, parameter[]] if[call[newDir.exists, parameter[]]] begin[{] call[createdMonitoredDir.set, parameter[call[newDir.mkdirs, parameter[]]]] else begin[{] None end[}] else begin[{] assign[member[.oldDir], literal[null]] end[}] else begin[{] assign[member[.oldDir], literal[null]] end[}] return[member[.oldDir]] end[}] END[}]
Keyword[private] identifier[File] identifier[updateMonitoredDirectory] operator[SEP] identifier[String] identifier[newMonitoredFolder] operator[SEP] { identifier[File] identifier[oldDir] operator[=] identifier[monitoredDirectory] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[File] identifier[newDir] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[newMonitoredFolder] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] operator[!] operator[!] identifier[newDir] operator[SEP] identifier[isAbsolute] operator[SEP] operator[SEP] operator[SEP] { identifier[newMonitoredFolder] operator[=] identifier[locationService] operator[SEP] identifier[resolveString] operator[SEP] identifier[WsLocationConstants] operator[SEP] identifier[SYMBOL_SERVER_CONFIG_DIR] operator[+] identifier[newMonitoredFolder] operator[SEP] operator[SEP] identifier[newDir] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[newMonitoredFolder] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] operator[!] operator[!] identifier[newDir] operator[SEP] identifier[equals] operator[SEP] identifier[oldDir] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[monitoredDirectory] operator[SEP] identifier[compareAndSet] operator[SEP] identifier[oldDir] , identifier[newDir] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[ServiceReg] operator[<] identifier[FileMonitor] operator[>] identifier[mon] operator[:] identifier[_monitors] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { identifier[mon] operator[SEP] identifier[unregister] operator[SEP] operator[SEP] operator[SEP] } identifier[_monitors] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] operator[!] operator[!] identifier[newDir] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { identifier[createdMonitoredDir] operator[SEP] identifier[set] operator[SEP] identifier[newDir] operator[SEP] identifier[mkdirs] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[oldDir] operator[=] Other[null] operator[SEP] } } Keyword[else] { identifier[oldDir] operator[=] Other[null] operator[SEP] } Keyword[return] identifier[oldDir] operator[SEP] }
@Override public EObject create(EClass eClass) { switch (eClass.getClassifierID()) { case XtypePackage.XFUNCTION_TYPE_REF: return createXFunctionTypeRef(); case XtypePackage.XCOMPUTED_TYPE_REFERENCE: return createXComputedTypeReference(); case XtypePackage.XIMPORT_SECTION: return createXImportSection(); case XtypePackage.XIMPORT_DECLARATION: return createXImportDeclaration(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } }
class class_name[name] begin[{] method[create, return_type[type[EObject]], modifier[public], parameter[eClass]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=XFUNCTION_TYPE_REF, postfix_operators=[], prefix_operators=[], qualifier=XtypePackage, selectors=[])], statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=createXFunctionTypeRef, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=[MemberReference(member=XCOMPUTED_TYPE_REFERENCE, postfix_operators=[], prefix_operators=[], qualifier=XtypePackage, selectors=[])], statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=createXComputedTypeReference, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=[MemberReference(member=XIMPORT_SECTION, postfix_operators=[], prefix_operators=[], qualifier=XtypePackage, selectors=[])], statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=createXImportSection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=[MemberReference(member=XIMPORT_DECLARATION, postfix_operators=[], prefix_operators=[], qualifier=XtypePackage, selectors=[])], statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=createXImportDeclaration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The class '"), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=eClass, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' is not a valid classifier"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)])], expression=MethodInvocation(arguments=[], member=getClassifierID, postfix_operators=[], prefix_operators=[], qualifier=eClass, selectors=[], type_arguments=None), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[EObject] identifier[create] operator[SEP] identifier[EClass] identifier[eClass] operator[SEP] { Keyword[switch] operator[SEP] identifier[eClass] operator[SEP] identifier[getClassifierID] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] identifier[XtypePackage] operator[SEP] identifier[XFUNCTION_TYPE_REF] operator[:] Keyword[return] identifier[createXFunctionTypeRef] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[XtypePackage] operator[SEP] identifier[XCOMPUTED_TYPE_REFERENCE] operator[:] Keyword[return] identifier[createXComputedTypeReference] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[XtypePackage] operator[SEP] identifier[XIMPORT_SECTION] operator[:] Keyword[return] identifier[createXImportSection] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[XtypePackage] operator[SEP] identifier[XIMPORT_DECLARATION] operator[:] Keyword[return] identifier[createXImportDeclaration] operator[SEP] operator[SEP] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[eClass] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } }
@Deprecated public static final ParquetMetadata readFooter(Configuration configuration, Path file) throws IOException { return readFooter(configuration, file, NO_FILTER); }
class class_name[name] begin[{] method[readFooter, return_type[type[ParquetMetadata]], modifier[final public static], parameter[configuration, file]] begin[{] return[call[.readFooter, parameter[member[.configuration], member[.file], member[.NO_FILTER]]]] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[public] Keyword[static] Keyword[final] identifier[ParquetMetadata] identifier[readFooter] operator[SEP] identifier[Configuration] identifier[configuration] , identifier[Path] identifier[file] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[return] identifier[readFooter] operator[SEP] identifier[configuration] , identifier[file] , identifier[NO_FILTER] operator[SEP] operator[SEP] }
public static appfwlearningdata[] get(nitro_service service, appfwlearningdata_args args) throws Exception{ appfwlearningdata obj = new appfwlearningdata(); options option = new options(); option.set_args(nitro_util.object_to_string_withoutquotes(args)); appfwlearningdata[] response = (appfwlearningdata[])obj.get_resources(service, option); return response; }
class class_name[name] begin[{] method[get, return_type[type[appfwlearningdata]], modifier[public static], parameter[service, args]] begin[{] local_variable[type[appfwlearningdata], obj] local_variable[type[options], option] call[option.set_args, parameter[call[nitro_util.object_to_string_withoutquotes, parameter[member[.args]]]]] local_variable[type[appfwlearningdata], response] return[member[.response]] end[}] END[}]
Keyword[public] Keyword[static] identifier[appfwlearningdata] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] , identifier[appfwlearningdata_args] identifier[args] operator[SEP] Keyword[throws] identifier[Exception] { identifier[appfwlearningdata] identifier[obj] operator[=] Keyword[new] identifier[appfwlearningdata] 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_args] operator[SEP] identifier[nitro_util] operator[SEP] identifier[object_to_string_withoutquotes] operator[SEP] identifier[args] operator[SEP] operator[SEP] operator[SEP] identifier[appfwlearningdata] operator[SEP] operator[SEP] identifier[response] operator[=] operator[SEP] identifier[appfwlearningdata] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[get_resources] operator[SEP] identifier[service] , identifier[option] operator[SEP] operator[SEP] Keyword[return] identifier[response] operator[SEP] }
public void marshall(StopLabelingJobRequest stopLabelingJobRequest, ProtocolMarshaller protocolMarshaller) { if (stopLabelingJobRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(stopLabelingJobRequest.getLabelingJobName(), LABELINGJOBNAME_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[stopLabelingJobRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.stopLabelingJobRequest], ==, 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=getLabelingJobName, postfix_operators=[], prefix_operators=[], qualifier=stopLabelingJobRequest, selectors=[], type_arguments=None), MemberReference(member=LABELINGJOBNAME_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[StopLabelingJobRequest] identifier[stopLabelingJobRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[stopLabelingJobRequest] 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[stopLabelingJobRequest] operator[SEP] identifier[getLabelingJobName] operator[SEP] operator[SEP] , identifier[LABELINGJOBNAME_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
private double getExpectedProbability(int events) { BigDecimal kFactorial = new BigDecimal(Maths.bigFactorial(events)); double numerator = Math.exp(-mean) * Math.pow(mean, events); return new BigDecimal(numerator).divide(kFactorial, RoundingMode.HALF_UP).doubleValue(); }
class class_name[name] begin[{] method[getExpectedProbability, return_type[type[double]], modifier[private], parameter[events]] begin[{] local_variable[type[BigDecimal], kFactorial] local_variable[type[double], numerator] return[ClassCreator(arguments=[MemberReference(member=numerator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=kFactorial, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=HALF_UP, postfix_operators=[], prefix_operators=[], qualifier=RoundingMode, selectors=[])], member=divide, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=doubleValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=BigDecimal, sub_type=None))] end[}] END[}]
Keyword[private] Keyword[double] identifier[getExpectedProbability] operator[SEP] Keyword[int] identifier[events] operator[SEP] { identifier[BigDecimal] identifier[kFactorial] operator[=] Keyword[new] identifier[BigDecimal] operator[SEP] identifier[Maths] operator[SEP] identifier[bigFactorial] operator[SEP] identifier[events] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[numerator] operator[=] identifier[Math] operator[SEP] identifier[exp] operator[SEP] operator[-] identifier[mean] operator[SEP] operator[*] identifier[Math] operator[SEP] identifier[pow] operator[SEP] identifier[mean] , identifier[events] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[BigDecimal] operator[SEP] identifier[numerator] operator[SEP] operator[SEP] identifier[divide] operator[SEP] identifier[kFactorial] , identifier[RoundingMode] operator[SEP] identifier[HALF_UP] operator[SEP] operator[SEP] identifier[doubleValue] operator[SEP] operator[SEP] operator[SEP] }
@Transactional @Override public MutableAcl createAcl(ObjectIdentity objectIdentity) { Assert.notNull(objectIdentity, "Object Identity required"); // Need to retrieve the current principal, in order to know who "owns" this ACL // (can be changed later on) Sid sid = SidUtils.createSecurityContextSid(); try { // Create the acl_object_identity row createObjectIdentity(objectIdentity, sid); } catch (DuplicateKeyException e) { throw new AlreadyExistsException("Object identity '" + objectIdentity + "' already exists"); } // Retrieve the ACL via superclass (ensures cache registration, proper retrieval // etc) Acl acl = readAclById(objectIdentity); Assert.isInstanceOf(MutableAcl.class, acl, "MutableAcl should be been returned"); return (MutableAcl) acl; }
class class_name[name] begin[{] method[createAcl, return_type[type[MutableAcl]], modifier[public], parameter[objectIdentity]] begin[{] call[Assert.notNull, parameter[member[.objectIdentity], literal["Object Identity required"]]] local_variable[type[Sid], sid] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=objectIdentity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createObjectIdentity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Object identity '"), operandr=MemberReference(member=objectIdentity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' already exists"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AlreadyExistsException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['DuplicateKeyException']))], finally_block=None, label=None, resources=None) local_variable[type[Acl], acl] call[Assert.isInstanceOf, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MutableAcl, sub_type=None)), member[.acl], literal["MutableAcl should be been returned"]]] return[Cast(expression=MemberReference(member=acl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=MutableAcl, sub_type=None))] end[}] END[}]
annotation[@] identifier[Transactional] annotation[@] identifier[Override] Keyword[public] identifier[MutableAcl] identifier[createAcl] operator[SEP] identifier[ObjectIdentity] identifier[objectIdentity] operator[SEP] { identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] identifier[objectIdentity] , literal[String] operator[SEP] operator[SEP] identifier[Sid] identifier[sid] operator[=] identifier[SidUtils] operator[SEP] identifier[createSecurityContextSid] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[createObjectIdentity] operator[SEP] identifier[objectIdentity] , identifier[sid] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[DuplicateKeyException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[AlreadyExistsException] operator[SEP] literal[String] operator[+] identifier[objectIdentity] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[Acl] identifier[acl] operator[=] identifier[readAclById] operator[SEP] identifier[objectIdentity] operator[SEP] operator[SEP] identifier[Assert] operator[SEP] identifier[isInstanceOf] operator[SEP] identifier[MutableAcl] operator[SEP] Keyword[class] , identifier[acl] , literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[MutableAcl] operator[SEP] identifier[acl] operator[SEP] }
public static PowerShellResponse executeSingleCommand(String command) { PowerShellResponse response = null; try (PowerShell session = PowerShell.openSession()) { response = session.executeCommand(command); } catch (PowerShellNotAvailableException ex) { logger.log(Level.SEVERE, "PowerShell not available", ex); } return response; }
class class_name[name] begin[{] method[executeSingleCommand, return_type[type[PowerShellResponse]], modifier[public static], parameter[command]] begin[{] local_variable[type[PowerShellResponse], response] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=response, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=command, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=executeCommand, postfix_operators=[], prefix_operators=[], qualifier=session, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SEVERE, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="PowerShell not available"), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=log, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['PowerShellNotAvailableException']))], finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=session, type=ReferenceType(arguments=None, dimensions=[], name=PowerShell, sub_type=None), value=MethodInvocation(arguments=[], member=openSession, postfix_operators=[], prefix_operators=[], qualifier=PowerShell, selectors=[], type_arguments=None))]) return[member[.response]] end[}] END[}]
Keyword[public] Keyword[static] identifier[PowerShellResponse] identifier[executeSingleCommand] operator[SEP] identifier[String] identifier[command] operator[SEP] { identifier[PowerShellResponse] identifier[response] operator[=] Other[null] operator[SEP] Keyword[try] operator[SEP] identifier[PowerShell] identifier[session] operator[=] identifier[PowerShell] operator[SEP] identifier[openSession] operator[SEP] operator[SEP] operator[SEP] { identifier[response] operator[=] identifier[session] operator[SEP] identifier[executeCommand] operator[SEP] identifier[command] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[PowerShellNotAvailableException] identifier[ex] operator[SEP] { identifier[logger] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[SEVERE] , literal[String] , identifier[ex] operator[SEP] operator[SEP] } Keyword[return] identifier[response] operator[SEP] }
protected void removeAllRecordStoresOfAllMaps(boolean onShutdown, boolean onRecordStoreDestroy) { for (PartitionContainer partitionContainer : partitionContainers) { if (partitionContainer != null) { removeRecordStoresFromPartitionMatchingWith(allRecordStores(), partitionContainer.getPartitionId(), onShutdown, onRecordStoreDestroy); } } }
class class_name[name] begin[{] method[removeAllRecordStoresOfAllMaps, return_type[void], modifier[protected], parameter[onShutdown, onRecordStoreDestroy]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=partitionContainer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=allRecordStores, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getPartitionId, postfix_operators=[], prefix_operators=[], qualifier=partitionContainer, selectors=[], type_arguments=None), MemberReference(member=onShutdown, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=onRecordStoreDestroy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeRecordStoresFromPartitionMatchingWith, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=partitionContainers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=partitionContainer)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PartitionContainer, sub_type=None))), label=None) end[}] END[}]
Keyword[protected] Keyword[void] identifier[removeAllRecordStoresOfAllMaps] operator[SEP] Keyword[boolean] identifier[onShutdown] , Keyword[boolean] identifier[onRecordStoreDestroy] operator[SEP] { Keyword[for] operator[SEP] identifier[PartitionContainer] identifier[partitionContainer] operator[:] identifier[partitionContainers] operator[SEP] { Keyword[if] operator[SEP] identifier[partitionContainer] operator[!=] Other[null] operator[SEP] { identifier[removeRecordStoresFromPartitionMatchingWith] operator[SEP] identifier[allRecordStores] operator[SEP] operator[SEP] , identifier[partitionContainer] operator[SEP] identifier[getPartitionId] operator[SEP] operator[SEP] , identifier[onShutdown] , identifier[onRecordStoreDestroy] operator[SEP] operator[SEP] } } }
public void marshall(DeleteConferenceProviderRequest deleteConferenceProviderRequest, ProtocolMarshaller protocolMarshaller) { if (deleteConferenceProviderRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(deleteConferenceProviderRequest.getConferenceProviderArn(), CONFERENCEPROVIDERARN_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[deleteConferenceProviderRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.deleteConferenceProviderRequest], ==, 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=getConferenceProviderArn, postfix_operators=[], prefix_operators=[], qualifier=deleteConferenceProviderRequest, selectors=[], type_arguments=None), MemberReference(member=CONFERENCEPROVIDERARN_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[DeleteConferenceProviderRequest] identifier[deleteConferenceProviderRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[deleteConferenceProviderRequest] 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[deleteConferenceProviderRequest] operator[SEP] identifier[getConferenceProviderArn] operator[SEP] operator[SEP] , identifier[CONFERENCEPROVIDERARN_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 final boolean contains(final int e) { for (int i = 0; i < size; ++i) if (list[i] == e) return true; return false; }
class class_name[name] begin[{] method[contains, return_type[type[boolean]], modifier[final public], parameter[e]] begin[{] ForStatement(body=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None) return[literal[false]] end[}] END[}]
Keyword[public] Keyword[final] Keyword[boolean] identifier[contains] operator[SEP] Keyword[final] Keyword[int] identifier[e] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[size] operator[SEP] operator[++] identifier[i] operator[SEP] Keyword[if] operator[SEP] identifier[list] operator[SEP] identifier[i] operator[SEP] operator[==] identifier[e] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
private String getVersion(final Class launcherClass, final String groupId, final String artifactId) throws NotAvailableException { String version = null; // try to load from maven properties first try { Properties p = new Properties(); InputStream is = getClass().getResourceAsStream("/META-INF/maven/"+groupId+"/"+artifactId+"/pom.properties"); if (is != null) { p.load(is); version = p.getProperty("version", ""); } } catch (Exception e) { // ignore } // fallback to using Java API if (version == null) { Package launcherPackage = launcherClass.getClass().getPackage(); if (launcherPackage != null) { version = launcherPackage.getImplementationVersion(); if (version == null) { version = launcherPackage.getSpecificationVersion(); } } } if (version == null) { // we could not compute the version so a blank throw new NotAvailableException("Application Version"); } return version; }
class class_name[name] begin[{] method[getVersion, return_type[type[String]], modifier[private], parameter[launcherClass, groupId, artifactId]] begin[{] local_variable[type[String], version] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Properties, sub_type=None)), name=p)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Properties, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/META-INF/maven/"), operandr=MemberReference(member=groupId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/"), operator=+), operandr=MemberReference(member=artifactId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/pom.properties"), operator=+)], member=getResourceAsStream, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=is)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=load, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="version"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=getProperty, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None)), label=None)]))], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) if[binary_operation[member[.version], ==, literal[null]]] begin[{] local_variable[type[Package], launcherPackage] if[binary_operation[member[.launcherPackage], !=, literal[null]]] begin[{] assign[member[.version], call[launcherPackage.getImplementationVersion, parameter[]]] if[binary_operation[member[.version], ==, literal[null]]] begin[{] assign[member[.version], call[launcherPackage.getSpecificationVersion, parameter[]]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[member[.version], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Application Version")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NotAvailableException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.version]] end[}] END[}]
Keyword[private] identifier[String] identifier[getVersion] operator[SEP] Keyword[final] identifier[Class] identifier[launcherClass] , Keyword[final] identifier[String] identifier[groupId] , Keyword[final] identifier[String] identifier[artifactId] operator[SEP] Keyword[throws] identifier[NotAvailableException] { identifier[String] identifier[version] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[Properties] identifier[p] operator[=] Keyword[new] identifier[Properties] operator[SEP] operator[SEP] operator[SEP] identifier[InputStream] identifier[is] operator[=] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getResourceAsStream] operator[SEP] literal[String] operator[+] identifier[groupId] operator[+] literal[String] operator[+] identifier[artifactId] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[is] operator[!=] Other[null] operator[SEP] { identifier[p] operator[SEP] identifier[load] operator[SEP] identifier[is] operator[SEP] operator[SEP] identifier[version] operator[=] identifier[p] operator[SEP] identifier[getProperty] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { } Keyword[if] operator[SEP] identifier[version] operator[==] Other[null] operator[SEP] { identifier[Package] identifier[launcherPackage] operator[=] identifier[launcherClass] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getPackage] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[launcherPackage] operator[!=] Other[null] operator[SEP] { identifier[version] operator[=] identifier[launcherPackage] operator[SEP] identifier[getImplementationVersion] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[version] operator[==] Other[null] operator[SEP] { identifier[version] operator[=] identifier[launcherPackage] operator[SEP] identifier[getSpecificationVersion] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[version] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NotAvailableException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[version] operator[SEP] }
private void addElement(Document document, Element parentElement, String elementName, Object elementValue) { Element element = CollectionExtensionPropertySerializer.toElement(elementValue, document, elementName, this.serializerByClass); if (element != null) { parentElement.appendChild(element); } }
class class_name[name] begin[{] method[addElement, return_type[void], modifier[private], parameter[document, parentElement, elementName, elementValue]] begin[{] local_variable[type[Element], element] if[binary_operation[member[.element], !=, literal[null]]] begin[{] call[parentElement.appendChild, parameter[member[.element]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[addElement] operator[SEP] identifier[Document] identifier[document] , identifier[Element] identifier[parentElement] , identifier[String] identifier[elementName] , identifier[Object] identifier[elementValue] operator[SEP] { identifier[Element] identifier[element] operator[=] identifier[CollectionExtensionPropertySerializer] operator[SEP] identifier[toElement] operator[SEP] identifier[elementValue] , identifier[document] , identifier[elementName] , Keyword[this] operator[SEP] identifier[serializerByClass] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[element] operator[!=] Other[null] operator[SEP] { identifier[parentElement] operator[SEP] identifier[appendChild] operator[SEP] identifier[element] operator[SEP] operator[SEP] } }
@Override public void log(RecoverableUnitSection rus) throws SystemException { if (tc.isEntryEnabled()) Tr.entry(tc, "log", new Object[] { this, rus }); if (tc.isDebugEnabled()) { Tr.debug(tc, "about to log stoken " + Util.toHexString(((XidImpl) _xid).getStoken())); Tr.debug(tc, "about to log recoveryId " + getRecoveryId()); Tr.debug(tc, "about to log seqNo " + ((XidImpl) _xid).getSequenceNumber()); Tr.debug(tc, "ID from pld " + _recoveryData._recoveryId); } // Log the stoken, recoveryId and the sequence number final byte[] stoken = ((XidImpl) _xid).getStoken(); final int recoveryId = (int) getRecoveryId(); final int seqNo = ((XidImpl) _xid).getSequenceNumber(); final byte[] data = new byte[stoken.length + 6]; System.arraycopy(stoken, 0, data, 0, stoken.length); Util.setBytesFromInt(data, stoken.length, 4, recoveryId); Util.setBytesFromInt(data, stoken.length + 4, 2, seqNo); if (tc.isDebugEnabled()) { Tr.debug(tc, "logging stoken " + Util.toHexString(stoken)); Tr.debug(tc, "logging recoveryId " + recoveryId); Tr.debug(tc, "logging seqNo " + seqNo); Tr.debug(tc, "Actual data logged", Util.toHexString(data)); } try { rus.addData(data); } catch (Exception exc) { FFDCFilter.processException(exc, "com.ibm.ws.Transaction.JTA.JTAXAResourceImpl.log", "326", this); if (tc.isEventEnabled()) Tr.event(tc, "Exception raised adding data to the transaction log", exc); throw new SystemException(exc.toString()); } finally { if (tc.isEntryEnabled()) Tr.exit(tc, "log"); } }
class class_name[name] begin[{] method[log, return_type[void], modifier[public], parameter[rus]] begin[{] if[call[tc.isEntryEnabled, parameter[]]] begin[{] call[Tr.entry, parameter[member[.tc], literal["log"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=rus, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]] else begin[{] None end[}] if[call[tc.isDebugEnabled, parameter[]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[literal["about to log stoken "], +, call[Util.toHexString, parameter[Cast(expression=MemberReference(member=_xid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=XidImpl, sub_type=None))]]]]] call[Tr.debug, parameter[member[.tc], binary_operation[literal["about to log recoveryId "], +, call[.getRecoveryId, parameter[]]]]] call[Tr.debug, parameter[member[.tc], binary_operation[literal["about to log seqNo "], +, Cast(expression=MemberReference(member=_xid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=XidImpl, sub_type=None))]]] call[Tr.debug, parameter[member[.tc], binary_operation[literal["ID from pld "], +, member[_recoveryData._recoveryId]]]] else begin[{] None end[}] local_variable[type[byte], stoken] local_variable[type[int], recoveryId] local_variable[type[int], seqNo] local_variable[type[byte], data] call[System.arraycopy, parameter[member[.stoken], literal[0], member[.data], literal[0], member[stoken.length]]] call[Util.setBytesFromInt, parameter[member[.data], member[stoken.length], literal[4], member[.recoveryId]]] call[Util.setBytesFromInt, parameter[member[.data], binary_operation[member[stoken.length], +, literal[4]], literal[2], member[.seqNo]]] if[call[tc.isDebugEnabled, parameter[]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[literal["logging stoken "], +, call[Util.toHexString, parameter[member[.stoken]]]]]] call[Tr.debug, parameter[member[.tc], binary_operation[literal["logging recoveryId "], +, member[.recoveryId]]]] call[Tr.debug, parameter[member[.tc], binary_operation[literal["logging seqNo "], +, member[.seqNo]]]] call[Tr.debug, parameter[member[.tc], literal["Actual data logged"], call[Util.toHexString, parameter[member[.data]]]]] else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addData, postfix_operators=[], prefix_operators=[], qualifier=rus, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=exc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ws.Transaction.JTA.JTAXAResourceImpl.log"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="326"), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isEventEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Exception raised adding data to the transaction log"), MemberReference(member=exc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=event, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)), ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=exc, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SystemException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=exc, types=['Exception']))], finally_block=[IfStatement(condition=MethodInvocation(arguments=[], member=isEntryEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="log")], member=exit, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None))], label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[log] operator[SEP] identifier[RecoverableUnitSection] identifier[rus] operator[SEP] Keyword[throws] identifier[SystemException] { Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { Keyword[this] , identifier[rus] } 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[Util] operator[SEP] identifier[toHexString] operator[SEP] operator[SEP] operator[SEP] identifier[XidImpl] operator[SEP] identifier[_xid] operator[SEP] operator[SEP] identifier[getStoken] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[getRecoveryId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] operator[SEP] operator[SEP] identifier[XidImpl] operator[SEP] identifier[_xid] operator[SEP] operator[SEP] identifier[getSequenceNumber] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[_recoveryData] operator[SEP] identifier[_recoveryId] operator[SEP] operator[SEP] } Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[stoken] operator[=] operator[SEP] operator[SEP] identifier[XidImpl] operator[SEP] identifier[_xid] operator[SEP] operator[SEP] identifier[getStoken] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[recoveryId] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[getRecoveryId] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[seqNo] operator[=] operator[SEP] operator[SEP] identifier[XidImpl] operator[SEP] identifier[_xid] operator[SEP] operator[SEP] identifier[getSequenceNumber] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[data] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[stoken] operator[SEP] identifier[length] operator[+] Other[6] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[stoken] , Other[0] , identifier[data] , Other[0] , identifier[stoken] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[Util] operator[SEP] identifier[setBytesFromInt] operator[SEP] identifier[data] , identifier[stoken] operator[SEP] identifier[length] , Other[4] , identifier[recoveryId] operator[SEP] operator[SEP] identifier[Util] operator[SEP] identifier[setBytesFromInt] operator[SEP] identifier[data] , identifier[stoken] operator[SEP] identifier[length] operator[+] Other[4] , Other[2] , identifier[seqNo] 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[Util] operator[SEP] identifier[toHexString] operator[SEP] identifier[stoken] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[recoveryId] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[seqNo] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] , identifier[Util] operator[SEP] identifier[toHexString] operator[SEP] identifier[data] operator[SEP] operator[SEP] operator[SEP] } Keyword[try] { identifier[rus] operator[SEP] identifier[addData] operator[SEP] identifier[data] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[exc] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[exc] , literal[String] , literal[String] , Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEventEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[event] operator[SEP] identifier[tc] , literal[String] , identifier[exc] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[SystemException] operator[SEP] identifier[exc] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] } }
public void setWhitelist(java.util.Collection<String> whitelist) { if (whitelist == null) { this.whitelist = null; return; } this.whitelist = new java.util.ArrayList<String>(whitelist); }
class class_name[name] begin[{] method[setWhitelist, return_type[void], modifier[public], parameter[whitelist]] begin[{] if[binary_operation[member[.whitelist], ==, literal[null]]] begin[{] assign[THIS[member[None.whitelist]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.whitelist]], ClassCreator(arguments=[MemberReference(member=whitelist, 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=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setWhitelist] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[whitelist] operator[SEP] { Keyword[if] operator[SEP] identifier[whitelist] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[whitelist] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[whitelist] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] identifier[whitelist] operator[SEP] operator[SEP] }
public void addProcedureArgument(ProcedureArgumentDef argDef) { argDef.setOwner(this); _procedureArguments.put(argDef.getName(), argDef); }
class class_name[name] begin[{] method[addProcedureArgument, return_type[void], modifier[public], parameter[argDef]] begin[{] call[argDef.setOwner, parameter[THIS[]]] call[_procedureArguments.put, parameter[call[argDef.getName, parameter[]], member[.argDef]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addProcedureArgument] operator[SEP] identifier[ProcedureArgumentDef] identifier[argDef] operator[SEP] { identifier[argDef] operator[SEP] identifier[setOwner] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[_procedureArguments] operator[SEP] identifier[put] operator[SEP] identifier[argDef] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[argDef] operator[SEP] operator[SEP] }
private Object readResolve() { Chronology base = getBase(); return base == null ? getInstanceUTC() : getInstance(base.getZone()); }
class class_name[name] begin[{] method[readResolve, return_type[type[Object]], modifier[private], parameter[]] begin[{] local_variable[type[Chronology], base] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=base, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getZone, postfix_operators=[], prefix_operators=[], qualifier=base, selectors=[], type_arguments=None)], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[], member=getInstanceUTC, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None))] end[}] END[}]
Keyword[private] identifier[Object] identifier[readResolve] operator[SEP] operator[SEP] { identifier[Chronology] identifier[base] operator[=] identifier[getBase] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[base] operator[==] Other[null] operator[?] identifier[getInstanceUTC] operator[SEP] operator[SEP] operator[:] identifier[getInstance] operator[SEP] identifier[base] operator[SEP] identifier[getZone] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
protected void addCommitError(Exception error) { if (m_commitErrors == null) { m_commitErrors = new ArrayList<Throwable>(); } m_commitErrors.add(error); }
class class_name[name] begin[{] method[addCommitError, return_type[void], modifier[protected], parameter[error]] begin[{] if[binary_operation[member[.m_commitErrors], ==, literal[null]]] begin[{] assign[member[.m_commitErrors], 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=Throwable, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))] else begin[{] None end[}] call[m_commitErrors.add, parameter[member[.error]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[addCommitError] operator[SEP] identifier[Exception] identifier[error] operator[SEP] { Keyword[if] operator[SEP] identifier[m_commitErrors] operator[==] Other[null] operator[SEP] { identifier[m_commitErrors] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Throwable] operator[>] operator[SEP] operator[SEP] operator[SEP] } identifier[m_commitErrors] operator[SEP] identifier[add] operator[SEP] identifier[error] operator[SEP] operator[SEP] }
public static <T> List<T> grep(List<T> self) { return grep(self, Closure.IDENTITY); }
class class_name[name] begin[{] method[grep, return_type[type[List]], modifier[public static], parameter[self]] begin[{] return[call[.grep, parameter[member[.self], member[Closure.IDENTITY]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[grep] operator[SEP] identifier[List] operator[<] identifier[T] operator[>] identifier[self] operator[SEP] { Keyword[return] identifier[grep] operator[SEP] identifier[self] , identifier[Closure] operator[SEP] identifier[IDENTITY] operator[SEP] operator[SEP] }
public static String simpleFormat (String text) { // first replace the image and other URLs Matcher m = URL_PAT.matcher(text); StringBuffer tbuf = new StringBuffer(); while (m.find()) { String match = m.group(); String lmatch = match.toLowerCase(); if (lmatch.endsWith(".png") || lmatch.endsWith(".jpg") || lmatch.endsWith(".gif")) { match = "<img src=\"" + match + "\">"; } else { match = "<a href=\"" + match + "\">" + match + "</a>"; } m.appendReplacement(tbuf, match); } m.appendTail(tbuf); // then do our paragraph and list processing String[] lines = StringUtil.split(tbuf.toString(), "\n"); StringBuilder lbuf = new StringBuilder(); boolean inpara = false, inlist = false; for (String line2 : lines) { String line = line2; if (StringUtil.isBlank(line2)) { if (inlist) { lbuf.append("</ul>"); inlist = false; } if (inpara) { lbuf.append("</p>\n"); inpara = false; } continue; } if (!inpara) { inpara = true; lbuf.append("<p> "); } if (line.startsWith("*")) { if (inlist) { lbuf.append("<li>"); } else { lbuf.append("<ul><li>"); inlist = true; } line = line.substring(1); } lbuf.append(line).append("\n"); } if (inlist) { lbuf.append("</ul>"); } if (inpara) { lbuf.append("</p>\n"); } return lbuf.toString().trim(); }
class class_name[name] begin[{] method[simpleFormat, return_type[type[String]], modifier[public static], parameter[text]] begin[{] local_variable[type[Matcher], m] local_variable[type[StringBuffer], tbuf] while[call[m.find, parameter[]]] begin[{] local_variable[type[String], match] local_variable[type[String], lmatch] if[binary_operation[binary_operation[call[lmatch.endsWith, parameter[literal[".png"]]], ||, call[lmatch.endsWith, parameter[literal[".jpg"]]]], ||, call[lmatch.endsWith, parameter[literal[".gif"]]]]] begin[{] assign[member[.match], binary_operation[binary_operation[literal["<img src=\""], +, member[.match]], +, literal["\">"]]] else begin[{] assign[member[.match], binary_operation[binary_operation[binary_operation[binary_operation[literal["<a href=\""], +, member[.match]], +, literal["\">"]], +, member[.match]], +, literal["</a>"]]] end[}] call[m.appendReplacement, parameter[member[.tbuf], member[.match]]] end[}] call[m.appendTail, parameter[member[.tbuf]]] local_variable[type[String], lines] local_variable[type[StringBuilder], lbuf] local_variable[type[boolean], inpara] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=line2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=line)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=line2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isBlank, postfix_operators=[], prefix_operators=[], qualifier=StringUtil, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=inlist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="</ul>")], member=append, postfix_operators=[], prefix_operators=[], qualifier=lbuf, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=inlist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)])), IfStatement(condition=MemberReference(member=inpara, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="</p>\n")], member=append, postfix_operators=[], prefix_operators=[], qualifier=lbuf, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=inpara, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)])), ContinueStatement(goto=None, label=None)])), IfStatement(condition=MemberReference(member=inpara, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=inpara, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="<p> ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=lbuf, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="*")], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=inlist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="<ul><li>")], member=append, postfix_operators=[], prefix_operators=[], qualifier=lbuf, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=inlist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="<li>")], member=append, postfix_operators=[], prefix_operators=[], qualifier=lbuf, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=lbuf, 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)]), control=EnhancedForControl(iterable=MemberReference(member=lines, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=line2)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) if[member[.inlist]] begin[{] call[lbuf.append, parameter[literal["</ul>"]]] else begin[{] None end[}] if[member[.inpara]] begin[{] call[lbuf.append, parameter[literal["</p>\n"]]] else begin[{] None end[}] return[call[lbuf.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[simpleFormat] operator[SEP] identifier[String] identifier[text] operator[SEP] { identifier[Matcher] identifier[m] operator[=] identifier[URL_PAT] operator[SEP] identifier[matcher] operator[SEP] identifier[text] operator[SEP] operator[SEP] identifier[StringBuffer] identifier[tbuf] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[m] operator[SEP] identifier[find] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[match] operator[=] identifier[m] operator[SEP] identifier[group] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[lmatch] operator[=] identifier[match] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[lmatch] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[lmatch] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[lmatch] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[match] operator[=] literal[String] operator[+] identifier[match] operator[+] literal[String] operator[SEP] } Keyword[else] { identifier[match] operator[=] literal[String] operator[+] identifier[match] operator[+] literal[String] operator[+] identifier[match] operator[+] literal[String] operator[SEP] } identifier[m] operator[SEP] identifier[appendReplacement] operator[SEP] identifier[tbuf] , identifier[match] operator[SEP] operator[SEP] } identifier[m] operator[SEP] identifier[appendTail] operator[SEP] identifier[tbuf] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[lines] operator[=] identifier[StringUtil] operator[SEP] identifier[split] operator[SEP] identifier[tbuf] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[lbuf] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[inpara] operator[=] literal[boolean] , identifier[inlist] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[line2] operator[:] identifier[lines] operator[SEP] { identifier[String] identifier[line] operator[=] identifier[line2] operator[SEP] Keyword[if] operator[SEP] identifier[StringUtil] operator[SEP] identifier[isBlank] operator[SEP] identifier[line2] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[inlist] operator[SEP] { identifier[lbuf] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[inlist] operator[=] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[inpara] operator[SEP] { identifier[lbuf] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[inpara] operator[=] literal[boolean] operator[SEP] } Keyword[continue] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[inpara] operator[SEP] { identifier[inpara] operator[=] literal[boolean] operator[SEP] identifier[lbuf] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[line] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[inlist] operator[SEP] { identifier[lbuf] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[lbuf] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[inlist] operator[=] literal[boolean] operator[SEP] } identifier[line] operator[=] identifier[line] operator[SEP] identifier[substring] operator[SEP] Other[1] operator[SEP] operator[SEP] } identifier[lbuf] operator[SEP] identifier[append] operator[SEP] identifier[line] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[inlist] operator[SEP] { identifier[lbuf] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[inpara] operator[SEP] { identifier[lbuf] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[lbuf] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] }
public JobDetails getJobByJobID(QualifiedJobId jobId, boolean populateTasks) throws IOException { JobDetails job = null; JobKey key = idService.getJobKeyById(jobId); if (key != null) { byte[] historyKey = jobKeyConv.toBytes(key); Table historyTable = hbaseConnection.getTable(TableName.valueOf(Constants.HISTORY_TABLE)); Result result = historyTable.get(new Get(historyKey)); historyTable.close(); if (result != null && !result.isEmpty()) { job = new JobDetails(key); job.populate(result); if (populateTasks) { populateTasks(job); } } } return job; }
class class_name[name] begin[{] method[getJobByJobID, return_type[type[JobDetails]], modifier[public], parameter[jobId, populateTasks]] begin[{] local_variable[type[JobDetails], job] local_variable[type[JobKey], key] if[binary_operation[member[.key], !=, literal[null]]] begin[{] local_variable[type[byte], historyKey] local_variable[type[Table], historyTable] local_variable[type[Result], result] call[historyTable.close, parameter[]] if[binary_operation[binary_operation[member[.result], !=, literal[null]], &&, call[result.isEmpty, parameter[]]]] begin[{] assign[member[.job], ClassCreator(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JobDetails, sub_type=None))] call[job.populate, parameter[member[.result]]] if[member[.populateTasks]] begin[{] call[.populateTasks, parameter[member[.job]]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] return[member[.job]] end[}] END[}]
Keyword[public] identifier[JobDetails] identifier[getJobByJobID] operator[SEP] identifier[QualifiedJobId] identifier[jobId] , Keyword[boolean] identifier[populateTasks] operator[SEP] Keyword[throws] identifier[IOException] { identifier[JobDetails] identifier[job] operator[=] Other[null] operator[SEP] identifier[JobKey] identifier[key] operator[=] identifier[idService] operator[SEP] identifier[getJobKeyById] operator[SEP] identifier[jobId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[key] operator[!=] Other[null] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[historyKey] operator[=] identifier[jobKeyConv] operator[SEP] identifier[toBytes] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[Table] identifier[historyTable] operator[=] identifier[hbaseConnection] operator[SEP] identifier[getTable] operator[SEP] identifier[TableName] operator[SEP] identifier[valueOf] operator[SEP] identifier[Constants] operator[SEP] identifier[HISTORY_TABLE] operator[SEP] operator[SEP] operator[SEP] identifier[Result] identifier[result] operator[=] identifier[historyTable] operator[SEP] identifier[get] operator[SEP] Keyword[new] identifier[Get] operator[SEP] identifier[historyKey] operator[SEP] operator[SEP] operator[SEP] identifier[historyTable] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[!=] Other[null] operator[&&] operator[!] identifier[result] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[job] operator[=] Keyword[new] identifier[JobDetails] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[job] operator[SEP] identifier[populate] operator[SEP] identifier[result] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[populateTasks] operator[SEP] { identifier[populateTasks] operator[SEP] identifier[job] operator[SEP] operator[SEP] } } } Keyword[return] identifier[job] operator[SEP] }
private void replaceParentClassesForAtomics(ClassOrInterfaceDeclaration n) { for (ClassOrInterfaceType parent : n.getExtendedTypes()) { if ("ConcurrentCircularArrayQueue".equals(parent.getNameAsString())) { parent.setName("AtomicReferenceArrayQueue"); } else if ("ConcurrentSequencedCircularArrayQueue".equals(parent.getNameAsString())) { parent.setName("SequencedAtomicReferenceArrayQueue"); } else { // Padded super classes are to be renamed and thus so does the // class we must extend. parent.setName(translateQueueName(parent.getNameAsString())); } } }
class class_name[name] begin[{] method[replaceParentClassesForAtomics, return_type[void], modifier[private], parameter[n]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNameAsString, postfix_operators=[], prefix_operators=[], qualifier=parent, selectors=[], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], value="ConcurrentCircularArrayQueue"), else_statement=IfStatement(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNameAsString, postfix_operators=[], prefix_operators=[], qualifier=parent, selectors=[], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], value="ConcurrentSequencedCircularArrayQueue"), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNameAsString, postfix_operators=[], prefix_operators=[], qualifier=parent, selectors=[], type_arguments=None)], member=translateQueueName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=setName, postfix_operators=[], prefix_operators=[], qualifier=parent, 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="SequencedAtomicReferenceArrayQueue")], member=setName, postfix_operators=[], prefix_operators=[], qualifier=parent, 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="AtomicReferenceArrayQueue")], member=setName, postfix_operators=[], prefix_operators=[], qualifier=parent, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getExtendedTypes, postfix_operators=[], prefix_operators=[], qualifier=n, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=parent)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ClassOrInterfaceType, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[replaceParentClassesForAtomics] operator[SEP] identifier[ClassOrInterfaceDeclaration] identifier[n] operator[SEP] { Keyword[for] operator[SEP] identifier[ClassOrInterfaceType] identifier[parent] operator[:] identifier[n] operator[SEP] identifier[getExtendedTypes] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[parent] operator[SEP] identifier[getNameAsString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[parent] operator[SEP] identifier[setName] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[parent] operator[SEP] identifier[getNameAsString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[parent] operator[SEP] identifier[setName] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[parent] operator[SEP] identifier[setName] operator[SEP] identifier[translateQueueName] operator[SEP] identifier[parent] operator[SEP] identifier[getNameAsString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } }
public static ErrorDetails exceptionName( Throwable t ) { return new ErrorDetails( t.getClass().getName(), ErrorDetailsKind.EXCEPTION_NAME ); }
class class_name[name] begin[{] method[exceptionName, return_type[type[ErrorDetails]], modifier[public static], parameter[t]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=EXCEPTION_NAME, postfix_operators=[], prefix_operators=[], qualifier=ErrorDetailsKind, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ErrorDetails, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[ErrorDetails] identifier[exceptionName] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { Keyword[return] Keyword[new] identifier[ErrorDetails] operator[SEP] identifier[t] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[ErrorDetailsKind] operator[SEP] identifier[EXCEPTION_NAME] operator[SEP] operator[SEP] }