code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public static <T, U extends Comparable<? super U>> Collector<T, ?, Seq<U>> maxAll(Function<? super T, ? extends U> function) { return maxAll(function, naturalOrder()); }
class class_name[name] begin[{] method[maxAll, return_type[type[Collector]], modifier[public static], parameter[function]] begin[{] return[call[.maxAll, parameter[member[.function], call[.naturalOrder, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[U] Keyword[extends] identifier[Comparable] operator[<] operator[?] Keyword[super] identifier[U] operator[>] operator[>] identifier[Collector] operator[<] identifier[T] , operator[?] , identifier[Seq] operator[<] identifier[U] operator[>] operator[>] identifier[maxAll] operator[SEP] identifier[Function] operator[<] operator[?] Keyword[super] identifier[T] , operator[?] Keyword[extends] identifier[U] operator[>] identifier[function] operator[SEP] { Keyword[return] identifier[maxAll] operator[SEP] identifier[function] , identifier[naturalOrder] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static void main(String[] args) throws Exception { CustomHeaderClient client = new CustomHeaderClient("localhost", 50051); try { /* Access a service running on the local machine on port 50051 */ String user = "world"; if (args.length > 0) { user = args[0]; /* Use the arg as the name to greet if provided */ } client.greet(user); } finally { client.shutdown(); } }
class class_name[name] begin[{] method[main, return_type[void], modifier[public static], parameter[args]] begin[{] local_variable[type[CustomHeaderClient], client] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="world"), name=user)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=args, 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=user, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))])), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=user, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=greet, postfix_operators=[], prefix_operators=[], qualifier=client, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=shutdown, postfix_operators=[], prefix_operators=[], qualifier=client, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[Exception] { identifier[CustomHeaderClient] identifier[client] operator[=] Keyword[new] identifier[CustomHeaderClient] operator[SEP] literal[String] , Other[50051] operator[SEP] operator[SEP] Keyword[try] { identifier[String] identifier[user] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[args] operator[SEP] identifier[length] operator[>] Other[0] operator[SEP] { identifier[user] operator[=] identifier[args] operator[SEP] Other[0] operator[SEP] operator[SEP] } identifier[client] operator[SEP] identifier[greet] operator[SEP] identifier[user] operator[SEP] operator[SEP] } Keyword[finally] { identifier[client] operator[SEP] identifier[shutdown] operator[SEP] operator[SEP] operator[SEP] } }
public boolean implicitlyCloseParentTagOnTagEnd(String parentNodeName, String nodeName) { if (parentNodeName == null) { return false; } parentNodeName = parentNodeName.toLowerCase(); nodeName = nodeName.toLowerCase(); for (int i = 0; i < IMPLIED_ON_END.length; i += 2) { if (StringUtil.equalsOne(nodeName, IMPLIED_ON_END[i]) != -1) { if (StringUtil.equalsOne(parentNodeName, IMPLIED_ON_END[i + 1]) != -1) { return true; } } } return false; }
class class_name[name] begin[{] method[implicitlyCloseParentTagOnTagEnd, return_type[type[boolean]], modifier[public], parameter[parentNodeName, nodeName]] begin[{] if[binary_operation[member[.parentNodeName], ==, literal[null]]] begin[{] return[literal[false]] else begin[{] None end[}] assign[member[.parentNodeName], call[parentNodeName.toLowerCase, parameter[]]] assign[member[.nodeName], call[nodeName.toLowerCase, parameter[]]] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=nodeName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=IMPLIED_ON_END, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=equalsOne, postfix_operators=[], prefix_operators=[], qualifier=StringUtil, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=parentNodeName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=IMPLIED_ON_END, 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=+))])], member=equalsOne, postfix_operators=[], prefix_operators=[], qualifier=StringUtil, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]))]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=IMPLIED_ON_END, 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=[Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2))]), label=None) return[literal[false]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[implicitlyCloseParentTagOnTagEnd] operator[SEP] identifier[String] identifier[parentNodeName] , identifier[String] identifier[nodeName] operator[SEP] { Keyword[if] operator[SEP] identifier[parentNodeName] operator[==] Other[null] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[parentNodeName] operator[=] identifier[parentNodeName] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] identifier[nodeName] operator[=] identifier[nodeName] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[IMPLIED_ON_END] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[+=] Other[2] operator[SEP] { Keyword[if] operator[SEP] identifier[StringUtil] operator[SEP] identifier[equalsOne] operator[SEP] identifier[nodeName] , identifier[IMPLIED_ON_END] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[!=] operator[-] Other[1] operator[SEP] { Keyword[if] operator[SEP] identifier[StringUtil] operator[SEP] identifier[equalsOne] operator[SEP] identifier[parentNodeName] , identifier[IMPLIED_ON_END] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] operator[!=] operator[-] Other[1] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } } Keyword[return] literal[boolean] operator[SEP] }
public void addGlobal(String messageKey, Object... args) { assertObjectNotNull("messageKey", messageKey); doAddMessages(prepareUserMessages(globalPropertyKey, messageKey, args)); }
class class_name[name] begin[{] method[addGlobal, return_type[void], modifier[public], parameter[messageKey, args]] begin[{] call[.assertObjectNotNull, parameter[literal["messageKey"], member[.messageKey]]] call[.doAddMessages, parameter[call[.prepareUserMessages, parameter[member[.globalPropertyKey], member[.messageKey], member[.args]]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addGlobal] operator[SEP] identifier[String] identifier[messageKey] , identifier[Object] operator[...] identifier[args] operator[SEP] { identifier[assertObjectNotNull] operator[SEP] literal[String] , identifier[messageKey] operator[SEP] operator[SEP] identifier[doAddMessages] operator[SEP] identifier[prepareUserMessages] operator[SEP] identifier[globalPropertyKey] , identifier[messageKey] , identifier[args] operator[SEP] operator[SEP] operator[SEP] }
public void sort(final IndexedSortable s, int p, int r) { sortInternal(s, p, r, getMaxDepth(r - p)); }
class class_name[name] begin[{] method[sort, return_type[void], modifier[public], parameter[s, p, r]] begin[{] call[.sortInternal, parameter[member[.s], member[.p], member[.r], call[.getMaxDepth, parameter[binary_operation[member[.r], -, member[.p]]]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[sort] operator[SEP] Keyword[final] identifier[IndexedSortable] identifier[s] , Keyword[int] identifier[p] , Keyword[int] identifier[r] operator[SEP] { identifier[sortInternal] operator[SEP] identifier[s] , identifier[p] , identifier[r] , identifier[getMaxDepth] operator[SEP] identifier[r] operator[-] identifier[p] operator[SEP] operator[SEP] operator[SEP] }
static public String remove(String s, String sub) { int len = sub.length(); int pos; while (0 <= (pos = s.indexOf(sub))) { s = s.substring(0, pos) + s.substring(pos + len); } return s; }
class class_name[name] begin[{] method[remove, return_type[type[String]], modifier[public static], parameter[s, sub]] begin[{] local_variable[type[int], len] local_variable[type[int], pos] while[binary_operation[literal[0], <=, assign[member[.pos], call[s.indexOf, parameter[member[.sub]]]]]] begin[{] assign[member[.s], binary_operation[call[s.substring, parameter[literal[0], member[.pos]]], +, call[s.substring, parameter[binary_operation[member[.pos], +, member[.len]]]]]] end[}] return[member[.s]] end[}] END[}]
Keyword[static] Keyword[public] identifier[String] identifier[remove] operator[SEP] identifier[String] identifier[s] , identifier[String] identifier[sub] operator[SEP] { Keyword[int] identifier[len] operator[=] identifier[sub] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[pos] operator[SEP] Keyword[while] operator[SEP] Other[0] operator[<=] operator[SEP] identifier[pos] operator[=] identifier[s] operator[SEP] identifier[indexOf] operator[SEP] identifier[sub] operator[SEP] operator[SEP] operator[SEP] { identifier[s] operator[=] identifier[s] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[pos] operator[SEP] operator[+] identifier[s] operator[SEP] identifier[substring] operator[SEP] identifier[pos] operator[+] identifier[len] operator[SEP] operator[SEP] } Keyword[return] identifier[s] operator[SEP] }
@Override public Iterator<Interval<T>> iterator() { if (root == null){ return Collections.emptyIterator(); } else { final TreeNodeIterator it = root.iterator(); return new Iterator<Interval<T>>() { @Override public void remove() { if (it.currentNode.increasing.size() == 1){ root = TreeNode.removeInterval(IntervalTree.this, root, it.currentInterval); // Rebuild the whole branch stack in the iterator, because we might have // moved nodes around and introduced new nodes into the branch. The rule // is, add all nodes to the branch stack, to which the current node is // a left descendant. TreeNode<T> node = root; it.stack = new Stack<>(); // Continue pushing elements according to the aforementioned rule until // you reach the subtreeRoot - this is the root of the subtree, which // the iterator has marked for traversal next. This subtree must not // become a part of the branch stack, or otherwise you will iterate over // some intervals twice. while (node != it.subtreeRoot){ if (it.currentNode.midpoint.compareTo(node.midpoint) < 0) { it.stack.push(node); node = node.left; } else { node = node.right; } } } else { it.remove(); } } @Override public boolean hasNext() { return it.hasNext(); } @Override public Interval<T> next() { return it.next(); } }; } }
class class_name[name] begin[{] method[iterator, return_type[type[Iterator]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.root], ==, literal[null]]] begin[{] return[call[Collections.emptyIterator, parameter[]]] else begin[{] local_variable[type[TreeNodeIterator], it] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=it.currentNode.increasing, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=remove, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=root, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=IntervalTree, selectors=[]), MemberReference(member=root, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=currentInterval, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[])], member=removeInterval, postfix_operators=[], prefix_operators=[], qualifier=TreeNode, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=root, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=node)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=TreeNode, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=stack, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=Stack, sub_type=None))), label=None), WhileStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=midpoint, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[])], member=compareTo, postfix_operators=[], prefix_operators=[], qualifier=it.currentNode.midpoint, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=right, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[])), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=push, postfix_operators=[], prefix_operators=[], qualifier=it.stack, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=left, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[])), label=None)]))]), condition=BinaryOperation(operandl=MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=subtreeRoot, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[]), operator=!=), label=None)]))], documentation=None, modifiers={'public'}, name=remove, parameters=[], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=hasNext, parameters=[], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=next, parameters=[], return_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=Interval, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=Interval, sub_type=None))], dimensions=None, name=Iterator, sub_type=None))] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Iterator] operator[<] identifier[Interval] operator[<] identifier[T] operator[>] operator[>] identifier[iterator] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[root] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[Collections] operator[SEP] identifier[emptyIterator] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[final] identifier[TreeNodeIterator] identifier[it] operator[=] identifier[root] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[Iterator] operator[<] identifier[Interval] operator[<] identifier[T] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[remove] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[it] operator[SEP] identifier[currentNode] operator[SEP] identifier[increasing] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[1] operator[SEP] { identifier[root] operator[=] identifier[TreeNode] operator[SEP] identifier[removeInterval] operator[SEP] identifier[IntervalTree] operator[SEP] Keyword[this] , identifier[root] , identifier[it] operator[SEP] identifier[currentInterval] operator[SEP] operator[SEP] identifier[TreeNode] operator[<] identifier[T] operator[>] identifier[node] operator[=] identifier[root] operator[SEP] identifier[it] operator[SEP] identifier[stack] operator[=] Keyword[new] identifier[Stack] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[node] operator[!=] identifier[it] operator[SEP] identifier[subtreeRoot] operator[SEP] { Keyword[if] operator[SEP] identifier[it] operator[SEP] identifier[currentNode] operator[SEP] identifier[midpoint] operator[SEP] identifier[compareTo] operator[SEP] identifier[node] operator[SEP] identifier[midpoint] operator[SEP] operator[<] Other[0] operator[SEP] { identifier[it] operator[SEP] identifier[stack] operator[SEP] identifier[push] operator[SEP] identifier[node] operator[SEP] operator[SEP] identifier[node] operator[=] identifier[node] operator[SEP] identifier[left] operator[SEP] } Keyword[else] { identifier[node] operator[=] identifier[node] operator[SEP] identifier[right] operator[SEP] } } } Keyword[else] { identifier[it] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] } } annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[hasNext] operator[SEP] operator[SEP] { Keyword[return] identifier[it] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] identifier[Interval] operator[<] identifier[T] operator[>] identifier[next] operator[SEP] operator[SEP] { Keyword[return] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] } }
public SerializationStreamWriter createStreamWriter() { ClientSerializationStreamWriter clientSerializationStreamWriter = new ClientSerializationStreamWriter( serializer, moduleBaseURL, serializationPolicyName); clientSerializationStreamWriter.prepareToWrite(); return clientSerializationStreamWriter; }
class class_name[name] begin[{] method[createStreamWriter, return_type[type[SerializationStreamWriter]], modifier[public], parameter[]] begin[{] local_variable[type[ClientSerializationStreamWriter], clientSerializationStreamWriter] call[clientSerializationStreamWriter.prepareToWrite, parameter[]] return[member[.clientSerializationStreamWriter]] end[}] END[}]
Keyword[public] identifier[SerializationStreamWriter] identifier[createStreamWriter] operator[SEP] operator[SEP] { identifier[ClientSerializationStreamWriter] identifier[clientSerializationStreamWriter] operator[=] Keyword[new] identifier[ClientSerializationStreamWriter] operator[SEP] identifier[serializer] , identifier[moduleBaseURL] , identifier[serializationPolicyName] operator[SEP] operator[SEP] identifier[clientSerializationStreamWriter] operator[SEP] identifier[prepareToWrite] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[clientSerializationStreamWriter] operator[SEP] }
public void setCustomFontEnabled(final boolean ENABLED) { if (null == customFontEnabled) { _customFontEnabled = ENABLED; fireTileEvent(RESIZE_EVENT); } else { customFontEnabled.set(ENABLED); } }
class class_name[name] begin[{] method[setCustomFontEnabled, return_type[void], modifier[public], parameter[ENABLED]] begin[{] if[binary_operation[literal[null], ==, member[.customFontEnabled]]] begin[{] assign[member[._customFontEnabled], member[.ENABLED]] call[.fireTileEvent, parameter[member[.RESIZE_EVENT]]] else begin[{] call[customFontEnabled.set, parameter[member[.ENABLED]]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setCustomFontEnabled] operator[SEP] Keyword[final] Keyword[boolean] identifier[ENABLED] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[customFontEnabled] operator[SEP] { identifier[_customFontEnabled] operator[=] identifier[ENABLED] operator[SEP] identifier[fireTileEvent] operator[SEP] identifier[RESIZE_EVENT] operator[SEP] operator[SEP] } Keyword[else] { identifier[customFontEnabled] operator[SEP] identifier[set] operator[SEP] identifier[ENABLED] operator[SEP] operator[SEP] } }
void expandDependencies(String name, ModuleDepInfo depInfo, ModuleDeps expandedDependencies) throws IOException { final String methodName = "expandDependencies"; //$NON-NLS-1$ final boolean traceLogging = log.isLoggable(Level.FINEST); final boolean entryExitLogging = log.isLoggable(Level.FINER); if (entryExitLogging) { log.entering(DependencyList.class.getName(), methodName, new Object[]{name, depInfo, expandedDependencies}); } List<String> dependencies = new ArrayList<String>(); List<String> declaredDeps = aggr.getDependencies().getDelcaredDependencies(name); if (traceLogging) { log.finest("declaredDeps for " + name + " = " + declaredDeps); //$NON-NLS-1$ //$NON-NLS-2$ } if (declaredDeps != null) { dependencies.addAll(declaredDeps); } if (includeRequireDeps) { List<String> requireDeps = aggr.getDependencies().getRequireDependencies(name); if (requireDeps != null && requireDeps.size() > 0) { if (traceLogging) { log.finest("requireDeps for " + name + " = " + requireDeps); //$NON-NLS-1$ //$NON-NLS-2$ } dependencies.addAll(requireDeps); } } if (dependencies != null) { for (String dep : dependencies) { ModuleDeps moduleDeps = new ModuleDeps(); processDep(dep, moduleDeps, depInfo, new HashSet<String>(), name); for (Map.Entry<String, ModuleDepInfo> entry : moduleDeps.entrySet()) { if (traceLogging) { log.finest("Adding " + entry + " to expandedDependencies"); //$NON-NLS-1$ //$NON-NLS-2$ } if (expandedDependencies.add(entry.getKey(), new ModuleDepInfo(entry.getValue()))) { expandDependencies(entry.getKey(), entry.getValue(), expandedDependencies); } } } } if (entryExitLogging) { log.exiting(DependencyList.class.getName(), methodName); } }
class class_name[name] begin[{] method[expandDependencies, return_type[void], modifier[default], parameter[name, depInfo, expandedDependencies]] begin[{] local_variable[type[String], methodName] local_variable[type[boolean], traceLogging] local_variable[type[boolean], entryExitLogging] if[member[.entryExitLogging]] begin[{] call[log.entering, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=DependencyList, sub_type=None)), member[.methodName], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=depInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=expandedDependencies, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]] else begin[{] None end[}] local_variable[type[List], dependencies] local_variable[type[List], declaredDeps] if[member[.traceLogging]] begin[{] call[log.finest, parameter[binary_operation[binary_operation[binary_operation[literal["declaredDeps for "], +, member[.name]], +, literal[" = "]], +, member[.declaredDeps]]]] else begin[{] None end[}] if[binary_operation[member[.declaredDeps], !=, literal[null]]] begin[{] call[dependencies.addAll, parameter[member[.declaredDeps]]] else begin[{] None end[}] if[member[.includeRequireDeps]] begin[{] local_variable[type[List], requireDeps] if[binary_operation[binary_operation[member[.requireDeps], !=, literal[null]], &&, binary_operation[call[requireDeps.size, parameter[]], >, literal[0]]]] begin[{] if[member[.traceLogging]] begin[{] call[log.finest, parameter[binary_operation[binary_operation[binary_operation[literal["requireDeps for "], +, member[.name]], +, literal[" = "]], +, member[.requireDeps]]]] else begin[{] None end[}] call[dependencies.addAll, parameter[member[.requireDeps]]] else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[member[.dependencies], !=, literal[null]]] begin[{] 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=ModuleDeps, sub_type=None)), name=moduleDeps)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ModuleDeps, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=dep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=moduleDeps, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=depInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=String, sub_type=None))], dimensions=None, name=HashSet, sub_type=None)), MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processDep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=traceLogging, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Adding "), operandr=MemberReference(member=entry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" to expandedDependencies"), operator=+)], member=finest, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), ClassCreator(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ModuleDepInfo, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=expandedDependencies, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), MemberReference(member=expandedDependencies, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=expandDependencies, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=moduleDeps, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ModuleDepInfo, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=dependencies, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=dep)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) else begin[{] None end[}] if[member[.entryExitLogging]] begin[{] call[log.exiting, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=DependencyList, sub_type=None)), member[.methodName]]] else begin[{] None end[}] end[}] END[}]
Keyword[void] identifier[expandDependencies] operator[SEP] identifier[String] identifier[name] , identifier[ModuleDepInfo] identifier[depInfo] , identifier[ModuleDeps] identifier[expandedDependencies] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[final] identifier[String] identifier[methodName] operator[=] literal[String] operator[SEP] Keyword[final] Keyword[boolean] identifier[traceLogging] operator[=] identifier[log] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[FINEST] operator[SEP] operator[SEP] Keyword[final] Keyword[boolean] identifier[entryExitLogging] operator[=] identifier[log] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[FINER] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[entryExitLogging] operator[SEP] { identifier[log] operator[SEP] identifier[entering] operator[SEP] identifier[DependencyList] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[methodName] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[name] , identifier[depInfo] , identifier[expandedDependencies] } operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[String] operator[>] identifier[dependencies] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[declaredDeps] operator[=] identifier[aggr] operator[SEP] identifier[getDependencies] operator[SEP] operator[SEP] operator[SEP] identifier[getDelcaredDependencies] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[traceLogging] operator[SEP] { identifier[log] operator[SEP] identifier[finest] operator[SEP] literal[String] operator[+] identifier[name] operator[+] literal[String] operator[+] identifier[declaredDeps] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[declaredDeps] operator[!=] Other[null] operator[SEP] { identifier[dependencies] operator[SEP] identifier[addAll] operator[SEP] identifier[declaredDeps] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[includeRequireDeps] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[requireDeps] operator[=] identifier[aggr] operator[SEP] identifier[getDependencies] operator[SEP] operator[SEP] operator[SEP] identifier[getRequireDependencies] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[requireDeps] operator[!=] Other[null] operator[&&] identifier[requireDeps] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[traceLogging] operator[SEP] { identifier[log] operator[SEP] identifier[finest] operator[SEP] literal[String] operator[+] identifier[name] operator[+] literal[String] operator[+] identifier[requireDeps] operator[SEP] operator[SEP] } identifier[dependencies] operator[SEP] identifier[addAll] operator[SEP] identifier[requireDeps] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[dependencies] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[String] identifier[dep] operator[:] identifier[dependencies] operator[SEP] { identifier[ModuleDeps] identifier[moduleDeps] operator[=] Keyword[new] identifier[ModuleDeps] operator[SEP] operator[SEP] operator[SEP] identifier[processDep] operator[SEP] identifier[dep] , identifier[moduleDeps] , identifier[depInfo] , Keyword[new] identifier[HashSet] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] , identifier[name] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[ModuleDepInfo] operator[>] identifier[entry] operator[:] identifier[moduleDeps] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[traceLogging] operator[SEP] { identifier[log] operator[SEP] identifier[finest] operator[SEP] literal[String] operator[+] identifier[entry] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[expandedDependencies] operator[SEP] identifier[add] operator[SEP] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] , Keyword[new] identifier[ModuleDepInfo] operator[SEP] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[expandDependencies] operator[SEP] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] , identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] , identifier[expandedDependencies] operator[SEP] operator[SEP] } } } } Keyword[if] operator[SEP] identifier[entryExitLogging] operator[SEP] { identifier[log] operator[SEP] identifier[exiting] operator[SEP] identifier[DependencyList] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[methodName] operator[SEP] operator[SEP] } }
public String getParam(final String key) { AssertUtils.notEmpty(key, "key must not be null or empty."); return mParams.get(key); }
class class_name[name] begin[{] method[getParam, return_type[type[String]], modifier[public], parameter[key]] begin[{] call[AssertUtils.notEmpty, parameter[member[.key], literal["key must not be null or empty."]]] return[call[mParams.get, parameter[member[.key]]]] end[}] END[}]
Keyword[public] identifier[String] identifier[getParam] operator[SEP] Keyword[final] identifier[String] identifier[key] operator[SEP] { identifier[AssertUtils] operator[SEP] identifier[notEmpty] operator[SEP] identifier[key] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[mParams] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] }
static public int packLong(DataOutput os, long value) throws IOException { if (value < 0) { throw new IllegalArgumentException("negative value: v=" + value); } int i = 1; while ((value & ~0x7FL) != 0) { os.write((((int) value & 0x7F) | 0x80)); value >>>= 7; i++; } os.write((byte) value); return i; }
class class_name[name] begin[{] method[packLong, return_type[type[int]], modifier[public static], parameter[os, value]] begin[{] if[binary_operation[member[.value], <, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="negative value: v="), operandr=MemberReference(member=value, 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) else begin[{] None end[}] local_variable[type[int], i] while[binary_operation[binary_operation[member[.value], &, literal[0x7FL]], !=, literal[0]]] begin[{] call[os.write, parameter[binary_operation[binary_operation[Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int)), &, literal[0x7F]], |, literal[0x80]]]] assign[member[.value], literal[7]] member[.i] end[}] call[os.write, parameter[Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=byte))]] return[member[.i]] end[}] END[}]
Keyword[static] Keyword[public] Keyword[int] identifier[packLong] operator[SEP] identifier[DataOutput] identifier[os] , Keyword[long] identifier[value] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[value] operator[<] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[value] operator[SEP] operator[SEP] } Keyword[int] identifier[i] operator[=] Other[1] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[value] operator[&] operator[~] literal[Integer] operator[SEP] operator[!=] Other[0] operator[SEP] { identifier[os] operator[SEP] identifier[write] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[value] operator[&] literal[Integer] operator[SEP] operator[|] literal[Integer] operator[SEP] operator[SEP] operator[SEP] identifier[value] operator[>>>=] Other[7] operator[SEP] identifier[i] operator[++] operator[SEP] } identifier[os] operator[SEP] identifier[write] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] identifier[value] operator[SEP] operator[SEP] Keyword[return] identifier[i] operator[SEP] }
public void project_serviceName_storage_containerId_PUT(String serviceName, String containerId, OvhTypeEnum containerType) throws IOException { String qPath = "/cloud/project/{serviceName}/storage/{containerId}"; StringBuilder sb = path(qPath, serviceName, containerId); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "containerType", containerType); exec(qPath, "PUT", sb.toString(), o); }
class class_name[name] begin[{] method[project_serviceName_storage_containerId_PUT, return_type[void], modifier[public], parameter[serviceName, containerId, containerType]] begin[{] local_variable[type[String], qPath] local_variable[type[StringBuilder], sb] local_variable[type[HashMap], o] call[.addBody, parameter[member[.o], literal["containerType"], member[.containerType]]] call[.exec, parameter[member[.qPath], literal["PUT"], call[sb.toString, parameter[]], member[.o]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[project_serviceName_storage_containerId_PUT] operator[SEP] identifier[String] identifier[serviceName] , identifier[String] identifier[containerId] , identifier[OvhTypeEnum] identifier[containerType] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[qPath] operator[=] literal[String] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] identifier[path] operator[SEP] identifier[qPath] , identifier[serviceName] , identifier[containerId] operator[SEP] operator[SEP] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] identifier[o] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[addBody] operator[SEP] identifier[o] , literal[String] , identifier[containerType] operator[SEP] operator[SEP] identifier[exec] operator[SEP] identifier[qPath] , literal[String] , identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[o] operator[SEP] operator[SEP] }
@Override public Layer setVisible(final boolean visible) { super.setVisible(visible); getElement().getStyle().setVisibility(visible ? Visibility.VISIBLE : Visibility.HIDDEN); return this; }
class class_name[name] begin[{] method[setVisible, return_type[type[Layer]], modifier[public], parameter[visible]] begin[{] SuperMethodInvocation(arguments=[MemberReference(member=visible, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setVisible, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) call[.getElement, parameter[]] return[THIS[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Layer] identifier[setVisible] operator[SEP] Keyword[final] Keyword[boolean] identifier[visible] operator[SEP] { Keyword[super] operator[SEP] identifier[setVisible] operator[SEP] identifier[visible] operator[SEP] operator[SEP] identifier[getElement] operator[SEP] operator[SEP] operator[SEP] identifier[getStyle] operator[SEP] operator[SEP] operator[SEP] identifier[setVisibility] operator[SEP] identifier[visible] operator[?] identifier[Visibility] operator[SEP] identifier[VISIBLE] operator[:] identifier[Visibility] operator[SEP] identifier[HIDDEN] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
static JbcSrcJavaValue error(Expression expr, JbcSrcValueErrorReporter reporter) { return new JbcSrcJavaValue( expr, /* method= */ null, /* allowedType= */ null, /* constantNull= */ false, /* error= */ true, reporter); }
class class_name[name] begin[{] method[error, return_type[type[JbcSrcJavaValue]], modifier[static], parameter[expr, reporter]] begin[{] return[ClassCreator(arguments=[MemberReference(member=expr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), MemberReference(member=reporter, 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=JbcSrcJavaValue, sub_type=None))] end[}] END[}]
Keyword[static] identifier[JbcSrcJavaValue] identifier[error] operator[SEP] identifier[Expression] identifier[expr] , identifier[JbcSrcValueErrorReporter] identifier[reporter] operator[SEP] { Keyword[return] Keyword[new] identifier[JbcSrcJavaValue] operator[SEP] identifier[expr] , Other[null] , Other[null] , literal[boolean] , literal[boolean] , identifier[reporter] operator[SEP] operator[SEP] }
public void addCssProperties(final String cssProperties) { final long stamp = lock.writeLock(); try { extractStylesAndAddToAttributeValueMap(cssProperties); } finally { lock.unlockWrite(stamp); } }
class class_name[name] begin[{] method[addCssProperties, return_type[void], modifier[public], parameter[cssProperties]] begin[{] local_variable[type[long], stamp] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=cssProperties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=extractStylesAndAddToAttributeValueMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=stamp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=unlockWrite, postfix_operators=[], prefix_operators=[], qualifier=lock, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[addCssProperties] operator[SEP] Keyword[final] identifier[String] identifier[cssProperties] operator[SEP] { Keyword[final] Keyword[long] identifier[stamp] operator[=] identifier[lock] operator[SEP] identifier[writeLock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[extractStylesAndAddToAttributeValueMap] operator[SEP] identifier[cssProperties] operator[SEP] operator[SEP] } Keyword[finally] { identifier[lock] operator[SEP] identifier[unlockWrite] operator[SEP] identifier[stamp] operator[SEP] operator[SEP] } }
public boolean hasErrors() { if ((m_validatedNewEntry != null) && m_validatedNewEntry.hasErrors()) { return true; } for (CmsAliasTableRow row : m_changedRows) { if (row.hasErrors()) { return true; } } return false; }
class class_name[name] begin[{] method[hasErrors, return_type[type[boolean]], modifier[public], parameter[]] begin[{] if[binary_operation[binary_operation[member[.m_validatedNewEntry], !=, literal[null]], &&, call[m_validatedNewEntry.hasErrors, parameter[]]]] begin[{] return[literal[true]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=hasErrors, postfix_operators=[], prefix_operators=[], qualifier=row, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=m_changedRows, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=row)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsAliasTableRow, sub_type=None))), label=None) return[literal[false]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[hasErrors] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[m_validatedNewEntry] operator[!=] Other[null] operator[SEP] operator[&&] identifier[m_validatedNewEntry] operator[SEP] identifier[hasErrors] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[for] operator[SEP] identifier[CmsAliasTableRow] identifier[row] operator[:] identifier[m_changedRows] operator[SEP] { Keyword[if] operator[SEP] identifier[row] operator[SEP] identifier[hasErrors] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
static Optional<AnnotatedBeanFactory<?>> find(@Nullable BeanFactoryId beanFactoryId) { if (beanFactoryId == null) { return Optional.empty(); } final AnnotatedBeanFactory<?> factory = factories.get(beanFactoryId); return factory != null && factory != unsupportedBeanFactory ? Optional.of(factory) : Optional.empty(); }
class class_name[name] begin[{] method[find, return_type[type[Optional]], modifier[static], parameter[beanFactoryId]] begin[{] if[binary_operation[member[.beanFactoryId], ==, literal[null]]] begin[{] return[call[Optional.empty, parameter[]]] else begin[{] None end[}] local_variable[type[AnnotatedBeanFactory], factory] return[TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=factory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MemberReference(member=factory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=unsupportedBeanFactory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), operator=&&), if_false=MethodInvocation(arguments=[], member=empty, postfix_operators=[], prefix_operators=[], qualifier=Optional, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MemberReference(member=factory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=of, postfix_operators=[], prefix_operators=[], qualifier=Optional, selectors=[], type_arguments=None))] end[}] END[}]
Keyword[static] identifier[Optional] operator[<] identifier[AnnotatedBeanFactory] operator[<] operator[?] operator[>] operator[>] identifier[find] operator[SEP] annotation[@] identifier[Nullable] identifier[BeanFactoryId] identifier[beanFactoryId] operator[SEP] { Keyword[if] operator[SEP] identifier[beanFactoryId] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[Optional] operator[SEP] identifier[empty] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[AnnotatedBeanFactory] operator[<] operator[?] operator[>] identifier[factory] operator[=] identifier[factories] operator[SEP] identifier[get] operator[SEP] identifier[beanFactoryId] operator[SEP] operator[SEP] Keyword[return] identifier[factory] operator[!=] Other[null] operator[&&] identifier[factory] operator[!=] identifier[unsupportedBeanFactory] operator[?] identifier[Optional] operator[SEP] identifier[of] operator[SEP] identifier[factory] operator[SEP] operator[:] identifier[Optional] operator[SEP] identifier[empty] operator[SEP] operator[SEP] operator[SEP] }
public URI getInputFile() { // if (prop.containsKey(PROPERTY_INPUT_MAP_URI)) { // return toURI(prop.get(PROPERTY_INPUT_MAP_URI).toString()); // } // return null; return files.values().stream() .filter(fi -> fi.isInput) .map(fi -> fi.src) .findAny() .orElse(null); }
class class_name[name] begin[{] method[getInputFile, return_type[type[URI]], modifier[public], parameter[]] begin[{] return[call[files.values, parameter[]]] end[}] END[}]
Keyword[public] identifier[URI] identifier[getInputFile] operator[SEP] operator[SEP] { Keyword[return] identifier[files] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[fi] operator[->] identifier[fi] operator[SEP] identifier[isInput] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[fi] operator[->] identifier[fi] operator[SEP] identifier[src] operator[SEP] operator[SEP] identifier[findAny] operator[SEP] operator[SEP] operator[SEP] identifier[orElse] operator[SEP] Other[null] operator[SEP] operator[SEP] }
JavaArchive createWarpArchive() { JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "arquillian-warp.jar"); // API archive.addClass(Inspection.class); archive.addClasses(BeforeServlet.class, AfterServlet.class); for (String packageName : REQUIRED_WARP_PACKAGES) { archive.addPackage(packageName); } archive.addAsManifestResource(getWebFragmentAsset(), "web-fragment.xml"); archive.addClasses(REQUIRED_WARP_INNER_CLASSES); // register remote extension archive.addClass(WarpRemoteExtension.class); archive.addAsServiceProvider(RemoteLoadableExtension.class.getName(), WarpRemoteExtension.class.getName(), "!org.jboss.arquillian.protocol.servlet.runner.ServletRemoteExtension"); archive.addAsServiceProvider(LifecycleManagerStore.class, LifecycleManagerStoreImpl.class); // register RequestProcessingDelegationService archive.addAsServiceProvider(RequestDelegationService.class, CommandBusOnServer.class); return archive; }
class class_name[name] begin[{] method[createWarpArchive, return_type[type[JavaArchive]], modifier[default], parameter[]] begin[{] local_variable[type[JavaArchive], archive] call[archive.addClass, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Inspection, sub_type=None))]] call[archive.addClasses, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BeforeServlet, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AfterServlet, sub_type=None))]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=packageName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addPackage, postfix_operators=[], prefix_operators=[], qualifier=archive, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=REQUIRED_WARP_PACKAGES, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=packageName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) call[archive.addAsManifestResource, parameter[call[.getWebFragmentAsset, parameter[]], literal["web-fragment.xml"]]] call[archive.addClasses, parameter[member[.REQUIRED_WARP_INNER_CLASSES]]] call[archive.addClass, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WarpRemoteExtension, sub_type=None))]] call[archive.addAsServiceProvider, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=RemoteLoadableExtension, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=WarpRemoteExtension, sub_type=None)), literal["!org.jboss.arquillian.protocol.servlet.runner.ServletRemoteExtension"]]] call[archive.addAsServiceProvider, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LifecycleManagerStore, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LifecycleManagerStoreImpl, sub_type=None))]] call[archive.addAsServiceProvider, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RequestDelegationService, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CommandBusOnServer, sub_type=None))]] return[member[.archive]] end[}] END[}]
identifier[JavaArchive] identifier[createWarpArchive] operator[SEP] operator[SEP] { identifier[JavaArchive] identifier[archive] operator[=] identifier[ShrinkWrap] operator[SEP] identifier[create] operator[SEP] identifier[JavaArchive] operator[SEP] Keyword[class] , literal[String] operator[SEP] operator[SEP] identifier[archive] operator[SEP] identifier[addClass] operator[SEP] identifier[Inspection] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[archive] operator[SEP] identifier[addClasses] operator[SEP] identifier[BeforeServlet] operator[SEP] Keyword[class] , identifier[AfterServlet] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[packageName] operator[:] identifier[REQUIRED_WARP_PACKAGES] operator[SEP] { identifier[archive] operator[SEP] identifier[addPackage] operator[SEP] identifier[packageName] operator[SEP] operator[SEP] } identifier[archive] operator[SEP] identifier[addAsManifestResource] operator[SEP] identifier[getWebFragmentAsset] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[archive] operator[SEP] identifier[addClasses] operator[SEP] identifier[REQUIRED_WARP_INNER_CLASSES] operator[SEP] operator[SEP] identifier[archive] operator[SEP] identifier[addClass] operator[SEP] identifier[WarpRemoteExtension] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[archive] operator[SEP] identifier[addAsServiceProvider] operator[SEP] identifier[RemoteLoadableExtension] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[WarpRemoteExtension] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[archive] operator[SEP] identifier[addAsServiceProvider] operator[SEP] identifier[LifecycleManagerStore] operator[SEP] Keyword[class] , identifier[LifecycleManagerStoreImpl] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[archive] operator[SEP] identifier[addAsServiceProvider] operator[SEP] identifier[RequestDelegationService] operator[SEP] Keyword[class] , identifier[CommandBusOnServer] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[return] identifier[archive] operator[SEP] }
@Override public boolean shouldGenerateLog4jLocationInfo() { return CONFIGURATION.getBooleanProperty( GENERATE_LOG4J_LOCATION_INFO, Boolean.valueOf(this.getPropertyValue( GENERATE_LOG4J_LOCATION_INFO, "false"))) .get(); }
class class_name[name] begin[{] method[shouldGenerateLog4jLocationInfo, return_type[type[boolean]], modifier[public], parameter[]] begin[{] return[call[CONFIGURATION.getBooleanProperty, parameter[member[.GENERATE_LOG4J_LOCATION_INFO], call[Boolean.valueOf, parameter[THIS[call[None.getPropertyValue, parameter[member[.GENERATE_LOG4J_LOCATION_INFO], literal["false"]]]]]]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[shouldGenerateLog4jLocationInfo] operator[SEP] operator[SEP] { Keyword[return] identifier[CONFIGURATION] operator[SEP] identifier[getBooleanProperty] operator[SEP] identifier[GENERATE_LOG4J_LOCATION_INFO] , identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] Keyword[this] operator[SEP] identifier[getPropertyValue] operator[SEP] identifier[GENERATE_LOG4J_LOCATION_INFO] , literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] }
public void marshall(GetVaultNotificationsRequest getVaultNotificationsRequest, ProtocolMarshaller protocolMarshaller) { if (getVaultNotificationsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(getVaultNotificationsRequest.getAccountId(), ACCOUNTID_BINDING); protocolMarshaller.marshall(getVaultNotificationsRequest.getVaultName(), VAULTNAME_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[getVaultNotificationsRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.getVaultNotificationsRequest], ==, 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=getAccountId, postfix_operators=[], prefix_operators=[], qualifier=getVaultNotificationsRequest, selectors=[], type_arguments=None), MemberReference(member=ACCOUNTID_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=getVaultName, postfix_operators=[], prefix_operators=[], qualifier=getVaultNotificationsRequest, selectors=[], type_arguments=None), MemberReference(member=VAULTNAME_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[GetVaultNotificationsRequest] identifier[getVaultNotificationsRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[getVaultNotificationsRequest] 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[getVaultNotificationsRequest] operator[SEP] identifier[getAccountId] operator[SEP] operator[SEP] , identifier[ACCOUNTID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[getVaultNotificationsRequest] operator[SEP] identifier[getVaultName] operator[SEP] operator[SEP] , identifier[VAULTNAME_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public static URLTemplatesFactory getURLTemplatesFactory(ServletRequest servletRequest) { assert servletRequest != null : "The ServletRequest cannot be null."; if (servletRequest == null) { throw new IllegalArgumentException("The ServletRequest cannot be null."); } return (URLTemplatesFactory) servletRequest.getAttribute(URL_TEMPLATE_FACTORY_ATTR); }
class class_name[name] begin[{] method[getURLTemplatesFactory, return_type[type[URLTemplatesFactory]], modifier[public static], parameter[servletRequest]] begin[{] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=servletRequest, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The ServletRequest cannot be null.")) if[binary_operation[member[.servletRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The ServletRequest cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=URL_TEMPLATE_FACTORY_ATTR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAttribute, postfix_operators=[], prefix_operators=[], qualifier=servletRequest, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=URLTemplatesFactory, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[URLTemplatesFactory] identifier[getURLTemplatesFactory] operator[SEP] identifier[ServletRequest] identifier[servletRequest] operator[SEP] { Keyword[assert] identifier[servletRequest] operator[!=] Other[null] operator[:] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[servletRequest] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] identifier[URLTemplatesFactory] operator[SEP] identifier[servletRequest] operator[SEP] identifier[getAttribute] operator[SEP] identifier[URL_TEMPLATE_FACTORY_ATTR] operator[SEP] operator[SEP] }
private static void write(DocFile outFile, OutputStream out, byte[] buf, int len) throws DocFileIOException { try { out.write(buf, 0, len); } catch (IOException e) { throw new DocFileIOException(outFile, DocFileIOException.Mode.WRITE, e); } }
class class_name[name] begin[{] method[write, return_type[void], modifier[private static], parameter[outFile, out, buf, len]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=buf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=outFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=WRITE, postfix_operators=[], prefix_operators=[], qualifier=DocFileIOException.Mode, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DocFileIOException, 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[}]
Keyword[private] Keyword[static] Keyword[void] identifier[write] operator[SEP] identifier[DocFile] identifier[outFile] , identifier[OutputStream] identifier[out] , Keyword[byte] operator[SEP] operator[SEP] identifier[buf] , Keyword[int] identifier[len] operator[SEP] Keyword[throws] identifier[DocFileIOException] { Keyword[try] { identifier[out] operator[SEP] identifier[write] operator[SEP] identifier[buf] , Other[0] , identifier[len] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[DocFileIOException] operator[SEP] identifier[outFile] , identifier[DocFileIOException] operator[SEP] identifier[Mode] operator[SEP] identifier[WRITE] , identifier[e] operator[SEP] operator[SEP] } }
public static ParallelSorter create(Object[] arrays) { Generator gen = new Generator(); gen.setArrays(arrays); return gen.create(); }
class class_name[name] begin[{] method[create, return_type[type[ParallelSorter]], modifier[public static], parameter[arrays]] begin[{] local_variable[type[Generator], gen] call[gen.setArrays, parameter[member[.arrays]]] return[call[gen.create, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ParallelSorter] identifier[create] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[arrays] operator[SEP] { identifier[Generator] identifier[gen] operator[=] Keyword[new] identifier[Generator] operator[SEP] operator[SEP] operator[SEP] identifier[gen] operator[SEP] identifier[setArrays] operator[SEP] identifier[arrays] operator[SEP] operator[SEP] Keyword[return] identifier[gen] operator[SEP] identifier[create] operator[SEP] operator[SEP] operator[SEP] }
@Override public Server visitServer(Context context, Server server) { return filter.filterServer(server); }
class class_name[name] begin[{] method[visitServer, return_type[type[Server]], modifier[public], parameter[context, server]] begin[{] return[call[filter.filterServer, parameter[member[.server]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Server] identifier[visitServer] operator[SEP] identifier[Context] identifier[context] , identifier[Server] identifier[server] operator[SEP] { Keyword[return] identifier[filter] operator[SEP] identifier[filterServer] operator[SEP] identifier[server] operator[SEP] operator[SEP] }
public static void failIncompatibleAttributesInAnnotationException(String messageFormat, Object... args) { throw (new IncompatibleAttributesInAnnotationException(String.format(messageFormat, args))); }
class class_name[name] begin[{] method[failIncompatibleAttributesInAnnotationException, return_type[void], modifier[public static], parameter[messageFormat, args]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=messageFormat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IncompatibleAttributesInAnnotationException, sub_type=None)), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[failIncompatibleAttributesInAnnotationException] operator[SEP] identifier[String] identifier[messageFormat] , identifier[Object] operator[...] identifier[args] operator[SEP] { Keyword[throw] operator[SEP] Keyword[new] identifier[IncompatibleAttributesInAnnotationException] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] identifier[messageFormat] , identifier[args] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
protected void paintBackground (Graphics g) { // simply fill our background color g.setColor(getBackground()); g.fillRect(0, 0, getWidth(), getHeight()); }
class class_name[name] begin[{] method[paintBackground, return_type[void], modifier[protected], parameter[g]] begin[{] call[g.setColor, parameter[call[.getBackground, parameter[]]]] call[g.fillRect, parameter[literal[0], literal[0], call[.getWidth, parameter[]], call[.getHeight, parameter[]]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[paintBackground] operator[SEP] identifier[Graphics] identifier[g] operator[SEP] { identifier[g] operator[SEP] identifier[setColor] operator[SEP] identifier[getBackground] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[g] operator[SEP] identifier[fillRect] operator[SEP] Other[0] , Other[0] , identifier[getWidth] operator[SEP] operator[SEP] , identifier[getHeight] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static BaseMessageRecordDesc createMessageRecordDesc(String strMessageDataClassName, MessageDataParent messageDataParent, String strKey) { BaseMessageRecordDesc messageData = (BaseMessageRecordDesc)ClassServiceUtility.getClassService().makeObjectFromClassName(strMessageDataClassName); if (messageData != null) messageData.init(messageDataParent, strKey); return messageData; }
class class_name[name] begin[{] method[createMessageRecordDesc, return_type[type[BaseMessageRecordDesc]], modifier[public static], parameter[strMessageDataClassName, messageDataParent, strKey]] begin[{] local_variable[type[BaseMessageRecordDesc], messageData] if[binary_operation[member[.messageData], !=, literal[null]]] begin[{] call[messageData.init, parameter[member[.messageDataParent], member[.strKey]]] else begin[{] None end[}] return[member[.messageData]] end[}] END[}]
Keyword[public] Keyword[static] identifier[BaseMessageRecordDesc] identifier[createMessageRecordDesc] operator[SEP] identifier[String] identifier[strMessageDataClassName] , identifier[MessageDataParent] identifier[messageDataParent] , identifier[String] identifier[strKey] operator[SEP] { identifier[BaseMessageRecordDesc] identifier[messageData] operator[=] operator[SEP] identifier[BaseMessageRecordDesc] operator[SEP] identifier[ClassServiceUtility] operator[SEP] identifier[getClassService] operator[SEP] operator[SEP] operator[SEP] identifier[makeObjectFromClassName] operator[SEP] identifier[strMessageDataClassName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[messageData] operator[!=] Other[null] operator[SEP] identifier[messageData] operator[SEP] identifier[init] operator[SEP] identifier[messageDataParent] , identifier[strKey] operator[SEP] operator[SEP] Keyword[return] identifier[messageData] operator[SEP] }
public ApiResponse<SetEnabledResponse> setEnabledWithHttpInfo(Boolean saMLEnabled) throws ApiException { com.squareup.okhttp.Call call = setEnabledValidateBeforeCall(saMLEnabled, null, null); Type localVarReturnType = new TypeToken<SetEnabledResponse>(){}.getType(); return apiClient.execute(call, localVarReturnType); }
class class_name[name] begin[{] method[setEnabledWithHttpInfo, return_type[type[ApiResponse]], modifier[public], parameter[saMLEnabled]] begin[{] local_variable[type[com], call] local_variable[type[Type], localVarReturnType] return[call[apiClient.execute, parameter[member[.call], member[.localVarReturnType]]]] end[}] END[}]
Keyword[public] identifier[ApiResponse] operator[<] identifier[SetEnabledResponse] operator[>] identifier[setEnabledWithHttpInfo] operator[SEP] identifier[Boolean] identifier[saMLEnabled] operator[SEP] Keyword[throws] identifier[ApiException] { identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Call] identifier[call] operator[=] identifier[setEnabledValidateBeforeCall] operator[SEP] identifier[saMLEnabled] , Other[null] , Other[null] operator[SEP] operator[SEP] identifier[Type] identifier[localVarReturnType] operator[=] Keyword[new] identifier[TypeToken] operator[<] identifier[SetEnabledResponse] operator[>] operator[SEP] operator[SEP] { } operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[apiClient] operator[SEP] identifier[execute] operator[SEP] identifier[call] , identifier[localVarReturnType] operator[SEP] operator[SEP] }
public int getParent(int nodeHandle) { int identity = makeNodeIdentity(nodeHandle); if (identity > 0) return makeNodeHandle(_parent(identity)); else return DTM.NULL; }
class class_name[name] begin[{] method[getParent, return_type[type[int]], modifier[public], parameter[nodeHandle]] begin[{] local_variable[type[int], identity] if[binary_operation[member[.identity], >, literal[0]]] begin[{] return[call[.makeNodeHandle, parameter[call[._parent, parameter[member[.identity]]]]]] else begin[{] return[member[DTM.NULL]] end[}] end[}] END[}]
Keyword[public] Keyword[int] identifier[getParent] operator[SEP] Keyword[int] identifier[nodeHandle] operator[SEP] { Keyword[int] identifier[identity] operator[=] identifier[makeNodeIdentity] operator[SEP] identifier[nodeHandle] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[identity] operator[>] Other[0] operator[SEP] Keyword[return] identifier[makeNodeHandle] operator[SEP] identifier[_parent] operator[SEP] identifier[identity] operator[SEP] operator[SEP] operator[SEP] Keyword[else] Keyword[return] identifier[DTM] operator[SEP] identifier[NULL] operator[SEP] }
@Override public synchronized void resolve(JingleSession session) throws XMPPException, NotConnectedException, InterruptedException { setResolveInit(); clearCandidates(); sid = random.nextInt(Integer.MAX_VALUE); RTPBridge rtpBridge = RTPBridge.getRTPBridge(connection, String.valueOf(sid)); String localIp = getLocalHost(); TransportCandidate localCandidate = new TransportCandidate.Fixed( rtpBridge.getIp(), rtpBridge.getPortA()); localCandidate.setLocalIp(localIp); TransportCandidate remoteCandidate = new TransportCandidate.Fixed( rtpBridge.getIp(), rtpBridge.getPortB()); remoteCandidate.setLocalIp(localIp); localCandidate.setSymmetric(remoteCandidate); remoteCandidate.setSymmetric(localCandidate); localCandidate.setPassword(rtpBridge.getPass()); remoteCandidate.setPassword(rtpBridge.getPass()); localCandidate.setSessionId(rtpBridge.getSid()); remoteCandidate.setSessionId(rtpBridge.getSid()); localCandidate.setConnection(this.connection); remoteCandidate.setConnection(this.connection); addCandidate(localCandidate); setResolveEnd(); }
class class_name[name] begin[{] method[resolve, return_type[void], modifier[synchronized public], parameter[session]] begin[{] call[.setResolveInit, parameter[]] call[.clearCandidates, parameter[]] assign[member[.sid], call[random.nextInt, parameter[member[Integer.MAX_VALUE]]]] local_variable[type[RTPBridge], rtpBridge] local_variable[type[String], localIp] local_variable[type[TransportCandidate], localCandidate] call[localCandidate.setLocalIp, parameter[member[.localIp]]] local_variable[type[TransportCandidate], remoteCandidate] call[remoteCandidate.setLocalIp, parameter[member[.localIp]]] call[localCandidate.setSymmetric, parameter[member[.remoteCandidate]]] call[remoteCandidate.setSymmetric, parameter[member[.localCandidate]]] call[localCandidate.setPassword, parameter[call[rtpBridge.getPass, parameter[]]]] call[remoteCandidate.setPassword, parameter[call[rtpBridge.getPass, parameter[]]]] call[localCandidate.setSessionId, parameter[call[rtpBridge.getSid, parameter[]]]] call[remoteCandidate.setSessionId, parameter[call[rtpBridge.getSid, parameter[]]]] call[localCandidate.setConnection, parameter[THIS[member[None.connection]]]] call[remoteCandidate.setConnection, parameter[THIS[member[None.connection]]]] call[.addCandidate, parameter[member[.localCandidate]]] call[.setResolveEnd, parameter[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[synchronized] Keyword[void] identifier[resolve] operator[SEP] identifier[JingleSession] identifier[session] operator[SEP] Keyword[throws] identifier[XMPPException] , identifier[NotConnectedException] , identifier[InterruptedException] { identifier[setResolveInit] operator[SEP] operator[SEP] operator[SEP] identifier[clearCandidates] operator[SEP] operator[SEP] operator[SEP] identifier[sid] operator[=] identifier[random] operator[SEP] identifier[nextInt] operator[SEP] identifier[Integer] operator[SEP] identifier[MAX_VALUE] operator[SEP] operator[SEP] identifier[RTPBridge] identifier[rtpBridge] operator[=] identifier[RTPBridge] operator[SEP] identifier[getRTPBridge] operator[SEP] identifier[connection] , identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[sid] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[localIp] operator[=] identifier[getLocalHost] operator[SEP] operator[SEP] operator[SEP] identifier[TransportCandidate] identifier[localCandidate] operator[=] Keyword[new] identifier[TransportCandidate] operator[SEP] identifier[Fixed] operator[SEP] identifier[rtpBridge] operator[SEP] identifier[getIp] operator[SEP] operator[SEP] , identifier[rtpBridge] operator[SEP] identifier[getPortA] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[localCandidate] operator[SEP] identifier[setLocalIp] operator[SEP] identifier[localIp] operator[SEP] operator[SEP] identifier[TransportCandidate] identifier[remoteCandidate] operator[=] Keyword[new] identifier[TransportCandidate] operator[SEP] identifier[Fixed] operator[SEP] identifier[rtpBridge] operator[SEP] identifier[getIp] operator[SEP] operator[SEP] , identifier[rtpBridge] operator[SEP] identifier[getPortB] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[remoteCandidate] operator[SEP] identifier[setLocalIp] operator[SEP] identifier[localIp] operator[SEP] operator[SEP] identifier[localCandidate] operator[SEP] identifier[setSymmetric] operator[SEP] identifier[remoteCandidate] operator[SEP] operator[SEP] identifier[remoteCandidate] operator[SEP] identifier[setSymmetric] operator[SEP] identifier[localCandidate] operator[SEP] operator[SEP] identifier[localCandidate] operator[SEP] identifier[setPassword] operator[SEP] identifier[rtpBridge] operator[SEP] identifier[getPass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[remoteCandidate] operator[SEP] identifier[setPassword] operator[SEP] identifier[rtpBridge] operator[SEP] identifier[getPass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[localCandidate] operator[SEP] identifier[setSessionId] operator[SEP] identifier[rtpBridge] operator[SEP] identifier[getSid] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[remoteCandidate] operator[SEP] identifier[setSessionId] operator[SEP] identifier[rtpBridge] operator[SEP] identifier[getSid] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[localCandidate] operator[SEP] identifier[setConnection] operator[SEP] Keyword[this] operator[SEP] identifier[connection] operator[SEP] operator[SEP] identifier[remoteCandidate] operator[SEP] identifier[setConnection] operator[SEP] Keyword[this] operator[SEP] identifier[connection] operator[SEP] operator[SEP] identifier[addCandidate] operator[SEP] identifier[localCandidate] operator[SEP] operator[SEP] identifier[setResolveEnd] operator[SEP] operator[SEP] operator[SEP] }
public final AntlrDatatypeRuleToken ruleQualifiedNameInStaticImport() throws RecognitionException { AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); Token kw=null; AntlrDatatypeRuleToken this_ValidID_0 = null; enterRule(); try { // InternalSARL.g:16878:2: ( (this_ValidID_0= ruleValidID kw= '.' )+ ) // InternalSARL.g:16879:2: (this_ValidID_0= ruleValidID kw= '.' )+ { // InternalSARL.g:16879:2: (this_ValidID_0= ruleValidID kw= '.' )+ int cnt386=0; loop386: do { int alt386=2; switch ( input.LA(1) ) { case RULE_ID: { int LA386_2 = input.LA(2); if ( (LA386_2==77) ) { alt386=1; } } break; case 92: { int LA386_3 = input.LA(2); if ( (LA386_3==77) ) { alt386=1; } } break; case 44: { int LA386_4 = input.LA(2); if ( (LA386_4==77) ) { alt386=1; } } break; case 93: { int LA386_5 = input.LA(2); if ( (LA386_5==77) ) { alt386=1; } } break; case 94: { int LA386_6 = input.LA(2); if ( (LA386_6==77) ) { alt386=1; } } break; case 95: { int LA386_7 = input.LA(2); if ( (LA386_7==77) ) { alt386=1; } } break; } switch (alt386) { case 1 : // InternalSARL.g:16880:3: this_ValidID_0= ruleValidID kw= '.' { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getQualifiedNameInStaticImportAccess().getValidIDParserRuleCall_0()); } pushFollow(FOLLOW_156); this_ValidID_0=ruleValidID(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { current.merge(this_ValidID_0); } if ( state.backtracking==0 ) { afterParserOrEnumRuleCall(); } kw=(Token)match(input,77,FOLLOW_161); if (state.failed) return current; if ( state.backtracking==0 ) { current.merge(kw); newLeafNode(kw, grammarAccess.getQualifiedNameInStaticImportAccess().getFullStopKeyword_1()); } } break; default : if ( cnt386 >= 1 ) break loop386; if (state.backtracking>0) {state.failed=true; return current;} EarlyExitException eee = new EarlyExitException(386, input); throw eee; } cnt386++; } while (true); } if ( state.backtracking==0 ) { leaveRule(); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; }
class class_name[name] begin[{] method[ruleQualifiedNameInStaticImport, return_type[type[AntlrDatatypeRuleToken]], modifier[final public], parameter[]] begin[{] local_variable[type[AntlrDatatypeRuleToken], current] local_variable[type[Token], kw] local_variable[type[AntlrDatatypeRuleToken], this_ValidID_0] call[.enterRule, parameter[]] TryStatement(block=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=cnt386)], modifiers=set(), type=BasicType(dimensions=[], name=int)), DoStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt386)], modifiers=set(), type=BasicType(dimensions=[], name=int)), SwitchStatement(cases=[SwitchStatementCase(case=['RULE_ID'], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA386_2)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA386_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=77), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt386, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=92)], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA386_3)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA386_3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=77), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt386, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=44)], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA386_4)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA386_4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=77), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt386, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=93)], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA386_5)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA386_5, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=77), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt386, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=94)], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA386_6)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA386_6, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=77), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt386, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=95)], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA386_7)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA386_7, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=77), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt386, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), BreakStatement(goto=None, label=None)])], expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), label=None), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[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=getQualifiedNameInStaticImportAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getValidIDParserRuleCall_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_156, 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=this_ValidID_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=ruleValidID, 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=MethodInvocation(arguments=[MemberReference(member=this_ValidID_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=merge, postfix_operators=[], prefix_operators=[], qualifier=current, selectors=[], type_arguments=None), 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=MethodInvocation(arguments=[], member=afterParserOrEnumRuleCall, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=kw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=77), MemberReference(member=FOLLOW_161, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Token, sub_type=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)), 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=[MemberReference(member=kw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=merge, postfix_operators=[], prefix_operators=[], qualifier=current, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=kw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getQualifiedNameInStaticImportAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getFullStopKeyword_1, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newLeafNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=cnt386, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>=), else_statement=None, label=None, then_statement=BreakStatement(goto=loop386, 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=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=386), MemberReference(member=input, 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=EarlyExitException, sub_type=None)), name=eee)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=EarlyExitException, sub_type=None)), ThrowStatement(expression=MemberReference(member=eee, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])], expression=MemberReference(member=alt386, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=MemberReference(member=cnt386, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]), condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=loop386)]), 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=[], member=leaveRule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), 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[AntlrDatatypeRuleToken] identifier[ruleQualifiedNameInStaticImport] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { identifier[AntlrDatatypeRuleToken] identifier[current] operator[=] Keyword[new] identifier[AntlrDatatypeRuleToken] operator[SEP] operator[SEP] operator[SEP] identifier[Token] identifier[kw] operator[=] Other[null] operator[SEP] identifier[AntlrDatatypeRuleToken] identifier[this_ValidID_0] operator[=] Other[null] operator[SEP] identifier[enterRule] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { { Keyword[int] identifier[cnt386] operator[=] Other[0] operator[SEP] identifier[loop386] operator[:] Keyword[do] { Keyword[int] identifier[alt386] operator[=] Other[2] operator[SEP] Keyword[switch] operator[SEP] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] { Keyword[case] identifier[RULE_ID] operator[:] { Keyword[int] identifier[LA386_2] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA386_2] operator[==] Other[77] operator[SEP] operator[SEP] { identifier[alt386] operator[=] Other[1] operator[SEP] } } Keyword[break] operator[SEP] Keyword[case] Other[92] operator[:] { Keyword[int] identifier[LA386_3] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA386_3] operator[==] Other[77] operator[SEP] operator[SEP] { identifier[alt386] operator[=] Other[1] operator[SEP] } } Keyword[break] operator[SEP] Keyword[case] Other[44] operator[:] { Keyword[int] identifier[LA386_4] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA386_4] operator[==] Other[77] operator[SEP] operator[SEP] { identifier[alt386] operator[=] Other[1] operator[SEP] } } Keyword[break] operator[SEP] Keyword[case] Other[93] operator[:] { Keyword[int] identifier[LA386_5] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA386_5] operator[==] Other[77] operator[SEP] operator[SEP] { identifier[alt386] operator[=] Other[1] operator[SEP] } } Keyword[break] operator[SEP] Keyword[case] Other[94] operator[:] { Keyword[int] identifier[LA386_6] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA386_6] operator[==] Other[77] operator[SEP] operator[SEP] { identifier[alt386] operator[=] Other[1] operator[SEP] } } Keyword[break] operator[SEP] Keyword[case] Other[95] operator[:] { Keyword[int] identifier[LA386_7] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA386_7] operator[==] Other[77] operator[SEP] operator[SEP] { identifier[alt386] operator[=] Other[1] operator[SEP] } } Keyword[break] operator[SEP] } Keyword[switch] operator[SEP] identifier[alt386] operator[SEP] { Keyword[case] Other[1] operator[:] { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getQualifiedNameInStaticImportAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getValidIDParserRuleCall_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_156] operator[SEP] operator[SEP] identifier[this_ValidID_0] operator[=] identifier[ruleValidID] 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[SEP] identifier[merge] operator[SEP] identifier[this_ValidID_0] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[afterParserOrEnumRuleCall] operator[SEP] operator[SEP] operator[SEP] } identifier[kw] operator[=] operator[SEP] identifier[Token] operator[SEP] identifier[match] operator[SEP] identifier[input] , Other[77] , identifier[FOLLOW_161] operator[SEP] 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[SEP] identifier[merge] operator[SEP] identifier[kw] operator[SEP] operator[SEP] identifier[newLeafNode] operator[SEP] identifier[kw] , identifier[grammarAccess] operator[SEP] identifier[getQualifiedNameInStaticImportAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getFullStopKeyword_1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[if] operator[SEP] identifier[cnt386] operator[>=] Other[1] operator[SEP] Keyword[break] identifier[loop386] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[>] Other[0] operator[SEP] { identifier[state] operator[SEP] identifier[failed] operator[=] literal[boolean] operator[SEP] Keyword[return] identifier[current] operator[SEP] } identifier[EarlyExitException] identifier[eee] operator[=] Keyword[new] identifier[EarlyExitException] operator[SEP] Other[386] , identifier[input] operator[SEP] operator[SEP] Keyword[throw] identifier[eee] operator[SEP] } identifier[cnt386] operator[++] operator[SEP] } Keyword[while] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[leaveRule] operator[SEP] operator[SEP] 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] }
@SuppressWarnings("WeakerAccess") public int floorSum(long sum) { int floor = IntAVLTree.NIL; for (int node = tree.root(); node != IntAVLTree.NIL; ) { final int left = tree.left(node); final long leftCount = aggregatedCounts[left]; if (leftCount <= sum) { floor = node; sum -= leftCount + count(node); node = tree.right(node); } else { node = tree.left(node); } } return floor; }
class class_name[name] begin[{] method[floorSum, return_type[type[int]], modifier[public], parameter[sum]] begin[{] local_variable[type[int], floor] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=left, postfix_operators=[], prefix_operators=[], qualifier=tree, selectors=[], type_arguments=None), name=left)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=aggregatedCounts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=left, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=leftCount)], modifiers={'final'}, type=BasicType(dimensions=[], name=long)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=leftCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=sum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=left, postfix_operators=[], prefix_operators=[], qualifier=tree, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=floor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=sum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=-=, value=BinaryOperation(operandl=MemberReference(member=leftCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=right, postfix_operators=[], prefix_operators=[], qualifier=tree, selectors=[], type_arguments=None)), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=NIL, postfix_operators=[], prefix_operators=[], qualifier=IntAVLTree, selectors=[]), operator=!=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=root, postfix_operators=[], prefix_operators=[], qualifier=tree, selectors=[], type_arguments=None), name=node)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=None), label=None) return[member[.floor]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[int] identifier[floorSum] operator[SEP] Keyword[long] identifier[sum] operator[SEP] { Keyword[int] identifier[floor] operator[=] identifier[IntAVLTree] operator[SEP] identifier[NIL] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[node] operator[=] identifier[tree] operator[SEP] identifier[root] operator[SEP] operator[SEP] operator[SEP] identifier[node] operator[!=] identifier[IntAVLTree] operator[SEP] identifier[NIL] operator[SEP] operator[SEP] { Keyword[final] Keyword[int] identifier[left] operator[=] identifier[tree] operator[SEP] identifier[left] operator[SEP] identifier[node] operator[SEP] operator[SEP] Keyword[final] Keyword[long] identifier[leftCount] operator[=] identifier[aggregatedCounts] operator[SEP] identifier[left] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[leftCount] operator[<=] identifier[sum] operator[SEP] { identifier[floor] operator[=] identifier[node] operator[SEP] identifier[sum] operator[-=] identifier[leftCount] operator[+] identifier[count] operator[SEP] identifier[node] operator[SEP] operator[SEP] identifier[node] operator[=] identifier[tree] operator[SEP] identifier[right] operator[SEP] identifier[node] operator[SEP] operator[SEP] } Keyword[else] { identifier[node] operator[=] identifier[tree] operator[SEP] identifier[left] operator[SEP] identifier[node] operator[SEP] operator[SEP] } } Keyword[return] identifier[floor] operator[SEP] }
@XmlElementDecl(namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", name = "isLastChunk", scope = AppendContentStream.class) public JAXBElement<Boolean> createAppendContentStreamIsLastChunk( Boolean value) { return new JAXBElement<Boolean>(_AppendContentStreamIsLastChunk_QNAME, Boolean.class, AppendContentStream.class, value); }
class class_name[name] begin[{] method[createAppendContentStreamIsLastChunk, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=_AppendContentStreamIsLastChunk_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Boolean, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AppendContentStream, sub_type=None)), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Boolean, sub_type=None))], dimensions=None, name=JAXBElement, sub_type=None))] end[}] END[}]
annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] , identifier[scope] operator[=] identifier[AppendContentStream] operator[SEP] Keyword[class] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[Boolean] operator[>] identifier[createAppendContentStreamIsLastChunk] operator[SEP] identifier[Boolean] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[Boolean] operator[>] operator[SEP] identifier[_AppendContentStreamIsLastChunk_QNAME] , identifier[Boolean] operator[SEP] Keyword[class] , identifier[AppendContentStream] operator[SEP] Keyword[class] , identifier[value] operator[SEP] operator[SEP] }
public static void processInputFileField(MultipartBody request, String fieldName, InputFile inputFile) { String fileId = inputFile.getFileID(); if (fileId != null) { request.field(fieldName, fileId, false); } else if (inputFile.getInputStream() != null) { request.field(fieldName, new InputStreamBody(inputFile.getInputStream(), inputFile.getFileName()), true); } else { // assume file is not null (this is existing behaviour as of 1.5.1) request.field(fieldName, new FileContainer(inputFile), true); } }
class class_name[name] begin[{] method[processInputFileField, return_type[void], modifier[public static], parameter[request, fieldName, inputFile]] begin[{] local_variable[type[String], fileId] if[binary_operation[member[.fileId], !=, literal[null]]] begin[{] call[request.field, parameter[member[.fieldName], member[.fileId], literal[false]]] else begin[{] if[binary_operation[call[inputFile.getInputStream, parameter[]], !=, literal[null]]] begin[{] call[request.field, parameter[member[.fieldName], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getInputStream, postfix_operators=[], prefix_operators=[], qualifier=inputFile, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getFileName, postfix_operators=[], prefix_operators=[], qualifier=inputFile, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InputStreamBody, sub_type=None)), literal[true]]] else begin[{] call[request.field, parameter[member[.fieldName], ClassCreator(arguments=[MemberReference(member=inputFile, 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=FileContainer, sub_type=None)), literal[true]]] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[processInputFileField] operator[SEP] identifier[MultipartBody] identifier[request] , identifier[String] identifier[fieldName] , identifier[InputFile] identifier[inputFile] operator[SEP] { identifier[String] identifier[fileId] operator[=] identifier[inputFile] operator[SEP] identifier[getFileID] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[fileId] operator[!=] Other[null] operator[SEP] { identifier[request] operator[SEP] identifier[field] operator[SEP] identifier[fieldName] , identifier[fileId] , literal[boolean] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[inputFile] operator[SEP] identifier[getInputStream] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[request] operator[SEP] identifier[field] operator[SEP] identifier[fieldName] , Keyword[new] identifier[InputStreamBody] operator[SEP] identifier[inputFile] operator[SEP] identifier[getInputStream] operator[SEP] operator[SEP] , identifier[inputFile] operator[SEP] identifier[getFileName] operator[SEP] operator[SEP] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] } Keyword[else] { identifier[request] operator[SEP] identifier[field] operator[SEP] identifier[fieldName] , Keyword[new] identifier[FileContainer] operator[SEP] identifier[inputFile] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] } }
public static Map addDefaultContext(Object root, ClassResolver classResolver, Map context) { return addDefaultContext(root, null, classResolver, null, context); }
class class_name[name] begin[{] method[addDefaultContext, return_type[type[Map]], modifier[public static], parameter[root, classResolver, context]] begin[{] return[call[.addDefaultContext, parameter[member[.root], literal[null], member[.classResolver], literal[null], member[.context]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Map] identifier[addDefaultContext] operator[SEP] identifier[Object] identifier[root] , identifier[ClassResolver] identifier[classResolver] , identifier[Map] identifier[context] operator[SEP] { Keyword[return] identifier[addDefaultContext] operator[SEP] identifier[root] , Other[null] , identifier[classResolver] , Other[null] , identifier[context] operator[SEP] operator[SEP] }
public void setOwner(JvmConstraintOwner newOwner) { if (newOwner != eInternalContainer() || (eContainerFeatureID() != TypesPackage.JVM_TYPE_CONSTRAINT__OWNER && newOwner != null)) { if (EcoreUtil.isAncestor(this, newOwner)) throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); NotificationChain msgs = null; if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs); if (newOwner != null) msgs = ((InternalEObject)newOwner).eInverseAdd(this, TypesPackage.JVM_CONSTRAINT_OWNER__CONSTRAINTS, JvmConstraintOwner.class, msgs); msgs = basicSetOwner(newOwner, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TypesPackage.JVM_TYPE_CONSTRAINT__OWNER, newOwner, newOwner)); }
class class_name[name] begin[{] method[setOwner, return_type[void], modifier[public], parameter[newOwner]] begin[{] if[binary_operation[binary_operation[member[.newOwner], !=, call[.eInternalContainer, parameter[]]], ||, binary_operation[binary_operation[call[.eContainerFeatureID, parameter[]], !=, member[TypesPackage.JVM_TYPE_CONSTRAINT__OWNER]], &&, binary_operation[member[.newOwner], !=, literal[null]]]]] begin[{] if[call[EcoreUtil.isAncestor, parameter[THIS[], member[.newOwner]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Recursive containment not allowed for "), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[NotificationChain], msgs] if[binary_operation[call[.eInternalContainer, parameter[]], !=, literal[null]]] begin[{] assign[member[.msgs], call[.eBasicRemoveFromContainer, parameter[member[.msgs]]]] else begin[{] None end[}] if[binary_operation[member[.newOwner], !=, literal[null]]] begin[{] assign[member[.msgs], Cast(expression=MemberReference(member=newOwner, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=InternalEObject, sub_type=None))] else begin[{] None end[}] assign[member[.msgs], call[.basicSetOwner, parameter[member[.newOwner], member[.msgs]]]] if[binary_operation[member[.msgs], !=, literal[null]]] begin[{] call[msgs.dispatch, parameter[]] else begin[{] None end[}] else begin[{] if[call[.eNotificationRequired, parameter[]]] begin[{] call[.eNotify, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=SET, postfix_operators=[], prefix_operators=[], qualifier=Notification, selectors=[]), MemberReference(member=JVM_TYPE_CONSTRAINT__OWNER, postfix_operators=[], prefix_operators=[], qualifier=TypesPackage, selectors=[]), MemberReference(member=newOwner, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=newOwner, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ENotificationImpl, sub_type=None))]] else begin[{] None end[}] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setOwner] operator[SEP] identifier[JvmConstraintOwner] identifier[newOwner] operator[SEP] { Keyword[if] operator[SEP] identifier[newOwner] operator[!=] identifier[eInternalContainer] operator[SEP] operator[SEP] operator[||] operator[SEP] identifier[eContainerFeatureID] operator[SEP] operator[SEP] operator[!=] identifier[TypesPackage] operator[SEP] identifier[JVM_TYPE_CONSTRAINT__OWNER] operator[&&] identifier[newOwner] operator[!=] Other[null] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[EcoreUtil] operator[SEP] identifier[isAncestor] operator[SEP] Keyword[this] , identifier[newOwner] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[NotificationChain] identifier[msgs] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[eInternalContainer] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] identifier[msgs] operator[=] identifier[eBasicRemoveFromContainer] operator[SEP] identifier[msgs] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[newOwner] operator[!=] Other[null] operator[SEP] identifier[msgs] operator[=] operator[SEP] operator[SEP] identifier[InternalEObject] operator[SEP] identifier[newOwner] operator[SEP] operator[SEP] identifier[eInverseAdd] operator[SEP] Keyword[this] , identifier[TypesPackage] operator[SEP] identifier[JVM_CONSTRAINT_OWNER__CONSTRAINTS] , identifier[JvmConstraintOwner] operator[SEP] Keyword[class] , identifier[msgs] operator[SEP] operator[SEP] identifier[msgs] operator[=] identifier[basicSetOwner] operator[SEP] identifier[newOwner] , identifier[msgs] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[msgs] operator[!=] Other[null] operator[SEP] identifier[msgs] operator[SEP] identifier[dispatch] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[eNotificationRequired] operator[SEP] operator[SEP] operator[SEP] identifier[eNotify] operator[SEP] Keyword[new] identifier[ENotificationImpl] operator[SEP] Keyword[this] , identifier[Notification] operator[SEP] identifier[SET] , identifier[TypesPackage] operator[SEP] identifier[JVM_TYPE_CONSTRAINT__OWNER] , identifier[newOwner] , identifier[newOwner] operator[SEP] operator[SEP] operator[SEP] }
@VisibleForTesting static Context parse(String text) { Queue<String> parts = Lists.newLinkedList(Arrays.asList(text.split(" "))); Context.Builder builder = HTML_PCDATA.toBuilder(); builder.withState(HtmlContext.valueOf(parts.remove())); if (!parts.isEmpty()) { try { builder.withElType(ElementType.valueOf(parts.element())); parts.remove(); } catch (IllegalArgumentException ex) { // OK } } if (!parts.isEmpty()) { try { builder.withAttrType(AttributeType.valueOf(parts.element())); parts.remove(); } catch (IllegalArgumentException ex) { // OK } } if (!parts.isEmpty()) { try { builder.withDelimType(AttributeEndDelimiter.valueOf(parts.element())); parts.remove(); } catch (IllegalArgumentException ex) { // OK } } if (!parts.isEmpty()) { try { builder.withSlashType(JsFollowingSlash.valueOf(parts.element())); parts.remove(); } catch (IllegalArgumentException ex) { // OK } } if (!parts.isEmpty()) { try { builder.withUriPart(UriPart.valueOf(parts.element())); parts.remove(); } catch (IllegalArgumentException ex) { // OK } } if (!parts.isEmpty()) { try { builder.withUriType(UriType.valueOf(parts.element())); parts.remove(); } catch (IllegalArgumentException ex) { // OK } } if (!parts.isEmpty()) { String part = parts.element(); String prefix = "templateNestDepth="; if (part.startsWith(prefix)) { try { builder.withTemplateNestDepth(Integer.parseInt(part.substring(prefix.length()))); parts.remove(); } catch (NumberFormatException ex) { // OK } } } if (!parts.isEmpty()) { String part = parts.element(); String prefix = "jsTemplateLiteralNestDepth="; if (part.startsWith(prefix)) { try { builder.withJsTemplateLiteralNestDepth(Integer.parseInt(part.substring(prefix.length()))); parts.remove(); } catch (NumberFormatException ex) { // OK } } } if (!parts.isEmpty()) { throw new IllegalArgumentException( "Unable to parse context \"" + text + "\". Unparsed portion: " + parts); } Context result = builder.build(); return result; }
class class_name[name] begin[{] method[parse, return_type[type[Context]], modifier[static], parameter[text]] begin[{] local_variable[type[Queue], parts] local_variable[type[Context], builder] call[builder.withState, parameter[call[HtmlContext.valueOf, parameter[call[parts.remove, parameter[]]]]]] if[call[parts.isEmpty, parameter[]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=element, postfix_operators=[], prefix_operators=[], qualifier=parts, selectors=[], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=ElementType, selectors=[], type_arguments=None)], member=withElType, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=remove, postfix_operators=[], prefix_operators=[], qualifier=parts, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['IllegalArgumentException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] if[call[parts.isEmpty, parameter[]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=element, postfix_operators=[], prefix_operators=[], qualifier=parts, selectors=[], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=AttributeType, selectors=[], type_arguments=None)], member=withAttrType, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=remove, postfix_operators=[], prefix_operators=[], qualifier=parts, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['IllegalArgumentException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] if[call[parts.isEmpty, parameter[]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=element, postfix_operators=[], prefix_operators=[], qualifier=parts, selectors=[], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=AttributeEndDelimiter, selectors=[], type_arguments=None)], member=withDelimType, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=remove, postfix_operators=[], prefix_operators=[], qualifier=parts, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['IllegalArgumentException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] if[call[parts.isEmpty, parameter[]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=element, postfix_operators=[], prefix_operators=[], qualifier=parts, selectors=[], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=JsFollowingSlash, selectors=[], type_arguments=None)], member=withSlashType, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=remove, postfix_operators=[], prefix_operators=[], qualifier=parts, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['IllegalArgumentException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] if[call[parts.isEmpty, parameter[]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=element, postfix_operators=[], prefix_operators=[], qualifier=parts, selectors=[], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=UriPart, selectors=[], type_arguments=None)], member=withUriPart, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=remove, postfix_operators=[], prefix_operators=[], qualifier=parts, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['IllegalArgumentException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] if[call[parts.isEmpty, parameter[]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=element, postfix_operators=[], prefix_operators=[], qualifier=parts, selectors=[], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=UriType, selectors=[], type_arguments=None)], member=withUriType, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=remove, postfix_operators=[], prefix_operators=[], qualifier=parts, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['IllegalArgumentException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] if[call[parts.isEmpty, parameter[]]] begin[{] local_variable[type[String], part] local_variable[type[String], prefix] if[call[part.startsWith, parameter[member[.prefix]]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=prefix, selectors=[], type_arguments=None)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=part, selectors=[], type_arguments=None)], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None)], member=withTemplateNestDepth, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=remove, postfix_operators=[], prefix_operators=[], qualifier=parts, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['NumberFormatException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] else begin[{] None end[}] if[call[parts.isEmpty, parameter[]]] begin[{] local_variable[type[String], part] local_variable[type[String], prefix] if[call[part.startsWith, parameter[member[.prefix]]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=prefix, selectors=[], type_arguments=None)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=part, selectors=[], type_arguments=None)], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None)], member=withJsTemplateLiteralNestDepth, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=remove, postfix_operators=[], prefix_operators=[], qualifier=parts, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['NumberFormatException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] else begin[{] None end[}] if[call[parts.isEmpty, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to parse context \""), operandr=MemberReference(member=text, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\". Unparsed portion: "), operator=+), operandr=MemberReference(member=parts, 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) else begin[{] None end[}] local_variable[type[Context], result] return[member[.result]] end[}] END[}]
annotation[@] identifier[VisibleForTesting] Keyword[static] identifier[Context] identifier[parse] operator[SEP] identifier[String] identifier[text] operator[SEP] { identifier[Queue] operator[<] identifier[String] operator[>] identifier[parts] operator[=] identifier[Lists] operator[SEP] identifier[newLinkedList] operator[SEP] identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[text] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Context] operator[SEP] identifier[Builder] identifier[builder] operator[=] identifier[HTML_PCDATA] operator[SEP] identifier[toBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[withState] operator[SEP] identifier[HtmlContext] operator[SEP] identifier[valueOf] operator[SEP] identifier[parts] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[parts] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { identifier[builder] operator[SEP] identifier[withElType] operator[SEP] identifier[ElementType] operator[SEP] identifier[valueOf] operator[SEP] identifier[parts] operator[SEP] identifier[element] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[parts] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalArgumentException] identifier[ex] operator[SEP] { } } Keyword[if] operator[SEP] operator[!] identifier[parts] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { identifier[builder] operator[SEP] identifier[withAttrType] operator[SEP] identifier[AttributeType] operator[SEP] identifier[valueOf] operator[SEP] identifier[parts] operator[SEP] identifier[element] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[parts] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalArgumentException] identifier[ex] operator[SEP] { } } Keyword[if] operator[SEP] operator[!] identifier[parts] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { identifier[builder] operator[SEP] identifier[withDelimType] operator[SEP] identifier[AttributeEndDelimiter] operator[SEP] identifier[valueOf] operator[SEP] identifier[parts] operator[SEP] identifier[element] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[parts] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalArgumentException] identifier[ex] operator[SEP] { } } Keyword[if] operator[SEP] operator[!] identifier[parts] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { identifier[builder] operator[SEP] identifier[withSlashType] operator[SEP] identifier[JsFollowingSlash] operator[SEP] identifier[valueOf] operator[SEP] identifier[parts] operator[SEP] identifier[element] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[parts] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalArgumentException] identifier[ex] operator[SEP] { } } Keyword[if] operator[SEP] operator[!] identifier[parts] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { identifier[builder] operator[SEP] identifier[withUriPart] operator[SEP] identifier[UriPart] operator[SEP] identifier[valueOf] operator[SEP] identifier[parts] operator[SEP] identifier[element] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[parts] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalArgumentException] identifier[ex] operator[SEP] { } } Keyword[if] operator[SEP] operator[!] identifier[parts] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { identifier[builder] operator[SEP] identifier[withUriType] operator[SEP] identifier[UriType] operator[SEP] identifier[valueOf] operator[SEP] identifier[parts] operator[SEP] identifier[element] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[parts] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalArgumentException] identifier[ex] operator[SEP] { } } Keyword[if] operator[SEP] operator[!] identifier[parts] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[part] operator[=] identifier[parts] operator[SEP] identifier[element] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[prefix] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[part] operator[SEP] identifier[startsWith] operator[SEP] identifier[prefix] operator[SEP] operator[SEP] { Keyword[try] { identifier[builder] operator[SEP] identifier[withTemplateNestDepth] operator[SEP] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[part] operator[SEP] identifier[substring] operator[SEP] identifier[prefix] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[parts] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NumberFormatException] identifier[ex] operator[SEP] { } } } Keyword[if] operator[SEP] operator[!] identifier[parts] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[part] operator[=] identifier[parts] operator[SEP] identifier[element] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[prefix] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[part] operator[SEP] identifier[startsWith] operator[SEP] identifier[prefix] operator[SEP] operator[SEP] { Keyword[try] { identifier[builder] operator[SEP] identifier[withJsTemplateLiteralNestDepth] operator[SEP] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[part] operator[SEP] identifier[substring] operator[SEP] identifier[prefix] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[parts] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NumberFormatException] identifier[ex] operator[SEP] { } } } Keyword[if] operator[SEP] operator[!] identifier[parts] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[text] operator[+] literal[String] operator[+] identifier[parts] operator[SEP] operator[SEP] } identifier[Context] identifier[result] operator[=] identifier[builder] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
public java.util.List<org.tensorflow.framework.Summary.Value> getValueList() { return value_; }
class class_name[name] begin[{] method[getValueList, return_type[type[java]], modifier[public], parameter[]] begin[{] return[member[.value_]] end[}] END[}]
Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[org] operator[SEP] identifier[tensorflow] operator[SEP] identifier[framework] operator[SEP] identifier[Summary] operator[SEP] identifier[Value] operator[>] identifier[getValueList] operator[SEP] operator[SEP] { Keyword[return] identifier[value_] operator[SEP] }
private static void setContentLength(HttpRequest req, HttpHeaders headers, int contentLength) { // https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.4 // prohibits to send message body for below cases. // and in those cases, content should be empty. if (req.method() == HttpMethod.HEAD || ArmeriaHttpUtil.isContentAlwaysEmpty(headers.status())) { return; } headers.setInt(HttpHeaderNames.CONTENT_LENGTH, contentLength); }
class class_name[name] begin[{] method[setContentLength, return_type[void], modifier[private static], parameter[req, headers, contentLength]] begin[{] if[binary_operation[binary_operation[call[req.method, parameter[]], ==, member[HttpMethod.HEAD]], ||, call[ArmeriaHttpUtil.isContentAlwaysEmpty, parameter[call[headers.status, parameter[]]]]]] begin[{] return[None] else begin[{] None end[}] call[headers.setInt, parameter[member[HttpHeaderNames.CONTENT_LENGTH], member[.contentLength]]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[setContentLength] operator[SEP] identifier[HttpRequest] identifier[req] , identifier[HttpHeaders] identifier[headers] , Keyword[int] identifier[contentLength] operator[SEP] { Keyword[if] operator[SEP] identifier[req] operator[SEP] identifier[method] operator[SEP] operator[SEP] operator[==] identifier[HttpMethod] operator[SEP] identifier[HEAD] operator[||] identifier[ArmeriaHttpUtil] operator[SEP] identifier[isContentAlwaysEmpty] operator[SEP] identifier[headers] operator[SEP] identifier[status] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } identifier[headers] operator[SEP] identifier[setInt] operator[SEP] identifier[HttpHeaderNames] operator[SEP] identifier[CONTENT_LENGTH] , identifier[contentLength] operator[SEP] operator[SEP] }
public static <T> Generator<PVector3D<T>> create() { return new PVector3DGenerator<>(PrimitiveGenerators.doubles( GeneratorConstants.BOUND_LARGE_DOUBLE_LOWER, GeneratorConstants.BOUND_LARGE_DOUBLE_UPPER )); }
class class_name[name] begin[{] method[create, return_type[type[Generator]], modifier[public static], parameter[]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=BOUND_LARGE_DOUBLE_LOWER, postfix_operators=[], prefix_operators=[], qualifier=GeneratorConstants, selectors=[]), MemberReference(member=BOUND_LARGE_DOUBLE_UPPER, postfix_operators=[], prefix_operators=[], qualifier=GeneratorConstants, selectors=[])], member=doubles, postfix_operators=[], prefix_operators=[], qualifier=PrimitiveGenerators, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=PVector3DGenerator, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Generator] operator[<] identifier[PVector3D] operator[<] identifier[T] operator[>] operator[>] identifier[create] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[PVector3DGenerator] operator[<] operator[>] operator[SEP] identifier[PrimitiveGenerators] operator[SEP] identifier[doubles] operator[SEP] identifier[GeneratorConstants] operator[SEP] identifier[BOUND_LARGE_DOUBLE_LOWER] , identifier[GeneratorConstants] operator[SEP] identifier[BOUND_LARGE_DOUBLE_UPPER] operator[SEP] operator[SEP] operator[SEP] }
@Nonnull public static <ELEMENTTYPE> String getImplodedMappedNonEmpty (@Nonnull final String sSep, @Nullable final ELEMENTTYPE [] aElements, @Nonnegative final int nOfs, @Nonnegative final int nLen, @Nonnull final Function <? super ELEMENTTYPE, String> aMapper) { ValueEnforcer.notNull (sSep, "Separator"); if (aElements != null) ValueEnforcer.isArrayOfsLen (aElements, nOfs, nLen); ValueEnforcer.notNull (aMapper, "Mapper"); final StringBuilder aSB = new StringBuilder (); if (aElements != null) { int nElementsAdded = 0; for (int i = nOfs; i < nOfs + nLen; ++i) { final String sElement = aMapper.apply (aElements[i]); if (hasText (sElement)) { if (nElementsAdded > 0) aSB.append (sSep); nElementsAdded++; aSB.append (sElement); } } } return aSB.toString (); }
class class_name[name] begin[{] method[getImplodedMappedNonEmpty, return_type[type[String]], modifier[public static], parameter[sSep, aElements, nOfs, nLen, aMapper]] begin[{] call[ValueEnforcer.notNull, parameter[member[.sSep], literal["Separator"]]] if[binary_operation[member[.aElements], !=, literal[null]]] begin[{] call[ValueEnforcer.isArrayOfsLen, parameter[member[.aElements], member[.nOfs], member[.nLen]]] else begin[{] None end[}] call[ValueEnforcer.notNull, parameter[member[.aMapper], literal["Mapper"]]] local_variable[type[StringBuilder], aSB] if[binary_operation[member[.aElements], !=, literal[null]]] begin[{] local_variable[type[int], nElementsAdded] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=aElements, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=apply, postfix_operators=[], prefix_operators=[], qualifier=aMapper, selectors=[], type_arguments=None), name=sElement)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=sElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=hasText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=nElementsAdded, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sSep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=aSB, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=MemberReference(member=nElementsAdded, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=aSB, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=nOfs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=nLen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=nOfs, 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) else begin[{] None end[}] return[call[aSB.toString, parameter[]]] end[}] END[}]
annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] operator[<] identifier[ELEMENTTYPE] operator[>] identifier[String] identifier[getImplodedMappedNonEmpty] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[String] identifier[sSep] , annotation[@] identifier[Nullable] Keyword[final] identifier[ELEMENTTYPE] operator[SEP] operator[SEP] identifier[aElements] , annotation[@] identifier[Nonnegative] Keyword[final] Keyword[int] identifier[nOfs] , annotation[@] identifier[Nonnegative] Keyword[final] Keyword[int] identifier[nLen] , annotation[@] identifier[Nonnull] Keyword[final] identifier[Function] operator[<] operator[?] Keyword[super] identifier[ELEMENTTYPE] , identifier[String] operator[>] identifier[aMapper] operator[SEP] { identifier[ValueEnforcer] operator[SEP] identifier[notNull] operator[SEP] identifier[sSep] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[aElements] operator[!=] Other[null] operator[SEP] identifier[ValueEnforcer] operator[SEP] identifier[isArrayOfsLen] operator[SEP] identifier[aElements] , identifier[nOfs] , identifier[nLen] operator[SEP] operator[SEP] identifier[ValueEnforcer] operator[SEP] identifier[notNull] operator[SEP] identifier[aMapper] , literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[StringBuilder] identifier[aSB] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[aElements] operator[!=] Other[null] operator[SEP] { Keyword[int] identifier[nElementsAdded] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[nOfs] operator[SEP] identifier[i] operator[<] identifier[nOfs] operator[+] identifier[nLen] operator[SEP] operator[++] identifier[i] operator[SEP] { Keyword[final] identifier[String] identifier[sElement] operator[=] identifier[aMapper] operator[SEP] identifier[apply] operator[SEP] identifier[aElements] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[hasText] operator[SEP] identifier[sElement] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[nElementsAdded] operator[>] Other[0] operator[SEP] identifier[aSB] operator[SEP] identifier[append] operator[SEP] identifier[sSep] operator[SEP] operator[SEP] identifier[nElementsAdded] operator[++] operator[SEP] identifier[aSB] operator[SEP] identifier[append] operator[SEP] identifier[sElement] operator[SEP] operator[SEP] } } } Keyword[return] identifier[aSB] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
@SuppressWarnings("WeakerAccess") protected final void addDeclaredStereotype(List<String> parentAnnotations, String stereotype, Map<CharSequence, Object> values) { if (stereotype != null) { String repeatedName = getRepeatedName(stereotype); if (repeatedName != null) { Object v = values.get(AnnotationMetadata.VALUE_MEMBER); if (v instanceof io.micronaut.core.annotation.AnnotationValue[]) { io.micronaut.core.annotation.AnnotationValue[] avs = (io.micronaut.core.annotation.AnnotationValue[]) v; for (io.micronaut.core.annotation.AnnotationValue av : avs) { addDeclaredRepeatableStereotype(parentAnnotations, stereotype, av); } } else if (v instanceof Iterable) { Iterable i = (Iterable) v; for (Object o : i) { if (o instanceof io.micronaut.core.annotation.AnnotationValue) { addDeclaredRepeatableStereotype(parentAnnotations, stereotype, (io.micronaut.core.annotation.AnnotationValue) o); } } } } else { Map<String, Map<CharSequence, Object>> declaredStereotypes = getDeclaredStereotypesInternal(); Map<String, Map<CharSequence, Object>> allStereotypes = getAllStereotypes(); List<String> annotationList = getAnnotationsByStereotypeInternal(stereotype); for (String parentAnnotation : parentAnnotations) { if (!annotationList.contains(parentAnnotation)) { annotationList.add(parentAnnotation); } } addAnnotation( stereotype, values, declaredStereotypes, allStereotypes, true ); } } }
class class_name[name] begin[{] method[addDeclaredStereotype, return_type[void], modifier[final protected], parameter[parentAnnotations, stereotype, values]] begin[{] if[binary_operation[member[.stereotype], !=, literal[null]]] begin[{] local_variable[type[String], repeatedName] if[binary_operation[member[.repeatedName], !=, literal[null]]] begin[{] local_variable[type[Object], v] if[binary_operation[member[.v], instanceof, type[io]]] begin[{] local_variable[type[io], avs] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=parentAnnotations, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=stereotype, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=av, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addDeclaredRepeatableStereotype, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=avs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=av)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=io, sub_type=ReferenceType(arguments=None, dimensions=None, name=micronaut, sub_type=ReferenceType(arguments=None, dimensions=None, name=core, sub_type=ReferenceType(arguments=None, dimensions=None, name=annotation, sub_type=ReferenceType(arguments=None, dimensions=None, name=AnnotationValue, sub_type=None))))))), label=None) else begin[{] if[binary_operation[member[.v], instanceof, type[Iterable]]] begin[{] local_variable[type[Iterable], i] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=io, sub_type=ReferenceType(arguments=None, dimensions=None, name=micronaut, sub_type=ReferenceType(arguments=None, dimensions=None, name=core, sub_type=ReferenceType(arguments=None, dimensions=None, name=annotation, sub_type=ReferenceType(arguments=None, dimensions=None, name=AnnotationValue, sub_type=None))))), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=parentAnnotations, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=stereotype, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=io, sub_type=ReferenceType(arguments=None, dimensions=None, name=micronaut, sub_type=ReferenceType(arguments=None, dimensions=None, name=core, sub_type=ReferenceType(arguments=None, dimensions=None, name=annotation, sub_type=ReferenceType(arguments=None, dimensions=None, name=AnnotationValue, sub_type=None))))))], member=addDeclaredRepeatableStereotype, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=o)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))), label=None) else begin[{] None end[}] end[}] else begin[{] local_variable[type[Map], declaredStereotypes] local_variable[type[Map], allStereotypes] local_variable[type[List], annotationList] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=parentAnnotation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=['!'], qualifier=annotationList, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=parentAnnotation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=annotationList, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=parentAnnotations, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=parentAnnotation)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) call[.addAnnotation, parameter[member[.stereotype], member[.values], member[.declaredStereotypes], member[.allStereotypes], literal[true]]] end[}] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] Keyword[final] Keyword[void] identifier[addDeclaredStereotype] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[parentAnnotations] , identifier[String] identifier[stereotype] , identifier[Map] operator[<] identifier[CharSequence] , identifier[Object] operator[>] identifier[values] operator[SEP] { Keyword[if] operator[SEP] identifier[stereotype] operator[!=] Other[null] operator[SEP] { identifier[String] identifier[repeatedName] operator[=] identifier[getRepeatedName] operator[SEP] identifier[stereotype] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[repeatedName] operator[!=] Other[null] operator[SEP] { identifier[Object] identifier[v] operator[=] identifier[values] operator[SEP] identifier[get] operator[SEP] identifier[AnnotationMetadata] operator[SEP] identifier[VALUE_MEMBER] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[v] Keyword[instanceof] identifier[io] operator[SEP] identifier[micronaut] operator[SEP] identifier[core] operator[SEP] identifier[annotation] operator[SEP] identifier[AnnotationValue] operator[SEP] operator[SEP] operator[SEP] { identifier[io] operator[SEP] identifier[micronaut] operator[SEP] identifier[core] operator[SEP] identifier[annotation] operator[SEP] identifier[AnnotationValue] operator[SEP] operator[SEP] identifier[avs] operator[=] operator[SEP] identifier[io] operator[SEP] identifier[micronaut] operator[SEP] identifier[core] operator[SEP] identifier[annotation] operator[SEP] identifier[AnnotationValue] operator[SEP] operator[SEP] operator[SEP] identifier[v] operator[SEP] Keyword[for] operator[SEP] identifier[io] operator[SEP] identifier[micronaut] operator[SEP] identifier[core] operator[SEP] identifier[annotation] operator[SEP] identifier[AnnotationValue] identifier[av] operator[:] identifier[avs] operator[SEP] { identifier[addDeclaredRepeatableStereotype] operator[SEP] identifier[parentAnnotations] , identifier[stereotype] , identifier[av] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[v] Keyword[instanceof] identifier[Iterable] operator[SEP] { identifier[Iterable] identifier[i] operator[=] operator[SEP] identifier[Iterable] operator[SEP] identifier[v] operator[SEP] Keyword[for] operator[SEP] identifier[Object] identifier[o] operator[:] identifier[i] operator[SEP] { Keyword[if] operator[SEP] identifier[o] Keyword[instanceof] identifier[io] operator[SEP] identifier[micronaut] operator[SEP] identifier[core] operator[SEP] identifier[annotation] operator[SEP] identifier[AnnotationValue] operator[SEP] { identifier[addDeclaredRepeatableStereotype] operator[SEP] identifier[parentAnnotations] , identifier[stereotype] , operator[SEP] identifier[io] operator[SEP] identifier[micronaut] operator[SEP] identifier[core] operator[SEP] identifier[annotation] operator[SEP] identifier[AnnotationValue] operator[SEP] identifier[o] operator[SEP] operator[SEP] } } } } Keyword[else] { identifier[Map] operator[<] identifier[String] , identifier[Map] operator[<] identifier[CharSequence] , identifier[Object] operator[>] operator[>] identifier[declaredStereotypes] operator[=] identifier[getDeclaredStereotypesInternal] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Map] operator[<] identifier[CharSequence] , identifier[Object] operator[>] operator[>] identifier[allStereotypes] operator[=] identifier[getAllStereotypes] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[annotationList] operator[=] identifier[getAnnotationsByStereotypeInternal] operator[SEP] identifier[stereotype] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[parentAnnotation] operator[:] identifier[parentAnnotations] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[annotationList] operator[SEP] identifier[contains] operator[SEP] identifier[parentAnnotation] operator[SEP] operator[SEP] { identifier[annotationList] operator[SEP] identifier[add] operator[SEP] identifier[parentAnnotation] operator[SEP] operator[SEP] } } identifier[addAnnotation] operator[SEP] identifier[stereotype] , identifier[values] , identifier[declaredStereotypes] , identifier[allStereotypes] , literal[boolean] operator[SEP] operator[SEP] } } }
public static synchronized List<Object> getAttributes(final String name) { final List<Object> data = new ArrayList<>(); for (final String id : SESSIONS.keySet()) { final HttpSession session = SESSIONS.get(id); try { final Object o = session.getAttribute(name); data.add(o); //CHECKSTYLE:OFF } catch (final Exception e) { // no data for this object. } //CHECKSTYLE:ON } return data; }
class class_name[name] begin[{] method[getAttributes, return_type[type[List]], modifier[synchronized public static], parameter[name]] begin[{] local_variable[type[List], data] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=SESSIONS, selectors=[], type_arguments=None), name=session)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=HttpSession, sub_type=None)), TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAttribute, postfix_operators=[], prefix_operators=[], qualifier=session, selectors=[], type_arguments=None), name=o)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=data, 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)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=SESSIONS, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=id)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[member[.data]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[synchronized] identifier[List] operator[<] identifier[Object] operator[>] identifier[getAttributes] operator[SEP] Keyword[final] identifier[String] identifier[name] operator[SEP] { Keyword[final] identifier[List] operator[<] identifier[Object] operator[>] identifier[data] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[id] operator[:] identifier[SESSIONS] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[HttpSession] identifier[session] operator[=] identifier[SESSIONS] operator[SEP] identifier[get] operator[SEP] identifier[id] operator[SEP] operator[SEP] Keyword[try] { Keyword[final] identifier[Object] identifier[o] operator[=] identifier[session] operator[SEP] identifier[getAttribute] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[data] operator[SEP] identifier[add] operator[SEP] identifier[o] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[Exception] identifier[e] operator[SEP] { } } Keyword[return] identifier[data] operator[SEP] }
public static IBundleDependencies resolveBundleDependencies(Bundle bundle, String... directDependencies) { return resolveBundleDependencies(bundle, (BundleURLMappings) null, directDependencies); }
class class_name[name] begin[{] method[resolveBundleDependencies, return_type[type[IBundleDependencies]], modifier[public static], parameter[bundle, directDependencies]] begin[{] return[call[.resolveBundleDependencies, parameter[member[.bundle], Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), type=ReferenceType(arguments=None, dimensions=[], name=BundleURLMappings, sub_type=None)), member[.directDependencies]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[IBundleDependencies] identifier[resolveBundleDependencies] operator[SEP] identifier[Bundle] identifier[bundle] , identifier[String] operator[...] identifier[directDependencies] operator[SEP] { Keyword[return] identifier[resolveBundleDependencies] operator[SEP] identifier[bundle] , operator[SEP] identifier[BundleURLMappings] operator[SEP] Other[null] , identifier[directDependencies] operator[SEP] operator[SEP] }
public Observable<ServiceResponse<SearchResponse>> searchWithServiceResponseAsync(long customConfig, String query, SearchOptionalParameter searchOptionalParameter) { if (query == null) { throw new IllegalArgumentException("Parameter query is required and cannot be null."); } final String acceptLanguage = searchOptionalParameter != null ? searchOptionalParameter.acceptLanguage() : null; final String userAgent = searchOptionalParameter != null ? searchOptionalParameter.userAgent() : this.client.userAgent(); final String clientId = searchOptionalParameter != null ? searchOptionalParameter.clientId() : null; final String clientIp = searchOptionalParameter != null ? searchOptionalParameter.clientIp() : null; final String location = searchOptionalParameter != null ? searchOptionalParameter.location() : null; final String countryCode = searchOptionalParameter != null ? searchOptionalParameter.countryCode() : null; final Integer count = searchOptionalParameter != null ? searchOptionalParameter.count() : null; final String market = searchOptionalParameter != null ? searchOptionalParameter.market() : null; final Integer offset = searchOptionalParameter != null ? searchOptionalParameter.offset() : null; final SafeSearch safeSearch = searchOptionalParameter != null ? searchOptionalParameter.safeSearch() : null; final String setLang = searchOptionalParameter != null ? searchOptionalParameter.setLang() : null; final Boolean textDecorations = searchOptionalParameter != null ? searchOptionalParameter.textDecorations() : null; final TextFormat textFormat = searchOptionalParameter != null ? searchOptionalParameter.textFormat() : null; return searchWithServiceResponseAsync(customConfig, query, acceptLanguage, userAgent, clientId, clientIp, location, countryCode, count, market, offset, safeSearch, setLang, textDecorations, textFormat); }
class class_name[name] begin[{] method[searchWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[customConfig, query, searchOptionalParameter]] begin[{] if[binary_operation[member[.query], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter query is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[String], acceptLanguage] local_variable[type[String], userAgent] local_variable[type[String], clientId] local_variable[type[String], clientIp] local_variable[type[String], location] local_variable[type[String], countryCode] local_variable[type[Integer], count] local_variable[type[String], market] local_variable[type[Integer], offset] local_variable[type[SafeSearch], safeSearch] local_variable[type[String], setLang] local_variable[type[Boolean], textDecorations] local_variable[type[TextFormat], textFormat] return[call[.searchWithServiceResponseAsync, parameter[member[.customConfig], member[.query], member[.acceptLanguage], member[.userAgent], member[.clientId], member[.clientIp], member[.location], member[.countryCode], member[.count], member[.market], member[.offset], member[.safeSearch], member[.setLang], member[.textDecorations], member[.textFormat]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[SearchResponse] operator[>] operator[>] identifier[searchWithServiceResponseAsync] operator[SEP] Keyword[long] identifier[customConfig] , identifier[String] identifier[query] , identifier[SearchOptionalParameter] identifier[searchOptionalParameter] operator[SEP] { Keyword[if] operator[SEP] identifier[query] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[final] identifier[String] identifier[acceptLanguage] operator[=] identifier[searchOptionalParameter] operator[!=] Other[null] operator[?] identifier[searchOptionalParameter] operator[SEP] identifier[acceptLanguage] operator[SEP] operator[SEP] operator[:] Other[null] operator[SEP] Keyword[final] identifier[String] identifier[userAgent] operator[=] identifier[searchOptionalParameter] operator[!=] Other[null] operator[?] identifier[searchOptionalParameter] operator[SEP] identifier[userAgent] operator[SEP] operator[SEP] operator[:] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[userAgent] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[clientId] operator[=] identifier[searchOptionalParameter] operator[!=] Other[null] operator[?] identifier[searchOptionalParameter] operator[SEP] identifier[clientId] operator[SEP] operator[SEP] operator[:] Other[null] operator[SEP] Keyword[final] identifier[String] identifier[clientIp] operator[=] identifier[searchOptionalParameter] operator[!=] Other[null] operator[?] identifier[searchOptionalParameter] operator[SEP] identifier[clientIp] operator[SEP] operator[SEP] operator[:] Other[null] operator[SEP] Keyword[final] identifier[String] identifier[location] operator[=] identifier[searchOptionalParameter] operator[!=] Other[null] operator[?] identifier[searchOptionalParameter] operator[SEP] identifier[location] operator[SEP] operator[SEP] operator[:] Other[null] operator[SEP] Keyword[final] identifier[String] identifier[countryCode] operator[=] identifier[searchOptionalParameter] operator[!=] Other[null] operator[?] identifier[searchOptionalParameter] operator[SEP] identifier[countryCode] operator[SEP] operator[SEP] operator[:] Other[null] operator[SEP] Keyword[final] identifier[Integer] identifier[count] operator[=] identifier[searchOptionalParameter] operator[!=] Other[null] operator[?] identifier[searchOptionalParameter] operator[SEP] identifier[count] operator[SEP] operator[SEP] operator[:] Other[null] operator[SEP] Keyword[final] identifier[String] identifier[market] operator[=] identifier[searchOptionalParameter] operator[!=] Other[null] operator[?] identifier[searchOptionalParameter] operator[SEP] identifier[market] operator[SEP] operator[SEP] operator[:] Other[null] operator[SEP] Keyword[final] identifier[Integer] identifier[offset] operator[=] identifier[searchOptionalParameter] operator[!=] Other[null] operator[?] identifier[searchOptionalParameter] operator[SEP] identifier[offset] operator[SEP] operator[SEP] operator[:] Other[null] operator[SEP] Keyword[final] identifier[SafeSearch] identifier[safeSearch] operator[=] identifier[searchOptionalParameter] operator[!=] Other[null] operator[?] identifier[searchOptionalParameter] operator[SEP] identifier[safeSearch] operator[SEP] operator[SEP] operator[:] Other[null] operator[SEP] Keyword[final] identifier[String] identifier[setLang] operator[=] identifier[searchOptionalParameter] operator[!=] Other[null] operator[?] identifier[searchOptionalParameter] operator[SEP] identifier[setLang] operator[SEP] operator[SEP] operator[:] Other[null] operator[SEP] Keyword[final] identifier[Boolean] identifier[textDecorations] operator[=] identifier[searchOptionalParameter] operator[!=] Other[null] operator[?] identifier[searchOptionalParameter] operator[SEP] identifier[textDecorations] operator[SEP] operator[SEP] operator[:] Other[null] operator[SEP] Keyword[final] identifier[TextFormat] identifier[textFormat] operator[=] identifier[searchOptionalParameter] operator[!=] Other[null] operator[?] identifier[searchOptionalParameter] operator[SEP] identifier[textFormat] operator[SEP] operator[SEP] operator[:] Other[null] operator[SEP] Keyword[return] identifier[searchWithServiceResponseAsync] operator[SEP] identifier[customConfig] , identifier[query] , identifier[acceptLanguage] , identifier[userAgent] , identifier[clientId] , identifier[clientIp] , identifier[location] , identifier[countryCode] , identifier[count] , identifier[market] , identifier[offset] , identifier[safeSearch] , identifier[setLang] , identifier[textDecorations] , identifier[textFormat] operator[SEP] operator[SEP] }
@Override public void performBoottime(OperationContext context, ModelNode operation, final Resource resource) throws OperationFailedException { context.addStep(new AbstractDeploymentChainStep() { @Override protected void execute(DeploymentProcessorTarget processorTarget) { processorTarget.addDeploymentProcessor(RequestControllerExtension.SUBSYSTEM_NAME, Phase.STRUCTURE, Phase.STRUCTURE_GLOBAL_REQUEST_CONTROLLER, new RequestControllerDeploymentUnitProcessor()); } }, OperationContext.Stage.RUNTIME); int maxRequests = RequestControllerRootDefinition.MAX_REQUESTS.resolveModelAttribute(context, resource.getModel()).asInt(); boolean trackIndividual = RequestControllerRootDefinition.TRACK_INDIVIDUAL_ENDPOINTS.resolveModelAttribute(context, resource.getModel()).asBoolean(); RequestController requestController = new RequestController(trackIndividual); requestController.setMaxRequestCount(maxRequests); context.getServiceTarget().addService(RequestController.SERVICE_NAME, requestController) .addDependency(JBOSS_SUSPEND_CONTROLLER, SuspendController.class, requestController.getShutdownControllerInjectedValue()) .install(); }
class class_name[name] begin[{] method[performBoottime, return_type[void], modifier[public], parameter[context, operation, resource]] begin[{] call[context.addStep, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SUBSYSTEM_NAME, postfix_operators=[], prefix_operators=[], qualifier=RequestControllerExtension, selectors=[]), MemberReference(member=STRUCTURE, postfix_operators=[], prefix_operators=[], qualifier=Phase, selectors=[]), MemberReference(member=STRUCTURE_GLOBAL_REQUEST_CONTROLLER, postfix_operators=[], prefix_operators=[], qualifier=Phase, selectors=[]), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RequestControllerDeploymentUnitProcessor, sub_type=None))], member=addDeploymentProcessor, postfix_operators=[], prefix_operators=[], qualifier=processorTarget, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'protected'}, name=execute, parameters=[FormalParameter(annotations=[], modifiers=set(), name=processorTarget, type=ReferenceType(arguments=None, dimensions=[], name=DeploymentProcessorTarget, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AbstractDeploymentChainStep, sub_type=None)), member[OperationContext.Stage.RUNTIME]]] local_variable[type[int], maxRequests] local_variable[type[boolean], trackIndividual] local_variable[type[RequestController], requestController] call[requestController.setMaxRequestCount, parameter[member[.maxRequests]]] call[context.getServiceTarget, parameter[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[performBoottime] operator[SEP] identifier[OperationContext] identifier[context] , identifier[ModelNode] identifier[operation] , Keyword[final] identifier[Resource] identifier[resource] operator[SEP] Keyword[throws] identifier[OperationFailedException] { identifier[context] operator[SEP] identifier[addStep] operator[SEP] Keyword[new] identifier[AbstractDeploymentChainStep] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[execute] operator[SEP] identifier[DeploymentProcessorTarget] identifier[processorTarget] operator[SEP] { identifier[processorTarget] operator[SEP] identifier[addDeploymentProcessor] operator[SEP] identifier[RequestControllerExtension] operator[SEP] identifier[SUBSYSTEM_NAME] , identifier[Phase] operator[SEP] identifier[STRUCTURE] , identifier[Phase] operator[SEP] identifier[STRUCTURE_GLOBAL_REQUEST_CONTROLLER] , Keyword[new] identifier[RequestControllerDeploymentUnitProcessor] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } , identifier[OperationContext] operator[SEP] identifier[Stage] operator[SEP] identifier[RUNTIME] operator[SEP] operator[SEP] Keyword[int] identifier[maxRequests] operator[=] identifier[RequestControllerRootDefinition] operator[SEP] identifier[MAX_REQUESTS] operator[SEP] identifier[resolveModelAttribute] operator[SEP] identifier[context] , identifier[resource] operator[SEP] identifier[getModel] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[asInt] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[trackIndividual] operator[=] identifier[RequestControllerRootDefinition] operator[SEP] identifier[TRACK_INDIVIDUAL_ENDPOINTS] operator[SEP] identifier[resolveModelAttribute] operator[SEP] identifier[context] , identifier[resource] operator[SEP] identifier[getModel] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[asBoolean] operator[SEP] operator[SEP] operator[SEP] identifier[RequestController] identifier[requestController] operator[=] Keyword[new] identifier[RequestController] operator[SEP] identifier[trackIndividual] operator[SEP] operator[SEP] identifier[requestController] operator[SEP] identifier[setMaxRequestCount] operator[SEP] identifier[maxRequests] operator[SEP] operator[SEP] identifier[context] operator[SEP] identifier[getServiceTarget] operator[SEP] operator[SEP] operator[SEP] identifier[addService] operator[SEP] identifier[RequestController] operator[SEP] identifier[SERVICE_NAME] , identifier[requestController] operator[SEP] operator[SEP] identifier[addDependency] operator[SEP] identifier[JBOSS_SUSPEND_CONTROLLER] , identifier[SuspendController] operator[SEP] Keyword[class] , identifier[requestController] operator[SEP] identifier[getShutdownControllerInjectedValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[install] operator[SEP] operator[SEP] operator[SEP] }
public static String methodToString(final Class<?> type, final Method method) { final StringBuilder res = new StringBuilder(); res.append(type.getSimpleName()).append('#').append(method.getName()).append('('); int i = 0; for (Class<?> param : method.getParameterTypes()) { if (i > 0) { res.append(", "); } final Type generic = method.getGenericParameterTypes()[i]; if (generic instanceof TypeVariable) { // using generic name, because its simpler to search visually in code res.append('<').append(((TypeVariable) generic).getName()).append('>'); } else { res.append(param.getSimpleName()); } i++; } res.append(')'); return res.toString(); }
class class_name[name] begin[{] method[methodToString, return_type[type[String]], modifier[public static], parameter[type, method]] begin[{] local_variable[type[StringBuilder], res] call[res.append, parameter[call[type.getSimpleName, parameter[]]]] local_variable[type[int], i] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=res, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getGenericParameterTypes, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))], type_arguments=None), name=generic)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Type, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=generic, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=TypeVariable, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=[], prefix_operators=[], qualifier=param, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=res, 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='<')], member=append, postfix_operators=[], prefix_operators=[], qualifier=res, selectors=[MethodInvocation(arguments=[Cast(expression=MemberReference(member=generic, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=TypeVariable, sub_type=None))], 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=MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getParameterTypes, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=param)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None))), label=None) call[res.append, parameter[literal[')']]] return[call[res.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[methodToString] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[type] , Keyword[final] identifier[Method] identifier[method] operator[SEP] { Keyword[final] identifier[StringBuilder] identifier[res] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[res] operator[SEP] identifier[append] operator[SEP] identifier[type] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[method] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[param] operator[:] identifier[method] operator[SEP] identifier[getParameterTypes] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[i] operator[>] Other[0] operator[SEP] { identifier[res] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[final] identifier[Type] identifier[generic] operator[=] identifier[method] operator[SEP] identifier[getGenericParameterTypes] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[generic] Keyword[instanceof] identifier[TypeVariable] operator[SEP] { identifier[res] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] operator[SEP] operator[SEP] identifier[TypeVariable] operator[SEP] identifier[generic] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[res] operator[SEP] identifier[append] operator[SEP] identifier[param] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[i] operator[++] operator[SEP] } identifier[res] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[res] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public static Instance findInstanceByPath( Instance rootInstance, String instancePath ) { Application tempApplication = new Application( new ApplicationTemplate()); if( rootInstance != null ) tempApplication.getRootInstances().add( rootInstance ); return findInstanceByPath( tempApplication, instancePath ); }
class class_name[name] begin[{] method[findInstanceByPath, return_type[type[Instance]], modifier[public static], parameter[rootInstance, instancePath]] begin[{] local_variable[type[Application], tempApplication] if[binary_operation[member[.rootInstance], !=, literal[null]]] begin[{] call[tempApplication.getRootInstances, parameter[]] else begin[{] None end[}] return[call[.findInstanceByPath, parameter[member[.tempApplication], member[.instancePath]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Instance] identifier[findInstanceByPath] operator[SEP] identifier[Instance] identifier[rootInstance] , identifier[String] identifier[instancePath] operator[SEP] { identifier[Application] identifier[tempApplication] operator[=] Keyword[new] identifier[Application] operator[SEP] Keyword[new] identifier[ApplicationTemplate] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[rootInstance] operator[!=] Other[null] operator[SEP] identifier[tempApplication] operator[SEP] identifier[getRootInstances] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[rootInstance] operator[SEP] operator[SEP] Keyword[return] identifier[findInstanceByPath] operator[SEP] identifier[tempApplication] , identifier[instancePath] operator[SEP] operator[SEP] }
public static base_response update(nitro_service client, systemgroup resource) throws Exception { systemgroup updateresource = new systemgroup(); updateresource.groupname = resource.groupname; updateresource.promptstring = resource.promptstring; updateresource.timeout = resource.timeout; return updateresource.update_resource(client); }
class class_name[name] begin[{] method[update, return_type[type[base_response]], modifier[public static], parameter[client, resource]] begin[{] local_variable[type[systemgroup], updateresource] assign[member[updateresource.groupname], member[resource.groupname]] assign[member[updateresource.promptstring], member[resource.promptstring]] assign[member[updateresource.timeout], member[resource.timeout]] return[call[updateresource.update_resource, parameter[member[.client]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[base_response] identifier[update] operator[SEP] identifier[nitro_service] identifier[client] , identifier[systemgroup] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] { identifier[systemgroup] identifier[updateresource] operator[=] Keyword[new] identifier[systemgroup] operator[SEP] operator[SEP] operator[SEP] identifier[updateresource] operator[SEP] identifier[groupname] operator[=] identifier[resource] operator[SEP] identifier[groupname] operator[SEP] identifier[updateresource] operator[SEP] identifier[promptstring] operator[=] identifier[resource] operator[SEP] identifier[promptstring] operator[SEP] identifier[updateresource] operator[SEP] identifier[timeout] operator[=] identifier[resource] operator[SEP] identifier[timeout] operator[SEP] Keyword[return] identifier[updateresource] operator[SEP] identifier[update_resource] operator[SEP] identifier[client] operator[SEP] operator[SEP] }
public void setOccurrences(FSList v) { if (CandidateAnswerVariant_Type.featOkTst && ((CandidateAnswerVariant_Type)jcasType).casFeat_occurrences == null) jcasType.jcas.throwFeatMissing("occurrences", "edu.cmu.lti.oaqa.type.answer.CandidateAnswerVariant"); jcasType.ll_cas.ll_setRefValue(addr, ((CandidateAnswerVariant_Type)jcasType).casFeatCode_occurrences, jcasType.ll_cas.ll_getFSRef(v));}
class class_name[name] begin[{] method[setOccurrences, return_type[void], modifier[public], parameter[v]] begin[{] if[binary_operation[member[CandidateAnswerVariant_Type.featOkTst], &&, binary_operation[Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=CandidateAnswerVariant_Type, sub_type=None)), ==, literal[null]]]] begin[{] call[jcasType.jcas.throwFeatMissing, parameter[literal["occurrences"], literal["edu.cmu.lti.oaqa.type.answer.CandidateAnswerVariant"]]] else begin[{] None end[}] call[jcasType.ll_cas.ll_setRefValue, parameter[member[.addr], Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=CandidateAnswerVariant_Type, sub_type=None)), call[jcasType.ll_cas.ll_getFSRef, parameter[member[.v]]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setOccurrences] operator[SEP] identifier[FSList] identifier[v] operator[SEP] { Keyword[if] operator[SEP] identifier[CandidateAnswerVariant_Type] operator[SEP] identifier[featOkTst] operator[&&] operator[SEP] operator[SEP] identifier[CandidateAnswerVariant_Type] operator[SEP] identifier[jcasType] operator[SEP] operator[SEP] identifier[casFeat_occurrences] operator[==] Other[null] operator[SEP] identifier[jcasType] operator[SEP] identifier[jcas] operator[SEP] identifier[throwFeatMissing] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[jcasType] operator[SEP] identifier[ll_cas] operator[SEP] identifier[ll_setRefValue] operator[SEP] identifier[addr] , operator[SEP] operator[SEP] identifier[CandidateAnswerVariant_Type] operator[SEP] identifier[jcasType] operator[SEP] operator[SEP] identifier[casFeatCode_occurrences] , identifier[jcasType] operator[SEP] identifier[ll_cas] operator[SEP] identifier[ll_getFSRef] operator[SEP] identifier[v] operator[SEP] operator[SEP] operator[SEP] }
@Override public Path build(Path dir) throws IOException { String name = getName(); lead = new Lead(name); addProvide(getString(RPMTAG_NAME), getString(RPMTAG_VERSION), Condition.EQUAL); addRequireInt("rpmlib(CompressedFileNames)", "3.0.4-1", Dependency.EQUAL, Dependency.LESS, Dependency.RPMLIB); addInt32(RPMTAG_SIZE, getInt32Array(RPMTAG_FILESIZES).stream().collect(Collectors.summingInt((i) -> i))); // trailer CPIO cpio = new CPIO(); cpio.namesize = 11; fileRecords.add(new FileRecord(cpio, "TRAILER!!!", ByteBuffer.allocate(0))); // header ByteBuffer hdr = DynamicByteBuffer.create(Integer.MAX_VALUE); hdr.order(ByteOrder.BIG_ENDIAN); header.save(hdr); hdr.flip(); // payload ByteBuffer payload = DynamicByteBuffer.create(Integer.MAX_VALUE); payload.order(ByteOrder.BIG_ENDIAN); try (final FilterByteBuffer fbb = new FilterByteBuffer(payload, null, GZIPOutputStream::new)) { for (FileRecord fr : fileRecords) { fr.save(fbb); } } payload.flip(); // signature MessageDigest md5; try { md5 = MessageDigest.getInstance("MD5"); } catch (NoSuchAlgorithmException ex) { throw new IOException(ex); } ByteBuffer dupHdr = hdr.duplicate(); md5.update(dupHdr); ByteBuffer dupPayload = payload.duplicate(); md5.update(dupPayload); byte[] digest = md5.digest(); setBin(RPMSIGTAG_MD5, digest); addInt32(RPMSIGTAG_SIZE, hdr.limit() + payload.limit()); checkRequiredTags(); ByteBuffer rpm = DynamicByteBuffer.create(Integer.MAX_VALUE); rpm.order(ByteOrder.BIG_ENDIAN); lead.save(rpm); signature.save(rpm); align(rpm, 8); rpm.put(hdr); rpm.put(payload); rpm.flip(); Path path = dir.resolve("lsb-" + name + ".rpm"); try (final FileChannel fc = FileChannel.open(path, StandardOpenOption.READ, StandardOpenOption.WRITE, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING)) { fc.write(rpm); } return path; }
class class_name[name] begin[{] method[build, return_type[type[Path]], modifier[public], parameter[dir]] begin[{] local_variable[type[String], name] assign[member[.lead], ClassCreator(arguments=[MemberReference(member=name, 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=Lead, sub_type=None))] call[.addProvide, parameter[call[.getString, parameter[member[.RPMTAG_NAME]]], call[.getString, parameter[member[.RPMTAG_VERSION]]], member[Condition.EQUAL]]] call[.addRequireInt, parameter[literal["rpmlib(CompressedFileNames)"], literal["3.0.4-1"], member[Dependency.EQUAL], member[Dependency.LESS], member[Dependency.RPMLIB]]] call[.addInt32, parameter[member[.RPMTAG_SIZE], call[.getInt32Array, parameter[member[.RPMTAG_FILESIZES]]]]] local_variable[type[CPIO], cpio] assign[member[cpio.namesize], literal[11]] call[fileRecords.add, parameter[ClassCreator(arguments=[MemberReference(member=cpio, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TRAILER!!!"), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=allocate, postfix_operators=[], prefix_operators=[], qualifier=ByteBuffer, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileRecord, sub_type=None))]] local_variable[type[ByteBuffer], hdr] call[hdr.order, parameter[member[ByteOrder.BIG_ENDIAN]]] call[header.save, parameter[member[.hdr]]] call[hdr.flip, parameter[]] local_variable[type[ByteBuffer], payload] call[payload.order, parameter[member[ByteOrder.BIG_ENDIAN]]] TryStatement(block=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=fbb, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=save, postfix_operators=[], prefix_operators=[], qualifier=fr, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=fileRecords, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=fr)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FileRecord, sub_type=None))), label=None)], catches=None, finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers={'final'}, name=fbb, type=ReferenceType(arguments=None, dimensions=[], name=FilterByteBuffer, sub_type=None), value=ClassCreator(arguments=[MemberReference(member=payload, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MethodReference(expression=MemberReference(member=GZIPOutputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), method=MemberReference(member=new, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), type_arguments=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FilterByteBuffer, sub_type=None)))]) call[payload.flip, parameter[]] local_variable[type[MessageDigest], md5] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=md5, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="MD5")], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=MessageDigest, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['NoSuchAlgorithmException']))], finally_block=None, label=None, resources=None) local_variable[type[ByteBuffer], dupHdr] call[md5.update, parameter[member[.dupHdr]]] local_variable[type[ByteBuffer], dupPayload] call[md5.update, parameter[member[.dupPayload]]] local_variable[type[byte], digest] call[.setBin, parameter[member[.RPMSIGTAG_MD5], member[.digest]]] call[.addInt32, parameter[member[.RPMSIGTAG_SIZE], binary_operation[call[hdr.limit, parameter[]], +, call[payload.limit, parameter[]]]]] call[.checkRequiredTags, parameter[]] local_variable[type[ByteBuffer], rpm] call[rpm.order, parameter[member[ByteOrder.BIG_ENDIAN]]] call[lead.save, parameter[member[.rpm]]] call[signature.save, parameter[member[.rpm]]] call[.align, parameter[member[.rpm], literal[8]]] call[rpm.put, parameter[member[.hdr]]] call[rpm.put, parameter[member[.payload]]] call[rpm.flip, parameter[]] local_variable[type[Path], path] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=rpm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=fc, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers={'final'}, name=fc, type=ReferenceType(arguments=None, dimensions=[], name=FileChannel, sub_type=None), value=MethodInvocation(arguments=[MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=READ, postfix_operators=[], prefix_operators=[], qualifier=StandardOpenOption, selectors=[]), MemberReference(member=WRITE, postfix_operators=[], prefix_operators=[], qualifier=StandardOpenOption, selectors=[]), MemberReference(member=CREATE, postfix_operators=[], prefix_operators=[], qualifier=StandardOpenOption, selectors=[]), MemberReference(member=TRUNCATE_EXISTING, postfix_operators=[], prefix_operators=[], qualifier=StandardOpenOption, selectors=[])], member=open, postfix_operators=[], prefix_operators=[], qualifier=FileChannel, selectors=[], type_arguments=None))]) return[member[.path]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Path] identifier[build] operator[SEP] identifier[Path] identifier[dir] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[name] operator[=] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[lead] operator[=] Keyword[new] identifier[Lead] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[addProvide] operator[SEP] identifier[getString] operator[SEP] identifier[RPMTAG_NAME] operator[SEP] , identifier[getString] operator[SEP] identifier[RPMTAG_VERSION] operator[SEP] , identifier[Condition] operator[SEP] identifier[EQUAL] operator[SEP] operator[SEP] identifier[addRequireInt] operator[SEP] literal[String] , literal[String] , identifier[Dependency] operator[SEP] identifier[EQUAL] , identifier[Dependency] operator[SEP] identifier[LESS] , identifier[Dependency] operator[SEP] identifier[RPMLIB] operator[SEP] operator[SEP] identifier[addInt32] operator[SEP] identifier[RPMTAG_SIZE] , identifier[getInt32Array] operator[SEP] identifier[RPMTAG_FILESIZES] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[summingInt] operator[SEP] operator[SEP] identifier[i] operator[SEP] operator[->] identifier[i] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[CPIO] identifier[cpio] operator[=] Keyword[new] identifier[CPIO] operator[SEP] operator[SEP] operator[SEP] identifier[cpio] operator[SEP] identifier[namesize] operator[=] Other[11] operator[SEP] identifier[fileRecords] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[FileRecord] operator[SEP] identifier[cpio] , literal[String] , identifier[ByteBuffer] operator[SEP] identifier[allocate] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ByteBuffer] identifier[hdr] operator[=] identifier[DynamicByteBuffer] operator[SEP] identifier[create] operator[SEP] identifier[Integer] operator[SEP] identifier[MAX_VALUE] operator[SEP] operator[SEP] identifier[hdr] operator[SEP] identifier[order] operator[SEP] identifier[ByteOrder] operator[SEP] identifier[BIG_ENDIAN] operator[SEP] operator[SEP] identifier[header] operator[SEP] identifier[save] operator[SEP] identifier[hdr] operator[SEP] operator[SEP] identifier[hdr] operator[SEP] identifier[flip] operator[SEP] operator[SEP] operator[SEP] identifier[ByteBuffer] identifier[payload] operator[=] identifier[DynamicByteBuffer] operator[SEP] identifier[create] operator[SEP] identifier[Integer] operator[SEP] identifier[MAX_VALUE] operator[SEP] operator[SEP] identifier[payload] operator[SEP] identifier[order] operator[SEP] identifier[ByteOrder] operator[SEP] identifier[BIG_ENDIAN] operator[SEP] operator[SEP] Keyword[try] operator[SEP] Keyword[final] identifier[FilterByteBuffer] identifier[fbb] operator[=] Keyword[new] identifier[FilterByteBuffer] operator[SEP] identifier[payload] , Other[null] , identifier[GZIPOutputStream] operator[::] Keyword[new] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[FileRecord] identifier[fr] operator[:] identifier[fileRecords] operator[SEP] { identifier[fr] operator[SEP] identifier[save] operator[SEP] identifier[fbb] operator[SEP] operator[SEP] } } identifier[payload] operator[SEP] identifier[flip] operator[SEP] operator[SEP] operator[SEP] identifier[MessageDigest] identifier[md5] operator[SEP] Keyword[try] { identifier[md5] operator[=] identifier[MessageDigest] operator[SEP] identifier[getInstance] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NoSuchAlgorithmException] identifier[ex] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] identifier[ex] operator[SEP] operator[SEP] } identifier[ByteBuffer] identifier[dupHdr] operator[=] identifier[hdr] operator[SEP] identifier[duplicate] operator[SEP] operator[SEP] operator[SEP] identifier[md5] operator[SEP] identifier[update] operator[SEP] identifier[dupHdr] operator[SEP] operator[SEP] identifier[ByteBuffer] identifier[dupPayload] operator[=] identifier[payload] operator[SEP] identifier[duplicate] operator[SEP] operator[SEP] operator[SEP] identifier[md5] operator[SEP] identifier[update] operator[SEP] identifier[dupPayload] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[digest] operator[=] identifier[md5] operator[SEP] identifier[digest] operator[SEP] operator[SEP] operator[SEP] identifier[setBin] operator[SEP] identifier[RPMSIGTAG_MD5] , identifier[digest] operator[SEP] operator[SEP] identifier[addInt32] operator[SEP] identifier[RPMSIGTAG_SIZE] , identifier[hdr] operator[SEP] identifier[limit] operator[SEP] operator[SEP] operator[+] identifier[payload] operator[SEP] identifier[limit] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[checkRequiredTags] operator[SEP] operator[SEP] operator[SEP] identifier[ByteBuffer] identifier[rpm] operator[=] identifier[DynamicByteBuffer] operator[SEP] identifier[create] operator[SEP] identifier[Integer] operator[SEP] identifier[MAX_VALUE] operator[SEP] operator[SEP] identifier[rpm] operator[SEP] identifier[order] operator[SEP] identifier[ByteOrder] operator[SEP] identifier[BIG_ENDIAN] operator[SEP] operator[SEP] identifier[lead] operator[SEP] identifier[save] operator[SEP] identifier[rpm] operator[SEP] operator[SEP] identifier[signature] operator[SEP] identifier[save] operator[SEP] identifier[rpm] operator[SEP] operator[SEP] identifier[align] operator[SEP] identifier[rpm] , Other[8] operator[SEP] operator[SEP] identifier[rpm] operator[SEP] identifier[put] operator[SEP] identifier[hdr] operator[SEP] operator[SEP] identifier[rpm] operator[SEP] identifier[put] operator[SEP] identifier[payload] operator[SEP] operator[SEP] identifier[rpm] operator[SEP] identifier[flip] operator[SEP] operator[SEP] operator[SEP] identifier[Path] identifier[path] operator[=] identifier[dir] operator[SEP] identifier[resolve] operator[SEP] literal[String] operator[+] identifier[name] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[try] operator[SEP] Keyword[final] identifier[FileChannel] identifier[fc] operator[=] identifier[FileChannel] operator[SEP] identifier[open] operator[SEP] identifier[path] , identifier[StandardOpenOption] operator[SEP] identifier[READ] , identifier[StandardOpenOption] operator[SEP] identifier[WRITE] , identifier[StandardOpenOption] operator[SEP] identifier[CREATE] , identifier[StandardOpenOption] operator[SEP] identifier[TRUNCATE_EXISTING] operator[SEP] operator[SEP] { identifier[fc] operator[SEP] identifier[write] operator[SEP] identifier[rpm] operator[SEP] operator[SEP] } Keyword[return] identifier[path] operator[SEP] }
<E> Observable<E> addLogging(@NonNull Observable<E> obs, @NonNull Logger log, final String msg) { return obs.doOnNext(r -> log(log, (ComapiResult) r, msg)) .doOnError(t -> log(log, t, msg)); }
class class_name[name] begin[{] method[addLogging, return_type[type[Observable]], modifier[default], parameter[obs, log, msg]] begin[{] return[call[obs.doOnNext, parameter[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=log, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ComapiResult, sub_type=None)), MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=log, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), parameters=[MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]]] end[}] END[}]
operator[<] identifier[E] operator[>] identifier[Observable] operator[<] identifier[E] operator[>] identifier[addLogging] operator[SEP] annotation[@] identifier[NonNull] identifier[Observable] operator[<] identifier[E] operator[>] identifier[obs] , annotation[@] identifier[NonNull] identifier[Logger] identifier[log] , Keyword[final] identifier[String] identifier[msg] operator[SEP] { Keyword[return] identifier[obs] operator[SEP] identifier[doOnNext] operator[SEP] identifier[r] operator[->] identifier[log] operator[SEP] identifier[log] , operator[SEP] identifier[ComapiResult] operator[SEP] identifier[r] , identifier[msg] operator[SEP] operator[SEP] operator[SEP] identifier[doOnError] operator[SEP] identifier[t] operator[->] identifier[log] operator[SEP] identifier[log] , identifier[t] , identifier[msg] operator[SEP] operator[SEP] operator[SEP] }
public Observable<Page<ManagedInstanceEncryptionProtectorInner>> listByInstanceNextAsync(final String nextPageLink) { return listByInstanceNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<ManagedInstanceEncryptionProtectorInner>>, Page<ManagedInstanceEncryptionProtectorInner>>() { @Override public Page<ManagedInstanceEncryptionProtectorInner> call(ServiceResponse<Page<ManagedInstanceEncryptionProtectorInner>> response) { return response.body(); } }); }
class class_name[name] begin[{] method[listByInstanceNextAsync, return_type[type[Observable]], modifier[public], parameter[nextPageLink]] begin[{] return[call[.listByInstanceNextWithServiceResponseAsync, parameter[member[.nextPageLink]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[ManagedInstanceEncryptionProtectorInner] operator[>] operator[>] identifier[listByInstanceNextAsync] operator[SEP] Keyword[final] identifier[String] identifier[nextPageLink] operator[SEP] { Keyword[return] identifier[listByInstanceNextWithServiceResponseAsync] operator[SEP] identifier[nextPageLink] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[ManagedInstanceEncryptionProtectorInner] operator[>] operator[>] , identifier[Page] operator[<] identifier[ManagedInstanceEncryptionProtectorInner] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Page] operator[<] identifier[ManagedInstanceEncryptionProtectorInner] operator[>] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[ManagedInstanceEncryptionProtectorInner] operator[>] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public synchronized SamplerResult<T> finishSampling(int count) { List<Counter<T>> results = Collections.EMPTY_LIST; long cardinality = 0; if (enabled) { enabled = false; results = summary.topK(count); cardinality = hll.cardinality(); } return new SamplerResult<T>(results, cardinality); }
class class_name[name] begin[{] method[finishSampling, return_type[type[SamplerResult]], modifier[synchronized public], parameter[count]] begin[{] local_variable[type[List], results] local_variable[type[long], cardinality] if[member[.enabled]] begin[{] assign[member[.enabled], literal[false]] assign[member[.results], call[summary.topK, parameter[member[.count]]]] assign[member[.cardinality], call[hll.cardinality, parameter[]]] else begin[{] None end[}] return[ClassCreator(arguments=[MemberReference(member=results, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cardinality, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=SamplerResult, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[synchronized] identifier[SamplerResult] operator[<] identifier[T] operator[>] identifier[finishSampling] operator[SEP] Keyword[int] identifier[count] operator[SEP] { identifier[List] operator[<] identifier[Counter] operator[<] identifier[T] operator[>] operator[>] identifier[results] operator[=] identifier[Collections] operator[SEP] identifier[EMPTY_LIST] operator[SEP] Keyword[long] identifier[cardinality] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[enabled] operator[SEP] { identifier[enabled] operator[=] literal[boolean] operator[SEP] identifier[results] operator[=] identifier[summary] operator[SEP] identifier[topK] operator[SEP] identifier[count] operator[SEP] operator[SEP] identifier[cardinality] operator[=] identifier[hll] operator[SEP] identifier[cardinality] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[SamplerResult] operator[<] identifier[T] operator[>] operator[SEP] identifier[results] , identifier[cardinality] operator[SEP] operator[SEP] }
public static void proceedToNextStateFrom(InstallState prior) { InstallState next = getNextInstallState(prior); if (next != null) { Jenkins.getInstance().setInstallState(next); } }
class class_name[name] begin[{] method[proceedToNextStateFrom, return_type[void], modifier[public static], parameter[prior]] begin[{] local_variable[type[InstallState], next] if[binary_operation[member[.next], !=, literal[null]]] begin[{] call[Jenkins.getInstance, parameter[]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[proceedToNextStateFrom] operator[SEP] identifier[InstallState] identifier[prior] operator[SEP] { identifier[InstallState] identifier[next] operator[=] identifier[getNextInstallState] operator[SEP] identifier[prior] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[next] operator[!=] Other[null] operator[SEP] { identifier[Jenkins] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[setInstallState] operator[SEP] identifier[next] operator[SEP] operator[SEP] } }
public void evaluate(DoubleSolution solution) { double[] f = new double[getNumberOfObjectives()]; double g = this.evalG(solution); f[0] = (1 + g) * solution.getVariableValue(0) * solution.getVariableValue(1); f[1] = (1 + g) * solution.getVariableValue(0) * (1 - solution.getVariableValue(1)); f[2] = (1 + g) * (1 - solution.getVariableValue(0)); solution.setObjective(0, f[0]); solution.setObjective(1, f[1]); solution.setObjective(2, f[2]); }
class class_name[name] begin[{] method[evaluate, return_type[void], modifier[public], parameter[solution]] begin[{] local_variable[type[double], f] local_variable[type[double], g] assign[member[.f], binary_operation[binary_operation[binary_operation[literal[1], +, member[.g]], *, call[solution.getVariableValue, parameter[literal[0]]]], *, call[solution.getVariableValue, parameter[literal[1]]]]] assign[member[.f], binary_operation[binary_operation[binary_operation[literal[1], +, member[.g]], *, call[solution.getVariableValue, parameter[literal[0]]]], *, binary_operation[literal[1], -, call[solution.getVariableValue, parameter[literal[1]]]]]] assign[member[.f], binary_operation[binary_operation[literal[1], +, member[.g]], *, binary_operation[literal[1], -, call[solution.getVariableValue, parameter[literal[0]]]]]] call[solution.setObjective, parameter[literal[0], member[.f]]] call[solution.setObjective, parameter[literal[1], member[.f]]] call[solution.setObjective, parameter[literal[2], member[.f]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[evaluate] operator[SEP] identifier[DoubleSolution] identifier[solution] operator[SEP] { Keyword[double] operator[SEP] operator[SEP] identifier[f] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[getNumberOfObjectives] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[g] operator[=] Keyword[this] operator[SEP] identifier[evalG] operator[SEP] identifier[solution] operator[SEP] operator[SEP] identifier[f] operator[SEP] Other[0] operator[SEP] operator[=] operator[SEP] Other[1] operator[+] identifier[g] operator[SEP] operator[*] identifier[solution] operator[SEP] identifier[getVariableValue] operator[SEP] Other[0] operator[SEP] operator[*] identifier[solution] operator[SEP] identifier[getVariableValue] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[f] operator[SEP] Other[1] operator[SEP] operator[=] operator[SEP] Other[1] operator[+] identifier[g] operator[SEP] operator[*] identifier[solution] operator[SEP] identifier[getVariableValue] operator[SEP] Other[0] operator[SEP] operator[*] operator[SEP] Other[1] operator[-] identifier[solution] operator[SEP] identifier[getVariableValue] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[f] operator[SEP] Other[2] operator[SEP] operator[=] operator[SEP] Other[1] operator[+] identifier[g] operator[SEP] operator[*] operator[SEP] Other[1] operator[-] identifier[solution] operator[SEP] identifier[getVariableValue] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[solution] operator[SEP] identifier[setObjective] operator[SEP] Other[0] , identifier[f] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[solution] operator[SEP] identifier[setObjective] operator[SEP] Other[1] , identifier[f] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[solution] operator[SEP] identifier[setObjective] operator[SEP] Other[2] , identifier[f] operator[SEP] Other[2] operator[SEP] operator[SEP] operator[SEP] }
public static String stringFor(int n) { switch (n) { case CUSOLVER_STATUS_SUCCESS: return "CUSOLVER_STATUS_SUCCESS"; case CUSOLVER_STATUS_NOT_INITIALIZED: return "CUSOLVER_STATUS_NOT_INITIALIZED"; case CUSOLVER_STATUS_ALLOC_FAILED: return "CUSOLVER_STATUS_ALLOC_FAILED"; case CUSOLVER_STATUS_INVALID_VALUE: return "CUSOLVER_STATUS_INVALID_VALUE"; case CUSOLVER_STATUS_ARCH_MISMATCH: return "CUSOLVER_STATUS_ARCH_MISMATCH"; case CUSOLVER_STATUS_MAPPING_ERROR: return "CUSOLVER_STATUS_MAPPING_ERROR"; case CUSOLVER_STATUS_EXECUTION_FAILED: return "CUSOLVER_STATUS_EXECUTION_FAILED"; case CUSOLVER_STATUS_INTERNAL_ERROR: return "CUSOLVER_STATUS_INTERNAL_ERROR"; case CUSOLVER_STATUS_MATRIX_TYPE_NOT_SUPPORTED: return "CUSOLVER_STATUS_MATRIX_TYPE_NOT_SUPPORTED"; case CUSOLVER_STATUS_NOT_SUPPORTED: return "CUSOLVER_STATUS_NOT_SUPPORTED"; case CUSOLVER_STATUS_ZERO_PIVOT: return "CUSOLVER_STATUS_ZERO_PIVOT"; case CUSOLVER_STATUS_INVALID_LICENSE: return "CUSOLVER_STATUS_INVALID_LICENSE"; } return "INVALID cusolverStatus: "+n; }
class class_name[name] begin[{] method[stringFor, return_type[type[String]], modifier[public static], parameter[n]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['CUSOLVER_STATUS_SUCCESS'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="CUSOLVER_STATUS_SUCCESS"), label=None)]), SwitchStatementCase(case=['CUSOLVER_STATUS_NOT_INITIALIZED'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="CUSOLVER_STATUS_NOT_INITIALIZED"), label=None)]), SwitchStatementCase(case=['CUSOLVER_STATUS_ALLOC_FAILED'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="CUSOLVER_STATUS_ALLOC_FAILED"), label=None)]), SwitchStatementCase(case=['CUSOLVER_STATUS_INVALID_VALUE'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="CUSOLVER_STATUS_INVALID_VALUE"), label=None)]), SwitchStatementCase(case=['CUSOLVER_STATUS_ARCH_MISMATCH'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="CUSOLVER_STATUS_ARCH_MISMATCH"), label=None)]), SwitchStatementCase(case=['CUSOLVER_STATUS_MAPPING_ERROR'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="CUSOLVER_STATUS_MAPPING_ERROR"), label=None)]), SwitchStatementCase(case=['CUSOLVER_STATUS_EXECUTION_FAILED'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="CUSOLVER_STATUS_EXECUTION_FAILED"), label=None)]), SwitchStatementCase(case=['CUSOLVER_STATUS_INTERNAL_ERROR'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="CUSOLVER_STATUS_INTERNAL_ERROR"), label=None)]), SwitchStatementCase(case=['CUSOLVER_STATUS_MATRIX_TYPE_NOT_SUPPORTED'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="CUSOLVER_STATUS_MATRIX_TYPE_NOT_SUPPORTED"), label=None)]), SwitchStatementCase(case=['CUSOLVER_STATUS_NOT_SUPPORTED'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="CUSOLVER_STATUS_NOT_SUPPORTED"), label=None)]), SwitchStatementCase(case=['CUSOLVER_STATUS_ZERO_PIVOT'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="CUSOLVER_STATUS_ZERO_PIVOT"), label=None)]), SwitchStatementCase(case=['CUSOLVER_STATUS_INVALID_LICENSE'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="CUSOLVER_STATUS_INVALID_LICENSE"), label=None)])], expression=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) return[binary_operation[literal["INVALID cusolverStatus: "], +, member[.n]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[stringFor] operator[SEP] Keyword[int] identifier[n] operator[SEP] { Keyword[switch] operator[SEP] identifier[n] operator[SEP] { Keyword[case] identifier[CUSOLVER_STATUS_SUCCESS] operator[:] Keyword[return] literal[String] operator[SEP] Keyword[case] identifier[CUSOLVER_STATUS_NOT_INITIALIZED] operator[:] Keyword[return] literal[String] operator[SEP] Keyword[case] identifier[CUSOLVER_STATUS_ALLOC_FAILED] operator[:] Keyword[return] literal[String] operator[SEP] Keyword[case] identifier[CUSOLVER_STATUS_INVALID_VALUE] operator[:] Keyword[return] literal[String] operator[SEP] Keyword[case] identifier[CUSOLVER_STATUS_ARCH_MISMATCH] operator[:] Keyword[return] literal[String] operator[SEP] Keyword[case] identifier[CUSOLVER_STATUS_MAPPING_ERROR] operator[:] Keyword[return] literal[String] operator[SEP] Keyword[case] identifier[CUSOLVER_STATUS_EXECUTION_FAILED] operator[:] Keyword[return] literal[String] operator[SEP] Keyword[case] identifier[CUSOLVER_STATUS_INTERNAL_ERROR] operator[:] Keyword[return] literal[String] operator[SEP] Keyword[case] identifier[CUSOLVER_STATUS_MATRIX_TYPE_NOT_SUPPORTED] operator[:] Keyword[return] literal[String] operator[SEP] Keyword[case] identifier[CUSOLVER_STATUS_NOT_SUPPORTED] operator[:] Keyword[return] literal[String] operator[SEP] Keyword[case] identifier[CUSOLVER_STATUS_ZERO_PIVOT] operator[:] Keyword[return] literal[String] operator[SEP] Keyword[case] identifier[CUSOLVER_STATUS_INVALID_LICENSE] operator[:] Keyword[return] literal[String] operator[SEP] } Keyword[return] literal[String] operator[+] identifier[n] operator[SEP] }
public void setPredicateCacheEntry(final CacheEntry key, final boolean value) { this.predicateCache.put(key, Tristate.fromBool(value)); }
class class_name[name] begin[{] method[setPredicateCacheEntry, return_type[void], modifier[public], parameter[key, value]] begin[{] THIS[member[None.predicateCache]call[None.put, parameter[member[.key], call[Tristate.fromBool, parameter[member[.value]]]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setPredicateCacheEntry] operator[SEP] Keyword[final] identifier[CacheEntry] identifier[key] , Keyword[final] Keyword[boolean] identifier[value] operator[SEP] { Keyword[this] operator[SEP] identifier[predicateCache] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[Tristate] operator[SEP] identifier[fromBool] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] }
public void setDayFormatter(DayFormatter formatter) { adapter.setDayFormatter(formatter == null ? DayFormatter.DEFAULT : formatter); }
class class_name[name] begin[{] method[setDayFormatter, return_type[void], modifier[public], parameter[formatter]] begin[{] call[adapter.setDayFormatter, parameter[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=formatter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MemberReference(member=formatter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=DEFAULT, postfix_operators=[], prefix_operators=[], qualifier=DayFormatter, selectors=[]))]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setDayFormatter] operator[SEP] identifier[DayFormatter] identifier[formatter] operator[SEP] { identifier[adapter] operator[SEP] identifier[setDayFormatter] operator[SEP] identifier[formatter] operator[==] Other[null] operator[?] identifier[DayFormatter] operator[SEP] identifier[DEFAULT] operator[:] identifier[formatter] operator[SEP] operator[SEP] }
void removeMembership(Node refUserNode, Node refTypeNode) throws Exception { refTypeNode.remove(); if (!refUserNode.hasNodes()) { refUserNode.remove(); } }
class class_name[name] begin[{] method[removeMembership, return_type[void], modifier[default], parameter[refUserNode, refTypeNode]] begin[{] call[refTypeNode.remove, parameter[]] if[call[refUserNode.hasNodes, parameter[]]] begin[{] call[refUserNode.remove, parameter[]] else begin[{] None end[}] end[}] END[}]
Keyword[void] identifier[removeMembership] operator[SEP] identifier[Node] identifier[refUserNode] , identifier[Node] identifier[refTypeNode] operator[SEP] Keyword[throws] identifier[Exception] { identifier[refTypeNode] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[refUserNode] operator[SEP] identifier[hasNodes] operator[SEP] operator[SEP] operator[SEP] { identifier[refUserNode] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] } }
public void uploadForDeployment(String from, String to) throws Exception { File fromFile = new File(from); if (!to.isEmpty() && fromFile.isDirectory()) mkDir(to); else upload(from, to); }
class class_name[name] begin[{] method[uploadForDeployment, return_type[void], modifier[public], parameter[from, to]] begin[{] local_variable[type[File], fromFile] if[binary_operation[call[to.isEmpty, parameter[]], &&, call[fromFile.isDirectory, parameter[]]]] begin[{] call[.mkDir, parameter[member[.to]]] else begin[{] call[.upload, parameter[member[.from], member[.to]]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[uploadForDeployment] operator[SEP] identifier[String] identifier[from] , identifier[String] identifier[to] operator[SEP] Keyword[throws] identifier[Exception] { identifier[File] identifier[fromFile] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[from] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[to] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[&&] identifier[fromFile] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] identifier[mkDir] operator[SEP] identifier[to] operator[SEP] operator[SEP] Keyword[else] identifier[upload] operator[SEP] identifier[from] , identifier[to] operator[SEP] operator[SEP] }
public static File getFile(Context context, Uri uri) { if (uri != null) { String path = getPath(context, uri); if (path != null && isLocal(path)) { return new File(path); } } return null; }
class class_name[name] begin[{] method[getFile, return_type[type[File]], modifier[public static], parameter[context, uri]] begin[{] if[binary_operation[member[.uri], !=, literal[null]]] begin[{] local_variable[type[String], path] if[binary_operation[binary_operation[member[.path], !=, literal[null]], &&, call[.isLocal, parameter[member[.path]]]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))] else begin[{] None end[}] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] identifier[File] identifier[getFile] operator[SEP] identifier[Context] identifier[context] , identifier[Uri] identifier[uri] operator[SEP] { Keyword[if] operator[SEP] identifier[uri] operator[!=] Other[null] operator[SEP] { identifier[String] identifier[path] operator[=] identifier[getPath] operator[SEP] identifier[context] , identifier[uri] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[path] operator[!=] Other[null] operator[&&] identifier[isLocal] operator[SEP] identifier[path] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[File] operator[SEP] identifier[path] operator[SEP] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
public static int getSigOpCount(byte[] program) throws ScriptException { Script script = new Script(); try { script.parse(program); } catch (ScriptException e) { // Ignore errors and count up to the parse-able length } return getSigOpCount(script.chunks, false); }
class class_name[name] begin[{] method[getSigOpCount, return_type[type[int]], modifier[public static], parameter[program]] begin[{] local_variable[type[Script], script] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=program, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parse, postfix_operators=[], prefix_operators=[], qualifier=script, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ScriptException']))], finally_block=None, label=None, resources=None) return[call[.getSigOpCount, parameter[member[script.chunks], literal[false]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[getSigOpCount] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[program] operator[SEP] Keyword[throws] identifier[ScriptException] { identifier[Script] identifier[script] operator[=] Keyword[new] identifier[Script] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[script] operator[SEP] identifier[parse] operator[SEP] identifier[program] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ScriptException] identifier[e] operator[SEP] { } Keyword[return] identifier[getSigOpCount] operator[SEP] identifier[script] operator[SEP] identifier[chunks] , literal[boolean] operator[SEP] operator[SEP] }
private void compilePattern() throws ParseException { StringBuilder sb = new StringBuilder(); boolean escaped = false; final List<GlobPattern> patterns = new ArrayList<>(); for (int a = 0; a < _patternSource.length(); a++) { final char c = _patternSource.charAt(a); // Test escape-char if (c == '\\') { if (escaped) { sb.append('\\'); escaped = false; } else { escaped = true; } } else { if (escaped) { if (c != GLOB_SINGLE && c != GLOB_MULTIPLE) { sb.append("\\"); } else { // Globbing chars escaped sb.append(c); escaped = false; } } else { // No escape character, test whether it matches on of the globbing characters. if (c == GLOB_MULTIPLE || c == GLOB_SINGLE) { if (sb.length() > 0) { patterns.add(new GlobPattern(TEXT, sb.toString())); sb = new StringBuilder(); } patterns.add(new GlobPattern(c)); } else { sb.append(c); } } } } if (sb.length() > 0) { patterns.add(new GlobPattern(TEXT, sb.toString())); } // Add meta information and correct the elements addMetaInformation(patterns); _compiledPattern = new GlobPattern[patterns.size()]; patterns.toArray(_compiledPattern); }
class class_name[name] begin[{] method[compilePattern, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[StringBuilder], sb] local_variable[type[boolean], escaped] local_variable[type[List], patterns] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=_patternSource, selectors=[], type_arguments=None), name=c)], modifiers={'final'}, type=BasicType(dimensions=[], name=char)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\\'), operator===), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=escaped, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=GLOB_MULTIPLE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=GLOB_SINGLE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=sb, 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=[ClassCreator(arguments=[MemberReference(member=TEXT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GlobPattern, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=patterns, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=sb, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuilder, sub_type=None))), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=c, 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=GlobPattern, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=patterns, selectors=[], type_arguments=None), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=GLOB_SINGLE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), operandr=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=GLOB_MULTIPLE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), operator=&&), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=escaped, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), 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=sb, selectors=[], type_arguments=None), label=None)]))]))]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=escaped, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=escaped, 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=sb, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=escaped, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)]))]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=_patternSource, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=a)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=a, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) if[binary_operation[call[sb.length, parameter[]], >, literal[0]]] begin[{] call[patterns.add, parameter[ClassCreator(arguments=[MemberReference(member=TEXT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GlobPattern, sub_type=None))]] else begin[{] None end[}] call[.addMetaInformation, parameter[member[.patterns]]] assign[member[._compiledPattern], ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=patterns, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GlobPattern, sub_type=None))] call[patterns.toArray, parameter[member[._compiledPattern]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[compilePattern] operator[SEP] operator[SEP] Keyword[throws] identifier[ParseException] { identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[escaped] operator[=] literal[boolean] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[GlobPattern] operator[>] identifier[patterns] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[a] operator[=] Other[0] operator[SEP] identifier[a] operator[<] identifier[_patternSource] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[a] operator[++] operator[SEP] { Keyword[final] Keyword[char] identifier[c] operator[=] identifier[_patternSource] operator[SEP] identifier[charAt] operator[SEP] identifier[a] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[SEP] { Keyword[if] operator[SEP] identifier[escaped] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[escaped] operator[=] literal[boolean] operator[SEP] } Keyword[else] { identifier[escaped] operator[=] literal[boolean] operator[SEP] } } Keyword[else] { Keyword[if] operator[SEP] identifier[escaped] operator[SEP] { Keyword[if] operator[SEP] identifier[c] operator[!=] identifier[GLOB_SINGLE] operator[&&] identifier[c] operator[!=] identifier[GLOB_MULTIPLE] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[c] operator[SEP] operator[SEP] identifier[escaped] operator[=] literal[boolean] operator[SEP] } } Keyword[else] { Keyword[if] operator[SEP] identifier[c] operator[==] identifier[GLOB_MULTIPLE] operator[||] identifier[c] operator[==] identifier[GLOB_SINGLE] operator[SEP] { Keyword[if] operator[SEP] identifier[sb] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[patterns] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[GlobPattern] operator[SEP] identifier[TEXT] , identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] } identifier[patterns] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[GlobPattern] operator[SEP] identifier[c] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[c] operator[SEP] operator[SEP] } } } } Keyword[if] operator[SEP] identifier[sb] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[patterns] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[GlobPattern] operator[SEP] identifier[TEXT] , identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[addMetaInformation] operator[SEP] identifier[patterns] operator[SEP] operator[SEP] identifier[_compiledPattern] operator[=] Keyword[new] identifier[GlobPattern] operator[SEP] identifier[patterns] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[patterns] operator[SEP] identifier[toArray] operator[SEP] identifier[_compiledPattern] operator[SEP] operator[SEP] }
public static void detectDeadConnections() { if (CONNECTION_DETECTOR_RUNNING) { return; } final Logger log = LoggerFactory.getLogger(ConnectionManager.class); Thread deadConnThread = new Thread(new Runnable() { public void run() { CONNECTION_DETECTOR_RUNNING = true; try { log.debug("Starting dead connection detection thread"); while (detectDeadConnection) { log.debug("Checking if there are any dead connections"); long now = DateTime.now().getMillis(); for (DataSiftConnection data : connections) { if (data.lastSeen() != null) { if (now - data.lastSeen().getMillis() >= TimeUnit.SECONDS.toMillis(CONNECTION_TIMEOUT_LIMIT)) { log.info("Dead connection found, triggering re-connection"); data.closeAndReconnect(); } } } log.debug(String.format("Checked %s connections", connections.size())); try { Thread.sleep(TimeUnit.SECONDS.toMillis(CONNECTION_TIMEOUT)); } catch (InterruptedException e) { LoggerFactory.getLogger(getClass()).info("Interrupted while waiting to check conn"); } } } finally { CONNECTION_DETECTOR_RUNNING = false; } } }, "dead-connections-monitor"); deadConnThread.setDaemon(true); deadConnThread.start(); }
class class_name[name] begin[{] method[detectDeadConnections, return_type[void], modifier[public static], parameter[]] begin[{] if[member[.CONNECTION_DETECTOR_RUNNING]] begin[{] return[None] else begin[{] None end[}] local_variable[type[Logger], log] local_variable[type[Thread], deadConnThread] call[deadConnThread.setDaemon, parameter[literal[true]]] call[deadConnThread.start, parameter[]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[detectDeadConnections] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[CONNECTION_DETECTOR_RUNNING] operator[SEP] { Keyword[return] operator[SEP] } Keyword[final] identifier[Logger] identifier[log] operator[=] identifier[LoggerFactory] operator[SEP] identifier[getLogger] operator[SEP] identifier[ConnectionManager] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[Thread] identifier[deadConnThread] operator[=] Keyword[new] identifier[Thread] operator[SEP] Keyword[new] identifier[Runnable] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] { identifier[CONNECTION_DETECTOR_RUNNING] operator[=] literal[boolean] operator[SEP] Keyword[try] { identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[detectDeadConnection] operator[SEP] { identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[long] identifier[now] operator[=] identifier[DateTime] operator[SEP] identifier[now] operator[SEP] operator[SEP] operator[SEP] identifier[getMillis] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[DataSiftConnection] identifier[data] operator[:] identifier[connections] operator[SEP] { Keyword[if] operator[SEP] identifier[data] operator[SEP] identifier[lastSeen] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[now] operator[-] identifier[data] operator[SEP] identifier[lastSeen] operator[SEP] operator[SEP] operator[SEP] identifier[getMillis] operator[SEP] operator[SEP] operator[>=] identifier[TimeUnit] operator[SEP] identifier[SECONDS] operator[SEP] identifier[toMillis] operator[SEP] identifier[CONNECTION_TIMEOUT_LIMIT] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[data] operator[SEP] identifier[closeAndReconnect] operator[SEP] operator[SEP] operator[SEP] } } } identifier[log] operator[SEP] identifier[debug] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[connections] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[Thread] operator[SEP] identifier[sleep] operator[SEP] identifier[TimeUnit] operator[SEP] identifier[SECONDS] operator[SEP] identifier[toMillis] operator[SEP] identifier[CONNECTION_TIMEOUT] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InterruptedException] identifier[e] operator[SEP] { identifier[LoggerFactory] operator[SEP] identifier[getLogger] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] } } } Keyword[finally] { identifier[CONNECTION_DETECTOR_RUNNING] operator[=] literal[boolean] operator[SEP] } } } , literal[String] operator[SEP] operator[SEP] identifier[deadConnThread] operator[SEP] identifier[setDaemon] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[deadConnThread] operator[SEP] identifier[start] operator[SEP] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") public EList<IfcPropertyDependencyRelationship> getPropertyForDependance() { return (EList<IfcPropertyDependencyRelationship>) eGet( Ifc2x3tc1Package.Literals.IFC_PROPERTY__PROPERTY_FOR_DEPENDANCE, true); }
class class_name[name] begin[{] method[getPropertyForDependance, return_type[type[EList]], modifier[public], parameter[]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=IFC_PROPERTY__PROPERTY_FOR_DEPENDANCE, 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=IfcPropertyDependencyRelationship, 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[IfcPropertyDependencyRelationship] operator[>] identifier[getPropertyForDependance] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] identifier[EList] operator[<] identifier[IfcPropertyDependencyRelationship] operator[>] operator[SEP] identifier[eGet] operator[SEP] identifier[Ifc2x3tc1Package] operator[SEP] identifier[Literals] operator[SEP] identifier[IFC_PROPERTY__PROPERTY_FOR_DEPENDANCE] , literal[boolean] operator[SEP] operator[SEP] }
public Object getObject(String parameterName, java.util.Map<String, Class<?>> map) throws SQLException { try { return cstmtImpl.getObject(parameterName, map); } catch (SQLException ex) { FFDCFilter.processException(ex, "com.ibm.ws.rsadapter.jdbc.WSJdbcCallableStatement.getObject(String, Map)", "1524", this); throw WSJdbcUtil.mapException(this, ex); } catch (NullPointerException nullX) { // No FFDC code needed; we might be closed. throw runtimeXIfNotClosed(nullX); } }
class class_name[name] begin[{] method[getObject, return_type[type[Object]], modifier[public], parameter[parameterName, map]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=parameterName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=map, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getObject, postfix_operators=[], prefix_operators=[], qualifier=cstmtImpl, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ws.rsadapter.jdbc.WSJdbcCallableStatement.getObject(String, Map)"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1524"), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=mapException, postfix_operators=[], prefix_operators=[], qualifier=WSJdbcUtil, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['SQLException'])), CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=nullX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=runtimeXIfNotClosed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=nullX, types=['NullPointerException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] identifier[Object] identifier[getObject] operator[SEP] identifier[String] identifier[parameterName] , identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[map] operator[SEP] Keyword[throws] identifier[SQLException] { Keyword[try] { Keyword[return] identifier[cstmtImpl] operator[SEP] identifier[getObject] operator[SEP] identifier[parameterName] , identifier[map] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SQLException] identifier[ex] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[ex] , literal[String] , literal[String] , Keyword[this] operator[SEP] operator[SEP] Keyword[throw] identifier[WSJdbcUtil] operator[SEP] identifier[mapException] operator[SEP] Keyword[this] , identifier[ex] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NullPointerException] identifier[nullX] operator[SEP] { Keyword[throw] identifier[runtimeXIfNotClosed] operator[SEP] identifier[nullX] operator[SEP] operator[SEP] } }
public Coordinate snap(Coordinate coordinate) { Coordinate result = coordinate; currentDistance = Double.MAX_VALUE; hasSnapped = false; for (SnappingRule snappingRule : snappingRules) { if (!hasSnapped) { double distance = Math.min(currentDistance, snappingRule.getDistance()); result = snappingRule.getAlgorithm().snap(coordinate, distance); if (snappingRule.getAlgorithm().hasSnapped()) { currentDistance = snappingRule.getAlgorithm().getCalculatedDistance(); hasSnapped = true; } } } eventBus.fireEvent(new CoordinateSnapEvent(coordinate, result)); return result; }
class class_name[name] begin[{] method[snap, return_type[type[Coordinate]], modifier[public], parameter[coordinate]] begin[{] local_variable[type[Coordinate], result] assign[member[.currentDistance], member[Double.MAX_VALUE]] assign[member[.hasSnapped], literal[false]] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=hasSnapped, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=currentDistance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getDistance, postfix_operators=[], prefix_operators=[], qualifier=snappingRule, selectors=[], type_arguments=None)], member=min, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), name=distance)], modifiers=set(), type=BasicType(dimensions=[], name=double)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getAlgorithm, postfix_operators=[], prefix_operators=[], qualifier=snappingRule, selectors=[MethodInvocation(arguments=[MemberReference(member=coordinate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=distance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=snap, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=getAlgorithm, postfix_operators=[], prefix_operators=[], qualifier=snappingRule, selectors=[MethodInvocation(arguments=[], member=hasSnapped, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=currentDistance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getAlgorithm, postfix_operators=[], prefix_operators=[], qualifier=snappingRule, selectors=[MethodInvocation(arguments=[], member=getCalculatedDistance, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=hasSnapped, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]))]))]), control=EnhancedForControl(iterable=MemberReference(member=snappingRules, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=snappingRule)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SnappingRule, sub_type=None))), label=None) call[eventBus.fireEvent, parameter[ClassCreator(arguments=[MemberReference(member=coordinate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=result, 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=CoordinateSnapEvent, sub_type=None))]] return[member[.result]] end[}] END[}]
Keyword[public] identifier[Coordinate] identifier[snap] operator[SEP] identifier[Coordinate] identifier[coordinate] operator[SEP] { identifier[Coordinate] identifier[result] operator[=] identifier[coordinate] operator[SEP] identifier[currentDistance] operator[=] identifier[Double] operator[SEP] identifier[MAX_VALUE] operator[SEP] identifier[hasSnapped] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[SnappingRule] identifier[snappingRule] operator[:] identifier[snappingRules] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[hasSnapped] operator[SEP] { Keyword[double] identifier[distance] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[currentDistance] , identifier[snappingRule] operator[SEP] identifier[getDistance] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[=] identifier[snappingRule] operator[SEP] identifier[getAlgorithm] operator[SEP] operator[SEP] operator[SEP] identifier[snap] operator[SEP] identifier[coordinate] , identifier[distance] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[snappingRule] operator[SEP] identifier[getAlgorithm] operator[SEP] operator[SEP] operator[SEP] identifier[hasSnapped] operator[SEP] operator[SEP] operator[SEP] { identifier[currentDistance] operator[=] identifier[snappingRule] operator[SEP] identifier[getAlgorithm] operator[SEP] operator[SEP] operator[SEP] identifier[getCalculatedDistance] operator[SEP] operator[SEP] operator[SEP] identifier[hasSnapped] operator[=] literal[boolean] operator[SEP] } } } identifier[eventBus] operator[SEP] identifier[fireEvent] operator[SEP] Keyword[new] identifier[CoordinateSnapEvent] operator[SEP] identifier[coordinate] , identifier[result] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
public static String toZeroPaddedString(long value, int precision, int maxSize) { StringBuffer sb = new StringBuffer(); if (value < 0) { value = -value; } String s = Long.toString(value); if (s.length() > precision) { s = s.substring(precision); } for (int i = s.length(); i < precision; i++) { sb.append('0'); } sb.append(s); if (maxSize < precision) { sb.setLength(maxSize); } return sb.toString(); }
class class_name[name] begin[{] method[toZeroPaddedString, return_type[type[String]], modifier[public static], parameter[value, precision, maxSize]] begin[{] local_variable[type[StringBuffer], sb] if[binary_operation[member[.value], <, literal[0]]] begin[{] assign[member[.value], member[.value]] else begin[{] None end[}] local_variable[type[String], s] if[binary_operation[call[s.length, parameter[]], >, member[.precision]]] begin[{] assign[member[.s], call[s.substring, parameter[member[.precision]]]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='0')], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=precision, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[], type_arguments=None), 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[member[.s]]] if[binary_operation[member[.maxSize], <, member[.precision]]] begin[{] call[sb.setLength, parameter[member[.maxSize]]] else begin[{] None end[}] return[call[sb.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[toZeroPaddedString] operator[SEP] Keyword[long] identifier[value] , Keyword[int] identifier[precision] , Keyword[int] identifier[maxSize] operator[SEP] { identifier[StringBuffer] identifier[sb] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[<] Other[0] operator[SEP] { identifier[value] operator[=] operator[-] identifier[value] operator[SEP] } identifier[String] identifier[s] operator[=] identifier[Long] operator[SEP] identifier[toString] operator[SEP] identifier[value] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[s] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] identifier[precision] operator[SEP] { identifier[s] operator[=] identifier[s] operator[SEP] identifier[substring] operator[SEP] identifier[precision] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[s] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[<] identifier[precision] operator[SEP] identifier[i] operator[++] 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[s] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[maxSize] operator[<] identifier[precision] operator[SEP] { identifier[sb] operator[SEP] identifier[setLength] operator[SEP] identifier[maxSize] operator[SEP] operator[SEP] } Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public List<ActivityMonitor> getActivityMonitors(RuntimeContext context) { return getActivityMonitors().stream().filter(monitor -> monitor.isEnabled(context) ).collect(Collectors.toList()); }
class class_name[name] begin[{] method[getActivityMonitors, return_type[type[List]], modifier[public], parameter[context]] begin[{] return[call[.getActivityMonitors, parameter[]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[ActivityMonitor] operator[>] identifier[getActivityMonitors] operator[SEP] identifier[RuntimeContext] identifier[context] operator[SEP] { Keyword[return] identifier[getActivityMonitors] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[monitor] operator[->] identifier[monitor] operator[SEP] identifier[isEnabled] operator[SEP] identifier[context] operator[SEP] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[toList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static byte[] encryptMD5 (byte[] input) throws NoSuchAlgorithmException { MessageDigest md = MessageDigest.getInstance("MD5"); md.update(input); return md.digest(); }
class class_name[name] begin[{] method[encryptMD5, return_type[type[byte]], modifier[public static], parameter[input]] begin[{] local_variable[type[MessageDigest], md] call[md.update, parameter[member[.input]]] return[call[md.digest, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[encryptMD5] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[input] operator[SEP] Keyword[throws] identifier[NoSuchAlgorithmException] { identifier[MessageDigest] identifier[md] operator[=] identifier[MessageDigest] operator[SEP] identifier[getInstance] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[md] operator[SEP] identifier[update] operator[SEP] identifier[input] operator[SEP] operator[SEP] Keyword[return] identifier[md] operator[SEP] identifier[digest] operator[SEP] operator[SEP] operator[SEP] }
protected S state(S newState) { S oldState = state; state = newState; return oldState; }
class class_name[name] begin[{] method[state, return_type[type[S]], modifier[protected], parameter[newState]] begin[{] local_variable[type[S], oldState] assign[member[.state], member[.newState]] return[member[.oldState]] end[}] END[}]
Keyword[protected] identifier[S] identifier[state] operator[SEP] identifier[S] identifier[newState] operator[SEP] { identifier[S] identifier[oldState] operator[=] identifier[state] operator[SEP] identifier[state] operator[=] identifier[newState] operator[SEP] Keyword[return] identifier[oldState] operator[SEP] }
public <T> T exit(T result) { if (instanceofLAL && logger.isTraceEnabled(ENTRY_MARKER)) { FormattingTuple tp = MessageFormatter.format(EXIT_MESSAGE_1, result); ((LocationAwareLogger) logger).log(EXIT_MARKER, FQCN, LocationAwareLogger.TRACE_INT, tp.getMessage(), new Object[] { result }, tp.getThrowable()); } return result; }
class class_name[name] begin[{] method[exit, return_type[type[T]], modifier[public], parameter[result]] begin[{] if[binary_operation[member[.instanceofLAL], &&, call[logger.isTraceEnabled, parameter[member[.ENTRY_MARKER]]]]] begin[{] local_variable[type[FormattingTuple], tp] Cast(expression=MemberReference(member=logger, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=LocationAwareLogger, sub_type=None)) else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[exit] operator[SEP] identifier[T] identifier[result] operator[SEP] { Keyword[if] operator[SEP] identifier[instanceofLAL] operator[&&] identifier[logger] operator[SEP] identifier[isTraceEnabled] operator[SEP] identifier[ENTRY_MARKER] operator[SEP] operator[SEP] { identifier[FormattingTuple] identifier[tp] operator[=] identifier[MessageFormatter] operator[SEP] identifier[format] operator[SEP] identifier[EXIT_MESSAGE_1] , identifier[result] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[LocationAwareLogger] operator[SEP] identifier[logger] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[EXIT_MARKER] , identifier[FQCN] , identifier[LocationAwareLogger] operator[SEP] identifier[TRACE_INT] , identifier[tp] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[result] } , identifier[tp] operator[SEP] identifier[getThrowable] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
protected final void safePostMessage ( final DownstreamMessage msg, final PresentsConnection expect) { _omgr.postRunnable(new Runnable() { public void run () { postMessage(msg, expect); } }); }
class class_name[name] begin[{] method[safePostMessage, return_type[void], modifier[final protected], parameter[msg, expect]] begin[{] call[_omgr.postRunnable, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=expect, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=postMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=run, parameters=[], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Runnable, sub_type=None))]] end[}] END[}]
Keyword[protected] Keyword[final] Keyword[void] identifier[safePostMessage] operator[SEP] Keyword[final] identifier[DownstreamMessage] identifier[msg] , Keyword[final] identifier[PresentsConnection] identifier[expect] operator[SEP] { identifier[_omgr] operator[SEP] identifier[postRunnable] operator[SEP] Keyword[new] identifier[Runnable] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] { identifier[postMessage] operator[SEP] identifier[msg] , identifier[expect] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public FessMessages addErrorsFailedToUploadKuromojiFile(String property) { assertPropertyNotNull(property); add(property, new UserMessage(ERRORS_failed_to_upload_kuromoji_file)); return this; }
class class_name[name] begin[{] method[addErrorsFailedToUploadKuromojiFile, return_type[type[FessMessages]], modifier[public], parameter[property]] begin[{] call[.assertPropertyNotNull, parameter[member[.property]]] call[.add, parameter[member[.property], ClassCreator(arguments=[MemberReference(member=ERRORS_failed_to_upload_kuromoji_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=UserMessage, sub_type=None))]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[FessMessages] identifier[addErrorsFailedToUploadKuromojiFile] operator[SEP] identifier[String] identifier[property] operator[SEP] { identifier[assertPropertyNotNull] operator[SEP] identifier[property] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[property] , Keyword[new] identifier[UserMessage] operator[SEP] identifier[ERRORS_failed_to_upload_kuromoji_file] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
@Override public CommerceTierPriceEntry findByGroupId_First(long groupId, OrderByComparator<CommerceTierPriceEntry> orderByComparator) throws NoSuchTierPriceEntryException { CommerceTierPriceEntry commerceTierPriceEntry = fetchByGroupId_First(groupId, orderByComparator); if (commerceTierPriceEntry != null) { return commerceTierPriceEntry; } StringBundler msg = new StringBundler(4); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("groupId="); msg.append(groupId); msg.append("}"); throw new NoSuchTierPriceEntryException(msg.toString()); }
class class_name[name] begin[{] method[findByGroupId_First, return_type[type[CommerceTierPriceEntry]], modifier[public], parameter[groupId, orderByComparator]] begin[{] local_variable[type[CommerceTierPriceEntry], commerceTierPriceEntry] if[binary_operation[member[.commerceTierPriceEntry], !=, literal[null]]] begin[{] return[member[.commerceTierPriceEntry]] else begin[{] None end[}] local_variable[type[StringBundler], msg] call[msg.append, parameter[member[._NO_SUCH_ENTITY_WITH_KEY]]] call[msg.append, parameter[literal["groupId="]]] call[msg.append, parameter[member[.groupId]]] call[msg.append, parameter[literal["}"]]] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NoSuchTierPriceEntryException, sub_type=None)), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CommerceTierPriceEntry] identifier[findByGroupId_First] operator[SEP] Keyword[long] identifier[groupId] , identifier[OrderByComparator] operator[<] identifier[CommerceTierPriceEntry] operator[>] identifier[orderByComparator] operator[SEP] Keyword[throws] identifier[NoSuchTierPriceEntryException] { identifier[CommerceTierPriceEntry] identifier[commerceTierPriceEntry] operator[=] identifier[fetchByGroupId_First] operator[SEP] identifier[groupId] , identifier[orderByComparator] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[commerceTierPriceEntry] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[commerceTierPriceEntry] operator[SEP] } identifier[StringBundler] identifier[msg] operator[=] Keyword[new] identifier[StringBundler] operator[SEP] Other[4] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] identifier[_NO_SUCH_ENTITY_WITH_KEY] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] identifier[groupId] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[NoSuchTierPriceEntryException] operator[SEP] identifier[msg] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void marshall(OnPremConfig onPremConfig, ProtocolMarshaller protocolMarshaller) { if (onPremConfig == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(onPremConfig.getAgentArns(), AGENTARNS_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[onPremConfig, protocolMarshaller]] begin[{] if[binary_operation[member[.onPremConfig], ==, 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=getAgentArns, postfix_operators=[], prefix_operators=[], qualifier=onPremConfig, selectors=[], type_arguments=None), MemberReference(member=AGENTARNS_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[OnPremConfig] identifier[onPremConfig] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[onPremConfig] 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[onPremConfig] operator[SEP] identifier[getAgentArns] operator[SEP] operator[SEP] , identifier[AGENTARNS_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 setTypeCode(int typeCode) { if (typeCode <= 0 || typeCode >= JSBaseTypes.baseTypes.length) throw new IllegalArgumentException("TypeCode=" + typeCode); this.typeCode = typeCode; baseType = JSBaseTypes.baseTypes[typeCode]; }
class class_name[name] begin[{] method[setTypeCode, return_type[void], modifier[public], parameter[typeCode]] begin[{] if[binary_operation[binary_operation[member[.typeCode], <=, literal[0]], ||, binary_operation[member[.typeCode], >=, member[JSBaseTypes.baseTypes.length]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TypeCode="), operandr=MemberReference(member=typeCode, 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) else begin[{] None end[}] assign[THIS[member[None.typeCode]], member[.typeCode]] assign[member[.baseType], member[JSBaseTypes.baseTypes]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setTypeCode] operator[SEP] Keyword[int] identifier[typeCode] operator[SEP] { Keyword[if] operator[SEP] identifier[typeCode] operator[<=] Other[0] operator[||] identifier[typeCode] operator[>=] identifier[JSBaseTypes] operator[SEP] identifier[baseTypes] operator[SEP] identifier[length] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[typeCode] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[typeCode] operator[=] identifier[typeCode] operator[SEP] identifier[baseType] operator[=] identifier[JSBaseTypes] operator[SEP] identifier[baseTypes] operator[SEP] identifier[typeCode] operator[SEP] operator[SEP] }
public GenericDraweeHierarchyBuilder setFailureImage( int resourceId, @Nullable ScalingUtils.ScaleType failureImageScaleType) { mFailureImage = mResources.getDrawable(resourceId); mFailureImageScaleType = failureImageScaleType; return this; }
class class_name[name] begin[{] method[setFailureImage, return_type[type[GenericDraweeHierarchyBuilder]], modifier[public], parameter[resourceId, failureImageScaleType]] begin[{] assign[member[.mFailureImage], call[mResources.getDrawable, parameter[member[.resourceId]]]] assign[member[.mFailureImageScaleType], member[.failureImageScaleType]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[GenericDraweeHierarchyBuilder] identifier[setFailureImage] operator[SEP] Keyword[int] identifier[resourceId] , annotation[@] identifier[Nullable] identifier[ScalingUtils] operator[SEP] identifier[ScaleType] identifier[failureImageScaleType] operator[SEP] { identifier[mFailureImage] operator[=] identifier[mResources] operator[SEP] identifier[getDrawable] operator[SEP] identifier[resourceId] operator[SEP] operator[SEP] identifier[mFailureImageScaleType] operator[=] identifier[failureImageScaleType] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public ResourceInformationProvider getResourceInformationBuilder() { if (resourceInformationProvider == null) { resourceInformationProvider = new CombinedResourceInformationProvider( Prioritizable.prioritze(aggregatedModule.getResourceInformationProviders())); InformationBuilder informationBuilder = new DefaultInformationBuilder(typeParser); DefaultResourceInformationProviderContext context = new DefaultResourceInformationProviderContext(resourceInformationProvider, informationBuilder, typeParser, objectMapper); resourceInformationProvider.init(context); } return resourceInformationProvider; }
class class_name[name] begin[{] method[getResourceInformationBuilder, return_type[type[ResourceInformationProvider]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.resourceInformationProvider], ==, literal[null]]] begin[{] assign[member[.resourceInformationProvider], ClassCreator(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getResourceInformationProviders, postfix_operators=[], prefix_operators=[], qualifier=aggregatedModule, selectors=[], type_arguments=None)], member=prioritze, postfix_operators=[], prefix_operators=[], qualifier=Prioritizable, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CombinedResourceInformationProvider, sub_type=None))] local_variable[type[InformationBuilder], informationBuilder] local_variable[type[DefaultResourceInformationProviderContext], context] call[resourceInformationProvider.init, parameter[member[.context]]] else begin[{] None end[}] return[member[.resourceInformationProvider]] end[}] END[}]
Keyword[public] identifier[ResourceInformationProvider] identifier[getResourceInformationBuilder] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[resourceInformationProvider] operator[==] Other[null] operator[SEP] { identifier[resourceInformationProvider] operator[=] Keyword[new] identifier[CombinedResourceInformationProvider] operator[SEP] identifier[Prioritizable] operator[SEP] identifier[prioritze] operator[SEP] identifier[aggregatedModule] operator[SEP] identifier[getResourceInformationProviders] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[InformationBuilder] identifier[informationBuilder] operator[=] Keyword[new] identifier[DefaultInformationBuilder] operator[SEP] identifier[typeParser] operator[SEP] operator[SEP] identifier[DefaultResourceInformationProviderContext] identifier[context] operator[=] Keyword[new] identifier[DefaultResourceInformationProviderContext] operator[SEP] identifier[resourceInformationProvider] , identifier[informationBuilder] , identifier[typeParser] , identifier[objectMapper] operator[SEP] operator[SEP] identifier[resourceInformationProvider] operator[SEP] identifier[init] operator[SEP] identifier[context] operator[SEP] operator[SEP] } Keyword[return] identifier[resourceInformationProvider] operator[SEP] }
public java.lang.String getWidth() { return (java.lang.String) getStateHelper().eval(PropertyKeys.width); }
class class_name[name] begin[{] method[getWidth, return_type[type[java]], modifier[public], parameter[]] begin[{] return[Cast(expression=MethodInvocation(arguments=[], member=getStateHelper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=PropertyKeys, selectors=[])], member=eval, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=lang, sub_type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))))] end[}] END[}]
Keyword[public] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] identifier[getWidth] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] operator[SEP] identifier[getStateHelper] operator[SEP] operator[SEP] operator[SEP] identifier[eval] operator[SEP] identifier[PropertyKeys] operator[SEP] identifier[width] operator[SEP] operator[SEP] }
public ScoreNode nextScoreNode() throws IOException { if (++hitIndex >= size) { // no more score nodes return null; } else if (hitIndex >= scoreDocs.size()) { // refill at least numHits or twice hitIndex this.numHits = Math.max(this.numHits, hitIndex * 2); getHits(); } ScoreDoc doc = scoreDocs.get(hitIndex); String uuid = reader.document(doc.doc, FieldSelectors.UUID).get(FieldNames.UUID); return new ScoreNode(uuid, doc.score, doc.doc); }
class class_name[name] begin[{] method[nextScoreNode, return_type[type[ScoreNode]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.hitIndex], >=, member[.size]]] begin[{] return[literal[null]] else begin[{] if[binary_operation[member[.hitIndex], >=, call[scoreDocs.size, parameter[]]]] begin[{] assign[THIS[member[None.numHits]], call[Math.max, parameter[THIS[member[None.numHits]], binary_operation[member[.hitIndex], *, literal[2]]]]] call[.getHits, parameter[]] else begin[{] None end[}] end[}] local_variable[type[ScoreDoc], doc] local_variable[type[String], uuid] return[ClassCreator(arguments=[MemberReference(member=uuid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=score, postfix_operators=[], prefix_operators=[], qualifier=doc, selectors=[]), MemberReference(member=doc, postfix_operators=[], prefix_operators=[], qualifier=doc, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ScoreNode, sub_type=None))] end[}] END[}]
Keyword[public] identifier[ScoreNode] identifier[nextScoreNode] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] operator[++] identifier[hitIndex] operator[>=] identifier[size] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[hitIndex] operator[>=] identifier[scoreDocs] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[numHits] operator[=] identifier[Math] operator[SEP] identifier[max] operator[SEP] Keyword[this] operator[SEP] identifier[numHits] , identifier[hitIndex] operator[*] Other[2] operator[SEP] operator[SEP] identifier[getHits] operator[SEP] operator[SEP] operator[SEP] } identifier[ScoreDoc] identifier[doc] operator[=] identifier[scoreDocs] operator[SEP] identifier[get] operator[SEP] identifier[hitIndex] operator[SEP] operator[SEP] identifier[String] identifier[uuid] operator[=] identifier[reader] operator[SEP] identifier[document] operator[SEP] identifier[doc] operator[SEP] identifier[doc] , identifier[FieldSelectors] operator[SEP] identifier[UUID] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[FieldNames] operator[SEP] identifier[UUID] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ScoreNode] operator[SEP] identifier[uuid] , identifier[doc] operator[SEP] identifier[score] , identifier[doc] operator[SEP] identifier[doc] operator[SEP] operator[SEP] }
public MultiChangeBuilder<PS, SEG, S> deleteText(IndexRange range) { return deleteText(range.getStart(), range.getEnd()); }
class class_name[name] begin[{] method[deleteText, return_type[type[MultiChangeBuilder]], modifier[public], parameter[range]] begin[{] return[call[.deleteText, parameter[call[range.getStart, parameter[]], call[range.getEnd, parameter[]]]]] end[}] END[}]
Keyword[public] identifier[MultiChangeBuilder] operator[<] identifier[PS] , identifier[SEG] , identifier[S] operator[>] identifier[deleteText] operator[SEP] identifier[IndexRange] identifier[range] operator[SEP] { Keyword[return] identifier[deleteText] operator[SEP] identifier[range] operator[SEP] identifier[getStart] operator[SEP] operator[SEP] , identifier[range] operator[SEP] identifier[getEnd] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public VirtualNetworkPeeringInner beginCreateOrUpdate(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName, VirtualNetworkPeeringInner virtualNetworkPeeringParameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, virtualNetworkPeeringParameters).toBlocking().single().body(); }
class class_name[name] begin[{] method[beginCreateOrUpdate, return_type[type[VirtualNetworkPeeringInner]], modifier[public], parameter[resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, virtualNetworkPeeringParameters]] begin[{] return[call[.beginCreateOrUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.virtualNetworkName], member[.virtualNetworkPeeringName], member[.virtualNetworkPeeringParameters]]]] end[}] END[}]
Keyword[public] identifier[VirtualNetworkPeeringInner] identifier[beginCreateOrUpdate] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[virtualNetworkName] , identifier[String] identifier[virtualNetworkPeeringName] , identifier[VirtualNetworkPeeringInner] identifier[virtualNetworkPeeringParameters] operator[SEP] { Keyword[return] identifier[beginCreateOrUpdateWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[virtualNetworkName] , identifier[virtualNetworkPeeringName] , identifier[virtualNetworkPeeringParameters] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[single] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] }
public static boolean isCatalogVersionValid(String catalogVersionStr) { // Do we have a version string? if (catalogVersionStr == null || catalogVersionStr.isEmpty()) { return false; } //Check that it is a properly formed version string Object[] catalogVersion = MiscUtils.parseVersionString(catalogVersionStr); if (catalogVersion == null) { return false; } // It's valid. return true; }
class class_name[name] begin[{] method[isCatalogVersionValid, return_type[type[boolean]], modifier[public static], parameter[catalogVersionStr]] begin[{] if[binary_operation[binary_operation[member[.catalogVersionStr], ==, literal[null]], ||, call[catalogVersionStr.isEmpty, parameter[]]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[Object], catalogVersion] if[binary_operation[member[.catalogVersion], ==, literal[null]]] begin[{] return[literal[false]] else begin[{] None end[}] return[literal[true]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isCatalogVersionValid] operator[SEP] identifier[String] identifier[catalogVersionStr] operator[SEP] { Keyword[if] operator[SEP] identifier[catalogVersionStr] operator[==] Other[null] operator[||] identifier[catalogVersionStr] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[Object] operator[SEP] operator[SEP] identifier[catalogVersion] operator[=] identifier[MiscUtils] operator[SEP] identifier[parseVersionString] operator[SEP] identifier[catalogVersionStr] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[catalogVersion] operator[==] Other[null] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
private void writeObject(ObjectOutputStream out) throws IOException { out.writeObject(clazz); out.writeInt(defaultBatchSize); out.writeInt(queryIndex); out.writeObject(cursor); out.writeObject(generators); out.writeInt(generatorIndex); writeObjects(out); }
class class_name[name] begin[{] method[writeObject, return_type[void], modifier[private], parameter[out]] begin[{] call[out.writeObject, parameter[member[.clazz]]] call[out.writeInt, parameter[member[.defaultBatchSize]]] call[out.writeInt, parameter[member[.queryIndex]]] call[out.writeObject, parameter[member[.cursor]]] call[out.writeObject, parameter[member[.generators]]] call[out.writeInt, parameter[member[.generatorIndex]]] call[.writeObjects, parameter[member[.out]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[writeObject] operator[SEP] identifier[ObjectOutputStream] identifier[out] operator[SEP] Keyword[throws] identifier[IOException] { identifier[out] operator[SEP] identifier[writeObject] operator[SEP] identifier[clazz] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[writeInt] operator[SEP] identifier[defaultBatchSize] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[writeInt] operator[SEP] identifier[queryIndex] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[writeObject] operator[SEP] identifier[cursor] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[writeObject] operator[SEP] identifier[generators] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[writeInt] operator[SEP] identifier[generatorIndex] operator[SEP] operator[SEP] identifier[writeObjects] operator[SEP] identifier[out] operator[SEP] operator[SEP] }
public static void waitUntilExists(final AmazonDynamoDB dynamo, final String tableName) throws InterruptedException { waitUntilExists(dynamo, tableName, DEFAULT_WAIT_TIMEOUT, DEFAULT_WAIT_INTERVAL); }
class class_name[name] begin[{] method[waitUntilExists, return_type[void], modifier[public static], parameter[dynamo, tableName]] begin[{] call[.waitUntilExists, parameter[member[.dynamo], member[.tableName], member[.DEFAULT_WAIT_TIMEOUT], member[.DEFAULT_WAIT_INTERVAL]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[waitUntilExists] operator[SEP] Keyword[final] identifier[AmazonDynamoDB] identifier[dynamo] , Keyword[final] identifier[String] identifier[tableName] operator[SEP] Keyword[throws] identifier[InterruptedException] { identifier[waitUntilExists] operator[SEP] identifier[dynamo] , identifier[tableName] , identifier[DEFAULT_WAIT_TIMEOUT] , identifier[DEFAULT_WAIT_INTERVAL] operator[SEP] operator[SEP] }
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2) public static boolean hasBluetoothLEFeature(PackageManager manager) { return manager.hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE); }
class class_name[name] begin[{] method[hasBluetoothLEFeature, return_type[type[boolean]], modifier[public static], parameter[manager]] begin[{] return[call[manager.hasSystemFeature, parameter[member[PackageManager.FEATURE_BLUETOOTH_LE]]]] end[}] END[}]
annotation[@] identifier[TargetApi] operator[SEP] identifier[Build] operator[SEP] identifier[VERSION_CODES] operator[SEP] identifier[JELLY_BEAN_MR2] operator[SEP] Keyword[public] Keyword[static] Keyword[boolean] identifier[hasBluetoothLEFeature] operator[SEP] identifier[PackageManager] identifier[manager] operator[SEP] { Keyword[return] identifier[manager] operator[SEP] identifier[hasSystemFeature] operator[SEP] identifier[PackageManager] operator[SEP] identifier[FEATURE_BLUETOOTH_LE] operator[SEP] operator[SEP] }
@Override public @NotNull SortedSet<MediaFormat> detectMediaFormats(@Nullable String extension, long fileSize, long width, long height) { // sort media formats by ranking SortedSet<MediaFormat> matchingFormats = new TreeSet<>(new MediaFormatRankingComparator()); for (MediaFormat mediaFormat : getMediaFormats()) { // skip media formats with negative ranking if (mediaFormat.getRanking() < 0) { continue; } // check extension boolean extensionMatch = false; if (mediaFormat.getExtensions() != null) { for (String ext : mediaFormat.getExtensions()) { if (StringUtils.equalsIgnoreCase(ext, extension)) { extensionMatch = true; break; } } } else { extensionMatch = true; } // check file size boolean fileSizeMatch = false; if (mediaFormat.getFileSizeMax() > 0) { fileSizeMatch = (fileSize <= mediaFormat.getFileSizeMax()); } else { fileSizeMatch = true; } // width/height match boolean dimensionMatch = false; if (width > 0 && height > 0) { dimensionMatch = (mediaFormat.getEffectiveMinWidth() == 0 || width >= mediaFormat.getEffectiveMinWidth()) && (mediaFormat.getEffectiveMaxWidth() == 0 || width <= mediaFormat.getEffectiveMaxWidth()) && (mediaFormat.getEffectiveMinHeight() == 0 || height >= mediaFormat.getEffectiveMinHeight()) && (mediaFormat.getEffectiveMaxHeight() == 0 || height <= mediaFormat.getEffectiveMaxHeight()); } else { dimensionMatch = true; } boolean ratioMatch = false; if (mediaFormat.hasRatio() && width > 0 && height > 0) { double formatRatio = mediaFormat.getRatio(); double ratio = (double)width / height; ratioMatch = Ratio.matches(ratio, formatRatio); } else { ratioMatch = true; } if (extensionMatch && fileSizeMatch && dimensionMatch && ratioMatch) { matchingFormats.add(mediaFormat); } } return matchingFormats; }
class class_name[name] begin[{] method[detectMediaFormats, return_type[type[SortedSet]], modifier[public], parameter[extension, fileSize, width, height]] begin[{] local_variable[type[SortedSet], matchingFormats] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getRanking, postfix_operators=[], prefix_operators=[], qualifier=mediaFormat, 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=[ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=extensionMatch)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getExtensions, postfix_operators=[], prefix_operators=[], qualifier=mediaFormat, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=extensionMatch, 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=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=ext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=extension, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equalsIgnoreCase, postfix_operators=[], prefix_operators=[], qualifier=StringUtils, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=extensionMatch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getExtensions, postfix_operators=[], prefix_operators=[], qualifier=mediaFormat, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ext)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=fileSizeMatch)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getFileSizeMax, postfix_operators=[], prefix_operators=[], qualifier=mediaFormat, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=fileSizeMatch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=fileSizeMatch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=fileSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getFileSizeMax, postfix_operators=[], prefix_operators=[], qualifier=mediaFormat, selectors=[], type_arguments=None), operator=<=)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=dimensionMatch)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), operandr=BinaryOperation(operandl=MemberReference(member=height, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), operator=&&), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dimensionMatch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dimensionMatch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getEffectiveMinWidth, postfix_operators=[], prefix_operators=[], qualifier=mediaFormat, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), operandr=BinaryOperation(operandl=MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getEffectiveMinWidth, postfix_operators=[], prefix_operators=[], qualifier=mediaFormat, selectors=[], type_arguments=None), operator=>=), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getEffectiveMaxWidth, postfix_operators=[], prefix_operators=[], qualifier=mediaFormat, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), operandr=BinaryOperation(operandl=MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getEffectiveMaxWidth, postfix_operators=[], prefix_operators=[], qualifier=mediaFormat, selectors=[], type_arguments=None), operator=<=), operator=||), operator=&&), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getEffectiveMinHeight, postfix_operators=[], prefix_operators=[], qualifier=mediaFormat, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), operandr=BinaryOperation(operandl=MemberReference(member=height, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getEffectiveMinHeight, postfix_operators=[], prefix_operators=[], qualifier=mediaFormat, selectors=[], type_arguments=None), operator=>=), operator=||), operator=&&), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getEffectiveMaxHeight, postfix_operators=[], prefix_operators=[], qualifier=mediaFormat, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), operandr=BinaryOperation(operandl=MemberReference(member=height, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getEffectiveMaxHeight, postfix_operators=[], prefix_operators=[], qualifier=mediaFormat, selectors=[], type_arguments=None), operator=<=), operator=||), operator=&&)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=ratioMatch)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=hasRatio, postfix_operators=[], prefix_operators=[], qualifier=mediaFormat, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), operator=&&), operandr=BinaryOperation(operandl=MemberReference(member=height, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), operator=&&), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=ratioMatch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getRatio, postfix_operators=[], prefix_operators=[], qualifier=mediaFormat, selectors=[], type_arguments=None), name=formatRatio)], modifiers=set(), type=BasicType(dimensions=[], name=double)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=Cast(expression=MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=double)), operandr=MemberReference(member=height, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=/), name=ratio)], modifiers=set(), type=BasicType(dimensions=[], name=double)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=ratioMatch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=ratio, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=formatRatio, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=matches, postfix_operators=[], prefix_operators=[], qualifier=Ratio, selectors=[], type_arguments=None)), label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=extensionMatch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=fileSizeMatch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=&&), operandr=MemberReference(member=dimensionMatch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=&&), operandr=MemberReference(member=ratioMatch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=mediaFormat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=matchingFormats, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getMediaFormats, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=mediaFormat)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MediaFormat, sub_type=None))), label=None) return[member[.matchingFormats]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] annotation[@] identifier[NotNull] identifier[SortedSet] operator[<] identifier[MediaFormat] operator[>] identifier[detectMediaFormats] operator[SEP] annotation[@] identifier[Nullable] identifier[String] identifier[extension] , Keyword[long] identifier[fileSize] , Keyword[long] identifier[width] , Keyword[long] identifier[height] operator[SEP] { identifier[SortedSet] operator[<] identifier[MediaFormat] operator[>] identifier[matchingFormats] operator[=] Keyword[new] identifier[TreeSet] operator[<] operator[>] operator[SEP] Keyword[new] identifier[MediaFormatRankingComparator] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[MediaFormat] identifier[mediaFormat] operator[:] identifier[getMediaFormats] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[mediaFormat] operator[SEP] identifier[getRanking] operator[SEP] operator[SEP] operator[<] Other[0] operator[SEP] { Keyword[continue] operator[SEP] } Keyword[boolean] identifier[extensionMatch] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[mediaFormat] operator[SEP] identifier[getExtensions] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[String] identifier[ext] operator[:] identifier[mediaFormat] operator[SEP] identifier[getExtensions] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[ext] , identifier[extension] operator[SEP] operator[SEP] { identifier[extensionMatch] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] } } } Keyword[else] { identifier[extensionMatch] operator[=] literal[boolean] operator[SEP] } Keyword[boolean] identifier[fileSizeMatch] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[mediaFormat] operator[SEP] identifier[getFileSizeMax] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[fileSizeMatch] operator[=] operator[SEP] identifier[fileSize] operator[<=] identifier[mediaFormat] operator[SEP] identifier[getFileSizeMax] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[fileSizeMatch] operator[=] literal[boolean] operator[SEP] } Keyword[boolean] identifier[dimensionMatch] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[width] operator[>] Other[0] operator[&&] identifier[height] operator[>] Other[0] operator[SEP] { identifier[dimensionMatch] operator[=] operator[SEP] identifier[mediaFormat] operator[SEP] identifier[getEffectiveMinWidth] operator[SEP] operator[SEP] operator[==] Other[0] operator[||] identifier[width] operator[>=] identifier[mediaFormat] operator[SEP] identifier[getEffectiveMinWidth] operator[SEP] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[mediaFormat] operator[SEP] identifier[getEffectiveMaxWidth] operator[SEP] operator[SEP] operator[==] Other[0] operator[||] identifier[width] operator[<=] identifier[mediaFormat] operator[SEP] identifier[getEffectiveMaxWidth] operator[SEP] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[mediaFormat] operator[SEP] identifier[getEffectiveMinHeight] operator[SEP] operator[SEP] operator[==] Other[0] operator[||] identifier[height] operator[>=] identifier[mediaFormat] operator[SEP] identifier[getEffectiveMinHeight] operator[SEP] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[mediaFormat] operator[SEP] identifier[getEffectiveMaxHeight] operator[SEP] operator[SEP] operator[==] Other[0] operator[||] identifier[height] operator[<=] identifier[mediaFormat] operator[SEP] identifier[getEffectiveMaxHeight] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[dimensionMatch] operator[=] literal[boolean] operator[SEP] } Keyword[boolean] identifier[ratioMatch] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[mediaFormat] operator[SEP] identifier[hasRatio] operator[SEP] operator[SEP] operator[&&] identifier[width] operator[>] Other[0] operator[&&] identifier[height] operator[>] Other[0] operator[SEP] { Keyword[double] identifier[formatRatio] operator[=] identifier[mediaFormat] operator[SEP] identifier[getRatio] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[ratio] operator[=] operator[SEP] Keyword[double] operator[SEP] identifier[width] operator[/] identifier[height] operator[SEP] identifier[ratioMatch] operator[=] identifier[Ratio] operator[SEP] identifier[matches] operator[SEP] identifier[ratio] , identifier[formatRatio] operator[SEP] operator[SEP] } Keyword[else] { identifier[ratioMatch] operator[=] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[extensionMatch] operator[&&] identifier[fileSizeMatch] operator[&&] identifier[dimensionMatch] operator[&&] identifier[ratioMatch] operator[SEP] { identifier[matchingFormats] operator[SEP] identifier[add] operator[SEP] identifier[mediaFormat] operator[SEP] operator[SEP] } } Keyword[return] identifier[matchingFormats] operator[SEP] }
@Override public void executeDemo(String text) { try { LikeUtils.getLikesByUser(this, UserUtils.getCurrentUser(this), 0, PAGE_SIZE, new LikeListListener() { @Override public void onList(List<Like> items, int totalSize) { handleSocializeResult(items); } @Override public void onError(SocializeException error) { handleError(GetLikesByUserActivity.this, error); } }); } catch (SocializeException e) { e.printStackTrace(); } }
class class_name[name] begin[{] method[executeDemo, return_type[void], modifier[public], parameter[text]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=getCurrentUser, postfix_operators=[], prefix_operators=[], qualifier=UserUtils, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=PAGE_SIZE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=items, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=handleSocializeResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=onList, parameters=[FormalParameter(annotations=[], modifiers=set(), name=items, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Like, sub_type=None))], dimensions=[], name=List, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=totalSize, type=BasicType(dimensions=[], name=int), varargs=False)], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=GetLikesByUserActivity, selectors=[]), MemberReference(member=error, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=handleError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=onError, parameters=[FormalParameter(annotations=[], modifiers=set(), name=error, type=ReferenceType(arguments=None, dimensions=[], name=SocializeException, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LikeListListener, sub_type=None))], member=getLikesByUser, postfix_operators=[], prefix_operators=[], qualifier=LikeUtils, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SocializeException']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[executeDemo] operator[SEP] identifier[String] identifier[text] operator[SEP] { Keyword[try] { identifier[LikeUtils] operator[SEP] identifier[getLikesByUser] operator[SEP] Keyword[this] , identifier[UserUtils] operator[SEP] identifier[getCurrentUser] operator[SEP] Keyword[this] operator[SEP] , Other[0] , identifier[PAGE_SIZE] , Keyword[new] identifier[LikeListListener] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onList] operator[SEP] identifier[List] operator[<] identifier[Like] operator[>] identifier[items] , Keyword[int] identifier[totalSize] operator[SEP] { identifier[handleSocializeResult] operator[SEP] identifier[items] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onError] operator[SEP] identifier[SocializeException] identifier[error] operator[SEP] { identifier[handleError] operator[SEP] identifier[GetLikesByUserActivity] operator[SEP] Keyword[this] , identifier[error] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SocializeException] identifier[e] operator[SEP] { identifier[e] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } }
@Override public EClass getIfcPropertyEnumeration() { if (ifcPropertyEnumerationEClass == null) { ifcPropertyEnumerationEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) .getEClassifiers().get(470); } return ifcPropertyEnumerationEClass; }
class class_name[name] begin[{] method[getIfcPropertyEnumeration, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcPropertyEnumerationEClass], ==, literal[null]]] begin[{] assign[member[.ifcPropertyEnumerationEClass], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=Ifc4Package, selectors=[])], member=getEPackage, postfix_operators=[], prefix_operators=[], qualifier=EPackage.Registry.INSTANCE, selectors=[MethodInvocation(arguments=[], member=getEClassifiers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=470)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=EClass, sub_type=None))] else begin[{] None end[}] return[member[.ifcPropertyEnumerationEClass]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcPropertyEnumeration] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcPropertyEnumerationEClass] operator[==] Other[null] operator[SEP] { identifier[ifcPropertyEnumerationEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[Ifc4Package] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[470] operator[SEP] operator[SEP] } Keyword[return] identifier[ifcPropertyEnumerationEClass] operator[SEP] }
static MavenProject getRootModule(MavenProject module, List<MavenProject> reactor, String rulesDirectory, boolean useExecutionRootAsProjectRoot) throws MojoExecutionException { String rootModuleContextKey = ProjectResolver.class.getName() + "#rootModule"; MavenProject rootModule = (MavenProject) module.getContextValue(rootModuleContextKey); if (rootModule == null) { if (useExecutionRootAsProjectRoot) { rootModule = getRootModule(reactor); } else { rootModule = getRootModule(module, rulesDirectory); } module.setContextValue(rootModuleContextKey, rootModule); } return rootModule; }
class class_name[name] begin[{] method[getRootModule, return_type[type[MavenProject]], modifier[static], parameter[module, reactor, rulesDirectory, useExecutionRootAsProjectRoot]] begin[{] local_variable[type[String], rootModuleContextKey] local_variable[type[MavenProject], rootModule] if[binary_operation[member[.rootModule], ==, literal[null]]] begin[{] if[member[.useExecutionRootAsProjectRoot]] begin[{] assign[member[.rootModule], call[.getRootModule, parameter[member[.reactor]]]] else begin[{] assign[member[.rootModule], call[.getRootModule, parameter[member[.module], member[.rulesDirectory]]]] end[}] call[module.setContextValue, parameter[member[.rootModuleContextKey], member[.rootModule]]] else begin[{] None end[}] return[member[.rootModule]] end[}] END[}]
Keyword[static] identifier[MavenProject] identifier[getRootModule] operator[SEP] identifier[MavenProject] identifier[module] , identifier[List] operator[<] identifier[MavenProject] operator[>] identifier[reactor] , identifier[String] identifier[rulesDirectory] , Keyword[boolean] identifier[useExecutionRootAsProjectRoot] operator[SEP] Keyword[throws] identifier[MojoExecutionException] { identifier[String] identifier[rootModuleContextKey] operator[=] identifier[ProjectResolver] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] identifier[MavenProject] identifier[rootModule] operator[=] operator[SEP] identifier[MavenProject] operator[SEP] identifier[module] operator[SEP] identifier[getContextValue] operator[SEP] identifier[rootModuleContextKey] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[rootModule] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[useExecutionRootAsProjectRoot] operator[SEP] { identifier[rootModule] operator[=] identifier[getRootModule] operator[SEP] identifier[reactor] operator[SEP] operator[SEP] } Keyword[else] { identifier[rootModule] operator[=] identifier[getRootModule] operator[SEP] identifier[module] , identifier[rulesDirectory] operator[SEP] operator[SEP] } identifier[module] operator[SEP] identifier[setContextValue] operator[SEP] identifier[rootModuleContextKey] , identifier[rootModule] operator[SEP] operator[SEP] } Keyword[return] identifier[rootModule] operator[SEP] }
private void addWhere4QueryPrint(final QueryPrint _print) throws CacheReloadException { final Filter filter = _print.getFilter(); filter.append2SQLSelect(sqlSelect); }
class class_name[name] begin[{] method[addWhere4QueryPrint, return_type[void], modifier[private], parameter[_print]] begin[{] local_variable[type[Filter], filter] call[filter.append2SQLSelect, parameter[member[.sqlSelect]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[addWhere4QueryPrint] operator[SEP] Keyword[final] identifier[QueryPrint] identifier[_print] operator[SEP] Keyword[throws] identifier[CacheReloadException] { Keyword[final] identifier[Filter] identifier[filter] operator[=] identifier[_print] operator[SEP] identifier[getFilter] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[append2SQLSelect] operator[SEP] identifier[sqlSelect] operator[SEP] operator[SEP] }
public static CPMeasurementUnit fetchByUuid_C_Last(String uuid, long companyId, OrderByComparator<CPMeasurementUnit> orderByComparator) { return getPersistence() .fetchByUuid_C_Last(uuid, companyId, orderByComparator); }
class class_name[name] begin[{] method[fetchByUuid_C_Last, return_type[type[CPMeasurementUnit]], modifier[public static], parameter[uuid, companyId, orderByComparator]] begin[{] return[call[.getPersistence, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[CPMeasurementUnit] identifier[fetchByUuid_C_Last] operator[SEP] identifier[String] identifier[uuid] , Keyword[long] identifier[companyId] , identifier[OrderByComparator] operator[<] identifier[CPMeasurementUnit] operator[>] identifier[orderByComparator] operator[SEP] { Keyword[return] identifier[getPersistence] operator[SEP] operator[SEP] operator[SEP] identifier[fetchByUuid_C_Last] operator[SEP] identifier[uuid] , identifier[companyId] , identifier[orderByComparator] operator[SEP] operator[SEP] }
private Set<Object> scan() { Set<Object> mocks = newMockSafeHashSet(); for (Field field : clazz.getDeclaredFields()) { // mock or spies only FieldReader fieldReader = new FieldReader(instance, field); Object mockInstance = preparedMock(fieldReader.read(), field); if (mockInstance != null) { mocks.add(mockInstance); } } return mocks; }
class class_name[name] begin[{] method[scan, return_type[type[Set]], modifier[private], parameter[]] begin[{] local_variable[type[Set], mocks] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=instance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=field, 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=FieldReader, sub_type=None)), name=fieldReader)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FieldReader, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=read, postfix_operators=[], prefix_operators=[], qualifier=fieldReader, selectors=[], type_arguments=None), MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=preparedMock, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=mockInstance)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=mockInstance, 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=mockInstance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=mocks, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getDeclaredFields, postfix_operators=[], prefix_operators=[], qualifier=clazz, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=field)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Field, sub_type=None))), label=None) return[member[.mocks]] end[}] END[}]
Keyword[private] identifier[Set] operator[<] identifier[Object] operator[>] identifier[scan] operator[SEP] operator[SEP] { identifier[Set] operator[<] identifier[Object] operator[>] identifier[mocks] operator[=] identifier[newMockSafeHashSet] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Field] identifier[field] operator[:] identifier[clazz] operator[SEP] identifier[getDeclaredFields] operator[SEP] operator[SEP] operator[SEP] { identifier[FieldReader] identifier[fieldReader] operator[=] Keyword[new] identifier[FieldReader] operator[SEP] identifier[instance] , identifier[field] operator[SEP] operator[SEP] identifier[Object] identifier[mockInstance] operator[=] identifier[preparedMock] operator[SEP] identifier[fieldReader] operator[SEP] identifier[read] operator[SEP] operator[SEP] , identifier[field] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mockInstance] operator[!=] Other[null] operator[SEP] { identifier[mocks] operator[SEP] identifier[add] operator[SEP] identifier[mockInstance] operator[SEP] operator[SEP] } } Keyword[return] identifier[mocks] operator[SEP] }
@Override public Configuration getServiceConfiguration() { final Configuration partialServiceConf = ServiceConfiguration.CONF .set(ServiceConfiguration.SERVICES, taskOutputStreamProvider.getClass()) .set(ServiceConfiguration.ON_CONTEXT_STOP, ContextStopHandler.class) .set(ServiceConfiguration.ON_TASK_STARTED, TaskStartHandler.class) .build(); return Tang.Factory.getTang() .newConfigurationBuilder(partialServiceConf) .bindImplementation(OutputStreamProvider.class, taskOutputStreamProvider.getClass()) .bindImplementation(TaskOutputStreamProvider.class, taskOutputStreamProvider.getClass()) .bindNamedParameter(OutputPath.class, outputPath) .build(); }
class class_name[name] begin[{] method[getServiceConfiguration, return_type[type[Configuration]], modifier[public], parameter[]] begin[{] local_variable[type[Configuration], partialServiceConf] return[call[Tang.Factory.getTang, parameter[]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Configuration] identifier[getServiceConfiguration] operator[SEP] operator[SEP] { Keyword[final] identifier[Configuration] identifier[partialServiceConf] operator[=] identifier[ServiceConfiguration] operator[SEP] identifier[CONF] operator[SEP] identifier[set] operator[SEP] identifier[ServiceConfiguration] operator[SEP] identifier[SERVICES] , identifier[taskOutputStreamProvider] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[set] operator[SEP] identifier[ServiceConfiguration] operator[SEP] identifier[ON_CONTEXT_STOP] , identifier[ContextStopHandler] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[set] operator[SEP] identifier[ServiceConfiguration] operator[SEP] identifier[ON_TASK_STARTED] , identifier[TaskStartHandler] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[Tang] operator[SEP] identifier[Factory] operator[SEP] identifier[getTang] operator[SEP] operator[SEP] operator[SEP] identifier[newConfigurationBuilder] operator[SEP] identifier[partialServiceConf] operator[SEP] operator[SEP] identifier[bindImplementation] operator[SEP] identifier[OutputStreamProvider] operator[SEP] Keyword[class] , identifier[taskOutputStreamProvider] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[bindImplementation] operator[SEP] identifier[TaskOutputStreamProvider] operator[SEP] Keyword[class] , identifier[taskOutputStreamProvider] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[bindNamedParameter] operator[SEP] identifier[OutputPath] operator[SEP] Keyword[class] , identifier[outputPath] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] }
public static <A extends Number & Comparable<?>> NumberExpression<Double> tanh(Expression<A> num) { return Expressions.numberOperation(Double.class, Ops.MathOps.TANH, num); }
class class_name[name] begin[{] method[tanh, return_type[type[NumberExpression]], modifier[public static], parameter[num]] begin[{] return[call[Expressions.numberOperation, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Double, sub_type=None)), member[Ops.MathOps.TANH], member[.num]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[A] Keyword[extends] identifier[Number] operator[&] identifier[Comparable] operator[<] operator[?] operator[>] operator[>] identifier[NumberExpression] operator[<] identifier[Double] operator[>] identifier[tanh] operator[SEP] identifier[Expression] operator[<] identifier[A] operator[>] identifier[num] operator[SEP] { Keyword[return] identifier[Expressions] operator[SEP] identifier[numberOperation] operator[SEP] identifier[Double] operator[SEP] Keyword[class] , identifier[Ops] operator[SEP] identifier[MathOps] operator[SEP] identifier[TANH] , identifier[num] operator[SEP] operator[SEP] }
private void readSheet(StylesTable styles, ReadOnlySharedStringsTable sharedStringsTable, InputStream sheetInputStream) throws IOException, ParserConfigurationException, SAXException { SAXParserFactory saxFactory = SAXParserFactory.newInstance(); XMLReader sheetParser = saxFactory.newSAXParser().getXMLReader(); ContentHandler handler = new XSSFSheetXMLHandler(styles, sharedStringsTable, sheetContentsHandler, true); sheetParser.setContentHandler(handler); sheetParser.parse(new InputSource(sheetInputStream)); }
class class_name[name] begin[{] method[readSheet, return_type[void], modifier[private], parameter[styles, sharedStringsTable, sheetInputStream]] begin[{] local_variable[type[SAXParserFactory], saxFactory] local_variable[type[XMLReader], sheetParser] local_variable[type[ContentHandler], handler] call[sheetParser.setContentHandler, parameter[member[.handler]]] call[sheetParser.parse, parameter[ClassCreator(arguments=[MemberReference(member=sheetInputStream, 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=InputSource, sub_type=None))]] end[}] END[}]
Keyword[private] Keyword[void] identifier[readSheet] operator[SEP] identifier[StylesTable] identifier[styles] , identifier[ReadOnlySharedStringsTable] identifier[sharedStringsTable] , identifier[InputStream] identifier[sheetInputStream] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ParserConfigurationException] , identifier[SAXException] { identifier[SAXParserFactory] identifier[saxFactory] operator[=] identifier[SAXParserFactory] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] identifier[XMLReader] identifier[sheetParser] operator[=] identifier[saxFactory] operator[SEP] identifier[newSAXParser] operator[SEP] operator[SEP] operator[SEP] identifier[getXMLReader] operator[SEP] operator[SEP] operator[SEP] identifier[ContentHandler] identifier[handler] operator[=] Keyword[new] identifier[XSSFSheetXMLHandler] operator[SEP] identifier[styles] , identifier[sharedStringsTable] , identifier[sheetContentsHandler] , literal[boolean] operator[SEP] operator[SEP] identifier[sheetParser] operator[SEP] identifier[setContentHandler] operator[SEP] identifier[handler] operator[SEP] operator[SEP] identifier[sheetParser] operator[SEP] identifier[parse] operator[SEP] Keyword[new] identifier[InputSource] operator[SEP] identifier[sheetInputStream] operator[SEP] operator[SEP] operator[SEP] }