code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public <T> T invoke(Object target, Object... args) { return ReflectUtil.invoke(target, method, args); }
class class_name[name] begin[{] method[invoke, return_type[type[T]], modifier[public], parameter[target, args]] begin[{] return[call[ReflectUtil.invoke, parameter[member[.target], member[.method], member[.args]]]] end[}] END[}]
Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[invoke] operator[SEP] identifier[Object] identifier[target] , identifier[Object] operator[...] identifier[args] operator[SEP] { Keyword[return] identifier[ReflectUtil] operator[SEP] identifier[invoke] operator[SEP] identifier[target] , identifier[method] , identifier[args] operator[SEP] operator[SEP] }
public int getNumberOfLabelsUsed() { if (labels != null && !labels.isEmpty()) return labels.size(); else return ((Long) (maxCount + 1)).intValue(); }
class class_name[name] begin[{] method[getNumberOfLabelsUsed, return_type[type[int]], modifier[public], parameter[]] begin[{] if[binary_operation[binary_operation[member[.labels], !=, literal[null]], &&, call[labels.isEmpty, parameter[]]]] begin[{] return[call[labels.size, parameter[]]] else begin[{] return[Cast(expression=BinaryOperation(operandl=MemberReference(member=maxCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), type=ReferenceType(arguments=None, dimensions=[], name=Long, sub_type=None))] end[}] end[}] END[}]
Keyword[public] Keyword[int] identifier[getNumberOfLabelsUsed] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[labels] operator[!=] Other[null] operator[&&] operator[!] identifier[labels] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[labels] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[else] Keyword[return] operator[SEP] operator[SEP] identifier[Long] operator[SEP] operator[SEP] identifier[maxCount] operator[+] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] }
public static int poll(Selector selector, PollItem[] items, int count, long timeout) { Utils.checkArgument(items != null, "items have to be supplied for polling"); if (count == 0) { if (timeout <= 0) { return 0; } LockSupport.parkNanos(TimeUnit.NANOSECONDS.convert(timeout, TimeUnit.MILLISECONDS)); return 0; } long now = 0L; long end = 0L; HashMap<SelectableChannel, SelectionKey> saved = new HashMap<SelectableChannel, SelectionKey>(); for (SelectionKey key : selector.keys()) { if (key.isValid()) { saved.put(key.channel(), key); } } for (int i = 0; i < count; i++) { PollItem item = items[i]; if (item == null) { continue; } SelectableChannel ch = item.getChannel(); // mailbox channel if ZMQ socket SelectionKey key = saved.remove(ch); if (key != null) { if (key.interestOps() != item.interestOps()) { key.interestOps(item.interestOps()); } key.attach(item); } else { try { ch.register(selector, item.interestOps(), item); } catch (ClosedSelectorException e) { // context was closed asynchronously, exit gracefully return -1; } catch (ClosedChannelException e) { throw new ZError.IOException(e); } } } if (!saved.isEmpty()) { for (SelectionKey deprecated : saved.values()) { deprecated.cancel(); } } boolean firstPass = true; int nevents = 0; int ready; while (true) { // Compute the timeout for the subsequent poll. long waitMillis; if (firstPass) { waitMillis = 0L; } else if (timeout < 0L) { waitMillis = -1L; } else { waitMillis = TimeUnit.NANOSECONDS.toMillis(end - now); if (waitMillis == 0) { waitMillis = 1L; } } // Wait for events. try { int rc; if (waitMillis < 0) { rc = selector.select(0); } else if (waitMillis == 0) { rc = selector.selectNow(); } else { rc = selector.select(waitMillis); } for (SelectionKey key : selector.keys()) { PollItem item = (PollItem) key.attachment(); ready = item.readyOps(key, rc); if (ready < 0) { return -1; } if (ready > 0) { nevents++; } } selector.selectedKeys().clear(); } catch (ClosedSelectorException e) { // context was closed asynchronously, exit gracefully return -1; } catch (IOException e) { throw new ZError.IOException(e); } // If timeout is zero, exit immediately whether there are events or not. if (timeout == 0) { break; } if (nevents > 0) { break; } // At this point we are meant to wait for events but there are none. // If timeout is infinite we can just loop until we get some events. if (timeout < 0) { if (firstPass) { firstPass = false; } continue; } // The timeout is finite and there are no events. In the first pass // we get a timestamp of when the polling have begun. (We assume that // first pass have taken negligible time). We also compute the time // when the polling should time out. if (firstPass) { now = Clock.nowNS(); end = now + TimeUnit.MILLISECONDS.toNanos(timeout); if (now == end) { break; } firstPass = false; continue; } // Find out whether timeout have expired. now = Clock.nowNS(); if (now >= end) { break; } } return nevents; }
class class_name[name] begin[{] method[poll, return_type[type[int]], modifier[public static], parameter[selector, items, count, timeout]] begin[{] call[Utils.checkArgument, parameter[binary_operation[member[.items], !=, literal[null]], literal["items have to be supplied for polling"]]] if[binary_operation[member[.count], ==, literal[0]]] begin[{] if[binary_operation[member[.timeout], <=, literal[0]]] begin[{] return[literal[0]] else begin[{] None end[}] call[LockSupport.parkNanos, parameter[call[TimeUnit.NANOSECONDS.convert, parameter[member[.timeout], member[TimeUnit.MILLISECONDS]]]]] return[literal[0]] else begin[{] None end[}] local_variable[type[long], now] local_variable[type[long], end] local_variable[type[HashMap], saved] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isValid, postfix_operators=[], prefix_operators=[], qualifier=key, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=channel, postfix_operators=[], prefix_operators=[], qualifier=key, selectors=[], type_arguments=None), MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=saved, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keys, postfix_operators=[], prefix_operators=[], qualifier=selector, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SelectionKey, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=items, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=item)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PollItem, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=item, 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=[ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getChannel, postfix_operators=[], prefix_operators=[], qualifier=item, selectors=[], type_arguments=None), name=ch)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SelectableChannel, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=saved, selectors=[], type_arguments=None), name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SelectionKey, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=selector, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=interestOps, postfix_operators=[], prefix_operators=[], qualifier=item, selectors=[], type_arguments=None), MemberReference(member=item, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=register, postfix_operators=[], prefix_operators=[], qualifier=ch, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ClosedSelectorException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ZError, sub_type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None))), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ClosedChannelException']))], finally_block=None, label=None, resources=None)]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=interestOps, postfix_operators=[], prefix_operators=[], qualifier=key, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=interestOps, postfix_operators=[], prefix_operators=[], qualifier=item, selectors=[], type_arguments=None), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=interestOps, postfix_operators=[], prefix_operators=[], qualifier=item, selectors=[], type_arguments=None)], member=interestOps, postfix_operators=[], prefix_operators=[], qualifier=key, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=item, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=attach, postfix_operators=[], prefix_operators=[], qualifier=key, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) if[call[saved.isEmpty, parameter[]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=cancel, postfix_operators=[], prefix_operators=[], qualifier=deprecated, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=saved, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=deprecated)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SelectionKey, sub_type=None))), label=None) else begin[{] None end[}] local_variable[type[boolean], firstPass] local_variable[type[int], nevents] local_variable[type[int], ready] while[literal[true]] begin[{] local_variable[type[long], waitMillis] if[member[.firstPass]] begin[{] assign[member[.waitMillis], literal[0L]] else begin[{] if[binary_operation[member[.timeout], <, literal[0L]]] begin[{] assign[member[.waitMillis], literal[1L]] else begin[{] assign[member[.waitMillis], call[TimeUnit.NANOSECONDS.toMillis, parameter[binary_operation[member[.end], -, member[.now]]]]] if[binary_operation[member[.waitMillis], ==, literal[0]]] begin[{] assign[member[.waitMillis], literal[1L]] else begin[{] None end[}] end[}] end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=rc)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=waitMillis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=waitMillis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=rc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=waitMillis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=select, postfix_operators=[], prefix_operators=[], qualifier=selector, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=rc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=selectNow, postfix_operators=[], prefix_operators=[], qualifier=selector, selectors=[], type_arguments=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=rc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=select, postfix_operators=[], prefix_operators=[], qualifier=selector, selectors=[], type_arguments=None)), label=None)])), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=attachment, postfix_operators=[], prefix_operators=[], qualifier=key, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=PollItem, sub_type=None)), name=item)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PollItem, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=ready, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readyOps, postfix_operators=[], prefix_operators=[], qualifier=item, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ready, 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=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ready, 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=MemberReference(member=nevents, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keys, postfix_operators=[], prefix_operators=[], qualifier=selector, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SelectionKey, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=selectedKeys, postfix_operators=[], prefix_operators=[], qualifier=selector, selectors=[MethodInvocation(arguments=[], member=clear, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ClosedSelectorException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ZError, sub_type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None))), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) if[binary_operation[member[.timeout], ==, literal[0]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] if[binary_operation[member[.nevents], >, literal[0]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] if[binary_operation[member[.timeout], <, literal[0]]] begin[{] if[member[.firstPass]] begin[{] assign[member[.firstPass], literal[false]] else begin[{] None end[}] ContinueStatement(goto=None, label=None) else begin[{] None end[}] if[member[.firstPass]] begin[{] assign[member[.now], call[Clock.nowNS, parameter[]]] assign[member[.end], binary_operation[member[.now], +, call[TimeUnit.MILLISECONDS.toNanos, parameter[member[.timeout]]]]] if[binary_operation[member[.now], ==, member[.end]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] assign[member[.firstPass], literal[false]] ContinueStatement(goto=None, label=None) else begin[{] None end[}] assign[member[.now], call[Clock.nowNS, parameter[]]] if[binary_operation[member[.now], >=, member[.end]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] end[}] return[member[.nevents]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[poll] operator[SEP] identifier[Selector] identifier[selector] , identifier[PollItem] operator[SEP] operator[SEP] identifier[items] , Keyword[int] identifier[count] , Keyword[long] identifier[timeout] operator[SEP] { identifier[Utils] operator[SEP] identifier[checkArgument] operator[SEP] identifier[items] operator[!=] Other[null] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[count] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[timeout] operator[<=] Other[0] operator[SEP] { Keyword[return] Other[0] operator[SEP] } identifier[LockSupport] operator[SEP] identifier[parkNanos] operator[SEP] identifier[TimeUnit] operator[SEP] identifier[NANOSECONDS] operator[SEP] identifier[convert] operator[SEP] identifier[timeout] , identifier[TimeUnit] operator[SEP] identifier[MILLISECONDS] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[0] operator[SEP] } Keyword[long] identifier[now] operator[=] Other[0L] operator[SEP] Keyword[long] identifier[end] operator[=] Other[0L] operator[SEP] identifier[HashMap] operator[<] identifier[SelectableChannel] , identifier[SelectionKey] operator[>] identifier[saved] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[SelectableChannel] , identifier[SelectionKey] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[SelectionKey] identifier[key] operator[:] identifier[selector] operator[SEP] identifier[keys] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[key] operator[SEP] identifier[isValid] operator[SEP] operator[SEP] operator[SEP] { identifier[saved] operator[SEP] identifier[put] operator[SEP] identifier[key] operator[SEP] identifier[channel] operator[SEP] operator[SEP] , identifier[key] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[count] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[PollItem] identifier[item] operator[=] identifier[items] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[item] operator[==] Other[null] operator[SEP] { Keyword[continue] operator[SEP] } identifier[SelectableChannel] identifier[ch] operator[=] identifier[item] operator[SEP] identifier[getChannel] operator[SEP] operator[SEP] operator[SEP] identifier[SelectionKey] identifier[key] operator[=] identifier[saved] operator[SEP] identifier[remove] operator[SEP] identifier[ch] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[key] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[key] operator[SEP] identifier[interestOps] operator[SEP] operator[SEP] operator[!=] identifier[item] operator[SEP] identifier[interestOps] operator[SEP] operator[SEP] operator[SEP] { identifier[key] operator[SEP] identifier[interestOps] operator[SEP] identifier[item] operator[SEP] identifier[interestOps] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[key] operator[SEP] identifier[attach] operator[SEP] identifier[item] operator[SEP] operator[SEP] } Keyword[else] { Keyword[try] { identifier[ch] operator[SEP] identifier[register] operator[SEP] identifier[selector] , identifier[item] operator[SEP] identifier[interestOps] operator[SEP] operator[SEP] , identifier[item] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ClosedSelectorException] identifier[e] operator[SEP] { Keyword[return] operator[-] Other[1] operator[SEP] } Keyword[catch] operator[SEP] identifier[ClosedChannelException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ZError] operator[SEP] identifier[IOException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] operator[!] identifier[saved] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[SelectionKey] identifier[deprecated] operator[:] identifier[saved] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { identifier[deprecated] operator[SEP] identifier[cancel] operator[SEP] operator[SEP] operator[SEP] } } Keyword[boolean] identifier[firstPass] operator[=] literal[boolean] operator[SEP] Keyword[int] identifier[nevents] operator[=] Other[0] operator[SEP] Keyword[int] identifier[ready] operator[SEP] Keyword[while] operator[SEP] literal[boolean] operator[SEP] { Keyword[long] identifier[waitMillis] operator[SEP] Keyword[if] operator[SEP] identifier[firstPass] operator[SEP] { identifier[waitMillis] operator[=] Other[0L] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[timeout] operator[<] Other[0L] operator[SEP] { identifier[waitMillis] operator[=] operator[-] Other[1L] operator[SEP] } Keyword[else] { identifier[waitMillis] operator[=] identifier[TimeUnit] operator[SEP] identifier[NANOSECONDS] operator[SEP] identifier[toMillis] operator[SEP] identifier[end] operator[-] identifier[now] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[waitMillis] operator[==] Other[0] operator[SEP] { identifier[waitMillis] operator[=] Other[1L] operator[SEP] } } Keyword[try] { Keyword[int] identifier[rc] operator[SEP] Keyword[if] operator[SEP] identifier[waitMillis] operator[<] Other[0] operator[SEP] { identifier[rc] operator[=] identifier[selector] operator[SEP] identifier[select] operator[SEP] Other[0] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[waitMillis] operator[==] Other[0] operator[SEP] { identifier[rc] operator[=] identifier[selector] operator[SEP] identifier[selectNow] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[rc] operator[=] identifier[selector] operator[SEP] identifier[select] operator[SEP] identifier[waitMillis] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[SelectionKey] identifier[key] operator[:] identifier[selector] operator[SEP] identifier[keys] operator[SEP] operator[SEP] operator[SEP] { identifier[PollItem] identifier[item] operator[=] operator[SEP] identifier[PollItem] operator[SEP] identifier[key] operator[SEP] identifier[attachment] operator[SEP] operator[SEP] operator[SEP] identifier[ready] operator[=] identifier[item] operator[SEP] identifier[readyOps] operator[SEP] identifier[key] , identifier[rc] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ready] operator[<] Other[0] operator[SEP] { Keyword[return] operator[-] Other[1] operator[SEP] } Keyword[if] operator[SEP] identifier[ready] operator[>] Other[0] operator[SEP] { identifier[nevents] operator[++] operator[SEP] } } identifier[selector] operator[SEP] identifier[selectedKeys] operator[SEP] operator[SEP] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ClosedSelectorException] identifier[e] operator[SEP] { Keyword[return] operator[-] Other[1] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ZError] operator[SEP] identifier[IOException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[timeout] operator[==] Other[0] operator[SEP] { Keyword[break] operator[SEP] } Keyword[if] operator[SEP] identifier[nevents] operator[>] Other[0] operator[SEP] { Keyword[break] operator[SEP] } Keyword[if] operator[SEP] identifier[timeout] operator[<] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[firstPass] operator[SEP] { identifier[firstPass] operator[=] literal[boolean] operator[SEP] } Keyword[continue] operator[SEP] } Keyword[if] operator[SEP] identifier[firstPass] operator[SEP] { identifier[now] operator[=] identifier[Clock] operator[SEP] identifier[nowNS] operator[SEP] operator[SEP] operator[SEP] identifier[end] operator[=] identifier[now] operator[+] identifier[TimeUnit] operator[SEP] identifier[MILLISECONDS] operator[SEP] identifier[toNanos] operator[SEP] identifier[timeout] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[now] operator[==] identifier[end] operator[SEP] { Keyword[break] operator[SEP] } identifier[firstPass] operator[=] literal[boolean] operator[SEP] Keyword[continue] operator[SEP] } identifier[now] operator[=] identifier[Clock] operator[SEP] identifier[nowNS] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[now] operator[>=] identifier[end] operator[SEP] { Keyword[break] operator[SEP] } } Keyword[return] identifier[nevents] operator[SEP] }
public void info(@Nullable final String event, @Nullable final String message) { log(LogLevel.INFO, event, message, EMPTY_STRING_ARRAY, EMPTY_OBJECT_ARRAY, DEFAULT_THROWABLE); }
class class_name[name] begin[{] method[info, return_type[void], modifier[public], parameter[event, message]] begin[{] call[.log, parameter[member[LogLevel.INFO], member[.event], member[.message], member[.EMPTY_STRING_ARRAY], member[.EMPTY_OBJECT_ARRAY], member[.DEFAULT_THROWABLE]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[info] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[event] , annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[message] operator[SEP] { identifier[log] operator[SEP] identifier[LogLevel] operator[SEP] identifier[INFO] , identifier[event] , identifier[message] , identifier[EMPTY_STRING_ARRAY] , identifier[EMPTY_OBJECT_ARRAY] , identifier[DEFAULT_THROWABLE] operator[SEP] operator[SEP] }
public void marshall(DeploymentOverview deploymentOverview, ProtocolMarshaller protocolMarshaller) { if (deploymentOverview == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(deploymentOverview.getPending(), PENDING_BINDING); protocolMarshaller.marshall(deploymentOverview.getInProgress(), INPROGRESS_BINDING); protocolMarshaller.marshall(deploymentOverview.getSucceeded(), SUCCEEDED_BINDING); protocolMarshaller.marshall(deploymentOverview.getFailed(), FAILED_BINDING); protocolMarshaller.marshall(deploymentOverview.getSkipped(), SKIPPED_BINDING); protocolMarshaller.marshall(deploymentOverview.getReady(), READY_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[deploymentOverview, protocolMarshaller]] begin[{] if[binary_operation[member[.deploymentOverview], ==, 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=getPending, postfix_operators=[], prefix_operators=[], qualifier=deploymentOverview, selectors=[], type_arguments=None), MemberReference(member=PENDING_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=getInProgress, postfix_operators=[], prefix_operators=[], qualifier=deploymentOverview, selectors=[], type_arguments=None), MemberReference(member=INPROGRESS_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=getSucceeded, postfix_operators=[], prefix_operators=[], qualifier=deploymentOverview, selectors=[], type_arguments=None), MemberReference(member=SUCCEEDED_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=getFailed, postfix_operators=[], prefix_operators=[], qualifier=deploymentOverview, selectors=[], type_arguments=None), MemberReference(member=FAILED_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=getSkipped, postfix_operators=[], prefix_operators=[], qualifier=deploymentOverview, selectors=[], type_arguments=None), MemberReference(member=SKIPPED_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=getReady, postfix_operators=[], prefix_operators=[], qualifier=deploymentOverview, selectors=[], type_arguments=None), MemberReference(member=READY_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[DeploymentOverview] identifier[deploymentOverview] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[deploymentOverview] 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[deploymentOverview] operator[SEP] identifier[getPending] operator[SEP] operator[SEP] , identifier[PENDING_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[deploymentOverview] operator[SEP] identifier[getInProgress] operator[SEP] operator[SEP] , identifier[INPROGRESS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[deploymentOverview] operator[SEP] identifier[getSucceeded] operator[SEP] operator[SEP] , identifier[SUCCEEDED_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[deploymentOverview] operator[SEP] identifier[getFailed] operator[SEP] operator[SEP] , identifier[FAILED_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[deploymentOverview] operator[SEP] identifier[getSkipped] operator[SEP] operator[SEP] , identifier[SKIPPED_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[deploymentOverview] operator[SEP] identifier[getReady] operator[SEP] operator[SEP] , identifier[READY_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] } }
@Override public int doStartTag() throws JspException { // Retrieve the action bean and event handler to secure. ActionBean actionBean; if (bean == null) { // Search in page, request, session (if valid) and application scopes, in that order. actionBean = (ActionBean)pageContext.findAttribute(StripesConstants.REQ_ATTR_ACTION_BEAN); LOG.debug("Determining access for the action bean of the form: ", actionBean); } else { // Search in page, request, session (if valid) and application scopes, in that order. actionBean = (ActionBean)pageContext.findAttribute(bean); LOG.debug("Determining access for action bean \"", bean, "\": ", actionBean); } if (actionBean == null) { throw new StripesJspException( "Could not find the action bean. This means that either you specified the name \n" + "of a bean that doesn't exist, or this tag is not used inside a Stripes Form."); } Method handler; try { if (event == null) { handler = StripesFilter.getConfiguration().getActionResolver().getDefaultHandler(actionBean.getClass()); LOG.debug("Found a handler for the default event: ", handler); } else { handler = StripesFilter.getConfiguration().getActionResolver().getHandler(actionBean.getClass(), event); LOG.debug("Found a handler for event \"", event, "\": %s", handler); } } catch (StripesServletException e) { throw new StripesJspException("Failed to get the handler for the event.", e); } // Get the judgement of the security manager. SecurityManager securityManager = (SecurityManager)pageContext.getAttribute( SecurityInterceptor.SECURITY_MANAGER, PageContext.REQUEST_SCOPE); boolean haveSecurityManager = securityManager != null; boolean eventAllowed; if (haveSecurityManager) { LOG.debug("Determining access using this security manager: ", securityManager); eventAllowed = Boolean.TRUE.equals(securityManager.getAccessAllowed(actionBean, handler)); } else { LOG.debug("There is no security manager; allowing access"); eventAllowed = true; } // Show the tag's content (or not) based on this //noinspection deprecation if (haveSecurityManager && negate) { LOG.debug("This tag negates the decision of the security manager."); eventAllowed = !eventAllowed; } LOG.debug("Access is ", eventAllowed ? "allowed" : "denied", '.'); return eventAllowed ? EVAL_BODY_INCLUDE : SKIP_BODY; }
class class_name[name] begin[{] method[doStartTag, return_type[type[int]], modifier[public], parameter[]] begin[{] local_variable[type[ActionBean], actionBean] if[binary_operation[member[.bean], ==, literal[null]]] begin[{] assign[member[.actionBean], Cast(expression=MethodInvocation(arguments=[MemberReference(member=REQ_ATTR_ACTION_BEAN, postfix_operators=[], prefix_operators=[], qualifier=StripesConstants, selectors=[])], member=findAttribute, postfix_operators=[], prefix_operators=[], qualifier=pageContext, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=ActionBean, sub_type=None))] call[LOG.debug, parameter[literal["Determining access for the action bean of the form: "], member[.actionBean]]] else begin[{] assign[member[.actionBean], Cast(expression=MethodInvocation(arguments=[MemberReference(member=bean, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=findAttribute, postfix_operators=[], prefix_operators=[], qualifier=pageContext, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=ActionBean, sub_type=None))] call[LOG.debug, parameter[literal["Determining access for action bean \""], member[.bean], literal["\": "], member[.actionBean]]] end[}] if[binary_operation[member[.actionBean], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not find the action bean. This means that either you specified the name \n"), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="of a bean that doesn't exist, or this tag is not used inside a Stripes Form."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StripesJspException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[Method], handler] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=handler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getConfiguration, postfix_operators=[], prefix_operators=[], qualifier=StripesFilter, selectors=[MethodInvocation(arguments=[], member=getActionResolver, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=actionBean, selectors=[], type_arguments=None), MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getHandler, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Found a handler for event \""), MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\": %s"), MemberReference(member=handler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=handler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getConfiguration, postfix_operators=[], prefix_operators=[], qualifier=StripesFilter, selectors=[MethodInvocation(arguments=[], member=getActionResolver, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=actionBean, selectors=[], type_arguments=None)], member=getDefaultHandler, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Found a handler for the default event: "), MemberReference(member=handler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to get the handler for the event."), 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=StripesJspException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['StripesServletException']))], finally_block=None, label=None, resources=None) local_variable[type[SecurityManager], securityManager] local_variable[type[boolean], haveSecurityManager] local_variable[type[boolean], eventAllowed] if[member[.haveSecurityManager]] begin[{] call[LOG.debug, parameter[literal["Determining access using this security manager: "], member[.securityManager]]] assign[member[.eventAllowed], call[Boolean.TRUE.equals, parameter[call[securityManager.getAccessAllowed, parameter[member[.actionBean], member[.handler]]]]]] else begin[{] call[LOG.debug, parameter[literal["There is no security manager; allowing access"]]] assign[member[.eventAllowed], literal[true]] end[}] if[binary_operation[member[.haveSecurityManager], &&, member[.negate]]] begin[{] call[LOG.debug, parameter[literal["This tag negates the decision of the security manager."]]] assign[member[.eventAllowed], member[.eventAllowed]] else begin[{] None end[}] call[LOG.debug, parameter[literal["Access is "], TernaryExpression(condition=MemberReference(member=eventAllowed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="denied"), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="allowed")), literal['.']]] return[TernaryExpression(condition=MemberReference(member=eventAllowed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=MemberReference(member=SKIP_BODY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=EVAL_BODY_INCLUDE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[doStartTag] operator[SEP] operator[SEP] Keyword[throws] identifier[JspException] { identifier[ActionBean] identifier[actionBean] operator[SEP] Keyword[if] operator[SEP] identifier[bean] operator[==] Other[null] operator[SEP] { identifier[actionBean] operator[=] operator[SEP] identifier[ActionBean] operator[SEP] identifier[pageContext] operator[SEP] identifier[findAttribute] operator[SEP] identifier[StripesConstants] operator[SEP] identifier[REQ_ATTR_ACTION_BEAN] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[actionBean] operator[SEP] operator[SEP] } Keyword[else] { identifier[actionBean] operator[=] operator[SEP] identifier[ActionBean] operator[SEP] identifier[pageContext] operator[SEP] identifier[findAttribute] operator[SEP] identifier[bean] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[bean] , literal[String] , identifier[actionBean] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[actionBean] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[StripesJspException] operator[SEP] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[Method] identifier[handler] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[event] operator[==] Other[null] operator[SEP] { identifier[handler] operator[=] identifier[StripesFilter] operator[SEP] identifier[getConfiguration] operator[SEP] operator[SEP] operator[SEP] identifier[getActionResolver] operator[SEP] operator[SEP] operator[SEP] identifier[getDefaultHandler] operator[SEP] identifier[actionBean] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[handler] operator[SEP] operator[SEP] } Keyword[else] { identifier[handler] operator[=] identifier[StripesFilter] operator[SEP] identifier[getConfiguration] operator[SEP] operator[SEP] operator[SEP] identifier[getActionResolver] operator[SEP] operator[SEP] operator[SEP] identifier[getHandler] operator[SEP] identifier[actionBean] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] , identifier[event] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[event] , literal[String] , identifier[handler] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[StripesServletException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[StripesJspException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } identifier[SecurityManager] identifier[securityManager] operator[=] operator[SEP] identifier[SecurityManager] operator[SEP] identifier[pageContext] operator[SEP] identifier[getAttribute] operator[SEP] identifier[SecurityInterceptor] operator[SEP] identifier[SECURITY_MANAGER] , identifier[PageContext] operator[SEP] identifier[REQUEST_SCOPE] operator[SEP] operator[SEP] Keyword[boolean] identifier[haveSecurityManager] operator[=] identifier[securityManager] operator[!=] Other[null] operator[SEP] Keyword[boolean] identifier[eventAllowed] operator[SEP] Keyword[if] operator[SEP] identifier[haveSecurityManager] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[securityManager] operator[SEP] operator[SEP] identifier[eventAllowed] operator[=] identifier[Boolean] operator[SEP] identifier[TRUE] operator[SEP] identifier[equals] operator[SEP] identifier[securityManager] operator[SEP] identifier[getAccessAllowed] operator[SEP] identifier[actionBean] , identifier[handler] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[eventAllowed] operator[=] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[haveSecurityManager] operator[&&] identifier[negate] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[eventAllowed] operator[=] operator[!] identifier[eventAllowed] operator[SEP] } identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[eventAllowed] operator[?] literal[String] operator[:] literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[eventAllowed] operator[?] identifier[EVAL_BODY_INCLUDE] operator[:] identifier[SKIP_BODY] operator[SEP] }
public LoggerDefinitionVersion withLoggers(Logger... loggers) { if (this.loggers == null) { setLoggers(new java.util.ArrayList<Logger>(loggers.length)); } for (Logger ele : loggers) { this.loggers.add(ele); } return this; }
class class_name[name] begin[{] method[withLoggers, return_type[type[LoggerDefinitionVersion]], modifier[public], parameter[loggers]] begin[{] if[binary_operation[THIS[member[None.loggers]], ==, literal[null]]] begin[{] call[.setLoggers, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=loggers, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Logger, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=loggers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=loggers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ele)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Logger, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[LoggerDefinitionVersion] identifier[withLoggers] operator[SEP] identifier[Logger] operator[...] identifier[loggers] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[loggers] operator[==] Other[null] operator[SEP] { identifier[setLoggers] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[Logger] operator[>] operator[SEP] identifier[loggers] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[Logger] identifier[ele] operator[:] identifier[loggers] operator[SEP] { Keyword[this] operator[SEP] identifier[loggers] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public JSONObject getApiKey(String key, RequestOptions requestOptions) throws AlgoliaException { return client.getRequest("/1/indexes/" + encodedIndexName + "/keys/" + key, false, requestOptions); }
class class_name[name] begin[{] method[getApiKey, return_type[type[JSONObject]], modifier[public], parameter[key, requestOptions]] begin[{] return[call[client.getRequest, parameter[binary_operation[binary_operation[binary_operation[literal["/1/indexes/"], +, member[.encodedIndexName]], +, literal["/keys/"]], +, member[.key]], literal[false], member[.requestOptions]]]] end[}] END[}]
Keyword[public] identifier[JSONObject] identifier[getApiKey] operator[SEP] identifier[String] identifier[key] , identifier[RequestOptions] identifier[requestOptions] operator[SEP] Keyword[throws] identifier[AlgoliaException] { Keyword[return] identifier[client] operator[SEP] identifier[getRequest] operator[SEP] literal[String] operator[+] identifier[encodedIndexName] operator[+] literal[String] operator[+] identifier[key] , literal[boolean] , identifier[requestOptions] operator[SEP] operator[SEP] }
public String getProperty(String strProperty) { String strValue = super.getProperty(strProperty); if (strValue == null) return this.getSharedTable().getProperty(strProperty); return strValue; }
class class_name[name] begin[{] method[getProperty, return_type[type[String]], modifier[public], parameter[strProperty]] begin[{] local_variable[type[String], strValue] if[binary_operation[member[.strValue], ==, literal[null]]] begin[{] return[THIS[call[None.getSharedTable, parameter[]]call[None.getProperty, parameter[member[.strProperty]]]]] else begin[{] None end[}] return[member[.strValue]] end[}] END[}]
Keyword[public] identifier[String] identifier[getProperty] operator[SEP] identifier[String] identifier[strProperty] operator[SEP] { identifier[String] identifier[strValue] operator[=] Keyword[super] operator[SEP] identifier[getProperty] operator[SEP] identifier[strProperty] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[strValue] operator[==] Other[null] operator[SEP] Keyword[return] Keyword[this] operator[SEP] identifier[getSharedTable] operator[SEP] operator[SEP] operator[SEP] identifier[getProperty] operator[SEP] identifier[strProperty] operator[SEP] operator[SEP] Keyword[return] identifier[strValue] operator[SEP] }
public static base_response disable(nitro_service client, servicegroup resource) throws Exception { servicegroup disableresource = new servicegroup(); disableresource.servicegroupname = resource.servicegroupname; disableresource.servername = resource.servername; disableresource.port = resource.port; disableresource.delay = resource.delay; disableresource.graceful = resource.graceful; return disableresource.perform_operation(client,"disable"); }
class class_name[name] begin[{] method[disable, return_type[type[base_response]], modifier[public static], parameter[client, resource]] begin[{] local_variable[type[servicegroup], disableresource] assign[member[disableresource.servicegroupname], member[resource.servicegroupname]] assign[member[disableresource.servername], member[resource.servername]] assign[member[disableresource.port], member[resource.port]] assign[member[disableresource.delay], member[resource.delay]] assign[member[disableresource.graceful], member[resource.graceful]] return[call[disableresource.perform_operation, parameter[member[.client], literal["disable"]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[base_response] identifier[disable] operator[SEP] identifier[nitro_service] identifier[client] , identifier[servicegroup] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] { identifier[servicegroup] identifier[disableresource] operator[=] Keyword[new] identifier[servicegroup] operator[SEP] operator[SEP] operator[SEP] identifier[disableresource] operator[SEP] identifier[servicegroupname] operator[=] identifier[resource] operator[SEP] identifier[servicegroupname] operator[SEP] identifier[disableresource] operator[SEP] identifier[servername] operator[=] identifier[resource] operator[SEP] identifier[servername] operator[SEP] identifier[disableresource] operator[SEP] identifier[port] operator[=] identifier[resource] operator[SEP] identifier[port] operator[SEP] identifier[disableresource] operator[SEP] identifier[delay] operator[=] identifier[resource] operator[SEP] identifier[delay] operator[SEP] identifier[disableresource] operator[SEP] identifier[graceful] operator[=] identifier[resource] operator[SEP] identifier[graceful] operator[SEP] Keyword[return] identifier[disableresource] operator[SEP] identifier[perform_operation] operator[SEP] identifier[client] , literal[String] operator[SEP] operator[SEP] }
public Usage postSubscriptionUsage(final String subscriptionCode, final String addOnCode, final Usage usage) { return doPOST(Subscription.SUBSCRIPTION_RESOURCE + "/" + subscriptionCode + AddOn.ADDONS_RESOURCE + "/" + addOnCode + Usage.USAGE_RESOURCE, usage, Usage.class); }
class class_name[name] begin[{] method[postSubscriptionUsage, return_type[type[Usage]], modifier[public], parameter[subscriptionCode, addOnCode, usage]] begin[{] return[call[.doPOST, parameter[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[member[Subscription.SUBSCRIPTION_RESOURCE], +, literal["/"]], +, member[.subscriptionCode]], +, member[AddOn.ADDONS_RESOURCE]], +, literal["/"]], +, member[.addOnCode]], +, member[Usage.USAGE_RESOURCE]], member[.usage], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Usage, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[Usage] identifier[postSubscriptionUsage] operator[SEP] Keyword[final] identifier[String] identifier[subscriptionCode] , Keyword[final] identifier[String] identifier[addOnCode] , Keyword[final] identifier[Usage] identifier[usage] operator[SEP] { Keyword[return] identifier[doPOST] operator[SEP] identifier[Subscription] operator[SEP] identifier[SUBSCRIPTION_RESOURCE] operator[+] literal[String] operator[+] identifier[subscriptionCode] operator[+] identifier[AddOn] operator[SEP] identifier[ADDONS_RESOURCE] operator[+] literal[String] operator[+] identifier[addOnCode] operator[+] identifier[Usage] operator[SEP] identifier[USAGE_RESOURCE] , identifier[usage] , identifier[Usage] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
@BetaApi public final Operation setNodeTemplateNodeGroup( ProjectZoneNodeGroupName nodeGroup, NodeGroupsSetNodeTemplateRequest nodeGroupsSetNodeTemplateRequestResource) { SetNodeTemplateNodeGroupHttpRequest request = SetNodeTemplateNodeGroupHttpRequest.newBuilder() .setNodeGroup(nodeGroup == null ? null : nodeGroup.toString()) .setNodeGroupsSetNodeTemplateRequestResource(nodeGroupsSetNodeTemplateRequestResource) .build(); return setNodeTemplateNodeGroup(request); }
class class_name[name] begin[{] method[setNodeTemplateNodeGroup, return_type[type[Operation]], modifier[final public], parameter[nodeGroup, nodeGroupsSetNodeTemplateRequestResource]] begin[{] local_variable[type[SetNodeTemplateNodeGroupHttpRequest], request] return[call[.setNodeTemplateNodeGroup, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[BetaApi] Keyword[public] Keyword[final] identifier[Operation] identifier[setNodeTemplateNodeGroup] operator[SEP] identifier[ProjectZoneNodeGroupName] identifier[nodeGroup] , identifier[NodeGroupsSetNodeTemplateRequest] identifier[nodeGroupsSetNodeTemplateRequestResource] operator[SEP] { identifier[SetNodeTemplateNodeGroupHttpRequest] identifier[request] operator[=] identifier[SetNodeTemplateNodeGroupHttpRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setNodeGroup] operator[SEP] identifier[nodeGroup] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[nodeGroup] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setNodeGroupsSetNodeTemplateRequestResource] operator[SEP] identifier[nodeGroupsSetNodeTemplateRequestResource] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[setNodeTemplateNodeGroup] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
static Object getValueFromToken(String pToken) { return ("true".equals(pToken)) ? Boolean.TRUE : Boolean.FALSE; }
class class_name[name] begin[{] method[getValueFromToken, return_type[type[Object]], modifier[static], parameter[pToken]] begin[{] return[TernaryExpression(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="true"), if_false=MemberReference(member=FALSE, postfix_operators=[], prefix_operators=[], qualifier=Boolean, selectors=[]), if_true=MemberReference(member=TRUE, postfix_operators=[], prefix_operators=[], qualifier=Boolean, selectors=[]))] end[}] END[}]
Keyword[static] identifier[Object] identifier[getValueFromToken] operator[SEP] identifier[String] identifier[pToken] operator[SEP] { Keyword[return] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[pToken] operator[SEP] operator[SEP] operator[?] identifier[Boolean] operator[SEP] identifier[TRUE] operator[:] identifier[Boolean] operator[SEP] identifier[FALSE] operator[SEP] }
SPFTrigger getTrigger(long triggerId, String appPackageName) { String where = Contract._ID + " = ? AND " + Contract.COLUMN_APP_IDENTIFIER + " = ?"; String[] whereArgs = { Long.toString(triggerId), appPackageName }; Cursor c = getReadableDatabase().query(Contract.TABLE_NAME, null, where, whereArgs, null, null, null); if (!c.moveToFirst()) { return null; } SPFTrigger t = triggerFromCursor(c); c.close(); return t; }
class class_name[name] begin[{] method[getTrigger, return_type[type[SPFTrigger]], modifier[default], parameter[triggerId, appPackageName]] begin[{] local_variable[type[String], where] local_variable[type[String], whereArgs] local_variable[type[Cursor], c] if[call[c.moveToFirst, parameter[]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[SPFTrigger], t] call[c.close, parameter[]] return[member[.t]] end[}] END[}]
identifier[SPFTrigger] identifier[getTrigger] operator[SEP] Keyword[long] identifier[triggerId] , identifier[String] identifier[appPackageName] operator[SEP] { identifier[String] identifier[where] operator[=] identifier[Contract] operator[SEP] identifier[_ID] operator[+] literal[String] operator[+] identifier[Contract] operator[SEP] identifier[COLUMN_APP_IDENTIFIER] operator[+] literal[String] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[whereArgs] operator[=] { identifier[Long] operator[SEP] identifier[toString] operator[SEP] identifier[triggerId] operator[SEP] , identifier[appPackageName] } operator[SEP] identifier[Cursor] identifier[c] operator[=] identifier[getReadableDatabase] operator[SEP] operator[SEP] operator[SEP] identifier[query] operator[SEP] identifier[Contract] operator[SEP] identifier[TABLE_NAME] , Other[null] , identifier[where] , identifier[whereArgs] , Other[null] , Other[null] , Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[c] operator[SEP] identifier[moveToFirst] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[SPFTrigger] identifier[t] operator[=] identifier[triggerFromCursor] operator[SEP] identifier[c] operator[SEP] operator[SEP] identifier[c] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[t] operator[SEP] }
protected void initSystem() throws SlickException { initGL(); setMusicVolume(1.0f); setSoundVolume(1.0f); graphics = new Graphics(width, height); defaultFont = graphics.getFont(); }
class class_name[name] begin[{] method[initSystem, return_type[void], modifier[protected], parameter[]] begin[{] call[.initGL, parameter[]] call[.setMusicVolume, parameter[literal[1.0f]]] call[.setSoundVolume, parameter[literal[1.0f]]] assign[member[.graphics], ClassCreator(arguments=[MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=height, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Graphics, sub_type=None))] assign[member[.defaultFont], call[graphics.getFont, parameter[]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[initSystem] operator[SEP] operator[SEP] Keyword[throws] identifier[SlickException] { identifier[initGL] operator[SEP] operator[SEP] operator[SEP] identifier[setMusicVolume] operator[SEP] literal[Float] operator[SEP] operator[SEP] identifier[setSoundVolume] operator[SEP] literal[Float] operator[SEP] operator[SEP] identifier[graphics] operator[=] Keyword[new] identifier[Graphics] operator[SEP] identifier[width] , identifier[height] operator[SEP] operator[SEP] identifier[defaultFont] operator[=] identifier[graphics] operator[SEP] identifier[getFont] operator[SEP] operator[SEP] operator[SEP] }
@NotNull public static <T> Comparator<T> thenComparing( @NotNull final Comparator<? super T> c1, @NotNull final Comparator<? super T> c2) { Objects.requireNonNull(c1); Objects.requireNonNull(c2); return new Comparator<T>() { @Override public int compare(T t1, T t2) { final int result = c1.compare(t1, t2); return (result != 0) ? result : c2.compare(t1, t2); } }; }
class class_name[name] begin[{] method[thenComparing, return_type[type[Comparator]], modifier[public static], parameter[c1, c2]] begin[{] call[Objects.requireNonNull, parameter[member[.c1]]] call[Objects.requireNonNull, parameter[member[.c2]]] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=t1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=t2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compare, postfix_operators=[], prefix_operators=[], qualifier=c1, selectors=[], type_arguments=None), name=result)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), ReturnStatement(expression=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), if_false=MethodInvocation(arguments=[MemberReference(member=t1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=t2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compare, postfix_operators=[], prefix_operators=[], qualifier=c2, selectors=[], type_arguments=None), if_true=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)], documentation=None, modifiers={'public'}, name=compare, parameters=[FormalParameter(annotations=[], modifiers=set(), name=t1, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=t2, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None), varargs=False)], return_type=BasicType(dimensions=[], name=int), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=Comparator, sub_type=None))] end[}] END[}]
annotation[@] identifier[NotNull] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Comparator] operator[<] identifier[T] operator[>] identifier[thenComparing] operator[SEP] annotation[@] identifier[NotNull] Keyword[final] identifier[Comparator] operator[<] operator[?] Keyword[super] identifier[T] operator[>] identifier[c1] , annotation[@] identifier[NotNull] Keyword[final] identifier[Comparator] operator[<] operator[?] Keyword[super] identifier[T] operator[>] identifier[c2] operator[SEP] { identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[c1] operator[SEP] operator[SEP] identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[c2] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[Comparator] operator[<] identifier[T] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[compare] operator[SEP] identifier[T] identifier[t1] , identifier[T] identifier[t2] operator[SEP] { Keyword[final] Keyword[int] identifier[result] operator[=] identifier[c1] operator[SEP] identifier[compare] operator[SEP] identifier[t1] , identifier[t2] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[result] operator[!=] Other[0] operator[SEP] operator[?] identifier[result] operator[:] identifier[c2] operator[SEP] identifier[compare] operator[SEP] identifier[t1] , identifier[t2] operator[SEP] operator[SEP] } } operator[SEP] }
private void startAsyncValidation() { CmsRpcAction<Map<String, CmsValidationResult>> action = new CmsRpcAction<Map<String, CmsValidationResult>>() { /** * @see org.opencms.gwt.client.rpc.CmsRpcAction#execute() */ @Override public void execute() { start(0, false); CmsCoreProvider.getService().validate(m_validationQueries, this); } @Override public void onFailure(Throwable e) { super.onFailure(e); CmsValidationScheduler.get().executeNext(); } /** * @see org.opencms.gwt.client.rpc.CmsRpcAction#onResponse(java.lang.Object) */ @Override protected void onResponse(Map<String, CmsValidationResult> result) { stop(false); onReceiveValidationResults(result); } }; action.execute(); }
class class_name[name] begin[{] method[startAsyncValidation, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[CmsRpcAction], action] call[action.execute, parameter[]] end[}] END[}]
Keyword[private] Keyword[void] identifier[startAsyncValidation] operator[SEP] operator[SEP] { identifier[CmsRpcAction] operator[<] identifier[Map] operator[<] identifier[String] , identifier[CmsValidationResult] operator[>] operator[>] identifier[action] operator[=] Keyword[new] identifier[CmsRpcAction] operator[<] identifier[Map] operator[<] identifier[String] , identifier[CmsValidationResult] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[execute] operator[SEP] operator[SEP] { identifier[start] operator[SEP] Other[0] , literal[boolean] operator[SEP] operator[SEP] identifier[CmsCoreProvider] operator[SEP] identifier[getService] operator[SEP] operator[SEP] operator[SEP] identifier[validate] operator[SEP] identifier[m_validationQueries] , Keyword[this] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onFailure] operator[SEP] identifier[Throwable] identifier[e] operator[SEP] { Keyword[super] operator[SEP] identifier[onFailure] operator[SEP] identifier[e] operator[SEP] operator[SEP] identifier[CmsValidationScheduler] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[executeNext] operator[SEP] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[onResponse] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[CmsValidationResult] operator[>] identifier[result] operator[SEP] { identifier[stop] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[onReceiveValidationResults] operator[SEP] identifier[result] operator[SEP] operator[SEP] } } operator[SEP] identifier[action] operator[SEP] identifier[execute] operator[SEP] operator[SEP] operator[SEP] }
private void parseGlobalAttributes(DAS das, DodsV root, DODSNetcdfFile dodsfile) { List<DODSAttribute> atts = root.attributes; for (ucar.nc2.Attribute ncatt : atts) { rootGroup.addAttribute(ncatt); } // loop over attribute tables, collect global attributes Enumeration tableNames = das.getNames(); while (tableNames.hasMoreElements()) { String tableName = (String) tableNames.nextElement(); AttributeTable attTable = das.getAttributeTableN(tableName); if (attTable == null) continue; // should probably never happen /* if (tableName.equals("NC_GLOBAL") || tableName.equals("HDF_GLOBAL")) { java.util.Enumeration attNames = attTable.getNames(); while (attNames.hasMoreElements()) { String attName = (String) attNames.nextElement(); dods.dap.Attribute att = attTable.getAttribute(attName); DODSAttribute ncatt = new DODSAttribute( attName, att); addAttribute( null, ncatt); } } else */ if (tableName.equals("DODS_EXTRA")) { Enumeration attNames = attTable.getNames(); while (attNames.hasMoreElements()) { String attName = (String) attNames.nextElement(); if (attName.equals("Unlimited_Dimension")) { opendap.dap.Attribute att = attTable.getAttribute(attName); DODSAttribute ncatt = new DODSAttribute(attName, att); setUnlimited(ncatt.getStringValue()); } else logger.warn(" Unknown DODS_EXTRA attribute = " + attName + " " + location); } } else if (tableName.equals("EXTRA_DIMENSION")) { Enumeration attNames = attTable.getNames(); while (attNames.hasMoreElements()) { String attName = (String) attNames.nextElement(); opendap.dap.Attribute att = attTable.getAttribute(attName); DODSAttribute ncatt = new DODSAttribute(attName, att); int length = ncatt.getNumericValue().intValue(); Dimension extraDim = new Dimension(attName, length); addDimension(null, extraDim); } } /* else if (null == root.findDodsV( tableName, false)) { addAttributes(attTable.getName(), attTable); } */ } }
class class_name[name] begin[{] method[parseGlobalAttributes, return_type[void], modifier[private], parameter[das, root, dodsfile]] begin[{] local_variable[type[List], atts] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ncatt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addAttribute, postfix_operators=[], prefix_operators=[], qualifier=rootGroup, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=atts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ncatt)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ucar, sub_type=ReferenceType(arguments=None, dimensions=None, name=nc2, sub_type=ReferenceType(arguments=None, dimensions=None, name=Attribute, sub_type=None))))), label=None) local_variable[type[Enumeration], tableNames] while[call[tableNames.hasMoreElements, parameter[]]] begin[{] local_variable[type[String], tableName] local_variable[type[AttributeTable], attTable] if[binary_operation[member[.attTable], ==, literal[null]]] begin[{] ContinueStatement(goto=None, label=None) else begin[{] None end[}] if[call[tableName.equals, parameter[literal["DODS_EXTRA"]]]] begin[{] local_variable[type[Enumeration], attNames] while[call[attNames.hasMoreElements, parameter[]]] begin[{] local_variable[type[String], attName] if[call[attName.equals, parameter[literal["Unlimited_Dimension"]]]] begin[{] local_variable[type[opendap], att] local_variable[type[DODSAttribute], ncatt] call[.setUnlimited, parameter[call[ncatt.getStringValue, parameter[]]]] else begin[{] call[logger.warn, parameter[binary_operation[binary_operation[binary_operation[literal[" Unknown DODS_EXTRA attribute = "], +, member[.attName]], +, literal[" "]], +, member[.location]]]] end[}] end[}] else begin[{] if[call[tableName.equals, parameter[literal["EXTRA_DIMENSION"]]]] begin[{] local_variable[type[Enumeration], attNames] while[call[attNames.hasMoreElements, parameter[]]] begin[{] local_variable[type[String], attName] local_variable[type[opendap], att] local_variable[type[DODSAttribute], ncatt] local_variable[type[int], length] local_variable[type[Dimension], extraDim] call[.addDimension, parameter[literal[null], member[.extraDim]]] end[}] else begin[{] None end[}] end[}] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[parseGlobalAttributes] operator[SEP] identifier[DAS] identifier[das] , identifier[DodsV] identifier[root] , identifier[DODSNetcdfFile] identifier[dodsfile] operator[SEP] { identifier[List] operator[<] identifier[DODSAttribute] operator[>] identifier[atts] operator[=] identifier[root] operator[SEP] identifier[attributes] operator[SEP] Keyword[for] operator[SEP] identifier[ucar] operator[SEP] identifier[nc2] operator[SEP] identifier[Attribute] identifier[ncatt] operator[:] identifier[atts] operator[SEP] { identifier[rootGroup] operator[SEP] identifier[addAttribute] operator[SEP] identifier[ncatt] operator[SEP] operator[SEP] } identifier[Enumeration] identifier[tableNames] operator[=] identifier[das] operator[SEP] identifier[getNames] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[tableNames] operator[SEP] identifier[hasMoreElements] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[tableName] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[tableNames] operator[SEP] identifier[nextElement] operator[SEP] operator[SEP] operator[SEP] identifier[AttributeTable] identifier[attTable] operator[=] identifier[das] operator[SEP] identifier[getAttributeTableN] operator[SEP] identifier[tableName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[attTable] operator[==] Other[null] operator[SEP] Keyword[continue] operator[SEP] Keyword[if] operator[SEP] identifier[tableName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[Enumeration] identifier[attNames] operator[=] identifier[attTable] operator[SEP] identifier[getNames] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[attNames] operator[SEP] identifier[hasMoreElements] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[attName] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[attNames] operator[SEP] identifier[nextElement] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[attName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[opendap] operator[SEP] identifier[dap] operator[SEP] identifier[Attribute] identifier[att] operator[=] identifier[attTable] operator[SEP] identifier[getAttribute] operator[SEP] identifier[attName] operator[SEP] operator[SEP] identifier[DODSAttribute] identifier[ncatt] operator[=] Keyword[new] identifier[DODSAttribute] operator[SEP] identifier[attName] , identifier[att] operator[SEP] operator[SEP] identifier[setUnlimited] operator[SEP] identifier[ncatt] operator[SEP] identifier[getStringValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[attName] operator[+] literal[String] operator[+] identifier[location] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[tableName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[Enumeration] identifier[attNames] operator[=] identifier[attTable] operator[SEP] identifier[getNames] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[attNames] operator[SEP] identifier[hasMoreElements] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[attName] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[attNames] operator[SEP] identifier[nextElement] operator[SEP] operator[SEP] operator[SEP] identifier[opendap] operator[SEP] identifier[dap] operator[SEP] identifier[Attribute] identifier[att] operator[=] identifier[attTable] operator[SEP] identifier[getAttribute] operator[SEP] identifier[attName] operator[SEP] operator[SEP] identifier[DODSAttribute] identifier[ncatt] operator[=] Keyword[new] identifier[DODSAttribute] operator[SEP] identifier[attName] , identifier[att] operator[SEP] operator[SEP] Keyword[int] identifier[length] operator[=] identifier[ncatt] operator[SEP] identifier[getNumericValue] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] identifier[Dimension] identifier[extraDim] operator[=] Keyword[new] identifier[Dimension] operator[SEP] identifier[attName] , identifier[length] operator[SEP] operator[SEP] identifier[addDimension] operator[SEP] Other[null] , identifier[extraDim] operator[SEP] operator[SEP] } } } }
@Override public void mTokens() throws RecognitionException { // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:8: ( WS | FLOAT | HEX | DECIMAL | STRING | TIME_INTERVAL | BOOL | NULL | AT | PLUS_ASSIGN | MINUS_ASSIGN | MULT_ASSIGN | DIV_ASSIGN | AND_ASSIGN | OR_ASSIGN | XOR_ASSIGN | MOD_ASSIGN | UNIFY | DECR | INCR | ARROW | SEMICOLON | COLON | EQUALS | NOT_EQUALS | GREATER_EQUALS | LESS_EQUALS | GREATER | LESS | EQUALS_ASSIGN | LEFT_PAREN | RIGHT_PAREN | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | COMMA | DOT | NULL_SAFE_DOT | DOUBLE_AMPER | DOUBLE_PIPE | QUESTION | NEGATION | TILDE | PIPE | AMPER | XOR | MOD | STAR | MINUS | PLUS | HASH | C_STYLE_SINGLE_LINE_COMMENT | MULTI_LINE_COMMENT | ID | DIV | MISC ) int alt63=57; alt63 = dfa63.predict(input); switch (alt63) { case 1 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:10: WS { mWS(); if (state.failed) return; } break; case 2 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:13: FLOAT { mFLOAT(); if (state.failed) return; } break; case 3 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:19: HEX { mHEX(); if (state.failed) return; } break; case 4 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:23: DECIMAL { mDECIMAL(); if (state.failed) return; } break; case 5 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:31: STRING { mSTRING(); if (state.failed) return; } break; case 6 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:38: TIME_INTERVAL { mTIME_INTERVAL(); if (state.failed) return; } break; case 7 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:52: BOOL { mBOOL(); if (state.failed) return; } break; case 8 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:57: NULL { mNULL(); if (state.failed) return; } break; case 9 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:62: AT { mAT(); if (state.failed) return; } break; case 10 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:65: PLUS_ASSIGN { mPLUS_ASSIGN(); if (state.failed) return; } break; case 11 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:77: MINUS_ASSIGN { mMINUS_ASSIGN(); if (state.failed) return; } break; case 12 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:90: MULT_ASSIGN { mMULT_ASSIGN(); if (state.failed) return; } break; case 13 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:102: DIV_ASSIGN { mDIV_ASSIGN(); if (state.failed) return; } break; case 14 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:113: AND_ASSIGN { mAND_ASSIGN(); if (state.failed) return; } break; case 15 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:124: OR_ASSIGN { mOR_ASSIGN(); if (state.failed) return; } break; case 16 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:134: XOR_ASSIGN { mXOR_ASSIGN(); if (state.failed) return; } break; case 17 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:145: MOD_ASSIGN { mMOD_ASSIGN(); if (state.failed) return; } break; case 18 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:156: UNIFY { mUNIFY(); if (state.failed) return; } break; case 19 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:162: DECR { mDECR(); if (state.failed) return; } break; case 20 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:167: INCR { mINCR(); if (state.failed) return; } break; case 21 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:172: ARROW { mARROW(); if (state.failed) return; } break; case 22 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:178: SEMICOLON { mSEMICOLON(); if (state.failed) return; } break; case 23 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:188: COLON { mCOLON(); if (state.failed) return; } break; case 24 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:194: EQUALS { mEQUALS(); if (state.failed) return; } break; case 25 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:201: NOT_EQUALS { mNOT_EQUALS(); if (state.failed) return; } break; case 26 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:212: GREATER_EQUALS { mGREATER_EQUALS(); if (state.failed) return; } break; case 27 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:227: LESS_EQUALS { mLESS_EQUALS(); if (state.failed) return; } break; case 28 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:239: GREATER { mGREATER(); if (state.failed) return; } break; case 29 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:247: LESS { mLESS(); if (state.failed) return; } break; case 30 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:252: EQUALS_ASSIGN { mEQUALS_ASSIGN(); if (state.failed) return; } break; case 31 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:266: LEFT_PAREN { mLEFT_PAREN(); if (state.failed) return; } break; case 32 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:277: RIGHT_PAREN { mRIGHT_PAREN(); if (state.failed) return; } break; case 33 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:289: LEFT_SQUARE { mLEFT_SQUARE(); if (state.failed) return; } break; case 34 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:301: RIGHT_SQUARE { mRIGHT_SQUARE(); if (state.failed) return; } break; case 35 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:314: LEFT_CURLY { mLEFT_CURLY(); if (state.failed) return; } break; case 36 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:325: RIGHT_CURLY { mRIGHT_CURLY(); if (state.failed) return; } break; case 37 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:337: COMMA { mCOMMA(); if (state.failed) return; } break; case 38 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:343: DOT { mDOT(); if (state.failed) return; } break; case 39 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:347: NULL_SAFE_DOT { mNULL_SAFE_DOT(); if (state.failed) return; } break; case 40 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:361: DOUBLE_AMPER { mDOUBLE_AMPER(); if (state.failed) return; } break; case 41 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:374: DOUBLE_PIPE { mDOUBLE_PIPE(); if (state.failed) return; } break; case 42 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:386: QUESTION { mQUESTION(); if (state.failed) return; } break; case 43 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:395: NEGATION { mNEGATION(); if (state.failed) return; } break; case 44 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:404: TILDE { mTILDE(); if (state.failed) return; } break; case 45 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:410: PIPE { mPIPE(); if (state.failed) return; } break; case 46 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:415: AMPER { mAMPER(); if (state.failed) return; } break; case 47 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:421: XOR { mXOR(); if (state.failed) return; } break; case 48 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:425: MOD { mMOD(); if (state.failed) return; } break; case 49 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:429: STAR { mSTAR(); if (state.failed) return; } break; case 50 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:434: MINUS { mMINUS(); if (state.failed) return; } break; case 51 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:440: PLUS { mPLUS(); if (state.failed) return; } break; case 52 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:445: HASH { mHASH(); if (state.failed) return; } break; case 53 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:450: C_STYLE_SINGLE_LINE_COMMENT { mC_STYLE_SINGLE_LINE_COMMENT(); if (state.failed) return; } break; case 54 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:478: MULTI_LINE_COMMENT { mMULTI_LINE_COMMENT(); if (state.failed) return; } break; case 55 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:497: ID { mID(); if (state.failed) return; } break; case 56 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:500: DIV { mDIV(); if (state.failed) return; } break; case 57 : // src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:1:504: MISC { mMISC(); if (state.failed) return; } break; } }
class class_name[name] begin[{] method[mTokens, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[int], alt63] assign[member[.alt63], call[dfa63.predict, parameter[member[.input]]]] SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mWS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mFLOAT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mHEX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mDECIMAL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mSTRING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mTIME_INTERVAL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=7)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mBOOL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mNULL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=9)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mAT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mPLUS_ASSIGN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=11)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mMINUS_ASSIGN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=12)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mMULT_ASSIGN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=13)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mDIV_ASSIGN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=14)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mAND_ASSIGN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=15)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mOR_ASSIGN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mXOR_ASSIGN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=17)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mMOD_ASSIGN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=18)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mUNIFY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=19)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mDECR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=20)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mINCR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=21)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mARROW, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=22)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mSEMICOLON, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=23)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mCOLON, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=24)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mEQUALS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=25)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mNOT_EQUALS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=26)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mGREATER_EQUALS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=27)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mLESS_EQUALS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=28)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mGREATER, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=29)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mLESS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=30)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mEQUALS_ASSIGN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=31)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mLEFT_PAREN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mRIGHT_PAREN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=33)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mLEFT_SQUARE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=34)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mRIGHT_SQUARE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=35)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mLEFT_CURLY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=36)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mRIGHT_CURLY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=37)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mCOMMA, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=38)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mDOT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=39)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mNULL_SAFE_DOT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=40)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mDOUBLE_AMPER, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=41)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mDOUBLE_PIPE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=42)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mQUESTION, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=43)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mNEGATION, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=44)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mTILDE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=45)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mPIPE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=46)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mAMPER, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=47)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mXOR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=48)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mMOD, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=49)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mSTAR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=50)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mMINUS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=51)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mPLUS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=52)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mHASH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=53)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mC_STYLE_SINGLE_LINE_COMMENT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=54)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mMULTI_LINE_COMMENT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=55)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=56)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mDIV, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=57)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mMISC, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=alt63, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[mTokens] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { Keyword[int] identifier[alt63] operator[=] Other[57] operator[SEP] identifier[alt63] operator[=] identifier[dfa63] operator[SEP] identifier[predict] operator[SEP] identifier[input] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[alt63] operator[SEP] { Keyword[case] Other[1] operator[:] { identifier[mWS] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[2] operator[:] { identifier[mFLOAT] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[3] operator[:] { identifier[mHEX] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[4] operator[:] { identifier[mDECIMAL] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[5] operator[:] { identifier[mSTRING] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[6] operator[:] { identifier[mTIME_INTERVAL] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[7] operator[:] { identifier[mBOOL] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[8] operator[:] { identifier[mNULL] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[9] operator[:] { identifier[mAT] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[10] operator[:] { identifier[mPLUS_ASSIGN] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[11] operator[:] { identifier[mMINUS_ASSIGN] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[12] operator[:] { identifier[mMULT_ASSIGN] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[13] operator[:] { identifier[mDIV_ASSIGN] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[14] operator[:] { identifier[mAND_ASSIGN] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[15] operator[:] { identifier[mOR_ASSIGN] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[16] operator[:] { identifier[mXOR_ASSIGN] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[17] operator[:] { identifier[mMOD_ASSIGN] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[18] operator[:] { identifier[mUNIFY] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[19] operator[:] { identifier[mDECR] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[20] operator[:] { identifier[mINCR] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[21] operator[:] { identifier[mARROW] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[22] operator[:] { identifier[mSEMICOLON] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[23] operator[:] { identifier[mCOLON] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[24] operator[:] { identifier[mEQUALS] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[25] operator[:] { identifier[mNOT_EQUALS] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[26] operator[:] { identifier[mGREATER_EQUALS] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[27] operator[:] { identifier[mLESS_EQUALS] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[28] operator[:] { identifier[mGREATER] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[29] operator[:] { identifier[mLESS] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[30] operator[:] { identifier[mEQUALS_ASSIGN] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[31] operator[:] { identifier[mLEFT_PAREN] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[32] operator[:] { identifier[mRIGHT_PAREN] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[33] operator[:] { identifier[mLEFT_SQUARE] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[34] operator[:] { identifier[mRIGHT_SQUARE] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[35] operator[:] { identifier[mLEFT_CURLY] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[36] operator[:] { identifier[mRIGHT_CURLY] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[37] operator[:] { identifier[mCOMMA] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[38] operator[:] { identifier[mDOT] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[39] operator[:] { identifier[mNULL_SAFE_DOT] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[40] operator[:] { identifier[mDOUBLE_AMPER] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[41] operator[:] { identifier[mDOUBLE_PIPE] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[42] operator[:] { identifier[mQUESTION] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[43] operator[:] { identifier[mNEGATION] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[44] operator[:] { identifier[mTILDE] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[45] operator[:] { identifier[mPIPE] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[46] operator[:] { identifier[mAMPER] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[47] operator[:] { identifier[mXOR] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[48] operator[:] { identifier[mMOD] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[49] operator[:] { identifier[mSTAR] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[50] operator[:] { identifier[mMINUS] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[51] operator[:] { identifier[mPLUS] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[52] operator[:] { identifier[mHASH] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[53] operator[:] { identifier[mC_STYLE_SINGLE_LINE_COMMENT] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[54] operator[:] { identifier[mMULTI_LINE_COMMENT] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[55] operator[:] { identifier[mID] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[56] operator[:] { identifier[mDIV] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[57] operator[:] { identifier[mMISC] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[break] operator[SEP] } }
@Deprecated public <T extends Client<I, O>, R extends Client<I, O>, I extends Request, O extends Response> ClientDecorationBuilder add(Class<I> requestType, Class<O> responseType, Function<T, R> decorator) { return add0(requestType, responseType, decorator); }
class class_name[name] begin[{] method[add, return_type[type[ClientDecorationBuilder]], modifier[public], parameter[requestType, responseType, decorator]] begin[{] return[call[.add0, parameter[member[.requestType], member[.responseType], member[.decorator]]]] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[Client] operator[<] identifier[I] , identifier[O] operator[>] , identifier[R] Keyword[extends] identifier[Client] operator[<] identifier[I] , identifier[O] operator[>] , identifier[I] Keyword[extends] identifier[Request] , identifier[O] Keyword[extends] identifier[Response] operator[>] identifier[ClientDecorationBuilder] identifier[add] operator[SEP] identifier[Class] operator[<] identifier[I] operator[>] identifier[requestType] , identifier[Class] operator[<] identifier[O] operator[>] identifier[responseType] , identifier[Function] operator[<] identifier[T] , identifier[R] operator[>] identifier[decorator] operator[SEP] { Keyword[return] identifier[add0] operator[SEP] identifier[requestType] , identifier[responseType] , identifier[decorator] operator[SEP] operator[SEP] }
protected void publishResourceEvent( IPortletWindow portletWindow, HttpServletRequest httpServletRequest, long executionTime, boolean usedBrowserCache, boolean usedPortalCache) { final IPortletWindowId portletWindowId = portletWindow.getPortletWindowId(); this.portalEventFactory.publishPortletResourceExecutionEvent( httpServletRequest, this, portletWindowId, executionTime, usedBrowserCache, usedPortalCache); }
class class_name[name] begin[{] method[publishResourceEvent, return_type[void], modifier[protected], parameter[portletWindow, httpServletRequest, executionTime, usedBrowserCache, usedPortalCache]] begin[{] local_variable[type[IPortletWindowId], portletWindowId] THIS[member[None.portalEventFactory]call[None.publishPortletResourceExecutionEvent, parameter[member[.httpServletRequest], THIS[], member[.portletWindowId], member[.executionTime], member[.usedBrowserCache], member[.usedPortalCache]]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[publishResourceEvent] operator[SEP] identifier[IPortletWindow] identifier[portletWindow] , identifier[HttpServletRequest] identifier[httpServletRequest] , Keyword[long] identifier[executionTime] , Keyword[boolean] identifier[usedBrowserCache] , Keyword[boolean] identifier[usedPortalCache] operator[SEP] { Keyword[final] identifier[IPortletWindowId] identifier[portletWindowId] operator[=] identifier[portletWindow] operator[SEP] identifier[getPortletWindowId] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[portalEventFactory] operator[SEP] identifier[publishPortletResourceExecutionEvent] operator[SEP] identifier[httpServletRequest] , Keyword[this] , identifier[portletWindowId] , identifier[executionTime] , identifier[usedBrowserCache] , identifier[usedPortalCache] operator[SEP] operator[SEP] }
public void marshall(CreateServerRequest createServerRequest, ProtocolMarshaller protocolMarshaller) { if (createServerRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(createServerRequest.getAssociatePublicIpAddress(), ASSOCIATEPUBLICIPADDRESS_BINDING); protocolMarshaller.marshall(createServerRequest.getDisableAutomatedBackup(), DISABLEAUTOMATEDBACKUP_BINDING); protocolMarshaller.marshall(createServerRequest.getEngine(), ENGINE_BINDING); protocolMarshaller.marshall(createServerRequest.getEngineModel(), ENGINEMODEL_BINDING); protocolMarshaller.marshall(createServerRequest.getEngineVersion(), ENGINEVERSION_BINDING); protocolMarshaller.marshall(createServerRequest.getEngineAttributes(), ENGINEATTRIBUTES_BINDING); protocolMarshaller.marshall(createServerRequest.getBackupRetentionCount(), BACKUPRETENTIONCOUNT_BINDING); protocolMarshaller.marshall(createServerRequest.getServerName(), SERVERNAME_BINDING); protocolMarshaller.marshall(createServerRequest.getInstanceProfileArn(), INSTANCEPROFILEARN_BINDING); protocolMarshaller.marshall(createServerRequest.getInstanceType(), INSTANCETYPE_BINDING); protocolMarshaller.marshall(createServerRequest.getKeyPair(), KEYPAIR_BINDING); protocolMarshaller.marshall(createServerRequest.getPreferredMaintenanceWindow(), PREFERREDMAINTENANCEWINDOW_BINDING); protocolMarshaller.marshall(createServerRequest.getPreferredBackupWindow(), PREFERREDBACKUPWINDOW_BINDING); protocolMarshaller.marshall(createServerRequest.getSecurityGroupIds(), SECURITYGROUPIDS_BINDING); protocolMarshaller.marshall(createServerRequest.getServiceRoleArn(), SERVICEROLEARN_BINDING); protocolMarshaller.marshall(createServerRequest.getSubnetIds(), SUBNETIDS_BINDING); protocolMarshaller.marshall(createServerRequest.getBackupId(), BACKUPID_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[createServerRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.createServerRequest], ==, 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=getAssociatePublicIpAddress, postfix_operators=[], prefix_operators=[], qualifier=createServerRequest, selectors=[], type_arguments=None), MemberReference(member=ASSOCIATEPUBLICIPADDRESS_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=getDisableAutomatedBackup, postfix_operators=[], prefix_operators=[], qualifier=createServerRequest, selectors=[], type_arguments=None), MemberReference(member=DISABLEAUTOMATEDBACKUP_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=getEngine, postfix_operators=[], prefix_operators=[], qualifier=createServerRequest, selectors=[], type_arguments=None), MemberReference(member=ENGINE_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=getEngineModel, postfix_operators=[], prefix_operators=[], qualifier=createServerRequest, selectors=[], type_arguments=None), MemberReference(member=ENGINEMODEL_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=getEngineVersion, postfix_operators=[], prefix_operators=[], qualifier=createServerRequest, selectors=[], type_arguments=None), MemberReference(member=ENGINEVERSION_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=getEngineAttributes, postfix_operators=[], prefix_operators=[], qualifier=createServerRequest, selectors=[], type_arguments=None), MemberReference(member=ENGINEATTRIBUTES_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=getBackupRetentionCount, postfix_operators=[], prefix_operators=[], qualifier=createServerRequest, selectors=[], type_arguments=None), MemberReference(member=BACKUPRETENTIONCOUNT_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=getServerName, postfix_operators=[], prefix_operators=[], qualifier=createServerRequest, selectors=[], type_arguments=None), MemberReference(member=SERVERNAME_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=getInstanceProfileArn, postfix_operators=[], prefix_operators=[], qualifier=createServerRequest, selectors=[], type_arguments=None), MemberReference(member=INSTANCEPROFILEARN_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=getInstanceType, postfix_operators=[], prefix_operators=[], qualifier=createServerRequest, selectors=[], type_arguments=None), MemberReference(member=INSTANCETYPE_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=getKeyPair, postfix_operators=[], prefix_operators=[], qualifier=createServerRequest, selectors=[], type_arguments=None), MemberReference(member=KEYPAIR_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=getPreferredMaintenanceWindow, postfix_operators=[], prefix_operators=[], qualifier=createServerRequest, selectors=[], type_arguments=None), MemberReference(member=PREFERREDMAINTENANCEWINDOW_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=getPreferredBackupWindow, postfix_operators=[], prefix_operators=[], qualifier=createServerRequest, selectors=[], type_arguments=None), MemberReference(member=PREFERREDBACKUPWINDOW_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=getSecurityGroupIds, postfix_operators=[], prefix_operators=[], qualifier=createServerRequest, selectors=[], type_arguments=None), MemberReference(member=SECURITYGROUPIDS_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=getServiceRoleArn, postfix_operators=[], prefix_operators=[], qualifier=createServerRequest, selectors=[], type_arguments=None), MemberReference(member=SERVICEROLEARN_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=getSubnetIds, postfix_operators=[], prefix_operators=[], qualifier=createServerRequest, selectors=[], type_arguments=None), MemberReference(member=SUBNETIDS_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=getBackupId, postfix_operators=[], prefix_operators=[], qualifier=createServerRequest, selectors=[], type_arguments=None), MemberReference(member=BACKUPID_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[CreateServerRequest] identifier[createServerRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[createServerRequest] 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[createServerRequest] operator[SEP] identifier[getAssociatePublicIpAddress] operator[SEP] operator[SEP] , identifier[ASSOCIATEPUBLICIPADDRESS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createServerRequest] operator[SEP] identifier[getDisableAutomatedBackup] operator[SEP] operator[SEP] , identifier[DISABLEAUTOMATEDBACKUP_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createServerRequest] operator[SEP] identifier[getEngine] operator[SEP] operator[SEP] , identifier[ENGINE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createServerRequest] operator[SEP] identifier[getEngineModel] operator[SEP] operator[SEP] , identifier[ENGINEMODEL_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createServerRequest] operator[SEP] identifier[getEngineVersion] operator[SEP] operator[SEP] , identifier[ENGINEVERSION_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createServerRequest] operator[SEP] identifier[getEngineAttributes] operator[SEP] operator[SEP] , identifier[ENGINEATTRIBUTES_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createServerRequest] operator[SEP] identifier[getBackupRetentionCount] operator[SEP] operator[SEP] , identifier[BACKUPRETENTIONCOUNT_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createServerRequest] operator[SEP] identifier[getServerName] operator[SEP] operator[SEP] , identifier[SERVERNAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createServerRequest] operator[SEP] identifier[getInstanceProfileArn] operator[SEP] operator[SEP] , identifier[INSTANCEPROFILEARN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createServerRequest] operator[SEP] identifier[getInstanceType] operator[SEP] operator[SEP] , identifier[INSTANCETYPE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createServerRequest] operator[SEP] identifier[getKeyPair] operator[SEP] operator[SEP] , identifier[KEYPAIR_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createServerRequest] operator[SEP] identifier[getPreferredMaintenanceWindow] operator[SEP] operator[SEP] , identifier[PREFERREDMAINTENANCEWINDOW_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createServerRequest] operator[SEP] identifier[getPreferredBackupWindow] operator[SEP] operator[SEP] , identifier[PREFERREDBACKUPWINDOW_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createServerRequest] operator[SEP] identifier[getSecurityGroupIds] operator[SEP] operator[SEP] , identifier[SECURITYGROUPIDS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createServerRequest] operator[SEP] identifier[getServiceRoleArn] operator[SEP] operator[SEP] , identifier[SERVICEROLEARN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createServerRequest] operator[SEP] identifier[getSubnetIds] operator[SEP] operator[SEP] , identifier[SUBNETIDS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createServerRequest] operator[SEP] identifier[getBackupId] operator[SEP] operator[SEP] , identifier[BACKUPID_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 assertNotEmpty(@Nullable Description description, @Nullable String actual) { assertNotNull(description, actual); if (actual.isEmpty()) { throw failures.failure(description, shouldNotBeEmpty()); } }
class class_name[name] begin[{] method[assertNotEmpty, return_type[void], modifier[public], parameter[description, actual]] begin[{] call[.assertNotNull, parameter[member[.description], member[.actual]]] if[call[actual.isEmpty, parameter[]]] begin[{] ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=description, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=shouldNotBeEmpty, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=failure, postfix_operators=[], prefix_operators=[], qualifier=failures, selectors=[], type_arguments=None), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[assertNotEmpty] operator[SEP] annotation[@] identifier[Nullable] identifier[Description] identifier[description] , annotation[@] identifier[Nullable] identifier[String] identifier[actual] operator[SEP] { identifier[assertNotNull] operator[SEP] identifier[description] , identifier[actual] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[actual] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] identifier[failures] operator[SEP] identifier[failure] operator[SEP] identifier[description] , identifier[shouldNotBeEmpty] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
void deleteProjectDirsIfNecessary(final long newProjectSizeInBytes) { final long projectCacheMaxSizeInByte = (long) (this.projectCacheDir.getTotalSpace() * this.percentageOfDisk); final long start = System.currentTimeMillis(); final List<ProjectDirectoryMetadata> allProjects = loadAllProjects(); log.info("Loading {} project dirs metadata completed in {} sec(s)", allProjects.size(), (System.currentTimeMillis() - start) / 1000); final long currentSpaceInBytes = getProjectDirsTotalSizeInBytes(allProjects); if (currentSpaceInBytes + newProjectSizeInBytes >= projectCacheMaxSizeInByte) { log.info( "Project cache usage[{} MB] >= cache limit[{} MB], start cleaning up project dirs", (currentSpaceInBytes + newProjectSizeInBytes) / (1024 * 1024), projectCacheMaxSizeInByte / (1024 * 1024)); final long freeCacheSpaceInBytes = projectCacheMaxSizeInByte - currentSpaceInBytes; deleteLeastRecentlyUsedProjects(newProjectSizeInBytes - freeCacheSpaceInBytes, allProjects); } }
class class_name[name] begin[{] method[deleteProjectDirsIfNecessary, return_type[void], modifier[default], parameter[newProjectSizeInBytes]] begin[{] local_variable[type[long], projectCacheMaxSizeInByte] local_variable[type[long], start] local_variable[type[List], allProjects] call[log.info, parameter[literal["Loading {} project dirs metadata completed in {} sec(s)"], call[allProjects.size, parameter[]], binary_operation[binary_operation[call[System.currentTimeMillis, parameter[]], -, member[.start]], /, literal[1000]]]] local_variable[type[long], currentSpaceInBytes] if[binary_operation[binary_operation[member[.currentSpaceInBytes], +, member[.newProjectSizeInBytes]], >=, member[.projectCacheMaxSizeInByte]]] begin[{] call[log.info, parameter[literal["Project cache usage[{} MB] >= cache limit[{} MB], start cleaning up project dirs"], binary_operation[binary_operation[member[.currentSpaceInBytes], +, member[.newProjectSizeInBytes]], /, binary_operation[literal[1024], *, literal[1024]]], binary_operation[member[.projectCacheMaxSizeInByte], /, binary_operation[literal[1024], *, literal[1024]]]]] local_variable[type[long], freeCacheSpaceInBytes] call[.deleteLeastRecentlyUsedProjects, parameter[binary_operation[member[.newProjectSizeInBytes], -, member[.freeCacheSpaceInBytes]], member[.allProjects]]] else begin[{] None end[}] end[}] END[}]
Keyword[void] identifier[deleteProjectDirsIfNecessary] operator[SEP] Keyword[final] Keyword[long] identifier[newProjectSizeInBytes] operator[SEP] { Keyword[final] Keyword[long] identifier[projectCacheMaxSizeInByte] operator[=] operator[SEP] Keyword[long] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[projectCacheDir] operator[SEP] identifier[getTotalSpace] operator[SEP] operator[SEP] operator[*] Keyword[this] operator[SEP] identifier[percentageOfDisk] operator[SEP] operator[SEP] Keyword[final] Keyword[long] identifier[start] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[ProjectDirectoryMetadata] operator[>] identifier[allProjects] operator[=] identifier[loadAllProjects] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[allProjects] operator[SEP] identifier[size] operator[SEP] operator[SEP] , operator[SEP] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[-] identifier[start] operator[SEP] operator[/] Other[1000] operator[SEP] operator[SEP] Keyword[final] Keyword[long] identifier[currentSpaceInBytes] operator[=] identifier[getProjectDirsTotalSizeInBytes] operator[SEP] identifier[allProjects] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[currentSpaceInBytes] operator[+] identifier[newProjectSizeInBytes] operator[>=] identifier[projectCacheMaxSizeInByte] operator[SEP] { identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] , operator[SEP] identifier[currentSpaceInBytes] operator[+] identifier[newProjectSizeInBytes] operator[SEP] operator[/] operator[SEP] Other[1024] operator[*] Other[1024] operator[SEP] , identifier[projectCacheMaxSizeInByte] operator[/] operator[SEP] Other[1024] operator[*] Other[1024] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[long] identifier[freeCacheSpaceInBytes] operator[=] identifier[projectCacheMaxSizeInByte] operator[-] identifier[currentSpaceInBytes] operator[SEP] identifier[deleteLeastRecentlyUsedProjects] operator[SEP] identifier[newProjectSizeInBytes] operator[-] identifier[freeCacheSpaceInBytes] , identifier[allProjects] operator[SEP] operator[SEP] } }
@Nullable public static String getWithoutPEMHeader (@Nullable final String sCertificate) { if (StringHelper.hasNoText (sCertificate)) return null; // Remove special begin and end stuff String sRealCertificate = sCertificate.trim (); /** * Handle certain misconfiguration issues. E.g. for 9906:testconsip on * * <pre> * http://b-c073e04afb234f70e74d3444ba3f8eaa.iso6523-actorid-upis.acc.edelivery.tech.ec.europa.eu/iso6523-actorid-upis%3A%3A9906%3Atestconsip/services/busdox-docid-qns%3A%3Aurn%3Aoasis%3Anames%3Aspecification%3Aubl%3Aschema%3Axsd%3AOrder-2%3A%3AOrder%23%23urn%3Awww.cenbii.eu%3Atransaction%3Abiitrns001%3Aver2.0%3Aextended%3Aurn%3Awww.peppol.eu%3Abis%3Apeppol3a%3Aver2.0%3A%3A2.1 * </pre> */ sRealCertificate = StringHelper.trimStart (sRealCertificate, BEGIN_CERTIFICATE_INVALID); sRealCertificate = StringHelper.trimEnd (sRealCertificate, END_CERTIFICATE_INVALID); // Remove regular PEM headers also sRealCertificate = StringHelper.trimStart (sRealCertificate, BEGIN_CERTIFICATE); sRealCertificate = StringHelper.trimEnd (sRealCertificate, END_CERTIFICATE); // Remove all existing whitespace characters return StringHelper.getWithoutAnySpaces (sRealCertificate); }
class class_name[name] begin[{] method[getWithoutPEMHeader, return_type[type[String]], modifier[public static], parameter[sCertificate]] begin[{] if[call[StringHelper.hasNoText, parameter[member[.sCertificate]]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[String], sRealCertificate] assign[member[.sRealCertificate], call[StringHelper.trimStart, parameter[member[.sRealCertificate], member[.BEGIN_CERTIFICATE_INVALID]]]] assign[member[.sRealCertificate], call[StringHelper.trimEnd, parameter[member[.sRealCertificate], member[.END_CERTIFICATE_INVALID]]]] assign[member[.sRealCertificate], call[StringHelper.trimStart, parameter[member[.sRealCertificate], member[.BEGIN_CERTIFICATE]]]] assign[member[.sRealCertificate], call[StringHelper.trimEnd, parameter[member[.sRealCertificate], member[.END_CERTIFICATE]]]] return[call[StringHelper.getWithoutAnySpaces, parameter[member[.sRealCertificate]]]] end[}] END[}]
annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[String] identifier[getWithoutPEMHeader] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[sCertificate] operator[SEP] { Keyword[if] operator[SEP] identifier[StringHelper] operator[SEP] identifier[hasNoText] operator[SEP] identifier[sCertificate] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[String] identifier[sRealCertificate] operator[=] identifier[sCertificate] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[sRealCertificate] operator[=] identifier[StringHelper] operator[SEP] identifier[trimStart] operator[SEP] identifier[sRealCertificate] , identifier[BEGIN_CERTIFICATE_INVALID] operator[SEP] operator[SEP] identifier[sRealCertificate] operator[=] identifier[StringHelper] operator[SEP] identifier[trimEnd] operator[SEP] identifier[sRealCertificate] , identifier[END_CERTIFICATE_INVALID] operator[SEP] operator[SEP] identifier[sRealCertificate] operator[=] identifier[StringHelper] operator[SEP] identifier[trimStart] operator[SEP] identifier[sRealCertificate] , identifier[BEGIN_CERTIFICATE] operator[SEP] operator[SEP] identifier[sRealCertificate] operator[=] identifier[StringHelper] operator[SEP] identifier[trimEnd] operator[SEP] identifier[sRealCertificate] , identifier[END_CERTIFICATE] operator[SEP] operator[SEP] Keyword[return] identifier[StringHelper] operator[SEP] identifier[getWithoutAnySpaces] operator[SEP] identifier[sRealCertificate] operator[SEP] operator[SEP] }
@UnstableApi @SuppressWarnings("unchecked") public static <T> T staticMockMarker(Class<T> clazz) { for (StaticMockitoSession session : sessions) { T marker = session.staticMockMarker(clazz); if (marker != null) { return marker; } } return null; }
class class_name[name] begin[{] method[staticMockMarker, return_type[type[T]], modifier[public static], parameter[clazz]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=staticMockMarker, postfix_operators=[], prefix_operators=[], qualifier=session, selectors=[], type_arguments=None), name=marker)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=marker, 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=[ReturnStatement(expression=MemberReference(member=marker, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=sessions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=session)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StaticMockitoSession, sub_type=None))), label=None) return[literal[null]] end[}] END[}]
annotation[@] identifier[UnstableApi] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[staticMockMarker] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[clazz] operator[SEP] { Keyword[for] operator[SEP] identifier[StaticMockitoSession] identifier[session] operator[:] identifier[sessions] operator[SEP] { identifier[T] identifier[marker] operator[=] identifier[session] operator[SEP] identifier[staticMockMarker] operator[SEP] identifier[clazz] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[marker] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[marker] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
public PactDslJsonArray includesStr(String value) { body.put(value); matchers.addRule(rootPath + appendArrayIndex(0), includesMatcher(value)); return this; }
class class_name[name] begin[{] method[includesStr, return_type[type[PactDslJsonArray]], modifier[public], parameter[value]] begin[{] call[body.put, parameter[member[.value]]] call[matchers.addRule, parameter[binary_operation[member[.rootPath], +, call[.appendArrayIndex, parameter[literal[0]]]], call[.includesMatcher, parameter[member[.value]]]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[PactDslJsonArray] identifier[includesStr] operator[SEP] identifier[String] identifier[value] operator[SEP] { identifier[body] operator[SEP] identifier[put] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[matchers] operator[SEP] identifier[addRule] operator[SEP] identifier[rootPath] operator[+] identifier[appendArrayIndex] operator[SEP] Other[0] operator[SEP] , identifier[includesMatcher] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public Date getValueAsDate(final TimeZone tz) { long time = ((Date) value).getTime(); long offset; if(tz == null) { offset = TimeZone.getDefault().getRawOffset(); } else { offset = tz.getRawOffset(); } return new Date(time - offset); }
class class_name[name] begin[{] method[getValueAsDate, return_type[type[Date]], modifier[public], parameter[tz]] begin[{] local_variable[type[long], time] local_variable[type[long], offset] if[binary_operation[member[.tz], ==, literal[null]]] begin[{] assign[member[.offset], call[TimeZone.getDefault, parameter[]]] else begin[{] assign[member[.offset], call[tz.getRawOffset, parameter[]]] end[}] return[ClassCreator(arguments=[BinaryOperation(operandl=MemberReference(member=time, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=offset, 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=Date, sub_type=None))] end[}] END[}]
Keyword[public] identifier[Date] identifier[getValueAsDate] operator[SEP] Keyword[final] identifier[TimeZone] identifier[tz] operator[SEP] { Keyword[long] identifier[time] operator[=] operator[SEP] operator[SEP] identifier[Date] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[offset] operator[SEP] Keyword[if] operator[SEP] identifier[tz] operator[==] Other[null] operator[SEP] { identifier[offset] operator[=] identifier[TimeZone] operator[SEP] identifier[getDefault] operator[SEP] operator[SEP] operator[SEP] identifier[getRawOffset] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[offset] operator[=] identifier[tz] operator[SEP] identifier[getRawOffset] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[Date] operator[SEP] identifier[time] operator[-] identifier[offset] operator[SEP] operator[SEP] }
public void addCollectionColumnMetadata(CollectionColumnInfo collectionColumnMetadata) { if (this.collectionColumnMetadatas == null) { this.collectionColumnMetadatas = new ArrayList<CollectionColumnInfo>(); } if (!collectionColumnMetadatas.contains(collectionColumnMetadata)) { collectionColumnMetadatas.add(collectionColumnMetadata); } }
class class_name[name] begin[{] method[addCollectionColumnMetadata, return_type[void], modifier[public], parameter[collectionColumnMetadata]] begin[{] if[binary_operation[THIS[member[None.collectionColumnMetadatas]], ==, literal[null]]] begin[{] assign[THIS[member[None.collectionColumnMetadatas]], 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=CollectionColumnInfo, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))] else begin[{] None end[}] if[call[collectionColumnMetadatas.contains, parameter[member[.collectionColumnMetadata]]]] begin[{] call[collectionColumnMetadatas.add, parameter[member[.collectionColumnMetadata]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[addCollectionColumnMetadata] operator[SEP] identifier[CollectionColumnInfo] identifier[collectionColumnMetadata] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[collectionColumnMetadatas] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[collectionColumnMetadatas] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[CollectionColumnInfo] operator[>] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[collectionColumnMetadatas] operator[SEP] identifier[contains] operator[SEP] identifier[collectionColumnMetadata] operator[SEP] operator[SEP] { identifier[collectionColumnMetadatas] operator[SEP] identifier[add] operator[SEP] identifier[collectionColumnMetadata] operator[SEP] operator[SEP] } }
private boolean is(Type formalType, TypeVariable<?> declaration) { if (runtimeType.equals(formalType)) { return true; } if (formalType instanceof WildcardType) { WildcardType your = canonicalizeWildcardType(declaration, (WildcardType) formalType); // if "formalType" is <? extends Foo>, "this" can be: // Foo, SubFoo, <? extends Foo>, <? extends SubFoo>, <T extends Foo> or // <T extends SubFoo>. // if "formalType" is <? super Foo>, "this" can be: // Foo, SuperFoo, <? super Foo> or <? super SuperFoo>. return every(your.getUpperBounds()).isSupertypeOf(runtimeType) && every(your.getLowerBounds()).isSubtypeOf(runtimeType); } return canonicalizeWildcardsInType(runtimeType).equals(canonicalizeWildcardsInType(formalType)); }
class class_name[name] begin[{] method[is, return_type[type[boolean]], modifier[private], parameter[formalType, declaration]] begin[{] if[call[runtimeType.equals, parameter[member[.formalType]]]] begin[{] return[literal[true]] else begin[{] None end[}] if[binary_operation[member[.formalType], instanceof, type[WildcardType]]] begin[{] local_variable[type[WildcardType], your] return[binary_operation[call[.every, parameter[call[your.getUpperBounds, parameter[]]]], &&, call[.every, parameter[call[your.getLowerBounds, parameter[]]]]]] else begin[{] None end[}] return[call[.canonicalizeWildcardsInType, parameter[member[.runtimeType]]]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[is] operator[SEP] identifier[Type] identifier[formalType] , identifier[TypeVariable] operator[<] operator[?] operator[>] identifier[declaration] operator[SEP] { Keyword[if] operator[SEP] identifier[runtimeType] operator[SEP] identifier[equals] operator[SEP] identifier[formalType] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[formalType] Keyword[instanceof] identifier[WildcardType] operator[SEP] { identifier[WildcardType] identifier[your] operator[=] identifier[canonicalizeWildcardType] operator[SEP] identifier[declaration] , operator[SEP] identifier[WildcardType] operator[SEP] identifier[formalType] operator[SEP] operator[SEP] Keyword[return] identifier[every] operator[SEP] identifier[your] operator[SEP] identifier[getUpperBounds] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[isSupertypeOf] operator[SEP] identifier[runtimeType] operator[SEP] operator[&&] identifier[every] operator[SEP] identifier[your] operator[SEP] identifier[getLowerBounds] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[isSubtypeOf] operator[SEP] identifier[runtimeType] operator[SEP] operator[SEP] } Keyword[return] identifier[canonicalizeWildcardsInType] operator[SEP] identifier[runtimeType] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[canonicalizeWildcardsInType] operator[SEP] identifier[formalType] operator[SEP] operator[SEP] operator[SEP] }
private EntityContainer getEntityContainer() throws ODataRenderException { EntityContainer entityContainer = entityDataModel.getEntityContainer(); if (entityContainer == null) { String message = "EntityContainer should not be null"; LOG.error(message); throw new ODataRenderException(message); } return entityContainer; }
class class_name[name] begin[{] method[getEntityContainer, return_type[type[EntityContainer]], modifier[private], parameter[]] begin[{] local_variable[type[EntityContainer], entityContainer] if[binary_operation[member[.entityContainer], ==, literal[null]]] begin[{] local_variable[type[String], message] call[LOG.error, parameter[member[.message]]] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=message, 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=ODataRenderException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.entityContainer]] end[}] END[}]
Keyword[private] identifier[EntityContainer] identifier[getEntityContainer] operator[SEP] operator[SEP] Keyword[throws] identifier[ODataRenderException] { identifier[EntityContainer] identifier[entityContainer] operator[=] identifier[entityDataModel] operator[SEP] identifier[getEntityContainer] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[entityContainer] operator[==] Other[null] operator[SEP] { identifier[String] identifier[message] operator[=] literal[String] operator[SEP] identifier[LOG] operator[SEP] identifier[error] operator[SEP] identifier[message] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[ODataRenderException] operator[SEP] identifier[message] operator[SEP] operator[SEP] } Keyword[return] identifier[entityContainer] operator[SEP] }
@CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable<List<T>> buffer(int count) { return buffer(count, count); }
class class_name[name] begin[{] method[buffer, return_type[type[Flowable]], modifier[final public], parameter[count]] begin[{] return[call[.buffer, parameter[member[.count], member[.count]]]] end[}] END[}]
annotation[@] identifier[CheckReturnValue] annotation[@] identifier[BackpressureSupport] operator[SEP] identifier[BackpressureKind] operator[SEP] identifier[FULL] operator[SEP] annotation[@] identifier[SchedulerSupport] operator[SEP] identifier[SchedulerSupport] operator[SEP] identifier[NONE] operator[SEP] Keyword[public] Keyword[final] identifier[Flowable] operator[<] identifier[List] operator[<] identifier[T] operator[>] operator[>] identifier[buffer] operator[SEP] Keyword[int] identifier[count] operator[SEP] { Keyword[return] identifier[buffer] operator[SEP] identifier[count] , identifier[count] operator[SEP] operator[SEP] }
@Nullable public static TtlRunnable get(@Nullable Runnable runnable, boolean releaseTtlValueReferenceAfterRun, boolean idempotent) { if (null == runnable) return null; if (runnable instanceof TtlEnhanced) { // avoid redundant decoration, and ensure idempotency if (idempotent) return (TtlRunnable) runnable; else throw new IllegalStateException("Already TtlRunnable!"); } return new TtlRunnable(runnable, releaseTtlValueReferenceAfterRun); }
class class_name[name] begin[{] method[get, return_type[type[TtlRunnable]], modifier[public static], parameter[runnable, releaseTtlValueReferenceAfterRun, idempotent]] begin[{] if[binary_operation[literal[null], ==, member[.runnable]]] begin[{] return[literal[null]] else begin[{] None end[}] if[binary_operation[member[.runnable], instanceof, type[TtlEnhanced]]] begin[{] if[member[.idempotent]] begin[{] return[Cast(expression=MemberReference(member=runnable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=TtlRunnable, sub_type=None))] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Already TtlRunnable!")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) end[}] else begin[{] None end[}] return[ClassCreator(arguments=[MemberReference(member=runnable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=releaseTtlValueReferenceAfterRun, 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=TtlRunnable, sub_type=None))] end[}] END[}]
annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[TtlRunnable] identifier[get] operator[SEP] annotation[@] identifier[Nullable] identifier[Runnable] identifier[runnable] , Keyword[boolean] identifier[releaseTtlValueReferenceAfterRun] , Keyword[boolean] identifier[idempotent] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[runnable] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[runnable] Keyword[instanceof] identifier[TtlEnhanced] operator[SEP] { Keyword[if] operator[SEP] identifier[idempotent] operator[SEP] Keyword[return] operator[SEP] identifier[TtlRunnable] operator[SEP] identifier[runnable] operator[SEP] Keyword[else] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[TtlRunnable] operator[SEP] identifier[runnable] , identifier[releaseTtlValueReferenceAfterRun] operator[SEP] operator[SEP] }
private Locale getLocale(CmsXmlContent content) { List<Locale> locales = content.getLocales(); if (locales.contains(Locale.ENGLISH) || locales.isEmpty()) { return Locale.ENGLISH; } return locales.get(0); }
class class_name[name] begin[{] method[getLocale, return_type[type[Locale]], modifier[private], parameter[content]] begin[{] local_variable[type[List], locales] if[binary_operation[call[locales.contains, parameter[member[Locale.ENGLISH]]], ||, call[locales.isEmpty, parameter[]]]] begin[{] return[member[Locale.ENGLISH]] else begin[{] None end[}] return[call[locales.get, parameter[literal[0]]]] end[}] END[}]
Keyword[private] identifier[Locale] identifier[getLocale] operator[SEP] identifier[CmsXmlContent] identifier[content] operator[SEP] { identifier[List] operator[<] identifier[Locale] operator[>] identifier[locales] operator[=] identifier[content] operator[SEP] identifier[getLocales] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[locales] operator[SEP] identifier[contains] operator[SEP] identifier[Locale] operator[SEP] identifier[ENGLISH] operator[SEP] operator[||] identifier[locales] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[Locale] operator[SEP] identifier[ENGLISH] operator[SEP] } Keyword[return] identifier[locales] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] }
void handleFileItemClick(ItemClickEvent event) { if (isEditing()) { stopEdit(); } else if (!event.isCtrlKey() && !event.isShiftKey()) { // don't interfere with multi-selection using control key String itemId = (String)event.getItemId(); CmsUUID structureId = getUUIDFromItemID(itemId); boolean openedFolder = false; if (event.getButton().equals(MouseButton.RIGHT)) { handleSelection(itemId); openContextMenu(event); } else { if ((event.getPropertyId() == null) || CmsResourceTableProperty.PROPERTY_TYPE_ICON.equals(event.getPropertyId())) { handleSelection(itemId); openContextMenu(event); } else { if (m_actionColumnProperty.equals(event.getPropertyId())) { Boolean isFolder = (Boolean)event.getItem().getItemProperty( CmsResourceTableProperty.PROPERTY_IS_FOLDER).getValue(); if ((isFolder != null) && isFolder.booleanValue()) { if (m_folderSelectHandler != null) { m_folderSelectHandler.onFolderSelect(structureId); } openedFolder = true; } else { try { CmsObject cms = A_CmsUI.getCmsObject(); CmsResource res = cms.readResource(structureId, CmsResourceFilter.IGNORE_EXPIRATION); m_currentResources = Collections.singletonList(res); I_CmsDialogContext context = m_contextProvider.getDialogContext(); I_CmsDefaultAction action = OpenCms.getWorkplaceAppManager().getDefaultAction( context, m_menuBuilder); if (action != null) { action.executeAction(context); return; } } catch (CmsVfsResourceNotFoundException e) { LOG.info(e.getLocalizedMessage(), e); } catch (CmsException e) { LOG.error(e.getLocalizedMessage(), e); } } } else { I_CmsDialogContext context = m_contextProvider.getDialogContext(); if ((m_currentResources.size() == 1) && m_currentResources.get(0).getStructureId().equals(structureId) && (context instanceof I_CmsEditPropertyContext) && ((I_CmsEditPropertyContext)context).isPropertyEditable(event.getPropertyId())) { ((I_CmsEditPropertyContext)context).editProperty(event.getPropertyId()); } } } } // update the item on click to show any available changes if (!openedFolder) { update(Collections.singletonList(structureId), false); } } }
class class_name[name] begin[{] method[handleFileItemClick, return_type[void], modifier[default], parameter[event]] begin[{] if[call[.isEditing, parameter[]]] begin[{] call[.stopEdit, parameter[]] else begin[{] if[binary_operation[call[event.isCtrlKey, parameter[]], &&, call[event.isShiftKey, parameter[]]]] begin[{] local_variable[type[String], itemId] local_variable[type[CmsUUID], structureId] local_variable[type[boolean], openedFolder] if[call[event.getButton, parameter[]]] begin[{] call[.handleSelection, parameter[member[.itemId]]] call[.openContextMenu, parameter[member[.event]]] else begin[{] if[binary_operation[binary_operation[call[event.getPropertyId, parameter[]], ==, literal[null]], ||, call[CmsResourceTableProperty.PROPERTY_TYPE_ICON.equals, parameter[call[event.getPropertyId, parameter[]]]]]] begin[{] call[.handleSelection, parameter[member[.itemId]]] call[.openContextMenu, parameter[member[.event]]] else begin[{] if[call[m_actionColumnProperty.equals, parameter[call[event.getPropertyId, parameter[]]]]] begin[{] local_variable[type[Boolean], isFolder] if[binary_operation[binary_operation[member[.isFolder], !=, literal[null]], &&, call[isFolder.booleanValue, parameter[]]]] begin[{] if[binary_operation[member[.m_folderSelectHandler], !=, literal[null]]] begin[{] call[m_folderSelectHandler.onFolderSelect, parameter[member[.structureId]]] else begin[{] None end[}] assign[member[.openedFolder], literal[true]] else begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getCmsObject, postfix_operators=[], prefix_operators=[], qualifier=A_CmsUI, selectors=[], type_arguments=None), name=cms)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsObject, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=structureId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=IGNORE_EXPIRATION, postfix_operators=[], prefix_operators=[], qualifier=CmsResourceFilter, selectors=[])], member=readResource, postfix_operators=[], prefix_operators=[], qualifier=cms, selectors=[], type_arguments=None), name=res)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsResource, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=m_currentResources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=res, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=singletonList, postfix_operators=[], prefix_operators=[], qualifier=Collections, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getDialogContext, postfix_operators=[], prefix_operators=[], qualifier=m_contextProvider, selectors=[], type_arguments=None), name=context)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=I_CmsDialogContext, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getWorkplaceAppManager, postfix_operators=[], prefix_operators=[], qualifier=OpenCms, selectors=[MethodInvocation(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=m_menuBuilder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDefaultAction, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=action)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=I_CmsDefaultAction, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=action, 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=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=executeAction, postfix_operators=[], prefix_operators=[], qualifier=action, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLocalizedMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=info, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['CmsVfsResourceNotFoundException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLocalizedMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['CmsException']))], finally_block=None, label=None, resources=None) end[}] else begin[{] local_variable[type[I_CmsDialogContext], context] if[binary_operation[binary_operation[binary_operation[binary_operation[call[m_currentResources.size, parameter[]], ==, literal[1]], &&, call[m_currentResources.get, parameter[literal[0]]]], &&, binary_operation[member[.context], instanceof, type[I_CmsEditPropertyContext]]], &&, Cast(expression=MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=I_CmsEditPropertyContext, sub_type=None))]] begin[{] Cast(expression=MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=I_CmsEditPropertyContext, sub_type=None)) else begin[{] None end[}] end[}] end[}] end[}] if[member[.openedFolder]] begin[{] call[.update, parameter[call[Collections.singletonList, parameter[member[.structureId]]], literal[false]]] else begin[{] None end[}] else begin[{] None end[}] end[}] end[}] END[}]
Keyword[void] identifier[handleFileItemClick] operator[SEP] identifier[ItemClickEvent] identifier[event] operator[SEP] { Keyword[if] operator[SEP] identifier[isEditing] operator[SEP] operator[SEP] operator[SEP] { identifier[stopEdit] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[!] identifier[event] operator[SEP] identifier[isCtrlKey] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[event] operator[SEP] identifier[isShiftKey] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[itemId] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[event] operator[SEP] identifier[getItemId] operator[SEP] operator[SEP] operator[SEP] identifier[CmsUUID] identifier[structureId] operator[=] identifier[getUUIDFromItemID] operator[SEP] identifier[itemId] operator[SEP] operator[SEP] Keyword[boolean] identifier[openedFolder] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[event] operator[SEP] identifier[getButton] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[MouseButton] operator[SEP] identifier[RIGHT] operator[SEP] operator[SEP] { identifier[handleSelection] operator[SEP] identifier[itemId] operator[SEP] operator[SEP] identifier[openContextMenu] operator[SEP] identifier[event] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] operator[SEP] identifier[event] operator[SEP] identifier[getPropertyId] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] operator[||] identifier[CmsResourceTableProperty] operator[SEP] identifier[PROPERTY_TYPE_ICON] operator[SEP] identifier[equals] operator[SEP] identifier[event] operator[SEP] identifier[getPropertyId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[handleSelection] operator[SEP] identifier[itemId] operator[SEP] operator[SEP] identifier[openContextMenu] operator[SEP] identifier[event] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[m_actionColumnProperty] operator[SEP] identifier[equals] operator[SEP] identifier[event] operator[SEP] identifier[getPropertyId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[Boolean] identifier[isFolder] operator[=] operator[SEP] identifier[Boolean] operator[SEP] identifier[event] operator[SEP] identifier[getItem] operator[SEP] operator[SEP] operator[SEP] identifier[getItemProperty] operator[SEP] identifier[CmsResourceTableProperty] operator[SEP] identifier[PROPERTY_IS_FOLDER] operator[SEP] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[isFolder] operator[!=] Other[null] operator[SEP] operator[&&] identifier[isFolder] operator[SEP] identifier[booleanValue] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[m_folderSelectHandler] operator[!=] Other[null] operator[SEP] { identifier[m_folderSelectHandler] operator[SEP] identifier[onFolderSelect] operator[SEP] identifier[structureId] operator[SEP] operator[SEP] } identifier[openedFolder] operator[=] literal[boolean] operator[SEP] } Keyword[else] { Keyword[try] { identifier[CmsObject] identifier[cms] operator[=] identifier[A_CmsUI] operator[SEP] identifier[getCmsObject] operator[SEP] operator[SEP] operator[SEP] identifier[CmsResource] identifier[res] operator[=] identifier[cms] operator[SEP] identifier[readResource] operator[SEP] identifier[structureId] , identifier[CmsResourceFilter] operator[SEP] identifier[IGNORE_EXPIRATION] operator[SEP] operator[SEP] identifier[m_currentResources] operator[=] identifier[Collections] operator[SEP] identifier[singletonList] operator[SEP] identifier[res] operator[SEP] operator[SEP] identifier[I_CmsDialogContext] identifier[context] operator[=] identifier[m_contextProvider] operator[SEP] identifier[getDialogContext] operator[SEP] operator[SEP] operator[SEP] identifier[I_CmsDefaultAction] identifier[action] operator[=] identifier[OpenCms] operator[SEP] identifier[getWorkplaceAppManager] operator[SEP] operator[SEP] operator[SEP] identifier[getDefaultAction] operator[SEP] identifier[context] , identifier[m_menuBuilder] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[action] operator[!=] Other[null] operator[SEP] { identifier[action] operator[SEP] identifier[executeAction] operator[SEP] identifier[context] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } } Keyword[catch] operator[SEP] identifier[CmsVfsResourceNotFoundException] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] identifier[e] operator[SEP] identifier[getLocalizedMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[CmsException] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] identifier[e] operator[SEP] identifier[getLocalizedMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } } } Keyword[else] { identifier[I_CmsDialogContext] identifier[context] operator[=] identifier[m_contextProvider] operator[SEP] identifier[getDialogContext] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[m_currentResources] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[1] operator[SEP] operator[&&] identifier[m_currentResources] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getStructureId] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[structureId] operator[SEP] operator[&&] operator[SEP] identifier[context] Keyword[instanceof] identifier[I_CmsEditPropertyContext] operator[SEP] operator[&&] operator[SEP] operator[SEP] identifier[I_CmsEditPropertyContext] operator[SEP] identifier[context] operator[SEP] operator[SEP] identifier[isPropertyEditable] operator[SEP] identifier[event] operator[SEP] identifier[getPropertyId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { operator[SEP] operator[SEP] identifier[I_CmsEditPropertyContext] operator[SEP] identifier[context] operator[SEP] operator[SEP] identifier[editProperty] operator[SEP] identifier[event] operator[SEP] identifier[getPropertyId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } } Keyword[if] operator[SEP] operator[!] identifier[openedFolder] operator[SEP] { identifier[update] operator[SEP] identifier[Collections] operator[SEP] identifier[singletonList] operator[SEP] identifier[structureId] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] } } }
public Observable<Page<TopLevelDomainInner>> listAsync() { return listWithServiceResponseAsync() .map(new Func1<ServiceResponse<Page<TopLevelDomainInner>>, Page<TopLevelDomainInner>>() { @Override public Page<TopLevelDomainInner> call(ServiceResponse<Page<TopLevelDomainInner>> response) { return response.body(); } }); }
class class_name[name] begin[{] method[listAsync, return_type[type[Observable]], modifier[public], parameter[]] begin[{] return[call[.listWithServiceResponseAsync, parameter[]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[TopLevelDomainInner] operator[>] operator[>] identifier[listAsync] operator[SEP] operator[SEP] { Keyword[return] identifier[listWithServiceResponseAsync] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[TopLevelDomainInner] operator[>] operator[>] , identifier[Page] operator[<] identifier[TopLevelDomainInner] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Page] operator[<] identifier[TopLevelDomainInner] operator[>] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[TopLevelDomainInner] 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 TableRef presence(final OnPresence onPresence, final OnError onError) { context.presence(channel, onPresence, onError); return this; }
class class_name[name] begin[{] method[presence, return_type[type[TableRef]], modifier[public], parameter[onPresence, onError]] begin[{] call[context.presence, parameter[member[.channel], member[.onPresence], member[.onError]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[TableRef] identifier[presence] operator[SEP] Keyword[final] identifier[OnPresence] identifier[onPresence] , Keyword[final] identifier[OnError] identifier[onError] operator[SEP] { identifier[context] operator[SEP] identifier[presence] operator[SEP] identifier[channel] , identifier[onPresence] , identifier[onError] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
private static void initStreams() { Log.info("Initializing Streams..."); MetadataCommand command = (MetadataCommand) PreConfigurationContext.getCommandByName("-metadata"); BatchCommand batchCommand = (BatchCommand) PreConfigurationContext.getCommandByName("-batchSize"); AsyncAnnotationAuditOutputStream asyncAnnotationStream = new AsyncAnnotationAuditOutputStream( new AuditProcessOutputStream(Context.getConfigContext()), annotationTransformer); AuditProcessOutputStream processStream = new AuditProcessOutputStream(Context.getConfigContext()); if (command.isAsync()) { MetadataLookupStream metadataStream; if(batchCommand.getBatchSize() > 0) { BatchProcessStream batchStream = new BatchProcessStream(processStream, batchCommand.getBatchSize()); metadataStream = new MetadataLookupStream(batchStream); } else { metadataStream = new MetadataLookupStream(processStream); } AsyncAuditOutputStream asyncStream = new AsyncAuditOutputStream(metadataStream, asyncAnnotationStream); auditStream = new AuditEventOutputStream(asyncStream, configContext); } else { AsyncAuditOutputStream asyncStream; if(batchCommand.getBatchSize() > 0) { BatchProcessStream batchStream = new BatchProcessStream(processStream, batchCommand.getBatchSize()); asyncStream = new AsyncAuditOutputStream(batchStream, asyncAnnotationStream); } else { asyncStream = new AsyncAuditOutputStream(processStream, asyncAnnotationStream); } MetadataLookupStream metadataStream = new MetadataLookupStream(asyncStream); auditStream = new AuditEventOutputStream(metadataStream, configContext); } Log.info("Audit Streams Initialized."); }
class class_name[name] begin[{] method[initStreams, return_type[void], modifier[private static], parameter[]] begin[{] call[Log.info, parameter[literal["Initializing Streams..."]]] local_variable[type[MetadataCommand], command] local_variable[type[BatchCommand], batchCommand] local_variable[type[AsyncAnnotationAuditOutputStream], asyncAnnotationStream] local_variable[type[AuditProcessOutputStream], processStream] if[call[command.isAsync, parameter[]]] begin[{] local_variable[type[MetadataLookupStream], metadataStream] if[binary_operation[call[batchCommand.getBatchSize, parameter[]], >, literal[0]]] begin[{] local_variable[type[BatchProcessStream], batchStream] assign[member[.metadataStream], ClassCreator(arguments=[MemberReference(member=batchStream, 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=MetadataLookupStream, sub_type=None))] else begin[{] assign[member[.metadataStream], ClassCreator(arguments=[MemberReference(member=processStream, 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=MetadataLookupStream, sub_type=None))] end[}] local_variable[type[AsyncAuditOutputStream], asyncStream] assign[member[.auditStream], ClassCreator(arguments=[MemberReference(member=asyncStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=configContext, 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=AuditEventOutputStream, sub_type=None))] else begin[{] local_variable[type[AsyncAuditOutputStream], asyncStream] if[binary_operation[call[batchCommand.getBatchSize, parameter[]], >, literal[0]]] begin[{] local_variable[type[BatchProcessStream], batchStream] assign[member[.asyncStream], ClassCreator(arguments=[MemberReference(member=batchStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=asyncAnnotationStream, 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=AsyncAuditOutputStream, sub_type=None))] else begin[{] assign[member[.asyncStream], ClassCreator(arguments=[MemberReference(member=processStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=asyncAnnotationStream, 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=AsyncAuditOutputStream, sub_type=None))] end[}] local_variable[type[MetadataLookupStream], metadataStream] assign[member[.auditStream], ClassCreator(arguments=[MemberReference(member=metadataStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=configContext, 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=AuditEventOutputStream, sub_type=None))] end[}] call[Log.info, parameter[literal["Audit Streams Initialized."]]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[initStreams] operator[SEP] operator[SEP] { identifier[Log] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[MetadataCommand] identifier[command] operator[=] operator[SEP] identifier[MetadataCommand] operator[SEP] identifier[PreConfigurationContext] operator[SEP] identifier[getCommandByName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[BatchCommand] identifier[batchCommand] operator[=] operator[SEP] identifier[BatchCommand] operator[SEP] identifier[PreConfigurationContext] operator[SEP] identifier[getCommandByName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[AsyncAnnotationAuditOutputStream] identifier[asyncAnnotationStream] operator[=] Keyword[new] identifier[AsyncAnnotationAuditOutputStream] operator[SEP] Keyword[new] identifier[AuditProcessOutputStream] operator[SEP] identifier[Context] operator[SEP] identifier[getConfigContext] operator[SEP] operator[SEP] operator[SEP] , identifier[annotationTransformer] operator[SEP] operator[SEP] identifier[AuditProcessOutputStream] identifier[processStream] operator[=] Keyword[new] identifier[AuditProcessOutputStream] operator[SEP] identifier[Context] operator[SEP] identifier[getConfigContext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[command] operator[SEP] identifier[isAsync] operator[SEP] operator[SEP] operator[SEP] { identifier[MetadataLookupStream] identifier[metadataStream] operator[SEP] Keyword[if] operator[SEP] identifier[batchCommand] operator[SEP] identifier[getBatchSize] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[BatchProcessStream] identifier[batchStream] operator[=] Keyword[new] identifier[BatchProcessStream] operator[SEP] identifier[processStream] , identifier[batchCommand] operator[SEP] identifier[getBatchSize] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[metadataStream] operator[=] Keyword[new] identifier[MetadataLookupStream] operator[SEP] identifier[batchStream] operator[SEP] operator[SEP] } Keyword[else] { identifier[metadataStream] operator[=] Keyword[new] identifier[MetadataLookupStream] operator[SEP] identifier[processStream] operator[SEP] operator[SEP] } identifier[AsyncAuditOutputStream] identifier[asyncStream] operator[=] Keyword[new] identifier[AsyncAuditOutputStream] operator[SEP] identifier[metadataStream] , identifier[asyncAnnotationStream] operator[SEP] operator[SEP] identifier[auditStream] operator[=] Keyword[new] identifier[AuditEventOutputStream] operator[SEP] identifier[asyncStream] , identifier[configContext] operator[SEP] operator[SEP] } Keyword[else] { identifier[AsyncAuditOutputStream] identifier[asyncStream] operator[SEP] Keyword[if] operator[SEP] identifier[batchCommand] operator[SEP] identifier[getBatchSize] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[BatchProcessStream] identifier[batchStream] operator[=] Keyword[new] identifier[BatchProcessStream] operator[SEP] identifier[processStream] , identifier[batchCommand] operator[SEP] identifier[getBatchSize] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[asyncStream] operator[=] Keyword[new] identifier[AsyncAuditOutputStream] operator[SEP] identifier[batchStream] , identifier[asyncAnnotationStream] operator[SEP] operator[SEP] } Keyword[else] { identifier[asyncStream] operator[=] Keyword[new] identifier[AsyncAuditOutputStream] operator[SEP] identifier[processStream] , identifier[asyncAnnotationStream] operator[SEP] operator[SEP] } identifier[MetadataLookupStream] identifier[metadataStream] operator[=] Keyword[new] identifier[MetadataLookupStream] operator[SEP] identifier[asyncStream] operator[SEP] operator[SEP] identifier[auditStream] operator[=] Keyword[new] identifier[AuditEventOutputStream] operator[SEP] identifier[metadataStream] , identifier[configContext] operator[SEP] operator[SEP] } identifier[Log] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] }
private static void watchFile(final File file, ResourceLoader resourceLoader, String resourcePaths) { LOGGER.info("监控文件:"+file.toString()); DirectoryWatcher.WatcherCallback watcherCallback = new DirectoryWatcher.WatcherCallback(){ private long lastExecute = System.currentTimeMillis(); @Override public void execute(WatchEvent.Kind<?> kind, String path) { if(System.currentTimeMillis() - lastExecute > 1000){ lastExecute = System.currentTimeMillis(); if(!path.equals(file.toString())){ return; } LOGGER.info("事件:"+kind.name()+" ,路径:"+path); synchronized(AutoDetector.class){ DirectoryWatcher dw = WATCHER_CALLBACKS.get(this); String paths = RESOURCES.get(dw); ResourceLoader loader = RESOURCE_LOADERS.get(dw); LOGGER.info("重新加载数据"); loadAndWatch(loader, paths); } } } }; DirectoryWatcher fileWatcher = DirectoryWatcher.getDirectoryWatcher(watcherCallback, StandardWatchEventKinds.ENTRY_MODIFY, StandardWatchEventKinds.ENTRY_DELETE); fileWatcher.watchDirectory(file.getParent()); WATCHER_CALLBACKS.put(watcherCallback, fileWatcher); RESOURCES.put(fileWatcher, resourcePaths); RESOURCE_LOADERS.put(fileWatcher, resourceLoader); }
class class_name[name] begin[{] method[watchFile, return_type[void], modifier[private static], parameter[file, resourceLoader, resourcePaths]] begin[{] call[LOGGER.info, parameter[binary_operation[literal["监控文件:"], +, call[file.toString, parameter[]]]]] local_variable[type[DirectoryWatcher], watcherCallback] local_variable[type[DirectoryWatcher], fileWatcher] call[fileWatcher.watchDirectory, parameter[call[file.getParent, parameter[]]]] call[WATCHER_CALLBACKS.put, parameter[member[.watcherCallback], member[.fileWatcher]]] call[RESOURCES.put, parameter[member[.fileWatcher], member[.resourcePaths]]] call[RESOURCE_LOADERS.put, parameter[member[.fileWatcher], member[.resourceLoader]]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[watchFile] operator[SEP] Keyword[final] identifier[File] identifier[file] , identifier[ResourceLoader] identifier[resourceLoader] , identifier[String] identifier[resourcePaths] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[file] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[DirectoryWatcher] operator[SEP] identifier[WatcherCallback] identifier[watcherCallback] operator[=] Keyword[new] identifier[DirectoryWatcher] operator[SEP] identifier[WatcherCallback] operator[SEP] operator[SEP] { Keyword[private] Keyword[long] identifier[lastExecute] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[execute] operator[SEP] identifier[WatchEvent] operator[SEP] identifier[Kind] operator[<] operator[?] operator[>] identifier[kind] , identifier[String] identifier[path] operator[SEP] { Keyword[if] operator[SEP] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[-] identifier[lastExecute] operator[>] Other[1000] operator[SEP] { identifier[lastExecute] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[path] operator[SEP] identifier[equals] operator[SEP] identifier[file] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[kind] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[path] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] identifier[AutoDetector] operator[SEP] Keyword[class] operator[SEP] { identifier[DirectoryWatcher] identifier[dw] operator[=] identifier[WATCHER_CALLBACKS] operator[SEP] identifier[get] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[String] identifier[paths] operator[=] identifier[RESOURCES] operator[SEP] identifier[get] operator[SEP] identifier[dw] operator[SEP] operator[SEP] identifier[ResourceLoader] identifier[loader] operator[=] identifier[RESOURCE_LOADERS] operator[SEP] identifier[get] operator[SEP] identifier[dw] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[loadAndWatch] operator[SEP] identifier[loader] , identifier[paths] operator[SEP] operator[SEP] } } } } operator[SEP] identifier[DirectoryWatcher] identifier[fileWatcher] operator[=] identifier[DirectoryWatcher] operator[SEP] identifier[getDirectoryWatcher] operator[SEP] identifier[watcherCallback] , identifier[StandardWatchEventKinds] operator[SEP] identifier[ENTRY_MODIFY] , identifier[StandardWatchEventKinds] operator[SEP] identifier[ENTRY_DELETE] operator[SEP] operator[SEP] identifier[fileWatcher] operator[SEP] identifier[watchDirectory] operator[SEP] identifier[file] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[WATCHER_CALLBACKS] operator[SEP] identifier[put] operator[SEP] identifier[watcherCallback] , identifier[fileWatcher] operator[SEP] operator[SEP] identifier[RESOURCES] operator[SEP] identifier[put] operator[SEP] identifier[fileWatcher] , identifier[resourcePaths] operator[SEP] operator[SEP] identifier[RESOURCE_LOADERS] operator[SEP] identifier[put] operator[SEP] identifier[fileWatcher] , identifier[resourceLoader] operator[SEP] operator[SEP] }
void checkIndex(int index, int fieldLength) { if (isOutOfBounds(index, fieldLength, capacity())) { throw new IndexOutOfBoundsException( String.format("index: %d, length: %d (expected: range(0, %d))", index, fieldLength, capacity())); } }
class class_name[name] begin[{] method[checkIndex, return_type[void], modifier[default], parameter[index, fieldLength]] begin[{] if[call[.isOutOfBounds, parameter[member[.index], member[.fieldLength], call[.capacity, parameter[]]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="index: %d, length: %d (expected: range(0, %d))"), MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fieldLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=capacity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], 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=IndexOutOfBoundsException, sub_type=None)), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[void] identifier[checkIndex] operator[SEP] Keyword[int] identifier[index] , Keyword[int] identifier[fieldLength] operator[SEP] { Keyword[if] operator[SEP] identifier[isOutOfBounds] operator[SEP] identifier[index] , identifier[fieldLength] , identifier[capacity] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IndexOutOfBoundsException] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[index] , identifier[fieldLength] , identifier[capacity] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
private void addStringContent(final Part part, final String content) throws MessagingException, UnsupportedEncodingException { final String contentType = part.getContentType(); final String encoding = EmailUtil.extractEncoding(contentType, StringPool.US_ASCII); final String disposition = part.getDisposition(); if (disposition != null && disposition.equalsIgnoreCase(Part.ATTACHMENT)) { addAttachment(part, content.getBytes(encoding)); } else { final String mimeType = EmailUtil.extractMimeType(contentType); message(content, mimeType, encoding); } }
class class_name[name] begin[{] method[addStringContent, return_type[void], modifier[private], parameter[part, content]] begin[{] local_variable[type[String], contentType] local_variable[type[String], encoding] local_variable[type[String], disposition] if[binary_operation[binary_operation[member[.disposition], !=, literal[null]], &&, call[disposition.equalsIgnoreCase, parameter[member[Part.ATTACHMENT]]]]] begin[{] call[.addAttachment, parameter[member[.part], call[content.getBytes, parameter[member[.encoding]]]]] else begin[{] local_variable[type[String], mimeType] call[.message, parameter[member[.content], member[.mimeType], member[.encoding]]] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[addStringContent] operator[SEP] Keyword[final] identifier[Part] identifier[part] , Keyword[final] identifier[String] identifier[content] operator[SEP] Keyword[throws] identifier[MessagingException] , identifier[UnsupportedEncodingException] { Keyword[final] identifier[String] identifier[contentType] operator[=] identifier[part] operator[SEP] identifier[getContentType] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[encoding] operator[=] identifier[EmailUtil] operator[SEP] identifier[extractEncoding] operator[SEP] identifier[contentType] , identifier[StringPool] operator[SEP] identifier[US_ASCII] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[disposition] operator[=] identifier[part] operator[SEP] identifier[getDisposition] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[disposition] operator[!=] Other[null] operator[&&] identifier[disposition] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[Part] operator[SEP] identifier[ATTACHMENT] operator[SEP] operator[SEP] { identifier[addAttachment] operator[SEP] identifier[part] , identifier[content] operator[SEP] identifier[getBytes] operator[SEP] identifier[encoding] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[final] identifier[String] identifier[mimeType] operator[=] identifier[EmailUtil] operator[SEP] identifier[extractMimeType] operator[SEP] identifier[contentType] operator[SEP] operator[SEP] identifier[message] operator[SEP] identifier[content] , identifier[mimeType] , identifier[encoding] operator[SEP] operator[SEP] } }
@ObjectiveCName("findTextMessagesWithPeer:withQuery:") public Command<List<MessageSearchEntity>> findTextMessages(Peer peer, String query) { return callback -> modules.getSearchModule().findTextMessages(peer, query) .then(v -> callback.onResult(v)) .failure(e -> callback.onError(e)); }
class class_name[name] begin[{] method[findTextMessages, return_type[type[Command]], modifier[public], parameter[peer, query]] begin[{] return[LambdaExpression(body=MethodInvocation(arguments=[], member=getSearchModule, postfix_operators=[], prefix_operators=[], qualifier=modules, selectors=[MethodInvocation(arguments=[MemberReference(member=peer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=query, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=findTextMessages, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onResult, postfix_operators=[], prefix_operators=[], qualifier=callback, selectors=[], type_arguments=None), parameters=[MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])], member=then, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onError, postfix_operators=[], prefix_operators=[], qualifier=callback, selectors=[], type_arguments=None), parameters=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])], member=failure, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), parameters=[MemberReference(member=callback, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])] end[}] END[}]
annotation[@] identifier[ObjectiveCName] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[Command] operator[<] identifier[List] operator[<] identifier[MessageSearchEntity] operator[>] operator[>] identifier[findTextMessages] operator[SEP] identifier[Peer] identifier[peer] , identifier[String] identifier[query] operator[SEP] { Keyword[return] identifier[callback] operator[->] identifier[modules] operator[SEP] identifier[getSearchModule] operator[SEP] operator[SEP] operator[SEP] identifier[findTextMessages] operator[SEP] identifier[peer] , identifier[query] operator[SEP] operator[SEP] identifier[then] operator[SEP] identifier[v] operator[->] identifier[callback] operator[SEP] identifier[onResult] operator[SEP] identifier[v] operator[SEP] operator[SEP] operator[SEP] identifier[failure] operator[SEP] identifier[e] operator[->] identifier[callback] operator[SEP] identifier[onError] operator[SEP] identifier[e] operator[SEP] operator[SEP] operator[SEP] }
@Override public CommerceWarehouse fetchByPrimaryKey(Serializable primaryKey) { Serializable serializable = entityCache.getResult(CommerceWarehouseModelImpl.ENTITY_CACHE_ENABLED, CommerceWarehouseImpl.class, primaryKey); if (serializable == nullModel) { return null; } CommerceWarehouse commerceWarehouse = (CommerceWarehouse)serializable; if (commerceWarehouse == null) { Session session = null; try { session = openSession(); commerceWarehouse = (CommerceWarehouse)session.get(CommerceWarehouseImpl.class, primaryKey); if (commerceWarehouse != null) { cacheResult(commerceWarehouse); } else { entityCache.putResult(CommerceWarehouseModelImpl.ENTITY_CACHE_ENABLED, CommerceWarehouseImpl.class, primaryKey, nullModel); } } catch (Exception e) { entityCache.removeResult(CommerceWarehouseModelImpl.ENTITY_CACHE_ENABLED, CommerceWarehouseImpl.class, primaryKey); throw processException(e); } finally { closeSession(session); } } return commerceWarehouse; }
class class_name[name] begin[{] method[fetchByPrimaryKey, return_type[type[CommerceWarehouse]], modifier[public], parameter[primaryKey]] begin[{] local_variable[type[Serializable], serializable] if[binary_operation[member[.serializable], ==, member[.nullModel]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[CommerceWarehouse], commerceWarehouse] if[binary_operation[member[.commerceWarehouse], ==, literal[null]]] begin[{] local_variable[type[Session], session] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=openSession, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=commerceWarehouse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CommerceWarehouseImpl, sub_type=None)), MemberReference(member=primaryKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=session, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=CommerceWarehouse, sub_type=None))), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=commerceWarehouse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ENTITY_CACHE_ENABLED, postfix_operators=[], prefix_operators=[], qualifier=CommerceWarehouseModelImpl, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CommerceWarehouseImpl, sub_type=None)), MemberReference(member=primaryKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=nullModel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=putResult, postfix_operators=[], prefix_operators=[], qualifier=entityCache, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=commerceWarehouse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=cacheResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ENTITY_CACHE_ENABLED, postfix_operators=[], prefix_operators=[], qualifier=CommerceWarehouseModelImpl, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CommerceWarehouseImpl, sub_type=None)), MemberReference(member=primaryKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeResult, postfix_operators=[], prefix_operators=[], qualifier=entityCache, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=closeSession, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, resources=None) else begin[{] None end[}] return[member[.commerceWarehouse]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CommerceWarehouse] identifier[fetchByPrimaryKey] operator[SEP] identifier[Serializable] identifier[primaryKey] operator[SEP] { identifier[Serializable] identifier[serializable] operator[=] identifier[entityCache] operator[SEP] identifier[getResult] operator[SEP] identifier[CommerceWarehouseModelImpl] operator[SEP] identifier[ENTITY_CACHE_ENABLED] , identifier[CommerceWarehouseImpl] operator[SEP] Keyword[class] , identifier[primaryKey] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[serializable] operator[==] identifier[nullModel] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[CommerceWarehouse] identifier[commerceWarehouse] operator[=] operator[SEP] identifier[CommerceWarehouse] operator[SEP] identifier[serializable] operator[SEP] Keyword[if] operator[SEP] identifier[commerceWarehouse] operator[==] Other[null] operator[SEP] { identifier[Session] identifier[session] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[session] operator[=] identifier[openSession] operator[SEP] operator[SEP] operator[SEP] identifier[commerceWarehouse] operator[=] operator[SEP] identifier[CommerceWarehouse] operator[SEP] identifier[session] operator[SEP] identifier[get] operator[SEP] identifier[CommerceWarehouseImpl] operator[SEP] Keyword[class] , identifier[primaryKey] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[commerceWarehouse] operator[!=] Other[null] operator[SEP] { identifier[cacheResult] operator[SEP] identifier[commerceWarehouse] operator[SEP] operator[SEP] } Keyword[else] { identifier[entityCache] operator[SEP] identifier[putResult] operator[SEP] identifier[CommerceWarehouseModelImpl] operator[SEP] identifier[ENTITY_CACHE_ENABLED] , identifier[CommerceWarehouseImpl] operator[SEP] Keyword[class] , identifier[primaryKey] , identifier[nullModel] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[entityCache] operator[SEP] identifier[removeResult] operator[SEP] identifier[CommerceWarehouseModelImpl] operator[SEP] identifier[ENTITY_CACHE_ENABLED] , identifier[CommerceWarehouseImpl] operator[SEP] Keyword[class] , identifier[primaryKey] operator[SEP] operator[SEP] Keyword[throw] identifier[processException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[finally] { identifier[closeSession] operator[SEP] identifier[session] operator[SEP] operator[SEP] } } Keyword[return] identifier[commerceWarehouse] operator[SEP] }
public RunParams params(Map<String, Object> params) { if (params == null) { throw new NullPointerException("\"params\" parameter can not be null"); } this.params.putAll(params); return this; }
class class_name[name] begin[{] method[params, return_type[type[RunParams]], modifier[public], parameter[params]] begin[{] if[binary_operation[member[.params], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\"params\" parameter can not be null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NullPointerException, sub_type=None)), label=None) else begin[{] None end[}] THIS[member[None.params]call[None.putAll, parameter[member[.params]]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[RunParams] identifier[params] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[params] operator[SEP] { Keyword[if] operator[SEP] identifier[params] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[params] operator[SEP] identifier[putAll] operator[SEP] identifier[params] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public <E> E findOneByProperty(final Class<E> entityType, final String name, final Object value) { return query(dbOom.entities().findByColumn(entityType, name, value)).autoClose().find(entityType); }
class class_name[name] begin[{] method[findOneByProperty, return_type[type[E]], modifier[public], parameter[entityType, name, value]] begin[{] return[call[.query, parameter[call[dbOom.entities, parameter[]]]]] end[}] END[}]
Keyword[public] operator[<] identifier[E] operator[>] identifier[E] identifier[findOneByProperty] operator[SEP] Keyword[final] identifier[Class] operator[<] identifier[E] operator[>] identifier[entityType] , Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[Object] identifier[value] operator[SEP] { Keyword[return] identifier[query] operator[SEP] identifier[dbOom] operator[SEP] identifier[entities] operator[SEP] operator[SEP] operator[SEP] identifier[findByColumn] operator[SEP] identifier[entityType] , identifier[name] , identifier[value] operator[SEP] operator[SEP] operator[SEP] identifier[autoClose] operator[SEP] operator[SEP] operator[SEP] identifier[find] operator[SEP] identifier[entityType] operator[SEP] operator[SEP] }
public static ExtensibleConfigurationPersister createDomainXmlConfigurationPersister(final ConfigurationFile file, ExecutorService executorService, ExtensionRegistry extensionRegistry, final HostControllerEnvironment environment) { DomainXml domainXml = new DomainXml(Module.getBootModuleLoader(), executorService, extensionRegistry); boolean suppressLoad = false; ConfigurationFile.InteractionPolicy policy = file.getInteractionPolicy(); final boolean isReloaded = environment.getRunningModeControl().isReloaded(); if (!isReloaded && (policy == ConfigurationFile.InteractionPolicy.NEW && (file.getBootFile().exists() && file.getBootFile().length() != 0))) { throw HostControllerLogger.ROOT_LOGGER.cannotOverwriteDomainXmlWithEmpty(file.getBootFile().getName()); } if (!isReloaded && (policy == ConfigurationFile.InteractionPolicy.NEW || policy == ConfigurationFile.InteractionPolicy.DISCARD)) { suppressLoad = true; } BackupXmlConfigurationPersister persister = new BackupXmlConfigurationPersister(file, new QName(Namespace.CURRENT.getUriString(), "domain"), domainXml, domainXml, suppressLoad); for (Namespace namespace : Namespace.domainValues()) { if (!namespace.equals(Namespace.CURRENT)) { persister.registerAdditionalRootElement(new QName(namespace.getUriString(), "domain"), domainXml); } } extensionRegistry.setWriterRegistry(persister); return persister; }
class class_name[name] begin[{] method[createDomainXmlConfigurationPersister, return_type[type[ExtensibleConfigurationPersister]], modifier[public static], parameter[file, executorService, extensionRegistry, environment]] begin[{] local_variable[type[DomainXml], domainXml] local_variable[type[boolean], suppressLoad] local_variable[type[ConfigurationFile], policy] local_variable[type[boolean], isReloaded] if[binary_operation[member[.isReloaded], &&, binary_operation[binary_operation[member[.policy], ==, member[ConfigurationFile.InteractionPolicy.NEW]], &&, binary_operation[call[file.getBootFile, parameter[]], &&, binary_operation[call[file.getBootFile, parameter[]], !=, literal[0]]]]]] begin[{] ThrowStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getBootFile, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=cannotOverwriteDomainXmlWithEmpty, postfix_operators=[], prefix_operators=[], qualifier=HostControllerLogger.ROOT_LOGGER, selectors=[], type_arguments=None), label=None) else begin[{] None end[}] if[binary_operation[member[.isReloaded], &&, binary_operation[binary_operation[member[.policy], ==, member[ConfigurationFile.InteractionPolicy.NEW]], ||, binary_operation[member[.policy], ==, member[ConfigurationFile.InteractionPolicy.DISCARD]]]]] begin[{] assign[member[.suppressLoad], literal[true]] else begin[{] None end[}] local_variable[type[BackupXmlConfigurationPersister], persister] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=CURRENT, postfix_operators=[], prefix_operators=[], qualifier=Namespace, selectors=[])], member=equals, postfix_operators=[], prefix_operators=['!'], qualifier=namespace, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getUriString, postfix_operators=[], prefix_operators=[], qualifier=namespace, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="domain")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=QName, sub_type=None)), MemberReference(member=domainXml, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=registerAdditionalRootElement, postfix_operators=[], prefix_operators=[], qualifier=persister, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=domainValues, postfix_operators=[], prefix_operators=[], qualifier=Namespace, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=namespace)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Namespace, sub_type=None))), label=None) call[extensionRegistry.setWriterRegistry, parameter[member[.persister]]] return[member[.persister]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ExtensibleConfigurationPersister] identifier[createDomainXmlConfigurationPersister] operator[SEP] Keyword[final] identifier[ConfigurationFile] identifier[file] , identifier[ExecutorService] identifier[executorService] , identifier[ExtensionRegistry] identifier[extensionRegistry] , Keyword[final] identifier[HostControllerEnvironment] identifier[environment] operator[SEP] { identifier[DomainXml] identifier[domainXml] operator[=] Keyword[new] identifier[DomainXml] operator[SEP] identifier[Module] operator[SEP] identifier[getBootModuleLoader] operator[SEP] operator[SEP] , identifier[executorService] , identifier[extensionRegistry] operator[SEP] operator[SEP] Keyword[boolean] identifier[suppressLoad] operator[=] literal[boolean] operator[SEP] identifier[ConfigurationFile] operator[SEP] identifier[InteractionPolicy] identifier[policy] operator[=] identifier[file] operator[SEP] identifier[getInteractionPolicy] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[boolean] identifier[isReloaded] operator[=] identifier[environment] operator[SEP] identifier[getRunningModeControl] operator[SEP] operator[SEP] operator[SEP] identifier[isReloaded] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isReloaded] operator[&&] operator[SEP] identifier[policy] operator[==] identifier[ConfigurationFile] operator[SEP] identifier[InteractionPolicy] operator[SEP] identifier[NEW] operator[&&] operator[SEP] identifier[file] operator[SEP] identifier[getBootFile] operator[SEP] operator[SEP] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[&&] identifier[file] operator[SEP] identifier[getBootFile] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[!=] Other[0] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] identifier[HostControllerLogger] operator[SEP] identifier[ROOT_LOGGER] operator[SEP] identifier[cannotOverwriteDomainXmlWithEmpty] operator[SEP] identifier[file] operator[SEP] identifier[getBootFile] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[isReloaded] operator[&&] operator[SEP] identifier[policy] operator[==] identifier[ConfigurationFile] operator[SEP] identifier[InteractionPolicy] operator[SEP] identifier[NEW] operator[||] identifier[policy] operator[==] identifier[ConfigurationFile] operator[SEP] identifier[InteractionPolicy] operator[SEP] identifier[DISCARD] operator[SEP] operator[SEP] { identifier[suppressLoad] operator[=] literal[boolean] operator[SEP] } identifier[BackupXmlConfigurationPersister] identifier[persister] operator[=] Keyword[new] identifier[BackupXmlConfigurationPersister] operator[SEP] identifier[file] , Keyword[new] identifier[QName] operator[SEP] identifier[Namespace] operator[SEP] identifier[CURRENT] operator[SEP] identifier[getUriString] operator[SEP] operator[SEP] , literal[String] operator[SEP] , identifier[domainXml] , identifier[domainXml] , identifier[suppressLoad] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Namespace] identifier[namespace] operator[:] identifier[Namespace] operator[SEP] identifier[domainValues] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[namespace] operator[SEP] identifier[equals] operator[SEP] identifier[Namespace] operator[SEP] identifier[CURRENT] operator[SEP] operator[SEP] { identifier[persister] operator[SEP] identifier[registerAdditionalRootElement] operator[SEP] Keyword[new] identifier[QName] operator[SEP] identifier[namespace] operator[SEP] identifier[getUriString] operator[SEP] operator[SEP] , literal[String] operator[SEP] , identifier[domainXml] operator[SEP] operator[SEP] } } identifier[extensionRegistry] operator[SEP] identifier[setWriterRegistry] operator[SEP] identifier[persister] operator[SEP] operator[SEP] Keyword[return] identifier[persister] operator[SEP] }
@Trivial protected void activate(ComponentContext context) throws Exception { Dictionary<String, ?> props = context.getProperties(); final boolean trace = TraceComponent.isAnyTracingEnabled(); if (trace && tc.isEntryEnabled()) Tr.entry(this, tc, "activate", props); destinationRef.activate(context); bootstrapContextRef.activate(context); rrsXAResFactorySvcRef.activate(context); componentContext = context; activationSpecClassName = (String) props.get(CONFIG_PROPS_PREFIX + "activationspec-class"); id = (String) context.getProperties().get(ID); // filter out actual config properties for the activation specification for (Enumeration<String> keys = props.keys(); keys.hasMoreElements();) { String key = keys.nextElement(); if (key.length() > CONFIG_PROPS_PREFIX_LENGTH && key.charAt(CONFIG_PROPS_PREFIX_LENGTH - 1) == '.' && key.startsWith(CONFIG_PROPS_PREFIX)) { String propName = key.substring(CONFIG_PROPS_PREFIX_LENGTH); if (propName.indexOf('.') < 0 && propName.indexOf('-') < 0 && !"destinationRef".equals(propName)) configProps.put(propName, props.get(key)); } } requiredConfigProps = (String[]) props.get(CONFIG_PROPS_PREFIX + "required-config-property"); if (trace && tc.isEntryEnabled()) Tr.exit(this, tc, "activate"); }
class class_name[name] begin[{] method[activate, return_type[void], modifier[protected], parameter[context]] begin[{] local_variable[type[Dictionary], props] local_variable[type[boolean], trace] if[binary_operation[member[.trace], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.entry, parameter[THIS[], member[.tc], literal["activate"], member[.props]]] else begin[{] None end[}] call[destinationRef.activate, parameter[member[.context]]] call[bootstrapContextRef.activate, parameter[member[.context]]] call[rrsXAResFactorySvcRef.activate, parameter[member[.context]]] assign[member[.componentContext], member[.context]] assign[member[.activationSpecClassName], Cast(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=CONFIG_PROPS_PREFIX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="activationspec-class"), operator=+)], member=get, postfix_operators=[], prefix_operators=[], qualifier=props, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))] assign[member[.id], Cast(expression=MethodInvocation(arguments=[], member=getProperties, postfix_operators=[], prefix_operators=[], qualifier=context, selectors=[MethodInvocation(arguments=[MemberReference(member=ID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=nextElement, postfix_operators=[], prefix_operators=[], qualifier=keys, selectors=[], type_arguments=None), name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=key, selectors=[], type_arguments=None), operandr=MemberReference(member=CONFIG_PROPS_PREFIX_LENGTH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=CONFIG_PROPS_PREFIX_LENGTH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=key, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='.'), operator===), operator=&&), operandr=MethodInvocation(arguments=[MemberReference(member=CONFIG_PROPS_PREFIX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=key, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=CONFIG_PROPS_PREFIX_LENGTH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=key, selectors=[], type_arguments=None), name=propName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='.')], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=propName, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='-')], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=propName, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), operator=&&), operandr=Literal(postfix_operators=[], prefix_operators=['!'], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=propName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], value="destinationRef"), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=propName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=props, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=configProps, selectors=[], type_arguments=None), label=None))]))]), control=ForControl(condition=MethodInvocation(arguments=[], member=hasMoreElements, postfix_operators=[], prefix_operators=[], qualifier=keys, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=keys, postfix_operators=[], prefix_operators=[], qualifier=props, selectors=[], type_arguments=None), name=keys)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=Enumeration, sub_type=None)), update=None), label=None) assign[member[.requiredConfigProps], Cast(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=CONFIG_PROPS_PREFIX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="required-config-property"), operator=+)], member=get, postfix_operators=[], prefix_operators=[], qualifier=props, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None))] if[binary_operation[member[.trace], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.exit, parameter[THIS[], member[.tc], literal["activate"]]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Trivial] Keyword[protected] Keyword[void] identifier[activate] operator[SEP] identifier[ComponentContext] identifier[context] operator[SEP] Keyword[throws] identifier[Exception] { identifier[Dictionary] operator[<] identifier[String] , operator[?] operator[>] identifier[props] operator[=] identifier[context] operator[SEP] identifier[getProperties] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[boolean] identifier[trace] operator[=] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[trace] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[entry] operator[SEP] Keyword[this] , identifier[tc] , literal[String] , identifier[props] operator[SEP] operator[SEP] identifier[destinationRef] operator[SEP] identifier[activate] operator[SEP] identifier[context] operator[SEP] operator[SEP] identifier[bootstrapContextRef] operator[SEP] identifier[activate] operator[SEP] identifier[context] operator[SEP] operator[SEP] identifier[rrsXAResFactorySvcRef] operator[SEP] identifier[activate] operator[SEP] identifier[context] operator[SEP] operator[SEP] identifier[componentContext] operator[=] identifier[context] operator[SEP] identifier[activationSpecClassName] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[props] operator[SEP] identifier[get] operator[SEP] identifier[CONFIG_PROPS_PREFIX] operator[+] literal[String] operator[SEP] operator[SEP] identifier[id] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[context] operator[SEP] identifier[getProperties] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[ID] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Enumeration] operator[<] identifier[String] operator[>] identifier[keys] operator[=] identifier[props] operator[SEP] identifier[keys] operator[SEP] operator[SEP] operator[SEP] identifier[keys] operator[SEP] identifier[hasMoreElements] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[key] operator[=] identifier[keys] operator[SEP] identifier[nextElement] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[key] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] identifier[CONFIG_PROPS_PREFIX_LENGTH] operator[&&] identifier[key] operator[SEP] identifier[charAt] operator[SEP] identifier[CONFIG_PROPS_PREFIX_LENGTH] operator[-] Other[1] operator[SEP] operator[==] literal[String] operator[&&] identifier[key] operator[SEP] identifier[startsWith] operator[SEP] identifier[CONFIG_PROPS_PREFIX] operator[SEP] operator[SEP] { identifier[String] identifier[propName] operator[=] identifier[key] operator[SEP] identifier[substring] operator[SEP] identifier[CONFIG_PROPS_PREFIX_LENGTH] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[propName] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[<] Other[0] operator[&&] identifier[propName] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[<] Other[0] operator[&&] operator[!] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[propName] operator[SEP] operator[SEP] identifier[configProps] operator[SEP] identifier[put] operator[SEP] identifier[propName] , identifier[props] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] operator[SEP] } } identifier[requiredConfigProps] operator[=] operator[SEP] identifier[String] operator[SEP] operator[SEP] operator[SEP] identifier[props] operator[SEP] identifier[get] operator[SEP] identifier[CONFIG_PROPS_PREFIX] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[trace] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] }
public java.util.List<FlowLog> getFlowLogs() { if (flowLogs == null) { flowLogs = new com.amazonaws.internal.SdkInternalList<FlowLog>(); } return flowLogs; }
class class_name[name] begin[{] method[getFlowLogs, return_type[type[java]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.flowLogs], ==, literal[null]]] begin[{] assign[member[.flowLogs], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=amazonaws, sub_type=ReferenceType(arguments=None, dimensions=None, name=internal, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=FlowLog, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))] else begin[{] None end[}] return[member[.flowLogs]] end[}] END[}]
Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[FlowLog] operator[>] identifier[getFlowLogs] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[flowLogs] operator[==] Other[null] operator[SEP] { identifier[flowLogs] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[FlowLog] operator[>] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[flowLogs] operator[SEP] }
private List<GovernmentBodyAnnualOutcomeSummary> getGovernmentBodyList() { final List<GovernmentBodyAnnualOutcomeSummary> result = new ArrayList<>(); try { result.addAll(esvGovernmentBodyOperationOutcomeReader.readIncomeCsv()); result.addAll(esvGovernmentBodyOperationOutcomeReader.readOutgoingCsv()); } catch (final IOException e) { LOGGER.error(GET_GOVERNMENT_BODY_REPORT,e); return result; } return result; }
class class_name[name] begin[{] method[getGovernmentBodyList, return_type[type[List]], modifier[private], parameter[]] begin[{] local_variable[type[List], result] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=readIncomeCsv, postfix_operators=[], prefix_operators=[], qualifier=esvGovernmentBodyOperationOutcomeReader, selectors=[], type_arguments=None)], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=readOutgoingCsv, postfix_operators=[], prefix_operators=[], qualifier=esvGovernmentBodyOperationOutcomeReader, selectors=[], type_arguments=None)], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=GET_GOVERNMENT_BODY_REPORT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) return[member[.result]] end[}] END[}]
Keyword[private] identifier[List] operator[<] identifier[GovernmentBodyAnnualOutcomeSummary] operator[>] identifier[getGovernmentBodyList] operator[SEP] operator[SEP] { Keyword[final] identifier[List] operator[<] identifier[GovernmentBodyAnnualOutcomeSummary] operator[>] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[result] operator[SEP] identifier[addAll] operator[SEP] identifier[esvGovernmentBodyOperationOutcomeReader] operator[SEP] identifier[readIncomeCsv] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[addAll] operator[SEP] identifier[esvGovernmentBodyOperationOutcomeReader] operator[SEP] identifier[readOutgoingCsv] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[IOException] identifier[e] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[error] operator[SEP] identifier[GET_GOVERNMENT_BODY_REPORT] , identifier[e] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public String[] getIdentifiers() { final PerSessionInfo[] infos; synchronized (sessions) { infos = (PerSessionInfo[]) sessions.values().toArray(new PerSessionInfo[sessions.size()]); } int count = 0; for (int i = 0; i < infos.length; ++i) { if (infos[i] != null && infos[i].identifier != null) { ++count; } } if (count > 0) { final String[] result = new String[count]; int index = 0; for (int i = 0; i < infos.length; ++i) { if (infos[i] != null && infos[i].identifier != null) { result[index++] = infos[i].identifier; } } return result; } else { return null; } }
class class_name[name] begin[{] method[getIdentifiers, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[PerSessionInfo], infos] SYNCHRONIZED[member[.sessions]] BEGIN[{] assign[member[.infos], Cast(expression=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=sessions, selectors=[MethodInvocation(arguments=[ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=sessions, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PerSessionInfo, sub_type=None))], member=toArray, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[None], name=PerSessionInfo, sub_type=None))] END[}] local_variable[type[int], count] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=infos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MemberReference(member=infos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=identifier, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=count, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=infos, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None) if[binary_operation[member[.count], >, literal[0]]] begin[{] local_variable[type[String], result] local_variable[type[int], index] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=infos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MemberReference(member=infos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=identifier, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=index, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=infos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=identifier, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=infos, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None) return[member[.result]] else begin[{] return[literal[null]] end[}] end[}] END[}]
Keyword[public] identifier[String] operator[SEP] operator[SEP] identifier[getIdentifiers] operator[SEP] operator[SEP] { Keyword[final] identifier[PerSessionInfo] operator[SEP] operator[SEP] identifier[infos] operator[SEP] Keyword[synchronized] operator[SEP] identifier[sessions] operator[SEP] { identifier[infos] operator[=] operator[SEP] identifier[PerSessionInfo] operator[SEP] operator[SEP] operator[SEP] identifier[sessions] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[PerSessionInfo] operator[SEP] identifier[sessions] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[int] identifier[count] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[infos] operator[SEP] identifier[length] operator[SEP] operator[++] identifier[i] operator[SEP] { Keyword[if] operator[SEP] identifier[infos] operator[SEP] identifier[i] operator[SEP] operator[!=] Other[null] operator[&&] identifier[infos] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[identifier] operator[!=] Other[null] operator[SEP] { operator[++] identifier[count] operator[SEP] } } Keyword[if] operator[SEP] identifier[count] operator[>] Other[0] operator[SEP] { Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[result] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[count] operator[SEP] operator[SEP] Keyword[int] identifier[index] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[infos] operator[SEP] identifier[length] operator[SEP] operator[++] identifier[i] operator[SEP] { Keyword[if] operator[SEP] identifier[infos] operator[SEP] identifier[i] operator[SEP] operator[!=] Other[null] operator[&&] identifier[infos] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[identifier] operator[!=] Other[null] operator[SEP] { identifier[result] operator[SEP] identifier[index] operator[++] operator[SEP] operator[=] identifier[infos] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[identifier] operator[SEP] } } Keyword[return] identifier[result] operator[SEP] } Keyword[else] { Keyword[return] Other[null] operator[SEP] } }
protected Record locateRecord (int key) { int index = Math.abs(key)%_buckets.length; for (Record rec = _buckets[index]; rec != null; rec = rec.next) { if (rec.key == key) { return rec; } } return null; }
class class_name[name] begin[{] method[locateRecord, return_type[type[Record]], modifier[protected], parameter[key]] begin[{] local_variable[type[int], index] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=rec, selectors=[]), operandr=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=rec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=rec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=_buckets, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=rec)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Record, sub_type=None)), update=[Assignment(expressionl=MemberReference(member=rec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=next, postfix_operators=[], prefix_operators=[], qualifier=rec, selectors=[]))]), label=None) return[literal[null]] end[}] END[}]
Keyword[protected] identifier[Record] identifier[locateRecord] operator[SEP] Keyword[int] identifier[key] operator[SEP] { Keyword[int] identifier[index] operator[=] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[key] operator[SEP] operator[%] identifier[_buckets] operator[SEP] identifier[length] operator[SEP] Keyword[for] operator[SEP] identifier[Record] identifier[rec] operator[=] identifier[_buckets] operator[SEP] identifier[index] operator[SEP] operator[SEP] identifier[rec] operator[!=] Other[null] operator[SEP] identifier[rec] operator[=] identifier[rec] operator[SEP] identifier[next] operator[SEP] { Keyword[if] operator[SEP] identifier[rec] operator[SEP] identifier[key] operator[==] identifier[key] operator[SEP] { Keyword[return] identifier[rec] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
public java.util.List<ResultAttribute> getResultAttributes() { if (resultAttributes == null) { resultAttributes = new com.amazonaws.internal.SdkInternalList<ResultAttribute>(); } return resultAttributes; }
class class_name[name] begin[{] method[getResultAttributes, return_type[type[java]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.resultAttributes], ==, literal[null]]] begin[{] assign[member[.resultAttributes], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=amazonaws, sub_type=ReferenceType(arguments=None, dimensions=None, name=internal, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ResultAttribute, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))] else begin[{] None end[}] return[member[.resultAttributes]] end[}] END[}]
Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[ResultAttribute] operator[>] identifier[getResultAttributes] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[resultAttributes] operator[==] Other[null] operator[SEP] { identifier[resultAttributes] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[ResultAttribute] operator[>] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[resultAttributes] operator[SEP] }
protected void checkAlert(Page page) throws FailureException { if (!DriverFactory.IE.equals(Context.getBrowser())) { final String txt = getAlertMessage(); if (txt != null) { new Result.Failure<>(txt, Messages.getMessage(Messages.FAIL_MESSAGE_ALERT_FOUND), true, page.getCallBack()); } } else { Context.getCurrentScenario().write("SKIPPED for Internet Explorer browser."); } }
class class_name[name] begin[{] method[checkAlert, return_type[void], modifier[protected], parameter[page]] begin[{] if[call[DriverFactory.IE.equals, parameter[call[Context.getBrowser, parameter[]]]]] begin[{] local_variable[type[String], txt] if[binary_operation[member[.txt], !=, literal[null]]] begin[{] ClassCreator(arguments=[MemberReference(member=txt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=FAIL_MESSAGE_ALERT_FOUND, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[])], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), MethodInvocation(arguments=[], member=getCallBack, postfix_operators=[], prefix_operators=[], qualifier=page, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Result, sub_type=ReferenceType(arguments=[], dimensions=None, name=Failure, sub_type=None))) else begin[{] None end[}] else begin[{] call[Context.getCurrentScenario, parameter[]] end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[checkAlert] operator[SEP] identifier[Page] identifier[page] operator[SEP] Keyword[throws] identifier[FailureException] { Keyword[if] operator[SEP] operator[!] identifier[DriverFactory] operator[SEP] identifier[IE] operator[SEP] identifier[equals] operator[SEP] identifier[Context] operator[SEP] identifier[getBrowser] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[String] identifier[txt] operator[=] identifier[getAlertMessage] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[txt] operator[!=] Other[null] operator[SEP] { Keyword[new] identifier[Result] operator[SEP] identifier[Failure] operator[<] operator[>] operator[SEP] identifier[txt] , identifier[Messages] operator[SEP] identifier[getMessage] operator[SEP] identifier[Messages] operator[SEP] identifier[FAIL_MESSAGE_ALERT_FOUND] operator[SEP] , literal[boolean] , identifier[page] operator[SEP] identifier[getCallBack] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[Context] operator[SEP] identifier[getCurrentScenario] operator[SEP] operator[SEP] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] } }
private Date stdDateTimeFormat(String text) throws java.text.ParseException { text = (text == null) ? "" : text.trim(); stdDateTimeFormat(); return stdDateTimeFormat.parse(text); }
class class_name[name] begin[{] method[stdDateTimeFormat, return_type[type[Date]], modifier[private], parameter[text]] begin[{] assign[member[.text], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=text, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[], member=trim, postfix_operators=[], prefix_operators=[], qualifier=text, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""))] call[.stdDateTimeFormat, parameter[]] return[call[stdDateTimeFormat.parse, parameter[member[.text]]]] end[}] END[}]
Keyword[private] identifier[Date] identifier[stdDateTimeFormat] operator[SEP] identifier[String] identifier[text] operator[SEP] Keyword[throws] identifier[java] operator[SEP] identifier[text] operator[SEP] identifier[ParseException] { identifier[text] operator[=] operator[SEP] identifier[text] operator[==] Other[null] operator[SEP] operator[?] literal[String] operator[:] identifier[text] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[stdDateTimeFormat] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[stdDateTimeFormat] operator[SEP] identifier[parse] operator[SEP] identifier[text] operator[SEP] operator[SEP] }
@Nullable public final AnalyzedTokenReadings[] getUnifiedTokens() { if (tokSequence.isEmpty()) { return null; } List<AnalyzedTokenReadings> uTokens = new ArrayList<>(); for (int j = 0; j < tokSequence.size(); j++) { boolean unifiedTokensFound = false; // assume that nothing has been found for (int i = 0; i < tokSequenceEquivalences.get(j).size(); i++) { int featUnified = 0; if (tokSequenceEquivalences.get(j).get(i).containsKey(UNIFY_IGNORE)) { addTokenToSequence(uTokens, tokSequence.get(j).getAnalyzedToken(i), j); unifiedTokensFound = true; } else { for (Map.Entry<String, List<String>> feat : unificationFeats.entrySet()) { if (tokSequenceEquivalences.get(j).get(i).containsKey(feat.getKey()) && tokSequenceEquivalences.get(j).get(i).get(feat.getKey()).isEmpty()) { featUnified = 0; } else { featUnified++; } if (featUnified == unificationFeats.entrySet().size()) { addTokenToSequence(uTokens, tokSequence.get(j).getAnalyzedToken(i), j); unifiedTokensFound = true; } } } } if (!unifiedTokensFound) { return null; } } return uTokens.toArray(new AnalyzedTokenReadings[0]); }
class class_name[name] begin[{] method[getUnifiedTokens, return_type[type[AnalyzedTokenReadings]], modifier[final public], parameter[]] begin[{] if[call[tokSequence.isEmpty, parameter[]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[List], uTokens] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=unifiedTokensFound)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=featUnified)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=tokSequenceEquivalences, selectors=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=UNIFY_IGNORE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=tokSequenceEquivalences, selectors=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=feat, selectors=[], type_arguments=None)], member=containsKey, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=tokSequenceEquivalences, selectors=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=feat, selectors=[], type_arguments=None)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=isEmpty, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=&&), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=featUnified, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=featUnified, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=featUnified, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=unificationFeats, selectors=[MethodInvocation(arguments=[], member=size, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=uTokens, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=tokSequence, selectors=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAnalyzedToken, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addTokenToSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=unifiedTokensFound, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=unificationFeats, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=feat)], 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=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=List, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=uTokens, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=tokSequence, selectors=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAnalyzedToken, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addTokenToSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=unifiedTokensFound, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=tokSequenceEquivalences, selectors=[MethodInvocation(arguments=[], member=size, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), IfStatement(condition=MemberReference(member=unifiedTokensFound, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=tokSequence, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[call[uTokens.toArray, parameter[ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AnalyzedTokenReadings, sub_type=None))]]] end[}] END[}]
annotation[@] identifier[Nullable] Keyword[public] Keyword[final] identifier[AnalyzedTokenReadings] operator[SEP] operator[SEP] identifier[getUnifiedTokens] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[tokSequence] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[List] operator[<] identifier[AnalyzedTokenReadings] operator[>] identifier[uTokens] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[tokSequence] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[boolean] identifier[unifiedTokensFound] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[tokSequenceEquivalences] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[int] identifier[featUnified] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[tokSequenceEquivalences] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[containsKey] operator[SEP] identifier[UNIFY_IGNORE] operator[SEP] operator[SEP] { identifier[addTokenToSequence] operator[SEP] identifier[uTokens] , identifier[tokSequence] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[getAnalyzedToken] operator[SEP] identifier[i] operator[SEP] , identifier[j] operator[SEP] operator[SEP] identifier[unifiedTokensFound] operator[=] literal[boolean] operator[SEP] } Keyword[else] { Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[List] operator[<] identifier[String] operator[>] operator[>] identifier[feat] operator[:] identifier[unificationFeats] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[tokSequenceEquivalences] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[containsKey] operator[SEP] identifier[feat] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] operator[&&] identifier[tokSequenceEquivalences] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[feat] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[featUnified] operator[=] Other[0] operator[SEP] } Keyword[else] { identifier[featUnified] operator[++] operator[SEP] } Keyword[if] operator[SEP] identifier[featUnified] operator[==] identifier[unificationFeats] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] { identifier[addTokenToSequence] operator[SEP] identifier[uTokens] , identifier[tokSequence] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[getAnalyzedToken] operator[SEP] identifier[i] operator[SEP] , identifier[j] operator[SEP] operator[SEP] identifier[unifiedTokensFound] operator[=] literal[boolean] operator[SEP] } } } } Keyword[if] operator[SEP] operator[!] identifier[unifiedTokensFound] operator[SEP] { Keyword[return] Other[null] operator[SEP] } } Keyword[return] identifier[uTokens] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[AnalyzedTokenReadings] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] }
public void strokeRoundRectangle(Rectangle rect, Color color, float linewidth, float r) { template.saveState(); setStroke(color, linewidth, null); template.roundRectangle(origX + rect.getLeft(), origY + rect.getBottom(), rect.getWidth(), rect.getHeight(), r); template.stroke(); template.restoreState(); }
class class_name[name] begin[{] method[strokeRoundRectangle, return_type[void], modifier[public], parameter[rect, color, linewidth, r]] begin[{] call[template.saveState, parameter[]] call[.setStroke, parameter[member[.color], member[.linewidth], literal[null]]] call[template.roundRectangle, parameter[binary_operation[member[.origX], +, call[rect.getLeft, parameter[]]], binary_operation[member[.origY], +, call[rect.getBottom, parameter[]]], call[rect.getWidth, parameter[]], call[rect.getHeight, parameter[]], member[.r]]] call[template.stroke, parameter[]] call[template.restoreState, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[strokeRoundRectangle] operator[SEP] identifier[Rectangle] identifier[rect] , identifier[Color] identifier[color] , Keyword[float] identifier[linewidth] , Keyword[float] identifier[r] operator[SEP] { identifier[template] operator[SEP] identifier[saveState] operator[SEP] operator[SEP] operator[SEP] identifier[setStroke] operator[SEP] identifier[color] , identifier[linewidth] , Other[null] operator[SEP] operator[SEP] identifier[template] operator[SEP] identifier[roundRectangle] operator[SEP] identifier[origX] operator[+] identifier[rect] operator[SEP] identifier[getLeft] operator[SEP] operator[SEP] , identifier[origY] operator[+] identifier[rect] operator[SEP] identifier[getBottom] operator[SEP] operator[SEP] , identifier[rect] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] , identifier[rect] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] , identifier[r] operator[SEP] operator[SEP] identifier[template] operator[SEP] identifier[stroke] operator[SEP] operator[SEP] operator[SEP] identifier[template] operator[SEP] identifier[restoreState] operator[SEP] operator[SEP] operator[SEP] }
protected Module addSerializer(SimpleModule module) { module.addSerializer(ConfigModel.class, Holder.CONFIG_MODEL_SERIALIZER); module.addSerializer(Config.class, Holder.CONFIG_SERIALIZER); module.addSerializer(Json.RawValue.class, Holder.RAW_VALUE_SERIALIZER); return module; }
class class_name[name] begin[{] method[addSerializer, return_type[type[Module]], modifier[protected], parameter[module]] begin[{] call[module.addSerializer, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ConfigModel, sub_type=None)), member[Holder.CONFIG_MODEL_SERIALIZER]]] call[module.addSerializer, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Config, sub_type=None)), member[Holder.CONFIG_SERIALIZER]]] call[module.addSerializer, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=Json, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RawValue, sub_type=None)), member[Holder.RAW_VALUE_SERIALIZER]]] return[member[.module]] end[}] END[}]
Keyword[protected] identifier[Module] identifier[addSerializer] operator[SEP] identifier[SimpleModule] identifier[module] operator[SEP] { identifier[module] operator[SEP] identifier[addSerializer] operator[SEP] identifier[ConfigModel] operator[SEP] Keyword[class] , identifier[Holder] operator[SEP] identifier[CONFIG_MODEL_SERIALIZER] operator[SEP] operator[SEP] identifier[module] operator[SEP] identifier[addSerializer] operator[SEP] identifier[Config] operator[SEP] Keyword[class] , identifier[Holder] operator[SEP] identifier[CONFIG_SERIALIZER] operator[SEP] operator[SEP] identifier[module] operator[SEP] identifier[addSerializer] operator[SEP] identifier[Json] operator[SEP] identifier[RawValue] operator[SEP] Keyword[class] , identifier[Holder] operator[SEP] identifier[RAW_VALUE_SERIALIZER] operator[SEP] operator[SEP] Keyword[return] identifier[module] operator[SEP] }
public static java.sql.Date toSqlDate(String monthStr, String dayStr, String yearStr) { java.util.Date newDate = toDate(monthStr, dayStr, yearStr, "0", "0", "0"); if (newDate != null) return new java.sql.Date(newDate.getTime()); else return null; }
class class_name[name] begin[{] method[toSqlDate, return_type[type[java]], modifier[public static], parameter[monthStr, dayStr, yearStr]] begin[{] local_variable[type[java], newDate] if[binary_operation[member[.newDate], !=, literal[null]]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getTime, postfix_operators=[], prefix_operators=[], qualifier=newDate, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=sql, sub_type=ReferenceType(arguments=None, dimensions=None, name=Date, sub_type=None))))] else begin[{] return[literal[null]] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[java] operator[SEP] identifier[sql] operator[SEP] identifier[Date] identifier[toSqlDate] operator[SEP] identifier[String] identifier[monthStr] , identifier[String] identifier[dayStr] , identifier[String] identifier[yearStr] operator[SEP] { identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Date] identifier[newDate] operator[=] identifier[toDate] operator[SEP] identifier[monthStr] , identifier[dayStr] , identifier[yearStr] , literal[String] , literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[newDate] operator[!=] Other[null] operator[SEP] Keyword[return] Keyword[new] identifier[java] operator[SEP] identifier[sql] operator[SEP] identifier[Date] operator[SEP] identifier[newDate] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[else] Keyword[return] Other[null] operator[SEP] }
private EmbeddedNeo4jConfiguration getEmbeddedNeo4jConfiguration() { OptionHelper.verifyDeprecatedOption(PARAMETER_SERVER_ADDRESS, this.serverAddress, PARAMETER_EMBEDDED_LISTEN_ADDRESS); OptionHelper.verifyDeprecatedOption(PARAMETER_SERVER_PORT, this.serverPort, PARAMETER_EMBEDDED_HTTP_PORT); EmbeddedNeo4jConfiguration embedded = store.getEmbedded(); EmbeddedNeo4jConfiguration.EmbeddedNeo4jConfigurationBuilder builder = EmbeddedNeo4jConfiguration.builder(); builder.connectorEnabled(embedded.isConnectorEnabled() || isConnectorRequired()); builder.listenAddress(OptionHelper.selectValue(embedded.getListenAddress(), this.serverAddress, embeddedListenAddress)); builder.boltPort(OptionHelper.selectValue(embedded.getBoltPort(), embeddedBoltPort)); builder.httpPort(OptionHelper.selectValue(embedded.getHttpPort(), this.serverPort, embeddedHttpPort)); builder.apocEnabled(OptionHelper.selectValue(embedded.isApocEnabled(), this.apocEnabled)); builder.graphAlgorithmsEnabled(OptionHelper.selectValue(embedded.isGraphAlgorithmsEnabled(), this.graphAlgorithmsEnabled)); return builder.build(); }
class class_name[name] begin[{] method[getEmbeddedNeo4jConfiguration, return_type[type[EmbeddedNeo4jConfiguration]], modifier[private], parameter[]] begin[{] call[OptionHelper.verifyDeprecatedOption, parameter[member[.PARAMETER_SERVER_ADDRESS], THIS[member[None.serverAddress]], member[.PARAMETER_EMBEDDED_LISTEN_ADDRESS]]] call[OptionHelper.verifyDeprecatedOption, parameter[member[.PARAMETER_SERVER_PORT], THIS[member[None.serverPort]], member[.PARAMETER_EMBEDDED_HTTP_PORT]]] local_variable[type[EmbeddedNeo4jConfiguration], embedded] local_variable[type[EmbeddedNeo4jConfiguration], builder] call[builder.connectorEnabled, parameter[binary_operation[call[embedded.isConnectorEnabled, parameter[]], ||, call[.isConnectorRequired, parameter[]]]]] call[builder.listenAddress, parameter[call[OptionHelper.selectValue, parameter[call[embedded.getListenAddress, parameter[]], THIS[member[None.serverAddress]], member[.embeddedListenAddress]]]]] call[builder.boltPort, parameter[call[OptionHelper.selectValue, parameter[call[embedded.getBoltPort, parameter[]], member[.embeddedBoltPort]]]]] call[builder.httpPort, parameter[call[OptionHelper.selectValue, parameter[call[embedded.getHttpPort, parameter[]], THIS[member[None.serverPort]], member[.embeddedHttpPort]]]]] call[builder.apocEnabled, parameter[call[OptionHelper.selectValue, parameter[call[embedded.isApocEnabled, parameter[]], THIS[member[None.apocEnabled]]]]]] call[builder.graphAlgorithmsEnabled, parameter[call[OptionHelper.selectValue, parameter[call[embedded.isGraphAlgorithmsEnabled, parameter[]], THIS[member[None.graphAlgorithmsEnabled]]]]]] return[call[builder.build, parameter[]]] end[}] END[}]
Keyword[private] identifier[EmbeddedNeo4jConfiguration] identifier[getEmbeddedNeo4jConfiguration] operator[SEP] operator[SEP] { identifier[OptionHelper] operator[SEP] identifier[verifyDeprecatedOption] operator[SEP] identifier[PARAMETER_SERVER_ADDRESS] , Keyword[this] operator[SEP] identifier[serverAddress] , identifier[PARAMETER_EMBEDDED_LISTEN_ADDRESS] operator[SEP] operator[SEP] identifier[OptionHelper] operator[SEP] identifier[verifyDeprecatedOption] operator[SEP] identifier[PARAMETER_SERVER_PORT] , Keyword[this] operator[SEP] identifier[serverPort] , identifier[PARAMETER_EMBEDDED_HTTP_PORT] operator[SEP] operator[SEP] identifier[EmbeddedNeo4jConfiguration] identifier[embedded] operator[=] identifier[store] operator[SEP] identifier[getEmbedded] operator[SEP] operator[SEP] operator[SEP] identifier[EmbeddedNeo4jConfiguration] operator[SEP] identifier[EmbeddedNeo4jConfigurationBuilder] identifier[builder] operator[=] identifier[EmbeddedNeo4jConfiguration] operator[SEP] identifier[builder] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[connectorEnabled] operator[SEP] identifier[embedded] operator[SEP] identifier[isConnectorEnabled] operator[SEP] operator[SEP] operator[||] identifier[isConnectorRequired] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[listenAddress] operator[SEP] identifier[OptionHelper] operator[SEP] identifier[selectValue] operator[SEP] identifier[embedded] operator[SEP] identifier[getListenAddress] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[serverAddress] , identifier[embeddedListenAddress] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[boltPort] operator[SEP] identifier[OptionHelper] operator[SEP] identifier[selectValue] operator[SEP] identifier[embedded] operator[SEP] identifier[getBoltPort] operator[SEP] operator[SEP] , identifier[embeddedBoltPort] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[httpPort] operator[SEP] identifier[OptionHelper] operator[SEP] identifier[selectValue] operator[SEP] identifier[embedded] operator[SEP] identifier[getHttpPort] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[serverPort] , identifier[embeddedHttpPort] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[apocEnabled] operator[SEP] identifier[OptionHelper] operator[SEP] identifier[selectValue] operator[SEP] identifier[embedded] operator[SEP] identifier[isApocEnabled] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[apocEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[graphAlgorithmsEnabled] operator[SEP] identifier[OptionHelper] operator[SEP] identifier[selectValue] operator[SEP] identifier[embedded] operator[SEP] identifier[isGraphAlgorithmsEnabled] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[graphAlgorithmsEnabled] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[builder] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] }
public List<ThriftRow> toIndexThriftRow(Object e, EntityMetadata m, String columnFamily) { List<ThriftRow> indexThriftRows = new ArrayList<ThriftRow>(); byte[] rowKey = getThriftColumnValue(e, m.getIdAttribute()); MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel( m.getPersistenceUnit()); // Add thrift rows for embeddables Map<String, EmbeddableType> embeddables = metaModel.getEmbeddables(m.getEntityClazz()); EntityType entityType = metaModel.entity(m.getEntityClazz()); for (String embeddedFieldName : embeddables.keySet()) { EmbeddableType embeddedColumn = embeddables.get(embeddedFieldName); // Index embeddable only when specified by user Field embeddedField = (Field) entityType.getAttribute(embeddedFieldName).getJavaMember(); if (!MetadataUtils.isEmbeddedAtributeIndexable(embeddedField)) { continue; } Object embeddedObject = PropertyAccessorHelper.getObject(e, (Field) entityType.getAttribute(embeddedFieldName).getJavaMember()); if (embeddedObject == null) { continue; } if (embeddedObject instanceof Collection) { ElementCollectionCacheManager ecCacheHandler = ElementCollectionCacheManager.getInstance(); for (Object obj : (Collection) embeddedObject) { for (Object column : embeddedColumn.getAttributes()) { Attribute columnAttribute = (Attribute) column; String columnName = columnAttribute.getName(); if (!MetadataUtils.isColumnInEmbeddableIndexable(embeddedField, columnName)) { continue; } // Column Value String id = (String) CassandraDataTranslator.decompose( ((AbstractAttribute) m.getIdAttribute()).getBindableJavaType(), rowKey, false); String superColumnName = ecCacheHandler.getElementCollectionObjectName(id, obj); ThriftRow tr = constructIndexTableThriftRow(columnFamily, embeddedFieldName, obj, columnAttribute, rowKey, superColumnName); if (tr != null) { indexThriftRows.add(tr); } } } } else { for (Object column : embeddedColumn.getAttributes()) { Attribute columnAttribute = (Attribute) column; String columnName = columnAttribute.getName(); Class<?> columnClass = ((AbstractAttribute) columnAttribute).getBindableJavaType(); if (!MetadataUtils.isColumnInEmbeddableIndexable(embeddedField, columnName) || columnClass.equals(byte[].class)) { continue; } // No EC Name ThriftRow tr = constructIndexTableThriftRow(columnFamily, embeddedFieldName, embeddedObject, (Attribute) column, rowKey, ""); if (tr != null) { indexThriftRows.add(tr); } } } } return indexThriftRows; }
class class_name[name] begin[{] method[toIndexThriftRow, return_type[type[List]], modifier[public], parameter[e, m, columnFamily]] begin[{] local_variable[type[List], indexThriftRows] local_variable[type[byte], rowKey] local_variable[type[MetamodelImpl], metaModel] local_variable[type[Map], embeddables] local_variable[type[EntityType], entityType] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=embeddedFieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=embeddables, selectors=[], type_arguments=None), name=embeddedColumn)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=EmbeddableType, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=embeddedFieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAttribute, postfix_operators=[], prefix_operators=[], qualifier=entityType, selectors=[MethodInvocation(arguments=[], member=getJavaMember, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Field, sub_type=None)), name=embeddedField)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Field, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=embeddedField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isEmbeddedAtributeIndexable, postfix_operators=[], prefix_operators=['!'], qualifier=MetadataUtils, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MethodInvocation(arguments=[MemberReference(member=embeddedFieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAttribute, postfix_operators=[], prefix_operators=[], qualifier=entityType, selectors=[MethodInvocation(arguments=[], member=getJavaMember, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Field, sub_type=None))], member=getObject, postfix_operators=[], prefix_operators=[], qualifier=PropertyAccessorHelper, selectors=[], type_arguments=None), name=embeddedObject)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=embeddedObject, 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=[ContinueStatement(goto=None, label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=embeddedObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Collection, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=column, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Attribute, sub_type=None)), name=columnAttribute)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Attribute, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=columnAttribute, selectors=[], type_arguments=None), name=columnName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=columnAttribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=AbstractAttribute, sub_type=None)), name=columnClass)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=embeddedField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=columnName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isColumnInEmbeddableIndexable, postfix_operators=[], prefix_operators=['!'], qualifier=MetadataUtils, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[None], name=byte))], member=equals, postfix_operators=[], prefix_operators=[], qualifier=columnClass, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=columnFamily, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=embeddedFieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=embeddedObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MemberReference(member=column, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Attribute, sub_type=None)), MemberReference(member=rowKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=constructIndexTableThriftRow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=tr)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ThriftRow, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=tr, 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=tr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=indexThriftRows, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getAttributes, postfix_operators=[], prefix_operators=[], qualifier=embeddedColumn, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=column)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=ElementCollectionCacheManager, selectors=[], type_arguments=None), name=ecCacheHandler)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ElementCollectionCacheManager, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=column, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Attribute, sub_type=None)), name=columnAttribute)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Attribute, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=columnAttribute, selectors=[], type_arguments=None), name=columnName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=embeddedField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=columnName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isColumnInEmbeddableIndexable, postfix_operators=[], prefix_operators=['!'], qualifier=MetadataUtils, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[Cast(expression=MethodInvocation(arguments=[], member=getIdAttribute, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=AbstractAttribute, sub_type=None)), MemberReference(member=rowKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=decompose, postfix_operators=[], prefix_operators=[], qualifier=CassandraDataTranslator, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), name=id)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getElementCollectionObjectName, postfix_operators=[], prefix_operators=[], qualifier=ecCacheHandler, selectors=[], type_arguments=None), name=superColumnName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=columnFamily, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=embeddedFieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=columnAttribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rowKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=superColumnName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=constructIndexTableThriftRow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=tr)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ThriftRow, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=tr, 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=tr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=indexThriftRows, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getAttributes, postfix_operators=[], prefix_operators=[], qualifier=embeddedColumn, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=column)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))), label=None)]), control=EnhancedForControl(iterable=Cast(expression=MemberReference(member=embeddedObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Collection, sub_type=None)), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=obj)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=embeddables, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=embeddedFieldName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[member[.indexThriftRows]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[ThriftRow] operator[>] identifier[toIndexThriftRow] operator[SEP] identifier[Object] identifier[e] , identifier[EntityMetadata] identifier[m] , identifier[String] identifier[columnFamily] operator[SEP] { identifier[List] operator[<] identifier[ThriftRow] operator[>] identifier[indexThriftRows] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[ThriftRow] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[rowKey] operator[=] identifier[getThriftColumnValue] operator[SEP] identifier[e] , identifier[m] operator[SEP] identifier[getIdAttribute] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[MetamodelImpl] identifier[metaModel] operator[=] operator[SEP] identifier[MetamodelImpl] operator[SEP] identifier[kunderaMetadata] operator[SEP] identifier[getApplicationMetadata] operator[SEP] operator[SEP] operator[SEP] identifier[getMetamodel] operator[SEP] identifier[m] operator[SEP] identifier[getPersistenceUnit] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[EmbeddableType] operator[>] identifier[embeddables] operator[=] identifier[metaModel] operator[SEP] identifier[getEmbeddables] operator[SEP] identifier[m] operator[SEP] identifier[getEntityClazz] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[EntityType] identifier[entityType] operator[=] identifier[metaModel] operator[SEP] identifier[entity] operator[SEP] identifier[m] operator[SEP] identifier[getEntityClazz] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[embeddedFieldName] operator[:] identifier[embeddables] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { identifier[EmbeddableType] identifier[embeddedColumn] operator[=] identifier[embeddables] operator[SEP] identifier[get] operator[SEP] identifier[embeddedFieldName] operator[SEP] operator[SEP] identifier[Field] identifier[embeddedField] operator[=] operator[SEP] identifier[Field] operator[SEP] identifier[entityType] operator[SEP] identifier[getAttribute] operator[SEP] identifier[embeddedFieldName] operator[SEP] operator[SEP] identifier[getJavaMember] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[MetadataUtils] operator[SEP] identifier[isEmbeddedAtributeIndexable] operator[SEP] identifier[embeddedField] operator[SEP] operator[SEP] { Keyword[continue] operator[SEP] } identifier[Object] identifier[embeddedObject] operator[=] identifier[PropertyAccessorHelper] operator[SEP] identifier[getObject] operator[SEP] identifier[e] , operator[SEP] identifier[Field] operator[SEP] identifier[entityType] operator[SEP] identifier[getAttribute] operator[SEP] identifier[embeddedFieldName] operator[SEP] operator[SEP] identifier[getJavaMember] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[embeddedObject] operator[==] Other[null] operator[SEP] { Keyword[continue] operator[SEP] } Keyword[if] operator[SEP] identifier[embeddedObject] Keyword[instanceof] identifier[Collection] operator[SEP] { identifier[ElementCollectionCacheManager] identifier[ecCacheHandler] operator[=] identifier[ElementCollectionCacheManager] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Object] identifier[obj] operator[:] operator[SEP] identifier[Collection] operator[SEP] identifier[embeddedObject] operator[SEP] { Keyword[for] operator[SEP] identifier[Object] identifier[column] operator[:] identifier[embeddedColumn] operator[SEP] identifier[getAttributes] operator[SEP] operator[SEP] operator[SEP] { identifier[Attribute] identifier[columnAttribute] operator[=] operator[SEP] identifier[Attribute] operator[SEP] identifier[column] operator[SEP] identifier[String] identifier[columnName] operator[=] identifier[columnAttribute] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[MetadataUtils] operator[SEP] identifier[isColumnInEmbeddableIndexable] operator[SEP] identifier[embeddedField] , identifier[columnName] operator[SEP] operator[SEP] { Keyword[continue] operator[SEP] } identifier[String] identifier[id] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[CassandraDataTranslator] operator[SEP] identifier[decompose] operator[SEP] operator[SEP] operator[SEP] identifier[AbstractAttribute] operator[SEP] identifier[m] operator[SEP] identifier[getIdAttribute] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getBindableJavaType] operator[SEP] operator[SEP] , identifier[rowKey] , literal[boolean] operator[SEP] operator[SEP] identifier[String] identifier[superColumnName] operator[=] identifier[ecCacheHandler] operator[SEP] identifier[getElementCollectionObjectName] operator[SEP] identifier[id] , identifier[obj] operator[SEP] operator[SEP] identifier[ThriftRow] identifier[tr] operator[=] identifier[constructIndexTableThriftRow] operator[SEP] identifier[columnFamily] , identifier[embeddedFieldName] , identifier[obj] , identifier[columnAttribute] , identifier[rowKey] , identifier[superColumnName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tr] operator[!=] Other[null] operator[SEP] { identifier[indexThriftRows] operator[SEP] identifier[add] operator[SEP] identifier[tr] operator[SEP] operator[SEP] } } } } Keyword[else] { Keyword[for] operator[SEP] identifier[Object] identifier[column] operator[:] identifier[embeddedColumn] operator[SEP] identifier[getAttributes] operator[SEP] operator[SEP] operator[SEP] { identifier[Attribute] identifier[columnAttribute] operator[=] operator[SEP] identifier[Attribute] operator[SEP] identifier[column] operator[SEP] identifier[String] identifier[columnName] operator[=] identifier[columnAttribute] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[columnClass] operator[=] operator[SEP] operator[SEP] identifier[AbstractAttribute] operator[SEP] identifier[columnAttribute] operator[SEP] operator[SEP] identifier[getBindableJavaType] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[MetadataUtils] operator[SEP] identifier[isColumnInEmbeddableIndexable] operator[SEP] identifier[embeddedField] , identifier[columnName] operator[SEP] operator[||] identifier[columnClass] operator[SEP] identifier[equals] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] Keyword[class] operator[SEP] operator[SEP] { Keyword[continue] operator[SEP] } identifier[ThriftRow] identifier[tr] operator[=] identifier[constructIndexTableThriftRow] operator[SEP] identifier[columnFamily] , identifier[embeddedFieldName] , identifier[embeddedObject] , operator[SEP] identifier[Attribute] operator[SEP] identifier[column] , identifier[rowKey] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tr] operator[!=] Other[null] operator[SEP] { identifier[indexThriftRows] operator[SEP] identifier[add] operator[SEP] identifier[tr] operator[SEP] operator[SEP] } } } } Keyword[return] identifier[indexThriftRows] operator[SEP] }
protected ArrayList<EnvLoaderListener> getEnvironmentListeners() { ArrayList<EnvLoaderListener> listeners; listeners = new ArrayList<EnvLoaderListener>(); /* // add the descendant listeners if (_childListeners != null) { synchronized (_childListenerLock) { ClassLoader loader; for (loader = this; loader != null; loader = loader.getParent()) { if (loader instanceof EnvironmentClassLoader) { ArrayList<EnvironmentListener> childListeners; childListeners = _childListeners.getLevel(loader); if (childListeners != null) listeners.addAll(childListeners); } } } } */ if (_listeners == null) { return listeners; } ArrayList<EnvLoaderListener> envListeners = _listeners; if (envListeners != null) { synchronized (envListeners) { for (int i = 0; i < envListeners.size(); i++) { EnvLoaderListener listener = envListeners.get(i); if (listener != null) listeners.add(listener); else { envListeners.remove(i); i--; } } } } return listeners; }
class class_name[name] begin[{] method[getEnvironmentListeners, return_type[type[ArrayList]], modifier[protected], parameter[]] begin[{] local_variable[type[ArrayList], listeners] assign[member[.listeners], 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=EnvLoaderListener, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))] if[binary_operation[member[._listeners], ==, literal[null]]] begin[{] return[member[.listeners]] else begin[{] None end[}] local_variable[type[ArrayList], envListeners] if[binary_operation[member[.envListeners], !=, literal[null]]] begin[{] SYNCHRONIZED[member[.envListeners]] BEGIN[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=envListeners, selectors=[], type_arguments=None), name=listener)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=EnvLoaderListener, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=listener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=envListeners, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=i, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[]), label=None)]), label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=listener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=listeners, selectors=[], type_arguments=None), label=None))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=envListeners, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) END[}] else begin[{] None end[}] return[member[.listeners]] end[}] END[}]
Keyword[protected] identifier[ArrayList] operator[<] identifier[EnvLoaderListener] operator[>] identifier[getEnvironmentListeners] operator[SEP] operator[SEP] { identifier[ArrayList] operator[<] identifier[EnvLoaderListener] operator[>] identifier[listeners] operator[SEP] identifier[listeners] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[EnvLoaderListener] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_listeners] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[listeners] operator[SEP] } identifier[ArrayList] operator[<] identifier[EnvLoaderListener] operator[>] identifier[envListeners] operator[=] identifier[_listeners] operator[SEP] Keyword[if] operator[SEP] identifier[envListeners] operator[!=] Other[null] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[envListeners] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[envListeners] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[EnvLoaderListener] identifier[listener] operator[=] identifier[envListeners] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[listener] operator[!=] Other[null] operator[SEP] identifier[listeners] operator[SEP] identifier[add] operator[SEP] identifier[listener] operator[SEP] operator[SEP] Keyword[else] { identifier[envListeners] operator[SEP] identifier[remove] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[i] operator[--] operator[SEP] } } } } Keyword[return] identifier[listeners] operator[SEP] }
@Override public EntityManager createEntityManager() { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "createEntityManager : " + this); EntityManager em = getEntityManager(false, false); JPAPooledEntityManager pem = new JPAPooledEntityManager(this, em, ivAbstractJpaComponent, true); return pem; }
class class_name[name] begin[{] method[createEntityManager, return_type[type[EntityManager]], modifier[public], parameter[]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[literal["createEntityManager : "], +, THIS[]]]] else begin[{] None end[}] local_variable[type[EntityManager], em] local_variable[type[JPAPooledEntityManager], pem] return[member[.pem]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[EntityManager] identifier[createEntityManager] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] Keyword[this] operator[SEP] operator[SEP] identifier[EntityManager] identifier[em] operator[=] identifier[getEntityManager] operator[SEP] literal[boolean] , literal[boolean] operator[SEP] operator[SEP] identifier[JPAPooledEntityManager] identifier[pem] operator[=] Keyword[new] identifier[JPAPooledEntityManager] operator[SEP] Keyword[this] , identifier[em] , identifier[ivAbstractJpaComponent] , literal[boolean] operator[SEP] operator[SEP] Keyword[return] identifier[pem] operator[SEP] }
private List<ResolveTask> removeDuplicateResolveTargets(List<ResolveTask> renames) { return renames.stream() .collect(Collectors.groupingBy( rt -> rt.scope, Collectors.toMap( rt -> rt.in.uri, Function.identity(), (rt1, rt2) -> rt1 ) )).values().stream() .flatMap(m -> m.values().stream()) .collect(Collectors.toList()); }
class class_name[name] begin[{] method[removeDuplicateResolveTargets, return_type[type[List]], modifier[private], parameter[renames]] begin[{] return[call[renames.stream, parameter[]]] end[}] END[}]
Keyword[private] identifier[List] operator[<] identifier[ResolveTask] operator[>] identifier[removeDuplicateResolveTargets] operator[SEP] identifier[List] operator[<] identifier[ResolveTask] operator[>] identifier[renames] operator[SEP] { Keyword[return] identifier[renames] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[groupingBy] operator[SEP] identifier[rt] operator[->] identifier[rt] operator[SEP] identifier[scope] , identifier[Collectors] operator[SEP] identifier[toMap] operator[SEP] identifier[rt] operator[->] identifier[rt] operator[SEP] identifier[in] operator[SEP] identifier[uri] , identifier[Function] operator[SEP] identifier[identity] operator[SEP] operator[SEP] , operator[SEP] identifier[rt1] , identifier[rt2] operator[SEP] operator[->] identifier[rt1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[flatMap] operator[SEP] identifier[m] operator[->] identifier[m] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[toList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override public <T> List<Object> getAllCacheKeys(final Class<T> clazz) { try { return getObjectPersister(clazz).getAllCacheKeys(); } catch (CacheCreationException e) { Ln.e(e); return Collections.emptyList(); } }
class class_name[name] begin[{] method[getAllCacheKeys, return_type[type[List]], modifier[public], parameter[clazz]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getObjectPersister, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getAllCacheKeys, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=e, postfix_operators=[], prefix_operators=[], qualifier=Ln, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[], member=emptyList, postfix_operators=[], prefix_operators=[], qualifier=Collections, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['CacheCreationException']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[Object] operator[>] identifier[getAllCacheKeys] operator[SEP] Keyword[final] identifier[Class] operator[<] identifier[T] operator[>] identifier[clazz] operator[SEP] { Keyword[try] { Keyword[return] identifier[getObjectPersister] operator[SEP] identifier[clazz] operator[SEP] operator[SEP] identifier[getAllCacheKeys] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[CacheCreationException] identifier[e] operator[SEP] { identifier[Ln] operator[SEP] identifier[e] operator[SEP] identifier[e] operator[SEP] operator[SEP] Keyword[return] identifier[Collections] operator[SEP] identifier[emptyList] operator[SEP] operator[SEP] operator[SEP] } }
@Override @Scope(DocScope.IO) public <T> T projectXMLString(final String xmlContent, final Class<T> projectionInterface) { try { final ByteArrayInputStream inputStream = new ByteArrayInputStream(xmlContent.getBytes("utf-8")); return new StreamInput(this, inputStream).read(projectionInterface); } catch (IOException e) { throw new XBIOException(e); } }
class class_name[name] begin[{] method[projectXMLString, return_type[type[T]], modifier[public], parameter[xmlContent, projectionInterface]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="utf-8")], member=getBytes, postfix_operators=[], prefix_operators=[], qualifier=xmlContent, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ByteArrayInputStream, sub_type=None)), name=inputStream)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=ByteArrayInputStream, sub_type=None)), ReturnStatement(expression=ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=inputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=projectionInterface, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=read, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=StreamInput, sub_type=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=XBIOException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] annotation[@] identifier[Scope] operator[SEP] identifier[DocScope] operator[SEP] identifier[IO] operator[SEP] Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[projectXMLString] operator[SEP] Keyword[final] identifier[String] identifier[xmlContent] , Keyword[final] identifier[Class] operator[<] identifier[T] operator[>] identifier[projectionInterface] operator[SEP] { Keyword[try] { Keyword[final] identifier[ByteArrayInputStream] identifier[inputStream] operator[=] Keyword[new] identifier[ByteArrayInputStream] operator[SEP] identifier[xmlContent] operator[SEP] identifier[getBytes] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[StreamInput] operator[SEP] Keyword[this] , identifier[inputStream] operator[SEP] operator[SEP] identifier[read] operator[SEP] identifier[projectionInterface] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[XBIOException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
public static LinkedHashMap<String, Type> track(final Class<?> type, final Class<?> known, final LinkedHashMap<String, Type> knownGenerics) { if (type.getTypeParameters().length == 0 || knownGenerics.isEmpty()) { return EmptyGenericsMap.getInstance(); } try { return trackGenerics(type, known, knownGenerics); } catch (Exception ex) { throw new GenericsTrackingException(type, known, knownGenerics, ex); } }
class class_name[name] begin[{] method[track, return_type[type[LinkedHashMap]], modifier[public static], parameter[type, known, knownGenerics]] begin[{] if[binary_operation[binary_operation[call[type.getTypeParameters, parameter[]], ==, literal[0]], ||, call[knownGenerics.isEmpty, parameter[]]]] begin[{] return[call[EmptyGenericsMap.getInstance, parameter[]]] else begin[{] None end[}] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=known, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=knownGenerics, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=trackGenerics, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=known, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=knownGenerics, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=GenericsTrackingException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[LinkedHashMap] operator[<] identifier[String] , identifier[Type] operator[>] identifier[track] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[type] , Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[known] , Keyword[final] identifier[LinkedHashMap] operator[<] identifier[String] , identifier[Type] operator[>] identifier[knownGenerics] operator[SEP] { Keyword[if] operator[SEP] identifier[type] operator[SEP] identifier[getTypeParameters] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[==] Other[0] operator[||] identifier[knownGenerics] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[EmptyGenericsMap] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] } Keyword[try] { Keyword[return] identifier[trackGenerics] operator[SEP] identifier[type] , identifier[known] , identifier[knownGenerics] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { Keyword[throw] Keyword[new] identifier[GenericsTrackingException] operator[SEP] identifier[type] , identifier[known] , identifier[knownGenerics] , identifier[ex] operator[SEP] operator[SEP] } }
public static ImageBuffer applyMask(ImageBuffer imageBuffer, ColorRgba maskColor) { return factoryGraphic.applyMask(imageBuffer, maskColor); }
class class_name[name] begin[{] method[applyMask, return_type[type[ImageBuffer]], modifier[public static], parameter[imageBuffer, maskColor]] begin[{] return[call[factoryGraphic.applyMask, parameter[member[.imageBuffer], member[.maskColor]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ImageBuffer] identifier[applyMask] operator[SEP] identifier[ImageBuffer] identifier[imageBuffer] , identifier[ColorRgba] identifier[maskColor] operator[SEP] { Keyword[return] identifier[factoryGraphic] operator[SEP] identifier[applyMask] operator[SEP] identifier[imageBuffer] , identifier[maskColor] operator[SEP] operator[SEP] }
private void addTrafficSource() { VectorSource trafficSource = new VectorSource(TrafficData.SOURCE_ID, TrafficData.SOURCE_URL); style.addSource(trafficSource); }
class class_name[name] begin[{] method[addTrafficSource, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[VectorSource], trafficSource] call[style.addSource, parameter[member[.trafficSource]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[addTrafficSource] operator[SEP] operator[SEP] { identifier[VectorSource] identifier[trafficSource] operator[=] Keyword[new] identifier[VectorSource] operator[SEP] identifier[TrafficData] operator[SEP] identifier[SOURCE_ID] , identifier[TrafficData] operator[SEP] identifier[SOURCE_URL] operator[SEP] operator[SEP] identifier[style] operator[SEP] identifier[addSource] operator[SEP] identifier[trafficSource] operator[SEP] operator[SEP] }
public void attach(M m, Evaluation eval) { _evaluations[m.ordinal()] = _evaluations[m.ordinal()] == null ? eval : new CompoundMilestoneEvaluation(eval, _evaluations[m.ordinal()]); }
class class_name[name] begin[{] method[attach, return_type[void], modifier[public], parameter[m, eval]] begin[{] assign[member[._evaluations], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=_evaluations, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MethodInvocation(arguments=[], member=ordinal, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=ClassCreator(arguments=[MemberReference(member=eval, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=_evaluations, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MethodInvocation(arguments=[], member=ordinal, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None))])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CompoundMilestoneEvaluation, sub_type=None)), if_true=MemberReference(member=eval, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] end[}] END[}]
Keyword[public] Keyword[void] identifier[attach] operator[SEP] identifier[M] identifier[m] , identifier[Evaluation] identifier[eval] operator[SEP] { identifier[_evaluations] operator[SEP] identifier[m] operator[SEP] identifier[ordinal] operator[SEP] operator[SEP] operator[SEP] operator[=] identifier[_evaluations] operator[SEP] identifier[m] operator[SEP] identifier[ordinal] operator[SEP] operator[SEP] operator[SEP] operator[==] Other[null] operator[?] identifier[eval] operator[:] Keyword[new] identifier[CompoundMilestoneEvaluation] operator[SEP] identifier[eval] , identifier[_evaluations] operator[SEP] identifier[m] operator[SEP] identifier[ordinal] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static String random(int count, int start, int end, final boolean letters, final boolean numbers, final char[] chars, final Random random) { if (count == 0) { return StringUtils.EMPTY; } else if (count < 0) { throw new IllegalArgumentException("Requested random string length " + count + " is less than 0."); } if (chars != null && chars.length == 0) { throw new IllegalArgumentException("The chars array must not be empty"); } if (start == 0 && end == 0) { if (chars != null) { end = chars.length; } else { if (!letters && !numbers) { end = Character.MAX_CODE_POINT; } else { end = 'z' + 1; start = ' '; } } } else { if (end <= start) { throw new IllegalArgumentException("Parameter end (" + end + ") must be greater than start (" + start + ")"); } } final int zero_digit_ascii = 48; final int first_letter_ascii = 65; if (chars == null && (numbers && end <= zero_digit_ascii || letters && end <= first_letter_ascii)) { throw new IllegalArgumentException("Parameter end (" + end + ") must be greater then (" + zero_digit_ascii + ") for generating digits " + "or greater then (" + first_letter_ascii + ") for generating letters."); } final StringBuilder builder = new StringBuilder(count); final int gap = end - start; while (count-- != 0) { int codePoint; if (chars == null) { codePoint = random.nextInt(gap) + start; switch (Character.getType(codePoint)) { case Character.UNASSIGNED: case Character.PRIVATE_USE: case Character.SURROGATE: count++; continue; } } else { codePoint = chars[random.nextInt(gap) + start]; } final int numberOfChars = Character.charCount(codePoint); if (count == 0 && numberOfChars > 1) { count++; continue; } if (letters && Character.isLetter(codePoint) || numbers && Character.isDigit(codePoint) || !letters && !numbers) { builder.appendCodePoint(codePoint); if (numberOfChars == 2) { count--; } } else { count++; } } return builder.toString(); }
class class_name[name] begin[{] method[random, return_type[type[String]], modifier[public static], parameter[count, start, end, letters, numbers, chars, random]] begin[{] if[binary_operation[member[.count], ==, literal[0]]] begin[{] return[member[StringUtils.EMPTY]] else begin[{] if[binary_operation[member[.count], <, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Requested random string length "), operandr=MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is less than 0."), 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[}] end[}] if[binary_operation[binary_operation[member[.chars], !=, literal[null]], &&, binary_operation[member[chars.length], ==, literal[0]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The chars array must not be empty")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[binary_operation[member[.start], ==, literal[0]], &&, binary_operation[member[.end], ==, literal[0]]]] begin[{] if[binary_operation[member[.chars], !=, literal[null]]] begin[{] assign[member[.end], member[chars.length]] else begin[{] if[binary_operation[member[.letters], &&, member[.numbers]]] begin[{] assign[member[.end], member[Character.MAX_CODE_POINT]] else begin[{] assign[member[.end], binary_operation[literal['z'], +, literal[1]]] assign[member[.start], literal[' ']] end[}] end[}] else begin[{] if[binary_operation[member[.end], <=, member[.start]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter end ("), operandr=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=") must be greater than start ("), operator=+), operandr=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=")"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] end[}] local_variable[type[int], zero_digit_ascii] local_variable[type[int], first_letter_ascii] if[binary_operation[binary_operation[member[.chars], ==, literal[null]], &&, binary_operation[binary_operation[member[.numbers], &&, binary_operation[member[.end], <=, member[.zero_digit_ascii]]], ||, binary_operation[member[.letters], &&, binary_operation[member[.end], <=, member[.first_letter_ascii]]]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter end ("), operandr=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=") must be greater then ("), operator=+), operandr=MemberReference(member=zero_digit_ascii, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=") for generating digits "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="or greater then ("), operator=+), operandr=MemberReference(member=first_letter_ascii, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=") for generating letters."), 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[StringBuilder], builder] local_variable[type[int], gap] while[binary_operation[member[.count], !=, literal[0]]] begin[{] local_variable[type[int], codePoint] if[binary_operation[member[.chars], ==, literal[null]]] begin[{] assign[member[.codePoint], binary_operation[call[random.nextInt, parameter[member[.gap]]], +, member[.start]]] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=UNASSIGNED, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[]), MemberReference(member=PRIVATE_USE, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[]), MemberReference(member=SURROGATE, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[])], statements=[StatementExpression(expression=MemberReference(member=count, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), ContinueStatement(goto=None, label=None)])], expression=MethodInvocation(arguments=[MemberReference(member=codePoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getType, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[], type_arguments=None), label=None) else begin[{] assign[member[.codePoint], member[.chars]] end[}] local_variable[type[int], numberOfChars] if[binary_operation[binary_operation[member[.count], ==, literal[0]], &&, binary_operation[member[.numberOfChars], >, literal[1]]]] begin[{] member[.count] ContinueStatement(goto=None, label=None) else begin[{] None end[}] if[binary_operation[binary_operation[binary_operation[member[.letters], &&, call[Character.isLetter, parameter[member[.codePoint]]]], ||, binary_operation[member[.numbers], &&, call[Character.isDigit, parameter[member[.codePoint]]]]], ||, binary_operation[member[.letters], &&, member[.numbers]]]] begin[{] call[builder.appendCodePoint, parameter[member[.codePoint]]] if[binary_operation[member[.numberOfChars], ==, literal[2]]] begin[{] member[.count] else begin[{] None end[}] else begin[{] member[.count] end[}] end[}] return[call[builder.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[random] operator[SEP] Keyword[int] identifier[count] , Keyword[int] identifier[start] , Keyword[int] identifier[end] , Keyword[final] Keyword[boolean] identifier[letters] , Keyword[final] Keyword[boolean] identifier[numbers] , Keyword[final] Keyword[char] operator[SEP] operator[SEP] identifier[chars] , Keyword[final] identifier[Random] identifier[random] operator[SEP] { Keyword[if] operator[SEP] identifier[count] operator[==] Other[0] operator[SEP] { Keyword[return] identifier[StringUtils] operator[SEP] identifier[EMPTY] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[count] operator[<] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[count] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[chars] operator[!=] Other[null] operator[&&] identifier[chars] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[start] operator[==] Other[0] operator[&&] identifier[end] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[chars] operator[!=] Other[null] operator[SEP] { identifier[end] operator[=] identifier[chars] operator[SEP] identifier[length] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] operator[!] identifier[letters] operator[&&] operator[!] identifier[numbers] operator[SEP] { identifier[end] operator[=] identifier[Character] operator[SEP] identifier[MAX_CODE_POINT] operator[SEP] } Keyword[else] { identifier[end] operator[=] literal[String] operator[+] Other[1] operator[SEP] identifier[start] operator[=] literal[String] operator[SEP] } } } Keyword[else] { Keyword[if] operator[SEP] identifier[end] operator[<=] identifier[start] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[end] operator[+] literal[String] operator[+] identifier[start] operator[+] literal[String] operator[SEP] operator[SEP] } } Keyword[final] Keyword[int] identifier[zero_digit_ascii] operator[=] Other[48] operator[SEP] Keyword[final] Keyword[int] identifier[first_letter_ascii] operator[=] Other[65] operator[SEP] Keyword[if] operator[SEP] identifier[chars] operator[==] Other[null] operator[&&] operator[SEP] identifier[numbers] operator[&&] identifier[end] operator[<=] identifier[zero_digit_ascii] operator[||] identifier[letters] operator[&&] identifier[end] operator[<=] identifier[first_letter_ascii] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[end] operator[+] literal[String] operator[+] identifier[zero_digit_ascii] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[first_letter_ascii] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[final] identifier[StringBuilder] identifier[builder] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[count] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[gap] operator[=] identifier[end] operator[-] identifier[start] operator[SEP] Keyword[while] operator[SEP] identifier[count] operator[--] operator[!=] Other[0] operator[SEP] { Keyword[int] identifier[codePoint] operator[SEP] Keyword[if] operator[SEP] identifier[chars] operator[==] Other[null] operator[SEP] { identifier[codePoint] operator[=] identifier[random] operator[SEP] identifier[nextInt] operator[SEP] identifier[gap] operator[SEP] operator[+] identifier[start] operator[SEP] Keyword[switch] operator[SEP] identifier[Character] operator[SEP] identifier[getType] operator[SEP] identifier[codePoint] operator[SEP] operator[SEP] { Keyword[case] identifier[Character] operator[SEP] identifier[UNASSIGNED] operator[:] Keyword[case] identifier[Character] operator[SEP] identifier[PRIVATE_USE] operator[:] Keyword[case] identifier[Character] operator[SEP] identifier[SURROGATE] operator[:] identifier[count] operator[++] operator[SEP] Keyword[continue] operator[SEP] } } Keyword[else] { identifier[codePoint] operator[=] identifier[chars] operator[SEP] identifier[random] operator[SEP] identifier[nextInt] operator[SEP] identifier[gap] operator[SEP] operator[+] identifier[start] operator[SEP] operator[SEP] } Keyword[final] Keyword[int] identifier[numberOfChars] operator[=] identifier[Character] operator[SEP] identifier[charCount] operator[SEP] identifier[codePoint] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[count] operator[==] Other[0] operator[&&] identifier[numberOfChars] operator[>] Other[1] operator[SEP] { identifier[count] operator[++] operator[SEP] Keyword[continue] operator[SEP] } Keyword[if] operator[SEP] identifier[letters] operator[&&] identifier[Character] operator[SEP] identifier[isLetter] operator[SEP] identifier[codePoint] operator[SEP] operator[||] identifier[numbers] operator[&&] identifier[Character] operator[SEP] identifier[isDigit] operator[SEP] identifier[codePoint] operator[SEP] operator[||] operator[!] identifier[letters] operator[&&] operator[!] identifier[numbers] operator[SEP] { identifier[builder] operator[SEP] identifier[appendCodePoint] operator[SEP] identifier[codePoint] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[numberOfChars] operator[==] Other[2] operator[SEP] { identifier[count] operator[--] operator[SEP] } } Keyword[else] { identifier[count] operator[++] operator[SEP] } } Keyword[return] identifier[builder] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
@Override public String resolve( String mid, Features features, Set<String> dependentFeatures, StringBuffer sb, boolean resolveAliases) { return resolve(mid, features, dependentFeatures, sb, resolveAliases, true); }
class class_name[name] begin[{] method[resolve, return_type[type[String]], modifier[public], parameter[mid, features, dependentFeatures, sb, resolveAliases]] begin[{] return[call[.resolve, parameter[member[.mid], member[.features], member[.dependentFeatures], member[.sb], member[.resolveAliases], literal[true]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[resolve] operator[SEP] identifier[String] identifier[mid] , identifier[Features] identifier[features] , identifier[Set] operator[<] identifier[String] operator[>] identifier[dependentFeatures] , identifier[StringBuffer] identifier[sb] , Keyword[boolean] identifier[resolveAliases] operator[SEP] { Keyword[return] identifier[resolve] operator[SEP] identifier[mid] , identifier[features] , identifier[dependentFeatures] , identifier[sb] , identifier[resolveAliases] , literal[boolean] operator[SEP] operator[SEP] }
private void initializeBeanMethodTransactionAttributes(boolean isEntity, boolean addRemove, MethodInterface methodInterface, Method[] ejbMethods, String[] entityNoTxAttrMethods, String[] entityNoTxAttrMethodSignatures, List<ContainerTransaction> transactionList, List<ActivitySessionMethod> activitySessionList, String[] methodNames, Class<?>[][] methodParamTypes, String[] methodSignatures, TransactionAttribute[] transactionAttrs, ActivitySessionAttribute[] activitySessionAttrs, BeanMetaData bmd) throws EJBConfigurationException { final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); if (isTraceOn && tc.isEntryEnabled()) Tr.entry(tc, "initializeBeanMethodTransactionAttributes: " + methodInterface); int numMethods = ejbMethods.length; int numExplicitMethods = numMethods - (addRemove ? 1 : 0); for (int i = 0; i < numExplicitMethods; i++) { // For Bean-managed TX (session beans only), initialize method Tx attrs // to TX_BEAN_MANAGED. For other cases, initialize to TX_REQUIRED. // FIX_ME (RRS): I made this TX_REQUIRED to conform to the way it was in 4.0.1, but // it seems to me that this should perhaps be TX_NOT_SUPPORTED? // ejbTimeout must default to REQUIRES_NEW since REQUIRED is not // allowed per the EJB Specification. LI2281.11 if (bmd.usesBeanManagedTx) transactionAttrs[i] = TransactionAttribute.TX_BEAN_MANAGED; // LIDB441.5 - For Bean-managed AS (session beans only), initialize method AS attrs // to AS_BEAN_MANAGED. For other cases, initialize to AS_UNKNOWN. activitySessionAttrs[i] = (bmd.usesBeanManagedAS) ? ActivitySessionAttribute.AS_BEAN_MANAGED : ActivitySessionAttribute.AS_UNKNOWN; } int metaMethodElementKind = methodInterface.getValue(); // Only get and check method-level Tx attributes if container is managing Tx if (!bmd.usesBeanManagedTx) { // Process all Transaction Attributes from WCCM. If there is no transactionList, // assume this is an annotations only configuration scenario. if (transactionList != null) { MethodAttribUtils.getXMLCMTransactions(transactionAttrs, metaMethodElementKind, methodNames, methodParamTypes, transactionList, bmd); //PK93643 } // Process all Transaction Attributes from Java Annotations, // and set defaults for all methods not explicitly configured. MethodAttribUtils.getAnnotationCMTransactions(transactionAttrs, metaMethodElementKind, ejbMethods, bmd); // Per section 11.4.1 of EJB 1.1 spec: // - for EntityBeans: getEJBHome, getHandle, getPrimaryKey and isIdentical must be TX_NOT_SUPPORTED // - for SessionBeans: all EJBObject interface methods must be TX_NOT_SUPPORTED if (isEntity) { MethodAttribUtils.checkTxAttrs(transactionAttrs, methodNames, methodSignatures, //PQ63130 entityNoTxAttrMethods, entityNoTxAttrMethodSignatures, //PQ63130 TransactionAttribute.TX_NOT_SUPPORTED); } else if (addRemove) { // For Session beans, the only EJBObject or EJBLocalObject method // that could be in the list is the 'remove' method added to the // end. If it is present, force it to NOT_SUPPORTED. // Note that there may be another 'remove' method in the list from // the business interfaces.... but it is allowed for that one to // have a different transaction attribute. d405948 transactionAttrs[numExplicitMethods] = TransactionAttribute.TX_NOT_SUPPORTED; } if (methodInterface == MethodInterface.TIMED_OBJECT) { // Per EJB Specification, ejbTimeout must be TX_REQUIRES_NEW or // TX_NOT_SUPPORTED. However, internally, TX_REQUIRES_NEW will be // implemented as TX_REQUIRED so that the EJB method shares the // global transaction begun by scheduler QOS_ONLYONCE. LI2281.11 // If timerQOSAtLeastOnceForRequired is specified, TX_REQUIRED is // implemented as TX_REQUIRES_NEW, which uses scheduler // QOS_ATLEASTONCE and then begins a new global transaction for the // EJB method as expected. RTC116312 for (int i = 0; i < numMethods; i++) { TransactionAttribute txAttr = transactionAttrs[i]; if (txAttr == TransactionAttribute.TX_REQUIRES_NEW) { transactionAttrs[i] = TransactionAttribute.TX_REQUIRED; } else if (txAttr == TransactionAttribute.TX_REQUIRED && ContainerProperties.TimerQOSAtLeastOnceForRequired) { if (isTraceOn && tc.isDebugEnabled()) Tr.debug(tc, "updating " + ejbMethods[i] + " from TX_REQUIRED to TX_REQUIRES_NEW for QOS_ATLEASTONCE"); transactionAttrs[i] = TransactionAttribute.TX_REQUIRES_NEW; } } } else if (methodInterface == MethodInterface.LIFECYCLE_INTERCEPTOR && bmd.type == InternalConstants.TYPE_SINGLETON_SESSION) { // F743-1751 - Like timer methods, lifecycle interceptor methods // translate REQUIRED into REQUIRES_NEW for singleton. for (int i = 0; i < numMethods; i++) { if (transactionAttrs[i] == TransactionAttribute.TX_REQUIRED) { transactionAttrs[i] = TransactionAttribute.TX_REQUIRES_NEW; } } } } else { if (bmd.wccm.enterpriseBean != null) { MethodAttribUtils.chkBMTFromXML(transactionList, bmd.wccm.enterpriseBean, bmd.j2eeName);//d1414634 } // no need to check annotations if all metadata came // from xml. if (!bmd.metadataComplete) { MethodAttribUtils.chkBMTFromAnnotations(ejbMethods, bmd.j2eeName); //d395828 } } // Only get method-level Activity Session attributes if container is managing AS if (!bmd.usesBeanManagedAS) { MethodAttribUtils.getActivitySessions(activitySessionAttrs, metaMethodElementKind, methodNames, methodParamTypes, activitySessionList, bmd.enterpriseBeanName, bmd.usesBeanManagedAS); // LIDB441.5 } // if !usesBeanManagedAS else { if (bmd.wccm.enterpriseBean != null) { MethodAttribUtils.chkBMASFromXML(activitySessionList, bmd.wccm.enterpriseBean, bmd.j2eeName);//d141634 } } if (isTraceOn && tc.isEntryEnabled()) Tr.exit(tc, "initializeBeanMethodTransactionAttributes: " + methodInterface); }
class class_name[name] begin[{] method[initializeBeanMethodTransactionAttributes, return_type[void], modifier[private], parameter[isEntity, addRemove, methodInterface, ejbMethods, entityNoTxAttrMethods, entityNoTxAttrMethodSignatures, transactionList, activitySessionList, methodNames, methodParamTypes, methodSignatures, transactionAttrs, activitySessionAttrs, bmd]] begin[{] local_variable[type[boolean], isTraceOn] if[binary_operation[member[.isTraceOn], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.entry, parameter[member[.tc], binary_operation[literal["initializeBeanMethodTransactionAttributes: "], +, member[.methodInterface]]]] else begin[{] None end[}] local_variable[type[int], numMethods] local_variable[type[int], numExplicitMethods] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=usesBeanManagedTx, postfix_operators=[], prefix_operators=[], qualifier=bmd, selectors=[]), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=transactionAttrs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=TX_BEAN_MANAGED, postfix_operators=[], prefix_operators=[], qualifier=TransactionAttribute, selectors=[])), label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=activitySessionAttrs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=TernaryExpression(condition=MemberReference(member=usesBeanManagedAS, postfix_operators=[], prefix_operators=[], qualifier=bmd, selectors=[]), if_false=MemberReference(member=AS_UNKNOWN, postfix_operators=[], prefix_operators=[], qualifier=ActivitySessionAttribute, selectors=[]), if_true=MemberReference(member=AS_BEAN_MANAGED, postfix_operators=[], prefix_operators=[], qualifier=ActivitySessionAttribute, selectors=[]))), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=numExplicitMethods, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) local_variable[type[int], metaMethodElementKind] if[member[bmd.usesBeanManagedTx]] begin[{] if[binary_operation[member[.transactionList], !=, literal[null]]] begin[{] call[MethodAttribUtils.getXMLCMTransactions, parameter[member[.transactionAttrs], member[.metaMethodElementKind], member[.methodNames], member[.methodParamTypes], member[.transactionList], member[.bmd]]] else begin[{] None end[}] call[MethodAttribUtils.getAnnotationCMTransactions, parameter[member[.transactionAttrs], member[.metaMethodElementKind], member[.ejbMethods], member[.bmd]]] if[member[.isEntity]] begin[{] call[MethodAttribUtils.checkTxAttrs, parameter[member[.transactionAttrs], member[.methodNames], member[.methodSignatures], member[.entityNoTxAttrMethods], member[.entityNoTxAttrMethodSignatures], member[TransactionAttribute.TX_NOT_SUPPORTED]]] else begin[{] if[member[.addRemove]] begin[{] assign[member[.transactionAttrs], member[TransactionAttribute.TX_NOT_SUPPORTED]] else begin[{] None end[}] end[}] if[binary_operation[member[.methodInterface], ==, member[MethodInterface.TIMED_OBJECT]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=transactionAttrs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=txAttr)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TransactionAttribute, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=txAttr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=TX_REQUIRES_NEW, postfix_operators=[], prefix_operators=[], qualifier=TransactionAttribute, selectors=[]), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=txAttr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=TX_REQUIRED, postfix_operators=[], prefix_operators=[], qualifier=TransactionAttribute, selectors=[]), operator===), operandr=MemberReference(member=TimerQOSAtLeastOnceForRequired, postfix_operators=[], prefix_operators=[], qualifier=ContainerProperties, selectors=[]), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=isTraceOn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="updating "), operandr=MemberReference(member=ejbMethods, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" from TX_REQUIRED to TX_REQUIRES_NEW for QOS_ATLEASTONCE"), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=transactionAttrs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=TX_REQUIRES_NEW, postfix_operators=[], prefix_operators=[], qualifier=TransactionAttribute, selectors=[])), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=transactionAttrs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=TX_REQUIRED, postfix_operators=[], prefix_operators=[], qualifier=TransactionAttribute, selectors=[])), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=numMethods, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) else begin[{] if[binary_operation[binary_operation[member[.methodInterface], ==, member[MethodInterface.LIFECYCLE_INTERCEPTOR]], &&, binary_operation[member[bmd.type], ==, member[InternalConstants.TYPE_SINGLETON_SESSION]]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=transactionAttrs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=TX_REQUIRED, postfix_operators=[], prefix_operators=[], qualifier=TransactionAttribute, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=transactionAttrs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=TX_REQUIRES_NEW, postfix_operators=[], prefix_operators=[], qualifier=TransactionAttribute, selectors=[])), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=numMethods, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) else begin[{] None end[}] end[}] else begin[{] if[binary_operation[member[bmd.wccm.enterpriseBean], !=, literal[null]]] begin[{] call[MethodAttribUtils.chkBMTFromXML, parameter[member[.transactionList], member[bmd.wccm.enterpriseBean], member[bmd.j2eeName]]] else begin[{] None end[}] if[member[bmd.metadataComplete]] begin[{] call[MethodAttribUtils.chkBMTFromAnnotations, parameter[member[.ejbMethods], member[bmd.j2eeName]]] else begin[{] None end[}] end[}] if[member[bmd.usesBeanManagedAS]] begin[{] call[MethodAttribUtils.getActivitySessions, parameter[member[.activitySessionAttrs], member[.metaMethodElementKind], member[.methodNames], member[.methodParamTypes], member[.activitySessionList], member[bmd.enterpriseBeanName], member[bmd.usesBeanManagedAS]]] else begin[{] if[binary_operation[member[bmd.wccm.enterpriseBean], !=, literal[null]]] begin[{] call[MethodAttribUtils.chkBMASFromXML, parameter[member[.activitySessionList], member[bmd.wccm.enterpriseBean], member[bmd.j2eeName]]] else begin[{] None end[}] end[}] if[binary_operation[member[.isTraceOn], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.exit, parameter[member[.tc], binary_operation[literal["initializeBeanMethodTransactionAttributes: "], +, member[.methodInterface]]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[initializeBeanMethodTransactionAttributes] operator[SEP] Keyword[boolean] identifier[isEntity] , Keyword[boolean] identifier[addRemove] , identifier[MethodInterface] identifier[methodInterface] , identifier[Method] operator[SEP] operator[SEP] identifier[ejbMethods] , identifier[String] operator[SEP] operator[SEP] identifier[entityNoTxAttrMethods] , identifier[String] operator[SEP] operator[SEP] identifier[entityNoTxAttrMethodSignatures] , identifier[List] operator[<] identifier[ContainerTransaction] operator[>] identifier[transactionList] , identifier[List] operator[<] identifier[ActivitySessionMethod] operator[>] identifier[activitySessionList] , identifier[String] operator[SEP] operator[SEP] identifier[methodNames] , identifier[Class] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[methodParamTypes] , identifier[String] operator[SEP] operator[SEP] identifier[methodSignatures] , identifier[TransactionAttribute] operator[SEP] operator[SEP] identifier[transactionAttrs] , identifier[ActivitySessionAttribute] operator[SEP] operator[SEP] identifier[activitySessionAttrs] , identifier[BeanMetaData] identifier[bmd] operator[SEP] Keyword[throws] identifier[EJBConfigurationException] { Keyword[final] Keyword[boolean] identifier[isTraceOn] operator[=] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[methodInterface] operator[SEP] operator[SEP] Keyword[int] identifier[numMethods] operator[=] identifier[ejbMethods] operator[SEP] identifier[length] operator[SEP] Keyword[int] identifier[numExplicitMethods] operator[=] identifier[numMethods] operator[-] operator[SEP] identifier[addRemove] operator[?] Other[1] operator[:] Other[0] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[numExplicitMethods] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[bmd] operator[SEP] identifier[usesBeanManagedTx] operator[SEP] identifier[transactionAttrs] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[TransactionAttribute] operator[SEP] identifier[TX_BEAN_MANAGED] operator[SEP] identifier[activitySessionAttrs] operator[SEP] identifier[i] operator[SEP] operator[=] operator[SEP] identifier[bmd] operator[SEP] identifier[usesBeanManagedAS] operator[SEP] operator[?] identifier[ActivitySessionAttribute] operator[SEP] identifier[AS_BEAN_MANAGED] operator[:] identifier[ActivitySessionAttribute] operator[SEP] identifier[AS_UNKNOWN] operator[SEP] } Keyword[int] identifier[metaMethodElementKind] operator[=] identifier[methodInterface] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[bmd] operator[SEP] identifier[usesBeanManagedTx] operator[SEP] { Keyword[if] operator[SEP] identifier[transactionList] operator[!=] Other[null] operator[SEP] { identifier[MethodAttribUtils] operator[SEP] identifier[getXMLCMTransactions] operator[SEP] identifier[transactionAttrs] , identifier[metaMethodElementKind] , identifier[methodNames] , identifier[methodParamTypes] , identifier[transactionList] , identifier[bmd] operator[SEP] operator[SEP] } identifier[MethodAttribUtils] operator[SEP] identifier[getAnnotationCMTransactions] operator[SEP] identifier[transactionAttrs] , identifier[metaMethodElementKind] , identifier[ejbMethods] , identifier[bmd] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isEntity] operator[SEP] { identifier[MethodAttribUtils] operator[SEP] identifier[checkTxAttrs] operator[SEP] identifier[transactionAttrs] , identifier[methodNames] , identifier[methodSignatures] , identifier[entityNoTxAttrMethods] , identifier[entityNoTxAttrMethodSignatures] , identifier[TransactionAttribute] operator[SEP] identifier[TX_NOT_SUPPORTED] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[addRemove] operator[SEP] { identifier[transactionAttrs] operator[SEP] identifier[numExplicitMethods] operator[SEP] operator[=] identifier[TransactionAttribute] operator[SEP] identifier[TX_NOT_SUPPORTED] operator[SEP] } Keyword[if] operator[SEP] identifier[methodInterface] operator[==] identifier[MethodInterface] operator[SEP] identifier[TIMED_OBJECT] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[numMethods] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[TransactionAttribute] identifier[txAttr] operator[=] identifier[transactionAttrs] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[txAttr] operator[==] identifier[TransactionAttribute] operator[SEP] identifier[TX_REQUIRES_NEW] operator[SEP] { identifier[transactionAttrs] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[TransactionAttribute] operator[SEP] identifier[TX_REQUIRED] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[txAttr] operator[==] identifier[TransactionAttribute] operator[SEP] identifier[TX_REQUIRED] operator[&&] identifier[ContainerProperties] operator[SEP] identifier[TimerQOSAtLeastOnceForRequired] operator[SEP] { Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[ejbMethods] operator[SEP] identifier[i] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[transactionAttrs] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[TransactionAttribute] operator[SEP] identifier[TX_REQUIRES_NEW] operator[SEP] } } } Keyword[else] Keyword[if] operator[SEP] identifier[methodInterface] operator[==] identifier[MethodInterface] operator[SEP] identifier[LIFECYCLE_INTERCEPTOR] operator[&&] identifier[bmd] operator[SEP] identifier[type] operator[==] identifier[InternalConstants] operator[SEP] identifier[TYPE_SINGLETON_SESSION] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[numMethods] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[transactionAttrs] operator[SEP] identifier[i] operator[SEP] operator[==] identifier[TransactionAttribute] operator[SEP] identifier[TX_REQUIRED] operator[SEP] { identifier[transactionAttrs] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[TransactionAttribute] operator[SEP] identifier[TX_REQUIRES_NEW] operator[SEP] } } } } Keyword[else] { Keyword[if] operator[SEP] identifier[bmd] operator[SEP] identifier[wccm] operator[SEP] identifier[enterpriseBean] operator[!=] Other[null] operator[SEP] { identifier[MethodAttribUtils] operator[SEP] identifier[chkBMTFromXML] operator[SEP] identifier[transactionList] , identifier[bmd] operator[SEP] identifier[wccm] operator[SEP] identifier[enterpriseBean] , identifier[bmd] operator[SEP] identifier[j2eeName] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[bmd] operator[SEP] identifier[metadataComplete] operator[SEP] { identifier[MethodAttribUtils] operator[SEP] identifier[chkBMTFromAnnotations] operator[SEP] identifier[ejbMethods] , identifier[bmd] operator[SEP] identifier[j2eeName] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] operator[!] identifier[bmd] operator[SEP] identifier[usesBeanManagedAS] operator[SEP] { identifier[MethodAttribUtils] operator[SEP] identifier[getActivitySessions] operator[SEP] identifier[activitySessionAttrs] , identifier[metaMethodElementKind] , identifier[methodNames] , identifier[methodParamTypes] , identifier[activitySessionList] , identifier[bmd] operator[SEP] identifier[enterpriseBeanName] , identifier[bmd] operator[SEP] identifier[usesBeanManagedAS] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[bmd] operator[SEP] identifier[wccm] operator[SEP] identifier[enterpriseBean] operator[!=] Other[null] operator[SEP] { identifier[MethodAttribUtils] operator[SEP] identifier[chkBMASFromXML] operator[SEP] identifier[activitySessionList] , identifier[bmd] operator[SEP] identifier[wccm] operator[SEP] identifier[enterpriseBean] , identifier[bmd] operator[SEP] identifier[j2eeName] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[methodInterface] operator[SEP] operator[SEP] }
public void remove(@NonNull String viewId) { if (viewId == null) { throw new NullPointerException("View Id is null"); } presenterMap.remove(viewId); }
class class_name[name] begin[{] method[remove, return_type[void], modifier[public], parameter[viewId]] begin[{] if[binary_operation[member[.viewId], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="View Id is null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NullPointerException, sub_type=None)), label=None) else begin[{] None end[}] call[presenterMap.remove, parameter[member[.viewId]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[remove] operator[SEP] annotation[@] identifier[NonNull] identifier[String] identifier[viewId] operator[SEP] { Keyword[if] operator[SEP] identifier[viewId] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[presenterMap] operator[SEP] identifier[remove] operator[SEP] identifier[viewId] operator[SEP] operator[SEP] }
@Override public <I> MatchResult<I> matchResult(I item) { StringDescription mismatch = new StringDescription(); if (matches(item, mismatch)) { return new MatchResultSuccess<>(item, this); } else { return new MatchResultMismatch<>(item, this, mismatch.toString()); } }
class class_name[name] begin[{] method[matchResult, return_type[type[MatchResult]], modifier[public], parameter[item]] begin[{] local_variable[type[StringDescription], mismatch] if[call[.matches, parameter[member[.item], member[.mismatch]]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=item, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=MatchResultSuccess, sub_type=None))] else begin[{] return[ClassCreator(arguments=[MemberReference(member=item, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=mismatch, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=MatchResultMismatch, sub_type=None))] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] operator[<] identifier[I] operator[>] identifier[MatchResult] operator[<] identifier[I] operator[>] identifier[matchResult] operator[SEP] identifier[I] identifier[item] operator[SEP] { identifier[StringDescription] identifier[mismatch] operator[=] Keyword[new] identifier[StringDescription] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[matches] operator[SEP] identifier[item] , identifier[mismatch] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[MatchResultSuccess] operator[<] operator[>] operator[SEP] identifier[item] , Keyword[this] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Keyword[new] identifier[MatchResultMismatch] operator[<] operator[>] operator[SEP] identifier[item] , Keyword[this] , identifier[mismatch] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
@Override public Map<Integer, byte[]> traverseStreamGraphAndGenerateHashes(StreamGraph streamGraph) { // The hash function used to generate the hash final HashFunction hashFunction = Hashing.murmur3_128(0); final Map<Integer, byte[]> hashes = new HashMap<>(); Set<Integer> visited = new HashSet<>(); Queue<StreamNode> remaining = new ArrayDeque<>(); // We need to make the source order deterministic. The source IDs are // not returned in the same order, which means that submitting the same // program twice might result in different traversal, which breaks the // deterministic hash assignment. List<Integer> sources = new ArrayList<>(); for (Integer sourceNodeId : streamGraph.getSourceIDs()) { sources.add(sourceNodeId); } Collections.sort(sources); // // Traverse the graph in a breadth-first manner. Keep in mind that // the graph is not a tree and multiple paths to nodes can exist. // // Start with source nodes for (Integer sourceNodeId : sources) { remaining.add(streamGraph.getStreamNode(sourceNodeId)); visited.add(sourceNodeId); } StreamNode currentNode; while ((currentNode = remaining.poll()) != null) { // Generate the hash code. Because multiple path exist to each // node, we might not have all required inputs available to // generate the hash code. if (generateNodeHash(currentNode, hashFunction, hashes, streamGraph.isChainingEnabled(), streamGraph)) { // Add the child nodes for (StreamEdge outEdge : currentNode.getOutEdges()) { StreamNode child = streamGraph.getTargetVertex(outEdge); if (!visited.contains(child.getId())) { remaining.add(child); visited.add(child.getId()); } } } else { // We will revisit this later. visited.remove(currentNode.getId()); } } return hashes; }
class class_name[name] begin[{] method[traverseStreamGraphAndGenerateHashes, return_type[type[Map]], modifier[public], parameter[streamGraph]] begin[{] local_variable[type[HashFunction], hashFunction] local_variable[type[Map], hashes] local_variable[type[Set], visited] local_variable[type[Queue], remaining] local_variable[type[List], sources] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sourceNodeId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=sources, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getSourceIDs, postfix_operators=[], prefix_operators=[], qualifier=streamGraph, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=sourceNodeId)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))), label=None) call[Collections.sort, parameter[member[.sources]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=sourceNodeId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getStreamNode, postfix_operators=[], prefix_operators=[], qualifier=streamGraph, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=remaining, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sourceNodeId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=visited, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=sources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=sourceNodeId)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))), label=None) local_variable[type[StreamNode], currentNode] while[binary_operation[assign[member[.currentNode], call[remaining.poll, parameter[]]], !=, literal[null]]] begin[{] if[call[.generateNodeHash, parameter[member[.currentNode], member[.hashFunction], member[.hashes], call[streamGraph.isChainingEnabled, parameter[]], member[.streamGraph]]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=outEdge, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getTargetVertex, postfix_operators=[], prefix_operators=[], qualifier=streamGraph, selectors=[], type_arguments=None), name=child)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StreamNode, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=child, selectors=[], type_arguments=None)], member=contains, postfix_operators=[], prefix_operators=['!'], qualifier=visited, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=remaining, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=child, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=visited, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getOutEdges, postfix_operators=[], prefix_operators=[], qualifier=currentNode, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=outEdge)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StreamEdge, sub_type=None))), label=None) else begin[{] call[visited.remove, parameter[call[currentNode.getId, parameter[]]]] end[}] end[}] return[member[.hashes]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Map] operator[<] identifier[Integer] , Keyword[byte] operator[SEP] operator[SEP] operator[>] identifier[traverseStreamGraphAndGenerateHashes] operator[SEP] identifier[StreamGraph] identifier[streamGraph] operator[SEP] { Keyword[final] identifier[HashFunction] identifier[hashFunction] operator[=] identifier[Hashing] operator[SEP] identifier[murmur3_128] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[Integer] , Keyword[byte] operator[SEP] operator[SEP] operator[>] identifier[hashes] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[Integer] operator[>] identifier[visited] operator[=] Keyword[new] identifier[HashSet] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Queue] operator[<] identifier[StreamNode] operator[>] identifier[remaining] operator[=] Keyword[new] identifier[ArrayDeque] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Integer] operator[>] identifier[sources] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Integer] identifier[sourceNodeId] operator[:] identifier[streamGraph] operator[SEP] identifier[getSourceIDs] operator[SEP] operator[SEP] operator[SEP] { identifier[sources] operator[SEP] identifier[add] operator[SEP] identifier[sourceNodeId] operator[SEP] operator[SEP] } identifier[Collections] operator[SEP] identifier[sort] operator[SEP] identifier[sources] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Integer] identifier[sourceNodeId] operator[:] identifier[sources] operator[SEP] { identifier[remaining] operator[SEP] identifier[add] operator[SEP] identifier[streamGraph] operator[SEP] identifier[getStreamNode] operator[SEP] identifier[sourceNodeId] operator[SEP] operator[SEP] operator[SEP] identifier[visited] operator[SEP] identifier[add] operator[SEP] identifier[sourceNodeId] operator[SEP] operator[SEP] } identifier[StreamNode] identifier[currentNode] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[currentNode] operator[=] identifier[remaining] operator[SEP] identifier[poll] operator[SEP] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[generateNodeHash] operator[SEP] identifier[currentNode] , identifier[hashFunction] , identifier[hashes] , identifier[streamGraph] operator[SEP] identifier[isChainingEnabled] operator[SEP] operator[SEP] , identifier[streamGraph] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[StreamEdge] identifier[outEdge] operator[:] identifier[currentNode] operator[SEP] identifier[getOutEdges] operator[SEP] operator[SEP] operator[SEP] { identifier[StreamNode] identifier[child] operator[=] identifier[streamGraph] operator[SEP] identifier[getTargetVertex] operator[SEP] identifier[outEdge] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[visited] operator[SEP] identifier[contains] operator[SEP] identifier[child] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[remaining] operator[SEP] identifier[add] operator[SEP] identifier[child] operator[SEP] operator[SEP] identifier[visited] operator[SEP] identifier[add] operator[SEP] identifier[child] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[else] { identifier[visited] operator[SEP] identifier[remove] operator[SEP] identifier[currentNode] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[hashes] operator[SEP] }
public StructuredQueryDefinition geospatial(GeospatialIndex index, FragmentScope scope, String[] options, Region... regions) { checkRegions(regions); return new GeospatialPointQuery(index, scope, regions, options); }
class class_name[name] begin[{] method[geospatial, return_type[type[StructuredQueryDefinition]], modifier[public], parameter[index, scope, options, regions]] begin[{] call[.checkRegions, parameter[member[.regions]]] return[ClassCreator(arguments=[MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=scope, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=regions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=options, 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=GeospatialPointQuery, sub_type=None))] end[}] END[}]
Keyword[public] identifier[StructuredQueryDefinition] identifier[geospatial] operator[SEP] identifier[GeospatialIndex] identifier[index] , identifier[FragmentScope] identifier[scope] , identifier[String] operator[SEP] operator[SEP] identifier[options] , identifier[Region] operator[...] identifier[regions] operator[SEP] { identifier[checkRegions] operator[SEP] identifier[regions] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[GeospatialPointQuery] operator[SEP] identifier[index] , identifier[scope] , identifier[regions] , identifier[options] operator[SEP] operator[SEP] }
@Override public boolean isConstant(String name) { if (name.length() <= 1) { return false; } // In compiled code, '$' is often a namespace delimiter. To allow inlining // of namespaced constants, we strip off any namespaces here. int pos = name.lastIndexOf('$'); if (pos >= 0) { name = name.substring(pos + 1); if (name.isEmpty()) { return false; } } return isConstantKey(name); }
class class_name[name] begin[{] method[isConstant, return_type[type[boolean]], modifier[public], parameter[name]] begin[{] if[binary_operation[call[name.length, parameter[]], <=, literal[1]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[int], pos] if[binary_operation[member[.pos], >=, literal[0]]] begin[{] assign[member[.name], call[name.substring, parameter[binary_operation[member[.pos], +, literal[1]]]]] if[call[name.isEmpty, parameter[]]] begin[{] return[literal[false]] else begin[{] None end[}] else begin[{] None end[}] return[call[.isConstantKey, parameter[member[.name]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[isConstant] operator[SEP] identifier[String] identifier[name] operator[SEP] { Keyword[if] operator[SEP] identifier[name] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[<=] Other[1] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[int] identifier[pos] operator[=] identifier[name] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pos] operator[>=] Other[0] operator[SEP] { identifier[name] operator[=] identifier[name] operator[SEP] identifier[substring] operator[SEP] identifier[pos] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[name] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] identifier[isConstantKey] operator[SEP] identifier[name] operator[SEP] operator[SEP] }
public Node createProxyNode(Object sourceNodeId, Object targetNodeId, GraphDatabaseService graphDb, EntityMetadata sourceEntityMetadata, EntityMetadata targetEntityMetadata) { String sourceNodeIdColumnName = ((AbstractAttribute) sourceEntityMetadata.getIdAttribute()).getJPAColumnName(); String targetNodeIdColumnName = ((AbstractAttribute) targetEntityMetadata.getIdAttribute()).getJPAColumnName(); Node node = graphDb.createNode(); node.setProperty(PROXY_NODE_TYPE_KEY, PROXY_NODE_VALUE); node.setProperty(sourceNodeIdColumnName, sourceNodeId); node.setProperty(targetNodeIdColumnName, targetNodeId); return node; }
class class_name[name] begin[{] method[createProxyNode, return_type[type[Node]], modifier[public], parameter[sourceNodeId, targetNodeId, graphDb, sourceEntityMetadata, targetEntityMetadata]] begin[{] local_variable[type[String], sourceNodeIdColumnName] local_variable[type[String], targetNodeIdColumnName] local_variable[type[Node], node] call[node.setProperty, parameter[member[.PROXY_NODE_TYPE_KEY], member[.PROXY_NODE_VALUE]]] call[node.setProperty, parameter[member[.sourceNodeIdColumnName], member[.sourceNodeId]]] call[node.setProperty, parameter[member[.targetNodeIdColumnName], member[.targetNodeId]]] return[member[.node]] end[}] END[}]
Keyword[public] identifier[Node] identifier[createProxyNode] operator[SEP] identifier[Object] identifier[sourceNodeId] , identifier[Object] identifier[targetNodeId] , identifier[GraphDatabaseService] identifier[graphDb] , identifier[EntityMetadata] identifier[sourceEntityMetadata] , identifier[EntityMetadata] identifier[targetEntityMetadata] operator[SEP] { identifier[String] identifier[sourceNodeIdColumnName] operator[=] operator[SEP] operator[SEP] identifier[AbstractAttribute] operator[SEP] identifier[sourceEntityMetadata] operator[SEP] identifier[getIdAttribute] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getJPAColumnName] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[targetNodeIdColumnName] operator[=] operator[SEP] operator[SEP] identifier[AbstractAttribute] operator[SEP] identifier[targetEntityMetadata] operator[SEP] identifier[getIdAttribute] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getJPAColumnName] operator[SEP] operator[SEP] operator[SEP] identifier[Node] identifier[node] operator[=] identifier[graphDb] operator[SEP] identifier[createNode] operator[SEP] operator[SEP] operator[SEP] identifier[node] operator[SEP] identifier[setProperty] operator[SEP] identifier[PROXY_NODE_TYPE_KEY] , identifier[PROXY_NODE_VALUE] operator[SEP] operator[SEP] identifier[node] operator[SEP] identifier[setProperty] operator[SEP] identifier[sourceNodeIdColumnName] , identifier[sourceNodeId] operator[SEP] operator[SEP] identifier[node] operator[SEP] identifier[setProperty] operator[SEP] identifier[targetNodeIdColumnName] , identifier[targetNodeId] operator[SEP] operator[SEP] Keyword[return] identifier[node] operator[SEP] }
public String joinWith(String separator, Object... join) { return Joiner.on(separator).join(delegate.get(), EMPTY, join); }
class class_name[name] begin[{] method[joinWith, return_type[type[String]], modifier[public], parameter[separator, join]] begin[{] return[call[Joiner.on, parameter[member[.separator]]]] end[}] END[}]
Keyword[public] identifier[String] identifier[joinWith] operator[SEP] identifier[String] identifier[separator] , identifier[Object] operator[...] identifier[join] operator[SEP] { Keyword[return] identifier[Joiner] operator[SEP] identifier[on] operator[SEP] identifier[separator] operator[SEP] operator[SEP] identifier[join] operator[SEP] identifier[delegate] operator[SEP] identifier[get] operator[SEP] operator[SEP] , identifier[EMPTY] , identifier[join] operator[SEP] operator[SEP] }
public void encodeBuffer(ByteBuffer aBuffer, OutputStream aStream) throws IOException { byte [] buf = getBytes(aBuffer); encodeBuffer(buf, aStream); }
class class_name[name] begin[{] method[encodeBuffer, return_type[void], modifier[public], parameter[aBuffer, aStream]] begin[{] local_variable[type[byte], buf] call[.encodeBuffer, parameter[member[.buf], member[.aStream]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[encodeBuffer] operator[SEP] identifier[ByteBuffer] identifier[aBuffer] , identifier[OutputStream] identifier[aStream] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[byte] operator[SEP] operator[SEP] identifier[buf] operator[=] identifier[getBytes] operator[SEP] identifier[aBuffer] operator[SEP] operator[SEP] identifier[encodeBuffer] operator[SEP] identifier[buf] , identifier[aStream] operator[SEP] operator[SEP] }
@NotNull @ObjectiveCName("bindFileWithReference:autoStart:withCallback:") public FileVM bindFile(FileReference fileReference, boolean isAutoStart, FileVMCallback callback) { return new FileVM(fileReference, isAutoStart, modules, callback); }
class class_name[name] begin[{] method[bindFile, return_type[type[FileVM]], modifier[public], parameter[fileReference, isAutoStart, callback]] begin[{] return[ClassCreator(arguments=[MemberReference(member=fileReference, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=isAutoStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=modules, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=callback, 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=FileVM, sub_type=None))] end[}] END[}]
annotation[@] identifier[NotNull] annotation[@] identifier[ObjectiveCName] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[FileVM] identifier[bindFile] operator[SEP] identifier[FileReference] identifier[fileReference] , Keyword[boolean] identifier[isAutoStart] , identifier[FileVMCallback] identifier[callback] operator[SEP] { Keyword[return] Keyword[new] identifier[FileVM] operator[SEP] identifier[fileReference] , identifier[isAutoStart] , identifier[modules] , identifier[callback] operator[SEP] operator[SEP] }
protected static List<UnicodeCandidate> getUnicodeCandidates(String input) { char[] inputCharArray = input.toCharArray(); List<UnicodeCandidate> candidates = new ArrayList<UnicodeCandidate>(); UnicodeCandidate next; for (int i = 0; (next = getNextUnicodeCandidate(inputCharArray, i)) != null; i = next.getFitzpatrickEndIndex()) { candidates.add(next); } return candidates; }
class class_name[name] begin[{] method[getUnicodeCandidates, return_type[type[List]], modifier[static protected], parameter[input]] begin[{] local_variable[type[char], inputCharArray] local_variable[type[List], candidates] local_variable[type[UnicodeCandidate], next] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=candidates, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=inputCharArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getNextUnicodeCandidate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), 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=MethodInvocation(arguments=[], member=getFitzpatrickEndIndex, postfix_operators=[], prefix_operators=[], qualifier=next, selectors=[], type_arguments=None))]), label=None) return[member[.candidates]] end[}] END[}]
Keyword[protected] Keyword[static] identifier[List] operator[<] identifier[UnicodeCandidate] operator[>] identifier[getUnicodeCandidates] operator[SEP] identifier[String] identifier[input] operator[SEP] { Keyword[char] operator[SEP] operator[SEP] identifier[inputCharArray] operator[=] identifier[input] operator[SEP] identifier[toCharArray] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[UnicodeCandidate] operator[>] identifier[candidates] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[UnicodeCandidate] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[UnicodeCandidate] identifier[next] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] operator[SEP] identifier[next] operator[=] identifier[getNextUnicodeCandidate] operator[SEP] identifier[inputCharArray] , identifier[i] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] identifier[i] operator[=] identifier[next] operator[SEP] identifier[getFitzpatrickEndIndex] operator[SEP] operator[SEP] operator[SEP] { identifier[candidates] operator[SEP] identifier[add] operator[SEP] identifier[next] operator[SEP] operator[SEP] } Keyword[return] identifier[candidates] operator[SEP] }
public static void writeProcessorOutputToValues( final Object output, final Processor<?, ?> processor, final Values values) { Map<String, String> mapper = processor.getOutputMapperBiMap(); if (mapper == null) { mapper = Collections.emptyMap(); } final Collection<Field> fields = getAllAttributes(output.getClass()); for (Field field: fields) { String name = getOutputValueName(processor.getOutputPrefix(), mapper, field); try { final Object value = field.get(output); if (value != null) { values.put(name, value); } else { values.remove(name); } } catch (IllegalAccessException e) { throw ExceptionUtils.getRuntimeException(e); } } }
class class_name[name] begin[{] method[writeProcessorOutputToValues, return_type[void], modifier[public static], parameter[output, processor, values]] begin[{] local_variable[type[Map], mapper] if[binary_operation[member[.mapper], ==, literal[null]]] begin[{] assign[member[.mapper], call[Collections.emptyMap, parameter[]]] else begin[{] None end[}] local_variable[type[Collection], fields] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getOutputPrefix, postfix_operators=[], prefix_operators=[], qualifier=processor, selectors=[], type_arguments=None), MemberReference(member=mapper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getOutputValueName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=name)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=output, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None), name=value)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=values, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=values, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getRuntimeException, postfix_operators=[], prefix_operators=[], qualifier=ExceptionUtils, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IllegalAccessException']))], finally_block=None, label=None, resources=None)]), control=EnhancedForControl(iterable=MemberReference(member=fields, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[writeProcessorOutputToValues] operator[SEP] Keyword[final] identifier[Object] identifier[output] , Keyword[final] identifier[Processor] operator[<] operator[?] , operator[?] operator[>] identifier[processor] , Keyword[final] identifier[Values] identifier[values] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[mapper] operator[=] identifier[processor] operator[SEP] identifier[getOutputMapperBiMap] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mapper] operator[==] Other[null] operator[SEP] { identifier[mapper] operator[=] identifier[Collections] operator[SEP] identifier[emptyMap] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[Collection] operator[<] identifier[Field] operator[>] identifier[fields] operator[=] identifier[getAllAttributes] operator[SEP] identifier[output] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Field] identifier[field] operator[:] identifier[fields] operator[SEP] { identifier[String] identifier[name] operator[=] identifier[getOutputValueName] operator[SEP] identifier[processor] operator[SEP] identifier[getOutputPrefix] operator[SEP] operator[SEP] , identifier[mapper] , identifier[field] operator[SEP] operator[SEP] Keyword[try] { Keyword[final] identifier[Object] identifier[value] operator[=] identifier[field] operator[SEP] identifier[get] operator[SEP] identifier[output] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[!=] Other[null] operator[SEP] { identifier[values] operator[SEP] identifier[put] operator[SEP] identifier[name] , identifier[value] operator[SEP] operator[SEP] } Keyword[else] { identifier[values] operator[SEP] identifier[remove] operator[SEP] identifier[name] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[IllegalAccessException] identifier[e] operator[SEP] { Keyword[throw] identifier[ExceptionUtils] operator[SEP] identifier[getRuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } }
public static com.liferay.commerce.model.CommerceOrder fetchCommerceOrderByUuidAndGroupId( String uuid, long groupId) { return getService().fetchCommerceOrderByUuidAndGroupId(uuid, groupId); }
class class_name[name] begin[{] method[fetchCommerceOrderByUuidAndGroupId, return_type[type[com]], modifier[public static], parameter[uuid, groupId]] begin[{] return[call[.getService, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[model] operator[SEP] identifier[CommerceOrder] identifier[fetchCommerceOrderByUuidAndGroupId] operator[SEP] identifier[String] identifier[uuid] , Keyword[long] identifier[groupId] operator[SEP] { Keyword[return] identifier[getService] operator[SEP] operator[SEP] operator[SEP] identifier[fetchCommerceOrderByUuidAndGroupId] operator[SEP] identifier[uuid] , identifier[groupId] operator[SEP] operator[SEP] }
DependencyInfo getDependencyInfo() { if (dependencyInfo == null) { dependencyInfo = generateDependencyInfo(); } if (!extraRequires.isEmpty() || !extraProvides.isEmpty()) { dependencyInfo = SimpleDependencyInfo.builder(getName(), getName()) .setProvides(concat(dependencyInfo.getProvides(), extraProvides)) .setRequires(concat(dependencyInfo.getRequires(), extraRequires)) .setTypeRequires(dependencyInfo.getTypeRequires()) .setLoadFlags(dependencyInfo.getLoadFlags()) .setHasExternsAnnotation(dependencyInfo.getHasExternsAnnotation()) .setHasNoCompileAnnotation(dependencyInfo.getHasNoCompileAnnotation()) .build(); extraRequires.clear(); extraProvides.clear(); } return dependencyInfo; }
class class_name[name] begin[{] method[getDependencyInfo, return_type[type[DependencyInfo]], modifier[default], parameter[]] begin[{] if[binary_operation[member[.dependencyInfo], ==, literal[null]]] begin[{] assign[member[.dependencyInfo], call[.generateDependencyInfo, parameter[]]] else begin[{] None end[}] if[binary_operation[call[extraRequires.isEmpty, parameter[]], ||, call[extraProvides.isEmpty, parameter[]]]] begin[{] assign[member[.dependencyInfo], call[SimpleDependencyInfo.builder, parameter[call[.getName, parameter[]], call[.getName, parameter[]]]]] call[extraRequires.clear, parameter[]] call[extraProvides.clear, parameter[]] else begin[{] None end[}] return[member[.dependencyInfo]] end[}] END[}]
identifier[DependencyInfo] identifier[getDependencyInfo] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[dependencyInfo] operator[==] Other[null] operator[SEP] { identifier[dependencyInfo] operator[=] identifier[generateDependencyInfo] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[extraRequires] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[||] operator[!] identifier[extraProvides] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[dependencyInfo] operator[=] identifier[SimpleDependencyInfo] operator[SEP] identifier[builder] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setProvides] operator[SEP] identifier[concat] operator[SEP] identifier[dependencyInfo] operator[SEP] identifier[getProvides] operator[SEP] operator[SEP] , identifier[extraProvides] operator[SEP] operator[SEP] operator[SEP] identifier[setRequires] operator[SEP] identifier[concat] operator[SEP] identifier[dependencyInfo] operator[SEP] identifier[getRequires] operator[SEP] operator[SEP] , identifier[extraRequires] operator[SEP] operator[SEP] operator[SEP] identifier[setTypeRequires] operator[SEP] identifier[dependencyInfo] operator[SEP] identifier[getTypeRequires] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setLoadFlags] operator[SEP] identifier[dependencyInfo] operator[SEP] identifier[getLoadFlags] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setHasExternsAnnotation] operator[SEP] identifier[dependencyInfo] operator[SEP] identifier[getHasExternsAnnotation] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setHasNoCompileAnnotation] operator[SEP] identifier[dependencyInfo] operator[SEP] identifier[getHasNoCompileAnnotation] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[extraRequires] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[extraProvides] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[dependencyInfo] operator[SEP] }
public void stopThreads() { if (threadMap.isEmpty()) { throw new IllegalStateException("threads are already interrupted"); } lock.lock(); try { Thread currentThread = Thread.currentThread(); for (Thread thread : threadMap.values()) { if (!currentThread.equals(thread)) { thread.interrupt(); } } threadMap.clear(); semaphoreMap.clear(); } finally { lock.unlock(); } }
class class_name[name] begin[{] method[stopThreads, return_type[void], modifier[public], parameter[]] begin[{] if[call[threadMap.isEmpty, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="threads are already interrupted")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] call[lock.lock, parameter[]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=currentThread, postfix_operators=[], prefix_operators=[], qualifier=Thread, selectors=[], type_arguments=None), name=currentThread)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Thread, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=thread, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=['!'], qualifier=currentThread, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=interrupt, postfix_operators=[], prefix_operators=[], qualifier=thread, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=threadMap, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=thread)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Thread, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=clear, postfix_operators=[], prefix_operators=[], qualifier=threadMap, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=clear, postfix_operators=[], prefix_operators=[], qualifier=semaphoreMap, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=unlock, postfix_operators=[], prefix_operators=[], qualifier=lock, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[stopThreads] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[threadMap] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[lock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[Thread] identifier[currentThread] operator[=] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Thread] identifier[thread] operator[:] identifier[threadMap] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[currentThread] operator[SEP] identifier[equals] operator[SEP] identifier[thread] operator[SEP] operator[SEP] { identifier[thread] operator[SEP] identifier[interrupt] operator[SEP] operator[SEP] operator[SEP] } } identifier[threadMap] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[semaphoreMap] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { identifier[lock] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP] } }
protected static String getEndedWord(String str, int pos){ assert(pos < str.length() && pos >= 0); if( posIsAtWordEnd(str, pos) ){ int prevSpace = findLastNonLetterOrDigit(str, pos); return str.substring(prevSpace+1, pos+1); } return null; }
class class_name[name] begin[{] method[getEndedWord, return_type[type[String]], modifier[static protected], parameter[str, pos]] begin[{] AssertStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), operator=<), operandr=BinaryOperation(operandl=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), operator=&&), label=None, value=None) if[call[.posIsAtWordEnd, parameter[member[.str], member[.pos]]]] begin[{] local_variable[type[int], prevSpace] return[call[str.substring, parameter[binary_operation[member[.prevSpace], +, literal[1]], binary_operation[member[.pos], +, literal[1]]]]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[protected] Keyword[static] identifier[String] identifier[getEndedWord] operator[SEP] identifier[String] identifier[str] , Keyword[int] identifier[pos] operator[SEP] { Keyword[assert] operator[SEP] identifier[pos] operator[<] identifier[str] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[&&] identifier[pos] operator[>=] Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[posIsAtWordEnd] operator[SEP] identifier[str] , identifier[pos] operator[SEP] operator[SEP] { Keyword[int] identifier[prevSpace] operator[=] identifier[findLastNonLetterOrDigit] operator[SEP] identifier[str] , identifier[pos] operator[SEP] operator[SEP] Keyword[return] identifier[str] operator[SEP] identifier[substring] operator[SEP] identifier[prevSpace] operator[+] Other[1] , identifier[pos] operator[+] Other[1] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public String getPageContent() { if(pageConent != null){return pageConent;} pageConent = gpUtil.getPageContent(page); return pageConent; }
class class_name[name] begin[{] method[getPageContent, return_type[type[String]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.pageConent], !=, literal[null]]] begin[{] return[member[.pageConent]] else begin[{] None end[}] assign[member[.pageConent], call[gpUtil.getPageContent, parameter[member[.page]]]] return[member[.pageConent]] end[}] END[}]
Keyword[public] identifier[String] identifier[getPageContent] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[pageConent] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[pageConent] operator[SEP] } identifier[pageConent] operator[=] identifier[gpUtil] operator[SEP] identifier[getPageContent] operator[SEP] identifier[page] operator[SEP] operator[SEP] Keyword[return] identifier[pageConent] operator[SEP] }
public static JsonNode getFirstNode(final String text, final String path) { try { JsonNode node = mapper.readValue(text, JsonNode.class); if (path != null) { node = (JsonNode) getElement(node, path); } return node; } catch (final IOException e) { logger.error("Cannot get first node", e); } return null; }
class class_name[name] begin[{] method[getFirstNode, return_type[type[JsonNode]], modifier[public static], parameter[text, path]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=text, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JsonNode, sub_type=None))], member=readValue, postfix_operators=[], prefix_operators=[], qualifier=mapper, selectors=[], type_arguments=None), name=node)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JsonNode, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=JsonNode, sub_type=None))), label=None)])), ReturnStatement(expression=MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot get first node"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] identifier[JsonNode] identifier[getFirstNode] operator[SEP] Keyword[final] identifier[String] identifier[text] , Keyword[final] identifier[String] identifier[path] operator[SEP] { Keyword[try] { identifier[JsonNode] identifier[node] operator[=] identifier[mapper] operator[SEP] identifier[readValue] operator[SEP] identifier[text] , identifier[JsonNode] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[path] operator[!=] Other[null] operator[SEP] { identifier[node] operator[=] operator[SEP] identifier[JsonNode] operator[SEP] identifier[getElement] operator[SEP] identifier[node] , identifier[path] operator[SEP] operator[SEP] } Keyword[return] identifier[node] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[IOException] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public T get(T dest, int index) { checkBounds(index); // We would rather do // UnsafeHelper.copyMemory(null, offset(index), dest, firstFieldOffset, elementSize); // but this is unsupported by the Unsafe class copier.copy(dest, offset(index)); return dest; }
class class_name[name] begin[{] method[get, return_type[type[T]], modifier[public], parameter[dest, index]] begin[{] call[.checkBounds, parameter[member[.index]]] call[copier.copy, parameter[member[.dest], call[.offset, parameter[member[.index]]]]] return[member[.dest]] end[}] END[}]
Keyword[public] identifier[T] identifier[get] operator[SEP] identifier[T] identifier[dest] , Keyword[int] identifier[index] operator[SEP] { identifier[checkBounds] operator[SEP] identifier[index] operator[SEP] operator[SEP] identifier[copier] operator[SEP] identifier[copy] operator[SEP] identifier[dest] , identifier[offset] operator[SEP] identifier[index] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[dest] operator[SEP] }
public void installIfNotInstalled() throws IOException { try { factory.getNodeAndNPMInstaller(proxy()) .install(mojo.getNodeVersion(), mojo.getNPMVersion(), mojo.getNodeDistributionRootUrl(), mojo.getNpmRegistryRootUrl() + "/npm/-/"); if (!getNodeExecutable().isFile()) { throw new IOException("Node installation failed - " + getNodeExecutable().getAbsolutePath() + " does not exist"); } } catch (InstallationException e) { throw new IOException(e); } }
class class_name[name] begin[{] method[installIfNotInstalled, return_type[void], modifier[public], parameter[]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=proxy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=getNodeAndNPMInstaller, postfix_operators=[], prefix_operators=[], qualifier=factory, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNodeVersion, postfix_operators=[], prefix_operators=[], qualifier=mojo, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getNPMVersion, postfix_operators=[], prefix_operators=[], qualifier=mojo, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getNodeDistributionRootUrl, postfix_operators=[], prefix_operators=[], qualifier=mojo, selectors=[], type_arguments=None), BinaryOperation(operandl=MethodInvocation(arguments=[], member=getNpmRegistryRootUrl, postfix_operators=[], prefix_operators=[], qualifier=mojo, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/npm/-/"), operator=+)], member=install, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=getNodeExecutable, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[MethodInvocation(arguments=[], member=isFile, 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=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Node installation failed - "), operandr=MethodInvocation(arguments=[], member=getNodeExecutable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getAbsolutePath, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" does not exist"), operator=+)], 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)]))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InstallationException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[installIfNotInstalled] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[try] { identifier[factory] operator[SEP] identifier[getNodeAndNPMInstaller] operator[SEP] identifier[proxy] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[install] operator[SEP] identifier[mojo] operator[SEP] identifier[getNodeVersion] operator[SEP] operator[SEP] , identifier[mojo] operator[SEP] identifier[getNPMVersion] operator[SEP] operator[SEP] , identifier[mojo] operator[SEP] identifier[getNodeDistributionRootUrl] operator[SEP] operator[SEP] , identifier[mojo] operator[SEP] identifier[getNpmRegistryRootUrl] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[getNodeExecutable] operator[SEP] operator[SEP] operator[SEP] identifier[isFile] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[getNodeExecutable] operator[SEP] operator[SEP] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[InstallationException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
public <T extends Named> List<T> prepareProcessors(List<T> namedList, String type) { List<T> ret = new ArrayList<>(); Map<String, T> lookup = new HashMap<>(); for (T named : namedList) { lookup.put(named.getName(), named); } for (String inc : includes) { if (use(inc)) { T named = lookup.get(inc); if (named == null) { List<String> keys = new ArrayList<>(lookup.keySet()); Collections.sort(keys); throw new IllegalArgumentException( "No " + type + " with name '" + inc + "' found to include. " + "Please check spelling in your profile / config and your project dependencies. Included " + type + "s: " + StringUtils.join(keys,", ")); } ret.add(named); } } return ret; }
class class_name[name] begin[{] method[prepareProcessors, return_type[type[List]], modifier[public], parameter[namedList, type]] begin[{] local_variable[type[List], ret] local_variable[type[Map], lookup] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=named, selectors=[], type_arguments=None), MemberReference(member=named, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=lookup, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=namedList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=named)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=inc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=use, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=inc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=lookup, selectors=[], type_arguments=None), name=named)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=named, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=lookup, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None)), name=keys)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=List, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=keys, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sort, postfix_operators=[], prefix_operators=[], qualifier=Collections, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No "), operandr=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" with name '"), operator=+), operandr=MemberReference(member=inc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' found to include. "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Please check spelling in your profile / config and your project dependencies. Included "), operator=+), operandr=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="s: "), operator=+), operandr=MethodInvocation(arguments=[MemberReference(member=keys, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", ")], member=join, postfix_operators=[], prefix_operators=[], qualifier=StringUtils, 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)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=named, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=ret, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=includes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=inc)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[member[.ret]] end[}] END[}]
Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[Named] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[prepareProcessors] operator[SEP] identifier[List] operator[<] identifier[T] operator[>] identifier[namedList] , identifier[String] identifier[type] operator[SEP] { identifier[List] operator[<] identifier[T] operator[>] identifier[ret] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[T] operator[>] identifier[lookup] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[T] identifier[named] operator[:] identifier[namedList] operator[SEP] { identifier[lookup] operator[SEP] identifier[put] operator[SEP] identifier[named] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[named] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[String] identifier[inc] operator[:] identifier[includes] operator[SEP] { Keyword[if] operator[SEP] identifier[use] operator[SEP] identifier[inc] operator[SEP] operator[SEP] { identifier[T] identifier[named] operator[=] identifier[lookup] operator[SEP] identifier[get] operator[SEP] identifier[inc] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[named] operator[==] Other[null] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[keys] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[lookup] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Collections] operator[SEP] identifier[sort] operator[SEP] identifier[keys] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[type] operator[+] literal[String] operator[+] identifier[inc] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[type] operator[+] literal[String] operator[+] identifier[StringUtils] operator[SEP] identifier[join] operator[SEP] identifier[keys] , literal[String] operator[SEP] operator[SEP] operator[SEP] } identifier[ret] operator[SEP] identifier[add] operator[SEP] identifier[named] operator[SEP] operator[SEP] } } Keyword[return] identifier[ret] operator[SEP] }
private Node createParameters(boolean lastVarArgs, JSType... parameterTypes) { FunctionParamBuilder builder = new FunctionParamBuilder(this); int max = parameterTypes.length - 1; for (int i = 0; i <= max; i++) { if (lastVarArgs && i == max) { builder.addVarArgs(parameterTypes[i]); } else { builder.addRequiredParams(parameterTypes[i]); } } return builder.build(); }
class class_name[name] begin[{] method[createParameters, return_type[type[Node]], modifier[private], parameter[lastVarArgs, parameterTypes]] begin[{] local_variable[type[FunctionParamBuilder], builder] local_variable[type[int], max] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=lastVarArgs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=max, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=&&), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=parameterTypes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=addRequiredParams, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=parameterTypes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=addVarArgs, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=max, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[call[builder.build, parameter[]]] end[}] END[}]
Keyword[private] identifier[Node] identifier[createParameters] operator[SEP] Keyword[boolean] identifier[lastVarArgs] , identifier[JSType] operator[...] identifier[parameterTypes] operator[SEP] { identifier[FunctionParamBuilder] identifier[builder] operator[=] Keyword[new] identifier[FunctionParamBuilder] operator[SEP] Keyword[this] operator[SEP] operator[SEP] Keyword[int] identifier[max] operator[=] identifier[parameterTypes] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<=] identifier[max] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[lastVarArgs] operator[&&] identifier[i] operator[==] identifier[max] operator[SEP] { identifier[builder] operator[SEP] identifier[addVarArgs] operator[SEP] identifier[parameterTypes] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[builder] operator[SEP] identifier[addRequiredParams] operator[SEP] identifier[parameterTypes] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[builder] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] }
@Override public synchronized void mark(int idx) throws IOException { try { in.mark(idx); } catch (IOException e) { handleIOException(e); } }
class class_name[name] begin[{] method[mark, return_type[void], modifier[synchronized public], parameter[idx]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=mark, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=handleIOException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[synchronized] Keyword[void] identifier[mark] operator[SEP] Keyword[int] identifier[idx] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[try] { identifier[in] operator[SEP] identifier[mark] operator[SEP] identifier[idx] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[handleIOException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
public final void entryRuleRuleID() throws RecognitionException { try { // InternalXtext.g:796:1: ( ruleRuleID EOF ) // InternalXtext.g:797:1: ruleRuleID EOF { before(grammarAccess.getRuleIDRule()); pushFollow(FollowSets000.FOLLOW_1); ruleRuleID(); state._fsp--; after(grammarAccess.getRuleIDRule()); match(input,EOF,FollowSets000.FOLLOW_2); } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return ; }
class class_name[name] begin[{] method[entryRuleRuleID, return_type[void], modifier[final public], parameter[]] begin[{] TryStatement(block=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getRuleIDRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=before, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_1, postfix_operators=[], prefix_operators=[], qualifier=FollowSets000, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=ruleRuleID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getRuleIDRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=after, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=EOF, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=FOLLOW_2, postfix_operators=[], prefix_operators=[], qualifier=FollowSets000, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=reportError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=[], label=None, resources=None) return[None] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[entryRuleRuleID] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { Keyword[try] { { identifier[before] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getRuleIDRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[pushFollow] operator[SEP] identifier[FollowSets000] operator[SEP] identifier[FOLLOW_1] operator[SEP] operator[SEP] identifier[ruleRuleID] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] identifier[after] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getRuleIDRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[match] operator[SEP] identifier[input] , identifier[EOF] , identifier[FollowSets000] operator[SEP] identifier[FOLLOW_2] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[re] operator[SEP] { identifier[reportError] operator[SEP] identifier[re] operator[SEP] operator[SEP] identifier[recover] operator[SEP] identifier[input] , identifier[re] operator[SEP] operator[SEP] } Keyword[finally] { } Keyword[return] operator[SEP] }
public static List<Polygon> gridcoverageToCellPolygons( GridCoverage2D coverage ) { RegionMap regionMap = CoverageUtilities.getRegionParamsFromGridCoverage(coverage); double west = regionMap.getWest(); double north = regionMap.getNorth(); double xres = regionMap.getXres(); double yres = regionMap.getYres(); int cols = regionMap.getCols(); int rows = regionMap.getRows(); List<Polygon> polygons = new ArrayList<Polygon>(); for( int r = 0; r < rows; r++ ) { for( int c = 0; c < cols; c++ ) { double w = west + xres * c; double e = w + xres; double n = north - yres * r; double s = n - yres; Coordinate[] coords = new Coordinate[5]; coords[0] = new Coordinate(w, n); coords[1] = new Coordinate(e, n); coords[2] = new Coordinate(e, s); coords[3] = new Coordinate(w, s); coords[4] = new Coordinate(w, n); GeometryFactory gf = GeometryUtilities.gf(); LinearRing linearRing = gf.createLinearRing(coords); Polygon polygon = gf.createPolygon(linearRing, null); polygons.add(polygon); } } return polygons; }
class class_name[name] begin[{] method[gridcoverageToCellPolygons, return_type[type[List]], modifier[public static], parameter[coverage]] begin[{] local_variable[type[RegionMap], regionMap] local_variable[type[double], west] local_variable[type[double], north] local_variable[type[double], xres] local_variable[type[double], yres] local_variable[type[int], cols] local_variable[type[int], rows] local_variable[type[List], polygons] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=west, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=xres, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operator=+), name=w)], modifiers=set(), type=BasicType(dimensions=[], name=double)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=w, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=xres, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), name=e)], modifiers=set(), type=BasicType(dimensions=[], name=double)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=north, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=yres, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operator=-), name=n)], modifiers=set(), type=BasicType(dimensions=[], name=double)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=yres, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), name=s)], modifiers=set(), type=BasicType(dimensions=[], name=double)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Coordinate, sub_type=None)), name=coords)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=Coordinate, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=coords, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), type==, value=ClassCreator(arguments=[MemberReference(member=w, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=n, 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=Coordinate, sub_type=None))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=coords, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), type==, value=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=n, 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=Coordinate, sub_type=None))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=coords, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2))]), type==, value=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=s, 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=Coordinate, sub_type=None))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=coords, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3))]), type==, value=ClassCreator(arguments=[MemberReference(member=w, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=s, 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=Coordinate, sub_type=None))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=coords, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4))]), type==, value=ClassCreator(arguments=[MemberReference(member=w, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=n, 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=Coordinate, sub_type=None))), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=gf, postfix_operators=[], prefix_operators=[], qualifier=GeometryUtilities, selectors=[], type_arguments=None), name=gf)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=GeometryFactory, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=coords, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createLinearRing, postfix_operators=[], prefix_operators=[], qualifier=gf, selectors=[], type_arguments=None), name=linearRing)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=LinearRing, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=linearRing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=createPolygon, postfix_operators=[], prefix_operators=[], qualifier=gf, selectors=[], type_arguments=None), name=polygon)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Polygon, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=polygon, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=polygons, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=cols, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=c)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=c, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=rows, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=r)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=r, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.polygons]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[Polygon] operator[>] identifier[gridcoverageToCellPolygons] operator[SEP] identifier[GridCoverage2D] identifier[coverage] operator[SEP] { identifier[RegionMap] identifier[regionMap] operator[=] identifier[CoverageUtilities] operator[SEP] identifier[getRegionParamsFromGridCoverage] operator[SEP] identifier[coverage] operator[SEP] operator[SEP] Keyword[double] identifier[west] operator[=] identifier[regionMap] operator[SEP] identifier[getWest] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[north] operator[=] identifier[regionMap] operator[SEP] identifier[getNorth] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[xres] operator[=] identifier[regionMap] operator[SEP] identifier[getXres] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[yres] operator[=] identifier[regionMap] operator[SEP] identifier[getYres] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[cols] operator[=] identifier[regionMap] operator[SEP] identifier[getCols] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[rows] operator[=] identifier[regionMap] operator[SEP] identifier[getRows] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Polygon] operator[>] identifier[polygons] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Polygon] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[r] operator[=] Other[0] operator[SEP] identifier[r] operator[<] identifier[rows] operator[SEP] identifier[r] operator[++] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[c] operator[=] Other[0] operator[SEP] identifier[c] operator[<] identifier[cols] operator[SEP] identifier[c] operator[++] operator[SEP] { Keyword[double] identifier[w] operator[=] identifier[west] operator[+] identifier[xres] operator[*] identifier[c] operator[SEP] Keyword[double] identifier[e] operator[=] identifier[w] operator[+] identifier[xres] operator[SEP] Keyword[double] identifier[n] operator[=] identifier[north] operator[-] identifier[yres] operator[*] identifier[r] operator[SEP] Keyword[double] identifier[s] operator[=] identifier[n] operator[-] identifier[yres] operator[SEP] identifier[Coordinate] operator[SEP] operator[SEP] identifier[coords] operator[=] Keyword[new] identifier[Coordinate] operator[SEP] Other[5] operator[SEP] operator[SEP] identifier[coords] operator[SEP] Other[0] operator[SEP] operator[=] Keyword[new] identifier[Coordinate] operator[SEP] identifier[w] , identifier[n] operator[SEP] operator[SEP] identifier[coords] operator[SEP] Other[1] operator[SEP] operator[=] Keyword[new] identifier[Coordinate] operator[SEP] identifier[e] , identifier[n] operator[SEP] operator[SEP] identifier[coords] operator[SEP] Other[2] operator[SEP] operator[=] Keyword[new] identifier[Coordinate] operator[SEP] identifier[e] , identifier[s] operator[SEP] operator[SEP] identifier[coords] operator[SEP] Other[3] operator[SEP] operator[=] Keyword[new] identifier[Coordinate] operator[SEP] identifier[w] , identifier[s] operator[SEP] operator[SEP] identifier[coords] operator[SEP] Other[4] operator[SEP] operator[=] Keyword[new] identifier[Coordinate] operator[SEP] identifier[w] , identifier[n] operator[SEP] operator[SEP] identifier[GeometryFactory] identifier[gf] operator[=] identifier[GeometryUtilities] operator[SEP] identifier[gf] operator[SEP] operator[SEP] operator[SEP] identifier[LinearRing] identifier[linearRing] operator[=] identifier[gf] operator[SEP] identifier[createLinearRing] operator[SEP] identifier[coords] operator[SEP] operator[SEP] identifier[Polygon] identifier[polygon] operator[=] identifier[gf] operator[SEP] identifier[createPolygon] operator[SEP] identifier[linearRing] , Other[null] operator[SEP] operator[SEP] identifier[polygons] operator[SEP] identifier[add] operator[SEP] identifier[polygon] operator[SEP] operator[SEP] } } Keyword[return] identifier[polygons] operator[SEP] }
public WebApp registerComponent(final Class<?> madvocComponent) { Objects.requireNonNull(madvocComponent); madvocComponents.add(ClassConsumer.of(madvocComponent)); return this; }
class class_name[name] begin[{] method[registerComponent, return_type[type[WebApp]], modifier[public], parameter[madvocComponent]] begin[{] call[Objects.requireNonNull, parameter[member[.madvocComponent]]] call[madvocComponents.add, parameter[call[ClassConsumer.of, parameter[member[.madvocComponent]]]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[WebApp] identifier[registerComponent] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[madvocComponent] operator[SEP] { identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[madvocComponent] operator[SEP] operator[SEP] identifier[madvocComponents] operator[SEP] identifier[add] operator[SEP] identifier[ClassConsumer] operator[SEP] identifier[of] operator[SEP] identifier[madvocComponent] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public static <T> T assertNotNull(T object, String message, Object... args) { return assertNotNull(object, null, message, args); }
class class_name[name] begin[{] method[assertNotNull, return_type[type[T]], modifier[public static], parameter[object, message, args]] begin[{] return[call[.assertNotNull, parameter[member[.object], literal[null], member[.message], member[.args]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[assertNotNull] operator[SEP] identifier[T] identifier[object] , identifier[String] identifier[message] , identifier[Object] operator[...] identifier[args] operator[SEP] { Keyword[return] identifier[assertNotNull] operator[SEP] identifier[object] , Other[null] , identifier[message] , identifier[args] operator[SEP] operator[SEP] }
void copyToLocal(String[]argv, int pos) throws IOException { CommandFormat cf = new CommandFormat("copyToLocal", 2,2,"crc","ignoreCrc"); String srcstr = null; String dststr = null; try { List<String> parameters = cf.parse(argv, pos); srcstr = parameters.get(0); dststr = parameters.get(1); } catch(IllegalArgumentException iae) { System.err.println("Usage: java FreightStreamer " + GET_SHORT_USAGE); throw iae; } boolean copyCrc = cf.getOpt("crc"); final boolean verifyChecksum = !cf.getOpt("ignoreCrc"); if (dststr.equals("-")) { if (copyCrc) { System.err.println("-crc option is not valid when destination is stdout."); } cat(srcstr, verifyChecksum); } else { File dst = new File(dststr); Path srcpath = new Path(srcstr); FileSystem srcFS = getSrcFileSystem(srcpath, verifyChecksum); if (copyCrc && !(srcFS instanceof ChecksumFileSystem)) { System.err.println("-crc option is not valid when source file system " + "does not have crc files. Automatically turn the option off."); copyCrc = false; } FileStatus[] srcs = srcFS.globStatus(srcpath); boolean dstIsDir = dst.isDirectory(); if (srcs.length > 1 && !dstIsDir) { throw new IOException("When copying multiple files, " + "destination should be a directory."); } for (FileStatus status : srcs) { Path p = status.getPath(); File f = dstIsDir? new File(dst, p.getName()): dst; copyToLocal(srcFS, p, f, copyCrc); } } }
class class_name[name] begin[{] method[copyToLocal, return_type[void], modifier[default], parameter[argv, pos]] begin[{] local_variable[type[CommandFormat], cf] local_variable[type[String], srcstr] local_variable[type[String], dststr] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=argv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parse, postfix_operators=[], prefix_operators=[], qualifier=cf, selectors=[], type_arguments=None), name=parameters)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=List, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=srcstr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=parameters, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=dststr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=get, postfix_operators=[], prefix_operators=[], qualifier=parameters, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Usage: java FreightStreamer "), operandr=MemberReference(member=GET_SHORT_USAGE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.err, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=MemberReference(member=iae, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=iae, types=['IllegalArgumentException']))], finally_block=None, label=None, resources=None) local_variable[type[boolean], copyCrc] local_variable[type[boolean], verifyChecksum] if[call[dststr.equals, parameter[literal["-"]]]] begin[{] if[member[.copyCrc]] begin[{] call[System.err.println, parameter[literal["-crc option is not valid when destination is stdout."]]] else begin[{] None end[}] call[.cat, parameter[member[.srcstr], member[.verifyChecksum]]] else begin[{] local_variable[type[File], dst] local_variable[type[Path], srcpath] local_variable[type[FileSystem], srcFS] if[binary_operation[member[.copyCrc], &&, binary_operation[member[.srcFS], instanceof, type[ChecksumFileSystem]]]] begin[{] call[System.err.println, parameter[binary_operation[literal["-crc option is not valid when source file system "], +, literal["does not have crc files. Automatically turn the option off."]]]] assign[member[.copyCrc], literal[false]] else begin[{] None end[}] local_variable[type[FileStatus], srcs] local_variable[type[boolean], dstIsDir] if[binary_operation[binary_operation[member[srcs.length], >, literal[1]], &&, member[.dstIsDir]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="When copying multiple files, "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="destination should be a directory."), operator=+)], 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) else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getPath, postfix_operators=[], prefix_operators=[], qualifier=status, selectors=[], type_arguments=None), name=p)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Path, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=MemberReference(member=dstIsDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=MemberReference(member=dst, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=ClassCreator(arguments=[MemberReference(member=dst, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))), name=f)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=srcFS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=copyCrc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=copyToLocal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=srcs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=status)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FileStatus, sub_type=None))), label=None) end[}] end[}] END[}]
Keyword[void] identifier[copyToLocal] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[argv] , Keyword[int] identifier[pos] operator[SEP] Keyword[throws] identifier[IOException] { identifier[CommandFormat] identifier[cf] operator[=] Keyword[new] identifier[CommandFormat] operator[SEP] literal[String] , Other[2] , Other[2] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[String] identifier[srcstr] operator[=] Other[null] operator[SEP] identifier[String] identifier[dststr] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[List] operator[<] identifier[String] operator[>] identifier[parameters] operator[=] identifier[cf] operator[SEP] identifier[parse] operator[SEP] identifier[argv] , identifier[pos] operator[SEP] operator[SEP] identifier[srcstr] operator[=] identifier[parameters] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[dststr] operator[=] identifier[parameters] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalArgumentException] identifier[iae] operator[SEP] { identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[GET_SHORT_USAGE] operator[SEP] operator[SEP] Keyword[throw] identifier[iae] operator[SEP] } Keyword[boolean] identifier[copyCrc] operator[=] identifier[cf] operator[SEP] identifier[getOpt] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[final] Keyword[boolean] identifier[verifyChecksum] operator[=] operator[!] identifier[cf] operator[SEP] identifier[getOpt] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dststr] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[copyCrc] operator[SEP] { identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[cat] operator[SEP] identifier[srcstr] , identifier[verifyChecksum] operator[SEP] operator[SEP] } Keyword[else] { identifier[File] identifier[dst] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[dststr] operator[SEP] operator[SEP] identifier[Path] identifier[srcpath] operator[=] Keyword[new] identifier[Path] operator[SEP] identifier[srcstr] operator[SEP] operator[SEP] identifier[FileSystem] identifier[srcFS] operator[=] identifier[getSrcFileSystem] operator[SEP] identifier[srcpath] , identifier[verifyChecksum] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[copyCrc] operator[&&] operator[!] operator[SEP] identifier[srcFS] Keyword[instanceof] identifier[ChecksumFileSystem] operator[SEP] operator[SEP] { identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] identifier[copyCrc] operator[=] literal[boolean] operator[SEP] } identifier[FileStatus] operator[SEP] operator[SEP] identifier[srcs] operator[=] identifier[srcFS] operator[SEP] identifier[globStatus] operator[SEP] identifier[srcpath] operator[SEP] operator[SEP] Keyword[boolean] identifier[dstIsDir] operator[=] identifier[dst] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[srcs] operator[SEP] identifier[length] operator[>] Other[1] operator[&&] operator[!] identifier[dstIsDir] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[FileStatus] identifier[status] operator[:] identifier[srcs] operator[SEP] { identifier[Path] identifier[p] operator[=] identifier[status] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] identifier[File] identifier[f] operator[=] identifier[dstIsDir] operator[?] Keyword[new] identifier[File] operator[SEP] identifier[dst] , identifier[p] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[:] identifier[dst] operator[SEP] identifier[copyToLocal] operator[SEP] identifier[srcFS] , identifier[p] , identifier[f] , identifier[copyCrc] operator[SEP] operator[SEP] } } }
public String toShortString() { StringBuilder sb = new StringBuilder(); taskToString(sb); if (m_msg != null) { sb.append("\n"); m_msg.toShortString(sb); } return sb.toString(); }
class class_name[name] begin[{] method[toShortString, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[StringBuilder], sb] call[.taskToString, parameter[member[.sb]]] if[binary_operation[member[.m_msg], !=, literal[null]]] begin[{] call[sb.append, parameter[literal["\n"]]] call[m_msg.toShortString, parameter[member[.sb]]] else begin[{] None end[}] return[call[sb.toString, parameter[]]] end[}] END[}]
Keyword[public] identifier[String] identifier[toShortString] operator[SEP] operator[SEP] { identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[taskToString] operator[SEP] identifier[sb] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m_msg] operator[!=] Other[null] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[m_msg] operator[SEP] identifier[toShortString] operator[SEP] identifier[sb] operator[SEP] operator[SEP] } Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }