code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public boolean startProgressMonitorTask( ProgressMonitorTask pmt) { if (busy) return false; busy = true; this.task = pmt; isCancelled = false; count = 0; setIcon(icon[0]); // create timer, whose events happen on the awt event Thread ActionListener watcher = new ActionListener() { public void actionPerformed(ActionEvent evt) { //System.out.println("timer event"+evt); if (isCancelled && !task.isCancel()) { task.cancel(); if (debug) System.out.println(" task.cancel"); return; // give it a chance to finish up } else { // indicate progress count++; setIcon( icon[count % 2]); if (debug) System.out.println(" stop count="+count); } // need to make sure task acknowledges the cancel; so dont shut down // until the task is done if (task.isDone()) { if (myTimer != null) myTimer.stop(); myTimer = null; if (task.isError()) javax.swing.JOptionPane.showMessageDialog(null, task.getErrorMessage()); if (task.isSuccess()) fireEvent( new ActionEvent(this, 0, "success")); else if (task.isError()) fireEvent( new ActionEvent(this, 0, "error")); else if (task.isCancel()) fireEvent( new ActionEvent(this, 0, "cancel")); else fireEvent( new ActionEvent(this, 0, "done")); busy = false; } } }; myTimer = new javax.swing.Timer(1000, watcher); // every second myTimer.start(); // do task in a seperate, non-event, thread Thread taskThread = new Thread(task); taskThread.start(); return true; }
class class_name[name] begin[{] method[startProgressMonitorTask, return_type[type[boolean]], modifier[public], parameter[pmt]] begin[{] if[member[.busy]] begin[{] return[literal[false]] else begin[{] None end[}] assign[member[.busy], literal[true]] assign[THIS[member[None.task]], member[.pmt]] assign[member[.isCancelled], literal[false]] assign[member[.count], literal[0]] call[.setIcon, parameter[member[.icon]]] local_variable[type[ActionListener], watcher] assign[member[.myTimer], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1000), MemberReference(member=watcher, 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=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=swing, sub_type=ReferenceType(arguments=None, dimensions=None, name=Timer, sub_type=None))))] call[myTimer.start, parameter[]] local_variable[type[Thread], taskThread] call[taskThread.start, parameter[]] return[literal[true]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[startProgressMonitorTask] operator[SEP] identifier[ProgressMonitorTask] identifier[pmt] operator[SEP] { Keyword[if] operator[SEP] identifier[busy] operator[SEP] Keyword[return] literal[boolean] operator[SEP] identifier[busy] operator[=] literal[boolean] operator[SEP] Keyword[this] operator[SEP] identifier[task] operator[=] identifier[pmt] operator[SEP] identifier[isCancelled] operator[=] literal[boolean] operator[SEP] identifier[count] operator[=] Other[0] operator[SEP] identifier[setIcon] operator[SEP] identifier[icon] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[ActionListener] identifier[watcher] operator[=] Keyword[new] identifier[ActionListener] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[actionPerformed] operator[SEP] identifier[ActionEvent] identifier[evt] operator[SEP] { Keyword[if] operator[SEP] identifier[isCancelled] operator[&&] operator[!] identifier[task] operator[SEP] identifier[isCancel] operator[SEP] operator[SEP] operator[SEP] { identifier[task] operator[SEP] identifier[cancel] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[debug] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[else] { identifier[count] operator[++] operator[SEP] identifier[setIcon] operator[SEP] identifier[icon] operator[SEP] identifier[count] operator[%] Other[2] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[debug] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[count] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[task] operator[SEP] identifier[isDone] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[myTimer] operator[!=] Other[null] operator[SEP] identifier[myTimer] operator[SEP] identifier[stop] operator[SEP] operator[SEP] operator[SEP] identifier[myTimer] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[task] operator[SEP] identifier[isError] operator[SEP] operator[SEP] operator[SEP] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[JOptionPane] operator[SEP] identifier[showMessageDialog] operator[SEP] Other[null] , identifier[task] operator[SEP] identifier[getErrorMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[task] operator[SEP] identifier[isSuccess] operator[SEP] operator[SEP] operator[SEP] identifier[fireEvent] operator[SEP] Keyword[new] identifier[ActionEvent] operator[SEP] Keyword[this] , Other[0] , literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[task] operator[SEP] identifier[isError] operator[SEP] operator[SEP] operator[SEP] identifier[fireEvent] operator[SEP] Keyword[new] identifier[ActionEvent] operator[SEP] Keyword[this] , Other[0] , literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[task] operator[SEP] identifier[isCancel] operator[SEP] operator[SEP] operator[SEP] identifier[fireEvent] operator[SEP] Keyword[new] identifier[ActionEvent] operator[SEP] Keyword[this] , Other[0] , literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[else] identifier[fireEvent] operator[SEP] Keyword[new] identifier[ActionEvent] operator[SEP] Keyword[this] , Other[0] , literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[busy] operator[=] literal[boolean] operator[SEP] } } } operator[SEP] identifier[myTimer] operator[=] Keyword[new] identifier[javax] operator[SEP] identifier[swing] operator[SEP] identifier[Timer] operator[SEP] Other[1000] , identifier[watcher] operator[SEP] operator[SEP] identifier[myTimer] operator[SEP] identifier[start] operator[SEP] operator[SEP] operator[SEP] identifier[Thread] identifier[taskThread] operator[=] Keyword[new] identifier[Thread] operator[SEP] identifier[task] operator[SEP] operator[SEP] identifier[taskThread] operator[SEP] identifier[start] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
public static boolean hasAdjacentDuplicates( Polygon2D_F64 polygon , double tol ) { for (int i = polygon.vertexes.size()-1,j=0; i >= 0 && polygon.size()>1; j=i,i--) { if( polygon.get(i).isIdentical(polygon.get(j),tol)) { return true; } } return false; }
class class_name[name] begin[{] method[hasAdjacentDuplicates, return_type[type[boolean]], modifier[public static], parameter[polygon, tol]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=polygon, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=polygon, selectors=[], type_arguments=None), MemberReference(member=tol, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isIdentical, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=polygon, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>), operator=&&), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=polygon.vertexes, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), name=i), VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[Assignment(expressionl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=i, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[literal[false]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[hasAdjacentDuplicates] operator[SEP] identifier[Polygon2D_F64] identifier[polygon] , Keyword[double] identifier[tol] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[polygon] operator[SEP] identifier[vertexes] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] , identifier[j] operator[=] Other[0] operator[SEP] identifier[i] operator[>=] Other[0] operator[&&] identifier[polygon] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[1] operator[SEP] identifier[j] operator[=] identifier[i] , identifier[i] operator[--] operator[SEP] { Keyword[if] operator[SEP] identifier[polygon] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[isIdentical] operator[SEP] identifier[polygon] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] , identifier[tol] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
private static Point2d getMidPoint(Tuple2d a, Tuple2d b) { return new Point2d((a.x + b.x) / 2, (a.y + b.y) / 2); }
class class_name[name] begin[{] method[getMidPoint, return_type[type[Point2d]], modifier[private static], parameter[a, b]] begin[{] return[ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=a, selectors=[]), operandr=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=b, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=/), BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=a, selectors=[]), operandr=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=b, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=/)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Point2d, sub_type=None))] end[}] END[}]
Keyword[private] Keyword[static] identifier[Point2d] identifier[getMidPoint] operator[SEP] identifier[Tuple2d] identifier[a] , identifier[Tuple2d] identifier[b] operator[SEP] { Keyword[return] Keyword[new] identifier[Point2d] operator[SEP] operator[SEP] identifier[a] operator[SEP] identifier[x] operator[+] identifier[b] operator[SEP] identifier[x] operator[SEP] operator[/] Other[2] , operator[SEP] identifier[a] operator[SEP] identifier[y] operator[+] identifier[b] operator[SEP] identifier[y] operator[SEP] operator[/] Other[2] operator[SEP] operator[SEP] }
@Override public SIDestinationAddress createTemporaryDestination(Distribution distribution, String destinationPrefix) throws SIConnectionUnavailableException, SIConnectionDroppedException, SIResourceException, SIConnectionLostException, SILimitExceededException, SIErrorException, SINotAuthorizedException, SIInvalidDestinationPrefixException { if (TraceComponent.isAnyTracingEnabled() && CoreSPIConnection.tc.isEntryEnabled()) SibTr.entry(CoreSPIConnection.tc, "createTemporaryDestination", new Object[] { this, destinationPrefix, distribution }); // See if this connection has been closed checkNotClosed(); // Check to make sure that the destination prefix is valid. // If it's not, then we can't continue. String result = SICoreUtils.isDestinationPrefixValid(destinationPrefix); if (!result.equals(SICoreUtils.VALID)) // if its not valid there is something wrong { if (result.equals(SICoreUtils.MAX_LENGTH_EXCEEDED)) {// prefix length might have been exceeded if (TraceComponent.isAnyTracingEnabled() && CoreSPIConnection.tc.isEntryEnabled()) SibTr.exit(CoreSPIConnection.tc, "createTemporaryDestination", "SIInvalidDestinationPrefixException"); throw new SIInvalidDestinationPrefixException( nls.getFormattedMessage( "INVALID_DESTINATION_PREFIX_MAX_LENGTH_ERROR_CWSIP0039", null, null)); } else { // an invalid character is there in the prefix if (TraceComponent.isAnyTracingEnabled() && CoreSPIConnection.tc.isEntryEnabled()) SibTr.exit(CoreSPIConnection.tc, "createTemporaryDestination", "SIInvalidDestinationPrefixException"); throw new SIInvalidDestinationPrefixException( nls.getFormattedMessage( "INVALID_DESTINATION_PREFIX_CHAR_ERROR_CWSIP0040", new Object[] { destinationPrefix, result }, null)); } } SIDestinationAddress address = null; // Synchronize on the close object, we don't want the connection closing // while we try to add the temporary destination. synchronized (this) { // Check authority to create destination // If security is disabled then we'll bypass the check checkTempDestinationCreation((destinationPrefix == null ? "" : destinationPrefix), distribution); // Synchronize on the temporaryDestinations list object so that we can't collide // on creations. This will also ensure list integrity. synchronized (_temporaryDestinations) { //pass this on to the destination manager try { address = _destinationManager.createTemporaryDestination(distribution, destinationPrefix); } catch (SIMPDestinationAlreadyExistsException e) { // FFDC FFDCFilter.processException( e, "com.ibm.ws.sib.processor.impl.ConnectionImpl.createTemporaryDestination", "1:3712:1.347.1.25", this); SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002", new Object[] { "com.ibm.ws.sib.processor.impl.ConnectionImpl", "1:3718:1.347.1.25", e }); // This should never be thrown if (TraceComponent.isAnyTracingEnabled() && CoreSPIConnection.tc.isEntryEnabled()) SibTr.exit(CoreSPIConnection.tc, "createTemporaryDestination", "SIErrorException"); throw new SIErrorException( nls.getFormattedMessage( "INTERNAL_MESSAGING_ERROR_CWSIP0002", new Object[] { "com.ibm.ws.sib.processor.impl.ConnectionImpl", "1:3729:1.347.1.25", e }, null), e); } //add to list _temporaryDestinations.add(address.getDestinationName()); } } if (TraceComponent.isAnyTracingEnabled() && CoreSPIConnection.tc.isEntryEnabled()) SibTr.exit(CoreSPIConnection.tc, "createTemporaryDestination", address); return address; }
class class_name[name] begin[{] method[createTemporaryDestination, return_type[type[SIDestinationAddress]], modifier[public], parameter[distribution, destinationPrefix]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[CoreSPIConnection.tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[CoreSPIConnection.tc], literal["createTemporaryDestination"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=destinationPrefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=distribution, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]] else begin[{] None end[}] call[.checkNotClosed, parameter[]] local_variable[type[String], result] if[call[result.equals, parameter[member[SICoreUtils.VALID]]]] begin[{] if[call[result.equals, parameter[member[SICoreUtils.MAX_LENGTH_EXCEEDED]]]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[CoreSPIConnection.tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[CoreSPIConnection.tc], literal["createTemporaryDestination"], literal["SIInvalidDestinationPrefixException"]]] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="INVALID_DESTINATION_PREFIX_MAX_LENGTH_ERROR_CWSIP0039"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=getFormattedMessage, postfix_operators=[], prefix_operators=[], qualifier=nls, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SIInvalidDestinationPrefixException, sub_type=None)), label=None) else begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[CoreSPIConnection.tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[CoreSPIConnection.tc], literal["createTemporaryDestination"], literal["SIInvalidDestinationPrefixException"]]] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="INVALID_DESTINATION_PREFIX_CHAR_ERROR_CWSIP0040"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=destinationPrefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=getFormattedMessage, postfix_operators=[], prefix_operators=[], qualifier=nls, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SIInvalidDestinationPrefixException, sub_type=None)), label=None) end[}] else begin[{] None end[}] local_variable[type[SIDestinationAddress], address] SYNCHRONIZED[THIS[]] BEGIN[{] call[.checkTempDestinationCreation, parameter[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=destinationPrefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MemberReference(member=destinationPrefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")), member[.distribution]]] SYNCHRONIZED[member[._temporaryDestinations]] BEGIN[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=address, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=distribution, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=destinationPrefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createTemporaryDestination, postfix_operators=[], prefix_operators=[], qualifier=_destinationManager, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ws.sib.processor.impl.ConnectionImpl.createTemporaryDestination"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1:3712:1.347.1.25"), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="INTERNAL_MESSAGING_ERROR_CWSIP0002"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ws.sib.processor.impl.ConnectionImpl"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1:3718:1.347.1.25"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=error, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isEntryEnabled, postfix_operators=[], prefix_operators=[], qualifier=CoreSPIConnection.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=CoreSPIConnection, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="createTemporaryDestination"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="SIErrorException")], member=exit, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)), ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="INTERNAL_MESSAGING_ERROR_CWSIP0002"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ws.sib.processor.impl.ConnectionImpl"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1:3729:1.347.1.25"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=getFormattedMessage, postfix_operators=[], prefix_operators=[], qualifier=nls, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SIErrorException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SIMPDestinationAlreadyExistsException']))], finally_block=None, label=None, resources=None) call[_temporaryDestinations.add, parameter[call[address.getDestinationName, parameter[]]]] END[}] END[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[CoreSPIConnection.tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[CoreSPIConnection.tc], literal["createTemporaryDestination"], member[.address]]] else begin[{] None end[}] return[member[.address]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[SIDestinationAddress] identifier[createTemporaryDestination] operator[SEP] identifier[Distribution] identifier[distribution] , identifier[String] identifier[destinationPrefix] operator[SEP] Keyword[throws] identifier[SIConnectionUnavailableException] , identifier[SIConnectionDroppedException] , identifier[SIResourceException] , identifier[SIConnectionLostException] , identifier[SILimitExceededException] , identifier[SIErrorException] , identifier[SINotAuthorizedException] , identifier[SIInvalidDestinationPrefixException] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[CoreSPIConnection] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[CoreSPIConnection] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { Keyword[this] , identifier[destinationPrefix] , identifier[distribution] } operator[SEP] operator[SEP] identifier[checkNotClosed] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[result] operator[=] identifier[SICoreUtils] operator[SEP] identifier[isDestinationPrefixValid] operator[SEP] identifier[destinationPrefix] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[result] operator[SEP] identifier[equals] operator[SEP] identifier[SICoreUtils] operator[SEP] identifier[VALID] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[result] operator[SEP] identifier[equals] operator[SEP] identifier[SICoreUtils] operator[SEP] identifier[MAX_LENGTH_EXCEEDED] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[CoreSPIConnection] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[CoreSPIConnection] operator[SEP] identifier[tc] , literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[SIInvalidDestinationPrefixException] operator[SEP] identifier[nls] operator[SEP] identifier[getFormattedMessage] operator[SEP] literal[String] , Other[null] , Other[null] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[CoreSPIConnection] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[CoreSPIConnection] operator[SEP] identifier[tc] , literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[SIInvalidDestinationPrefixException] operator[SEP] identifier[nls] operator[SEP] identifier[getFormattedMessage] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[destinationPrefix] , identifier[result] } , Other[null] operator[SEP] operator[SEP] operator[SEP] } } identifier[SIDestinationAddress] identifier[address] operator[=] Other[null] operator[SEP] Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] { identifier[checkTempDestinationCreation] operator[SEP] operator[SEP] identifier[destinationPrefix] operator[==] Other[null] operator[?] literal[String] operator[:] identifier[destinationPrefix] operator[SEP] , identifier[distribution] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] identifier[_temporaryDestinations] operator[SEP] { Keyword[try] { identifier[address] operator[=] identifier[_destinationManager] operator[SEP] identifier[createTemporaryDestination] operator[SEP] identifier[distribution] , identifier[destinationPrefix] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SIMPDestinationAlreadyExistsException] identifier[e] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[e] , literal[String] , literal[String] , Keyword[this] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { literal[String] , literal[String] , identifier[e] } operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[CoreSPIConnection] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[CoreSPIConnection] operator[SEP] identifier[tc] , literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[SIErrorException] operator[SEP] identifier[nls] operator[SEP] identifier[getFormattedMessage] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { literal[String] , literal[String] , identifier[e] } , Other[null] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } identifier[_temporaryDestinations] operator[SEP] identifier[add] operator[SEP] identifier[address] operator[SEP] identifier[getDestinationName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[CoreSPIConnection] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[CoreSPIConnection] operator[SEP] identifier[tc] , literal[String] , identifier[address] operator[SEP] operator[SEP] Keyword[return] identifier[address] operator[SEP] }
protected T getClass(Class<?> clazz) { // First check if we already have it T result = peek(clazz); if (result != null) return result; // Instantiate result = instantiate(clazz); // Put the preliminary result into the cache put(clazz, result); // Generate the details generate(clazz, result); return result; }
class class_name[name] begin[{] method[getClass, return_type[type[T]], modifier[protected], parameter[clazz]] begin[{] local_variable[type[T], result] if[binary_operation[member[.result], !=, literal[null]]] begin[{] return[member[.result]] else begin[{] None end[}] assign[member[.result], call[.instantiate, parameter[member[.clazz]]]] call[.put, parameter[member[.clazz], member[.result]]] call[.generate, parameter[member[.clazz], member[.result]]] return[member[.result]] end[}] END[}]
Keyword[protected] identifier[T] identifier[getClass] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[SEP] { identifier[T] identifier[result] operator[=] identifier[peek] operator[SEP] identifier[clazz] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[result] operator[SEP] identifier[result] operator[=] identifier[instantiate] operator[SEP] identifier[clazz] operator[SEP] operator[SEP] identifier[put] operator[SEP] identifier[clazz] , identifier[result] operator[SEP] operator[SEP] identifier[generate] operator[SEP] identifier[clazz] , identifier[result] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
public final void setPreviewBackground(final Drawable background) { this.previewBackground = background; if (previewLoader != null) { previewLoader.setBackground(background); } adaptPreviewView(); }
class class_name[name] begin[{] method[setPreviewBackground, return_type[void], modifier[final public], parameter[background]] begin[{] assign[THIS[member[None.previewBackground]], member[.background]] if[binary_operation[member[.previewLoader], !=, literal[null]]] begin[{] call[previewLoader.setBackground, parameter[member[.background]]] else begin[{] None end[}] call[.adaptPreviewView, parameter[]] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[setPreviewBackground] operator[SEP] Keyword[final] identifier[Drawable] identifier[background] operator[SEP] { Keyword[this] operator[SEP] identifier[previewBackground] operator[=] identifier[background] operator[SEP] Keyword[if] operator[SEP] identifier[previewLoader] operator[!=] Other[null] operator[SEP] { identifier[previewLoader] operator[SEP] identifier[setBackground] operator[SEP] identifier[background] operator[SEP] operator[SEP] } identifier[adaptPreviewView] operator[SEP] operator[SEP] operator[SEP] }
protected Text createText(Composite parent, String initialValue) { Text t = SWTFactory.createText(parent, SWT.SINGLE | SWT.BORDER, 1); t.setText(initialValue); return t; }
class class_name[name] begin[{] method[createText, return_type[type[Text]], modifier[protected], parameter[parent, initialValue]] begin[{] local_variable[type[Text], t] call[t.setText, parameter[member[.initialValue]]] return[member[.t]] end[}] END[}]
Keyword[protected] identifier[Text] identifier[createText] operator[SEP] identifier[Composite] identifier[parent] , identifier[String] identifier[initialValue] operator[SEP] { identifier[Text] identifier[t] operator[=] identifier[SWTFactory] operator[SEP] identifier[createText] operator[SEP] identifier[parent] , identifier[SWT] operator[SEP] identifier[SINGLE] operator[|] identifier[SWT] operator[SEP] identifier[BORDER] , Other[1] operator[SEP] operator[SEP] identifier[t] operator[SEP] identifier[setText] operator[SEP] identifier[initialValue] operator[SEP] operator[SEP] Keyword[return] identifier[t] operator[SEP] }
private Map<String, List<ViewRiksdagenCommitteeDecisionTypeOrgDailySummary>> getCommitteeDecisionTypeOrgMap() { final DataContainer<ViewRiksdagenCommitteeDecisionTypeOrgDailySummary, RiksdagenCommitteeDecisionTypeOrgSummaryEmbeddedId> committeeBallotDecisionPartyDataContainer = getApplicationManager() .getDataContainer(ViewRiksdagenCommitteeDecisionTypeOrgDailySummary.class); return committeeBallotDecisionPartyDataContainer.getAll().parallelStream().filter(Objects::nonNull) .collect(Collectors.groupingBy(t -> t.getEmbeddedId().getOrg())); }
class class_name[name] begin[{] method[getCommitteeDecisionTypeOrgMap, return_type[type[Map]], modifier[private], parameter[]] begin[{] local_variable[type[DataContainer], committeeBallotDecisionPartyDataContainer] return[call[committeeBallotDecisionPartyDataContainer.getAll, parameter[]]] end[}] END[}]
Keyword[private] identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[ViewRiksdagenCommitteeDecisionTypeOrgDailySummary] operator[>] operator[>] identifier[getCommitteeDecisionTypeOrgMap] operator[SEP] operator[SEP] { Keyword[final] identifier[DataContainer] operator[<] identifier[ViewRiksdagenCommitteeDecisionTypeOrgDailySummary] , identifier[RiksdagenCommitteeDecisionTypeOrgSummaryEmbeddedId] operator[>] identifier[committeeBallotDecisionPartyDataContainer] operator[=] identifier[getApplicationManager] operator[SEP] operator[SEP] operator[SEP] identifier[getDataContainer] operator[SEP] identifier[ViewRiksdagenCommitteeDecisionTypeOrgDailySummary] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[return] identifier[committeeBallotDecisionPartyDataContainer] operator[SEP] identifier[getAll] operator[SEP] operator[SEP] operator[SEP] identifier[parallelStream] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[Objects] operator[::] identifier[nonNull] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[groupingBy] operator[SEP] identifier[t] operator[->] identifier[t] operator[SEP] identifier[getEmbeddedId] operator[SEP] operator[SEP] operator[SEP] identifier[getOrg] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public FSArray getChemicalList() { if (ManualDescriptor_Type.featOkTst && ((ManualDescriptor_Type)jcasType).casFeat_chemicalList == null) jcasType.jcas.throwFeatMissing("chemicalList", "de.julielab.jules.types.pubmed.ManualDescriptor"); return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((ManualDescriptor_Type)jcasType).casFeatCode_chemicalList)));}
class class_name[name] begin[{] method[getChemicalList, return_type[type[FSArray]], modifier[public], parameter[]] begin[{] if[binary_operation[member[ManualDescriptor_Type.featOkTst], &&, binary_operation[Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ManualDescriptor_Type, sub_type=None)), ==, literal[null]]]] begin[{] call[jcasType.jcas.throwFeatMissing, parameter[literal["chemicalList"], literal["de.julielab.jules.types.pubmed.ManualDescriptor"]]] else begin[{] None end[}] return[Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=addr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ManualDescriptor_Type, sub_type=None))], member=ll_getRefValue, postfix_operators=[], prefix_operators=[], qualifier=jcasType.ll_cas, selectors=[], type_arguments=None)], member=ll_getFSForRef, postfix_operators=[], prefix_operators=[], qualifier=jcasType.ll_cas, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=FSArray, sub_type=None))] end[}] END[}]
Keyword[public] identifier[FSArray] identifier[getChemicalList] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ManualDescriptor_Type] operator[SEP] identifier[featOkTst] operator[&&] operator[SEP] operator[SEP] identifier[ManualDescriptor_Type] operator[SEP] identifier[jcasType] operator[SEP] operator[SEP] identifier[casFeat_chemicalList] operator[==] Other[null] operator[SEP] identifier[jcasType] operator[SEP] identifier[jcas] operator[SEP] identifier[throwFeatMissing] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[FSArray] operator[SEP] operator[SEP] identifier[jcasType] operator[SEP] identifier[ll_cas] operator[SEP] identifier[ll_getFSForRef] operator[SEP] identifier[jcasType] operator[SEP] identifier[ll_cas] operator[SEP] identifier[ll_getRefValue] operator[SEP] identifier[addr] , operator[SEP] operator[SEP] identifier[ManualDescriptor_Type] operator[SEP] identifier[jcasType] operator[SEP] operator[SEP] identifier[casFeatCode_chemicalList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public OperationStatusResponseInner beginUpdateInstances(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) { return beginUpdateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().body(); }
class class_name[name] begin[{] method[beginUpdateInstances, return_type[type[OperationStatusResponseInner]], modifier[public], parameter[resourceGroupName, vmScaleSetName, instanceIds]] begin[{] return[call[.beginUpdateInstancesWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.vmScaleSetName], member[.instanceIds]]]] end[}] END[}]
Keyword[public] identifier[OperationStatusResponseInner] identifier[beginUpdateInstances] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[vmScaleSetName] , identifier[List] operator[<] identifier[String] operator[>] identifier[instanceIds] operator[SEP] { Keyword[return] identifier[beginUpdateInstancesWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[vmScaleSetName] , identifier[instanceIds] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[single] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] }
public static <T> Stream<T> parallelConcat(final Collection<? extends Stream<? extends T>> c) { return parallelConcat(c, DEFAULT_READING_THREAD_NUM); }
class class_name[name] begin[{] method[parallelConcat, return_type[type[Stream]], modifier[public static], parameter[c]] begin[{] return[call[.parallelConcat, parameter[member[.c], member[.DEFAULT_READING_THREAD_NUM]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Stream] operator[<] identifier[T] operator[>] identifier[parallelConcat] operator[SEP] Keyword[final] identifier[Collection] operator[<] operator[?] Keyword[extends] identifier[Stream] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] operator[>] identifier[c] operator[SEP] { Keyword[return] identifier[parallelConcat] operator[SEP] identifier[c] , identifier[DEFAULT_READING_THREAD_NUM] operator[SEP] operator[SEP] }
protected ArrayList<Long> getSequencePortion(String seqName, int number) { if (number < 1 || number > 100000) throw new IllegalArgumentException("Invalid requested sequence count: " + number); String sql = "select nextval('" + seqName + "') as seqval from generate_series(1," + number + ")"; List<ResSeqVal> seqVals = selectData("seq_portion", sql, ResSeqVal.class, Collections.<SqlParam>emptyList()); ArrayList<Long> result = new ArrayList<Long>(); for (ResSeqVal item : seqVals) { result.add(item.seqval); } return result; }
class class_name[name] begin[{] method[getSequencePortion, return_type[type[ArrayList]], modifier[protected], parameter[seqName, number]] begin[{] if[binary_operation[binary_operation[member[.number], <, literal[1]], ||, binary_operation[member[.number], >, literal[100000]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid requested sequence count: "), operandr=MemberReference(member=number, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[String], sql] local_variable[type[List], seqVals] local_variable[type[ArrayList], result] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=seqval, postfix_operators=[], prefix_operators=[], qualifier=item, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=seqVals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=item)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ResSeqVal, sub_type=None))), label=None) return[member[.result]] end[}] END[}]
Keyword[protected] identifier[ArrayList] operator[<] identifier[Long] operator[>] identifier[getSequencePortion] operator[SEP] identifier[String] identifier[seqName] , Keyword[int] identifier[number] operator[SEP] { Keyword[if] operator[SEP] identifier[number] operator[<] Other[1] operator[||] identifier[number] operator[>] Other[100000] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[number] operator[SEP] operator[SEP] identifier[String] identifier[sql] operator[=] literal[String] operator[+] identifier[seqName] operator[+] literal[String] operator[+] identifier[number] operator[+] literal[String] operator[SEP] identifier[List] operator[<] identifier[ResSeqVal] operator[>] identifier[seqVals] operator[=] identifier[selectData] operator[SEP] literal[String] , identifier[sql] , identifier[ResSeqVal] operator[SEP] Keyword[class] , identifier[Collections] operator[SEP] operator[<] identifier[SqlParam] operator[>] identifier[emptyList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ArrayList] operator[<] identifier[Long] operator[>] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Long] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ResSeqVal] identifier[item] operator[:] identifier[seqVals] operator[SEP] { identifier[result] operator[SEP] identifier[add] operator[SEP] identifier[item] operator[SEP] identifier[seqval] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
protected void mergeAnnotationPropertyError(String property) throws InjectionConfigurationException { JNDIEnvironmentRefType refType = getJNDIEnvironmentRefType(); String component = ivNameSpaceConfig.getDisplayName(); String module = ivNameSpaceConfig.getModuleName(); String application = ivNameSpaceConfig.getApplicationName(); String jndiName = getJndiName(); Tr.error(tc, "INVALID_ANNOTATION_PROPERTY_CWNEN0066E", '@' + refType.getAnnotationShortName(), jndiName, refType.getNameAnnotationElementName(), component, module, application, property); String exMsg = "The @" + refType.getAnnotationShortName() + " source code annotation with the " + jndiName + " " + refType.getNameAnnotationElementName() + " attribute for the " + component + " component in the " + module + " module in the " + application + " application has configuration data for the properties attribute that is not valid: " + property; throw new InjectionConfigurationException(exMsg); }
class class_name[name] begin[{] method[mergeAnnotationPropertyError, return_type[void], modifier[protected], parameter[property]] begin[{] local_variable[type[JNDIEnvironmentRefType], refType] local_variable[type[String], component] local_variable[type[String], module] local_variable[type[String], application] local_variable[type[String], jndiName] call[Tr.error, parameter[member[.tc], literal["INVALID_ANNOTATION_PROPERTY_CWNEN0066E"], binary_operation[literal['@'], +, call[refType.getAnnotationShortName, parameter[]]], member[.jndiName], call[refType.getNameAnnotationElementName, parameter[]], member[.component], member[.module], member[.application], member[.property]]] local_variable[type[String], exMsg] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=exMsg, 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=InjectionConfigurationException, sub_type=None)), label=None) end[}] END[}]
Keyword[protected] Keyword[void] identifier[mergeAnnotationPropertyError] operator[SEP] identifier[String] identifier[property] operator[SEP] Keyword[throws] identifier[InjectionConfigurationException] { identifier[JNDIEnvironmentRefType] identifier[refType] operator[=] identifier[getJNDIEnvironmentRefType] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[component] operator[=] identifier[ivNameSpaceConfig] operator[SEP] identifier[getDisplayName] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[module] operator[=] identifier[ivNameSpaceConfig] operator[SEP] identifier[getModuleName] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[application] operator[=] identifier[ivNameSpaceConfig] operator[SEP] identifier[getApplicationName] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[jndiName] operator[=] identifier[getJndiName] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] , literal[String] operator[+] identifier[refType] operator[SEP] identifier[getAnnotationShortName] operator[SEP] operator[SEP] , identifier[jndiName] , identifier[refType] operator[SEP] identifier[getNameAnnotationElementName] operator[SEP] operator[SEP] , identifier[component] , identifier[module] , identifier[application] , identifier[property] operator[SEP] operator[SEP] identifier[String] identifier[exMsg] operator[=] literal[String] operator[+] identifier[refType] operator[SEP] identifier[getAnnotationShortName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[jndiName] operator[+] literal[String] operator[+] identifier[refType] operator[SEP] identifier[getNameAnnotationElementName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[component] operator[+] literal[String] operator[+] identifier[module] operator[+] literal[String] operator[+] identifier[application] operator[+] literal[String] operator[+] identifier[property] operator[SEP] Keyword[throw] Keyword[new] identifier[InjectionConfigurationException] operator[SEP] identifier[exMsg] operator[SEP] operator[SEP] }
private MethodSpec buildConstructor( JClassType mappedTypeClass ) { Optional<JsonRootName> jsonRootName = findFirstEncounteredAnnotationsOnAllHierarchy( configuration, mappedTypeClass, JsonRootName.class ); String rootName; if ( !jsonRootName.isPresent() || Strings.isNullOrEmpty( jsonRootName.get().value() ) ) { rootName = mappedTypeClass.getSimpleSourceName(); } else { rootName = jsonRootName.get().value(); } return MethodSpec.constructorBuilder() .addModifiers( Modifier.PUBLIC ) .addStatement( "super($S)", rootName ) .build(); }
class class_name[name] begin[{] method[buildConstructor, return_type[type[MethodSpec]], modifier[private], parameter[mappedTypeClass]] begin[{] local_variable[type[Optional], jsonRootName] local_variable[type[String], rootName] if[binary_operation[call[jsonRootName.isPresent, parameter[]], ||, call[Strings.isNullOrEmpty, parameter[call[jsonRootName.get, parameter[]]]]]] begin[{] assign[member[.rootName], call[mappedTypeClass.getSimpleSourceName, parameter[]]] else begin[{] assign[member[.rootName], call[jsonRootName.get, parameter[]]] end[}] return[call[MethodSpec.constructorBuilder, parameter[]]] end[}] END[}]
Keyword[private] identifier[MethodSpec] identifier[buildConstructor] operator[SEP] identifier[JClassType] identifier[mappedTypeClass] operator[SEP] { identifier[Optional] operator[<] identifier[JsonRootName] operator[>] identifier[jsonRootName] operator[=] identifier[findFirstEncounteredAnnotationsOnAllHierarchy] operator[SEP] identifier[configuration] , identifier[mappedTypeClass] , identifier[JsonRootName] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[String] identifier[rootName] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[jsonRootName] operator[SEP] identifier[isPresent] operator[SEP] operator[SEP] operator[||] identifier[Strings] operator[SEP] identifier[isNullOrEmpty] operator[SEP] identifier[jsonRootName] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[rootName] operator[=] identifier[mappedTypeClass] operator[SEP] identifier[getSimpleSourceName] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[rootName] operator[=] identifier[jsonRootName] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[MethodSpec] operator[SEP] identifier[constructorBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[addModifiers] operator[SEP] identifier[Modifier] operator[SEP] identifier[PUBLIC] operator[SEP] operator[SEP] identifier[addStatement] operator[SEP] literal[String] , identifier[rootName] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] }
public void setValue(float value) { mBarPointerPosition = Math.round((mSVToPosFactor * (1 - value)) + mBarPointerHaloRadius + (mBarLength / 2)); calculateColor(mBarPointerPosition); mBarPointerPaint.setColor(mColor); // Check whether the Saturation/Value bar is added to the ColorPicker // wheel if (mPicker != null) { mPicker.setNewCenterColor(mColor); mPicker.changeOpacityBarColor(mColor); } invalidate(); }
class class_name[name] begin[{] method[setValue, return_type[void], modifier[public], parameter[value]] begin[{] assign[member[.mBarPointerPosition], call[Math.round, parameter[binary_operation[binary_operation[binary_operation[member[.mSVToPosFactor], *, binary_operation[literal[1], -, member[.value]]], +, member[.mBarPointerHaloRadius]], +, binary_operation[member[.mBarLength], /, literal[2]]]]]] call[.calculateColor, parameter[member[.mBarPointerPosition]]] call[mBarPointerPaint.setColor, parameter[member[.mColor]]] if[binary_operation[member[.mPicker], !=, literal[null]]] begin[{] call[mPicker.setNewCenterColor, parameter[member[.mColor]]] call[mPicker.changeOpacityBarColor, parameter[member[.mColor]]] else begin[{] None end[}] call[.invalidate, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setValue] operator[SEP] Keyword[float] identifier[value] operator[SEP] { identifier[mBarPointerPosition] operator[=] identifier[Math] operator[SEP] identifier[round] operator[SEP] operator[SEP] identifier[mSVToPosFactor] operator[*] operator[SEP] Other[1] operator[-] identifier[value] operator[SEP] operator[SEP] operator[+] identifier[mBarPointerHaloRadius] operator[+] operator[SEP] identifier[mBarLength] operator[/] Other[2] operator[SEP] operator[SEP] operator[SEP] identifier[calculateColor] operator[SEP] identifier[mBarPointerPosition] operator[SEP] operator[SEP] identifier[mBarPointerPaint] operator[SEP] identifier[setColor] operator[SEP] identifier[mColor] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mPicker] operator[!=] Other[null] operator[SEP] { identifier[mPicker] operator[SEP] identifier[setNewCenterColor] operator[SEP] identifier[mColor] operator[SEP] operator[SEP] identifier[mPicker] operator[SEP] identifier[changeOpacityBarColor] operator[SEP] identifier[mColor] operator[SEP] operator[SEP] } identifier[invalidate] operator[SEP] operator[SEP] operator[SEP] }
public static Predicate<Field> isAnnotatedWith(Class<? extends Annotation>... annotations) { return field -> { for (Class<? extends Annotation> annotation : annotations) { if (field.isAnnotationPresent(annotation)) { return true; } } return false; }; }
class class_name[name] begin[{] method[isAnnotatedWith, return_type[type[Predicate]], modifier[public static], parameter[annotations]] begin[{] return[LambdaExpression(body=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=annotation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isAnnotationPresent, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=annotations, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=annotation)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=extends, type=ReferenceType(arguments=None, dimensions=[], name=Annotation, sub_type=None))], dimensions=[], name=Class, sub_type=None))), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)], parameters=[MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])] end[}] END[}]
Keyword[public] Keyword[static] identifier[Predicate] operator[<] identifier[Field] operator[>] identifier[isAnnotatedWith] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Annotation] operator[>] operator[...] identifier[annotations] operator[SEP] { Keyword[return] identifier[field] operator[->] { Keyword[for] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Annotation] operator[>] identifier[annotation] operator[:] identifier[annotations] operator[SEP] { Keyword[if] operator[SEP] identifier[field] operator[SEP] identifier[isAnnotationPresent] operator[SEP] identifier[annotation] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] } operator[SEP] }
public EClass getGFARC() { if (gfarcEClass == null) { gfarcEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(451); } return gfarcEClass; }
class class_name[name] begin[{] method[getGFARC, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.gfarcEClass], ==, literal[null]]] begin[{] assign[member[.gfarcEClass], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], member=getEPackage, postfix_operators=[], prefix_operators=[], qualifier=EPackage.Registry.INSTANCE, selectors=[MethodInvocation(arguments=[], member=getEClassifiers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=451)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=EClass, sub_type=None))] else begin[{] None end[}] return[member[.gfarcEClass]] end[}] END[}]
Keyword[public] identifier[EClass] identifier[getGFARC] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[gfarcEClass] operator[==] Other[null] operator[SEP] { identifier[gfarcEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[AfplibPackage] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[451] operator[SEP] operator[SEP] } Keyword[return] identifier[gfarcEClass] operator[SEP] }
protected List<String> parseOptionalStringValues(final String path) { final List<I_CmsXmlContentValue> values = m_xml.getValues(path, m_locale); if (values == null) { return null; } else { List<String> stringValues = new ArrayList<String>(values.size()); for (I_CmsXmlContentValue value : values) { stringValues.add(value.getStringValue(null)); } return stringValues; } }
class class_name[name] begin[{] method[parseOptionalStringValues, return_type[type[List]], modifier[protected], parameter[path]] begin[{] local_variable[type[List], values] if[binary_operation[member[.values], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] local_variable[type[List], stringValues] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=getStringValue, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=stringValues, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=I_CmsXmlContentValue, sub_type=None))), label=None) return[member[.stringValues]] end[}] end[}] END[}]
Keyword[protected] identifier[List] operator[<] identifier[String] operator[>] identifier[parseOptionalStringValues] operator[SEP] Keyword[final] identifier[String] identifier[path] operator[SEP] { Keyword[final] identifier[List] operator[<] identifier[I_CmsXmlContentValue] operator[>] identifier[values] operator[=] identifier[m_xml] operator[SEP] identifier[getValues] operator[SEP] identifier[path] , identifier[m_locale] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[values] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[else] { identifier[List] operator[<] identifier[String] operator[>] identifier[stringValues] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] identifier[values] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[I_CmsXmlContentValue] identifier[value] operator[:] identifier[values] operator[SEP] { identifier[stringValues] operator[SEP] identifier[add] operator[SEP] identifier[value] operator[SEP] identifier[getStringValue] operator[SEP] Other[null] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[stringValues] operator[SEP] } }
public String getStatement() { if(sql == null) { StringBuffer stmt = new StringBuffer(128); ClassDescriptor cld = getClassDescriptor(); FieldDescriptor[] fieldDescriptors = cld.getPkFields(); if(fieldDescriptors == null || fieldDescriptors.length == 0) { throw new OJBRuntimeException("No PK fields defined in metadata for " + cld.getClassNameOfObject()); } FieldDescriptor field = fieldDescriptors[0]; stmt.append(SELECT); stmt.append(field.getColumnName()); stmt.append(FROM); stmt.append(cld.getFullTableName()); appendWhereClause(cld, false, stmt); sql = stmt.toString(); } return sql; }
class class_name[name] begin[{] method[getStatement, return_type[type[String]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.sql], ==, literal[null]]] begin[{] local_variable[type[StringBuffer], stmt] local_variable[type[ClassDescriptor], cld] local_variable[type[FieldDescriptor], fieldDescriptors] if[binary_operation[binary_operation[member[.fieldDescriptors], ==, literal[null]], ||, binary_operation[member[fieldDescriptors.length], ==, literal[0]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No PK fields defined in metadata for "), operandr=MethodInvocation(arguments=[], member=getClassNameOfObject, postfix_operators=[], prefix_operators=[], qualifier=cld, 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=OJBRuntimeException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[FieldDescriptor], field] call[stmt.append, parameter[member[.SELECT]]] call[stmt.append, parameter[call[field.getColumnName, parameter[]]]] call[stmt.append, parameter[member[.FROM]]] call[stmt.append, parameter[call[cld.getFullTableName, parameter[]]]] call[.appendWhereClause, parameter[member[.cld], literal[false], member[.stmt]]] assign[member[.sql], call[stmt.toString, parameter[]]] else begin[{] None end[}] return[member[.sql]] end[}] END[}]
Keyword[public] identifier[String] identifier[getStatement] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[sql] operator[==] Other[null] operator[SEP] { identifier[StringBuffer] identifier[stmt] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] Other[128] operator[SEP] operator[SEP] identifier[ClassDescriptor] identifier[cld] operator[=] identifier[getClassDescriptor] operator[SEP] operator[SEP] operator[SEP] identifier[FieldDescriptor] operator[SEP] operator[SEP] identifier[fieldDescriptors] operator[=] identifier[cld] operator[SEP] identifier[getPkFields] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[fieldDescriptors] operator[==] Other[null] operator[||] identifier[fieldDescriptors] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[OJBRuntimeException] operator[SEP] literal[String] operator[+] identifier[cld] operator[SEP] identifier[getClassNameOfObject] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[FieldDescriptor] identifier[field] operator[=] identifier[fieldDescriptors] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[stmt] operator[SEP] identifier[append] operator[SEP] identifier[SELECT] operator[SEP] operator[SEP] identifier[stmt] operator[SEP] identifier[append] operator[SEP] identifier[field] operator[SEP] identifier[getColumnName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[stmt] operator[SEP] identifier[append] operator[SEP] identifier[FROM] operator[SEP] operator[SEP] identifier[stmt] operator[SEP] identifier[append] operator[SEP] identifier[cld] operator[SEP] identifier[getFullTableName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[appendWhereClause] operator[SEP] identifier[cld] , literal[boolean] , identifier[stmt] operator[SEP] operator[SEP] identifier[sql] operator[=] identifier[stmt] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[sql] operator[SEP] }
public String getPropertyAsString( Object target, Property property ) throws SecurityException, IllegalArgumentException, NoSuchMethodException, IllegalAccessException, InvocationTargetException { Object value = getProperty(target, property); StringBuilder sb = new StringBuilder(); writeObjectAsString(value, sb, false); return sb.toString(); }
class class_name[name] begin[{] method[getPropertyAsString, return_type[type[String]], modifier[public], parameter[target, property]] begin[{] local_variable[type[Object], value] local_variable[type[StringBuilder], sb] call[.writeObjectAsString, parameter[member[.value], member[.sb], literal[false]]] return[call[sb.toString, parameter[]]] end[}] END[}]
Keyword[public] identifier[String] identifier[getPropertyAsString] operator[SEP] identifier[Object] identifier[target] , identifier[Property] identifier[property] operator[SEP] Keyword[throws] identifier[SecurityException] , identifier[IllegalArgumentException] , identifier[NoSuchMethodException] , identifier[IllegalAccessException] , identifier[InvocationTargetException] { identifier[Object] identifier[value] operator[=] identifier[getProperty] operator[SEP] identifier[target] , identifier[property] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[writeObjectAsString] operator[SEP] identifier[value] , identifier[sb] , literal[boolean] operator[SEP] operator[SEP] Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
@Override public void compile(JQElement element, JSON attrs) { String text = SafeHtmlUtils.htmlEscape(element.text()); element.empty().append(prettifier.prettify(text)); }
class class_name[name] begin[{] method[compile, return_type[void], modifier[public], parameter[element, attrs]] begin[{] local_variable[type[String], text] call[element.empty, parameter[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[compile] operator[SEP] identifier[JQElement] identifier[element] , identifier[JSON] identifier[attrs] operator[SEP] { identifier[String] identifier[text] operator[=] identifier[SafeHtmlUtils] operator[SEP] identifier[htmlEscape] operator[SEP] identifier[element] operator[SEP] identifier[text] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[element] operator[SEP] identifier[empty] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[prettifier] operator[SEP] identifier[prettify] operator[SEP] identifier[text] operator[SEP] operator[SEP] operator[SEP] }
public TolerantFloatComparison isNotWithin(final float tolerance) { return new TolerantFloatComparison() { @Override public void of(float expected) { Float actual = actual(); checkNotNull( actual, "actual value cannot be null. tolerance=%s expected=%s", tolerance, expected); checkTolerance(tolerance); if (!notEqualWithinTolerance(actual, expected, tolerance)) { failWithoutActual( fact("expected not to be", floatToString(expected)), butWas(), fact("within tolerance", floatToString(tolerance))); } } }; }
class class_name[name] begin[{] method[isNotWithin, return_type[type[TolerantFloatComparison]], modifier[public], parameter[tolerance]] begin[{] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=actual, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=actual)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Float, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=actual, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="actual value cannot be null. tolerance=%s expected=%s"), MemberReference(member=tolerance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=expected, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkNotNull, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tolerance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkTolerance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=actual, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=expected, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tolerance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=notEqualWithinTolerance, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="expected not to be"), MethodInvocation(arguments=[MemberReference(member=expected, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=floatToString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=fact, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=butWas, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="within tolerance"), MethodInvocation(arguments=[MemberReference(member=tolerance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=floatToString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=fact, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=failWithoutActual, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], documentation=None, modifiers={'public'}, name=of, parameters=[FormalParameter(annotations=[], modifiers=set(), name=expected, type=BasicType(dimensions=[], name=float), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TolerantFloatComparison, sub_type=None))] end[}] END[}]
Keyword[public] identifier[TolerantFloatComparison] identifier[isNotWithin] operator[SEP] Keyword[final] Keyword[float] identifier[tolerance] operator[SEP] { Keyword[return] Keyword[new] identifier[TolerantFloatComparison] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[of] operator[SEP] Keyword[float] identifier[expected] operator[SEP] { identifier[Float] identifier[actual] operator[=] identifier[actual] operator[SEP] operator[SEP] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[actual] , literal[String] , identifier[tolerance] , identifier[expected] operator[SEP] operator[SEP] identifier[checkTolerance] operator[SEP] identifier[tolerance] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[notEqualWithinTolerance] operator[SEP] identifier[actual] , identifier[expected] , identifier[tolerance] operator[SEP] operator[SEP] { identifier[failWithoutActual] operator[SEP] identifier[fact] operator[SEP] literal[String] , identifier[floatToString] operator[SEP] identifier[expected] operator[SEP] operator[SEP] , identifier[butWas] operator[SEP] operator[SEP] , identifier[fact] operator[SEP] literal[String] , identifier[floatToString] operator[SEP] identifier[tolerance] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } operator[SEP] }
public WelcomeFileListType<T> welcomeFile(String ... values) { if (values != null) { for(String name: values) { childNode.createChild("welcome-file").text(name); } } return this; }
class class_name[name] begin[{] method[welcomeFile, return_type[type[WelcomeFileListType]], modifier[public], parameter[values]] begin[{] if[binary_operation[member[.values], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="welcome-file")], member=createChild, postfix_operators=[], prefix_operators=[], qualifier=childNode, selectors=[MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=text, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=name)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) else begin[{] None end[}] return[THIS[]] end[}] END[}]
Keyword[public] identifier[WelcomeFileListType] operator[<] identifier[T] operator[>] identifier[welcomeFile] operator[SEP] identifier[String] operator[...] identifier[values] operator[SEP] { Keyword[if] operator[SEP] identifier[values] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[String] identifier[name] operator[:] identifier[values] operator[SEP] { identifier[childNode] operator[SEP] identifier[createChild] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[text] operator[SEP] identifier[name] operator[SEP] operator[SEP] } } Keyword[return] Keyword[this] operator[SEP] }
protected void checkMappings(int arrayPosition) { final int index = positions.indexOfValue(arrayPosition); if (index >= 0) { positions.removeAt(index); } }
class class_name[name] begin[{] method[checkMappings, return_type[void], modifier[protected], parameter[arrayPosition]] begin[{] local_variable[type[int], index] if[binary_operation[member[.index], >=, literal[0]]] begin[{] call[positions.removeAt, parameter[member[.index]]] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[checkMappings] operator[SEP] Keyword[int] identifier[arrayPosition] operator[SEP] { Keyword[final] Keyword[int] identifier[index] operator[=] identifier[positions] operator[SEP] identifier[indexOfValue] operator[SEP] identifier[arrayPosition] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[index] operator[>=] Other[0] operator[SEP] { identifier[positions] operator[SEP] identifier[removeAt] operator[SEP] identifier[index] operator[SEP] operator[SEP] } }
public void close() throws CGateException { if (!connected) return; synchronized (ping_connections) { try { sendCommand("quit").toArray(); } catch (Exception e) {} try { command_connection.stop(); event_connection.stop(); status_change_connection.stop(); } catch (Exception e) { throw new CGateException(e); } finally { clearCache(); connected = false; ping_connections.notify(); } } }
class class_name[name] begin[{] method[close, return_type[void], modifier[public], parameter[]] begin[{] if[member[.connected]] begin[{] return[None] else begin[{] None end[}] SYNCHRONIZED[member[.ping_connections]] BEGIN[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="quit")], member=sendCommand, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=toArray, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=stop, postfix_operators=[], prefix_operators=[], qualifier=command_connection, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=stop, postfix_operators=[], prefix_operators=[], qualifier=event_connection, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=stop, postfix_operators=[], prefix_operators=[], qualifier=status_change_connection, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CGateException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=clearCache, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=connected, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=notify, postfix_operators=[], prefix_operators=[], qualifier=ping_connections, selectors=[], type_arguments=None), label=None)], label=None, resources=None) END[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] Keyword[throws] identifier[CGateException] { Keyword[if] operator[SEP] operator[!] identifier[connected] operator[SEP] Keyword[return] operator[SEP] Keyword[synchronized] operator[SEP] identifier[ping_connections] operator[SEP] { Keyword[try] { identifier[sendCommand] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[toArray] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { } Keyword[try] { identifier[command_connection] operator[SEP] identifier[stop] operator[SEP] operator[SEP] operator[SEP] identifier[event_connection] operator[SEP] identifier[stop] operator[SEP] operator[SEP] operator[SEP] identifier[status_change_connection] operator[SEP] identifier[stop] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[CGateException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[finally] { identifier[clearCache] operator[SEP] operator[SEP] operator[SEP] identifier[connected] operator[=] literal[boolean] operator[SEP] identifier[ping_connections] operator[SEP] identifier[notify] operator[SEP] operator[SEP] operator[SEP] } } }
@SuppressWarnings("unchecked") @Override public EList<RevisionSummaryType> getTypes() { return (EList<RevisionSummaryType>) eGet(StorePackage.Literals.REVISION_SUMMARY_CONTAINER__TYPES, true); }
class class_name[name] begin[{] method[getTypes, return_type[type[EList]], modifier[public], parameter[]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=REVISION_SUMMARY_CONTAINER__TYPES, postfix_operators=[], prefix_operators=[], qualifier=StorePackage.Literals, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=eGet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=RevisionSummaryType, sub_type=None))], dimensions=[], name=EList, sub_type=None))] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[EList] operator[<] identifier[RevisionSummaryType] operator[>] identifier[getTypes] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] identifier[EList] operator[<] identifier[RevisionSummaryType] operator[>] operator[SEP] identifier[eGet] operator[SEP] identifier[StorePackage] operator[SEP] identifier[Literals] operator[SEP] identifier[REVISION_SUMMARY_CONTAINER__TYPES] , literal[boolean] operator[SEP] operator[SEP] }
public static <E> Bag<E> of(E... values) { return new ImmutableBag<E>(new ArrayBag<E>(values)); }
class class_name[name] begin[{] method[of, return_type[type[Bag]], modifier[public static], parameter[values]] begin[{] return[ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=E, sub_type=None))], dimensions=None, name=ArrayBag, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=E, sub_type=None))], dimensions=None, name=ImmutableBag, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[E] operator[>] identifier[Bag] operator[<] identifier[E] operator[>] identifier[of] operator[SEP] identifier[E] operator[...] identifier[values] operator[SEP] { Keyword[return] Keyword[new] identifier[ImmutableBag] operator[<] identifier[E] operator[>] operator[SEP] Keyword[new] identifier[ArrayBag] operator[<] identifier[E] operator[>] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] }
public com.google.api.ads.admanager.axis.v201902.RateType getRateType() { return rateType; }
class class_name[name] begin[{] method[getRateType, return_type[type[com]], modifier[public], parameter[]] begin[{] return[member[.rateType]] end[}] END[}]
Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201902] operator[SEP] identifier[RateType] identifier[getRateType] operator[SEP] operator[SEP] { Keyword[return] identifier[rateType] operator[SEP] }
public void setInto(ReadWritableInterval writableInterval, Object object, Chronology chrono) { String str = (String) object; int separator = str.indexOf('/'); if (separator < 0) { throw new IllegalArgumentException("Format requires a '/' separator: " + str); } String leftStr = str.substring(0, separator); if (leftStr.length() <= 0) { throw new IllegalArgumentException("Format invalid: " + str); } String rightStr = str.substring(separator + 1); if (rightStr.length() <= 0) { throw new IllegalArgumentException("Format invalid: " + str); } DateTimeFormatter dateTimeParser = ISODateTimeFormat.dateTimeParser(); dateTimeParser = dateTimeParser.withChronology(chrono); PeriodFormatter periodParser = ISOPeriodFormat.standard(); long startInstant = 0, endInstant = 0; Period period = null; Chronology parsedChrono = null; // before slash char c = leftStr.charAt(0); if (c == 'P' || c == 'p') { period = periodParser.withParseType(getPeriodType(leftStr)).parsePeriod(leftStr); } else { DateTime start = dateTimeParser.parseDateTime(leftStr); startInstant = start.getMillis(); parsedChrono = start.getChronology(); } // after slash c = rightStr.charAt(0); if (c == 'P' || c == 'p') { if (period != null) { throw new IllegalArgumentException("Interval composed of two durations: " + str); } period = periodParser.withParseType(getPeriodType(rightStr)).parsePeriod(rightStr); chrono = (chrono != null ? chrono : parsedChrono); endInstant = chrono.add(period, startInstant, 1); } else { DateTime end = dateTimeParser.parseDateTime(rightStr); endInstant = end.getMillis(); parsedChrono = (parsedChrono != null ? parsedChrono : end.getChronology()); chrono = (chrono != null ? chrono : parsedChrono); if (period != null) { startInstant = chrono.add(period, endInstant, -1); } } writableInterval.setInterval(startInstant, endInstant); writableInterval.setChronology(chrono); }
class class_name[name] begin[{] method[setInto, return_type[void], modifier[public], parameter[writableInterval, object, chrono]] begin[{] local_variable[type[String], str] local_variable[type[int], separator] if[binary_operation[member[.separator], <, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Format requires a '/' separator: "), operandr=MemberReference(member=str, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[String], leftStr] if[binary_operation[call[leftStr.length, parameter[]], <=, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Format invalid: "), operandr=MemberReference(member=str, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[String], rightStr] if[binary_operation[call[rightStr.length, parameter[]], <=, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Format invalid: "), operandr=MemberReference(member=str, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[DateTimeFormatter], dateTimeParser] assign[member[.dateTimeParser], call[dateTimeParser.withChronology, parameter[member[.chrono]]]] local_variable[type[PeriodFormatter], periodParser] local_variable[type[long], startInstant] local_variable[type[Period], period] local_variable[type[Chronology], parsedChrono] local_variable[type[char], c] if[binary_operation[binary_operation[member[.c], ==, literal['P']], ||, binary_operation[member[.c], ==, literal['p']]]] begin[{] assign[member[.period], call[periodParser.withParseType, parameter[call[.getPeriodType, parameter[member[.leftStr]]]]]] else begin[{] local_variable[type[DateTime], start] assign[member[.startInstant], call[start.getMillis, parameter[]]] assign[member[.parsedChrono], call[start.getChronology, parameter[]]] end[}] assign[member[.c], call[rightStr.charAt, parameter[literal[0]]]] if[binary_operation[binary_operation[member[.c], ==, literal['P']], ||, binary_operation[member[.c], ==, literal['p']]]] begin[{] if[binary_operation[member[.period], !=, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Interval composed of two durations: "), operandr=MemberReference(member=str, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] assign[member[.period], call[periodParser.withParseType, parameter[call[.getPeriodType, parameter[member[.rightStr]]]]]] assign[member[.chrono], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=chrono, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MemberReference(member=parsedChrono, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=chrono, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] assign[member[.endInstant], call[chrono.add, parameter[member[.period], member[.startInstant], literal[1]]]] else begin[{] local_variable[type[DateTime], end] assign[member[.endInstant], call[end.getMillis, parameter[]]] assign[member[.parsedChrono], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=parsedChrono, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MethodInvocation(arguments=[], member=getChronology, postfix_operators=[], prefix_operators=[], qualifier=end, selectors=[], type_arguments=None), if_true=MemberReference(member=parsedChrono, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] assign[member[.chrono], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=chrono, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MemberReference(member=parsedChrono, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=chrono, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] if[binary_operation[member[.period], !=, literal[null]]] begin[{] assign[member[.startInstant], call[chrono.add, parameter[member[.period], member[.endInstant], literal[1]]]] else begin[{] None end[}] end[}] call[writableInterval.setInterval, parameter[member[.startInstant], member[.endInstant]]] call[writableInterval.setChronology, parameter[member[.chrono]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setInto] operator[SEP] identifier[ReadWritableInterval] identifier[writableInterval] , identifier[Object] identifier[object] , identifier[Chronology] identifier[chrono] operator[SEP] { identifier[String] identifier[str] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[object] operator[SEP] Keyword[int] identifier[separator] operator[=] identifier[str] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[separator] operator[<] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[str] operator[SEP] operator[SEP] } identifier[String] identifier[leftStr] operator[=] identifier[str] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[separator] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[leftStr] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[<=] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[str] operator[SEP] operator[SEP] } identifier[String] identifier[rightStr] operator[=] identifier[str] operator[SEP] identifier[substring] operator[SEP] identifier[separator] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[rightStr] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[<=] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[str] operator[SEP] operator[SEP] } identifier[DateTimeFormatter] identifier[dateTimeParser] operator[=] identifier[ISODateTimeFormat] operator[SEP] identifier[dateTimeParser] operator[SEP] operator[SEP] operator[SEP] identifier[dateTimeParser] operator[=] identifier[dateTimeParser] operator[SEP] identifier[withChronology] operator[SEP] identifier[chrono] operator[SEP] operator[SEP] identifier[PeriodFormatter] identifier[periodParser] operator[=] identifier[ISOPeriodFormat] operator[SEP] identifier[standard] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[startInstant] operator[=] Other[0] , identifier[endInstant] operator[=] Other[0] operator[SEP] identifier[Period] identifier[period] operator[=] Other[null] operator[SEP] identifier[Chronology] identifier[parsedChrono] operator[=] Other[null] operator[SEP] Keyword[char] identifier[c] operator[=] identifier[leftStr] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[||] identifier[c] operator[==] literal[String] operator[SEP] { identifier[period] operator[=] identifier[periodParser] operator[SEP] identifier[withParseType] operator[SEP] identifier[getPeriodType] operator[SEP] identifier[leftStr] operator[SEP] operator[SEP] operator[SEP] identifier[parsePeriod] operator[SEP] identifier[leftStr] operator[SEP] operator[SEP] } Keyword[else] { identifier[DateTime] identifier[start] operator[=] identifier[dateTimeParser] operator[SEP] identifier[parseDateTime] operator[SEP] identifier[leftStr] operator[SEP] operator[SEP] identifier[startInstant] operator[=] identifier[start] operator[SEP] identifier[getMillis] operator[SEP] operator[SEP] operator[SEP] identifier[parsedChrono] operator[=] identifier[start] operator[SEP] identifier[getChronology] operator[SEP] operator[SEP] operator[SEP] } identifier[c] operator[=] identifier[rightStr] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[||] identifier[c] operator[==] literal[String] operator[SEP] { Keyword[if] operator[SEP] identifier[period] operator[!=] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[str] operator[SEP] operator[SEP] } identifier[period] operator[=] identifier[periodParser] operator[SEP] identifier[withParseType] operator[SEP] identifier[getPeriodType] operator[SEP] identifier[rightStr] operator[SEP] operator[SEP] operator[SEP] identifier[parsePeriod] operator[SEP] identifier[rightStr] operator[SEP] operator[SEP] identifier[chrono] operator[=] operator[SEP] identifier[chrono] operator[!=] Other[null] operator[?] identifier[chrono] operator[:] identifier[parsedChrono] operator[SEP] operator[SEP] identifier[endInstant] operator[=] identifier[chrono] operator[SEP] identifier[add] operator[SEP] identifier[period] , identifier[startInstant] , Other[1] operator[SEP] operator[SEP] } Keyword[else] { identifier[DateTime] identifier[end] operator[=] identifier[dateTimeParser] operator[SEP] identifier[parseDateTime] operator[SEP] identifier[rightStr] operator[SEP] operator[SEP] identifier[endInstant] operator[=] identifier[end] operator[SEP] identifier[getMillis] operator[SEP] operator[SEP] operator[SEP] identifier[parsedChrono] operator[=] operator[SEP] identifier[parsedChrono] operator[!=] Other[null] operator[?] identifier[parsedChrono] operator[:] identifier[end] operator[SEP] identifier[getChronology] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[chrono] operator[=] operator[SEP] identifier[chrono] operator[!=] Other[null] operator[?] identifier[chrono] operator[:] identifier[parsedChrono] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[period] operator[!=] Other[null] operator[SEP] { identifier[startInstant] operator[=] identifier[chrono] operator[SEP] identifier[add] operator[SEP] identifier[period] , identifier[endInstant] , operator[-] Other[1] operator[SEP] operator[SEP] } } identifier[writableInterval] operator[SEP] identifier[setInterval] operator[SEP] identifier[startInstant] , identifier[endInstant] operator[SEP] operator[SEP] identifier[writableInterval] operator[SEP] identifier[setChronology] operator[SEP] identifier[chrono] operator[SEP] operator[SEP] }
public T get(final Class<?> key, final Supplier<T> valueSupplier) { return map.computeIfAbsent(key, aClass -> valueSupplier.get()); }
class class_name[name] begin[{] method[get, return_type[type[T]], modifier[public], parameter[key, valueSupplier]] begin[{] return[call[map.computeIfAbsent, parameter[member[.key], LambdaExpression(body=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=valueSupplier, selectors=[], type_arguments=None), parameters=[MemberReference(member=aClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]]] end[}] END[}]
Keyword[public] identifier[T] identifier[get] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[key] , Keyword[final] identifier[Supplier] operator[<] identifier[T] operator[>] identifier[valueSupplier] operator[SEP] { Keyword[return] identifier[map] operator[SEP] identifier[computeIfAbsent] operator[SEP] identifier[key] , identifier[aClass] operator[->] identifier[valueSupplier] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static long count_filtered(nitro_service service, lbmonbindings obj, String filter) throws Exception{ options option = new options(); option.set_count(true); option.set_filter(filter); option.set_args(nitro_util.object_to_string_withoutquotes(obj)); lbmonbindings[] response = (lbmonbindings[]) obj.getfiltered(service, option); if (response != null) { return response[0].__count; } return 0; }
class class_name[name] begin[{] method[count_filtered, return_type[type[long]], modifier[public static], parameter[service, obj, filter]] begin[{] local_variable[type[options], option] call[option.set_count, parameter[literal[true]]] call[option.set_filter, parameter[member[.filter]]] call[option.set_args, parameter[call[nitro_util.object_to_string_withoutquotes, parameter[member[.obj]]]]] local_variable[type[lbmonbindings], response] if[binary_operation[member[.response], !=, literal[null]]] begin[{] return[member[.response]] else begin[{] None end[}] return[literal[0]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[long] identifier[count_filtered] operator[SEP] identifier[nitro_service] identifier[service] , identifier[lbmonbindings] identifier[obj] , identifier[String] identifier[filter] operator[SEP] Keyword[throws] identifier[Exception] { identifier[options] identifier[option] operator[=] Keyword[new] identifier[options] operator[SEP] operator[SEP] operator[SEP] identifier[option] operator[SEP] identifier[set_count] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[option] operator[SEP] identifier[set_filter] operator[SEP] identifier[filter] operator[SEP] operator[SEP] identifier[option] operator[SEP] identifier[set_args] operator[SEP] identifier[nitro_util] operator[SEP] identifier[object_to_string_withoutquotes] operator[SEP] identifier[obj] operator[SEP] operator[SEP] operator[SEP] identifier[lbmonbindings] operator[SEP] operator[SEP] identifier[response] operator[=] operator[SEP] identifier[lbmonbindings] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[getfiltered] operator[SEP] identifier[service] , identifier[option] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[response] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[response] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[__count] operator[SEP] } Keyword[return] Other[0] operator[SEP] }
public int subtreeDepth() throws UnsupportedOperationException { String subtree=name; int i=1; /* count dots */ for (; subtree.lastIndexOf('.') >= 0; i++) { subtree=subtree.substring(0,subtree.lastIndexOf('.')); } return i; }
class class_name[name] begin[{] method[subtreeDepth, return_type[type[int]], modifier[public], parameter[]] begin[{] local_variable[type[String], subtree] local_variable[type[int], i] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=subtree, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='.')], member=lastIndexOf, postfix_operators=[], prefix_operators=[], qualifier=subtree, selectors=[], type_arguments=None)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=subtree, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='.')], member=lastIndexOf, postfix_operators=[], prefix_operators=[], qualifier=subtree, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), init=None, update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.i]] end[}] END[}]
Keyword[public] Keyword[int] identifier[subtreeDepth] operator[SEP] operator[SEP] Keyword[throws] identifier[UnsupportedOperationException] { identifier[String] identifier[subtree] operator[=] identifier[name] operator[SEP] Keyword[int] identifier[i] operator[=] Other[1] operator[SEP] Keyword[for] operator[SEP] operator[SEP] identifier[subtree] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[>=] Other[0] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[subtree] operator[=] identifier[subtree] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[subtree] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[i] operator[SEP] }
public static void main(String[] args) throws Exception { Logger logger = Logger.getLogger("MASReader.main"); Properties beastConfigProperties = new Properties(); String beastConfigPropertiesFile = null; if (args.length > 0) { beastConfigPropertiesFile = args[0]; beastConfigProperties.load(new FileInputStream( beastConfigPropertiesFile)); logger.info("Properties file selected -> " + beastConfigPropertiesFile); } else { logger.severe("No properties file found. Set the path of properties file as argument."); throw new BeastException( "No properties file found. Set the path of properties file as argument."); } String loggerConfigPropertiesFile; if (args.length > 1) { Properties loggerConfigProperties = new Properties(); loggerConfigPropertiesFile = args[1]; try { FileInputStream loggerConfigFile = new FileInputStream( loggerConfigPropertiesFile); loggerConfigProperties.load(loggerConfigFile); LogManager.getLogManager().readConfiguration(loggerConfigFile); logger.info("Logging properties configured successfully. Logger config file: " + loggerConfigPropertiesFile); } catch (IOException ex) { logger.warning("WARNING: Could not open configuration file"); logger.warning("WARNING: Logging not configured (console output only)"); } } else { loggerConfigPropertiesFile = null; } MASReader.generateJavaFiles( beastConfigProperties.getProperty("requirementsFolder"), "\"" + beastConfigProperties.getProperty("MASPlatform") + "\"", beastConfigProperties.getProperty("srcTestRootFolder"), beastConfigProperties.getProperty("storiesPackage"), beastConfigProperties.getProperty("caseManagerPackage"), loggerConfigPropertiesFile, beastConfigProperties.getProperty("specificationPhase")); }
class class_name[name] begin[{] method[main, return_type[void], modifier[public static], parameter[args]] begin[{] local_variable[type[Logger], logger] local_variable[type[Properties], beastConfigProperties] local_variable[type[String], beastConfigPropertiesFile] if[binary_operation[member[args.length], >, literal[0]]] begin[{] assign[member[.beastConfigPropertiesFile], member[.args]] call[beastConfigProperties.load, parameter[ClassCreator(arguments=[MemberReference(member=beastConfigPropertiesFile, 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=FileInputStream, sub_type=None))]] call[logger.info, parameter[binary_operation[literal["Properties file selected -> "], +, member[.beastConfigPropertiesFile]]]] else begin[{] call[logger.severe, parameter[literal["No properties file found. Set the path of properties file as argument."]]] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No properties file found. Set the path of properties file as argument.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BeastException, sub_type=None)), label=None) end[}] local_variable[type[String], loggerConfigPropertiesFile] if[binary_operation[member[args.length], >, literal[1]]] begin[{] local_variable[type[Properties], loggerConfigProperties] assign[member[.loggerConfigPropertiesFile], member[.args]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=loggerConfigPropertiesFile, 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=FileInputStream, sub_type=None)), name=loggerConfigFile)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FileInputStream, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=loggerConfigFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=load, postfix_operators=[], prefix_operators=[], qualifier=loggerConfigProperties, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getLogManager, postfix_operators=[], prefix_operators=[], qualifier=LogManager, selectors=[MethodInvocation(arguments=[MemberReference(member=loggerConfigFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readConfiguration, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Logging properties configured successfully. Logger config file: "), operandr=MemberReference(member=loggerConfigPropertiesFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=info, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WARNING: Could not open configuration file")], member=warning, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WARNING: Logging not configured (console output only)")], member=warning, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['IOException']))], finally_block=None, label=None, resources=None) else begin[{] assign[member[.loggerConfigPropertiesFile], literal[null]] end[}] call[MASReader.generateJavaFiles, parameter[call[beastConfigProperties.getProperty, parameter[literal["requirementsFolder"]]], binary_operation[binary_operation[literal["\""], +, call[beastConfigProperties.getProperty, parameter[literal["MASPlatform"]]]], +, literal["\""]], call[beastConfigProperties.getProperty, parameter[literal["srcTestRootFolder"]]], call[beastConfigProperties.getProperty, parameter[literal["storiesPackage"]]], call[beastConfigProperties.getProperty, parameter[literal["caseManagerPackage"]]], member[.loggerConfigPropertiesFile], call[beastConfigProperties.getProperty, parameter[literal["specificationPhase"]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[Exception] { identifier[Logger] identifier[logger] operator[=] identifier[Logger] operator[SEP] identifier[getLogger] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Properties] identifier[beastConfigProperties] operator[=] Keyword[new] identifier[Properties] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[beastConfigPropertiesFile] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[args] operator[SEP] identifier[length] operator[>] Other[0] operator[SEP] { identifier[beastConfigPropertiesFile] operator[=] identifier[args] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[beastConfigProperties] operator[SEP] identifier[load] operator[SEP] Keyword[new] identifier[FileInputStream] operator[SEP] identifier[beastConfigPropertiesFile] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[beastConfigPropertiesFile] operator[SEP] operator[SEP] } Keyword[else] { identifier[logger] operator[SEP] identifier[severe] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[BeastException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[String] identifier[loggerConfigPropertiesFile] operator[SEP] Keyword[if] operator[SEP] identifier[args] operator[SEP] identifier[length] operator[>] Other[1] operator[SEP] { identifier[Properties] identifier[loggerConfigProperties] operator[=] Keyword[new] identifier[Properties] operator[SEP] operator[SEP] operator[SEP] identifier[loggerConfigPropertiesFile] operator[=] identifier[args] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[try] { identifier[FileInputStream] identifier[loggerConfigFile] operator[=] Keyword[new] identifier[FileInputStream] operator[SEP] identifier[loggerConfigPropertiesFile] operator[SEP] operator[SEP] identifier[loggerConfigProperties] operator[SEP] identifier[load] operator[SEP] identifier[loggerConfigFile] operator[SEP] operator[SEP] identifier[LogManager] operator[SEP] identifier[getLogManager] operator[SEP] operator[SEP] operator[SEP] identifier[readConfiguration] operator[SEP] identifier[loggerConfigFile] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[loggerConfigPropertiesFile] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[ex] operator[SEP] { identifier[logger] operator[SEP] identifier[warning] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[warning] operator[SEP] literal[String] operator[SEP] operator[SEP] } } Keyword[else] { identifier[loggerConfigPropertiesFile] operator[=] Other[null] operator[SEP] } identifier[MASReader] operator[SEP] identifier[generateJavaFiles] operator[SEP] identifier[beastConfigProperties] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] , literal[String] operator[+] identifier[beastConfigProperties] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[+] literal[String] , identifier[beastConfigProperties] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] , identifier[beastConfigProperties] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] , identifier[beastConfigProperties] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] , identifier[loggerConfigPropertiesFile] , identifier[beastConfigProperties] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] }
public String[] names(){ List<String> namesList = new ArrayList<>(); Enumeration names = RequestContext.getHttpRequest().getSession(true).getAttributeNames(); while (names.hasMoreElements()) { Object o = names.nextElement(); namesList.add(o.toString()); } return namesList.toArray(new String[namesList.size()]); }
class class_name[name] begin[{] method[names, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[List], namesList] local_variable[type[Enumeration], names] while[call[names.hasMoreElements, parameter[]]] begin[{] local_variable[type[Object], o] call[namesList.add, parameter[call[o.toString, parameter[]]]] end[}] return[call[namesList.toArray, parameter[ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=namesList, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[String] operator[SEP] operator[SEP] identifier[names] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[namesList] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Enumeration] identifier[names] operator[=] identifier[RequestContext] operator[SEP] identifier[getHttpRequest] operator[SEP] operator[SEP] operator[SEP] identifier[getSession] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[getAttributeNames] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[names] operator[SEP] identifier[hasMoreElements] operator[SEP] operator[SEP] operator[SEP] { identifier[Object] identifier[o] operator[=] identifier[names] operator[SEP] identifier[nextElement] operator[SEP] operator[SEP] operator[SEP] identifier[namesList] operator[SEP] identifier[add] operator[SEP] identifier[o] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[namesList] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[String] operator[SEP] identifier[namesList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public Package definePackage(String name, Manifest manifest, URL sealBase) throws IllegalArgumentException { Attributes mA = manifest.getMainAttributes(); String specTitle = mA.getValue(Name.SPECIFICATION_TITLE); String specVersion = mA.getValue(Name.SPECIFICATION_VERSION); String specVendor = mA.getValue(Name.SPECIFICATION_VENDOR); String implTitle = mA.getValue(Name.IMPLEMENTATION_TITLE); String implVersion = mA.getValue(Name.IMPLEMENTATION_VERSION); String implVendor = mA.getValue(Name.IMPLEMENTATION_VENDOR); String sealedString = mA.getValue(Name.SEALED); Boolean sealed = (sealedString == null ? Boolean.FALSE : sealedString.equalsIgnoreCase("true")); //now overwrite global attributes with the specific attributes String unixName = name.replaceAll("\\.", "/") + "/"; //replace all dots with slash and add trailing slash mA = manifest.getAttributes(unixName); if (mA != null) { String s = mA.getValue(Name.SPECIFICATION_TITLE); if (s != null) specTitle = s; s = mA.getValue(Name.SPECIFICATION_VERSION); if (s != null) specVersion = s; s = mA.getValue(Name.SPECIFICATION_VENDOR); if (s != null) specVendor = s; s = mA.getValue(Name.IMPLEMENTATION_TITLE); if (s != null) implTitle = s; s = mA.getValue(Name.IMPLEMENTATION_VERSION); if (s != null) implVersion = s; s = mA.getValue(Name.IMPLEMENTATION_VENDOR); if (s != null) implVendor = s; s = mA.getValue(Name.SEALED); if (s != null) sealed = s.equalsIgnoreCase("true"); } if (!sealed) sealBase = null; return definePackage(name, specTitle, specVersion, specVendor, implTitle, implVersion, implVendor, sealBase); }
class class_name[name] begin[{] method[definePackage, return_type[type[Package]], modifier[public], parameter[name, manifest, sealBase]] begin[{] local_variable[type[Attributes], mA] local_variable[type[String], specTitle] local_variable[type[String], specVersion] local_variable[type[String], specVendor] local_variable[type[String], implTitle] local_variable[type[String], implVersion] local_variable[type[String], implVendor] local_variable[type[String], sealedString] local_variable[type[Boolean], sealed] local_variable[type[String], unixName] assign[member[.mA], call[manifest.getAttributes, parameter[member[.unixName]]]] if[binary_operation[member[.mA], !=, literal[null]]] begin[{] local_variable[type[String], s] if[binary_operation[member[.s], !=, literal[null]]] begin[{] assign[member[.specTitle], member[.s]] else begin[{] None end[}] assign[member[.s], call[mA.getValue, parameter[member[Name.SPECIFICATION_VERSION]]]] if[binary_operation[member[.s], !=, literal[null]]] begin[{] assign[member[.specVersion], member[.s]] else begin[{] None end[}] assign[member[.s], call[mA.getValue, parameter[member[Name.SPECIFICATION_VENDOR]]]] if[binary_operation[member[.s], !=, literal[null]]] begin[{] assign[member[.specVendor], member[.s]] else begin[{] None end[}] assign[member[.s], call[mA.getValue, parameter[member[Name.IMPLEMENTATION_TITLE]]]] if[binary_operation[member[.s], !=, literal[null]]] begin[{] assign[member[.implTitle], member[.s]] else begin[{] None end[}] assign[member[.s], call[mA.getValue, parameter[member[Name.IMPLEMENTATION_VERSION]]]] if[binary_operation[member[.s], !=, literal[null]]] begin[{] assign[member[.implVersion], member[.s]] else begin[{] None end[}] assign[member[.s], call[mA.getValue, parameter[member[Name.IMPLEMENTATION_VENDOR]]]] if[binary_operation[member[.s], !=, literal[null]]] begin[{] assign[member[.implVendor], member[.s]] else begin[{] None end[}] assign[member[.s], call[mA.getValue, parameter[member[Name.SEALED]]]] if[binary_operation[member[.s], !=, literal[null]]] begin[{] assign[member[.sealed], call[s.equalsIgnoreCase, parameter[literal["true"]]]] else begin[{] None end[}] else begin[{] None end[}] if[member[.sealed]] begin[{] assign[member[.sealBase], literal[null]] else begin[{] None end[}] return[call[.definePackage, parameter[member[.name], member[.specTitle], member[.specVersion], member[.specVendor], member[.implTitle], member[.implVersion], member[.implVendor], member[.sealBase]]]] end[}] END[}]
Keyword[public] identifier[Package] identifier[definePackage] operator[SEP] identifier[String] identifier[name] , identifier[Manifest] identifier[manifest] , identifier[URL] identifier[sealBase] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] { identifier[Attributes] identifier[mA] operator[=] identifier[manifest] operator[SEP] identifier[getMainAttributes] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[specTitle] operator[=] identifier[mA] operator[SEP] identifier[getValue] operator[SEP] identifier[Name] operator[SEP] identifier[SPECIFICATION_TITLE] operator[SEP] operator[SEP] identifier[String] identifier[specVersion] operator[=] identifier[mA] operator[SEP] identifier[getValue] operator[SEP] identifier[Name] operator[SEP] identifier[SPECIFICATION_VERSION] operator[SEP] operator[SEP] identifier[String] identifier[specVendor] operator[=] identifier[mA] operator[SEP] identifier[getValue] operator[SEP] identifier[Name] operator[SEP] identifier[SPECIFICATION_VENDOR] operator[SEP] operator[SEP] identifier[String] identifier[implTitle] operator[=] identifier[mA] operator[SEP] identifier[getValue] operator[SEP] identifier[Name] operator[SEP] identifier[IMPLEMENTATION_TITLE] operator[SEP] operator[SEP] identifier[String] identifier[implVersion] operator[=] identifier[mA] operator[SEP] identifier[getValue] operator[SEP] identifier[Name] operator[SEP] identifier[IMPLEMENTATION_VERSION] operator[SEP] operator[SEP] identifier[String] identifier[implVendor] operator[=] identifier[mA] operator[SEP] identifier[getValue] operator[SEP] identifier[Name] operator[SEP] identifier[IMPLEMENTATION_VENDOR] operator[SEP] operator[SEP] identifier[String] identifier[sealedString] operator[=] identifier[mA] operator[SEP] identifier[getValue] operator[SEP] identifier[Name] operator[SEP] identifier[SEALED] operator[SEP] operator[SEP] identifier[Boolean] identifier[sealed] operator[=] operator[SEP] identifier[sealedString] operator[==] Other[null] operator[?] identifier[Boolean] operator[SEP] identifier[FALSE] operator[:] identifier[sealedString] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[unixName] operator[=] identifier[name] operator[SEP] identifier[replaceAll] operator[SEP] literal[String] , literal[String] operator[SEP] operator[+] literal[String] operator[SEP] identifier[mA] operator[=] identifier[manifest] operator[SEP] identifier[getAttributes] operator[SEP] identifier[unixName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mA] operator[!=] Other[null] operator[SEP] { identifier[String] identifier[s] operator[=] identifier[mA] operator[SEP] identifier[getValue] operator[SEP] identifier[Name] operator[SEP] identifier[SPECIFICATION_TITLE] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[s] operator[!=] Other[null] operator[SEP] identifier[specTitle] operator[=] identifier[s] operator[SEP] identifier[s] operator[=] identifier[mA] operator[SEP] identifier[getValue] operator[SEP] identifier[Name] operator[SEP] identifier[SPECIFICATION_VERSION] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[s] operator[!=] Other[null] operator[SEP] identifier[specVersion] operator[=] identifier[s] operator[SEP] identifier[s] operator[=] identifier[mA] operator[SEP] identifier[getValue] operator[SEP] identifier[Name] operator[SEP] identifier[SPECIFICATION_VENDOR] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[s] operator[!=] Other[null] operator[SEP] identifier[specVendor] operator[=] identifier[s] operator[SEP] identifier[s] operator[=] identifier[mA] operator[SEP] identifier[getValue] operator[SEP] identifier[Name] operator[SEP] identifier[IMPLEMENTATION_TITLE] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[s] operator[!=] Other[null] operator[SEP] identifier[implTitle] operator[=] identifier[s] operator[SEP] identifier[s] operator[=] identifier[mA] operator[SEP] identifier[getValue] operator[SEP] identifier[Name] operator[SEP] identifier[IMPLEMENTATION_VERSION] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[s] operator[!=] Other[null] operator[SEP] identifier[implVersion] operator[=] identifier[s] operator[SEP] identifier[s] operator[=] identifier[mA] operator[SEP] identifier[getValue] operator[SEP] identifier[Name] operator[SEP] identifier[IMPLEMENTATION_VENDOR] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[s] operator[!=] Other[null] operator[SEP] identifier[implVendor] operator[=] identifier[s] operator[SEP] identifier[s] operator[=] identifier[mA] operator[SEP] identifier[getValue] operator[SEP] identifier[Name] operator[SEP] identifier[SEALED] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[s] operator[!=] Other[null] operator[SEP] identifier[sealed] operator[=] identifier[s] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[sealed] operator[SEP] identifier[sealBase] operator[=] Other[null] operator[SEP] Keyword[return] identifier[definePackage] operator[SEP] identifier[name] , identifier[specTitle] , identifier[specVersion] , identifier[specVendor] , identifier[implTitle] , identifier[implVersion] , identifier[implVendor] , identifier[sealBase] operator[SEP] operator[SEP] }
@Override public void removeByUuid(String uuid) { for (CommerceNotificationAttachment commerceNotificationAttachment : findByUuid( uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceNotificationAttachment); } }
class class_name[name] begin[{] method[removeByUuid, return_type[void], modifier[public], parameter[uuid]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=commerceNotificationAttachment, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=uuid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ALL_POS, postfix_operators=[], prefix_operators=[], qualifier=QueryUtil, selectors=[]), MemberReference(member=ALL_POS, postfix_operators=[], prefix_operators=[], qualifier=QueryUtil, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=findByUuid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=commerceNotificationAttachment)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CommerceNotificationAttachment, sub_type=None))), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[removeByUuid] operator[SEP] identifier[String] identifier[uuid] operator[SEP] { Keyword[for] operator[SEP] identifier[CommerceNotificationAttachment] identifier[commerceNotificationAttachment] operator[:] identifier[findByUuid] operator[SEP] identifier[uuid] , identifier[QueryUtil] operator[SEP] identifier[ALL_POS] , identifier[QueryUtil] operator[SEP] identifier[ALL_POS] , Other[null] operator[SEP] operator[SEP] { identifier[remove] operator[SEP] identifier[commerceNotificationAttachment] operator[SEP] operator[SEP] } }
public Observable<Page<PublicIPPrefixInner>> listAsync() { return listWithServiceResponseAsync() .map(new Func1<ServiceResponse<Page<PublicIPPrefixInner>>, Page<PublicIPPrefixInner>>() { @Override public Page<PublicIPPrefixInner> call(ServiceResponse<Page<PublicIPPrefixInner>> 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[PublicIPPrefixInner] 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[PublicIPPrefixInner] operator[>] operator[>] , identifier[Page] operator[<] identifier[PublicIPPrefixInner] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Page] operator[<] identifier[PublicIPPrefixInner] operator[>] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[PublicIPPrefixInner] 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 boolean isMemStubEnabled() { Object memStubEnabled = this.getJointCompilationOptions().get(MEM_STUB); if (null == memStubEnabled) { return false; } return "true".equals(memStubEnabled.toString()); }
class class_name[name] begin[{] method[isMemStubEnabled, return_type[type[boolean]], modifier[public], parameter[]] begin[{] local_variable[type[Object], memStubEnabled] if[binary_operation[literal[null], ==, member[.memStubEnabled]]] begin[{] return[literal[false]] else begin[{] None end[}] return[literal["true"]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isMemStubEnabled] operator[SEP] operator[SEP] { identifier[Object] identifier[memStubEnabled] operator[=] Keyword[this] operator[SEP] identifier[getJointCompilationOptions] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[MEM_STUB] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[==] identifier[memStubEnabled] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[memStubEnabled] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public <T> T as(@SuppressWarnings("rawtypes") TypeToken typeToken) throws AlgorithmException { return this.as(typeToken.getType()); }
class class_name[name] begin[{] method[as, return_type[type[T]], modifier[public], parameter[typeToken]] begin[{] return[THIS[call[None.as, parameter[call[typeToken.getType, parameter[]]]]]] end[}] END[}]
Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[as] operator[SEP] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[TypeToken] identifier[typeToken] operator[SEP] Keyword[throws] identifier[AlgorithmException] { Keyword[return] Keyword[this] operator[SEP] identifier[as] operator[SEP] identifier[typeToken] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@SuppressWarnings("PMD.GuardLogStatementJavaUtil") @Override public final void create(final Events event, final String userId) { Validate.notNull(event, "The validated object 'event' is null"); Validate.notBlank(userId, "The validated character sequence 'userId' is null or empty"); // PMD does not recognize the guarded log statement if (LOG.isInfoEnabled()) { LOG.info("[MESSAGEQ] " + event.getValue() + ". User ID '" + userId); } }
class class_name[name] begin[{] method[create, return_type[void], modifier[final public], parameter[event, userId]] begin[{] call[Validate.notNull, parameter[member[.event], literal["The validated object 'event' is null"]]] call[Validate.notBlank, parameter[member[.userId], literal["The validated character sequence 'userId' is null or empty"]]] if[call[LOG.isInfoEnabled, parameter[]]] begin[{] call[LOG.info, parameter[binary_operation[binary_operation[binary_operation[literal["[MESSAGEQ] "], +, call[event.getValue, parameter[]]], +, literal[". User ID '"]], +, member[.userId]]]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[create] operator[SEP] Keyword[final] identifier[Events] identifier[event] , Keyword[final] identifier[String] identifier[userId] operator[SEP] { identifier[Validate] operator[SEP] identifier[notNull] operator[SEP] identifier[event] , literal[String] operator[SEP] operator[SEP] identifier[Validate] operator[SEP] identifier[notBlank] operator[SEP] identifier[userId] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[LOG] operator[SEP] identifier[isInfoEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[event] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[userId] operator[SEP] operator[SEP] } }
public final String catalogToStr( final CatalogGs pCatalog, final List<I18nCatalogGs> pI18nCatalogs, final String pLang) { if (pI18nCatalogs != null) { for (I18nCatalogGs icat : pI18nCatalogs) { if (icat.getLang().getItsId().equals(pLang) && pCatalog.getItsId() .equals(icat.getHasName().getItsId())) { return icat.getItsName(); } } } return pCatalog.getItsName(); }
class class_name[name] begin[{] method[catalogToStr, return_type[type[String]], modifier[final public], parameter[pCatalog, pI18nCatalogs, pLang]] begin[{] if[binary_operation[member[.pI18nCatalogs], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getLang, postfix_operators=[], prefix_operators=[], qualifier=icat, selectors=[MethodInvocation(arguments=[], member=getItsId, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=pLang, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getItsId, postfix_operators=[], prefix_operators=[], qualifier=pCatalog, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getHasName, postfix_operators=[], prefix_operators=[], qualifier=icat, selectors=[MethodInvocation(arguments=[], member=getItsId, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=equals, 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=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getItsName, postfix_operators=[], prefix_operators=[], qualifier=icat, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=pI18nCatalogs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=icat)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=I18nCatalogGs, sub_type=None))), label=None) else begin[{] None end[}] return[call[pCatalog.getItsName, parameter[]]] end[}] END[}]
Keyword[public] Keyword[final] identifier[String] identifier[catalogToStr] operator[SEP] Keyword[final] identifier[CatalogGs] identifier[pCatalog] , Keyword[final] identifier[List] operator[<] identifier[I18nCatalogGs] operator[>] identifier[pI18nCatalogs] , Keyword[final] identifier[String] identifier[pLang] operator[SEP] { Keyword[if] operator[SEP] identifier[pI18nCatalogs] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[I18nCatalogGs] identifier[icat] operator[:] identifier[pI18nCatalogs] operator[SEP] { Keyword[if] operator[SEP] identifier[icat] operator[SEP] identifier[getLang] operator[SEP] operator[SEP] operator[SEP] identifier[getItsId] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[pLang] operator[SEP] operator[&&] identifier[pCatalog] operator[SEP] identifier[getItsId] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[icat] operator[SEP] identifier[getHasName] operator[SEP] operator[SEP] operator[SEP] identifier[getItsId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[icat] operator[SEP] identifier[getItsName] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[return] identifier[pCatalog] operator[SEP] identifier[getItsName] operator[SEP] operator[SEP] operator[SEP] }
private String preventLogForging(String logMsg) { String result = logMsg; // use precompiled pattern for performance reasons result = LINEBREAK_PATTERN.matcher(logMsg).replaceAll(SingleLinePatternLayout.LINE_SEP); return result; }
class class_name[name] begin[{] method[preventLogForging, return_type[type[String]], modifier[private], parameter[logMsg]] begin[{] local_variable[type[String], result] assign[member[.result], call[LINEBREAK_PATTERN.matcher, parameter[member[.logMsg]]]] return[member[.result]] end[}] END[}]
Keyword[private] identifier[String] identifier[preventLogForging] operator[SEP] identifier[String] identifier[logMsg] operator[SEP] { identifier[String] identifier[result] operator[=] identifier[logMsg] operator[SEP] identifier[result] operator[=] identifier[LINEBREAK_PATTERN] operator[SEP] identifier[matcher] operator[SEP] identifier[logMsg] operator[SEP] operator[SEP] identifier[replaceAll] operator[SEP] identifier[SingleLinePatternLayout] operator[SEP] identifier[LINE_SEP] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
public SigRating getSigRatings(String sigId) throws VoteSmartException, VoteSmartErrorException { return api.query("Rating.getSigRatings", new ArgMap("sigId", sigId), SigRating.class ); }
class class_name[name] begin[{] method[getSigRatings, return_type[type[SigRating]], modifier[public], parameter[sigId]] begin[{] return[call[api.query, parameter[literal["Rating.getSigRatings"], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="sigId"), MemberReference(member=sigId, 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=ArgMap, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SigRating, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[SigRating] identifier[getSigRatings] operator[SEP] identifier[String] identifier[sigId] operator[SEP] Keyword[throws] identifier[VoteSmartException] , identifier[VoteSmartErrorException] { Keyword[return] identifier[api] operator[SEP] identifier[query] operator[SEP] literal[String] , Keyword[new] identifier[ArgMap] operator[SEP] literal[String] , identifier[sigId] operator[SEP] , identifier[SigRating] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
@BetaApi public final Operation insertSubnetwork(ProjectRegionName region, Subnetwork subnetworkResource) { InsertSubnetworkHttpRequest request = InsertSubnetworkHttpRequest.newBuilder() .setRegion(region == null ? null : region.toString()) .setSubnetworkResource(subnetworkResource) .build(); return insertSubnetwork(request); }
class class_name[name] begin[{] method[insertSubnetwork, return_type[type[Operation]], modifier[final public], parameter[region, subnetworkResource]] begin[{] local_variable[type[InsertSubnetworkHttpRequest], request] return[call[.insertSubnetwork, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[BetaApi] Keyword[public] Keyword[final] identifier[Operation] identifier[insertSubnetwork] operator[SEP] identifier[ProjectRegionName] identifier[region] , identifier[Subnetwork] identifier[subnetworkResource] operator[SEP] { identifier[InsertSubnetworkHttpRequest] identifier[request] operator[=] identifier[InsertSubnetworkHttpRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setRegion] operator[SEP] identifier[region] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[region] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setSubnetworkResource] operator[SEP] identifier[subnetworkResource] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[insertSubnetwork] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
@Override public boolean login() throws LoginException { try { Callback[] callbacks = getHandledCallbacks(); setPasswordCredentialInTemporarySubject(callbacks); } catch (Exception e) { throw new LoginException(e.getMessage()); } return succeeded; }
class class_name[name] begin[{] method[login, return_type[type[boolean]], modifier[public], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getHandledCallbacks, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=callbacks)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=Callback, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=callbacks, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setPasswordCredentialInTemporarySubject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LoginException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) return[member[.succeeded]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[login] operator[SEP] operator[SEP] Keyword[throws] identifier[LoginException] { Keyword[try] { identifier[Callback] operator[SEP] operator[SEP] identifier[callbacks] operator[=] identifier[getHandledCallbacks] operator[SEP] operator[SEP] operator[SEP] identifier[setPasswordCredentialInTemporarySubject] operator[SEP] identifier[callbacks] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[LoginException] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[succeeded] operator[SEP] }
public static <T> T ascClone(final T comparableArray) { if (isComparableArray(comparableArray)) { T clone = BeanUtils.clone(comparableArray); ascByReflex(clone); return clone; } return comparableArray; }
class class_name[name] begin[{] method[ascClone, return_type[type[T]], modifier[public static], parameter[comparableArray]] begin[{] if[call[.isComparableArray, parameter[member[.comparableArray]]]] begin[{] local_variable[type[T], clone] call[.ascByReflex, parameter[member[.clone]]] return[member[.clone]] else begin[{] None end[}] return[member[.comparableArray]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[ascClone] operator[SEP] Keyword[final] identifier[T] identifier[comparableArray] operator[SEP] { Keyword[if] operator[SEP] identifier[isComparableArray] operator[SEP] identifier[comparableArray] operator[SEP] operator[SEP] { identifier[T] identifier[clone] operator[=] identifier[BeanUtils] operator[SEP] identifier[clone] operator[SEP] identifier[comparableArray] operator[SEP] operator[SEP] identifier[ascByReflex] operator[SEP] identifier[clone] operator[SEP] operator[SEP] Keyword[return] identifier[clone] operator[SEP] } Keyword[return] identifier[comparableArray] operator[SEP] }
public Tree setName(String name) { if (parent == null) { throw new UnsupportedOperationException("Root node has no name!"); } if (!parent.isMap()) { throw new UnsupportedOperationException("Unable to set name (this node's parent is not a Map)!"); } parent.remove((String) key); key = name; parent.putObjectInternal(name, value, false); return this; }
class class_name[name] begin[{] method[setName, return_type[type[Tree]], modifier[public], parameter[name]] begin[{] if[binary_operation[member[.parent], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Root node has no name!")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UnsupportedOperationException, sub_type=None)), label=None) else begin[{] None end[}] if[call[parent.isMap, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to set name (this node's parent is not a Map)!")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UnsupportedOperationException, sub_type=None)), label=None) else begin[{] None end[}] call[parent.remove, parameter[Cast(expression=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))]] assign[member[.key], member[.name]] call[parent.putObjectInternal, parameter[member[.name], member[.value], literal[false]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[Tree] identifier[setName] operator[SEP] identifier[String] identifier[name] operator[SEP] { Keyword[if] operator[SEP] identifier[parent] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[UnsupportedOperationException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[parent] operator[SEP] identifier[isMap] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[UnsupportedOperationException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[parent] operator[SEP] identifier[remove] operator[SEP] operator[SEP] identifier[String] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[key] operator[=] identifier[name] operator[SEP] identifier[parent] operator[SEP] identifier[putObjectInternal] operator[SEP] identifier[name] , identifier[value] , literal[boolean] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public final boolean compareAndSetForkJoinTaskTag(short expect, short update) { for (int s;;) { if ((short) (s = status) != expect) return false; if (U.compareAndSwapInt(this, STATUS, s, (s & ~SMASK) | (update & SMASK))) return true; } }
class class_name[name] begin[{] method[compareAndSetForkJoinTaskTag, return_type[type[boolean]], modifier[final public], parameter[expect, update]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=Cast(expression=Assignment(expressionl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=status, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), type=BasicType(dimensions=[], name=short)), operandr=MemberReference(member=expect, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)), IfStatement(condition=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=STATUS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=SMASK, postfix_operators=[], prefix_operators=['~'], qualifier=, selectors=[]), operator=&), operandr=BinaryOperation(operandl=MemberReference(member=update, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=SMASK, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=&), operator=|)], member=compareAndSwapInt, postfix_operators=[], prefix_operators=[], qualifier=U, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None))]), control=ForControl(condition=None, init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=s)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=None), label=None) end[}] END[}]
Keyword[public] Keyword[final] Keyword[boolean] identifier[compareAndSetForkJoinTaskTag] operator[SEP] Keyword[short] identifier[expect] , Keyword[short] identifier[update] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[s] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] Keyword[short] operator[SEP] operator[SEP] identifier[s] operator[=] identifier[status] operator[SEP] operator[!=] identifier[expect] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[U] operator[SEP] identifier[compareAndSwapInt] operator[SEP] Keyword[this] , identifier[STATUS] , identifier[s] , operator[SEP] identifier[s] operator[&] operator[~] identifier[SMASK] operator[SEP] operator[|] operator[SEP] identifier[update] operator[&] identifier[SMASK] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } }
@NotNull public String toSimpleString(boolean allowDecimal) { if (_denominator == 0 && _numerator != 0) { return toString(); } else if (isInteger()) { return Integer.toString(intValue()); } else if (_numerator != 1 && _denominator % _numerator == 0) { // common factor between denominator and numerator long newDenominator = _denominator / _numerator; return new Rational(1, newDenominator).toSimpleString(allowDecimal); } else { Rational simplifiedInstance = getSimplifiedInstance(); if (allowDecimal) { String doubleString = Double.toString(simplifiedInstance.doubleValue()); if (doubleString.length() < 5) { return doubleString; } } return simplifiedInstance.toString(); } }
class class_name[name] begin[{] method[toSimpleString, return_type[type[String]], modifier[public], parameter[allowDecimal]] begin[{] if[binary_operation[binary_operation[member[._denominator], ==, literal[0]], &&, binary_operation[member[._numerator], !=, literal[0]]]] begin[{] return[call[.toString, parameter[]]] else begin[{] if[call[.isInteger, parameter[]]] begin[{] return[call[Integer.toString, parameter[call[.intValue, parameter[]]]]] else begin[{] if[binary_operation[binary_operation[member[._numerator], !=, literal[1]], &&, binary_operation[binary_operation[member[._denominator], %, member[._numerator]], ==, literal[0]]]] begin[{] local_variable[type[long], newDenominator] return[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), MemberReference(member=newDenominator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=allowDecimal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toSimpleString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Rational, sub_type=None))] else begin[{] local_variable[type[Rational], simplifiedInstance] if[member[.allowDecimal]] begin[{] local_variable[type[String], doubleString] if[binary_operation[call[doubleString.length, parameter[]], <, literal[5]]] begin[{] return[member[.doubleString]] else begin[{] None end[}] else begin[{] None end[}] return[call[simplifiedInstance.toString, parameter[]]] end[}] end[}] end[}] end[}] END[}]
annotation[@] identifier[NotNull] Keyword[public] identifier[String] identifier[toSimpleString] operator[SEP] Keyword[boolean] identifier[allowDecimal] operator[SEP] { Keyword[if] operator[SEP] identifier[_denominator] operator[==] Other[0] operator[&&] identifier[_numerator] operator[!=] Other[0] operator[SEP] { Keyword[return] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[isInteger] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[Integer] operator[SEP] identifier[toString] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[_numerator] operator[!=] Other[1] operator[&&] identifier[_denominator] operator[%] identifier[_numerator] operator[==] Other[0] operator[SEP] { Keyword[long] identifier[newDenominator] operator[=] identifier[_denominator] operator[/] identifier[_numerator] operator[SEP] Keyword[return] Keyword[new] identifier[Rational] operator[SEP] Other[1] , identifier[newDenominator] operator[SEP] operator[SEP] identifier[toSimpleString] operator[SEP] identifier[allowDecimal] operator[SEP] operator[SEP] } Keyword[else] { identifier[Rational] identifier[simplifiedInstance] operator[=] identifier[getSimplifiedInstance] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[allowDecimal] operator[SEP] { identifier[String] identifier[doubleString] operator[=] identifier[Double] operator[SEP] identifier[toString] operator[SEP] identifier[simplifiedInstance] operator[SEP] identifier[doubleValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[doubleString] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[<] Other[5] operator[SEP] { Keyword[return] identifier[doubleString] operator[SEP] } } Keyword[return] identifier[simplifiedInstance] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } }
public Object atomUnmarshall(String oDataEntityXml, String fullResponse, ODataClientQuery query) throws UnsupportedEncodingException, ODataClientException { Object unmarshalledEntity; // build a dummy request context which contains the Xml ODataRequest request = buildODataRequestFromString(oDataEntityXml, query); ODataRequestContext requestContext = new ODataRequestContext(request, createODataUri(url, query.getEdmEntityName()), entityDataModel); // unmarshall the OData request context into an entity try { unmarshalledEntity = getODataAtomParser(requestContext).getODataEntity(); } catch (ODataException | RuntimeException e) { throw new ODataClientParserException( format("Caught exception {0}: {1} when parsing response received from OData service", e.getClass().getSimpleName(), e.getMessage()), e, oDataEntityXml, fullResponse); } return unmarshalledEntity; }
class class_name[name] begin[{] method[atomUnmarshall, return_type[type[Object]], modifier[public], parameter[oDataEntityXml, fullResponse, query]] begin[{] local_variable[type[Object], unmarshalledEntity] local_variable[type[ODataRequest], request] local_variable[type[ODataRequestContext], requestContext] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=unmarshalledEntity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=requestContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getODataAtomParser, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getODataEntity, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Caught exception {0}: {1} when parsing response received from OData service"), MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=format, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=oDataEntityXml, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fullResponse, 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=ODataClientParserException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ODataException', 'RuntimeException']))], finally_block=None, label=None, resources=None) return[member[.unmarshalledEntity]] end[}] END[}]
Keyword[public] identifier[Object] identifier[atomUnmarshall] operator[SEP] identifier[String] identifier[oDataEntityXml] , identifier[String] identifier[fullResponse] , identifier[ODataClientQuery] identifier[query] operator[SEP] Keyword[throws] identifier[UnsupportedEncodingException] , identifier[ODataClientException] { identifier[Object] identifier[unmarshalledEntity] operator[SEP] identifier[ODataRequest] identifier[request] operator[=] identifier[buildODataRequestFromString] operator[SEP] identifier[oDataEntityXml] , identifier[query] operator[SEP] operator[SEP] identifier[ODataRequestContext] identifier[requestContext] operator[=] Keyword[new] identifier[ODataRequestContext] operator[SEP] identifier[request] , identifier[createODataUri] operator[SEP] identifier[url] , identifier[query] operator[SEP] identifier[getEdmEntityName] operator[SEP] operator[SEP] operator[SEP] , identifier[entityDataModel] operator[SEP] operator[SEP] Keyword[try] { identifier[unmarshalledEntity] operator[=] identifier[getODataAtomParser] operator[SEP] identifier[requestContext] operator[SEP] operator[SEP] identifier[getODataEntity] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ODataException] operator[|] identifier[RuntimeException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ODataClientParserException] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[e] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] , identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] , identifier[e] , identifier[oDataEntityXml] , identifier[fullResponse] operator[SEP] operator[SEP] } Keyword[return] identifier[unmarshalledEntity] operator[SEP] }
public static OSFamily getOSFamilyFromGNUString(String gnuString) { final String nativeOs = (gnuString != null ? gnuString.toLowerCase() : ""); final OSFamily retval; if (nativeOs.startsWith("mingw") || nativeOs.startsWith("cygwin")) retval = OSFamily.WINDOWS; else if (nativeOs.startsWith("darwin")) retval = OSFamily.MAC; else if (nativeOs.startsWith("linux")) retval = OSFamily.LINUX; else retval = OSFamily.UNKNOWN; return retval; }
class class_name[name] begin[{] method[getOSFamilyFromGNUString, return_type[type[OSFamily]], modifier[public static], parameter[gnuString]] begin[{] local_variable[type[String], nativeOs] local_variable[type[OSFamily], retval] if[binary_operation[call[nativeOs.startsWith, parameter[literal["mingw"]]], ||, call[nativeOs.startsWith, parameter[literal["cygwin"]]]]] begin[{] assign[member[.retval], member[OSFamily.WINDOWS]] else begin[{] if[call[nativeOs.startsWith, parameter[literal["darwin"]]]] begin[{] assign[member[.retval], member[OSFamily.MAC]] else begin[{] if[call[nativeOs.startsWith, parameter[literal["linux"]]]] begin[{] assign[member[.retval], member[OSFamily.LINUX]] else begin[{] assign[member[.retval], member[OSFamily.UNKNOWN]] end[}] end[}] end[}] return[member[.retval]] end[}] END[}]
Keyword[public] Keyword[static] identifier[OSFamily] identifier[getOSFamilyFromGNUString] operator[SEP] identifier[String] identifier[gnuString] operator[SEP] { Keyword[final] identifier[String] identifier[nativeOs] operator[=] operator[SEP] identifier[gnuString] operator[!=] Other[null] operator[?] identifier[gnuString] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[:] literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[OSFamily] identifier[retval] operator[SEP] Keyword[if] operator[SEP] identifier[nativeOs] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[nativeOs] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[retval] operator[=] identifier[OSFamily] operator[SEP] identifier[WINDOWS] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[nativeOs] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[retval] operator[=] identifier[OSFamily] operator[SEP] identifier[MAC] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[nativeOs] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[retval] operator[=] identifier[OSFamily] operator[SEP] identifier[LINUX] operator[SEP] Keyword[else] identifier[retval] operator[=] identifier[OSFamily] operator[SEP] identifier[UNKNOWN] operator[SEP] Keyword[return] identifier[retval] operator[SEP] }
public Observable<PacketCaptureResultInner> createAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName, PacketCaptureInner parameters) { return createWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName, parameters).map(new Func1<ServiceResponse<PacketCaptureResultInner>, PacketCaptureResultInner>() { @Override public PacketCaptureResultInner call(ServiceResponse<PacketCaptureResultInner> response) { return response.body(); } }); }
class class_name[name] begin[{] method[createAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, networkWatcherName, packetCaptureName, parameters]] begin[{] return[call[.createWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.networkWatcherName], member[.packetCaptureName], member[.parameters]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[PacketCaptureResultInner] operator[>] identifier[createAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[networkWatcherName] , identifier[String] identifier[packetCaptureName] , identifier[PacketCaptureInner] identifier[parameters] operator[SEP] { Keyword[return] identifier[createWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[networkWatcherName] , identifier[packetCaptureName] , identifier[parameters] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[PacketCaptureResultInner] operator[>] , identifier[PacketCaptureResultInner] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[PacketCaptureResultInner] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[PacketCaptureResultInner] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
@Override public String lookup(String key) { final String value = System.getenv(key); if (value == null && strict) { throw new UndefinedEnvironmentVariableException("The environment variable '" + key + "' is not defined; could not substitute the expression '${" + key + "}'."); } return value; }
class class_name[name] begin[{] method[lookup, return_type[type[String]], modifier[public], parameter[key]] begin[{] local_variable[type[String], value] if[binary_operation[binary_operation[member[.value], ==, literal[null]], &&, member[.strict]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The environment variable '"), operandr=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' is not defined; could not substitute the expression '${"), operator=+), operandr=MemberReference(member=key, 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=UndefinedEnvironmentVariableException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.value]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[lookup] operator[SEP] identifier[String] identifier[key] operator[SEP] { Keyword[final] identifier[String] identifier[value] operator[=] identifier[System] operator[SEP] identifier[getenv] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[&&] identifier[strict] operator[SEP] { Keyword[throw] Keyword[new] identifier[UndefinedEnvironmentVariableException] operator[SEP] literal[String] operator[+] identifier[key] operator[+] literal[String] operator[+] identifier[key] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[value] operator[SEP] }
protected PluginStrategy createPluginStrategy() { String strategyName = SystemProperties.getString(PluginStrategy.class.getName()); if (strategyName != null) { try { Class<?> klazz = getClass().getClassLoader().loadClass(strategyName); Object strategy = klazz.getConstructor(PluginManager.class) .newInstance(this); if (strategy instanceof PluginStrategy) { LOGGER.info("Plugin strategy: " + strategyName); return (PluginStrategy) strategy; } else { LOGGER.warning("Plugin strategy (" + strategyName + ") is not an instance of hudson.PluginStrategy"); } } catch (ClassNotFoundException e) { LOGGER.warning("Plugin strategy class not found: " + strategyName); } catch (Exception e) { LOGGER.log(WARNING, "Could not instantiate plugin strategy: " + strategyName + ". Falling back to ClassicPluginStrategy", e); } LOGGER.info("Falling back to ClassicPluginStrategy"); } // default and fallback return new ClassicPluginStrategy(this); }
class class_name[name] begin[{] method[createPluginStrategy, return_type[type[PluginStrategy]], modifier[protected], parameter[]] begin[{] local_variable[type[String], strategyName] if[binary_operation[member[.strategyName], !=, literal[null]]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getClassLoader, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=strategyName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=loadClass, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=klazz)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PluginManager, sub_type=None))], member=getConstructor, postfix_operators=[], prefix_operators=[], qualifier=klazz, selectors=[MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=newInstance, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=strategy)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=strategy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=PluginStrategy, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Plugin strategy ("), operandr=MemberReference(member=strategyName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=") is not an instance of hudson.PluginStrategy"), operator=+)], member=warning, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Plugin strategy: "), operandr=MemberReference(member=strategyName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=info, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Cast(expression=MemberReference(member=strategy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=PluginStrategy, sub_type=None)), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Plugin strategy class not found: "), operandr=MemberReference(member=strategyName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=warning, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ClassNotFoundException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=WARNING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not instantiate plugin strategy: "), operandr=MemberReference(member=strategyName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=". Falling back to ClassicPluginStrategy"), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=log, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) call[LOGGER.info, parameter[literal["Falling back to ClassicPluginStrategy"]]] else begin[{] None end[}] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ClassicPluginStrategy, sub_type=None))] end[}] END[}]
Keyword[protected] identifier[PluginStrategy] identifier[createPluginStrategy] operator[SEP] operator[SEP] { identifier[String] identifier[strategyName] operator[=] identifier[SystemProperties] operator[SEP] identifier[getString] operator[SEP] identifier[PluginStrategy] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[strategyName] operator[!=] Other[null] operator[SEP] { Keyword[try] { identifier[Class] operator[<] operator[?] operator[>] identifier[klazz] operator[=] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getClassLoader] operator[SEP] operator[SEP] operator[SEP] identifier[loadClass] operator[SEP] identifier[strategyName] operator[SEP] operator[SEP] identifier[Object] identifier[strategy] operator[=] identifier[klazz] operator[SEP] identifier[getConstructor] operator[SEP] identifier[PluginManager] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[newInstance] operator[SEP] Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[strategy] Keyword[instanceof] identifier[PluginStrategy] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[strategyName] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[PluginStrategy] operator[SEP] identifier[strategy] operator[SEP] } Keyword[else] { identifier[LOGGER] operator[SEP] identifier[warning] operator[SEP] literal[String] operator[+] identifier[strategyName] operator[+] literal[String] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[ClassNotFoundException] identifier[e] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[warning] operator[SEP] literal[String] operator[+] identifier[strategyName] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[log] operator[SEP] identifier[WARNING] , literal[String] operator[+] identifier[strategyName] operator[+] literal[String] , identifier[e] operator[SEP] operator[SEP] } identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[ClassicPluginStrategy] operator[SEP] Keyword[this] operator[SEP] operator[SEP] }
public void set (final int r, final int c, final float value) throws MatrixException { if ((r < 0) || (r >= m_nRows) || (c < 0) || (c >= m_nCols)) { throw new MatrixException (MatrixException.INVALID_INDEX); } m_aValues[r][c] = value; }
class class_name[name] begin[{] method[set, return_type[void], modifier[public], parameter[r, c, value]] begin[{] if[binary_operation[binary_operation[binary_operation[binary_operation[member[.r], <, literal[0]], ||, binary_operation[member[.r], >=, member[.m_nRows]]], ||, binary_operation[member[.c], <, literal[0]]], ||, binary_operation[member[.c], >=, member[.m_nCols]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=INVALID_INDEX, postfix_operators=[], prefix_operators=[], qualifier=MatrixException, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MatrixException, sub_type=None)), label=None) else begin[{] None end[}] assign[member[.m_aValues], member[.value]] end[}] END[}]
Keyword[public] Keyword[void] identifier[set] operator[SEP] Keyword[final] Keyword[int] identifier[r] , Keyword[final] Keyword[int] identifier[c] , Keyword[final] Keyword[float] identifier[value] operator[SEP] Keyword[throws] identifier[MatrixException] { Keyword[if] operator[SEP] operator[SEP] identifier[r] operator[<] Other[0] operator[SEP] operator[||] operator[SEP] identifier[r] operator[>=] identifier[m_nRows] operator[SEP] operator[||] operator[SEP] identifier[c] operator[<] Other[0] operator[SEP] operator[||] operator[SEP] identifier[c] operator[>=] identifier[m_nCols] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[MatrixException] operator[SEP] identifier[MatrixException] operator[SEP] identifier[INVALID_INDEX] operator[SEP] operator[SEP] } identifier[m_aValues] operator[SEP] identifier[r] operator[SEP] operator[SEP] identifier[c] operator[SEP] operator[=] identifier[value] operator[SEP] }
public boolean pageScroll(int direction) { boolean down = direction == View.FOCUS_DOWN; int height = getHeight(); if (down) { mTempRect.top = getScrollY() + height; int count = getChildCount(); if (count > 0) { View view = getChildAt(count - 1); if (mTempRect.top + height > view.getBottom()) { mTempRect.top = view.getBottom() - height; } } } else { mTempRect.top = getScrollY() - height; if (mTempRect.top < 0) { mTempRect.top = 0; } } mTempRect.bottom = mTempRect.top + height; return scrollAndFocus(direction, mTempRect.top, mTempRect.bottom); }
class class_name[name] begin[{] method[pageScroll, return_type[type[boolean]], modifier[public], parameter[direction]] begin[{] local_variable[type[boolean], down] local_variable[type[int], height] if[member[.down]] begin[{] assign[member[mTempRect.top], binary_operation[call[.getScrollY, parameter[]], +, member[.height]]] local_variable[type[int], count] if[binary_operation[member[.count], >, literal[0]]] begin[{] local_variable[type[View], view] if[binary_operation[binary_operation[member[mTempRect.top], +, member[.height]], >, call[view.getBottom, parameter[]]]] begin[{] assign[member[mTempRect.top], binary_operation[call[view.getBottom, parameter[]], -, member[.height]]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] assign[member[mTempRect.top], binary_operation[call[.getScrollY, parameter[]], -, member[.height]]] if[binary_operation[member[mTempRect.top], <, literal[0]]] begin[{] assign[member[mTempRect.top], literal[0]] else begin[{] None end[}] end[}] assign[member[mTempRect.bottom], binary_operation[member[mTempRect.top], +, member[.height]]] return[call[.scrollAndFocus, parameter[member[.direction], member[mTempRect.top], member[mTempRect.bottom]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[pageScroll] operator[SEP] Keyword[int] identifier[direction] operator[SEP] { Keyword[boolean] identifier[down] operator[=] identifier[direction] operator[==] identifier[View] operator[SEP] identifier[FOCUS_DOWN] operator[SEP] Keyword[int] identifier[height] operator[=] identifier[getHeight] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[down] operator[SEP] { identifier[mTempRect] operator[SEP] identifier[top] operator[=] identifier[getScrollY] operator[SEP] operator[SEP] operator[+] identifier[height] operator[SEP] Keyword[int] identifier[count] operator[=] identifier[getChildCount] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[count] operator[>] Other[0] operator[SEP] { identifier[View] identifier[view] operator[=] identifier[getChildAt] operator[SEP] identifier[count] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mTempRect] operator[SEP] identifier[top] operator[+] identifier[height] operator[>] identifier[view] operator[SEP] identifier[getBottom] operator[SEP] operator[SEP] operator[SEP] { identifier[mTempRect] operator[SEP] identifier[top] operator[=] identifier[view] operator[SEP] identifier[getBottom] operator[SEP] operator[SEP] operator[-] identifier[height] operator[SEP] } } } Keyword[else] { identifier[mTempRect] operator[SEP] identifier[top] operator[=] identifier[getScrollY] operator[SEP] operator[SEP] operator[-] identifier[height] operator[SEP] Keyword[if] operator[SEP] identifier[mTempRect] operator[SEP] identifier[top] operator[<] Other[0] operator[SEP] { identifier[mTempRect] operator[SEP] identifier[top] operator[=] Other[0] operator[SEP] } } identifier[mTempRect] operator[SEP] identifier[bottom] operator[=] identifier[mTempRect] operator[SEP] identifier[top] operator[+] identifier[height] operator[SEP] Keyword[return] identifier[scrollAndFocus] operator[SEP] identifier[direction] , identifier[mTempRect] operator[SEP] identifier[top] , identifier[mTempRect] operator[SEP] identifier[bottom] operator[SEP] operator[SEP] }
String buildProjectionExpression(SubstitutionContext context) { if (projections.size() == 0) return null; StringBuilder sb = new StringBuilder(); for (PathOperand projection : projections) { if (sb.length() > 0) sb.append(", "); sb.append(projection.asSubstituted(context)); } return sb.toString(); }
class class_name[name] begin[{] method[buildProjectionExpression, return_type[type[String]], modifier[default], parameter[context]] begin[{] if[binary_operation[call[projections.size, parameter[]], ==, literal[0]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[StringBuilder], sb] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=asSubstituted, postfix_operators=[], prefix_operators=[], qualifier=projection, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=projections, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=projection)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PathOperand, sub_type=None))), label=None) return[call[sb.toString, parameter[]]] end[}] END[}]
identifier[String] identifier[buildProjectionExpression] operator[SEP] identifier[SubstitutionContext] identifier[context] operator[SEP] { Keyword[if] operator[SEP] identifier[projections] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[PathOperand] identifier[projection] operator[:] identifier[projections] operator[SEP] { Keyword[if] operator[SEP] identifier[sb] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[projection] operator[SEP] identifier[asSubstituted] operator[SEP] identifier[context] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public RuntimeTypeAdapterFactory<T> registerSubtype(Class<? extends T> type, String label) { if (type == null || label == null) { throw new NullPointerException(); } if (subtypeToLabel.containsKey(type) || labelToSubtype.containsKey(label)) { throw new IllegalArgumentException("types and labels must be unique"); } labelToSubtype.put(label, type); subtypeToLabel.put(type, label); return this; }
class class_name[name] begin[{] method[registerSubtype, return_type[type[RuntimeTypeAdapterFactory]], modifier[public], parameter[type, label]] begin[{] if[binary_operation[binary_operation[member[.type], ==, literal[null]], ||, binary_operation[member[.label], ==, literal[null]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NullPointerException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[call[subtypeToLabel.containsKey, parameter[member[.type]]], ||, call[labelToSubtype.containsKey, parameter[member[.label]]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="types and labels must be unique")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] call[labelToSubtype.put, parameter[member[.label], member[.type]]] call[subtypeToLabel.put, parameter[member[.type], member[.label]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[RuntimeTypeAdapterFactory] operator[<] identifier[T] operator[>] identifier[registerSubtype] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] identifier[type] , identifier[String] identifier[label] operator[SEP] { Keyword[if] operator[SEP] identifier[type] operator[==] Other[null] operator[||] identifier[label] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[subtypeToLabel] operator[SEP] identifier[containsKey] operator[SEP] identifier[type] operator[SEP] operator[||] identifier[labelToSubtype] operator[SEP] identifier[containsKey] operator[SEP] identifier[label] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[labelToSubtype] operator[SEP] identifier[put] operator[SEP] identifier[label] , identifier[type] operator[SEP] operator[SEP] identifier[subtypeToLabel] operator[SEP] identifier[put] operator[SEP] identifier[type] , identifier[label] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
private String getText(JsonNode jsonObject, String nodeName) { JsonNode subNode = jsonObject.get(nodeName); if (subNode == null) { return null; } if (!subNode.isTextual()) { throw new IllegalStateException(nodeName + " from credential process should be textual, but was " + subNode.getNodeType()); } return subNode.asText(); }
class class_name[name] begin[{] method[getText, return_type[type[String]], modifier[private], parameter[jsonObject, nodeName]] begin[{] local_variable[type[JsonNode], subNode] if[binary_operation[member[.subNode], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] if[call[subNode.isTextual, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=nodeName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" from credential process should be textual, but was "), operator=+), operandr=MethodInvocation(arguments=[], member=getNodeType, postfix_operators=[], prefix_operators=[], qualifier=subNode, 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=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] return[call[subNode.asText, parameter[]]] end[}] END[}]
Keyword[private] identifier[String] identifier[getText] operator[SEP] identifier[JsonNode] identifier[jsonObject] , identifier[String] identifier[nodeName] operator[SEP] { identifier[JsonNode] identifier[subNode] operator[=] identifier[jsonObject] operator[SEP] identifier[get] operator[SEP] identifier[nodeName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[subNode] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[subNode] operator[SEP] identifier[isTextual] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] identifier[nodeName] operator[+] literal[String] operator[+] identifier[subNode] operator[SEP] identifier[getNodeType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[subNode] operator[SEP] identifier[asText] operator[SEP] operator[SEP] operator[SEP] }
public final <U, V> Flux<Flux<T>> windowWhen(Publisher<U> bucketOpening, final Function<? super U, ? extends Publisher<V>> closeSelector) { return onAssembly(new FluxWindowWhen<>(this, bucketOpening, closeSelector, Queues.unbounded(Queues.XS_BUFFER_SIZE))); }
class class_name[name] begin[{] method[windowWhen, return_type[type[Flux]], modifier[final public], parameter[bucketOpening, closeSelector]] begin[{] return[call[.onAssembly, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=bucketOpening, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=closeSelector, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=XS_BUFFER_SIZE, postfix_operators=[], prefix_operators=[], qualifier=Queues, selectors=[])], member=unbounded, postfix_operators=[], prefix_operators=[], qualifier=Queues, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=FluxWindowWhen, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[final] operator[<] identifier[U] , identifier[V] operator[>] identifier[Flux] operator[<] identifier[Flux] operator[<] identifier[T] operator[>] operator[>] identifier[windowWhen] operator[SEP] identifier[Publisher] operator[<] identifier[U] operator[>] identifier[bucketOpening] , Keyword[final] identifier[Function] operator[<] operator[?] Keyword[super] identifier[U] , operator[?] Keyword[extends] identifier[Publisher] operator[<] identifier[V] operator[>] operator[>] identifier[closeSelector] operator[SEP] { Keyword[return] identifier[onAssembly] operator[SEP] Keyword[new] identifier[FluxWindowWhen] operator[<] operator[>] operator[SEP] Keyword[this] , identifier[bucketOpening] , identifier[closeSelector] , identifier[Queues] operator[SEP] identifier[unbounded] operator[SEP] identifier[Queues] operator[SEP] identifier[XS_BUFFER_SIZE] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static base_response add(nitro_service client, route6 resource) throws Exception { route6 addresource = new route6(); addresource.network = resource.network; addresource.gateway = resource.gateway; addresource.vlan = resource.vlan; addresource.weight = resource.weight; addresource.distance = resource.distance; addresource.cost = resource.cost; addresource.advertise = resource.advertise; addresource.msr = resource.msr; addresource.monitor = resource.monitor; addresource.td = resource.td; return addresource.add_resource(client); }
class class_name[name] begin[{] method[add, return_type[type[base_response]], modifier[public static], parameter[client, resource]] begin[{] local_variable[type[route6], addresource] assign[member[addresource.network], member[resource.network]] assign[member[addresource.gateway], member[resource.gateway]] assign[member[addresource.vlan], member[resource.vlan]] assign[member[addresource.weight], member[resource.weight]] assign[member[addresource.distance], member[resource.distance]] assign[member[addresource.cost], member[resource.cost]] assign[member[addresource.advertise], member[resource.advertise]] assign[member[addresource.msr], member[resource.msr]] assign[member[addresource.monitor], member[resource.monitor]] assign[member[addresource.td], member[resource.td]] return[call[addresource.add_resource, parameter[member[.client]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[base_response] identifier[add] operator[SEP] identifier[nitro_service] identifier[client] , identifier[route6] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] { identifier[route6] identifier[addresource] operator[=] Keyword[new] identifier[route6] operator[SEP] operator[SEP] operator[SEP] identifier[addresource] operator[SEP] identifier[network] operator[=] identifier[resource] operator[SEP] identifier[network] operator[SEP] identifier[addresource] operator[SEP] identifier[gateway] operator[=] identifier[resource] operator[SEP] identifier[gateway] operator[SEP] identifier[addresource] operator[SEP] identifier[vlan] operator[=] identifier[resource] operator[SEP] identifier[vlan] operator[SEP] identifier[addresource] operator[SEP] identifier[weight] operator[=] identifier[resource] operator[SEP] identifier[weight] operator[SEP] identifier[addresource] operator[SEP] identifier[distance] operator[=] identifier[resource] operator[SEP] identifier[distance] operator[SEP] identifier[addresource] operator[SEP] identifier[cost] operator[=] identifier[resource] operator[SEP] identifier[cost] operator[SEP] identifier[addresource] operator[SEP] identifier[advertise] operator[=] identifier[resource] operator[SEP] identifier[advertise] operator[SEP] identifier[addresource] operator[SEP] identifier[msr] operator[=] identifier[resource] operator[SEP] identifier[msr] operator[SEP] identifier[addresource] operator[SEP] identifier[monitor] operator[=] identifier[resource] operator[SEP] identifier[monitor] operator[SEP] identifier[addresource] operator[SEP] identifier[td] operator[=] identifier[resource] operator[SEP] identifier[td] operator[SEP] Keyword[return] identifier[addresource] operator[SEP] identifier[add_resource] operator[SEP] identifier[client] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") private static <S extends Storable> ExistsFilter<S> getCanonical(ChainedProperty<S> property, Filter<?> subFilter, boolean not) { return (ExistsFilter<S>) cCanonical.put(new ExistsFilter<S>(property, subFilter, not)); }
class class_name[name] begin[{] method[getCanonical, return_type[type[ExistsFilter]], modifier[private static], parameter[property, subFilter, not]] begin[{] return[Cast(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=property, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=subFilter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=not, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=S, sub_type=None))], dimensions=None, name=ExistsFilter, sub_type=None))], member=put, postfix_operators=[], prefix_operators=[], qualifier=cCanonical, selectors=[], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=S, sub_type=None))], dimensions=[], name=ExistsFilter, sub_type=None))] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[static] operator[<] identifier[S] Keyword[extends] identifier[Storable] operator[>] identifier[ExistsFilter] operator[<] identifier[S] operator[>] identifier[getCanonical] operator[SEP] identifier[ChainedProperty] operator[<] identifier[S] operator[>] identifier[property] , identifier[Filter] operator[<] operator[?] operator[>] identifier[subFilter] , Keyword[boolean] identifier[not] operator[SEP] { Keyword[return] operator[SEP] identifier[ExistsFilter] operator[<] identifier[S] operator[>] operator[SEP] identifier[cCanonical] operator[SEP] identifier[put] operator[SEP] Keyword[new] identifier[ExistsFilter] operator[<] identifier[S] operator[>] operator[SEP] identifier[property] , identifier[subFilter] , identifier[not] operator[SEP] operator[SEP] operator[SEP] }
void internalOpenDialog( final I_CmsEditableData editableData, final boolean isNew, String dependingElementId, String mode, CmsEditHandlerData editHandlerData) { if ((editableData.getStructureId() != null) && !isNew) { m_currentElementId = editableData.getStructureId().toString(); } else { m_currentElementId = null; } m_dependingElementId = dependingElementId; if (m_handler.m_controller.getData().isUseClassicEditor()) { CmsContentEditorDialog.get().openEditDialog(editableData, isNew, mode, new DialogOptions(), this); } else { String newLink = null; if (isNew) { newLink = editableData.getNewLink(); // the new link is URL encoded twice, decode it newLink = URL.decodeQueryString(newLink); newLink = URL.decodeQueryString(newLink); } addEditingHistoryItem(isNew); CmsContentEditor.getInstance().openFormEditor( getEditorContext(), CmsCoreProvider.get().getLocale(), editableData.getStructureId().toString(), null, newLink, null, editableData.getPostCreateHandler(), mode, m_handler.m_controller.getData().getMainLocale(), editHandlerData, new I_CmsSimpleCallback<Boolean>() { public void execute(Boolean hasChangedSettings) { addClosedEditorHistoryItem(); onClose( editableData.getSitePath(), editableData.getStructureId(), isNew, hasChangedSettings.booleanValue()); } }); } }
class class_name[name] begin[{] method[internalOpenDialog, return_type[void], modifier[default], parameter[editableData, isNew, dependingElementId, mode, editHandlerData]] begin[{] if[binary_operation[binary_operation[call[editableData.getStructureId, parameter[]], !=, literal[null]], &&, member[.isNew]]] begin[{] assign[member[.m_currentElementId], call[editableData.getStructureId, parameter[]]] else begin[{] assign[member[.m_currentElementId], literal[null]] end[}] assign[member[.m_dependingElementId], member[.dependingElementId]] if[call[m_handler.m_controller.getData, parameter[]]] begin[{] call[CmsContentEditorDialog.get, parameter[]] else begin[{] local_variable[type[String], newLink] if[member[.isNew]] begin[{] assign[member[.newLink], call[editableData.getNewLink, parameter[]]] assign[member[.newLink], call[URL.decodeQueryString, parameter[member[.newLink]]]] assign[member[.newLink], call[URL.decodeQueryString, parameter[member[.newLink]]]] else begin[{] None end[}] call[.addEditingHistoryItem, parameter[member[.isNew]]] call[CmsContentEditor.getInstance, parameter[]] end[}] end[}] END[}]
Keyword[void] identifier[internalOpenDialog] operator[SEP] Keyword[final] identifier[I_CmsEditableData] identifier[editableData] , Keyword[final] Keyword[boolean] identifier[isNew] , identifier[String] identifier[dependingElementId] , identifier[String] identifier[mode] , identifier[CmsEditHandlerData] identifier[editHandlerData] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[editableData] operator[SEP] identifier[getStructureId] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] operator[&&] operator[!] identifier[isNew] operator[SEP] { identifier[m_currentElementId] operator[=] identifier[editableData] operator[SEP] identifier[getStructureId] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[m_currentElementId] operator[=] Other[null] operator[SEP] } identifier[m_dependingElementId] operator[=] identifier[dependingElementId] operator[SEP] Keyword[if] operator[SEP] identifier[m_handler] operator[SEP] identifier[m_controller] operator[SEP] identifier[getData] operator[SEP] operator[SEP] operator[SEP] identifier[isUseClassicEditor] operator[SEP] operator[SEP] operator[SEP] { identifier[CmsContentEditorDialog] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[openEditDialog] operator[SEP] identifier[editableData] , identifier[isNew] , identifier[mode] , Keyword[new] identifier[DialogOptions] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] operator[SEP] } Keyword[else] { identifier[String] identifier[newLink] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[isNew] operator[SEP] { identifier[newLink] operator[=] identifier[editableData] operator[SEP] identifier[getNewLink] operator[SEP] operator[SEP] operator[SEP] identifier[newLink] operator[=] identifier[URL] operator[SEP] identifier[decodeQueryString] operator[SEP] identifier[newLink] operator[SEP] operator[SEP] identifier[newLink] operator[=] identifier[URL] operator[SEP] identifier[decodeQueryString] operator[SEP] identifier[newLink] operator[SEP] operator[SEP] } identifier[addEditingHistoryItem] operator[SEP] identifier[isNew] operator[SEP] operator[SEP] identifier[CmsContentEditor] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[openFormEditor] operator[SEP] identifier[getEditorContext] operator[SEP] operator[SEP] , identifier[CmsCoreProvider] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[getLocale] operator[SEP] operator[SEP] , identifier[editableData] operator[SEP] identifier[getStructureId] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , Other[null] , identifier[newLink] , Other[null] , identifier[editableData] operator[SEP] identifier[getPostCreateHandler] operator[SEP] operator[SEP] , identifier[mode] , identifier[m_handler] operator[SEP] identifier[m_controller] operator[SEP] identifier[getData] operator[SEP] operator[SEP] operator[SEP] identifier[getMainLocale] operator[SEP] operator[SEP] , identifier[editHandlerData] , Keyword[new] identifier[I_CmsSimpleCallback] operator[<] identifier[Boolean] operator[>] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[execute] operator[SEP] identifier[Boolean] identifier[hasChangedSettings] operator[SEP] { identifier[addClosedEditorHistoryItem] operator[SEP] operator[SEP] operator[SEP] identifier[onClose] operator[SEP] identifier[editableData] operator[SEP] identifier[getSitePath] operator[SEP] operator[SEP] , identifier[editableData] operator[SEP] identifier[getStructureId] operator[SEP] operator[SEP] , identifier[isNew] , identifier[hasChangedSettings] operator[SEP] identifier[booleanValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] } }
protected void blockTag() { int p = bp; try { nextChar(); if (isIdentifierStart(ch)) { String name = readTagName(); TagParser tp = tagParsers.get(name); if (tp == null) { blockContent(); } else { switch (tp.getKind()) { case BLOCK: tp.parse(p); return; case INLINE: return; } } } blockContent(); } catch (ParseException e) { blockContent(); } }
class class_name[name] begin[{] method[blockTag, return_type[void], modifier[protected], parameter[]] begin[{] local_variable[type[int], p] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=nextChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isIdentifierStart, 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=[], member=readTagName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=name)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=tagParsers, selectors=[], type_arguments=None), name=tp)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TagParser, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=tp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=BlockStatement(label=None, statements=[SwitchStatement(cases=[SwitchStatementCase(case=['BLOCK'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parse, postfix_operators=[], prefix_operators=[], qualifier=tp, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=['INLINE'], statements=[ReturnStatement(expression=None, label=None)])], expression=MethodInvocation(arguments=[], member=getKind, postfix_operators=[], prefix_operators=[], qualifier=tp, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=blockContent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))])), StatementExpression(expression=MethodInvocation(arguments=[], member=blockContent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=blockContent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ParseException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[protected] Keyword[void] identifier[blockTag] operator[SEP] operator[SEP] { Keyword[int] identifier[p] operator[=] identifier[bp] operator[SEP] Keyword[try] { identifier[nextChar] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isIdentifierStart] operator[SEP] identifier[ch] operator[SEP] operator[SEP] { identifier[String] identifier[name] operator[=] identifier[readTagName] operator[SEP] operator[SEP] operator[SEP] identifier[TagParser] identifier[tp] operator[=] identifier[tagParsers] operator[SEP] identifier[get] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tp] operator[==] Other[null] operator[SEP] { identifier[blockContent] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[switch] operator[SEP] identifier[tp] operator[SEP] identifier[getKind] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] identifier[BLOCK] operator[:] identifier[tp] operator[SEP] identifier[parse] operator[SEP] identifier[p] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[case] identifier[INLINE] operator[:] Keyword[return] operator[SEP] } } } identifier[blockContent] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ParseException] identifier[e] operator[SEP] { identifier[blockContent] operator[SEP] operator[SEP] operator[SEP] } }
protected String getEntityIdFromRequest(final RequestContext requestContext) { val request = WebUtils.getHttpServletRequestFromExternalWebflowContext(requestContext); return request.getParameter(this.entityIdParameterName); }
class class_name[name] begin[{] method[getEntityIdFromRequest, return_type[type[String]], modifier[protected], parameter[requestContext]] begin[{] local_variable[type[val], request] return[call[request.getParameter, parameter[THIS[member[None.entityIdParameterName]]]]] end[}] END[}]
Keyword[protected] identifier[String] identifier[getEntityIdFromRequest] operator[SEP] Keyword[final] identifier[RequestContext] identifier[requestContext] operator[SEP] { identifier[val] identifier[request] operator[=] identifier[WebUtils] operator[SEP] identifier[getHttpServletRequestFromExternalWebflowContext] operator[SEP] identifier[requestContext] operator[SEP] operator[SEP] Keyword[return] identifier[request] operator[SEP] identifier[getParameter] operator[SEP] Keyword[this] operator[SEP] identifier[entityIdParameterName] operator[SEP] operator[SEP] }
public <T> Map<String, T> nextMap(@NonNull Class<T> valueType) throws IOException { return nextMap(null, valueType); }
class class_name[name] begin[{] method[nextMap, return_type[type[Map]], modifier[public], parameter[valueType]] begin[{] return[call[.nextMap, parameter[literal[null], member[.valueType]]]] end[}] END[}]
Keyword[public] operator[<] identifier[T] operator[>] identifier[Map] operator[<] identifier[String] , identifier[T] operator[>] identifier[nextMap] operator[SEP] annotation[@] identifier[NonNull] identifier[Class] operator[<] identifier[T] operator[>] identifier[valueType] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[return] identifier[nextMap] operator[SEP] Other[null] , identifier[valueType] operator[SEP] operator[SEP] }
public static int registerDiagnosticModule(DiagnosticModule diagnosticModule, String packageName) { if (modules.containsKey(packageName)) { return 1; } try { diagnosticModule.init(); } catch (Throwable th) { // No FFDC code needed - we're reporting the problem to our caller // (Note: the server version doesn't FFDC either...) return 3; } modules.put(packageName, diagnosticModule); return 0; }
class class_name[name] begin[{] method[registerDiagnosticModule, return_type[type[int]], modifier[public static], parameter[diagnosticModule, packageName]] begin[{] if[call[modules.containsKey, parameter[member[.packageName]]]] begin[{] return[literal[1]] else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=init, postfix_operators=[], prefix_operators=[], qualifier=diagnosticModule, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=th, types=['Throwable']))], finally_block=None, label=None, resources=None) call[modules.put, parameter[member[.packageName], member[.diagnosticModule]]] return[literal[0]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[registerDiagnosticModule] operator[SEP] identifier[DiagnosticModule] identifier[diagnosticModule] , identifier[String] identifier[packageName] operator[SEP] { Keyword[if] operator[SEP] identifier[modules] operator[SEP] identifier[containsKey] operator[SEP] identifier[packageName] operator[SEP] operator[SEP] { Keyword[return] Other[1] operator[SEP] } Keyword[try] { identifier[diagnosticModule] operator[SEP] identifier[init] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[th] operator[SEP] { Keyword[return] Other[3] operator[SEP] } identifier[modules] operator[SEP] identifier[put] operator[SEP] identifier[packageName] , identifier[diagnosticModule] operator[SEP] operator[SEP] Keyword[return] Other[0] operator[SEP] }
private static void compress(File source, ZipArchiveOutputStream zipOut, String zipEntryName) throws IOException { String tempZipEntryName = $.notEmpty(zipEntryName) ? zipEntryName : source.getName(); byte[] buff = new byte[512]; int readLen = -1; if (source.isFile()) { // System.out.println("压缩文件:" + source.getAbsolutePath()); ZipArchiveEntry entry = new ZipArchiveEntry(tempZipEntryName); zipOut.putArchiveEntry(entry); BufferedInputStream bis = new BufferedInputStream(new FileInputStream(source)); while ((readLen = bis.read(buff)) != -1) { zipOut.write(buff, 0, readLen); } zipOut.closeArchiveEntry(); IOUtils.closeQuietly(bis); } else if (source.isDirectory()) { // System.out.println("**** 压缩目录:" + source.getAbsolutePath() + ZipArchiveEntry entry = new ZipArchiveEntry(tempZipEntryName.concat(File.separator)); zipOut.putArchiveEntry(entry); zipOut.closeArchiveEntry(); File[] files = source.listFiles(); if ($.notEmpty(files)) { for (File file : files) { compress(file, zipOut, tempZipEntryName + File.separator + file.getName()); } } } }
class class_name[name] begin[{] method[compress, return_type[void], modifier[private static], parameter[source, zipOut, zipEntryName]] begin[{] local_variable[type[String], tempZipEntryName] local_variable[type[byte], buff] local_variable[type[int], readLen] if[call[source.isFile, parameter[]]] begin[{] local_variable[type[ZipArchiveEntry], entry] call[zipOut.putArchiveEntry, parameter[member[.entry]]] local_variable[type[BufferedInputStream], bis] while[binary_operation[assign[member[.readLen], call[bis.read, parameter[member[.buff]]]], !=, literal[1]]] begin[{] call[zipOut.write, parameter[member[.buff], literal[0], member[.readLen]]] end[}] call[zipOut.closeArchiveEntry, parameter[]] call[IOUtils.closeQuietly, parameter[member[.bis]]] else begin[{] if[call[source.isDirectory, parameter[]]] begin[{] local_variable[type[ZipArchiveEntry], entry] call[zipOut.putArchiveEntry, parameter[member[.entry]]] call[zipOut.closeArchiveEntry, parameter[]] local_variable[type[File], files] if[call[$.notEmpty, parameter[member[.files]]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=zipOut, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=tempZipEntryName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=separator, postfix_operators=[], prefix_operators=[], qualifier=File, selectors=[]), operator=+), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[], type_arguments=None), operator=+)], member=compress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=files, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=file)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))), label=None) else begin[{] None end[}] else begin[{] None end[}] end[}] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[compress] operator[SEP] identifier[File] identifier[source] , identifier[ZipArchiveOutputStream] identifier[zipOut] , identifier[String] identifier[zipEntryName] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[tempZipEntryName] operator[=] identifier[$] operator[SEP] identifier[notEmpty] operator[SEP] identifier[zipEntryName] operator[SEP] operator[?] identifier[zipEntryName] operator[:] identifier[source] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[buff] operator[=] Keyword[new] Keyword[byte] operator[SEP] Other[512] operator[SEP] operator[SEP] Keyword[int] identifier[readLen] operator[=] operator[-] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[source] operator[SEP] identifier[isFile] operator[SEP] operator[SEP] operator[SEP] { identifier[ZipArchiveEntry] identifier[entry] operator[=] Keyword[new] identifier[ZipArchiveEntry] operator[SEP] identifier[tempZipEntryName] operator[SEP] operator[SEP] identifier[zipOut] operator[SEP] identifier[putArchiveEntry] operator[SEP] identifier[entry] operator[SEP] operator[SEP] identifier[BufferedInputStream] identifier[bis] operator[=] Keyword[new] identifier[BufferedInputStream] operator[SEP] Keyword[new] identifier[FileInputStream] operator[SEP] identifier[source] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[readLen] operator[=] identifier[bis] operator[SEP] identifier[read] operator[SEP] identifier[buff] operator[SEP] operator[SEP] operator[!=] operator[-] Other[1] operator[SEP] { identifier[zipOut] operator[SEP] identifier[write] operator[SEP] identifier[buff] , Other[0] , identifier[readLen] operator[SEP] operator[SEP] } identifier[zipOut] operator[SEP] identifier[closeArchiveEntry] operator[SEP] operator[SEP] operator[SEP] identifier[IOUtils] operator[SEP] identifier[closeQuietly] operator[SEP] identifier[bis] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[source] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] { identifier[ZipArchiveEntry] identifier[entry] operator[=] Keyword[new] identifier[ZipArchiveEntry] operator[SEP] identifier[tempZipEntryName] operator[SEP] identifier[concat] operator[SEP] identifier[File] operator[SEP] identifier[separator] operator[SEP] operator[SEP] operator[SEP] identifier[zipOut] operator[SEP] identifier[putArchiveEntry] operator[SEP] identifier[entry] operator[SEP] operator[SEP] identifier[zipOut] operator[SEP] identifier[closeArchiveEntry] operator[SEP] operator[SEP] operator[SEP] identifier[File] operator[SEP] operator[SEP] identifier[files] operator[=] identifier[source] operator[SEP] identifier[listFiles] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[$] operator[SEP] identifier[notEmpty] operator[SEP] identifier[files] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[File] identifier[file] operator[:] identifier[files] operator[SEP] { identifier[compress] operator[SEP] identifier[file] , identifier[zipOut] , identifier[tempZipEntryName] operator[+] identifier[File] operator[SEP] identifier[separator] operator[+] identifier[file] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } }
public synchronized EventData getNextEvent(int event_type) throws DevFailed { EventData ev_data = null; for (EventData event : events) if (event.event_type == event_type) ev_data = event; if (ev_data == null) Except.throw_exception("BUFFER_EMPTY", "No " + TangoConst.eventNames[event_type] + " in event queue.", "EventQueue.getNextEvent()"); events.remove(ev_data); return ev_data; }
class class_name[name] begin[{] method[getNextEvent, return_type[type[EventData]], modifier[synchronized public], parameter[event_type]] begin[{] local_variable[type[EventData], ev_data] ForStatement(body=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=event_type, postfix_operators=[], prefix_operators=[], qualifier=event, selectors=[]), operandr=MemberReference(member=event_type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=ev_data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)), control=EnhancedForControl(iterable=MemberReference(member=events, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=event)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=EventData, sub_type=None))), label=None) if[binary_operation[member[.ev_data], ==, literal[null]]] begin[{] call[Except.throw_exception, parameter[literal["BUFFER_EMPTY"], binary_operation[binary_operation[literal["No "], +, member[TangoConst.eventNames]], +, literal[" in event queue."]], literal["EventQueue.getNextEvent()"]]] else begin[{] None end[}] call[events.remove, parameter[member[.ev_data]]] return[member[.ev_data]] end[}] END[}]
Keyword[public] Keyword[synchronized] identifier[EventData] identifier[getNextEvent] operator[SEP] Keyword[int] identifier[event_type] operator[SEP] Keyword[throws] identifier[DevFailed] { identifier[EventData] identifier[ev_data] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[EventData] identifier[event] operator[:] identifier[events] operator[SEP] Keyword[if] operator[SEP] identifier[event] operator[SEP] identifier[event_type] operator[==] identifier[event_type] operator[SEP] identifier[ev_data] operator[=] identifier[event] operator[SEP] Keyword[if] operator[SEP] identifier[ev_data] operator[==] Other[null] operator[SEP] identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , literal[String] operator[+] identifier[TangoConst] operator[SEP] identifier[eventNames] operator[SEP] identifier[event_type] operator[SEP] operator[+] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[events] operator[SEP] identifier[remove] operator[SEP] identifier[ev_data] operator[SEP] operator[SEP] Keyword[return] identifier[ev_data] operator[SEP] }
public INDArray getArrForVarName(@NonNull String varName) { Preconditions.checkState(variables.containsKey(varName), "No variable found with name \"%s\"", varName); SDVariable v = variables.get(varName).getVariable(); switch(v.getVariableType()){ case VARIABLE: if(!variablesArrays.containsKey(varName)) { //VARIBALE type arrays should have a parameter initializer... // we should use this to azy init the array if none is present v.storeAndAllocateNewArray(); } return variablesArrays.get(varName).get(); case CONSTANT: if(!constantArrays.containsKey(varName)) return null; return constantArrays.get(varName).get(); case ARRAY: //Only stored in inference session... InferenceSession s = sessions.get(Thread.currentThread().getId()); if(s == null) return null; return s.get(varName, InferenceSession.OUTER_FRAME, 0, null, false); case PLACEHOLDER: long tid = Thread.currentThread().getId(); if(placeholdersPerThread.get(tid) == null || !placeholdersPerThread.get(tid).containsKey(varName)) return null; return placeholdersPerThread.get(tid).get(varName); default: throw new RuntimeException("Unknown variable type: " + v.getVariableType()); } }
class class_name[name] begin[{] method[getArrForVarName, return_type[type[INDArray]], modifier[public], parameter[varName]] begin[{] call[Preconditions.checkState, parameter[call[variables.containsKey, parameter[member[.varName]]], literal["No variable found with name \"%s\""], member[.varName]]] local_variable[type[SDVariable], v] SwitchStatement(cases=[SwitchStatementCase(case=['VARIABLE'], statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=varName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=['!'], qualifier=variablesArrays, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=storeAndAllocateNewArray, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), label=None)])), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=varName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=variablesArrays, selectors=[MethodInvocation(arguments=[], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), SwitchStatementCase(case=['CONSTANT'], statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=varName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=['!'], qualifier=constantArrays, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=varName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=constantArrays, selectors=[MethodInvocation(arguments=[], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), SwitchStatementCase(case=['ARRAY'], statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=currentThread, postfix_operators=[], prefix_operators=[], qualifier=Thread, selectors=[MethodInvocation(arguments=[], member=getId, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=get, postfix_operators=[], prefix_operators=[], qualifier=sessions, selectors=[], type_arguments=None), name=s)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InferenceSession, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=varName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=OUTER_FRAME, postfix_operators=[], prefix_operators=[], qualifier=InferenceSession, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=get, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=['PLACEHOLDER'], statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=currentThread, postfix_operators=[], prefix_operators=[], qualifier=Thread, selectors=[MethodInvocation(arguments=[], member=getId, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=tid)], modifiers=set(), type=BasicType(dimensions=[], name=long)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=tid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=placeholdersPerThread, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[MemberReference(member=tid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=['!'], qualifier=placeholdersPerThread, selectors=[MethodInvocation(arguments=[MemberReference(member=varName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=tid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=placeholdersPerThread, selectors=[MethodInvocation(arguments=[MemberReference(member=varName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unknown variable type: "), operandr=MethodInvocation(arguments=[], member=getVariableType, postfix_operators=[], prefix_operators=[], qualifier=v, 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=RuntimeException, sub_type=None)), label=None)])], expression=MethodInvocation(arguments=[], member=getVariableType, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), label=None) end[}] END[}]
Keyword[public] identifier[INDArray] identifier[getArrForVarName] operator[SEP] annotation[@] identifier[NonNull] identifier[String] identifier[varName] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkState] operator[SEP] identifier[variables] operator[SEP] identifier[containsKey] operator[SEP] identifier[varName] operator[SEP] , literal[String] , identifier[varName] operator[SEP] operator[SEP] identifier[SDVariable] identifier[v] operator[=] identifier[variables] operator[SEP] identifier[get] operator[SEP] identifier[varName] operator[SEP] operator[SEP] identifier[getVariable] operator[SEP] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[v] operator[SEP] identifier[getVariableType] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] identifier[VARIABLE] operator[:] Keyword[if] operator[SEP] operator[!] identifier[variablesArrays] operator[SEP] identifier[containsKey] operator[SEP] identifier[varName] operator[SEP] operator[SEP] { identifier[v] operator[SEP] identifier[storeAndAllocateNewArray] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[variablesArrays] operator[SEP] identifier[get] operator[SEP] identifier[varName] operator[SEP] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[CONSTANT] operator[:] Keyword[if] operator[SEP] operator[!] identifier[constantArrays] operator[SEP] identifier[containsKey] operator[SEP] identifier[varName] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[return] identifier[constantArrays] operator[SEP] identifier[get] operator[SEP] identifier[varName] operator[SEP] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[ARRAY] operator[:] identifier[InferenceSession] identifier[s] operator[=] identifier[sessions] operator[SEP] identifier[get] operator[SEP] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[s] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[return] identifier[s] operator[SEP] identifier[get] operator[SEP] identifier[varName] , identifier[InferenceSession] operator[SEP] identifier[OUTER_FRAME] , Other[0] , Other[null] , literal[boolean] operator[SEP] operator[SEP] Keyword[case] identifier[PLACEHOLDER] operator[:] Keyword[long] identifier[tid] operator[=] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[placeholdersPerThread] operator[SEP] identifier[get] operator[SEP] identifier[tid] operator[SEP] operator[==] Other[null] operator[||] operator[!] identifier[placeholdersPerThread] operator[SEP] identifier[get] operator[SEP] identifier[tid] operator[SEP] operator[SEP] identifier[containsKey] operator[SEP] identifier[varName] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[return] identifier[placeholdersPerThread] operator[SEP] identifier[get] operator[SEP] identifier[tid] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[varName] operator[SEP] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[+] identifier[v] operator[SEP] identifier[getVariableType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
@SneakyThrows public static String decodeByteArrayToString(final byte[] bytes) { @Cleanup val bais = new ByteArrayInputStream(bytes); @Cleanup val baos = new ByteArrayOutputStream(); val buf = new byte[bytes.length]; try (val iis = new InflaterInputStream(bais)) { var count = iis.read(buf); while (count != -1) { baos.write(buf, 0, count); count = iis.read(buf); } return new String(baos.toByteArray(), StandardCharsets.UTF_8); } catch (final Exception e) { LOGGER.error("Base64 decoding failed", e); return null; } }
class class_name[name] begin[{] method[decodeByteArrayToString, return_type[type[String]], modifier[public static], parameter[bytes]] begin[{] local_variable[type[val], bais] local_variable[type[val], baos] local_variable[type[val], buf] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=buf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=iis, selectors=[], type_arguments=None), name=count)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=var, sub_type=None)), WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=buf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=baos, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=buf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=iis, selectors=[], type_arguments=None)), label=None)]), condition=BinaryOperation(operandl=MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator=!=), label=None), ReturnStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toByteArray, postfix_operators=[], prefix_operators=[], qualifier=baos, selectors=[], type_arguments=None), MemberReference(member=UTF_8, postfix_operators=[], prefix_operators=[], qualifier=StandardCharsets, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Base64 decoding failed"), 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=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=iis, type=ReferenceType(arguments=None, dimensions=[], name=val, sub_type=None), value=ClassCreator(arguments=[MemberReference(member=bais, 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=InflaterInputStream, sub_type=None)))]) end[}] END[}]
annotation[@] identifier[SneakyThrows] Keyword[public] Keyword[static] identifier[String] identifier[decodeByteArrayToString] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] operator[SEP] { annotation[@] identifier[Cleanup] identifier[val] identifier[bais] operator[=] Keyword[new] identifier[ByteArrayInputStream] operator[SEP] identifier[bytes] operator[SEP] operator[SEP] annotation[@] identifier[Cleanup] identifier[val] identifier[baos] operator[=] Keyword[new] identifier[ByteArrayOutputStream] operator[SEP] operator[SEP] operator[SEP] identifier[val] identifier[buf] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[bytes] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[try] operator[SEP] identifier[val] identifier[iis] operator[=] Keyword[new] identifier[InflaterInputStream] operator[SEP] identifier[bais] operator[SEP] operator[SEP] { identifier[var] identifier[count] operator[=] identifier[iis] operator[SEP] identifier[read] operator[SEP] identifier[buf] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[count] operator[!=] operator[-] Other[1] operator[SEP] { identifier[baos] operator[SEP] identifier[write] operator[SEP] identifier[buf] , Other[0] , identifier[count] operator[SEP] operator[SEP] identifier[count] operator[=] identifier[iis] operator[SEP] identifier[read] operator[SEP] identifier[buf] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[String] operator[SEP] identifier[baos] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] , identifier[StandardCharsets] operator[SEP] identifier[UTF_8] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[Exception] 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] } }
private Collection<Class<? extends Saga>> removeAbstractTypes(final Collection<Class<? extends Saga>> foundTypes) { Collection<Class<? extends Saga>> sagaTypes = new ArrayList<>(); for (Class<? extends Saga> entryType : foundTypes) { if (!Modifier.isAbstract(entryType.getModifiers())) { sagaTypes.add(entryType); } } return sagaTypes; }
class class_name[name] begin[{] method[removeAbstractTypes, return_type[type[Collection]], modifier[private], parameter[foundTypes]] begin[{] local_variable[type[Collection], sagaTypes] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getModifiers, postfix_operators=[], prefix_operators=[], qualifier=entryType, selectors=[], type_arguments=None)], member=isAbstract, postfix_operators=[], prefix_operators=['!'], qualifier=Modifier, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=entryType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=sagaTypes, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=foundTypes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entryType)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=extends, type=ReferenceType(arguments=None, dimensions=[], name=Saga, sub_type=None))], dimensions=[], name=Class, sub_type=None))), label=None) return[member[.sagaTypes]] end[}] END[}]
Keyword[private] identifier[Collection] operator[<] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Saga] operator[>] operator[>] identifier[removeAbstractTypes] operator[SEP] Keyword[final] identifier[Collection] operator[<] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Saga] operator[>] operator[>] identifier[foundTypes] operator[SEP] { identifier[Collection] operator[<] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Saga] operator[>] operator[>] identifier[sagaTypes] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Saga] operator[>] identifier[entryType] operator[:] identifier[foundTypes] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[Modifier] operator[SEP] identifier[isAbstract] operator[SEP] identifier[entryType] operator[SEP] identifier[getModifiers] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[sagaTypes] operator[SEP] identifier[add] operator[SEP] identifier[entryType] operator[SEP] operator[SEP] } } Keyword[return] identifier[sagaTypes] operator[SEP] }
public Document read(Reader reader) throws DocumentException, IOException, XmlPullParserException { getXPPParser().setInput(reader); return parseDocument(); }
class class_name[name] begin[{] method[read, return_type[type[Document]], modifier[public], parameter[reader]] begin[{] call[.getXPPParser, parameter[]] return[call[.parseDocument, parameter[]]] end[}] END[}]
Keyword[public] identifier[Document] identifier[read] operator[SEP] identifier[Reader] identifier[reader] operator[SEP] Keyword[throws] identifier[DocumentException] , identifier[IOException] , identifier[XmlPullParserException] { identifier[getXPPParser] operator[SEP] operator[SEP] operator[SEP] identifier[setInput] operator[SEP] identifier[reader] operator[SEP] operator[SEP] Keyword[return] identifier[parseDocument] operator[SEP] operator[SEP] operator[SEP] }
public Observable<ServiceResponse<Page<StorageAccountCredentialInner>>> listByDataBoxEdgeDeviceSinglePageAsync(final String deviceName, final String resourceGroupName) { if (deviceName == null) { throw new IllegalArgumentException("Parameter deviceName is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.listByDataBoxEdgeDevice(deviceName, this.client.subscriptionId(), resourceGroupName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<StorageAccountCredentialInner>>>>() { @Override public Observable<ServiceResponse<Page<StorageAccountCredentialInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<StorageAccountCredentialInner>> result = listByDataBoxEdgeDeviceDelegate(response); return Observable.just(new ServiceResponse<Page<StorageAccountCredentialInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); }
class class_name[name] begin[{] method[listByDataBoxEdgeDeviceSinglePageAsync, return_type[type[Observable]], modifier[public], parameter[deviceName, resourceGroupName]] begin[{] if[binary_operation[member[.deviceName], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter deviceName is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[THIS[member[None.client]call[None.subscriptionId, parameter[]]], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter this.client.subscriptionId() is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.resourceGroupName], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter resourceGroupName is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[THIS[member[None.client]call[None.apiVersion, parameter[]]], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter this.client.apiVersion() is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] return[call[service.listByDataBoxEdgeDevice, parameter[member[.deviceName], THIS[member[None.client]call[None.subscriptionId, parameter[]]], member[.resourceGroupName], THIS[member[None.client]call[None.apiVersion, parameter[]]], THIS[member[None.client]call[None.acceptLanguage, parameter[]]], THIS[member[None.client]call[None.userAgent, parameter[]]]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[StorageAccountCredentialInner] operator[>] operator[>] operator[>] identifier[listByDataBoxEdgeDeviceSinglePageAsync] operator[SEP] Keyword[final] identifier[String] identifier[deviceName] , Keyword[final] identifier[String] identifier[resourceGroupName] operator[SEP] { Keyword[if] operator[SEP] identifier[deviceName] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[subscriptionId] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[resourceGroupName] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[apiVersion] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[service] operator[SEP] identifier[listByDataBoxEdgeDevice] operator[SEP] identifier[deviceName] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[subscriptionId] operator[SEP] operator[SEP] , identifier[resourceGroupName] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[apiVersion] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[acceptLanguage] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[userAgent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[flatMap] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[Response] operator[<] identifier[ResponseBody] operator[>] , identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[StorageAccountCredentialInner] operator[>] operator[>] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[StorageAccountCredentialInner] operator[>] operator[>] operator[>] identifier[call] operator[SEP] identifier[Response] operator[<] identifier[ResponseBody] operator[>] identifier[response] operator[SEP] { Keyword[try] { identifier[ServiceResponse] operator[<] identifier[PageImpl] operator[<] identifier[StorageAccountCredentialInner] operator[>] operator[>] identifier[result] operator[=] identifier[listByDataBoxEdgeDeviceDelegate] operator[SEP] identifier[response] operator[SEP] operator[SEP] Keyword[return] identifier[Observable] operator[SEP] identifier[just] operator[SEP] Keyword[new] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[StorageAccountCredentialInner] operator[>] operator[>] operator[SEP] identifier[result] operator[SEP] identifier[body] operator[SEP] operator[SEP] , identifier[result] operator[SEP] identifier[response] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { Keyword[return] identifier[Observable] operator[SEP] identifier[error] operator[SEP] identifier[t] operator[SEP] operator[SEP] } } } operator[SEP] operator[SEP] }
public static String quoteEscaped(final String str) { if (N.isNullOrEmpty(str)) { return str; } final StringBuilder sb = Objectory.createStringBuilder(); final char[] chars = getCharsForReadOnly(str); try { char ch = 0; for (int i = 0, len = str.length(); i < len; i++) { ch = chars[i]; if ((ch == _BACKSLASH) && (i < (len - 1))) { sb.append(ch); sb.append(str.charAt(++i)); } else if ((ch == _QUOTATION_S) || (ch == _QUOTATION_D)) { sb.append(_BACKSLASH); sb.append(ch); } else { sb.append(ch); } } return sb.toString(); } finally { Objectory.recycle(sb); } }
class class_name[name] begin[{] method[quoteEscaped, return_type[type[String]], modifier[public static], parameter[str]] begin[{] if[call[N.isNullOrEmpty, parameter[member[.str]]]] begin[{] return[member[.str]] else begin[{] None end[}] local_variable[type[StringBuilder], sb] local_variable[type[char], chars] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=ch)], modifiers=set(), type=BasicType(dimensions=[], name=char)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=chars, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=_BACKSLASH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator=<), operator=&&), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=_QUOTATION_S, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=_QUOTATION_D, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=_BACKSLASH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i), VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), name=len)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), ReturnStatement(expression=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sb, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recycle, postfix_operators=[], prefix_operators=[], qualifier=Objectory, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[quoteEscaped] operator[SEP] Keyword[final] identifier[String] identifier[str] operator[SEP] { Keyword[if] operator[SEP] identifier[N] operator[SEP] identifier[isNullOrEmpty] operator[SEP] identifier[str] operator[SEP] operator[SEP] { Keyword[return] identifier[str] operator[SEP] } Keyword[final] identifier[StringBuilder] identifier[sb] operator[=] identifier[Objectory] operator[SEP] identifier[createStringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[char] operator[SEP] operator[SEP] identifier[chars] operator[=] identifier[getCharsForReadOnly] operator[SEP] identifier[str] operator[SEP] operator[SEP] Keyword[try] { Keyword[char] identifier[ch] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] , identifier[len] operator[=] identifier[str] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[<] identifier[len] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[ch] operator[=] identifier[chars] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[ch] operator[==] identifier[_BACKSLASH] operator[SEP] operator[&&] operator[SEP] identifier[i] operator[<] operator[SEP] identifier[len] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[ch] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[str] operator[SEP] identifier[charAt] operator[SEP] operator[++] identifier[i] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[SEP] identifier[ch] operator[==] identifier[_QUOTATION_S] operator[SEP] operator[||] operator[SEP] identifier[ch] operator[==] identifier[_QUOTATION_D] operator[SEP] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[_BACKSLASH] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[ch] operator[SEP] operator[SEP] } Keyword[else] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[ch] operator[SEP] operator[SEP] } } Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { identifier[Objectory] operator[SEP] identifier[recycle] operator[SEP] identifier[sb] operator[SEP] operator[SEP] } }
public Element createOrUpdateElement(Object parent, String name, String type, Style style, boolean generateId) { Element element; // check existence if (name != null) { if (!generateId) { element = Dom.getElementById(name); } else { element = getElement(parent, name); } } else { return null; } if (element == null) { // Element was not found, so create it: element = createElement(parent, name, type, style, generateId); } else { // Element was found, so update it: applyStyle(element, style); } // no luck ! if (element == null) { return null; } return element; }
class class_name[name] begin[{] method[createOrUpdateElement, return_type[type[Element]], modifier[public], parameter[parent, name, type, style, generateId]] begin[{] local_variable[type[Element], element] if[binary_operation[member[.name], !=, literal[null]]] begin[{] if[member[.generateId]] begin[{] assign[member[.element], call[Dom.getElementById, parameter[member[.name]]]] else begin[{] assign[member[.element], call[.getElement, parameter[member[.parent], member[.name]]]] end[}] else begin[{] return[literal[null]] end[}] if[binary_operation[member[.element], ==, literal[null]]] begin[{] assign[member[.element], call[.createElement, parameter[member[.parent], member[.name], member[.type], member[.style], member[.generateId]]]] else begin[{] call[.applyStyle, parameter[member[.element], member[.style]]] end[}] if[binary_operation[member[.element], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] return[member[.element]] end[}] END[}]
Keyword[public] identifier[Element] identifier[createOrUpdateElement] operator[SEP] identifier[Object] identifier[parent] , identifier[String] identifier[name] , identifier[String] identifier[type] , identifier[Style] identifier[style] , Keyword[boolean] identifier[generateId] operator[SEP] { identifier[Element] identifier[element] operator[SEP] Keyword[if] operator[SEP] identifier[name] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[generateId] operator[SEP] { identifier[element] operator[=] identifier[Dom] operator[SEP] identifier[getElementById] operator[SEP] identifier[name] operator[SEP] operator[SEP] } Keyword[else] { identifier[element] operator[=] identifier[getElement] operator[SEP] identifier[parent] , identifier[name] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[return] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[element] operator[==] Other[null] operator[SEP] { identifier[element] operator[=] identifier[createElement] operator[SEP] identifier[parent] , identifier[name] , identifier[type] , identifier[style] , identifier[generateId] operator[SEP] operator[SEP] } Keyword[else] { identifier[applyStyle] operator[SEP] identifier[element] , identifier[style] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[element] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[return] identifier[element] operator[SEP] }
public static KountConfiguration fromJson(JSONObject json) { if (json == null) { json = new JSONObject(); } KountConfiguration kountConfiguration = new KountConfiguration(); kountConfiguration.mKountMerchantId = Json.optString(json, KOUNT_MERCHANT_ID_KEY, ""); return kountConfiguration; }
class class_name[name] begin[{] method[fromJson, return_type[type[KountConfiguration]], modifier[public static], parameter[json]] begin[{] if[binary_operation[member[.json], ==, literal[null]]] begin[{] assign[member[.json], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JSONObject, sub_type=None))] else begin[{] None end[}] local_variable[type[KountConfiguration], kountConfiguration] assign[member[kountConfiguration.mKountMerchantId], call[Json.optString, parameter[member[.json], member[.KOUNT_MERCHANT_ID_KEY], literal[""]]]] return[member[.kountConfiguration]] end[}] END[}]
Keyword[public] Keyword[static] identifier[KountConfiguration] identifier[fromJson] operator[SEP] identifier[JSONObject] identifier[json] operator[SEP] { Keyword[if] operator[SEP] identifier[json] operator[==] Other[null] operator[SEP] { identifier[json] operator[=] Keyword[new] identifier[JSONObject] operator[SEP] operator[SEP] operator[SEP] } identifier[KountConfiguration] identifier[kountConfiguration] operator[=] Keyword[new] identifier[KountConfiguration] operator[SEP] operator[SEP] operator[SEP] identifier[kountConfiguration] operator[SEP] identifier[mKountMerchantId] operator[=] identifier[Json] operator[SEP] identifier[optString] operator[SEP] identifier[json] , identifier[KOUNT_MERCHANT_ID_KEY] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[kountConfiguration] operator[SEP] }
protected JavaCC newJavaCC () { final JavaCC javacc = new JavaCC (); javacc.setLog (getLog ()); javacc.setGrammarEncoding (this.grammarEncoding); javacc.setOutputEncoding (this.outputEncoding); javacc.setJdkVersion (this.jdkVersion); javacc.setBuildParser (this.buildParser); javacc.setBuildTokenManager (this.buildTokenManager); javacc.setCacheTokens (this.cacheTokens); javacc.setChoiceAmbiguityCheck (this.choiceAmbiguityCheck); javacc.setCommonTokenAction (this.commonTokenAction); javacc.setDebugLookAhead (this.debugLookAhead); javacc.setDebugParser (this.debugParser); javacc.setDebugTokenManager (this.debugTokenManager); javacc.setErrorReporting (this.errorReporting); javacc.setForceLaCheck (this.forceLaCheck); javacc.setIgnoreCase (this.ignoreCase); javacc.setJavaUnicodeEscape (this.javaUnicodeEscape); javacc.setKeepLineColumn (this.keepLineColumn); javacc.setLookAhead (this.lookAhead); javacc.setOtherAmbiguityCheck (this.otherAmbiguityCheck); javacc.setSanityCheck (this.sanityCheck); javacc.setTokenManagerUsesParser (this.tokenManagerUsesParser); javacc.setTokenExtends (this.tokenExtends); javacc.setTokenFactory (this.tokenFactory); javacc.setUnicodeInput (this.unicodeInput); javacc.setUserCharStream (this.userCharStream); javacc.setUserTokenManager (this.userTokenManager); javacc.setSupportClassVisibilityPublic (this.supportClassVisibilityPublic); javacc.setJavaTemplateType (this.javaTemplateType); return javacc; }
class class_name[name] begin[{] method[newJavaCC, return_type[type[JavaCC]], modifier[protected], parameter[]] begin[{] local_variable[type[JavaCC], javacc] call[javacc.setLog, parameter[call[.getLog, parameter[]]]] call[javacc.setGrammarEncoding, parameter[THIS[member[None.grammarEncoding]]]] call[javacc.setOutputEncoding, parameter[THIS[member[None.outputEncoding]]]] call[javacc.setJdkVersion, parameter[THIS[member[None.jdkVersion]]]] call[javacc.setBuildParser, parameter[THIS[member[None.buildParser]]]] call[javacc.setBuildTokenManager, parameter[THIS[member[None.buildTokenManager]]]] call[javacc.setCacheTokens, parameter[THIS[member[None.cacheTokens]]]] call[javacc.setChoiceAmbiguityCheck, parameter[THIS[member[None.choiceAmbiguityCheck]]]] call[javacc.setCommonTokenAction, parameter[THIS[member[None.commonTokenAction]]]] call[javacc.setDebugLookAhead, parameter[THIS[member[None.debugLookAhead]]]] call[javacc.setDebugParser, parameter[THIS[member[None.debugParser]]]] call[javacc.setDebugTokenManager, parameter[THIS[member[None.debugTokenManager]]]] call[javacc.setErrorReporting, parameter[THIS[member[None.errorReporting]]]] call[javacc.setForceLaCheck, parameter[THIS[member[None.forceLaCheck]]]] call[javacc.setIgnoreCase, parameter[THIS[member[None.ignoreCase]]]] call[javacc.setJavaUnicodeEscape, parameter[THIS[member[None.javaUnicodeEscape]]]] call[javacc.setKeepLineColumn, parameter[THIS[member[None.keepLineColumn]]]] call[javacc.setLookAhead, parameter[THIS[member[None.lookAhead]]]] call[javacc.setOtherAmbiguityCheck, parameter[THIS[member[None.otherAmbiguityCheck]]]] call[javacc.setSanityCheck, parameter[THIS[member[None.sanityCheck]]]] call[javacc.setTokenManagerUsesParser, parameter[THIS[member[None.tokenManagerUsesParser]]]] call[javacc.setTokenExtends, parameter[THIS[member[None.tokenExtends]]]] call[javacc.setTokenFactory, parameter[THIS[member[None.tokenFactory]]]] call[javacc.setUnicodeInput, parameter[THIS[member[None.unicodeInput]]]] call[javacc.setUserCharStream, parameter[THIS[member[None.userCharStream]]]] call[javacc.setUserTokenManager, parameter[THIS[member[None.userTokenManager]]]] call[javacc.setSupportClassVisibilityPublic, parameter[THIS[member[None.supportClassVisibilityPublic]]]] call[javacc.setJavaTemplateType, parameter[THIS[member[None.javaTemplateType]]]] return[member[.javacc]] end[}] END[}]
Keyword[protected] identifier[JavaCC] identifier[newJavaCC] operator[SEP] operator[SEP] { Keyword[final] identifier[JavaCC] identifier[javacc] operator[=] Keyword[new] identifier[JavaCC] operator[SEP] operator[SEP] operator[SEP] identifier[javacc] operator[SEP] identifier[setLog] operator[SEP] identifier[getLog] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[javacc] operator[SEP] identifier[setGrammarEncoding] operator[SEP] Keyword[this] operator[SEP] identifier[grammarEncoding] operator[SEP] operator[SEP] identifier[javacc] operator[SEP] identifier[setOutputEncoding] operator[SEP] Keyword[this] operator[SEP] identifier[outputEncoding] operator[SEP] operator[SEP] identifier[javacc] operator[SEP] identifier[setJdkVersion] operator[SEP] Keyword[this] operator[SEP] identifier[jdkVersion] operator[SEP] operator[SEP] identifier[javacc] operator[SEP] identifier[setBuildParser] operator[SEP] Keyword[this] operator[SEP] identifier[buildParser] operator[SEP] operator[SEP] identifier[javacc] operator[SEP] identifier[setBuildTokenManager] operator[SEP] Keyword[this] operator[SEP] identifier[buildTokenManager] operator[SEP] operator[SEP] identifier[javacc] operator[SEP] identifier[setCacheTokens] operator[SEP] Keyword[this] operator[SEP] identifier[cacheTokens] operator[SEP] operator[SEP] identifier[javacc] operator[SEP] identifier[setChoiceAmbiguityCheck] operator[SEP] Keyword[this] operator[SEP] identifier[choiceAmbiguityCheck] operator[SEP] operator[SEP] identifier[javacc] operator[SEP] identifier[setCommonTokenAction] operator[SEP] Keyword[this] operator[SEP] identifier[commonTokenAction] operator[SEP] operator[SEP] identifier[javacc] operator[SEP] identifier[setDebugLookAhead] operator[SEP] Keyword[this] operator[SEP] identifier[debugLookAhead] operator[SEP] operator[SEP] identifier[javacc] operator[SEP] identifier[setDebugParser] operator[SEP] Keyword[this] operator[SEP] identifier[debugParser] operator[SEP] operator[SEP] identifier[javacc] operator[SEP] identifier[setDebugTokenManager] operator[SEP] Keyword[this] operator[SEP] identifier[debugTokenManager] operator[SEP] operator[SEP] identifier[javacc] operator[SEP] identifier[setErrorReporting] operator[SEP] Keyword[this] operator[SEP] identifier[errorReporting] operator[SEP] operator[SEP] identifier[javacc] operator[SEP] identifier[setForceLaCheck] operator[SEP] Keyword[this] operator[SEP] identifier[forceLaCheck] operator[SEP] operator[SEP] identifier[javacc] operator[SEP] identifier[setIgnoreCase] operator[SEP] Keyword[this] operator[SEP] identifier[ignoreCase] operator[SEP] operator[SEP] identifier[javacc] operator[SEP] identifier[setJavaUnicodeEscape] operator[SEP] Keyword[this] operator[SEP] identifier[javaUnicodeEscape] operator[SEP] operator[SEP] identifier[javacc] operator[SEP] identifier[setKeepLineColumn] operator[SEP] Keyword[this] operator[SEP] identifier[keepLineColumn] operator[SEP] operator[SEP] identifier[javacc] operator[SEP] identifier[setLookAhead] operator[SEP] Keyword[this] operator[SEP] identifier[lookAhead] operator[SEP] operator[SEP] identifier[javacc] operator[SEP] identifier[setOtherAmbiguityCheck] operator[SEP] Keyword[this] operator[SEP] identifier[otherAmbiguityCheck] operator[SEP] operator[SEP] identifier[javacc] operator[SEP] identifier[setSanityCheck] operator[SEP] Keyword[this] operator[SEP] identifier[sanityCheck] operator[SEP] operator[SEP] identifier[javacc] operator[SEP] identifier[setTokenManagerUsesParser] operator[SEP] Keyword[this] operator[SEP] identifier[tokenManagerUsesParser] operator[SEP] operator[SEP] identifier[javacc] operator[SEP] identifier[setTokenExtends] operator[SEP] Keyword[this] operator[SEP] identifier[tokenExtends] operator[SEP] operator[SEP] identifier[javacc] operator[SEP] identifier[setTokenFactory] operator[SEP] Keyword[this] operator[SEP] identifier[tokenFactory] operator[SEP] operator[SEP] identifier[javacc] operator[SEP] identifier[setUnicodeInput] operator[SEP] Keyword[this] operator[SEP] identifier[unicodeInput] operator[SEP] operator[SEP] identifier[javacc] operator[SEP] identifier[setUserCharStream] operator[SEP] Keyword[this] operator[SEP] identifier[userCharStream] operator[SEP] operator[SEP] identifier[javacc] operator[SEP] identifier[setUserTokenManager] operator[SEP] Keyword[this] operator[SEP] identifier[userTokenManager] operator[SEP] operator[SEP] identifier[javacc] operator[SEP] identifier[setSupportClassVisibilityPublic] operator[SEP] Keyword[this] operator[SEP] identifier[supportClassVisibilityPublic] operator[SEP] operator[SEP] identifier[javacc] operator[SEP] identifier[setJavaTemplateType] operator[SEP] Keyword[this] operator[SEP] identifier[javaTemplateType] operator[SEP] operator[SEP] Keyword[return] identifier[javacc] operator[SEP] }
public List<Rulebases.Rulebase> getRulebase() { if (rulebase == null) { rulebase = new ArrayList<Rulebases.Rulebase>(); } return this.rulebase; }
class class_name[name] begin[{] method[getRulebase, return_type[type[List]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.rulebase], ==, literal[null]]] begin[{] assign[member[.rulebase], 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=Rulebases, sub_type=ReferenceType(arguments=None, dimensions=None, name=Rulebase, sub_type=None)))], dimensions=None, name=ArrayList, sub_type=None))] else begin[{] None end[}] return[THIS[member[None.rulebase]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[Rulebases] operator[SEP] identifier[Rulebase] operator[>] identifier[getRulebase] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[rulebase] operator[==] Other[null] operator[SEP] { identifier[rulebase] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Rulebases] operator[SEP] identifier[Rulebase] operator[>] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] identifier[rulebase] operator[SEP] }
public ServiceFuture<SourceUploadDefinitionInner> getBuildSourceUploadUrlAsync(String resourceGroupName, String registryName, final ServiceCallback<SourceUploadDefinitionInner> serviceCallback) { return ServiceFuture.fromResponse(getBuildSourceUploadUrlWithServiceResponseAsync(resourceGroupName, registryName), serviceCallback); }
class class_name[name] begin[{] method[getBuildSourceUploadUrlAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, registryName, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.getBuildSourceUploadUrlWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.registryName]]], member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[SourceUploadDefinitionInner] operator[>] identifier[getBuildSourceUploadUrlAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[registryName] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[SourceUploadDefinitionInner] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromResponse] operator[SEP] identifier[getBuildSourceUploadUrlWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[registryName] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP] }
public Observable<Page<DetectorResponseInner>> listSiteDetectorResponsesNextAsync(final String nextPageLink) { return listSiteDetectorResponsesNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<DetectorResponseInner>>, Page<DetectorResponseInner>>() { @Override public Page<DetectorResponseInner> call(ServiceResponse<Page<DetectorResponseInner>> response) { return response.body(); } }); }
class class_name[name] begin[{] method[listSiteDetectorResponsesNextAsync, return_type[type[Observable]], modifier[public], parameter[nextPageLink]] begin[{] return[call[.listSiteDetectorResponsesNextWithServiceResponseAsync, parameter[member[.nextPageLink]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[DetectorResponseInner] operator[>] operator[>] identifier[listSiteDetectorResponsesNextAsync] operator[SEP] Keyword[final] identifier[String] identifier[nextPageLink] operator[SEP] { Keyword[return] identifier[listSiteDetectorResponsesNextWithServiceResponseAsync] operator[SEP] identifier[nextPageLink] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[DetectorResponseInner] operator[>] operator[>] , identifier[Page] operator[<] identifier[DetectorResponseInner] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Page] operator[<] identifier[DetectorResponseInner] operator[>] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[DetectorResponseInner] operator[>] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
private List<CmsResource> readChangedResourcesInsideProject( CmsDbContext dbc, CmsUUID projectId, CmsReadChangedProjectResourceMode mode) throws CmsException { String cacheKey = projectId + "_" + mode.toString(); List<CmsResource> result = m_monitor.getCachedProjectResources(cacheKey); if (result != null) { return result; } List<String> projectResources = readProjectResources(dbc, readProject(dbc, projectId)); result = new ArrayList<CmsResource>(); String currentProjectResource = null; List<CmsResource> resources = new ArrayList<CmsResource>(); CmsResource currentResource = null; CmsLock currentLock = null; for (int i = 0; i < projectResources.size(); i++) { // read all resources that are inside the project by visiting each project resource currentProjectResource = projectResources.get(i); try { currentResource = readResource(dbc, currentProjectResource, CmsResourceFilter.ALL); if (currentResource.isFolder()) { resources.addAll(readResources(dbc, currentResource, CmsResourceFilter.ALL, true)); } else { resources.add(currentResource); } } catch (CmsException e) { // the project resource probably doesn't exist (anymore)... if (!(e instanceof CmsVfsResourceNotFoundException)) { throw e; } } } for (int j = 0; j < resources.size(); j++) { currentResource = resources.get(j); currentLock = getLock(dbc, currentResource).getEditionLock(); if (!currentResource.getState().isUnchanged()) { if ((currentLock.isNullLock() && (currentResource.getProjectLastModified().equals(projectId))) || (currentLock.isOwnedBy(dbc.currentUser()) && (currentLock.getProjectId().equals(projectId)))) { // add only resources that are // - inside the project, // - changed in the project, // - either unlocked, or locked for the current user in the project if ((mode == RCPRM_FILES_AND_FOLDERS_MODE) || (currentResource.isFolder() && (mode == RCPRM_FOLDERS_ONLY_MODE)) || (currentResource.isFile() && (mode == RCPRM_FILES_ONLY_MODE))) { result.add(currentResource); } } } } resources.clear(); resources = null; m_monitor.cacheProjectResources(cacheKey, result); return result; }
class class_name[name] begin[{] method[readChangedResourcesInsideProject, return_type[type[List]], modifier[private], parameter[dbc, projectId, mode]] begin[{] local_variable[type[String], cacheKey] local_variable[type[List], result] if[binary_operation[member[.result], !=, literal[null]]] begin[{] return[member[.result]] else begin[{] None end[}] local_variable[type[List], projectResources] assign[member[.result], 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=CmsResource, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))] local_variable[type[String], currentProjectResource] local_variable[type[List], resources] local_variable[type[CmsResource], currentResource] local_variable[type[CmsLock], currentLock] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=currentProjectResource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=projectResources, selectors=[], type_arguments=None)), label=None), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=currentResource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=dbc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=currentProjectResource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ALL, postfix_operators=[], prefix_operators=[], qualifier=CmsResourceFilter, selectors=[])], member=readResource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isFolder, postfix_operators=[], prefix_operators=[], qualifier=currentResource, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=currentResource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=resources, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=dbc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=currentResource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ALL, postfix_operators=[], prefix_operators=[], qualifier=CmsResourceFilter, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=readResources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=resources, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=CmsVfsResourceNotFoundException, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['CmsException']))], finally_block=None, label=None, resources=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=projectResources, 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) ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=currentResource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=resources, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=currentLock, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=dbc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=currentResource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getLock, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getEditionLock, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=getState, postfix_operators=[], prefix_operators=['!'], qualifier=currentResource, selectors=[MethodInvocation(arguments=[], member=isUnchanged, 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=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isNullLock, postfix_operators=[], prefix_operators=[], qualifier=currentLock, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getProjectLastModified, postfix_operators=[], prefix_operators=[], qualifier=currentResource, selectors=[], type_arguments=None), operator=&&), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=currentUser, postfix_operators=[], prefix_operators=[], qualifier=dbc, selectors=[], type_arguments=None)], member=isOwnedBy, postfix_operators=[], prefix_operators=[], qualifier=currentLock, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getProjectId, postfix_operators=[], prefix_operators=[], qualifier=currentLock, selectors=[], type_arguments=None), operator=&&), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=mode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=RCPRM_FILES_AND_FOLDERS_MODE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isFolder, postfix_operators=[], prefix_operators=[], qualifier=currentResource, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=MemberReference(member=mode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=RCPRM_FOLDERS_ONLY_MODE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=&&), operator=||), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isFile, postfix_operators=[], prefix_operators=[], qualifier=currentResource, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=MemberReference(member=mode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=RCPRM_FILES_ONLY_MODE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=&&), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=currentResource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), 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=resources, 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) call[resources.clear, parameter[]] assign[member[.resources], literal[null]] call[m_monitor.cacheProjectResources, parameter[member[.cacheKey], member[.result]]] return[member[.result]] end[}] END[}]
Keyword[private] identifier[List] operator[<] identifier[CmsResource] operator[>] identifier[readChangedResourcesInsideProject] operator[SEP] identifier[CmsDbContext] identifier[dbc] , identifier[CmsUUID] identifier[projectId] , identifier[CmsReadChangedProjectResourceMode] identifier[mode] operator[SEP] Keyword[throws] identifier[CmsException] { identifier[String] identifier[cacheKey] operator[=] identifier[projectId] operator[+] literal[String] operator[+] identifier[mode] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[CmsResource] operator[>] identifier[result] operator[=] identifier[m_monitor] operator[SEP] identifier[getCachedProjectResources] operator[SEP] identifier[cacheKey] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[result] operator[SEP] } identifier[List] operator[<] identifier[String] operator[>] identifier[projectResources] operator[=] identifier[readProjectResources] operator[SEP] identifier[dbc] , identifier[readProject] operator[SEP] identifier[dbc] , identifier[projectId] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[CmsResource] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[currentProjectResource] operator[=] Other[null] operator[SEP] identifier[List] operator[<] identifier[CmsResource] operator[>] identifier[resources] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[CmsResource] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[CmsResource] identifier[currentResource] operator[=] Other[null] operator[SEP] identifier[CmsLock] identifier[currentLock] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[projectResources] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[currentProjectResource] operator[=] identifier[projectResources] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[try] { identifier[currentResource] operator[=] identifier[readResource] operator[SEP] identifier[dbc] , identifier[currentProjectResource] , identifier[CmsResourceFilter] operator[SEP] identifier[ALL] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[currentResource] operator[SEP] identifier[isFolder] operator[SEP] operator[SEP] operator[SEP] { identifier[resources] operator[SEP] identifier[addAll] operator[SEP] identifier[readResources] operator[SEP] identifier[dbc] , identifier[currentResource] , identifier[CmsResourceFilter] operator[SEP] identifier[ALL] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[resources] operator[SEP] identifier[add] operator[SEP] identifier[currentResource] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[CmsException] identifier[e] operator[SEP] { Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[e] Keyword[instanceof] identifier[CmsVfsResourceNotFoundException] operator[SEP] operator[SEP] { Keyword[throw] identifier[e] operator[SEP] } } } Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[resources] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[currentResource] operator[=] identifier[resources] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[currentLock] operator[=] identifier[getLock] operator[SEP] identifier[dbc] , identifier[currentResource] operator[SEP] operator[SEP] identifier[getEditionLock] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[currentResource] operator[SEP] identifier[getState] operator[SEP] operator[SEP] operator[SEP] identifier[isUnchanged] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[currentLock] operator[SEP] identifier[isNullLock] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[currentResource] operator[SEP] identifier[getProjectLastModified] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[projectId] operator[SEP] operator[SEP] operator[SEP] operator[||] operator[SEP] identifier[currentLock] operator[SEP] identifier[isOwnedBy] operator[SEP] identifier[dbc] operator[SEP] identifier[currentUser] operator[SEP] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[currentLock] operator[SEP] identifier[getProjectId] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[projectId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[mode] operator[==] identifier[RCPRM_FILES_AND_FOLDERS_MODE] operator[SEP] operator[||] operator[SEP] identifier[currentResource] operator[SEP] identifier[isFolder] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[mode] operator[==] identifier[RCPRM_FOLDERS_ONLY_MODE] operator[SEP] operator[SEP] operator[||] operator[SEP] identifier[currentResource] operator[SEP] identifier[isFile] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[mode] operator[==] identifier[RCPRM_FILES_ONLY_MODE] operator[SEP] operator[SEP] operator[SEP] { identifier[result] operator[SEP] identifier[add] operator[SEP] identifier[currentResource] operator[SEP] operator[SEP] } } } } identifier[resources] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[resources] operator[=] Other[null] operator[SEP] identifier[m_monitor] operator[SEP] identifier[cacheProjectResources] operator[SEP] identifier[cacheKey] , identifier[result] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
public static void cursorStringToContentValues(Cursor cursor, String field, ContentValues values, String key) { values.put(key, cursor.getString(cursor.getColumnIndexOrThrow(field))); }
class class_name[name] begin[{] method[cursorStringToContentValues, return_type[void], modifier[public static], parameter[cursor, field, values, key]] begin[{] call[values.put, parameter[member[.key], call[cursor.getString, parameter[call[cursor.getColumnIndexOrThrow, parameter[member[.field]]]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[cursorStringToContentValues] operator[SEP] identifier[Cursor] identifier[cursor] , identifier[String] identifier[field] , identifier[ContentValues] identifier[values] , identifier[String] identifier[key] operator[SEP] { identifier[values] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[cursor] operator[SEP] identifier[getString] operator[SEP] identifier[cursor] operator[SEP] identifier[getColumnIndexOrThrow] operator[SEP] identifier[field] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static String getConfPath() { String classpath = CommonUtils.class.getResource("/").getPath(); String confPath = classpath + "../conf/"; if (new File(confPath).exists()) { return confPath; } else { return classpath; } }
class class_name[name] begin[{] method[getConfPath, return_type[type[String]], modifier[public static], parameter[]] begin[{] local_variable[type[String], classpath] local_variable[type[String], confPath] if[ClassCreator(arguments=[MemberReference(member=confPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=exists, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))] begin[{] return[member[.confPath]] else begin[{] return[member[.classpath]] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getConfPath] operator[SEP] operator[SEP] { identifier[String] identifier[classpath] operator[=] identifier[CommonUtils] operator[SEP] Keyword[class] operator[SEP] identifier[getResource] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[confPath] operator[=] identifier[classpath] operator[+] literal[String] operator[SEP] Keyword[if] operator[SEP] Keyword[new] identifier[File] operator[SEP] identifier[confPath] operator[SEP] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[confPath] operator[SEP] } Keyword[else] { Keyword[return] identifier[classpath] operator[SEP] } }
public static ClassLoader getClassLoaderOfObject(Object o) { if (o == null) { throw new NullPointerException("Argument cannot be null"); } return getClassLoaderOfClass(o.getClass()); }
class class_name[name] begin[{] method[getClassLoaderOfObject, return_type[type[ClassLoader]], modifier[public static], parameter[o]] begin[{] if[binary_operation[member[.o], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Argument cannot 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[}] return[call[.getClassLoaderOfClass, parameter[call[o.getClass, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ClassLoader] identifier[getClassLoaderOfObject] operator[SEP] identifier[Object] identifier[o] operator[SEP] { Keyword[if] operator[SEP] identifier[o] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[getClassLoaderOfClass] operator[SEP] identifier[o] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public Classification nameOf(String classificationName, String name) { return findClassificationMeta((String) classificationName, () -> { return "nameOf('" + classificationName + "', '" + name + "')"; }).nameOf(name); }
class class_name[name] begin[{] method[nameOf, return_type[type[Classification]], modifier[public], parameter[classificationName, name]] begin[{] return[call[.findClassificationMeta, parameter[Cast(expression=MemberReference(member=classificationName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LambdaExpression(body=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="nameOf('"), operandr=MemberReference(member=classificationName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="', '"), operator=+), operandr=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="')"), operator=+), label=None)], parameters=[])]]] end[}] END[}]
Keyword[public] identifier[Classification] identifier[nameOf] operator[SEP] identifier[String] identifier[classificationName] , identifier[String] identifier[name] operator[SEP] { Keyword[return] identifier[findClassificationMeta] operator[SEP] operator[SEP] identifier[String] operator[SEP] identifier[classificationName] , operator[SEP] operator[SEP] operator[->] { Keyword[return] literal[String] operator[+] identifier[classificationName] operator[+] literal[String] operator[+] identifier[name] operator[+] literal[String] operator[SEP] } operator[SEP] operator[SEP] identifier[nameOf] operator[SEP] identifier[name] operator[SEP] operator[SEP] }
static TypeVariableName get( TypeVariable mirror, Map<TypeParameterElement, TypeVariableName> typeVariables) { TypeParameterElement element = (TypeParameterElement) mirror.asElement(); TypeVariableName typeVariableName = typeVariables.get(element); if (typeVariableName == null) { // Since the bounds field is public, we need to make it an unmodifiableList. But we control // the List that that wraps, which means we can change it before returning. List<TypeName> bounds = new ArrayList<>(); List<TypeName> visibleBounds = Collections.unmodifiableList(bounds); typeVariableName = new TypeVariableName(element.getSimpleName().toString(), visibleBounds); typeVariables.put(element, typeVariableName); for (TypeMirror typeMirror : element.getBounds()) { bounds.add(TypeName.get(typeMirror, typeVariables)); } bounds.remove(OBJECT); } return typeVariableName; }
class class_name[name] begin[{] method[get, return_type[type[TypeVariableName]], modifier[static], parameter[mirror, typeVariables]] begin[{] local_variable[type[TypeParameterElement], element] local_variable[type[TypeVariableName], typeVariableName] if[binary_operation[member[.typeVariableName], ==, literal[null]]] begin[{] local_variable[type[List], bounds] local_variable[type[List], visibleBounds] assign[member[.typeVariableName], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=[], prefix_operators=[], qualifier=element, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=visibleBounds, 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=TypeVariableName, sub_type=None))] call[typeVariables.put, parameter[member[.element], member[.typeVariableName]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=typeMirror, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=typeVariables, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=TypeName, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=bounds, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getBounds, postfix_operators=[], prefix_operators=[], qualifier=element, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=typeMirror)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TypeMirror, sub_type=None))), label=None) call[bounds.remove, parameter[member[.OBJECT]]] else begin[{] None end[}] return[member[.typeVariableName]] end[}] END[}]
Keyword[static] identifier[TypeVariableName] identifier[get] operator[SEP] identifier[TypeVariable] identifier[mirror] , identifier[Map] operator[<] identifier[TypeParameterElement] , identifier[TypeVariableName] operator[>] identifier[typeVariables] operator[SEP] { identifier[TypeParameterElement] identifier[element] operator[=] operator[SEP] identifier[TypeParameterElement] operator[SEP] identifier[mirror] operator[SEP] identifier[asElement] operator[SEP] operator[SEP] operator[SEP] identifier[TypeVariableName] identifier[typeVariableName] operator[=] identifier[typeVariables] operator[SEP] identifier[get] operator[SEP] identifier[element] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[typeVariableName] operator[==] Other[null] operator[SEP] { identifier[List] operator[<] identifier[TypeName] operator[>] identifier[bounds] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[TypeName] operator[>] identifier[visibleBounds] operator[=] identifier[Collections] operator[SEP] identifier[unmodifiableList] operator[SEP] identifier[bounds] operator[SEP] operator[SEP] identifier[typeVariableName] operator[=] Keyword[new] identifier[TypeVariableName] operator[SEP] identifier[element] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[visibleBounds] operator[SEP] operator[SEP] identifier[typeVariables] operator[SEP] identifier[put] operator[SEP] identifier[element] , identifier[typeVariableName] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[TypeMirror] identifier[typeMirror] operator[:] identifier[element] operator[SEP] identifier[getBounds] operator[SEP] operator[SEP] operator[SEP] { identifier[bounds] operator[SEP] identifier[add] operator[SEP] identifier[TypeName] operator[SEP] identifier[get] operator[SEP] identifier[typeMirror] , identifier[typeVariables] operator[SEP] operator[SEP] operator[SEP] } identifier[bounds] operator[SEP] identifier[remove] operator[SEP] identifier[OBJECT] operator[SEP] operator[SEP] } Keyword[return] identifier[typeVariableName] operator[SEP] }
@Nullable public static ThreadFactory unwrap(@Nullable ThreadFactory threadFactory) { if (!isDisableInheritableThreadFactory(threadFactory)) return threadFactory; return ((DisableInheritableThreadFactory) threadFactory).unwrap(); }
class class_name[name] begin[{] method[unwrap, return_type[type[ThreadFactory]], modifier[public static], parameter[threadFactory]] begin[{] if[call[.isDisableInheritableThreadFactory, parameter[member[.threadFactory]]]] begin[{] return[member[.threadFactory]] else begin[{] None end[}] return[Cast(expression=MemberReference(member=threadFactory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=DisableInheritableThreadFactory, sub_type=None))] end[}] END[}]
annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[ThreadFactory] identifier[unwrap] operator[SEP] annotation[@] identifier[Nullable] identifier[ThreadFactory] identifier[threadFactory] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[isDisableInheritableThreadFactory] operator[SEP] identifier[threadFactory] operator[SEP] operator[SEP] Keyword[return] identifier[threadFactory] operator[SEP] Keyword[return] operator[SEP] operator[SEP] identifier[DisableInheritableThreadFactory] operator[SEP] identifier[threadFactory] operator[SEP] operator[SEP] identifier[unwrap] operator[SEP] operator[SEP] operator[SEP] }
public static void endAccessContext() { AccessContext.clearAccessContextOnThread(); final AccessContext accessContext = SuspendedAccessContext.getAccessContextOnThread(); if (accessContext != null) { // resume AccessContext.setAccessContextOnThread(accessContext); SuspendedAccessContext.clearAccessContextOnThread(); } }
class class_name[name] begin[{] method[endAccessContext, return_type[void], modifier[public static], parameter[]] begin[{] call[AccessContext.clearAccessContextOnThread, parameter[]] local_variable[type[AccessContext], accessContext] if[binary_operation[member[.accessContext], !=, literal[null]]] begin[{] call[AccessContext.setAccessContextOnThread, parameter[member[.accessContext]]] call[SuspendedAccessContext.clearAccessContextOnThread, parameter[]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[endAccessContext] operator[SEP] operator[SEP] { identifier[AccessContext] operator[SEP] identifier[clearAccessContextOnThread] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[AccessContext] identifier[accessContext] operator[=] identifier[SuspendedAccessContext] operator[SEP] identifier[getAccessContextOnThread] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[accessContext] operator[!=] Other[null] operator[SEP] { identifier[AccessContext] operator[SEP] identifier[setAccessContextOnThread] operator[SEP] identifier[accessContext] operator[SEP] operator[SEP] identifier[SuspendedAccessContext] operator[SEP] identifier[clearAccessContextOnThread] operator[SEP] operator[SEP] operator[SEP] } }
public void removeAllConversations(Object connectionReference) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "removeAllConversations", connectionReference); final ArrayList list; synchronized (activeConversations) { list = (ArrayList) activeConversations.remove(connectionReference); } // Remove the connection reference from the list if (list != null) { try { for (int x = 0; x < list.size(); x++) { Conversation conv = (Conversation) list.get(x); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Found a Conversation in the table: ", conv); // Now call the server transport receive listener to clean up the resources serverTransportReceiveListener.cleanupConnection(conv); } } catch (Throwable t) { FFDCFilter.processException(t, CLASS_NAME + ".removeAllConversations", CommsConstants.SERVERTRANSPORTACCEPTLISTENER_REMOVEALL_01, this); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Caught an exception cleaning up a connection", t); } // Now clear the list list.clear(); } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "removeAllConversations"); }
class class_name[name] begin[{] method[removeAllConversations, return_type[void], modifier[public], parameter[connectionReference]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[THIS[], member[.tc], literal["removeAllConversations"], member[.connectionReference]]] else begin[{] None end[}] local_variable[type[ArrayList], list] SYNCHRONIZED[member[.activeConversations]] BEGIN[{] assign[member[.list], Cast(expression=MethodInvocation(arguments=[MemberReference(member=connectionReference, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=activeConversations, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=ArrayList, sub_type=None))] END[}] if[binary_operation[member[.list], !=, literal[null]]] begin[{] TryStatement(block=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Conversation, sub_type=None)), name=conv)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Conversation, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Found a Conversation in the table: "), MemberReference(member=conv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=conv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=cleanupConnection, postfix_operators=[], prefix_operators=[], qualifier=serverTransportReceiveListener, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=x)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=x, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=CLASS_NAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".removeAllConversations"), operator=+), MemberReference(member=SERVERTRANSPORTACCEPTLISTENER_REMOVEALL_01, postfix_operators=[], prefix_operators=[], qualifier=CommsConstants, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Caught an exception cleaning up a connection"), MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=None, label=None, resources=None) call[list.clear, parameter[]] else begin[{] None end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[THIS[], member[.tc], literal["removeAllConversations"]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[removeAllConversations] operator[SEP] identifier[Object] identifier[connectionReference] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] Keyword[this] , identifier[tc] , literal[String] , identifier[connectionReference] operator[SEP] operator[SEP] Keyword[final] identifier[ArrayList] identifier[list] operator[SEP] Keyword[synchronized] operator[SEP] identifier[activeConversations] operator[SEP] { identifier[list] operator[=] operator[SEP] identifier[ArrayList] operator[SEP] identifier[activeConversations] operator[SEP] identifier[remove] operator[SEP] identifier[connectionReference] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[list] operator[!=] Other[null] operator[SEP] { Keyword[try] { Keyword[for] operator[SEP] Keyword[int] identifier[x] operator[=] Other[0] operator[SEP] identifier[x] operator[<] identifier[list] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[x] operator[++] operator[SEP] { identifier[Conversation] identifier[conv] operator[=] operator[SEP] identifier[Conversation] operator[SEP] identifier[list] operator[SEP] identifier[get] operator[SEP] identifier[x] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] , identifier[conv] operator[SEP] operator[SEP] identifier[serverTransportReceiveListener] operator[SEP] identifier[cleanupConnection] operator[SEP] identifier[conv] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[t] , identifier[CLASS_NAME] operator[+] literal[String] , identifier[CommsConstants] operator[SEP] identifier[SERVERTRANSPORTACCEPTLISTENER_REMOVEALL_01] , Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] , identifier[t] operator[SEP] operator[SEP] } identifier[list] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] }
private void setStartRule(int month, int dayOfWeekInMonth, int dayOfWeek, int time, int mode) { assert (!isFrozen()); startMonth = month; startDay = dayOfWeekInMonth; startDayOfWeek = dayOfWeek; startTime = time; startTimeMode = mode; decodeStartRule(); transitionRulesInitialized = false; }
class class_name[name] begin[{] method[setStartRule, return_type[void], modifier[private], parameter[month, dayOfWeekInMonth, dayOfWeek, time, mode]] begin[{] AssertStatement(condition=MethodInvocation(arguments=[], member=isFrozen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None, value=None) assign[member[.startMonth], member[.month]] assign[member[.startDay], member[.dayOfWeekInMonth]] assign[member[.startDayOfWeek], member[.dayOfWeek]] assign[member[.startTime], member[.time]] assign[member[.startTimeMode], member[.mode]] call[.decodeStartRule, parameter[]] assign[member[.transitionRulesInitialized], literal[false]] end[}] END[}]
Keyword[private] Keyword[void] identifier[setStartRule] operator[SEP] Keyword[int] identifier[month] , Keyword[int] identifier[dayOfWeekInMonth] , Keyword[int] identifier[dayOfWeek] , Keyword[int] identifier[time] , Keyword[int] identifier[mode] operator[SEP] { Keyword[assert] operator[SEP] operator[!] identifier[isFrozen] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[startMonth] operator[=] identifier[month] operator[SEP] identifier[startDay] operator[=] identifier[dayOfWeekInMonth] operator[SEP] identifier[startDayOfWeek] operator[=] identifier[dayOfWeek] operator[SEP] identifier[startTime] operator[=] identifier[time] operator[SEP] identifier[startTimeMode] operator[=] identifier[mode] operator[SEP] identifier[decodeStartRule] operator[SEP] operator[SEP] operator[SEP] identifier[transitionRulesInitialized] operator[=] literal[boolean] operator[SEP] }
public Class locatePropertiesClassForType(final ClassOrInterfaceType type) { if (cachedPropertiesClasses.containsKey(type.getNameAsString())) { return cachedPropertiesClasses.get(type.getNameAsString()); } val packageName = ConfigurationMetadataGenerator.class.getPackage().getName(); val reflections = new Reflections(new ConfigurationBuilder() .filterInputsBy(s -> s != null && s.contains(type.getNameAsString())) .setUrls(ClasspathHelper.forPackage(packageName)) .setScanners(new TypeElementsScanner() .includeFields(false) .includeMethods(false) .includeAnnotations(false) .filterResultsBy(s -> s != null && s.endsWith(type.getNameAsString())), new SubTypesScanner(false))); val clz = reflections.getSubTypesOf(Serializable.class).stream() .filter(c -> c.getSimpleName().equalsIgnoreCase(type.getNameAsString())) .findFirst() .orElseThrow(() -> new IllegalArgumentException("Cant locate class for " + type.getNameAsString())); cachedPropertiesClasses.put(type.getNameAsString(), clz); return clz; }
class class_name[name] begin[{] method[locatePropertiesClassForType, return_type[type[Class]], modifier[public], parameter[type]] begin[{] if[call[cachedPropertiesClasses.containsKey, parameter[call[type.getNameAsString, parameter[]]]]] begin[{] return[call[cachedPropertiesClasses.get, parameter[call[type.getNameAsString, parameter[]]]]] else begin[{] None end[}] local_variable[type[val], packageName] local_variable[type[val], reflections] local_variable[type[val], clz] call[cachedPropertiesClasses.put, parameter[call[type.getNameAsString, parameter[]], member[.clz]]] return[member[.clz]] end[}] END[}]
Keyword[public] identifier[Class] identifier[locatePropertiesClassForType] operator[SEP] Keyword[final] identifier[ClassOrInterfaceType] identifier[type] operator[SEP] { Keyword[if] operator[SEP] identifier[cachedPropertiesClasses] operator[SEP] identifier[containsKey] operator[SEP] identifier[type] operator[SEP] identifier[getNameAsString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[cachedPropertiesClasses] operator[SEP] identifier[get] operator[SEP] identifier[type] operator[SEP] identifier[getNameAsString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[val] identifier[packageName] operator[=] identifier[ConfigurationMetadataGenerator] operator[SEP] Keyword[class] operator[SEP] identifier[getPackage] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[val] identifier[reflections] operator[=] Keyword[new] identifier[Reflections] operator[SEP] Keyword[new] identifier[ConfigurationBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[filterInputsBy] operator[SEP] identifier[s] operator[->] identifier[s] operator[!=] Other[null] operator[&&] identifier[s] operator[SEP] identifier[contains] operator[SEP] identifier[type] operator[SEP] identifier[getNameAsString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setUrls] operator[SEP] identifier[ClasspathHelper] operator[SEP] identifier[forPackage] operator[SEP] identifier[packageName] operator[SEP] operator[SEP] operator[SEP] identifier[setScanners] operator[SEP] Keyword[new] identifier[TypeElementsScanner] operator[SEP] operator[SEP] operator[SEP] identifier[includeFields] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[includeMethods] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[includeAnnotations] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[filterResultsBy] operator[SEP] identifier[s] operator[->] identifier[s] operator[!=] Other[null] operator[&&] identifier[s] operator[SEP] identifier[endsWith] operator[SEP] identifier[type] operator[SEP] identifier[getNameAsString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] , Keyword[new] identifier[SubTypesScanner] operator[SEP] literal[boolean] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[val] identifier[clz] operator[=] identifier[reflections] operator[SEP] identifier[getSubTypesOf] operator[SEP] identifier[Serializable] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[c] operator[->] identifier[c] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[type] operator[SEP] identifier[getNameAsString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[findFirst] operator[SEP] operator[SEP] operator[SEP] identifier[orElseThrow] operator[SEP] operator[SEP] operator[SEP] operator[->] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[type] operator[SEP] identifier[getNameAsString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[cachedPropertiesClasses] operator[SEP] identifier[put] operator[SEP] identifier[type] operator[SEP] identifier[getNameAsString] operator[SEP] operator[SEP] , identifier[clz] operator[SEP] operator[SEP] Keyword[return] identifier[clz] operator[SEP] }
public void itransVector() { // itrans_consonants = new Vector(); itransVowels.add("a : \u0905"); itransVowels.add("aa/A : \u0906"); itransVowels.add("i : \u0907"); itransVowels.add("ii/I : \u0908"); itransVowels.add("u : \u0909"); itransVowels.add("uu/U : \u090a"); itransVowels.add("RRi/R^i : \u090b"); itransVowels.add("RRI/R^I : \u0960"); itransVowels.add("LLi/L^i : \u090c"); itransVowels.add("LLI/L^I : \u0961"); itransVowels.add("e : \u090f"); itransVowels.add("ai : \u0910"); itransVowels.add("o : \u0913"); itransVowels.add("au : \u0914"); itransVowels.add(".n/M/.m : \u0905\u0902"); // anusvara itransVowels.add("H : \u0905\u0903"); // visarga itransVowels.add(".N : \u0905\u0901"); // anunAsika - cchandra bindu, // using V to represent it\ itransVowels.add(".a : \u093d"); // avagraha using "'" itransVowels.add("pluta sign : \u0969"); // 3 equals to pluta itransConsonants.add("k : \u0915"); itransConsonants.add("K : \u0916"); itransConsonants.add("g : \u0917"); itransConsonants.add("G : \u0918"); itransConsonants.add("N : \u0919"); itransConsonants.add("c : \u091a"); itransConsonants.add("C : \u091b"); itransConsonants.add("j : \u091c"); itransConsonants.add("J : \u091d"); itransConsonants.add("Y : \u091e"); itransConsonants.add("w : \u091f"); // Ta as in Tom itransConsonants.add("W : \u0920"); itransConsonants.add("q : \u0921"); // Da as in David itransConsonants.add("Q : \u0922"); itransConsonants.add("R : \u0923"); itransConsonants.add("t : \u0924"); // ta as in tamasha itransConsonants.add("T : \u0925"); // tha as in thanks itransConsonants.add("d : \u0926"); // da as in darvaaza itransConsonants.add("D : \u0927"); // dha as in dhanusha itransConsonants.add("n : \u0928"); itransConsonants.add("p : \u092a"); itransConsonants.add("P : \u092b"); itransConsonants.add("b : \u092c"); itransConsonants.add("B : \u092d"); itransConsonants.add("m : \u092e"); itransConsonants.add("y : \u092f"); itransConsonants.add("r : \u0930"); itransConsonants.add("l : \u0932"); itransConsonants.add("v : \u0935"); itransConsonants.add("S : \u0936"); itransConsonants.add("z : \u0937"); itransConsonants.add("s : \u0938"); itransConsonants.add("h : \u0939"); }
class class_name[name] begin[{] method[itransVector, return_type[void], modifier[public], parameter[]] begin[{] call[itransVowels.add, parameter[literal["a : अ"]]] call[itransVowels.add, parameter[literal["aa/A : आ"]]] call[itransVowels.add, parameter[literal["i : इ"]]] call[itransVowels.add, parameter[literal["ii/I : ई"]]] call[itransVowels.add, parameter[literal["u : उ"]]] call[itransVowels.add, parameter[literal["uu/U : ऊ"]]] call[itransVowels.add, parameter[literal["RRi/R^i : ऋ"]]] call[itransVowels.add, parameter[literal["RRI/R^I : ॠ"]]] call[itransVowels.add, parameter[literal["LLi/L^i : ऌ"]]] call[itransVowels.add, parameter[literal["LLI/L^I : ॡ"]]] call[itransVowels.add, parameter[literal["e : ए"]]] call[itransVowels.add, parameter[literal["ai : ऐ"]]] call[itransVowels.add, parameter[literal["o : ओ"]]] call[itransVowels.add, parameter[literal["au : औ"]]] call[itransVowels.add, parameter[literal[".n/M/.m : अं"]]] call[itransVowels.add, parameter[literal["H : अः"]]] call[itransVowels.add, parameter[literal[".N : अँ"]]] call[itransVowels.add, parameter[literal[".a : ऽ"]]] call[itransVowels.add, parameter[literal["pluta sign : ३"]]] call[itransConsonants.add, parameter[literal["k : क"]]] call[itransConsonants.add, parameter[literal["K : ख"]]] call[itransConsonants.add, parameter[literal["g : ग"]]] call[itransConsonants.add, parameter[literal["G : घ"]]] call[itransConsonants.add, parameter[literal["N : ङ"]]] call[itransConsonants.add, parameter[literal["c : च"]]] call[itransConsonants.add, parameter[literal["C : छ"]]] call[itransConsonants.add, parameter[literal["j : ज"]]] call[itransConsonants.add, parameter[literal["J : झ"]]] call[itransConsonants.add, parameter[literal["Y : ञ"]]] call[itransConsonants.add, parameter[literal["w : ट"]]] call[itransConsonants.add, parameter[literal["W : ठ"]]] call[itransConsonants.add, parameter[literal["q : ड"]]] call[itransConsonants.add, parameter[literal["Q : ढ"]]] call[itransConsonants.add, parameter[literal["R : ण"]]] call[itransConsonants.add, parameter[literal["t : त"]]] call[itransConsonants.add, parameter[literal["T : थ"]]] call[itransConsonants.add, parameter[literal["d : द"]]] call[itransConsonants.add, parameter[literal["D : ध"]]] call[itransConsonants.add, parameter[literal["n : न"]]] call[itransConsonants.add, parameter[literal["p : प"]]] call[itransConsonants.add, parameter[literal["P : फ"]]] call[itransConsonants.add, parameter[literal["b : ब"]]] call[itransConsonants.add, parameter[literal["B : भ"]]] call[itransConsonants.add, parameter[literal["m : म"]]] call[itransConsonants.add, parameter[literal["y : य"]]] call[itransConsonants.add, parameter[literal["r : र"]]] call[itransConsonants.add, parameter[literal["l : ल"]]] call[itransConsonants.add, parameter[literal["v : व"]]] call[itransConsonants.add, parameter[literal["S : श"]]] call[itransConsonants.add, parameter[literal["z : ष"]]] call[itransConsonants.add, parameter[literal["s : स"]]] call[itransConsonants.add, parameter[literal["h : ह"]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[itransVector] operator[SEP] operator[SEP] { identifier[itransVowels] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransVowels] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransVowels] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransVowels] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransVowels] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransVowels] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransVowels] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransVowels] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransVowels] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransVowels] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransVowels] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransVowels] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransVowels] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransVowels] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransVowels] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransVowels] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransVowels] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransVowels] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransVowels] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[itransConsonants] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] }
public EEnum getIfcHeatExchangerTypeEnum() { if (ifcHeatExchangerTypeEnumEEnum == null) { ifcHeatExchangerTypeEnumEEnum = (EEnum) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(846); } return ifcHeatExchangerTypeEnumEEnum; }
class class_name[name] begin[{] method[getIfcHeatExchangerTypeEnum, return_type[type[EEnum]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcHeatExchangerTypeEnumEEnum], ==, literal[null]]] begin[{] assign[member[.ifcHeatExchangerTypeEnumEEnum], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=Ifc2x3tc1Package, selectors=[])], member=getEPackage, postfix_operators=[], prefix_operators=[], qualifier=EPackage.Registry.INSTANCE, selectors=[MethodInvocation(arguments=[], member=getEClassifiers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=846)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=EEnum, sub_type=None))] else begin[{] None end[}] return[member[.ifcHeatExchangerTypeEnumEEnum]] end[}] END[}]
Keyword[public] identifier[EEnum] identifier[getIfcHeatExchangerTypeEnum] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcHeatExchangerTypeEnumEEnum] operator[==] Other[null] operator[SEP] { identifier[ifcHeatExchangerTypeEnumEEnum] operator[=] operator[SEP] identifier[EEnum] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[Ifc2x3tc1Package] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[846] operator[SEP] operator[SEP] } Keyword[return] identifier[ifcHeatExchangerTypeEnumEEnum] operator[SEP] }
protected void backpatchMessageLength(final int startPosition, final BsonOutput bsonOutput) { int messageLength = bsonOutput.getPosition() - startPosition; bsonOutput.writeInt32(bsonOutput.getPosition() - messageLength, messageLength); }
class class_name[name] begin[{] method[backpatchMessageLength, return_type[void], modifier[protected], parameter[startPosition, bsonOutput]] begin[{] local_variable[type[int], messageLength] call[bsonOutput.writeInt32, parameter[binary_operation[call[bsonOutput.getPosition, parameter[]], -, member[.messageLength]], member[.messageLength]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[backpatchMessageLength] operator[SEP] Keyword[final] Keyword[int] identifier[startPosition] , Keyword[final] identifier[BsonOutput] identifier[bsonOutput] operator[SEP] { Keyword[int] identifier[messageLength] operator[=] identifier[bsonOutput] operator[SEP] identifier[getPosition] operator[SEP] operator[SEP] operator[-] identifier[startPosition] operator[SEP] identifier[bsonOutput] operator[SEP] identifier[writeInt32] operator[SEP] identifier[bsonOutput] operator[SEP] identifier[getPosition] operator[SEP] operator[SEP] operator[-] identifier[messageLength] , identifier[messageLength] operator[SEP] operator[SEP] }
public Shape createScrollCap(int x, int y, int w, int h) { path.reset(); path.moveTo(x, y); path.lineTo(x, y + h); path.lineTo(x + w, y + h); addScrollGapPath(x, y, w, h, true); path.closePath(); return path; }
class class_name[name] begin[{] method[createScrollCap, return_type[type[Shape]], modifier[public], parameter[x, y, w, h]] begin[{] call[path.reset, parameter[]] call[path.moveTo, parameter[member[.x], member[.y]]] call[path.lineTo, parameter[member[.x], binary_operation[member[.y], +, member[.h]]]] call[path.lineTo, parameter[binary_operation[member[.x], +, member[.w]], binary_operation[member[.y], +, member[.h]]]] call[.addScrollGapPath, parameter[member[.x], member[.y], member[.w], member[.h], literal[true]]] call[path.closePath, parameter[]] return[member[.path]] end[}] END[}]
Keyword[public] identifier[Shape] identifier[createScrollCap] operator[SEP] Keyword[int] identifier[x] , Keyword[int] identifier[y] , Keyword[int] identifier[w] , Keyword[int] identifier[h] operator[SEP] { identifier[path] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] identifier[path] operator[SEP] identifier[moveTo] operator[SEP] identifier[x] , identifier[y] operator[SEP] operator[SEP] identifier[path] operator[SEP] identifier[lineTo] operator[SEP] identifier[x] , identifier[y] operator[+] identifier[h] operator[SEP] operator[SEP] identifier[path] operator[SEP] identifier[lineTo] operator[SEP] identifier[x] operator[+] identifier[w] , identifier[y] operator[+] identifier[h] operator[SEP] operator[SEP] identifier[addScrollGapPath] operator[SEP] identifier[x] , identifier[y] , identifier[w] , identifier[h] , literal[boolean] operator[SEP] operator[SEP] identifier[path] operator[SEP] identifier[closePath] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[path] operator[SEP] }
@Override public void init(VirtualConnection inVC) { this.vcHashCode = inVC.hashCode(); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.entry(tc, "init, vc=" + getVCHash()); } // Create the read and write interfaces for this connection link. super.init(inVC); initInterfaces(new SSLConnectionContextImpl(this, !isInbound), new SSLReadServiceContext(this), new SSLWriteServiceContext(this)); // Check to see if http/2 is enabled for this connection and save the result if (CHFWBundle.getServletConfiguredHttpVersionSetting() != null) { if (SSLChannelConstants.OPTIONAL_DEFAULT_OFF_20.equalsIgnoreCase(CHFWBundle.getServletConfiguredHttpVersionSetting())) { if (getChannel().getUseH2ProtocolAttribute() != null && getChannel().getUseH2ProtocolAttribute()) { http2Enabled = true; } } else if (SSLChannelConstants.OPTIONAL_DEFAULT_ON_20.equalsIgnoreCase(CHFWBundle.getServletConfiguredHttpVersionSetting())) { if (getChannel().getUseH2ProtocolAttribute() == null || getChannel().getUseH2ProtocolAttribute()) { http2Enabled = true; } } } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.exit(tc, "init"); } }
class class_name[name] begin[{] method[init, return_type[void], modifier[public], parameter[inVC]] begin[{] assign[THIS[member[None.vcHashCode]], call[inVC.hashCode, parameter[]]] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.entry, parameter[member[.tc], binary_operation[literal["init, vc="], +, call[.getVCHash, parameter[]]]]] else begin[{] None end[}] SuperMethodInvocation(arguments=[MemberReference(member=inVC, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=init, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) call[.initInterfaces, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=isInbound, 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=SSLConnectionContextImpl, sub_type=None)), ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SSLReadServiceContext, sub_type=None)), ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SSLWriteServiceContext, sub_type=None))]] if[binary_operation[call[CHFWBundle.getServletConfiguredHttpVersionSetting, parameter[]], !=, literal[null]]] begin[{] if[call[SSLChannelConstants.OPTIONAL_DEFAULT_OFF_20.equalsIgnoreCase, parameter[call[CHFWBundle.getServletConfiguredHttpVersionSetting, parameter[]]]]] begin[{] if[binary_operation[binary_operation[call[.getChannel, parameter[]], !=, literal[null]], &&, call[.getChannel, parameter[]]]] begin[{] assign[member[.http2Enabled], literal[true]] else begin[{] None end[}] else begin[{] if[call[SSLChannelConstants.OPTIONAL_DEFAULT_ON_20.equalsIgnoreCase, parameter[call[CHFWBundle.getServletConfiguredHttpVersionSetting, parameter[]]]]] begin[{] if[binary_operation[binary_operation[call[.getChannel, parameter[]], ==, literal[null]], ||, call[.getChannel, parameter[]]]] begin[{] assign[member[.http2Enabled], literal[true]] else begin[{] None end[}] else begin[{] None end[}] end[}] else begin[{] None end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.exit, parameter[member[.tc], literal["init"]]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[init] operator[SEP] identifier[VirtualConnection] identifier[inVC] operator[SEP] { Keyword[this] operator[SEP] identifier[vcHashCode] operator[=] identifier[inVC] operator[SEP] identifier[hashCode] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[getVCHash] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[super] operator[SEP] identifier[init] operator[SEP] identifier[inVC] operator[SEP] operator[SEP] identifier[initInterfaces] operator[SEP] Keyword[new] identifier[SSLConnectionContextImpl] operator[SEP] Keyword[this] , operator[!] identifier[isInbound] operator[SEP] , Keyword[new] identifier[SSLReadServiceContext] operator[SEP] Keyword[this] operator[SEP] , Keyword[new] identifier[SSLWriteServiceContext] operator[SEP] Keyword[this] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[CHFWBundle] operator[SEP] identifier[getServletConfiguredHttpVersionSetting] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[SSLChannelConstants] operator[SEP] identifier[OPTIONAL_DEFAULT_OFF_20] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[CHFWBundle] operator[SEP] identifier[getServletConfiguredHttpVersionSetting] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[getChannel] operator[SEP] operator[SEP] operator[SEP] identifier[getUseH2ProtocolAttribute] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[getChannel] operator[SEP] operator[SEP] operator[SEP] identifier[getUseH2ProtocolAttribute] operator[SEP] operator[SEP] operator[SEP] { identifier[http2Enabled] operator[=] literal[boolean] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[SSLChannelConstants] operator[SEP] identifier[OPTIONAL_DEFAULT_ON_20] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[CHFWBundle] operator[SEP] identifier[getServletConfiguredHttpVersionSetting] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[getChannel] operator[SEP] operator[SEP] operator[SEP] identifier[getUseH2ProtocolAttribute] operator[SEP] operator[SEP] operator[==] Other[null] operator[||] identifier[getChannel] operator[SEP] operator[SEP] operator[SEP] identifier[getUseH2ProtocolAttribute] operator[SEP] operator[SEP] operator[SEP] { identifier[http2Enabled] operator[=] literal[boolean] operator[SEP] } } } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] } }
public Node getBestSuggestions(String prefix) { if(prefix.isEmpty()) throw new IllegalArgumentException(); int i = 0; Node n = root; while(n != null) { if(prefix.charAt(i) < n.firstChar) n = n.left; else if(prefix.charAt(i) > n.firstChar) n = n.right; else{ for(i++; i < n.charEnd && i < prefix.length(); i++) { if(prefix.charAt(i) != n.suggestion.charAt(i)) return null; } if(i < prefix.length()) n = n.mid; else return n; } } return null; }
class class_name[name] begin[{] method[getBestSuggestions, return_type[type[Node]], modifier[public], parameter[prefix]] begin[{] if[call[prefix.isEmpty, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[int], i] local_variable[type[Node], n] while[binary_operation[member[.n], !=, literal[null]]] begin[{] if[binary_operation[call[prefix.charAt, parameter[member[.i]]], <, member[n.firstChar]]] begin[{] assign[member[.n], member[n.left]] else begin[{] if[binary_operation[call[prefix.charAt, parameter[member[.i]]], >, member[n.firstChar]]] begin[{] assign[member[.n], member[n.right]] else begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=prefix, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=n.suggestion, selectors=[], type_arguments=None), operator=!=), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None))]), control=ForControl(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=charEnd, postfix_operators=[], prefix_operators=[], qualifier=n, selectors=[]), operator=<), operandr=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=prefix, selectors=[], type_arguments=None), operator=<), operator=&&), init=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])], update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) if[binary_operation[member[.i], <, call[prefix.length, parameter[]]]] begin[{] assign[member[.n], member[n.mid]] else begin[{] return[member[.n]] end[}] end[}] end[}] end[}] return[literal[null]] end[}] END[}]
Keyword[public] identifier[Node] identifier[getBestSuggestions] operator[SEP] identifier[String] identifier[prefix] operator[SEP] { Keyword[if] operator[SEP] identifier[prefix] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[Node] identifier[n] operator[=] identifier[root] operator[SEP] Keyword[while] operator[SEP] identifier[n] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[prefix] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[<] identifier[n] operator[SEP] identifier[firstChar] operator[SEP] identifier[n] operator[=] identifier[n] operator[SEP] identifier[left] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[prefix] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[>] identifier[n] operator[SEP] identifier[firstChar] operator[SEP] identifier[n] operator[=] identifier[n] operator[SEP] identifier[right] operator[SEP] Keyword[else] { Keyword[for] operator[SEP] identifier[i] operator[++] operator[SEP] identifier[i] operator[<] identifier[n] operator[SEP] identifier[charEnd] operator[&&] identifier[i] operator[<] identifier[prefix] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[prefix] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[!=] identifier[n] operator[SEP] identifier[suggestion] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[i] operator[<] identifier[prefix] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[n] operator[=] identifier[n] operator[SEP] identifier[mid] operator[SEP] Keyword[else] Keyword[return] identifier[n] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
@SuppressWarnings("deprecation") protected String getExpressionUrl(String expression) { String template = _config.getValue(Property.AUDIT_METRIC_URL_TEMPLATE.getName(), Property.AUDIT_METRIC_URL_TEMPLATE.getDefaultValue()); try { expression = URLEncoder.encode(expression, "UTF-8"); } catch (Exception ex) { expression = URLEncoder.encode(expression); } return template.replaceAll("\\$expression\\$", expression); }
class class_name[name] begin[{] method[getExpressionUrl, return_type[type[String]], modifier[protected], parameter[expression]] begin[{] local_variable[type[String], template] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=expression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=expression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="UTF-8")], member=encode, postfix_operators=[], prefix_operators=[], qualifier=URLEncoder, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=expression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=expression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=encode, postfix_operators=[], prefix_operators=[], qualifier=URLEncoder, selectors=[], type_arguments=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None) return[call[template.replaceAll, parameter[literal["\\$expression\\$"], member[.expression]]]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] identifier[String] identifier[getExpressionUrl] operator[SEP] identifier[String] identifier[expression] operator[SEP] { identifier[String] identifier[template] operator[=] identifier[_config] operator[SEP] identifier[getValue] operator[SEP] identifier[Property] operator[SEP] identifier[AUDIT_METRIC_URL_TEMPLATE] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[Property] operator[SEP] identifier[AUDIT_METRIC_URL_TEMPLATE] operator[SEP] identifier[getDefaultValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[expression] operator[=] identifier[URLEncoder] operator[SEP] identifier[encode] operator[SEP] identifier[expression] , literal[String] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { identifier[expression] operator[=] identifier[URLEncoder] operator[SEP] identifier[encode] operator[SEP] identifier[expression] operator[SEP] operator[SEP] } Keyword[return] identifier[template] operator[SEP] identifier[replaceAll] operator[SEP] literal[String] , identifier[expression] operator[SEP] operator[SEP] }
public StringBuffer minifyStringBuffer(StringBuffer sb, Charset charset) throws IOException, JSMinException { byte[] bundleBytes = sb.toString().getBytes(charset.name()); ByteArrayInputStream bIs = new ByteArrayInputStream(bundleBytes); ByteArrayOutputStream bOs = new ByteArrayOutputStream(); // Compress data and recover it as a byte array. JSMin minifier = new JSMin(bIs, bOs); minifier.jsmin(); byte[] minified = bOs.toByteArray(); return byteArrayToString(charset, minified); }
class class_name[name] begin[{] method[minifyStringBuffer, return_type[type[StringBuffer]], modifier[public], parameter[sb, charset]] begin[{] local_variable[type[byte], bundleBytes] local_variable[type[ByteArrayInputStream], bIs] local_variable[type[ByteArrayOutputStream], bOs] local_variable[type[JSMin], minifier] call[minifier.jsmin, parameter[]] local_variable[type[byte], minified] return[call[.byteArrayToString, parameter[member[.charset], member[.minified]]]] end[}] END[}]
Keyword[public] identifier[StringBuffer] identifier[minifyStringBuffer] operator[SEP] identifier[StringBuffer] identifier[sb] , identifier[Charset] identifier[charset] operator[SEP] Keyword[throws] identifier[IOException] , identifier[JSMinException] { Keyword[byte] operator[SEP] operator[SEP] identifier[bundleBytes] operator[=] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[getBytes] operator[SEP] identifier[charset] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ByteArrayInputStream] identifier[bIs] operator[=] Keyword[new] identifier[ByteArrayInputStream] operator[SEP] identifier[bundleBytes] operator[SEP] operator[SEP] identifier[ByteArrayOutputStream] identifier[bOs] operator[=] Keyword[new] identifier[ByteArrayOutputStream] operator[SEP] operator[SEP] operator[SEP] identifier[JSMin] identifier[minifier] operator[=] Keyword[new] identifier[JSMin] operator[SEP] identifier[bIs] , identifier[bOs] operator[SEP] operator[SEP] identifier[minifier] operator[SEP] identifier[jsmin] operator[SEP] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[minified] operator[=] identifier[bOs] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[byteArrayToString] operator[SEP] identifier[charset] , identifier[minified] operator[SEP] operator[SEP] }