code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
@Override public RoundedMoney subtract(MonetaryAmount amount) { MoneyUtils.checkAmountParameter(amount, currency); if (amount.isZero()) { return this; } return new RoundedMoney(number.subtract(amount.getNumber().numberValue(BigDecimal.class), Optional.ofNullable( monetaryContext.get(MathContext.class)).orElse(MathContext.DECIMAL64)), currency, rounding); }
class class_name[name] begin[{] method[subtract, return_type[type[RoundedMoney]], modifier[public], parameter[amount]] begin[{] call[MoneyUtils.checkAmountParameter, parameter[member[.amount], member[.currency]]] if[call[amount.isZero, parameter[]]] begin[{] return[THIS[]] else begin[{] None end[}] return[ClassCreator(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNumber, postfix_operators=[], prefix_operators=[], qualifier=amount, selectors=[MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BigDecimal, sub_type=None))], member=numberValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MathContext, sub_type=None))], member=get, postfix_operators=[], prefix_operators=[], qualifier=monetaryContext, selectors=[], type_arguments=None)], member=ofNullable, postfix_operators=[], prefix_operators=[], qualifier=Optional, selectors=[MethodInvocation(arguments=[MemberReference(member=DECIMAL64, postfix_operators=[], prefix_operators=[], qualifier=MathContext, selectors=[])], member=orElse, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=subtract, postfix_operators=[], prefix_operators=[], qualifier=number, selectors=[], type_arguments=None), MemberReference(member=currency, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rounding, 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=RoundedMoney, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[RoundedMoney] identifier[subtract] operator[SEP] identifier[MonetaryAmount] identifier[amount] operator[SEP] { identifier[MoneyUtils] operator[SEP] identifier[checkAmountParameter] operator[SEP] identifier[amount] , identifier[currency] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[amount] operator[SEP] identifier[isZero] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Keyword[this] operator[SEP] } Keyword[return] Keyword[new] identifier[RoundedMoney] operator[SEP] identifier[number] operator[SEP] identifier[subtract] operator[SEP] identifier[amount] operator[SEP] identifier[getNumber] operator[SEP] operator[SEP] operator[SEP] identifier[numberValue] operator[SEP] identifier[BigDecimal] operator[SEP] Keyword[class] operator[SEP] , identifier[Optional] operator[SEP] identifier[ofNullable] operator[SEP] identifier[monetaryContext] operator[SEP] identifier[get] operator[SEP] identifier[MathContext] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] identifier[orElse] operator[SEP] identifier[MathContext] operator[SEP] identifier[DECIMAL64] operator[SEP] operator[SEP] , identifier[currency] , identifier[rounding] operator[SEP] operator[SEP] }
@Override public void eUnset(int featureID) { switch (featureID) { case SimpleAntlrPackage.OR_EXPRESSION__LEFT: setLeft((Expression)null); return; case SimpleAntlrPackage.OR_EXPRESSION__RIGHT: setRight((Expression)null); return; } super.eUnset(featureID); }
class class_name[name] begin[{] method[eUnset, return_type[void], modifier[public], parameter[featureID]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=OR_EXPRESSION__LEFT, postfix_operators=[], prefix_operators=[], qualifier=SimpleAntlrPackage, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), type=ReferenceType(arguments=None, dimensions=[], name=Expression, sub_type=None))], member=setLeft, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=OR_EXPRESSION__RIGHT, postfix_operators=[], prefix_operators=[], qualifier=SimpleAntlrPackage, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), type=ReferenceType(arguments=None, dimensions=[], name=Expression, sub_type=None))], member=setRight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)])], expression=MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) SuperMethodInvocation(arguments=[MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=eUnset, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[eUnset] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] { Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] { Keyword[case] identifier[SimpleAntlrPackage] operator[SEP] identifier[OR_EXPRESSION__LEFT] operator[:] identifier[setLeft] operator[SEP] operator[SEP] identifier[Expression] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[case] identifier[SimpleAntlrPackage] operator[SEP] identifier[OR_EXPRESSION__RIGHT] operator[:] identifier[setRight] operator[SEP] operator[SEP] identifier[Expression] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[super] operator[SEP] identifier[eUnset] operator[SEP] identifier[featureID] operator[SEP] operator[SEP] }
public static Character[] toObject(char... a) { if (a != null) { Character[] w = new Character[a.length]; for (int i = 0; i < a.length; i++) { w[i] = a[i]; } return w; } return null; }
class class_name[name] begin[{] method[toObject, return_type[type[Character]], modifier[public static], parameter[a]] begin[{] if[binary_operation[member[.a], !=, literal[null]]] begin[{] local_variable[type[Character], w] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=w, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=a, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.w]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Character] operator[SEP] operator[SEP] identifier[toObject] operator[SEP] Keyword[char] operator[...] identifier[a] operator[SEP] { Keyword[if] operator[SEP] identifier[a] operator[!=] Other[null] operator[SEP] { identifier[Character] operator[SEP] operator[SEP] identifier[w] operator[=] Keyword[new] identifier[Character] operator[SEP] identifier[a] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[a] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[w] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[a] operator[SEP] identifier[i] operator[SEP] operator[SEP] } Keyword[return] identifier[w] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
private boolean doHandshake() throws IOException { SSLEngineResult result; HandshakeStatus handshakeStatus; // NioSslPeer's fields myAppData and peerAppData are supposed to be large enough to hold all message data the peer // will send and expects to receive from the other peer respectively. Since the messages to be exchanged will usually be less // than 16KB long the capacity of these fields should also be smaller. Here we initialize these two local buffers // to be used for the handshake, while keeping client's buffers at the same size. int appBufferSize = engine.getSession().getApplicationBufferSize(); myAppData = ByteBuffer.allocate( appBufferSize ); peerAppData = ByteBuffer.allocate( appBufferSize ); myNetData.clear(); peerNetData.clear(); handshakeStatus = engine.getHandshakeStatus(); boolean handshakeComplete = false; while( !handshakeComplete) { switch(handshakeStatus) { case FINISHED: handshakeComplete = !this.peerNetData.hasRemaining(); if (handshakeComplete) return true; socketChannel.write(this.peerNetData); break; case NEED_UNWRAP: if( socketChannel.read( peerNetData ) < 0 ) { if( engine.isInboundDone() && engine.isOutboundDone() ) { return false; } try { engine.closeInbound(); } catch ( SSLException e ) { //Ignore, cant do anything against this exception } engine.closeOutbound(); // After closeOutbound the engine will be set to WRAP state, in order to try to send a close message to the client. handshakeStatus = engine.getHandshakeStatus(); break; } peerNetData.flip(); try { result = engine.unwrap( peerNetData, peerAppData ); peerNetData.compact(); handshakeStatus = result.getHandshakeStatus(); } catch ( SSLException sslException ) { engine.closeOutbound(); handshakeStatus = engine.getHandshakeStatus(); break; } switch(result.getStatus()) { case OK: break; case BUFFER_OVERFLOW: // Will occur when peerAppData's capacity is smaller than the data derived from peerNetData's unwrap. peerAppData = enlargeApplicationBuffer( peerAppData ); break; case BUFFER_UNDERFLOW: // Will occur either when no data was read from the peer or when the peerNetData buffer was too small to hold all peer's data. peerNetData = handleBufferUnderflow( peerNetData ); break; case CLOSED: if( engine.isOutboundDone() ) { return false; } else { engine.closeOutbound(); handshakeStatus = engine.getHandshakeStatus(); break; } default: throw new IllegalStateException( "Invalid SSL status: " + result.getStatus() ); } break; case NEED_WRAP: myNetData.clear(); try { result = engine.wrap( myAppData, myNetData ); handshakeStatus = result.getHandshakeStatus(); } catch ( SSLException sslException ) { engine.closeOutbound(); handshakeStatus = engine.getHandshakeStatus(); break; } switch(result.getStatus()) { case OK: myNetData.flip(); while( myNetData.hasRemaining() ) { socketChannel.write( myNetData ); } break; case BUFFER_OVERFLOW: // Will occur if there is not enough space in myNetData buffer to write all the data that would be generated by the method wrap. // Since myNetData is set to session's packet size we should not get to this point because SSLEngine is supposed // to produce messages smaller or equal to that, but a general handling would be the following: myNetData = enlargePacketBuffer( myNetData ); break; case BUFFER_UNDERFLOW: throw new SSLException( "Buffer underflow occured after a wrap. I don't think we should ever get here." ); case CLOSED: try { myNetData.flip(); while( myNetData.hasRemaining() ) { socketChannel.write( myNetData ); } // At this point the handshake status will probably be NEED_UNWRAP so we make sure that peerNetData is clear to read. peerNetData.clear(); } catch ( Exception e ) { handshakeStatus = engine.getHandshakeStatus(); } break; default: throw new IllegalStateException( "Invalid SSL status: " + result.getStatus() ); } break; case NEED_TASK: Runnable task; while( ( task = engine.getDelegatedTask() ) != null ) { executor.execute( task ); } handshakeStatus = engine.getHandshakeStatus(); break; case NOT_HANDSHAKING: break; default: throw new IllegalStateException( "Invalid SSL status: " + handshakeStatus ); } } return true; }
class class_name[name] begin[{] method[doHandshake, return_type[type[boolean]], modifier[private], parameter[]] begin[{] local_variable[type[SSLEngineResult], result] local_variable[type[HandshakeStatus], handshakeStatus] local_variable[type[int], appBufferSize] assign[member[.myAppData], call[ByteBuffer.allocate, parameter[member[.appBufferSize]]]] assign[member[.peerAppData], call[ByteBuffer.allocate, parameter[member[.appBufferSize]]]] call[myNetData.clear, parameter[]] call[peerNetData.clear, parameter[]] assign[member[.handshakeStatus], call[engine.getHandshakeStatus, parameter[]]] local_variable[type[boolean], handshakeComplete] while[member[.handshakeComplete]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['FINISHED'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=handshakeComplete, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=This(postfix_operators=[], prefix_operators=['!'], qualifier=None, selectors=[MemberReference(member=peerNetData, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=hasRemaining, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])), label=None), IfStatement(condition=MemberReference(member=handshakeComplete, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)), StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=peerNetData, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], member=write, postfix_operators=[], prefix_operators=[], qualifier=socketChannel, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['NEED_UNWRAP'], statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=peerNetData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=socketChannel, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isInboundDone, postfix_operators=[], prefix_operators=[], qualifier=engine, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isOutboundDone, postfix_operators=[], prefix_operators=[], qualifier=engine, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)])), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=closeInbound, postfix_operators=[], prefix_operators=[], qualifier=engine, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SSLException']))], finally_block=None, label=None, resources=None), StatementExpression(expression=MethodInvocation(arguments=[], member=closeOutbound, postfix_operators=[], prefix_operators=[], qualifier=engine, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=handshakeStatus, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getHandshakeStatus, postfix_operators=[], prefix_operators=[], qualifier=engine, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)])), StatementExpression(expression=MethodInvocation(arguments=[], member=flip, postfix_operators=[], prefix_operators=[], qualifier=peerNetData, selectors=[], type_arguments=None), label=None), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=peerNetData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=peerAppData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=unwrap, postfix_operators=[], prefix_operators=[], qualifier=engine, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=compact, postfix_operators=[], prefix_operators=[], qualifier=peerNetData, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=handshakeStatus, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getHandshakeStatus, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=closeOutbound, postfix_operators=[], prefix_operators=[], qualifier=engine, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=handshakeStatus, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getHandshakeStatus, postfix_operators=[], prefix_operators=[], qualifier=engine, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=sslException, types=['SSLException']))], finally_block=None, label=None, resources=None), SwitchStatement(cases=[SwitchStatementCase(case=['OK'], statements=[BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['BUFFER_OVERFLOW'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=peerAppData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=peerAppData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=enlargeApplicationBuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['BUFFER_UNDERFLOW'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=peerNetData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=peerNetData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=handleBufferUnderflow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['CLOSED'], statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isOutboundDone, postfix_operators=[], prefix_operators=[], qualifier=engine, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=closeOutbound, postfix_operators=[], prefix_operators=[], qualifier=engine, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=handshakeStatus, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getHandshakeStatus, postfix_operators=[], prefix_operators=[], qualifier=engine, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)]))]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid SSL status: "), operandr=MethodInvocation(arguments=[], member=getStatus, postfix_operators=[], prefix_operators=[], qualifier=result, 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)])], expression=MethodInvocation(arguments=[], member=getStatus, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['NEED_WRAP'], statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=clear, postfix_operators=[], prefix_operators=[], qualifier=myNetData, selectors=[], type_arguments=None), label=None), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=myAppData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=myNetData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=wrap, postfix_operators=[], prefix_operators=[], qualifier=engine, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=handshakeStatus, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getHandshakeStatus, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=closeOutbound, postfix_operators=[], prefix_operators=[], qualifier=engine, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=handshakeStatus, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getHandshakeStatus, postfix_operators=[], prefix_operators=[], qualifier=engine, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=sslException, types=['SSLException']))], finally_block=None, label=None, resources=None), SwitchStatement(cases=[SwitchStatementCase(case=['OK'], statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=flip, postfix_operators=[], prefix_operators=[], qualifier=myNetData, selectors=[], type_arguments=None), label=None), WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=myNetData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=socketChannel, selectors=[], type_arguments=None), label=None)]), condition=MethodInvocation(arguments=[], member=hasRemaining, postfix_operators=[], prefix_operators=[], qualifier=myNetData, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['BUFFER_OVERFLOW'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=myNetData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=myNetData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=enlargePacketBuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['BUFFER_UNDERFLOW'], statements=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Buffer underflow occured after a wrap. I don't think we should ever get here.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SSLException, sub_type=None)), label=None)]), SwitchStatementCase(case=['CLOSED'], statements=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=flip, postfix_operators=[], prefix_operators=[], qualifier=myNetData, selectors=[], type_arguments=None), label=None), WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=myNetData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=socketChannel, selectors=[], type_arguments=None), label=None)]), condition=MethodInvocation(arguments=[], member=hasRemaining, postfix_operators=[], prefix_operators=[], qualifier=myNetData, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=clear, postfix_operators=[], prefix_operators=[], qualifier=peerNetData, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=handshakeStatus, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getHandshakeStatus, postfix_operators=[], prefix_operators=[], qualifier=engine, 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), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid SSL status: "), operandr=MethodInvocation(arguments=[], member=getStatus, postfix_operators=[], prefix_operators=[], qualifier=result, 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)])], expression=MethodInvocation(arguments=[], member=getStatus, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['NEED_TASK'], statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=task)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Runnable, sub_type=None)), WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=task, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=execute, postfix_operators=[], prefix_operators=[], qualifier=executor, selectors=[], type_arguments=None), label=None)]), condition=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=task, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getDelegatedTask, postfix_operators=[], prefix_operators=[], qualifier=engine, selectors=[], type_arguments=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=handshakeStatus, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getHandshakeStatus, postfix_operators=[], prefix_operators=[], qualifier=engine, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['NOT_HANDSHAKING'], statements=[BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid SSL status: "), operandr=MemberReference(member=handshakeStatus, 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=IllegalStateException, sub_type=None)), label=None)])], expression=MemberReference(member=handshakeStatus, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] return[literal[true]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[doHandshake] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[SSLEngineResult] identifier[result] operator[SEP] identifier[HandshakeStatus] identifier[handshakeStatus] operator[SEP] Keyword[int] identifier[appBufferSize] operator[=] identifier[engine] operator[SEP] identifier[getSession] operator[SEP] operator[SEP] operator[SEP] identifier[getApplicationBufferSize] operator[SEP] operator[SEP] operator[SEP] identifier[myAppData] operator[=] identifier[ByteBuffer] operator[SEP] identifier[allocate] operator[SEP] identifier[appBufferSize] operator[SEP] operator[SEP] identifier[peerAppData] operator[=] identifier[ByteBuffer] operator[SEP] identifier[allocate] operator[SEP] identifier[appBufferSize] operator[SEP] operator[SEP] identifier[myNetData] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[peerNetData] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[handshakeStatus] operator[=] identifier[engine] operator[SEP] identifier[getHandshakeStatus] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[handshakeComplete] operator[=] literal[boolean] operator[SEP] Keyword[while] operator[SEP] operator[!] identifier[handshakeComplete] operator[SEP] { Keyword[switch] operator[SEP] identifier[handshakeStatus] operator[SEP] { Keyword[case] identifier[FINISHED] operator[:] identifier[handshakeComplete] operator[=] operator[!] Keyword[this] operator[SEP] identifier[peerNetData] operator[SEP] identifier[hasRemaining] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[handshakeComplete] operator[SEP] Keyword[return] literal[boolean] operator[SEP] identifier[socketChannel] operator[SEP] identifier[write] operator[SEP] Keyword[this] operator[SEP] identifier[peerNetData] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[NEED_UNWRAP] operator[:] Keyword[if] operator[SEP] identifier[socketChannel] operator[SEP] identifier[read] operator[SEP] identifier[peerNetData] operator[SEP] operator[<] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[engine] operator[SEP] identifier[isInboundDone] operator[SEP] operator[SEP] operator[&&] identifier[engine] operator[SEP] identifier[isOutboundDone] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[try] { identifier[engine] operator[SEP] identifier[closeInbound] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SSLException] identifier[e] operator[SEP] { } identifier[engine] operator[SEP] identifier[closeOutbound] operator[SEP] operator[SEP] operator[SEP] identifier[handshakeStatus] operator[=] identifier[engine] operator[SEP] identifier[getHandshakeStatus] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } identifier[peerNetData] operator[SEP] identifier[flip] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[result] operator[=] identifier[engine] operator[SEP] identifier[unwrap] operator[SEP] identifier[peerNetData] , identifier[peerAppData] operator[SEP] operator[SEP] identifier[peerNetData] operator[SEP] identifier[compact] operator[SEP] operator[SEP] operator[SEP] identifier[handshakeStatus] operator[=] identifier[result] operator[SEP] identifier[getHandshakeStatus] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SSLException] identifier[sslException] operator[SEP] { identifier[engine] operator[SEP] identifier[closeOutbound] operator[SEP] operator[SEP] operator[SEP] identifier[handshakeStatus] operator[=] identifier[engine] operator[SEP] identifier[getHandshakeStatus] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } Keyword[switch] operator[SEP] identifier[result] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] identifier[OK] operator[:] Keyword[break] operator[SEP] Keyword[case] identifier[BUFFER_OVERFLOW] operator[:] identifier[peerAppData] operator[=] identifier[enlargeApplicationBuffer] operator[SEP] identifier[peerAppData] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[BUFFER_UNDERFLOW] operator[:] identifier[peerNetData] operator[=] identifier[handleBufferUnderflow] operator[SEP] identifier[peerNetData] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[CLOSED] operator[:] Keyword[if] operator[SEP] identifier[engine] operator[SEP] identifier[isOutboundDone] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { identifier[engine] operator[SEP] identifier[closeOutbound] operator[SEP] operator[SEP] operator[SEP] identifier[handshakeStatus] operator[=] identifier[engine] operator[SEP] identifier[getHandshakeStatus] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[result] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[NEED_WRAP] operator[:] identifier[myNetData] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[result] operator[=] identifier[engine] operator[SEP] identifier[wrap] operator[SEP] identifier[myAppData] , identifier[myNetData] operator[SEP] operator[SEP] identifier[handshakeStatus] operator[=] identifier[result] operator[SEP] identifier[getHandshakeStatus] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SSLException] identifier[sslException] operator[SEP] { identifier[engine] operator[SEP] identifier[closeOutbound] operator[SEP] operator[SEP] operator[SEP] identifier[handshakeStatus] operator[=] identifier[engine] operator[SEP] identifier[getHandshakeStatus] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } Keyword[switch] operator[SEP] identifier[result] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] identifier[OK] operator[:] identifier[myNetData] operator[SEP] identifier[flip] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[myNetData] operator[SEP] identifier[hasRemaining] operator[SEP] operator[SEP] operator[SEP] { identifier[socketChannel] operator[SEP] identifier[write] operator[SEP] identifier[myNetData] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[BUFFER_OVERFLOW] operator[:] identifier[myNetData] operator[=] identifier[enlargePacketBuffer] operator[SEP] identifier[myNetData] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[BUFFER_UNDERFLOW] operator[:] Keyword[throw] Keyword[new] identifier[SSLException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[case] identifier[CLOSED] operator[:] Keyword[try] { identifier[myNetData] operator[SEP] identifier[flip] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[myNetData] operator[SEP] identifier[hasRemaining] operator[SEP] operator[SEP] operator[SEP] { identifier[socketChannel] operator[SEP] identifier[write] operator[SEP] identifier[myNetData] operator[SEP] operator[SEP] } identifier[peerNetData] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[handshakeStatus] operator[=] identifier[engine] operator[SEP] identifier[getHandshakeStatus] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[result] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[NEED_TASK] operator[:] identifier[Runnable] identifier[task] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[task] operator[=] identifier[engine] operator[SEP] identifier[getDelegatedTask] operator[SEP] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[executor] operator[SEP] identifier[execute] operator[SEP] identifier[task] operator[SEP] operator[SEP] } identifier[handshakeStatus] operator[=] identifier[engine] operator[SEP] identifier[getHandshakeStatus] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[NOT_HANDSHAKING] operator[:] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[handshakeStatus] operator[SEP] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
private Long getSequence(String sequenceName) { Long result = null; // now lookup the sequence map for calling DB Map mapForDB = (Map) sequencesDBMap.get(getBrokerForClass() .serviceConnectionManager().getConnectionDescriptor().getJcdAlias()); if(mapForDB != null) { result = (Long) mapForDB.get(sequenceName); } return result; }
class class_name[name] begin[{] method[getSequence, return_type[type[Long]], modifier[private], parameter[sequenceName]] begin[{] local_variable[type[Long], result] local_variable[type[Map], mapForDB] if[binary_operation[member[.mapForDB], !=, literal[null]]] begin[{] assign[member[.result], Cast(expression=MethodInvocation(arguments=[MemberReference(member=sequenceName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=mapForDB, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Long, sub_type=None))] else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[private] identifier[Long] identifier[getSequence] operator[SEP] identifier[String] identifier[sequenceName] operator[SEP] { identifier[Long] identifier[result] operator[=] Other[null] operator[SEP] identifier[Map] identifier[mapForDB] operator[=] operator[SEP] identifier[Map] operator[SEP] identifier[sequencesDBMap] operator[SEP] identifier[get] operator[SEP] identifier[getBrokerForClass] operator[SEP] operator[SEP] operator[SEP] identifier[serviceConnectionManager] operator[SEP] operator[SEP] operator[SEP] identifier[getConnectionDescriptor] operator[SEP] operator[SEP] operator[SEP] identifier[getJcdAlias] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mapForDB] operator[!=] Other[null] operator[SEP] { identifier[result] operator[=] operator[SEP] identifier[Long] operator[SEP] identifier[mapForDB] operator[SEP] identifier[get] operator[SEP] identifier[sequenceName] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public void marshall(AwsVpcConfiguration awsVpcConfiguration, ProtocolMarshaller protocolMarshaller) { if (awsVpcConfiguration == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(awsVpcConfiguration.getSubnets(), SUBNETS_BINDING); protocolMarshaller.marshall(awsVpcConfiguration.getSecurityGroups(), SECURITYGROUPS_BINDING); protocolMarshaller.marshall(awsVpcConfiguration.getAssignPublicIp(), ASSIGNPUBLICIP_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[awsVpcConfiguration, protocolMarshaller]] begin[{] if[binary_operation[member[.awsVpcConfiguration], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSubnets, postfix_operators=[], prefix_operators=[], qualifier=awsVpcConfiguration, selectors=[], type_arguments=None), MemberReference(member=SUBNETS_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSecurityGroups, postfix_operators=[], prefix_operators=[], qualifier=awsVpcConfiguration, selectors=[], type_arguments=None), MemberReference(member=SECURITYGROUPS_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAssignPublicIp, postfix_operators=[], prefix_operators=[], qualifier=awsVpcConfiguration, selectors=[], type_arguments=None), MemberReference(member=ASSIGNPUBLICIP_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[AwsVpcConfiguration] identifier[awsVpcConfiguration] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[awsVpcConfiguration] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[awsVpcConfiguration] operator[SEP] identifier[getSubnets] operator[SEP] operator[SEP] , identifier[SUBNETS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[awsVpcConfiguration] operator[SEP] identifier[getSecurityGroups] operator[SEP] operator[SEP] , identifier[SECURITYGROUPS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[awsVpcConfiguration] operator[SEP] identifier[getAssignPublicIp] operator[SEP] operator[SEP] , identifier[ASSIGNPUBLICIP_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
@Override public DeleteVocabularyResult deleteVocabulary(DeleteVocabularyRequest request) { request = beforeClientExecution(request); return executeDeleteVocabulary(request); }
class class_name[name] begin[{] method[deleteVocabulary, return_type[type[DeleteVocabularyResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeDeleteVocabulary, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[DeleteVocabularyResult] identifier[deleteVocabulary] operator[SEP] identifier[DeleteVocabularyRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeDeleteVocabulary] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
@Override public EClass getIfcRelDeclares() { if (ifcRelDeclaresEClass == null) { ifcRelDeclaresEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) .getEClassifiers().get(545); } return ifcRelDeclaresEClass; }
class class_name[name] begin[{] method[getIfcRelDeclares, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcRelDeclaresEClass], ==, literal[null]]] begin[{] assign[member[.ifcRelDeclaresEClass], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=Ifc4Package, selectors=[])], member=getEPackage, postfix_operators=[], prefix_operators=[], qualifier=EPackage.Registry.INSTANCE, selectors=[MethodInvocation(arguments=[], member=getEClassifiers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=545)], 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[.ifcRelDeclaresEClass]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcRelDeclares] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcRelDeclaresEClass] operator[==] Other[null] operator[SEP] { identifier[ifcRelDeclaresEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[Ifc4Package] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[545] operator[SEP] operator[SEP] } Keyword[return] identifier[ifcRelDeclaresEClass] operator[SEP] }
public static void genId(Object target, String property, Class<? extends GenId> genClass, String table, String column) throws MapperException { try { GenId genId; if (CACHE.containsKey(genClass)) { genId = CACHE.get(genClass); } else { LOCK.lock(); try { if (!CACHE.containsKey(genClass)) { CACHE.put(genClass, genClass.newInstance()); } genId = CACHE.get(genClass); } finally { LOCK.unlock(); } } MetaObject metaObject = MetaObjectUtil.forObject(target); if (metaObject.getValue(property) == null) { Object id = genId.genId(table, column); metaObject.setValue(property, id); } } catch (Exception e) { throw new MapperException("生成 ID 失败!", e); } }
class class_name[name] begin[{] method[genId, return_type[void], modifier[public static], parameter[target, property, genClass, table, column]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=genId)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=GenId, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=genClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=CACHE, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=lock, postfix_operators=[], prefix_operators=[], qualifier=LOCK, selectors=[], type_arguments=None), label=None), TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=genClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=['!'], qualifier=CACHE, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=genClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=genClass, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=CACHE, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=genId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=genClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=CACHE, selectors=[], type_arguments=None)), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=unlock, postfix_operators=[], prefix_operators=[], qualifier=LOCK, selectors=[], type_arguments=None), label=None)], label=None, resources=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=genId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=genClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=CACHE, selectors=[], type_arguments=None)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=target, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forObject, postfix_operators=[], prefix_operators=[], qualifier=MetaObjectUtil, selectors=[], type_arguments=None), name=metaObject)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MetaObject, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=property, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=metaObject, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=table, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=column, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=genId, postfix_operators=[], prefix_operators=[], qualifier=genId, selectors=[], type_arguments=None), name=id)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=property, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setValue, postfix_operators=[], prefix_operators=[], qualifier=metaObject, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="生成 ID 失败!"), 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=MapperException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[genId] operator[SEP] identifier[Object] identifier[target] , identifier[String] identifier[property] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[GenId] operator[>] identifier[genClass] , identifier[String] identifier[table] , identifier[String] identifier[column] operator[SEP] Keyword[throws] identifier[MapperException] { Keyword[try] { identifier[GenId] identifier[genId] operator[SEP] Keyword[if] operator[SEP] identifier[CACHE] operator[SEP] identifier[containsKey] operator[SEP] identifier[genClass] operator[SEP] operator[SEP] { identifier[genId] operator[=] identifier[CACHE] operator[SEP] identifier[get] operator[SEP] identifier[genClass] operator[SEP] operator[SEP] } Keyword[else] { identifier[LOCK] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] operator[!] identifier[CACHE] operator[SEP] identifier[containsKey] operator[SEP] identifier[genClass] operator[SEP] operator[SEP] { identifier[CACHE] operator[SEP] identifier[put] operator[SEP] identifier[genClass] , identifier[genClass] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[genId] operator[=] identifier[CACHE] operator[SEP] identifier[get] operator[SEP] identifier[genClass] operator[SEP] operator[SEP] } Keyword[finally] { identifier[LOCK] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP] } } identifier[MetaObject] identifier[metaObject] operator[=] identifier[MetaObjectUtil] operator[SEP] identifier[forObject] operator[SEP] identifier[target] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[metaObject] operator[SEP] identifier[getValue] operator[SEP] identifier[property] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[Object] identifier[id] operator[=] identifier[genId] operator[SEP] identifier[genId] operator[SEP] identifier[table] , identifier[column] operator[SEP] operator[SEP] identifier[metaObject] operator[SEP] identifier[setValue] operator[SEP] identifier[property] , identifier[id] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[MapperException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } }
public String getValueString() { if (current == State.KEY) { return valueStr; } else if (current == State.VALUE_STRING) { return valueStr; } else if (current == State.VALUE_NULL) { return null; } else { throw new IllegalStateException("unexpected state. state=" + current); } }
class class_name[name] begin[{] method[getValueString, return_type[type[String]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.current], ==, member[State.KEY]]] begin[{] return[member[.valueStr]] else begin[{] if[binary_operation[member[.current], ==, member[State.VALUE_STRING]]] begin[{] return[member[.valueStr]] else begin[{] if[binary_operation[member[.current], ==, member[State.VALUE_NULL]]] begin[{] return[literal[null]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="unexpected state. state="), operandr=MemberReference(member=current, 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=IllegalStateException, sub_type=None)), label=None) end[}] end[}] end[}] end[}] END[}]
Keyword[public] identifier[String] identifier[getValueString] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[current] operator[==] identifier[State] operator[SEP] identifier[KEY] operator[SEP] { Keyword[return] identifier[valueStr] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[current] operator[==] identifier[State] operator[SEP] identifier[VALUE_STRING] operator[SEP] { Keyword[return] identifier[valueStr] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[current] operator[==] identifier[State] operator[SEP] identifier[VALUE_NULL] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[current] operator[SEP] operator[SEP] } }
public String addMapDocument(String indexName , Map bean) throws ElasticSearchException{ return addMapDocument( indexName, _doc, bean); }
class class_name[name] begin[{] method[addMapDocument, return_type[type[String]], modifier[public], parameter[indexName, bean]] begin[{] return[call[.addMapDocument, parameter[member[.indexName], member[._doc], member[.bean]]]] end[}] END[}]
Keyword[public] identifier[String] identifier[addMapDocument] operator[SEP] identifier[String] identifier[indexName] , identifier[Map] identifier[bean] operator[SEP] Keyword[throws] identifier[ElasticSearchException] { Keyword[return] identifier[addMapDocument] operator[SEP] identifier[indexName] , identifier[_doc] , identifier[bean] operator[SEP] operator[SEP] }
@Override public void init(final FilterConfig filterConfig) throws ServletException { // verify there are no init parameters configured that are not recognized // since an unrecognized init param might be the adopter trying to configure this filter in // an important way // and accidentally ignoring that intent might have security implications. final Enumeration initParamNames = filterConfig.getInitParameterNames(); throwIfUnrecognizedParamName(initParamNames); final String initParamAllowMultiValuedParameters = filterConfig.getInitParameter(ALLOW_MULTI_VALUED_PARAMETERS); final String initParamParametersToCheck = filterConfig.getInitParameter(PARAMETERS_TO_CHECK); final String initParamCharactersToForbid = filterConfig.getInitParameter(CHARACTERS_TO_FORBID); try { this.allowMultiValueParameters = parseStringToBooleanDefaultingToFalse(initParamAllowMultiValuedParameters); } catch (final Exception e) { throw new ServletException( "Error parsing request parameter [" + ALLOW_MULTI_VALUED_PARAMETERS + "] with value [" + initParamAllowMultiValuedParameters + "]", e); } try { this.parametersToCheck = parseParametersToCheck(initParamParametersToCheck); } catch (final Exception e) { throw new ServletException( "Error parsing request parameter " + PARAMETERS_TO_CHECK + " with value [" + initParamParametersToCheck + "]", e); } try { this.charactersToForbid = parseCharactersToForbid(initParamCharactersToForbid); } catch (final Exception e) { throw new ServletException( "Error parsing request parameter " + CHARACTERS_TO_FORBID + " with value [" + initParamCharactersToForbid + "]", e); } if (this.allowMultiValueParameters && this.charactersToForbid.isEmpty()) { throw new ServletException( "Configuration to allow multi-value parameters and forbid no characters makes " + getClass().getSimpleName() + " a no-op, which is probably not what you want, " + "so failing Filter init."); } }
class class_name[name] begin[{] method[init, return_type[void], modifier[public], parameter[filterConfig]] begin[{] local_variable[type[Enumeration], initParamNames] call[.throwIfUnrecognizedParamName, parameter[member[.initParamNames]]] local_variable[type[String], initParamAllowMultiValuedParameters] local_variable[type[String], initParamParametersToCheck] local_variable[type[String], initParamCharactersToForbid] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=allowMultiValueParameters, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MethodInvocation(arguments=[MemberReference(member=initParamAllowMultiValuedParameters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseStringToBooleanDefaultingToFalse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error parsing request parameter ["), operandr=MemberReference(member=ALLOW_MULTI_VALUED_PARAMETERS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="] with value ["), operator=+), operandr=MemberReference(member=initParamAllowMultiValuedParameters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]"), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServletException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) TryStatement(block=[StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=parametersToCheck, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MethodInvocation(arguments=[MemberReference(member=initParamParametersToCheck, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseParametersToCheck, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error parsing request parameter "), operandr=MemberReference(member=PARAMETERS_TO_CHECK, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" with value ["), operator=+), operandr=MemberReference(member=initParamParametersToCheck, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]"), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServletException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) TryStatement(block=[StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=charactersToForbid, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MethodInvocation(arguments=[MemberReference(member=initParamCharactersToForbid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseCharactersToForbid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error parsing request parameter "), operandr=MemberReference(member=CHARACTERS_TO_FORBID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" with value ["), operator=+), operandr=MemberReference(member=initParamCharactersToForbid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]"), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServletException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) if[binary_operation[THIS[member[None.allowMultiValueParameters]], &&, THIS[member[None.charactersToForbid]call[None.isEmpty, parameter[]]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Configuration to allow multi-value parameters and forbid no characters makes "), operandr=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" a no-op, which is probably not what you want, "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="so failing Filter init."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServletException, sub_type=None)), label=None) else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[init] operator[SEP] Keyword[final] identifier[FilterConfig] identifier[filterConfig] operator[SEP] Keyword[throws] identifier[ServletException] { Keyword[final] identifier[Enumeration] identifier[initParamNames] operator[=] identifier[filterConfig] operator[SEP] identifier[getInitParameterNames] operator[SEP] operator[SEP] operator[SEP] identifier[throwIfUnrecognizedParamName] operator[SEP] identifier[initParamNames] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[initParamAllowMultiValuedParameters] operator[=] identifier[filterConfig] operator[SEP] identifier[getInitParameter] operator[SEP] identifier[ALLOW_MULTI_VALUED_PARAMETERS] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[initParamParametersToCheck] operator[=] identifier[filterConfig] operator[SEP] identifier[getInitParameter] operator[SEP] identifier[PARAMETERS_TO_CHECK] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[initParamCharactersToForbid] operator[=] identifier[filterConfig] operator[SEP] identifier[getInitParameter] operator[SEP] identifier[CHARACTERS_TO_FORBID] operator[SEP] operator[SEP] Keyword[try] { Keyword[this] operator[SEP] identifier[allowMultiValueParameters] operator[=] identifier[parseStringToBooleanDefaultingToFalse] operator[SEP] identifier[initParamAllowMultiValuedParameters] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ServletException] operator[SEP] literal[String] operator[+] identifier[ALLOW_MULTI_VALUED_PARAMETERS] operator[+] literal[String] operator[+] identifier[initParamAllowMultiValuedParameters] operator[+] literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[try] { Keyword[this] operator[SEP] identifier[parametersToCheck] operator[=] identifier[parseParametersToCheck] operator[SEP] identifier[initParamParametersToCheck] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ServletException] operator[SEP] literal[String] operator[+] identifier[PARAMETERS_TO_CHECK] operator[+] literal[String] operator[+] identifier[initParamParametersToCheck] operator[+] literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[try] { Keyword[this] operator[SEP] identifier[charactersToForbid] operator[=] identifier[parseCharactersToForbid] operator[SEP] identifier[initParamCharactersToForbid] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ServletException] operator[SEP] literal[String] operator[+] identifier[CHARACTERS_TO_FORBID] operator[+] literal[String] operator[+] identifier[initParamCharactersToForbid] operator[+] literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[allowMultiValueParameters] operator[&&] Keyword[this] operator[SEP] identifier[charactersToForbid] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[ServletException] operator[SEP] literal[String] operator[+] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] } }
@SuppressWarnings({"rawtypes", "unchecked"}) public PropertyModel<T> build() { if (!isReadable() && !isWritable()) { throw new IllegalStateException(format("Invalid PropertyModel '%s', neither readable or writable,", name)); } return new PropertyModel( stateNotNull("propertyName", name), readName, writeName, stateNotNull("typeData", typeData), codec, stateNotNull("propertySerialization", propertySerialization), discriminatorEnabled, stateNotNull("propertyAccessor", propertyAccessor)); }
class class_name[name] begin[{] method[build, return_type[type[PropertyModel]], modifier[public], parameter[]] begin[{] if[binary_operation[call[.isReadable, parameter[]], &&, call[.isWritable, parameter[]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid PropertyModel '%s', neither readable or writable,"), MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] return[ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="propertyName"), MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=stateNotNull, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=readName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=writeName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="typeData"), MemberReference(member=typeData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=stateNotNull, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=codec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="propertySerialization"), MemberReference(member=propertySerialization, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=stateNotNull, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=discriminatorEnabled, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="propertyAccessor"), MemberReference(member=propertyAccessor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=stateNotNull, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PropertyModel, sub_type=None))] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] { literal[String] , literal[String] } operator[SEP] Keyword[public] identifier[PropertyModel] operator[<] identifier[T] operator[>] identifier[build] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[isReadable] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[isWritable] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[name] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[PropertyModel] operator[SEP] identifier[stateNotNull] operator[SEP] literal[String] , identifier[name] operator[SEP] , identifier[readName] , identifier[writeName] , identifier[stateNotNull] operator[SEP] literal[String] , identifier[typeData] operator[SEP] , identifier[codec] , identifier[stateNotNull] operator[SEP] literal[String] , identifier[propertySerialization] operator[SEP] , identifier[discriminatorEnabled] , identifier[stateNotNull] operator[SEP] literal[String] , identifier[propertyAccessor] operator[SEP] operator[SEP] operator[SEP] }
@Bean public Queue authenticationReceiverQueue() { return QueueBuilder.nonDurable(amqpProperties.getAuthenticationReceiverQueue()).autoDelete() .withArguments(getTTLMaxArgsAuthenticationQueue()).build(); }
class class_name[name] begin[{] method[authenticationReceiverQueue, return_type[type[Queue]], modifier[public], parameter[]] begin[{] return[call[QueueBuilder.nonDurable, parameter[call[amqpProperties.getAuthenticationReceiverQueue, parameter[]]]]] end[}] END[}]
annotation[@] identifier[Bean] Keyword[public] identifier[Queue] identifier[authenticationReceiverQueue] operator[SEP] operator[SEP] { Keyword[return] identifier[QueueBuilder] operator[SEP] identifier[nonDurable] operator[SEP] identifier[amqpProperties] operator[SEP] identifier[getAuthenticationReceiverQueue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[autoDelete] operator[SEP] operator[SEP] operator[SEP] identifier[withArguments] operator[SEP] identifier[getTTLMaxArgsAuthenticationQueue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] }
@Throws(IllegalNullArgumentException.class) public static <T> void notNull(final boolean condition, @Nonnull final T reference) { if (condition) { Check.notNull(reference); } }
class class_name[name] begin[{] method[notNull, return_type[void], modifier[public static], parameter[condition, reference]] begin[{] if[member[.condition]] begin[{] call[Check.notNull, parameter[member[.reference]]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Throws] operator[SEP] identifier[IllegalNullArgumentException] operator[SEP] Keyword[class] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] Keyword[void] identifier[notNull] operator[SEP] Keyword[final] Keyword[boolean] identifier[condition] , annotation[@] identifier[Nonnull] Keyword[final] identifier[T] identifier[reference] operator[SEP] { Keyword[if] operator[SEP] identifier[condition] operator[SEP] { identifier[Check] operator[SEP] identifier[notNull] operator[SEP] identifier[reference] operator[SEP] operator[SEP] } }
public static void sendPulseTimingEvent(RaygunPulseEventType eventType, String name, long milliseconds) { if (RaygunClient.sessionId == null) { sendPulseEvent(RaygunSettings.RUM_EVENT_SESSION_START); } if (eventType == RaygunPulseEventType.ACTIVITY_LOADED) { if (RaygunClient.shouldIgnoreView(name)) { return; } } RaygunPulseMessage message = new RaygunPulseMessage(); RaygunPulseDataMessage dataMessage = new RaygunPulseDataMessage(); SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); df.setTimeZone(TimeZone.getTimeZone("UTC")); Calendar c = Calendar.getInstance(); c.add(Calendar.MILLISECOND, -(int)milliseconds); String timestamp = df.format(c.getTime()); dataMessage.setTimestamp(timestamp); dataMessage.setSessionId(RaygunClient.sessionId); dataMessage.setVersion(RaygunClient.version); dataMessage.setOS("Android"); dataMessage.setOSVersion(Build.VERSION.RELEASE); dataMessage.setPlatform(String.format("%s %s", Build.MANUFACTURER, Build.MODEL)); dataMessage.setType("mobile_event_timing"); RaygunUserContext userContext; if (RaygunClient.userInfo == null) { userContext = new RaygunUserContext(new RaygunUserInfo(null, null, null, null, null, true), RaygunClient.context); } else { userContext = new RaygunUserContext(RaygunClient.userInfo, RaygunClient.context); } dataMessage.setUser(userContext); RaygunPulseData data = new RaygunPulseData(); RaygunPulseTimingMessage timingMessage = new RaygunPulseTimingMessage(); timingMessage.setType(eventType == RaygunPulseEventType.ACTIVITY_LOADED ? "p" : "n"); timingMessage.setDuration(milliseconds); data.setName(name); data.setTiming(timingMessage); RaygunPulseData[] dataArray = new RaygunPulseData[]{ data }; String dataStr = new Gson().toJson(dataArray); dataMessage.setData(dataStr); message.setEventData(new RaygunPulseDataMessage[]{ dataMessage }); enqueueWorkForRUMService(RaygunClient.apiKey, new Gson().toJson(message)); }
class class_name[name] begin[{] method[sendPulseTimingEvent, return_type[void], modifier[public static], parameter[eventType, name, milliseconds]] begin[{] if[binary_operation[member[RaygunClient.sessionId], ==, literal[null]]] begin[{] call[.sendPulseEvent, parameter[member[RaygunSettings.RUM_EVENT_SESSION_START]]] else begin[{] None end[}] if[binary_operation[member[.eventType], ==, member[RaygunPulseEventType.ACTIVITY_LOADED]]] begin[{] if[call[RaygunClient.shouldIgnoreView, parameter[member[.name]]]] begin[{] return[None] else begin[{] None end[}] else begin[{] None end[}] local_variable[type[RaygunPulseMessage], message] local_variable[type[RaygunPulseDataMessage], dataMessage] local_variable[type[SimpleDateFormat], df] call[df.setTimeZone, parameter[call[TimeZone.getTimeZone, parameter[literal["UTC"]]]]] local_variable[type[Calendar], c] call[c.add, parameter[member[Calendar.MILLISECOND], Cast(expression=MemberReference(member=milliseconds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int))]] local_variable[type[String], timestamp] call[dataMessage.setTimestamp, parameter[member[.timestamp]]] call[dataMessage.setSessionId, parameter[member[RaygunClient.sessionId]]] call[dataMessage.setVersion, parameter[member[RaygunClient.version]]] call[dataMessage.setOS, parameter[literal["Android"]]] call[dataMessage.setOSVersion, parameter[member[Build.VERSION.RELEASE]]] call[dataMessage.setPlatform, parameter[call[String.format, parameter[literal["%s %s"], member[Build.MANUFACTURER], member[Build.MODEL]]]]] call[dataMessage.setType, parameter[literal["mobile_event_timing"]]] local_variable[type[RaygunUserContext], userContext] if[binary_operation[member[RaygunClient.userInfo], ==, literal[null]]] begin[{] assign[member[.userContext], ClassCreator(arguments=[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RaygunUserInfo, sub_type=None)), MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=RaygunClient, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RaygunUserContext, sub_type=None))] else begin[{] assign[member[.userContext], ClassCreator(arguments=[MemberReference(member=userInfo, postfix_operators=[], prefix_operators=[], qualifier=RaygunClient, selectors=[]), MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=RaygunClient, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RaygunUserContext, sub_type=None))] end[}] call[dataMessage.setUser, parameter[member[.userContext]]] local_variable[type[RaygunPulseData], data] local_variable[type[RaygunPulseTimingMessage], timingMessage] call[timingMessage.setType, parameter[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=eventType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=ACTIVITY_LOADED, postfix_operators=[], prefix_operators=[], qualifier=RaygunPulseEventType, selectors=[]), operator===), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="n"), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="p"))]] call[timingMessage.setDuration, parameter[member[.milliseconds]]] call[data.setName, parameter[member[.name]]] call[data.setTiming, parameter[member[.timingMessage]]] local_variable[type[RaygunPulseData], dataArray] local_variable[type[String], dataStr] call[dataMessage.setData, parameter[member[.dataStr]]] call[message.setEventData, parameter[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=dataMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RaygunPulseDataMessage, sub_type=None))]] call[.enqueueWorkForRUMService, parameter[member[RaygunClient.apiKey], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toJson, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Gson, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[sendPulseTimingEvent] operator[SEP] identifier[RaygunPulseEventType] identifier[eventType] , identifier[String] identifier[name] , Keyword[long] identifier[milliseconds] operator[SEP] { Keyword[if] operator[SEP] identifier[RaygunClient] operator[SEP] identifier[sessionId] operator[==] Other[null] operator[SEP] { identifier[sendPulseEvent] operator[SEP] identifier[RaygunSettings] operator[SEP] identifier[RUM_EVENT_SESSION_START] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[eventType] operator[==] identifier[RaygunPulseEventType] operator[SEP] identifier[ACTIVITY_LOADED] operator[SEP] { Keyword[if] operator[SEP] identifier[RaygunClient] operator[SEP] identifier[shouldIgnoreView] operator[SEP] identifier[name] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } } identifier[RaygunPulseMessage] identifier[message] operator[=] Keyword[new] identifier[RaygunPulseMessage] operator[SEP] operator[SEP] operator[SEP] identifier[RaygunPulseDataMessage] identifier[dataMessage] operator[=] Keyword[new] identifier[RaygunPulseDataMessage] operator[SEP] operator[SEP] operator[SEP] identifier[SimpleDateFormat] identifier[df] operator[=] Keyword[new] identifier[SimpleDateFormat] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[df] operator[SEP] identifier[setTimeZone] operator[SEP] identifier[TimeZone] operator[SEP] identifier[getTimeZone] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[Calendar] identifier[c] operator[=] identifier[Calendar] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[c] operator[SEP] identifier[add] operator[SEP] identifier[Calendar] operator[SEP] identifier[MILLISECOND] , operator[-] operator[SEP] Keyword[int] operator[SEP] identifier[milliseconds] operator[SEP] operator[SEP] identifier[String] identifier[timestamp] operator[=] identifier[df] operator[SEP] identifier[format] operator[SEP] identifier[c] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[dataMessage] operator[SEP] identifier[setTimestamp] operator[SEP] identifier[timestamp] operator[SEP] operator[SEP] identifier[dataMessage] operator[SEP] identifier[setSessionId] operator[SEP] identifier[RaygunClient] operator[SEP] identifier[sessionId] operator[SEP] operator[SEP] identifier[dataMessage] operator[SEP] identifier[setVersion] operator[SEP] identifier[RaygunClient] operator[SEP] identifier[version] operator[SEP] operator[SEP] identifier[dataMessage] operator[SEP] identifier[setOS] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[dataMessage] operator[SEP] identifier[setOSVersion] operator[SEP] identifier[Build] operator[SEP] identifier[VERSION] operator[SEP] identifier[RELEASE] operator[SEP] operator[SEP] identifier[dataMessage] operator[SEP] identifier[setPlatform] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[Build] operator[SEP] identifier[MANUFACTURER] , identifier[Build] operator[SEP] identifier[MODEL] operator[SEP] operator[SEP] operator[SEP] identifier[dataMessage] operator[SEP] identifier[setType] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[RaygunUserContext] identifier[userContext] operator[SEP] Keyword[if] operator[SEP] identifier[RaygunClient] operator[SEP] identifier[userInfo] operator[==] Other[null] operator[SEP] { identifier[userContext] operator[=] Keyword[new] identifier[RaygunUserContext] operator[SEP] Keyword[new] identifier[RaygunUserInfo] operator[SEP] Other[null] , Other[null] , Other[null] , Other[null] , Other[null] , literal[boolean] operator[SEP] , identifier[RaygunClient] operator[SEP] identifier[context] operator[SEP] operator[SEP] } Keyword[else] { identifier[userContext] operator[=] Keyword[new] identifier[RaygunUserContext] operator[SEP] identifier[RaygunClient] operator[SEP] identifier[userInfo] , identifier[RaygunClient] operator[SEP] identifier[context] operator[SEP] operator[SEP] } identifier[dataMessage] operator[SEP] identifier[setUser] operator[SEP] identifier[userContext] operator[SEP] operator[SEP] identifier[RaygunPulseData] identifier[data] operator[=] Keyword[new] identifier[RaygunPulseData] operator[SEP] operator[SEP] operator[SEP] identifier[RaygunPulseTimingMessage] identifier[timingMessage] operator[=] Keyword[new] identifier[RaygunPulseTimingMessage] operator[SEP] operator[SEP] operator[SEP] identifier[timingMessage] operator[SEP] identifier[setType] operator[SEP] identifier[eventType] operator[==] identifier[RaygunPulseEventType] operator[SEP] identifier[ACTIVITY_LOADED] operator[?] literal[String] operator[:] literal[String] operator[SEP] operator[SEP] identifier[timingMessage] operator[SEP] identifier[setDuration] operator[SEP] identifier[milliseconds] operator[SEP] operator[SEP] identifier[data] operator[SEP] identifier[setName] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[data] operator[SEP] identifier[setTiming] operator[SEP] identifier[timingMessage] operator[SEP] operator[SEP] identifier[RaygunPulseData] operator[SEP] operator[SEP] identifier[dataArray] operator[=] Keyword[new] identifier[RaygunPulseData] operator[SEP] operator[SEP] { identifier[data] } operator[SEP] identifier[String] identifier[dataStr] operator[=] Keyword[new] identifier[Gson] operator[SEP] operator[SEP] operator[SEP] identifier[toJson] operator[SEP] identifier[dataArray] operator[SEP] operator[SEP] identifier[dataMessage] operator[SEP] identifier[setData] operator[SEP] identifier[dataStr] operator[SEP] operator[SEP] identifier[message] operator[SEP] identifier[setEventData] operator[SEP] Keyword[new] identifier[RaygunPulseDataMessage] operator[SEP] operator[SEP] { identifier[dataMessage] } operator[SEP] operator[SEP] identifier[enqueueWorkForRUMService] operator[SEP] identifier[RaygunClient] operator[SEP] identifier[apiKey] , Keyword[new] identifier[Gson] operator[SEP] operator[SEP] operator[SEP] identifier[toJson] operator[SEP] identifier[message] operator[SEP] operator[SEP] operator[SEP] }
public static Engine mamdani() { Engine engine = new Engine(); engine.setName("simple-dimmer"); engine.setDescription(""); InputVariable ambient = new InputVariable(); ambient.setName("ambient"); ambient.setDescription(""); ambient.setEnabled(true); ambient.setRange(0.000, 1.000); ambient.setLockValueInRange(false); ambient.addTerm(new Triangle("DARK", 0.000, 0.250, 0.500)); ambient.addTerm(new Triangle("MEDIUM", 0.250, 0.500, 0.750)); ambient.addTerm(new Triangle("BRIGHT", 0.500, 0.750, 1.000)); engine.addInputVariable(ambient); OutputVariable power = new OutputVariable(); power.setName("power"); power.setDescription(""); power.setEnabled(true); power.setRange(0.000, 2.000); power.setLockValueInRange(false); power.setAggregation(new Maximum()); power.setDefuzzifier(new Centroid(200)); power.setDefaultValue(Double.NaN); power.setLockPreviousValue(false); power.addTerm(new Triangle("LOW", 0.000, 0.500, 1.000)); power.addTerm(new Triangle("MEDIUM", 0.500, 1.000, 1.500)); power.addTerm(new Triangle("HIGH", 1.000, 1.500, 2.000)); engine.addOutputVariable(power); RuleBlock ruleBlock = new RuleBlock(); ruleBlock.setName(""); ruleBlock.setDescription(""); ruleBlock.setEnabled(true); ruleBlock.setConjunction(null); ruleBlock.setDisjunction(null); ruleBlock.setImplication(new Minimum()); ruleBlock.setActivation(new General()); ruleBlock.addRule(Rule.parse("if ambient is DARK then power is HIGH", engine)); ruleBlock.addRule(Rule.parse("if ambient is MEDIUM then power is MEDIUM", engine)); ruleBlock.addRule(Rule.parse("if ambient is BRIGHT then power is LOW", engine)); engine.addRuleBlock(ruleBlock); return engine; }
class class_name[name] begin[{] method[mamdani, return_type[type[Engine]], modifier[public static], parameter[]] begin[{] local_variable[type[Engine], engine] call[engine.setName, parameter[literal["simple-dimmer"]]] call[engine.setDescription, parameter[literal[""]]] local_variable[type[InputVariable], ambient] call[ambient.setName, parameter[literal["ambient"]]] call[ambient.setDescription, parameter[literal[""]]] call[ambient.setEnabled, parameter[literal[true]]] call[ambient.setRange, parameter[literal[0.000], literal[1.000]]] call[ambient.setLockValueInRange, parameter[literal[false]]] call[ambient.addTerm, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DARK"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.000), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.250), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.500)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Triangle, sub_type=None))]] call[ambient.addTerm, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="MEDIUM"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.250), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.500), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.750)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Triangle, sub_type=None))]] call[ambient.addTerm, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="BRIGHT"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.500), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.750), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.000)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Triangle, sub_type=None))]] call[engine.addInputVariable, parameter[member[.ambient]]] local_variable[type[OutputVariable], power] call[power.setName, parameter[literal["power"]]] call[power.setDescription, parameter[literal[""]]] call[power.setEnabled, parameter[literal[true]]] call[power.setRange, parameter[literal[0.000], literal[2.000]]] call[power.setLockValueInRange, parameter[literal[false]]] call[power.setAggregation, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Maximum, sub_type=None))]] call[power.setDefuzzifier, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=200)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Centroid, sub_type=None))]] call[power.setDefaultValue, parameter[member[Double.NaN]]] call[power.setLockPreviousValue, parameter[literal[false]]] call[power.addTerm, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="LOW"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.000), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.500), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.000)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Triangle, sub_type=None))]] call[power.addTerm, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="MEDIUM"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.500), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.000), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.500)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Triangle, sub_type=None))]] call[power.addTerm, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="HIGH"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.000), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.500), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.000)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Triangle, sub_type=None))]] call[engine.addOutputVariable, parameter[member[.power]]] local_variable[type[RuleBlock], ruleBlock] call[ruleBlock.setName, parameter[literal[""]]] call[ruleBlock.setDescription, parameter[literal[""]]] call[ruleBlock.setEnabled, parameter[literal[true]]] call[ruleBlock.setConjunction, parameter[literal[null]]] call[ruleBlock.setDisjunction, parameter[literal[null]]] call[ruleBlock.setImplication, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Minimum, sub_type=None))]] call[ruleBlock.setActivation, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=General, sub_type=None))]] call[ruleBlock.addRule, parameter[call[Rule.parse, parameter[literal["if ambient is DARK then power is HIGH"], member[.engine]]]]] call[ruleBlock.addRule, parameter[call[Rule.parse, parameter[literal["if ambient is MEDIUM then power is MEDIUM"], member[.engine]]]]] call[ruleBlock.addRule, parameter[call[Rule.parse, parameter[literal["if ambient is BRIGHT then power is LOW"], member[.engine]]]]] call[engine.addRuleBlock, parameter[member[.ruleBlock]]] return[member[.engine]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Engine] identifier[mamdani] operator[SEP] operator[SEP] { identifier[Engine] identifier[engine] operator[=] Keyword[new] identifier[Engine] operator[SEP] operator[SEP] operator[SEP] identifier[engine] operator[SEP] identifier[setName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[engine] operator[SEP] identifier[setDescription] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[InputVariable] identifier[ambient] operator[=] Keyword[new] identifier[InputVariable] operator[SEP] operator[SEP] operator[SEP] identifier[ambient] operator[SEP] identifier[setName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[ambient] operator[SEP] identifier[setDescription] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[ambient] operator[SEP] identifier[setEnabled] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[ambient] operator[SEP] identifier[setRange] operator[SEP] literal[Float] , literal[Float] operator[SEP] operator[SEP] identifier[ambient] operator[SEP] identifier[setLockValueInRange] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[ambient] operator[SEP] identifier[addTerm] operator[SEP] Keyword[new] identifier[Triangle] operator[SEP] literal[String] , literal[Float] , literal[Float] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[ambient] operator[SEP] identifier[addTerm] operator[SEP] Keyword[new] identifier[Triangle] operator[SEP] literal[String] , literal[Float] , literal[Float] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[ambient] operator[SEP] identifier[addTerm] operator[SEP] Keyword[new] identifier[Triangle] operator[SEP] literal[String] , literal[Float] , literal[Float] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[engine] operator[SEP] identifier[addInputVariable] operator[SEP] identifier[ambient] operator[SEP] operator[SEP] identifier[OutputVariable] identifier[power] operator[=] Keyword[new] identifier[OutputVariable] operator[SEP] operator[SEP] operator[SEP] identifier[power] operator[SEP] identifier[setName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[power] operator[SEP] identifier[setDescription] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[power] operator[SEP] identifier[setEnabled] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[power] operator[SEP] identifier[setRange] operator[SEP] literal[Float] , literal[Float] operator[SEP] operator[SEP] identifier[power] operator[SEP] identifier[setLockValueInRange] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[power] operator[SEP] identifier[setAggregation] operator[SEP] Keyword[new] identifier[Maximum] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[power] operator[SEP] identifier[setDefuzzifier] operator[SEP] Keyword[new] identifier[Centroid] operator[SEP] Other[200] operator[SEP] operator[SEP] operator[SEP] identifier[power] operator[SEP] identifier[setDefaultValue] operator[SEP] identifier[Double] operator[SEP] identifier[NaN] operator[SEP] operator[SEP] identifier[power] operator[SEP] identifier[setLockPreviousValue] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[power] operator[SEP] identifier[addTerm] operator[SEP] Keyword[new] identifier[Triangle] operator[SEP] literal[String] , literal[Float] , literal[Float] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[power] operator[SEP] identifier[addTerm] operator[SEP] Keyword[new] identifier[Triangle] operator[SEP] literal[String] , literal[Float] , literal[Float] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[power] operator[SEP] identifier[addTerm] operator[SEP] Keyword[new] identifier[Triangle] operator[SEP] literal[String] , literal[Float] , literal[Float] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[engine] operator[SEP] identifier[addOutputVariable] operator[SEP] identifier[power] operator[SEP] operator[SEP] identifier[RuleBlock] identifier[ruleBlock] operator[=] Keyword[new] identifier[RuleBlock] operator[SEP] operator[SEP] operator[SEP] identifier[ruleBlock] operator[SEP] identifier[setName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[ruleBlock] operator[SEP] identifier[setDescription] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[ruleBlock] operator[SEP] identifier[setEnabled] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[ruleBlock] operator[SEP] identifier[setConjunction] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[ruleBlock] operator[SEP] identifier[setDisjunction] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[ruleBlock] operator[SEP] identifier[setImplication] operator[SEP] Keyword[new] identifier[Minimum] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ruleBlock] operator[SEP] identifier[setActivation] operator[SEP] Keyword[new] identifier[General] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ruleBlock] operator[SEP] identifier[addRule] operator[SEP] identifier[Rule] operator[SEP] identifier[parse] operator[SEP] literal[String] , identifier[engine] operator[SEP] operator[SEP] operator[SEP] identifier[ruleBlock] operator[SEP] identifier[addRule] operator[SEP] identifier[Rule] operator[SEP] identifier[parse] operator[SEP] literal[String] , identifier[engine] operator[SEP] operator[SEP] operator[SEP] identifier[ruleBlock] operator[SEP] identifier[addRule] operator[SEP] identifier[Rule] operator[SEP] identifier[parse] operator[SEP] literal[String] , identifier[engine] operator[SEP] operator[SEP] operator[SEP] identifier[engine] operator[SEP] identifier[addRuleBlock] operator[SEP] identifier[ruleBlock] operator[SEP] operator[SEP] Keyword[return] identifier[engine] operator[SEP] }
public Number getCostVariance() { Number variance = (Number) getCachedValue(TaskField.COST_VARIANCE); if (variance == null) { Number cost = getCost(); Number baselineCost = getBaselineCost(); if (cost != null && baselineCost != null) { variance = NumberHelper.getDouble(cost.doubleValue() - baselineCost.doubleValue()); set(TaskField.COST_VARIANCE, variance); } } return (variance); }
class class_name[name] begin[{] method[getCostVariance, return_type[type[Number]], modifier[public], parameter[]] begin[{] local_variable[type[Number], variance] if[binary_operation[member[.variance], ==, literal[null]]] begin[{] local_variable[type[Number], cost] local_variable[type[Number], baselineCost] if[binary_operation[binary_operation[member[.cost], !=, literal[null]], &&, binary_operation[member[.baselineCost], !=, literal[null]]]] begin[{] assign[member[.variance], call[NumberHelper.getDouble, parameter[binary_operation[call[cost.doubleValue, parameter[]], -, call[baselineCost.doubleValue, parameter[]]]]]] call[.set, parameter[member[TaskField.COST_VARIANCE], member[.variance]]] else begin[{] None end[}] else begin[{] None end[}] return[member[.variance]] end[}] END[}]
Keyword[public] identifier[Number] identifier[getCostVariance] operator[SEP] operator[SEP] { identifier[Number] identifier[variance] operator[=] operator[SEP] identifier[Number] operator[SEP] identifier[getCachedValue] operator[SEP] identifier[TaskField] operator[SEP] identifier[COST_VARIANCE] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[variance] operator[==] Other[null] operator[SEP] { identifier[Number] identifier[cost] operator[=] identifier[getCost] operator[SEP] operator[SEP] operator[SEP] identifier[Number] identifier[baselineCost] operator[=] identifier[getBaselineCost] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cost] operator[!=] Other[null] operator[&&] identifier[baselineCost] operator[!=] Other[null] operator[SEP] { identifier[variance] operator[=] identifier[NumberHelper] operator[SEP] identifier[getDouble] operator[SEP] identifier[cost] operator[SEP] identifier[doubleValue] operator[SEP] operator[SEP] operator[-] identifier[baselineCost] operator[SEP] identifier[doubleValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[set] operator[SEP] identifier[TaskField] operator[SEP] identifier[COST_VARIANCE] , identifier[variance] operator[SEP] operator[SEP] } } Keyword[return] operator[SEP] identifier[variance] operator[SEP] operator[SEP] }
private MarkdownDocStream pendingBreak() { if(newline == Newline.NONE) { return this; } out.append(newline == Newline.BREAK ? "\\\n" : newline == Newline.PAR ? "\n\n" : "\n"); for(int i = indent, j = i; i > 0; i -= j) { out.append(WHITESPACES, 0, (j = i > WHITESPACES.length() ? WHITESPACES.length() : i)); } newline = Newline.NONE; return this; }
class class_name[name] begin[{] method[pendingBreak, return_type[type[MarkdownDocStream]], modifier[private], parameter[]] begin[{] if[binary_operation[member[.newline], ==, member[Newline.NONE]]] begin[{] return[THIS[]] else begin[{] None end[}] call[out.append, parameter[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=newline, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=BREAK, postfix_operators=[], prefix_operators=[], qualifier=Newline, selectors=[]), operator===), if_false=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=newline, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=PAR, postfix_operators=[], prefix_operators=[], qualifier=Newline, selectors=[]), operator===), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n"), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n\n")), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\\\n"))]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=WHITESPACES, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Assignment(expressionl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=WHITESPACES, selectors=[], type_arguments=None), operator=>), if_false=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=WHITESPACES, selectors=[], type_arguments=None)))], member=append, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=indent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=i), VariableDeclarator(dimensions=[], initializer=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=-=, value=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), label=None) assign[member[.newline], member[Newline.NONE]] return[THIS[]] end[}] END[}]
Keyword[private] identifier[MarkdownDocStream] identifier[pendingBreak] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[newline] operator[==] identifier[Newline] operator[SEP] identifier[NONE] operator[SEP] { Keyword[return] Keyword[this] operator[SEP] } identifier[out] operator[SEP] identifier[append] operator[SEP] identifier[newline] operator[==] identifier[Newline] operator[SEP] identifier[BREAK] operator[?] literal[String] operator[:] identifier[newline] operator[==] identifier[Newline] operator[SEP] identifier[PAR] operator[?] literal[String] operator[:] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[indent] , identifier[j] operator[=] identifier[i] operator[SEP] identifier[i] operator[>] Other[0] operator[SEP] identifier[i] operator[-=] identifier[j] operator[SEP] { identifier[out] operator[SEP] identifier[append] operator[SEP] identifier[WHITESPACES] , Other[0] , operator[SEP] identifier[j] operator[=] identifier[i] operator[>] identifier[WHITESPACES] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[?] identifier[WHITESPACES] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[:] identifier[i] operator[SEP] operator[SEP] operator[SEP] } identifier[newline] operator[=] identifier[Newline] operator[SEP] identifier[NONE] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public PutInventoryRequest withItems(InventoryItem... items) { if (this.items == null) { setItems(new com.amazonaws.internal.SdkInternalList<InventoryItem>(items.length)); } for (InventoryItem ele : items) { this.items.add(ele); } return this; }
class class_name[name] begin[{] method[withItems, return_type[type[PutInventoryRequest]], modifier[public], parameter[items]] begin[{] if[binary_operation[THIS[member[None.items]], ==, literal[null]]] begin[{] call[.setItems, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=items, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=amazonaws, sub_type=ReferenceType(arguments=None, dimensions=None, name=internal, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=InventoryItem, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=items, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=items, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ele)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InventoryItem, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[PutInventoryRequest] identifier[withItems] operator[SEP] identifier[InventoryItem] operator[...] identifier[items] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[items] operator[==] Other[null] operator[SEP] { identifier[setItems] operator[SEP] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[InventoryItem] operator[>] operator[SEP] identifier[items] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[InventoryItem] identifier[ele] operator[:] identifier[items] operator[SEP] { Keyword[this] operator[SEP] identifier[items] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
private static void setupPaths( PathsType paths) { File voltDbRoot; // Handles default voltdbroot (and completely missing "paths" element). voltDbRoot = getVoltDbRoot(paths); //Snapshot setupSnapshotPaths(paths.getSnapshots(), voltDbRoot); //export overflow setupExportOverflow(paths.getExportoverflow(), voltDbRoot); // only use these directories in the enterprise version setupCommandLog(paths.getCommandlog(), voltDbRoot); setupCommandLogSnapshot(paths.getCommandlogsnapshot(), voltDbRoot); setupDROverflow(paths.getDroverflow(), voltDbRoot); setupLargeQuerySwap(paths.getLargequeryswap(), voltDbRoot); }
class class_name[name] begin[{] method[setupPaths, return_type[void], modifier[private static], parameter[paths]] begin[{] local_variable[type[File], voltDbRoot] assign[member[.voltDbRoot], call[.getVoltDbRoot, parameter[member[.paths]]]] call[.setupSnapshotPaths, parameter[call[paths.getSnapshots, parameter[]], member[.voltDbRoot]]] call[.setupExportOverflow, parameter[call[paths.getExportoverflow, parameter[]], member[.voltDbRoot]]] call[.setupCommandLog, parameter[call[paths.getCommandlog, parameter[]], member[.voltDbRoot]]] call[.setupCommandLogSnapshot, parameter[call[paths.getCommandlogsnapshot, parameter[]], member[.voltDbRoot]]] call[.setupDROverflow, parameter[call[paths.getDroverflow, parameter[]], member[.voltDbRoot]]] call[.setupLargeQuerySwap, parameter[call[paths.getLargequeryswap, parameter[]], member[.voltDbRoot]]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[setupPaths] operator[SEP] identifier[PathsType] identifier[paths] operator[SEP] { identifier[File] identifier[voltDbRoot] operator[SEP] identifier[voltDbRoot] operator[=] identifier[getVoltDbRoot] operator[SEP] identifier[paths] operator[SEP] operator[SEP] identifier[setupSnapshotPaths] operator[SEP] identifier[paths] operator[SEP] identifier[getSnapshots] operator[SEP] operator[SEP] , identifier[voltDbRoot] operator[SEP] operator[SEP] identifier[setupExportOverflow] operator[SEP] identifier[paths] operator[SEP] identifier[getExportoverflow] operator[SEP] operator[SEP] , identifier[voltDbRoot] operator[SEP] operator[SEP] identifier[setupCommandLog] operator[SEP] identifier[paths] operator[SEP] identifier[getCommandlog] operator[SEP] operator[SEP] , identifier[voltDbRoot] operator[SEP] operator[SEP] identifier[setupCommandLogSnapshot] operator[SEP] identifier[paths] operator[SEP] identifier[getCommandlogsnapshot] operator[SEP] operator[SEP] , identifier[voltDbRoot] operator[SEP] operator[SEP] identifier[setupDROverflow] operator[SEP] identifier[paths] operator[SEP] identifier[getDroverflow] operator[SEP] operator[SEP] , identifier[voltDbRoot] operator[SEP] operator[SEP] identifier[setupLargeQuerySwap] operator[SEP] identifier[paths] operator[SEP] identifier[getLargequeryswap] operator[SEP] operator[SEP] , identifier[voltDbRoot] operator[SEP] operator[SEP] }
private void setTaskStart() { m_taskRecord.setProperty(TaskRecord.PROP_EXECUTOR, m_hostID); m_taskRecord.setProperty(TaskRecord.PROP_START_TIME, Long.toString(System.currentTimeMillis())); m_taskRecord.setProperty(TaskRecord.PROP_FINISH_TIME, null); m_taskRecord.setProperty(TaskRecord.PROP_PROGRESS, null); m_taskRecord.setProperty(TaskRecord.PROP_PROGRESS_TIME, null); m_taskRecord.setProperty(TaskRecord.PROP_FAIL_REASON, null); m_taskRecord.setStatus(TaskStatus.IN_PROGRESS); TaskManagerService.instance().updateTaskStatus(m_tenant, m_taskRecord, false); }
class class_name[name] begin[{] method[setTaskStart, return_type[void], modifier[private], parameter[]] begin[{] call[m_taskRecord.setProperty, parameter[member[TaskRecord.PROP_EXECUTOR], member[.m_hostID]]] call[m_taskRecord.setProperty, parameter[member[TaskRecord.PROP_START_TIME], call[Long.toString, parameter[call[System.currentTimeMillis, parameter[]]]]]] call[m_taskRecord.setProperty, parameter[member[TaskRecord.PROP_FINISH_TIME], literal[null]]] call[m_taskRecord.setProperty, parameter[member[TaskRecord.PROP_PROGRESS], literal[null]]] call[m_taskRecord.setProperty, parameter[member[TaskRecord.PROP_PROGRESS_TIME], literal[null]]] call[m_taskRecord.setProperty, parameter[member[TaskRecord.PROP_FAIL_REASON], literal[null]]] call[m_taskRecord.setStatus, parameter[member[TaskStatus.IN_PROGRESS]]] call[TaskManagerService.instance, parameter[]] end[}] END[}]
Keyword[private] Keyword[void] identifier[setTaskStart] operator[SEP] operator[SEP] { identifier[m_taskRecord] operator[SEP] identifier[setProperty] operator[SEP] identifier[TaskRecord] operator[SEP] identifier[PROP_EXECUTOR] , identifier[m_hostID] operator[SEP] operator[SEP] identifier[m_taskRecord] operator[SEP] identifier[setProperty] operator[SEP] identifier[TaskRecord] operator[SEP] identifier[PROP_START_TIME] , identifier[Long] operator[SEP] identifier[toString] operator[SEP] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[m_taskRecord] operator[SEP] identifier[setProperty] operator[SEP] identifier[TaskRecord] operator[SEP] identifier[PROP_FINISH_TIME] , Other[null] operator[SEP] operator[SEP] identifier[m_taskRecord] operator[SEP] identifier[setProperty] operator[SEP] identifier[TaskRecord] operator[SEP] identifier[PROP_PROGRESS] , Other[null] operator[SEP] operator[SEP] identifier[m_taskRecord] operator[SEP] identifier[setProperty] operator[SEP] identifier[TaskRecord] operator[SEP] identifier[PROP_PROGRESS_TIME] , Other[null] operator[SEP] operator[SEP] identifier[m_taskRecord] operator[SEP] identifier[setProperty] operator[SEP] identifier[TaskRecord] operator[SEP] identifier[PROP_FAIL_REASON] , Other[null] operator[SEP] operator[SEP] identifier[m_taskRecord] operator[SEP] identifier[setStatus] operator[SEP] identifier[TaskStatus] operator[SEP] identifier[IN_PROGRESS] operator[SEP] operator[SEP] identifier[TaskManagerService] operator[SEP] identifier[instance] operator[SEP] operator[SEP] operator[SEP] identifier[updateTaskStatus] operator[SEP] identifier[m_tenant] , identifier[m_taskRecord] , literal[boolean] operator[SEP] operator[SEP] }
private static MultiMap<Integer,Integer> convertMergesToAssignments( List<Merge> merges, int numOriginalClusters) { MultiMap<Integer,Integer> clusterToElements = new HashMultiMap<Integer,Integer>(); for (int i = 0; i < numOriginalClusters; ++i) clusterToElements.put(i, i); for (Merge m : merges) { clusterToElements.putMany(m.remainingCluster(), clusterToElements.remove(m.mergedCluster())); } return clusterToElements; }
class class_name[name] begin[{] method[convertMergesToAssignments, return_type[type[MultiMap]], modifier[private static], parameter[merges, numOriginalClusters]] begin[{] local_variable[type[MultiMap], clusterToElements] ForStatement(body=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=clusterToElements, selectors=[], type_arguments=None), label=None), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=numOriginalClusters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None) ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=remainingCluster, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=mergedCluster, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None)], member=remove, postfix_operators=[], prefix_operators=[], qualifier=clusterToElements, selectors=[], type_arguments=None)], member=putMany, postfix_operators=[], prefix_operators=[], qualifier=clusterToElements, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=merges, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=m)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Merge, sub_type=None))), label=None) return[member[.clusterToElements]] end[}] END[}]
Keyword[private] Keyword[static] identifier[MultiMap] operator[<] identifier[Integer] , identifier[Integer] operator[>] identifier[convertMergesToAssignments] operator[SEP] identifier[List] operator[<] identifier[Merge] operator[>] identifier[merges] , Keyword[int] identifier[numOriginalClusters] operator[SEP] { identifier[MultiMap] operator[<] identifier[Integer] , identifier[Integer] operator[>] identifier[clusterToElements] operator[=] Keyword[new] identifier[HashMultiMap] operator[<] identifier[Integer] , identifier[Integer] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[numOriginalClusters] operator[SEP] operator[++] identifier[i] operator[SEP] identifier[clusterToElements] operator[SEP] identifier[put] operator[SEP] identifier[i] , identifier[i] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Merge] identifier[m] operator[:] identifier[merges] operator[SEP] { identifier[clusterToElements] operator[SEP] identifier[putMany] operator[SEP] identifier[m] operator[SEP] identifier[remainingCluster] operator[SEP] operator[SEP] , identifier[clusterToElements] operator[SEP] identifier[remove] operator[SEP] identifier[m] operator[SEP] identifier[mergedCluster] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[clusterToElements] operator[SEP] }
public ServiceFuture<OperationStatus> updateHierarchicalEntityRoleAsync(UUID appId, String versionId, UUID hEntityId, UUID roleId, UpdateHierarchicalEntityRoleOptionalParameter updateHierarchicalEntityRoleOptionalParameter, final ServiceCallback<OperationStatus> serviceCallback) { return ServiceFuture.fromResponse(updateHierarchicalEntityRoleWithServiceResponseAsync(appId, versionId, hEntityId, roleId, updateHierarchicalEntityRoleOptionalParameter), serviceCallback); }
class class_name[name] begin[{] method[updateHierarchicalEntityRoleAsync, return_type[type[ServiceFuture]], modifier[public], parameter[appId, versionId, hEntityId, roleId, updateHierarchicalEntityRoleOptionalParameter, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.updateHierarchicalEntityRoleWithServiceResponseAsync, parameter[member[.appId], member[.versionId], member[.hEntityId], member[.roleId], member[.updateHierarchicalEntityRoleOptionalParameter]]], member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[OperationStatus] operator[>] identifier[updateHierarchicalEntityRoleAsync] operator[SEP] identifier[UUID] identifier[appId] , identifier[String] identifier[versionId] , identifier[UUID] identifier[hEntityId] , identifier[UUID] identifier[roleId] , identifier[UpdateHierarchicalEntityRoleOptionalParameter] identifier[updateHierarchicalEntityRoleOptionalParameter] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[OperationStatus] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromResponse] operator[SEP] identifier[updateHierarchicalEntityRoleWithServiceResponseAsync] operator[SEP] identifier[appId] , identifier[versionId] , identifier[hEntityId] , identifier[roleId] , identifier[updateHierarchicalEntityRoleOptionalParameter] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP] }
public static <E> RingBuffer<E> create( ProducerType producerType, EventFactory<E> factory, int bufferSize, WaitStrategy waitStrategy) { switch (producerType) { case SINGLE: return createSingleProducer(factory, bufferSize, waitStrategy); case MULTI: return createMultiProducer(factory, bufferSize, waitStrategy); default: throw new IllegalStateException(producerType.toString()); } }
class class_name[name] begin[{] method[create, return_type[type[RingBuffer]], modifier[public static], parameter[producerType, factory, bufferSize, waitStrategy]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['SINGLE'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=factory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=bufferSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=waitStrategy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createSingleProducer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=['MULTI'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=factory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=bufferSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=waitStrategy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createMultiProducer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=producerType, selectors=[], type_arguments=None)], 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)])], expression=MemberReference(member=producerType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[E] operator[>] identifier[RingBuffer] operator[<] identifier[E] operator[>] identifier[create] operator[SEP] identifier[ProducerType] identifier[producerType] , identifier[EventFactory] operator[<] identifier[E] operator[>] identifier[factory] , Keyword[int] identifier[bufferSize] , identifier[WaitStrategy] identifier[waitStrategy] operator[SEP] { Keyword[switch] operator[SEP] identifier[producerType] operator[SEP] { Keyword[case] identifier[SINGLE] operator[:] Keyword[return] identifier[createSingleProducer] operator[SEP] identifier[factory] , identifier[bufferSize] , identifier[waitStrategy] operator[SEP] operator[SEP] Keyword[case] identifier[MULTI] operator[:] Keyword[return] identifier[createMultiProducer] operator[SEP] identifier[factory] , identifier[bufferSize] , identifier[waitStrategy] operator[SEP] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] identifier[producerType] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public void setLoggerContext(LoggerContext lc) { this.lc = lc; this.logger = lc.getLogger(getClass().getPackage().getName()); }
class class_name[name] begin[{] method[setLoggerContext, return_type[void], modifier[public], parameter[lc]] begin[{] assign[THIS[member[None.lc]], member[.lc]] assign[THIS[member[None.logger]], call[lc.getLogger, parameter[call[.getClass, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setLoggerContext] operator[SEP] identifier[LoggerContext] identifier[lc] operator[SEP] { Keyword[this] operator[SEP] identifier[lc] operator[=] identifier[lc] operator[SEP] Keyword[this] operator[SEP] identifier[logger] operator[=] identifier[lc] operator[SEP] identifier[getLogger] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getPackage] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
protected Map session(){ Map session; try{ SimpleHash sessionHash = (SimpleHash)get("session"); session = sessionHash.toMap(); }catch(Exception e){ logger().warn("failed to get a session map in context, returning session without data!!!", e); session = new HashMap(); } return Collections.unmodifiableMap(session); }
class class_name[name] begin[{] method[session, return_type[type[Map]], modifier[protected], parameter[]] begin[{] local_variable[type[Map], session] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="session")], member=get, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=SimpleHash, sub_type=None)), name=sessionHash)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SimpleHash, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=toMap, postfix_operators=[], prefix_operators=[], qualifier=sessionHash, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=logger, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="failed to get a session map in context, returning session without data!!!"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HashMap, 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[call[Collections.unmodifiableMap, parameter[member[.session]]]] end[}] END[}]
Keyword[protected] identifier[Map] identifier[session] operator[SEP] operator[SEP] { identifier[Map] identifier[session] operator[SEP] Keyword[try] { identifier[SimpleHash] identifier[sessionHash] operator[=] operator[SEP] identifier[SimpleHash] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[session] operator[=] identifier[sessionHash] operator[SEP] identifier[toMap] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[logger] operator[SEP] operator[SEP] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] identifier[session] operator[=] Keyword[new] identifier[HashMap] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[Collections] operator[SEP] identifier[unmodifiableMap] operator[SEP] identifier[session] operator[SEP] operator[SEP] }
protected void deactivate(ComponentContext context) { deactivated = true; if (mbean != null) mbean.unregister(); if (taskStore != null) DatabaseTaskStore.unget(persistentStore); appTrackerRef.deactivate(context); contextSvcRef.deactivate(context); controllerRef.deactivate(context); localTranCurrentRef.deactivate(context); serializationSvcRef.deactivate(context); tranMgrRef.deactivate(context); }
class class_name[name] begin[{] method[deactivate, return_type[void], modifier[protected], parameter[context]] begin[{] assign[member[.deactivated], literal[true]] if[binary_operation[member[.mbean], !=, literal[null]]] begin[{] call[mbean.unregister, parameter[]] else begin[{] None end[}] if[binary_operation[member[.taskStore], !=, literal[null]]] begin[{] call[DatabaseTaskStore.unget, parameter[member[.persistentStore]]] else begin[{] None end[}] call[appTrackerRef.deactivate, parameter[member[.context]]] call[contextSvcRef.deactivate, parameter[member[.context]]] call[controllerRef.deactivate, parameter[member[.context]]] call[localTranCurrentRef.deactivate, parameter[member[.context]]] call[serializationSvcRef.deactivate, parameter[member[.context]]] call[tranMgrRef.deactivate, parameter[member[.context]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[deactivate] operator[SEP] identifier[ComponentContext] identifier[context] operator[SEP] { identifier[deactivated] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[mbean] operator[!=] Other[null] operator[SEP] identifier[mbean] operator[SEP] identifier[unregister] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[taskStore] operator[!=] Other[null] operator[SEP] identifier[DatabaseTaskStore] operator[SEP] identifier[unget] operator[SEP] identifier[persistentStore] operator[SEP] operator[SEP] identifier[appTrackerRef] operator[SEP] identifier[deactivate] operator[SEP] identifier[context] operator[SEP] operator[SEP] identifier[contextSvcRef] operator[SEP] identifier[deactivate] operator[SEP] identifier[context] operator[SEP] operator[SEP] identifier[controllerRef] operator[SEP] identifier[deactivate] operator[SEP] identifier[context] operator[SEP] operator[SEP] identifier[localTranCurrentRef] operator[SEP] identifier[deactivate] operator[SEP] identifier[context] operator[SEP] operator[SEP] identifier[serializationSvcRef] operator[SEP] identifier[deactivate] operator[SEP] identifier[context] operator[SEP] operator[SEP] identifier[tranMgrRef] operator[SEP] identifier[deactivate] operator[SEP] identifier[context] operator[SEP] operator[SEP] }
@Override public void write(ProjectFile projectFile, OutputStream stream) throws IOException { try { if (CONTEXT == null) { throw CONTEXT_EXCEPTION; } // // The Primavera schema defines elements as nillable, which by // default results in // JAXB generating elements like this <element xsl:nil="true"/> // whereas Primavera itself simply omits these elements. // // The XSLT stylesheet below transforms the XML generated by JAXB on // the fly to remove any nil elements. // TransformerFactory transFact = TransformerFactory.newInstance(); TransformerHandler handler = ((SAXTransformerFactory) transFact).newTransformerHandler(new StreamSource(new ByteArrayInputStream(NILLABLE_STYLESHEET.getBytes()))); handler.setResult(new StreamResult(stream)); Transformer transformer = handler.getTransformer(); try { transformer.setOutputProperty(OutputKeys.INDENT, "yes"); transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2"); } catch (Exception ex) { // https://sourceforge.net/p/mpxj/bugs/291/ // Output indentation is a nice to have. // If we're working with a transformer which doesn't // support it, swallow any errors raised trying to configure it. } m_projectFile = projectFile; Marshaller marshaller = CONTEXT.createMarshaller(); marshaller.setProperty(Marshaller.JAXB_SCHEMA_LOCATION, ""); m_factory = new ObjectFactory(); m_apibo = m_factory.createAPIBusinessObjects(); configureCustomFields(); populateSortedCustomFieldsList(); writeCurrency(); writeUserFieldDefinitions(); writeProjectProperties(); writeCalendars(); writeResources(); writeTasks(); writeAssignments(); marshaller.marshal(m_apibo, handler); } catch (JAXBException ex) { throw new IOException(ex.toString()); } catch (TransformerConfigurationException ex) { throw new IOException(ex.toString()); } finally { m_projectFile = null; m_factory = null; m_apibo = null; m_project = null; m_wbsSequence = 0; m_relationshipObjectID = 0; m_sortedCustomFieldsList = null; } }
class class_name[name] begin[{] method[write, return_type[void], modifier[public], parameter[projectFile, stream]] begin[{] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=CONTEXT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=MemberReference(member=CONTEXT_EXCEPTION, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=TransformerFactory, selectors=[], type_arguments=None), name=transFact)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TransformerFactory, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=transFact, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=SAXTransformerFactory, sub_type=None)), name=handler)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TransformerHandler, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=stream, 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=StreamResult, sub_type=None))], member=setResult, postfix_operators=[], prefix_operators=[], qualifier=handler, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getTransformer, postfix_operators=[], prefix_operators=[], qualifier=handler, selectors=[], type_arguments=None), name=transformer)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Transformer, sub_type=None)), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=INDENT, postfix_operators=[], prefix_operators=[], qualifier=OutputKeys, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="yes")], member=setOutputProperty, postfix_operators=[], prefix_operators=[], qualifier=transformer, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="{http://xml.apache.org/xslt}indent-amount"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="2")], member=setOutputProperty, postfix_operators=[], prefix_operators=[], qualifier=transformer, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=m_projectFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=projectFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=createMarshaller, postfix_operators=[], prefix_operators=[], qualifier=CONTEXT, selectors=[], type_arguments=None), name=marshaller)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Marshaller, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=JAXB_SCHEMA_LOCATION, postfix_operators=[], prefix_operators=[], qualifier=Marshaller, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=setProperty, postfix_operators=[], prefix_operators=[], qualifier=marshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=m_factory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ObjectFactory, sub_type=None))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=m_apibo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=createAPIBusinessObjects, postfix_operators=[], prefix_operators=[], qualifier=m_factory, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=configureCustomFields, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=populateSortedCustomFieldsList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=writeCurrency, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=writeUserFieldDefinitions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=writeProjectProperties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=writeCalendars, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=writeResources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=writeTasks, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=writeAssignments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=m_apibo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=handler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshal, postfix_operators=[], prefix_operators=[], qualifier=marshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['JAXBException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['TransformerConfigurationException']))], finally_block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=m_projectFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=m_factory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=m_apibo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=m_project, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=m_wbsSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=m_relationshipObjectID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=m_sortedCustomFieldsList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None)], label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[write] operator[SEP] identifier[ProjectFile] identifier[projectFile] , identifier[OutputStream] identifier[stream] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[try] { Keyword[if] operator[SEP] identifier[CONTEXT] operator[==] Other[null] operator[SEP] { Keyword[throw] identifier[CONTEXT_EXCEPTION] operator[SEP] } identifier[TransformerFactory] identifier[transFact] operator[=] identifier[TransformerFactory] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] identifier[TransformerHandler] identifier[handler] operator[=] operator[SEP] operator[SEP] identifier[SAXTransformerFactory] operator[SEP] identifier[transFact] operator[SEP] operator[SEP] identifier[newTransformerHandler] operator[SEP] Keyword[new] identifier[StreamSource] operator[SEP] Keyword[new] identifier[ByteArrayInputStream] operator[SEP] identifier[NILLABLE_STYLESHEET] operator[SEP] identifier[getBytes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[handler] operator[SEP] identifier[setResult] operator[SEP] Keyword[new] identifier[StreamResult] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[Transformer] identifier[transformer] operator[=] identifier[handler] operator[SEP] identifier[getTransformer] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[transformer] operator[SEP] identifier[setOutputProperty] operator[SEP] identifier[OutputKeys] operator[SEP] identifier[INDENT] , literal[String] operator[SEP] operator[SEP] identifier[transformer] operator[SEP] identifier[setOutputProperty] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { } identifier[m_projectFile] operator[=] identifier[projectFile] operator[SEP] identifier[Marshaller] identifier[marshaller] operator[=] identifier[CONTEXT] operator[SEP] identifier[createMarshaller] operator[SEP] operator[SEP] operator[SEP] identifier[marshaller] operator[SEP] identifier[setProperty] operator[SEP] identifier[Marshaller] operator[SEP] identifier[JAXB_SCHEMA_LOCATION] , literal[String] operator[SEP] operator[SEP] identifier[m_factory] operator[=] Keyword[new] identifier[ObjectFactory] operator[SEP] operator[SEP] operator[SEP] identifier[m_apibo] operator[=] identifier[m_factory] operator[SEP] identifier[createAPIBusinessObjects] operator[SEP] operator[SEP] operator[SEP] identifier[configureCustomFields] operator[SEP] operator[SEP] operator[SEP] identifier[populateSortedCustomFieldsList] operator[SEP] operator[SEP] operator[SEP] identifier[writeCurrency] operator[SEP] operator[SEP] operator[SEP] identifier[writeUserFieldDefinitions] operator[SEP] operator[SEP] operator[SEP] identifier[writeProjectProperties] operator[SEP] operator[SEP] operator[SEP] identifier[writeCalendars] operator[SEP] operator[SEP] operator[SEP] identifier[writeResources] operator[SEP] operator[SEP] operator[SEP] identifier[writeTasks] operator[SEP] operator[SEP] operator[SEP] identifier[writeAssignments] operator[SEP] operator[SEP] operator[SEP] identifier[marshaller] operator[SEP] identifier[marshal] operator[SEP] identifier[m_apibo] , identifier[handler] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[JAXBException] identifier[ex] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] identifier[ex] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[TransformerConfigurationException] identifier[ex] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] identifier[ex] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { identifier[m_projectFile] operator[=] Other[null] operator[SEP] identifier[m_factory] operator[=] Other[null] operator[SEP] identifier[m_apibo] operator[=] Other[null] operator[SEP] identifier[m_project] operator[=] Other[null] operator[SEP] identifier[m_wbsSequence] operator[=] Other[0] operator[SEP] identifier[m_relationshipObjectID] operator[=] Other[0] operator[SEP] identifier[m_sortedCustomFieldsList] operator[=] Other[null] operator[SEP] } }
public DateParam toDateParam(FhirContext theContext) { DateParam retVal = new DateParam(); retVal.setValueAsQueryToken(theContext, null, null, getValueAsQueryToken(theContext)); return retVal; }
class class_name[name] begin[{] method[toDateParam, return_type[type[DateParam]], modifier[public], parameter[theContext]] begin[{] local_variable[type[DateParam], retVal] call[retVal.setValueAsQueryToken, parameter[member[.theContext], literal[null], literal[null], call[.getValueAsQueryToken, parameter[member[.theContext]]]]] return[member[.retVal]] end[}] END[}]
Keyword[public] identifier[DateParam] identifier[toDateParam] operator[SEP] identifier[FhirContext] identifier[theContext] operator[SEP] { identifier[DateParam] identifier[retVal] operator[=] Keyword[new] identifier[DateParam] operator[SEP] operator[SEP] operator[SEP] identifier[retVal] operator[SEP] identifier[setValueAsQueryToken] operator[SEP] identifier[theContext] , Other[null] , Other[null] , identifier[getValueAsQueryToken] operator[SEP] identifier[theContext] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[retVal] operator[SEP] }
public ProcessEngineConfiguration addWsEndpointAddress(QName endpointName, URL address) { this.wsOverridenEndpointAddresses.put(endpointName, address); return this; }
class class_name[name] begin[{] method[addWsEndpointAddress, return_type[type[ProcessEngineConfiguration]], modifier[public], parameter[endpointName, address]] begin[{] THIS[member[None.wsOverridenEndpointAddresses]call[None.put, parameter[member[.endpointName], member[.address]]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[ProcessEngineConfiguration] identifier[addWsEndpointAddress] operator[SEP] identifier[QName] identifier[endpointName] , identifier[URL] identifier[address] operator[SEP] { Keyword[this] operator[SEP] identifier[wsOverridenEndpointAddresses] operator[SEP] identifier[put] operator[SEP] identifier[endpointName] , identifier[address] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public void setCornerColor(int index, Color color) { if (!isGradation()) { for (int i = 0; i < 4; i++) { cornerColor[i] = new RGBColor(0.0, 0.0, 0.0); cornerColor[i] = this.fillColor; } setGradation(true); } cornerColor[index] = color; }
class class_name[name] begin[{] method[setCornerColor, return_type[void], modifier[public], parameter[index, color]] begin[{] if[call[.isGradation, parameter[]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=cornerColor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.0)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RGBColor, sub_type=None))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=cornerColor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=fillColor, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) call[.setGradation, parameter[literal[true]]] else begin[{] None end[}] assign[member[.cornerColor], member[.color]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setCornerColor] operator[SEP] Keyword[int] identifier[index] , identifier[Color] identifier[color] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[isGradation] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] Other[4] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[cornerColor] operator[SEP] identifier[i] operator[SEP] operator[=] Keyword[new] identifier[RGBColor] operator[SEP] literal[Float] , literal[Float] , literal[Float] operator[SEP] operator[SEP] identifier[cornerColor] operator[SEP] identifier[i] operator[SEP] operator[=] Keyword[this] operator[SEP] identifier[fillColor] operator[SEP] } identifier[setGradation] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } identifier[cornerColor] operator[SEP] identifier[index] operator[SEP] operator[=] identifier[color] operator[SEP] }
public final Object invokeNextInterceptor(InvocationContext ctx, VisitableCommand command) throws Throwable { Object maybeStage = nextInterceptor.visitCommand(ctx, command); if (maybeStage instanceof SimpleAsyncInvocationStage) { return ((InvocationStage) maybeStage).get(); } else { return maybeStage; } }
class class_name[name] begin[{] method[invokeNextInterceptor, return_type[type[Object]], modifier[final public], parameter[ctx, command]] begin[{] local_variable[type[Object], maybeStage] if[binary_operation[member[.maybeStage], instanceof, type[SimpleAsyncInvocationStage]]] begin[{] return[Cast(expression=MemberReference(member=maybeStage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=InvocationStage, sub_type=None))] else begin[{] return[member[.maybeStage]] end[}] end[}] END[}]
Keyword[public] Keyword[final] identifier[Object] identifier[invokeNextInterceptor] operator[SEP] identifier[InvocationContext] identifier[ctx] , identifier[VisitableCommand] identifier[command] operator[SEP] Keyword[throws] identifier[Throwable] { identifier[Object] identifier[maybeStage] operator[=] identifier[nextInterceptor] operator[SEP] identifier[visitCommand] operator[SEP] identifier[ctx] , identifier[command] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[maybeStage] Keyword[instanceof] identifier[SimpleAsyncInvocationStage] operator[SEP] { Keyword[return] operator[SEP] operator[SEP] identifier[InvocationStage] operator[SEP] identifier[maybeStage] operator[SEP] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[maybeStage] operator[SEP] } }
public static void copyTypeParametersFromJvmOperation(List<JvmTypeParameter> inputParameters, List<JvmTypeParameter> outputParameters, Map<String, JvmTypeReference> superTypeParameterMapping, JvmTypeReferenceBuilder typeParameterBuilder, JvmTypesBuilder typeBuilder, TypeReferences typeReferences, TypesFactory jvmTypesFactory) { // Copy the generic types in two steps: first step is the name's copy. for (final JvmTypeParameter typeParameter : inputParameters) { final JvmTypeParameter typeParameterCopy = jvmTypesFactory.createJvmTypeParameter(); typeParameterCopy.setName(typeParameter.getName()); outputParameters.add(typeParameterCopy); } // Second step is the constraints' copy for (int i = 0; i < inputParameters.size(); ++i) { final JvmTypeParameter typeParameter = inputParameters.get(i); final JvmTypeParameter typeParameterCopy = outputParameters.get(i); for (final JvmTypeConstraint constraint : typeParameter.getConstraints()) { JvmTypeConstraint cst = null; if (constraint instanceof JvmLowerBound) { cst = jvmTypesFactory.createJvmLowerBound(); } else if (constraint instanceof JvmUpperBound) { cst = jvmTypesFactory.createJvmUpperBound(); } if (cst != null) { typeParameterCopy.getConstraints().add(cst); cst.setTypeReference(cloneWithTypeParametersAndProxies( constraint.getTypeReference(), outputParameters, superTypeParameterMapping, typeParameterBuilder, typeBuilder, typeReferences, jvmTypesFactory)); } } } }
class class_name[name] begin[{] method[copyTypeParametersFromJvmOperation, return_type[void], modifier[public static], parameter[inputParameters, outputParameters, superTypeParameterMapping, typeParameterBuilder, typeBuilder, typeReferences, jvmTypesFactory]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=createJvmTypeParameter, postfix_operators=[], prefix_operators=[], qualifier=jvmTypesFactory, selectors=[], type_arguments=None), name=typeParameterCopy)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=JvmTypeParameter, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=typeParameter, selectors=[], type_arguments=None)], member=setName, postfix_operators=[], prefix_operators=[], qualifier=typeParameterCopy, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=typeParameterCopy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=outputParameters, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=inputParameters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=typeParameter)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=JvmTypeParameter, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=inputParameters, selectors=[], type_arguments=None), name=typeParameter)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=JvmTypeParameter, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=outputParameters, selectors=[], type_arguments=None), name=typeParameterCopy)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=JvmTypeParameter, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=cst)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JvmTypeConstraint, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=constraint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=JvmLowerBound, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=constraint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=JvmUpperBound, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=cst, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=createJvmUpperBound, postfix_operators=[], prefix_operators=[], qualifier=jvmTypesFactory, selectors=[], type_arguments=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=cst, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=createJvmLowerBound, postfix_operators=[], prefix_operators=[], qualifier=jvmTypesFactory, selectors=[], type_arguments=None)), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=cst, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getConstraints, postfix_operators=[], prefix_operators=[], qualifier=typeParameterCopy, selectors=[MethodInvocation(arguments=[MemberReference(member=cst, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTypeReference, postfix_operators=[], prefix_operators=[], qualifier=constraint, selectors=[], type_arguments=None), MemberReference(member=outputParameters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=superTypeParameterMapping, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=typeParameterBuilder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=typeBuilder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=typeReferences, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=jvmTypesFactory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=cloneWithTypeParametersAndProxies, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=setTypeReference, postfix_operators=[], prefix_operators=[], qualifier=cst, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getConstraints, postfix_operators=[], prefix_operators=[], qualifier=typeParameter, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=constraint)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=JvmTypeConstraint, sub_type=None))), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=inputParameters, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[copyTypeParametersFromJvmOperation] operator[SEP] identifier[List] operator[<] identifier[JvmTypeParameter] operator[>] identifier[inputParameters] , identifier[List] operator[<] identifier[JvmTypeParameter] operator[>] identifier[outputParameters] , identifier[Map] operator[<] identifier[String] , identifier[JvmTypeReference] operator[>] identifier[superTypeParameterMapping] , identifier[JvmTypeReferenceBuilder] identifier[typeParameterBuilder] , identifier[JvmTypesBuilder] identifier[typeBuilder] , identifier[TypeReferences] identifier[typeReferences] , identifier[TypesFactory] identifier[jvmTypesFactory] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] identifier[JvmTypeParameter] identifier[typeParameter] operator[:] identifier[inputParameters] operator[SEP] { Keyword[final] identifier[JvmTypeParameter] identifier[typeParameterCopy] operator[=] identifier[jvmTypesFactory] operator[SEP] identifier[createJvmTypeParameter] operator[SEP] operator[SEP] operator[SEP] identifier[typeParameterCopy] operator[SEP] identifier[setName] operator[SEP] identifier[typeParameter] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[outputParameters] operator[SEP] identifier[add] operator[SEP] identifier[typeParameterCopy] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[inputParameters] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[++] identifier[i] operator[SEP] { Keyword[final] identifier[JvmTypeParameter] identifier[typeParameter] operator[=] identifier[inputParameters] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[final] identifier[JvmTypeParameter] identifier[typeParameterCopy] operator[=] identifier[outputParameters] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[JvmTypeConstraint] identifier[constraint] operator[:] identifier[typeParameter] operator[SEP] identifier[getConstraints] operator[SEP] operator[SEP] operator[SEP] { identifier[JvmTypeConstraint] identifier[cst] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[constraint] Keyword[instanceof] identifier[JvmLowerBound] operator[SEP] { identifier[cst] operator[=] identifier[jvmTypesFactory] operator[SEP] identifier[createJvmLowerBound] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[constraint] Keyword[instanceof] identifier[JvmUpperBound] operator[SEP] { identifier[cst] operator[=] identifier[jvmTypesFactory] operator[SEP] identifier[createJvmUpperBound] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[cst] operator[!=] Other[null] operator[SEP] { identifier[typeParameterCopy] operator[SEP] identifier[getConstraints] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[cst] operator[SEP] operator[SEP] identifier[cst] operator[SEP] identifier[setTypeReference] operator[SEP] identifier[cloneWithTypeParametersAndProxies] operator[SEP] identifier[constraint] operator[SEP] identifier[getTypeReference] operator[SEP] operator[SEP] , identifier[outputParameters] , identifier[superTypeParameterMapping] , identifier[typeParameterBuilder] , identifier[typeBuilder] , identifier[typeReferences] , identifier[jvmTypesFactory] operator[SEP] operator[SEP] operator[SEP] } } } }
private void setUpdatedAtFromDefinition(@Nullable Long updatedAt) { if (updatedAt != null && updatedAt > definition.getUpdatedAt()) { setUpdatedAt(updatedAt); } }
class class_name[name] begin[{] method[setUpdatedAtFromDefinition, return_type[void], modifier[private], parameter[updatedAt]] begin[{] if[binary_operation[binary_operation[member[.updatedAt], !=, literal[null]], &&, binary_operation[member[.updatedAt], >, call[definition.getUpdatedAt, parameter[]]]]] begin[{] call[.setUpdatedAt, parameter[member[.updatedAt]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[setUpdatedAtFromDefinition] operator[SEP] annotation[@] identifier[Nullable] identifier[Long] identifier[updatedAt] operator[SEP] { Keyword[if] operator[SEP] identifier[updatedAt] operator[!=] Other[null] operator[&&] identifier[updatedAt] operator[>] identifier[definition] operator[SEP] identifier[getUpdatedAt] operator[SEP] operator[SEP] operator[SEP] { identifier[setUpdatedAt] operator[SEP] identifier[updatedAt] operator[SEP] operator[SEP] } }
private void cleanupWorkingDirectory() throws IOException { LOGGER.info("Deleting persisted work units for job " + this.jobContext.getJobId()); stateStores.getWuStateStore().delete(this.jobContext.getJobId()); // delete the directory that stores the task state files stateStores.getTaskStateStore().delete(outputTaskStateDir.getName()); LOGGER.info("Deleting job state file for job " + this.jobContext.getJobId()); if (this.stateStores.haveJobStateStore()) { this.stateStores.getJobStateStore().delete(this.jobContext.getJobId()); } else { Path jobStateFilePath = GobblinClusterUtils.getJobStateFilePath(false, this.appWorkDir, this.jobContext.getJobId()); this.fs.delete(jobStateFilePath, false); } }
class class_name[name] begin[{] method[cleanupWorkingDirectory, return_type[void], modifier[private], parameter[]] begin[{] call[LOGGER.info, parameter[binary_operation[literal["Deleting persisted work units for job "], +, THIS[member[None.jobContext]call[None.getJobId, parameter[]]]]]] call[stateStores.getWuStateStore, parameter[]] call[stateStores.getTaskStateStore, parameter[]] call[LOGGER.info, parameter[binary_operation[literal["Deleting job state file for job "], +, THIS[member[None.jobContext]call[None.getJobId, parameter[]]]]]] if[THIS[member[None.stateStores]call[None.haveJobStateStore, parameter[]]]] begin[{] THIS[member[None.stateStores]call[None.getJobStateStore, parameter[]]call[None.delete, parameter[THIS[member[None.jobContext]call[None.getJobId, parameter[]]]]]] else begin[{] local_variable[type[Path], jobStateFilePath] THIS[member[None.fs]call[None.delete, parameter[member[.jobStateFilePath], literal[false]]]] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[cleanupWorkingDirectory] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] Keyword[this] operator[SEP] identifier[jobContext] operator[SEP] identifier[getJobId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[stateStores] operator[SEP] identifier[getWuStateStore] operator[SEP] operator[SEP] operator[SEP] identifier[delete] operator[SEP] Keyword[this] operator[SEP] identifier[jobContext] operator[SEP] identifier[getJobId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[stateStores] operator[SEP] identifier[getTaskStateStore] operator[SEP] operator[SEP] operator[SEP] identifier[delete] operator[SEP] identifier[outputTaskStateDir] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] Keyword[this] operator[SEP] identifier[jobContext] operator[SEP] identifier[getJobId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[stateStores] operator[SEP] identifier[haveJobStateStore] operator[SEP] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[stateStores] operator[SEP] identifier[getJobStateStore] operator[SEP] operator[SEP] operator[SEP] identifier[delete] operator[SEP] Keyword[this] operator[SEP] identifier[jobContext] operator[SEP] identifier[getJobId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[Path] identifier[jobStateFilePath] operator[=] identifier[GobblinClusterUtils] operator[SEP] identifier[getJobStateFilePath] operator[SEP] literal[boolean] , Keyword[this] operator[SEP] identifier[appWorkDir] , Keyword[this] operator[SEP] identifier[jobContext] operator[SEP] identifier[getJobId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[fs] operator[SEP] identifier[delete] operator[SEP] identifier[jobStateFilePath] , literal[boolean] operator[SEP] operator[SEP] } }
public Object evaluate() { if( !isCompileTimeConstant() ) { return super.evaluate(); } Object lhsValue = getLHS().evaluate(); Object rhsValue = getRHS().evaluate(); IType lhsType = getLHS().getType(); IType rhsType = getRHS().getType(); if( _strOperator.equals( ">" ) ) { if( BeanAccess.isNumericType( lhsType ) ) { return compareNumbers( lhsValue, rhsValue, lhsType, rhsType ) > 0; } else { if( BeanAccess.isBeanType( lhsType ) ) { if( BeanAccess.isBeanType( rhsType ) ) { if( lhsType.isAssignableFrom( rhsType ) ) { if( JavaTypes.COMPARABLE().isAssignableFrom( lhsType ) ) { //noinspection unchecked return ((Comparable)lhsValue).compareTo( rhsValue ) > 0; } } } } } } else if( _strOperator.equals( "<" ) ) { if( BeanAccess.isNumericType( lhsType ) ) { return compareNumbers( lhsValue, rhsValue, lhsType, rhsType ) < 0; } else { if( BeanAccess.isBeanType( lhsType ) ) { if( BeanAccess.isBeanType( rhsType ) ) { if( lhsType.isAssignableFrom( rhsType ) ) { if( JavaTypes.COMPARABLE().isAssignableFrom( lhsType ) ) { //noinspection unchecked return ((Comparable)lhsValue).compareTo( rhsValue ) < 0; } } } } } } else if( _strOperator.equals( ">=" ) ) { if( BeanAccess.isNumericType( lhsType ) ) { return compareNumbers( lhsValue, rhsValue, lhsType, rhsType ) >= 0; } else { if( BeanAccess.isBeanType( lhsType ) ) { if( BeanAccess.isBeanType( rhsType ) ) { if( lhsType.isAssignableFrom( rhsType ) ) { if( JavaTypes.COMPARABLE().isAssignableFrom( lhsType ) ) { //noinspection unchecked return ((Comparable)lhsValue).compareTo( rhsValue ) >= 0; } } } } } } else // if( _strOperator.equals( "<=" ) ) { if( BeanAccess.isNumericType( lhsType ) ) { return compareNumbers( lhsValue, rhsValue, lhsType, rhsType ) <= 0; } else { if( BeanAccess.isBeanType( lhsType ) ) { if( BeanAccess.isBeanType( rhsType ) ) { if( lhsType.isAssignableFrom( rhsType ) ) { if( JavaTypes.COMPARABLE().isAssignableFrom( lhsType ) ) { //noinspection unchecked return ((Comparable)lhsValue).compareTo( rhsValue ) <= 0; } } } } } } throw new UnsupportedOperationException( "Operands are not compile-time constants.\n" + "(see http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#5313)" ); }
class class_name[name] begin[{] method[evaluate, return_type[type[Object]], modifier[public], parameter[]] begin[{] if[call[.isCompileTimeConstant, parameter[]]] begin[{] return[SuperMethodInvocation(arguments=[], member=evaluate, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] else begin[{] None end[}] local_variable[type[Object], lhsValue] local_variable[type[Object], rhsValue] local_variable[type[IType], lhsType] local_variable[type[IType], rhsType] if[call[_strOperator.equals, parameter[literal[">"]]]] begin[{] if[call[BeanAccess.isNumericType, parameter[member[.lhsType]]]] begin[{] return[binary_operation[call[.compareNumbers, parameter[member[.lhsValue], member[.rhsValue], member[.lhsType], member[.rhsType]]], >, literal[0]]] else begin[{] if[call[BeanAccess.isBeanType, parameter[member[.lhsType]]]] begin[{] if[call[BeanAccess.isBeanType, parameter[member[.rhsType]]]] begin[{] if[call[lhsType.isAssignableFrom, parameter[member[.rhsType]]]] begin[{] if[call[JavaTypes.COMPARABLE, parameter[]]] begin[{] return[binary_operation[Cast(expression=MemberReference(member=lhsValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Comparable, sub_type=None)), >, literal[0]]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] end[}] else begin[{] if[call[_strOperator.equals, parameter[literal["<"]]]] begin[{] if[call[BeanAccess.isNumericType, parameter[member[.lhsType]]]] begin[{] return[binary_operation[call[.compareNumbers, parameter[member[.lhsValue], member[.rhsValue], member[.lhsType], member[.rhsType]]], <, literal[0]]] else begin[{] if[call[BeanAccess.isBeanType, parameter[member[.lhsType]]]] begin[{] if[call[BeanAccess.isBeanType, parameter[member[.rhsType]]]] begin[{] if[call[lhsType.isAssignableFrom, parameter[member[.rhsType]]]] begin[{] if[call[JavaTypes.COMPARABLE, parameter[]]] begin[{] return[binary_operation[Cast(expression=MemberReference(member=lhsValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Comparable, sub_type=None)), <, literal[0]]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] end[}] else begin[{] if[call[_strOperator.equals, parameter[literal[">="]]]] begin[{] if[call[BeanAccess.isNumericType, parameter[member[.lhsType]]]] begin[{] return[binary_operation[call[.compareNumbers, parameter[member[.lhsValue], member[.rhsValue], member[.lhsType], member[.rhsType]]], >=, literal[0]]] else begin[{] if[call[BeanAccess.isBeanType, parameter[member[.lhsType]]]] begin[{] if[call[BeanAccess.isBeanType, parameter[member[.rhsType]]]] begin[{] if[call[lhsType.isAssignableFrom, parameter[member[.rhsType]]]] begin[{] if[call[JavaTypes.COMPARABLE, parameter[]]] begin[{] return[binary_operation[Cast(expression=MemberReference(member=lhsValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Comparable, sub_type=None)), >=, literal[0]]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] end[}] else begin[{] if[call[BeanAccess.isNumericType, parameter[member[.lhsType]]]] begin[{] return[binary_operation[call[.compareNumbers, parameter[member[.lhsValue], member[.rhsValue], member[.lhsType], member[.rhsType]]], <=, literal[0]]] else begin[{] if[call[BeanAccess.isBeanType, parameter[member[.lhsType]]]] begin[{] if[call[BeanAccess.isBeanType, parameter[member[.rhsType]]]] begin[{] if[call[lhsType.isAssignableFrom, parameter[member[.rhsType]]]] begin[{] if[call[JavaTypes.COMPARABLE, parameter[]]] begin[{] return[binary_operation[Cast(expression=MemberReference(member=lhsValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Comparable, sub_type=None)), <=, literal[0]]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] end[}] end[}] end[}] end[}] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Operands are not compile-time constants.\n"), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="(see http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#5313)"), operator=+)], 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) end[}] END[}]
Keyword[public] identifier[Object] identifier[evaluate] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[isCompileTimeConstant] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Keyword[super] operator[SEP] identifier[evaluate] operator[SEP] operator[SEP] operator[SEP] } identifier[Object] identifier[lhsValue] operator[=] identifier[getLHS] operator[SEP] operator[SEP] operator[SEP] identifier[evaluate] operator[SEP] operator[SEP] operator[SEP] identifier[Object] identifier[rhsValue] operator[=] identifier[getRHS] operator[SEP] operator[SEP] operator[SEP] identifier[evaluate] operator[SEP] operator[SEP] operator[SEP] identifier[IType] identifier[lhsType] operator[=] identifier[getLHS] operator[SEP] operator[SEP] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[IType] identifier[rhsType] operator[=] identifier[getRHS] operator[SEP] operator[SEP] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_strOperator] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[BeanAccess] operator[SEP] identifier[isNumericType] operator[SEP] identifier[lhsType] operator[SEP] operator[SEP] { Keyword[return] identifier[compareNumbers] operator[SEP] identifier[lhsValue] , identifier[rhsValue] , identifier[lhsType] , identifier[rhsType] operator[SEP] operator[>] Other[0] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[BeanAccess] operator[SEP] identifier[isBeanType] operator[SEP] identifier[lhsType] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[BeanAccess] operator[SEP] identifier[isBeanType] operator[SEP] identifier[rhsType] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[lhsType] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[rhsType] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[JavaTypes] operator[SEP] identifier[COMPARABLE] operator[SEP] operator[SEP] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[lhsType] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] operator[SEP] identifier[Comparable] operator[SEP] identifier[lhsValue] operator[SEP] operator[SEP] identifier[compareTo] operator[SEP] identifier[rhsValue] operator[SEP] operator[>] Other[0] operator[SEP] } } } } } } Keyword[else] Keyword[if] operator[SEP] identifier[_strOperator] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[BeanAccess] operator[SEP] identifier[isNumericType] operator[SEP] identifier[lhsType] operator[SEP] operator[SEP] { Keyword[return] identifier[compareNumbers] operator[SEP] identifier[lhsValue] , identifier[rhsValue] , identifier[lhsType] , identifier[rhsType] operator[SEP] operator[<] Other[0] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[BeanAccess] operator[SEP] identifier[isBeanType] operator[SEP] identifier[lhsType] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[BeanAccess] operator[SEP] identifier[isBeanType] operator[SEP] identifier[rhsType] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[lhsType] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[rhsType] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[JavaTypes] operator[SEP] identifier[COMPARABLE] operator[SEP] operator[SEP] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[lhsType] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] operator[SEP] identifier[Comparable] operator[SEP] identifier[lhsValue] operator[SEP] operator[SEP] identifier[compareTo] operator[SEP] identifier[rhsValue] operator[SEP] operator[<] Other[0] operator[SEP] } } } } } } Keyword[else] Keyword[if] operator[SEP] identifier[_strOperator] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[BeanAccess] operator[SEP] identifier[isNumericType] operator[SEP] identifier[lhsType] operator[SEP] operator[SEP] { Keyword[return] identifier[compareNumbers] operator[SEP] identifier[lhsValue] , identifier[rhsValue] , identifier[lhsType] , identifier[rhsType] operator[SEP] operator[>=] Other[0] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[BeanAccess] operator[SEP] identifier[isBeanType] operator[SEP] identifier[lhsType] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[BeanAccess] operator[SEP] identifier[isBeanType] operator[SEP] identifier[rhsType] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[lhsType] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[rhsType] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[JavaTypes] operator[SEP] identifier[COMPARABLE] operator[SEP] operator[SEP] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[lhsType] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] operator[SEP] identifier[Comparable] operator[SEP] identifier[lhsValue] operator[SEP] operator[SEP] identifier[compareTo] operator[SEP] identifier[rhsValue] operator[SEP] operator[>=] Other[0] operator[SEP] } } } } } } Keyword[else] { Keyword[if] operator[SEP] identifier[BeanAccess] operator[SEP] identifier[isNumericType] operator[SEP] identifier[lhsType] operator[SEP] operator[SEP] { Keyword[return] identifier[compareNumbers] operator[SEP] identifier[lhsValue] , identifier[rhsValue] , identifier[lhsType] , identifier[rhsType] operator[SEP] operator[<=] Other[0] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[BeanAccess] operator[SEP] identifier[isBeanType] operator[SEP] identifier[lhsType] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[BeanAccess] operator[SEP] identifier[isBeanType] operator[SEP] identifier[rhsType] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[lhsType] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[rhsType] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[JavaTypes] operator[SEP] identifier[COMPARABLE] operator[SEP] operator[SEP] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[lhsType] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] operator[SEP] identifier[Comparable] operator[SEP] identifier[lhsValue] operator[SEP] operator[SEP] identifier[compareTo] operator[SEP] identifier[rhsValue] operator[SEP] operator[<=] Other[0] operator[SEP] } } } } } } Keyword[throw] Keyword[new] identifier[UnsupportedOperationException] operator[SEP] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] }
@Warmup(iterations = 5) @Measurement(iterations = 5) @Benchmark public void structLoggerLogging1Call() { structLoggerNoMessageParametrization.info("Event with double and boolean") .varDouble(1.2) .varBoolean(false) .log(); }
class class_name[name] begin[{] method[structLoggerLogging1Call, return_type[void], modifier[public], parameter[]] begin[{] call[structLoggerNoMessageParametrization.info, parameter[literal["Event with double and boolean"]]] end[}] END[}]
annotation[@] identifier[Warmup] operator[SEP] identifier[iterations] operator[=] Other[5] operator[SEP] annotation[@] identifier[Measurement] operator[SEP] identifier[iterations] operator[=] Other[5] operator[SEP] annotation[@] identifier[Benchmark] Keyword[public] Keyword[void] identifier[structLoggerLogging1Call] operator[SEP] operator[SEP] { identifier[structLoggerNoMessageParametrization] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[varDouble] operator[SEP] literal[Float] operator[SEP] operator[SEP] identifier[varBoolean] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[log] operator[SEP] operator[SEP] operator[SEP] }
public static String encode(String value, String charset) { String result = null; if (!StringUtils.isEmpty(value)) { try { result = URLEncoder.encode(value, charset); } catch (IOException e) { throw new RuntimeException(e); } } return result; }
class class_name[name] begin[{] method[encode, return_type[type[String]], modifier[public static], parameter[value, charset]] begin[{] local_variable[type[String], result] if[call[StringUtils.isEmpty, parameter[member[.value]]]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=charset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=encode, postfix_operators=[], prefix_operators=[], qualifier=URLEncoder, 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=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[encode] operator[SEP] identifier[String] identifier[value] , identifier[String] identifier[charset] operator[SEP] { identifier[String] identifier[result] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[StringUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[value] operator[SEP] operator[SEP] { Keyword[try] { identifier[result] operator[=] identifier[URLEncoder] operator[SEP] identifier[encode] operator[SEP] identifier[value] , identifier[charset] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } Keyword[return] identifier[result] operator[SEP] }
private List<String> getFileNames() throws IOException { if (fileNames == null) { fileNames = new ArrayList<>(); timeStepsPerFile = tDim.getSize(); if (!isTemplate()) { // single file fileNames.add(getFullPath(getDataFile())); } else { // figure out template type long start = System.currentTimeMillis(); List<String> fileSet = new ArrayList<>(); String template = getDataFile(); if (GradsTimeDimension.hasTimeTemplate(template)) { if (template.contains(GradsEnsembleDimension.ENS_TEMPLATE_ID)) { templateType = ENS_TIME_TEMPLATE; } else { templateType = TIME_TEMPLATE; } } else { // not time - either ens or chsub if (template.contains(GradsEnsembleDimension.ENS_TEMPLATE_ID)) { templateType = ENS_TEMPLATE; } else { templateType = TIME_TEMPLATE; } } if (templateType == ENS_TEMPLATE) { for (int e = 0; e < eDim.getSize(); e++) { fileSet.add( getFullPath( eDim.replaceFileTemplate(template, e))); } } else if ((templateType == TIME_TEMPLATE) || (templateType == ENS_TIME_TEMPLATE)) { int numens = (templateType == TIME_TEMPLATE) ? 1 : eDim.getSize(); for (int t = 0; t < tDim.getSize(); t++) { for (int e = 0; e < numens; e++) { String file = getFileName(e, t); if (!fileSet.contains(file)) { fileSet.add(file); } } } // this'll be a bogus number if chsub was used timeStepsPerFile = tDim.getSize() / (fileSet.size() / numens); } //System.out.println("Time to generate file list = " // + (System.currentTimeMillis() - start)); fileNames.addAll(fileSet); } //long start2 = System.currentTimeMillis(); // now make sure they exist for (String file : fileNames) { File f = new File(file); if (!f.exists()) { log.error("File: " + f + " does not exist"); throw new IOException("File: " + f + " does not exist"); } } //System.out.println("Time to check file list = " // + (System.currentTimeMillis() - start2)); } return fileNames; }
class class_name[name] begin[{] method[getFileNames, return_type[type[List]], modifier[private], parameter[]] begin[{] if[binary_operation[member[.fileNames], ==, literal[null]]] begin[{] assign[member[.fileNames], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None))] assign[member[.timeStepsPerFile], call[tDim.getSize, parameter[]]] if[call[.isTemplate, parameter[]]] begin[{] call[fileNames.add, parameter[call[.getFullPath, parameter[call[.getDataFile, parameter[]]]]]] else begin[{] local_variable[type[long], start] local_variable[type[List], fileSet] local_variable[type[String], template] if[call[GradsTimeDimension.hasTimeTemplate, parameter[member[.template]]]] begin[{] if[call[template.contains, parameter[member[GradsEnsembleDimension.ENS_TEMPLATE_ID]]]] begin[{] assign[member[.templateType], member[.ENS_TIME_TEMPLATE]] else begin[{] assign[member[.templateType], member[.TIME_TEMPLATE]] end[}] else begin[{] if[call[template.contains, parameter[member[GradsEnsembleDimension.ENS_TEMPLATE_ID]]]] begin[{] assign[member[.templateType], member[.ENS_TEMPLATE]] else begin[{] assign[member[.templateType], member[.TIME_TEMPLATE]] end[}] end[}] if[binary_operation[member[.templateType], ==, member[.ENS_TEMPLATE]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=template, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=replaceFileTemplate, postfix_operators=[], prefix_operators=[], qualifier=eDim, selectors=[], type_arguments=None)], member=getFullPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=fileSet, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getSize, postfix_operators=[], prefix_operators=[], qualifier=eDim, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=e)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=e, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) else begin[{] if[binary_operation[binary_operation[member[.templateType], ==, member[.TIME_TEMPLATE]], ||, binary_operation[member[.templateType], ==, member[.ENS_TIME_TEMPLATE]]]] begin[{] local_variable[type[int], numens] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getFileName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=file)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=['!'], qualifier=fileSet, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=fileSet, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=numens, 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=e)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=e, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getSize, postfix_operators=[], prefix_operators=[], qualifier=tDim, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=t)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=t, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) assign[member[.timeStepsPerFile], binary_operation[call[tDim.getSize, parameter[]], /, binary_operation[call[fileSet.size, parameter[]], /, member[.numens]]]] else begin[{] None end[}] end[}] call[fileNames.addAll, parameter[member[.fileSet]]] end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None)), name=f)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=exists, postfix_operators=[], prefix_operators=['!'], qualifier=f, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="File: "), operandr=MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" does not exist"), operator=+)], member=error, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="File: "), operandr=MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" does not exist"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=fileNames, 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=String, sub_type=None))), label=None) else begin[{] None end[}] return[member[.fileNames]] end[}] END[}]
Keyword[private] identifier[List] operator[<] identifier[String] operator[>] identifier[getFileNames] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[fileNames] operator[==] Other[null] operator[SEP] { identifier[fileNames] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[timeStepsPerFile] operator[=] identifier[tDim] operator[SEP] identifier[getSize] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isTemplate] operator[SEP] operator[SEP] operator[SEP] { identifier[fileNames] operator[SEP] identifier[add] operator[SEP] identifier[getFullPath] operator[SEP] identifier[getDataFile] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[long] identifier[start] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[fileSet] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[template] operator[=] identifier[getDataFile] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[GradsTimeDimension] operator[SEP] identifier[hasTimeTemplate] operator[SEP] identifier[template] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[template] operator[SEP] identifier[contains] operator[SEP] identifier[GradsEnsembleDimension] operator[SEP] identifier[ENS_TEMPLATE_ID] operator[SEP] operator[SEP] { identifier[templateType] operator[=] identifier[ENS_TIME_TEMPLATE] operator[SEP] } Keyword[else] { identifier[templateType] operator[=] identifier[TIME_TEMPLATE] operator[SEP] } } Keyword[else] { Keyword[if] operator[SEP] identifier[template] operator[SEP] identifier[contains] operator[SEP] identifier[GradsEnsembleDimension] operator[SEP] identifier[ENS_TEMPLATE_ID] operator[SEP] operator[SEP] { identifier[templateType] operator[=] identifier[ENS_TEMPLATE] operator[SEP] } Keyword[else] { identifier[templateType] operator[=] identifier[TIME_TEMPLATE] operator[SEP] } } Keyword[if] operator[SEP] identifier[templateType] operator[==] identifier[ENS_TEMPLATE] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[e] operator[=] Other[0] operator[SEP] identifier[e] operator[<] identifier[eDim] operator[SEP] identifier[getSize] operator[SEP] operator[SEP] operator[SEP] identifier[e] operator[++] operator[SEP] { identifier[fileSet] operator[SEP] identifier[add] operator[SEP] identifier[getFullPath] operator[SEP] identifier[eDim] operator[SEP] identifier[replaceFileTemplate] operator[SEP] identifier[template] , identifier[e] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] operator[SEP] identifier[templateType] operator[==] identifier[TIME_TEMPLATE] operator[SEP] operator[||] operator[SEP] identifier[templateType] operator[==] identifier[ENS_TIME_TEMPLATE] operator[SEP] operator[SEP] { Keyword[int] identifier[numens] operator[=] operator[SEP] identifier[templateType] operator[==] identifier[TIME_TEMPLATE] operator[SEP] operator[?] Other[1] operator[:] identifier[eDim] operator[SEP] identifier[getSize] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[t] operator[=] Other[0] operator[SEP] identifier[t] operator[<] identifier[tDim] operator[SEP] identifier[getSize] operator[SEP] operator[SEP] operator[SEP] identifier[t] operator[++] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[e] operator[=] Other[0] operator[SEP] identifier[e] operator[<] identifier[numens] operator[SEP] identifier[e] operator[++] operator[SEP] { identifier[String] identifier[file] operator[=] identifier[getFileName] operator[SEP] identifier[e] , identifier[t] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[fileSet] operator[SEP] identifier[contains] operator[SEP] identifier[file] operator[SEP] operator[SEP] { identifier[fileSet] operator[SEP] identifier[add] operator[SEP] identifier[file] operator[SEP] operator[SEP] } } } identifier[timeStepsPerFile] operator[=] identifier[tDim] operator[SEP] identifier[getSize] operator[SEP] operator[SEP] operator[/] operator[SEP] identifier[fileSet] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[/] identifier[numens] operator[SEP] operator[SEP] } identifier[fileNames] operator[SEP] identifier[addAll] operator[SEP] identifier[fileSet] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[String] identifier[file] operator[:] identifier[fileNames] operator[SEP] { identifier[File] identifier[f] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[file] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[f] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[f] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[f] operator[+] literal[String] operator[SEP] operator[SEP] } } } Keyword[return] identifier[fileNames] operator[SEP] }
public EClass getGLINERG() { if (glinergEClass == null) { glinergEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(496); } return glinergEClass; }
class class_name[name] begin[{] method[getGLINERG, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.glinergEClass], ==, literal[null]]] begin[{] assign[member[.glinergEClass], 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=496)], 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[.glinergEClass]] end[}] END[}]
Keyword[public] identifier[EClass] identifier[getGLINERG] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[glinergEClass] operator[==] Other[null] operator[SEP] { identifier[glinergEClass] 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[496] operator[SEP] operator[SEP] } Keyword[return] identifier[glinergEClass] operator[SEP] }
@Override protected String defaultActionHtmlContent() { StringBuffer result = new StringBuffer(2048); result.append("<form name=\"EDITOR\" id=\"EDITOR\" method=\"post\" action=\"").append(getDialogUri()); result.append("\" class=\"nomargin\" onsubmit=\"return submitAction('").append(DIALOG_OK).append( "', null, 'EDITOR');\">\n"); result.append(dialogContentStart(null)); result.append(buildDialogForm()); result.append(dialogContentEnd()); result.append(dialogButtonsCustom()); result.append(paramsAsHidden()); if (getParamFramename() == null) { result.append("\n<input type=\"hidden\" name=\"").append(PARAM_FRAMENAME).append("\" value=\"\">\n"); } // add script for filtering categories result.append(filterCategoryJS()); result.append("</form>\n"); // get search results if query was more than nothing // we have to retrieve them before category search results are available because // those are collected as a side effect of search iteration. String searchResults = createSearchResults(); // append category search results if there... result.append(createCategorySearchResultHtml()); result.append(searchResults); result.append(getWidgetHtmlEnd()); // Normalize the previous encoded query value on client side result.append(normalizePreviousQueryJS()); return result.toString(); }
class class_name[name] begin[{] method[defaultActionHtmlContent, return_type[type[String]], modifier[protected], parameter[]] begin[{] local_variable[type[StringBuffer], result] call[result.append, parameter[literal["<form name=\"EDITOR\" id=\"EDITOR\" method=\"post\" action=\""]]] call[result.append, parameter[literal["\" class=\"nomargin\" onsubmit=\"return submitAction('"]]] call[result.append, parameter[call[.dialogContentStart, parameter[literal[null]]]]] call[result.append, parameter[call[.buildDialogForm, parameter[]]]] call[result.append, parameter[call[.dialogContentEnd, parameter[]]]] call[result.append, parameter[call[.dialogButtonsCustom, parameter[]]]] call[result.append, parameter[call[.paramsAsHidden, parameter[]]]] if[binary_operation[call[.getParamFramename, parameter[]], ==, literal[null]]] begin[{] call[result.append, parameter[literal["\n<input type=\"hidden\" name=\""]]] else begin[{] None end[}] call[result.append, parameter[call[.filterCategoryJS, parameter[]]]] call[result.append, parameter[literal["</form>\n"]]] local_variable[type[String], searchResults] call[result.append, parameter[call[.createCategorySearchResultHtml, parameter[]]]] call[result.append, parameter[member[.searchResults]]] call[result.append, parameter[call[.getWidgetHtmlEnd, parameter[]]]] call[result.append, parameter[call[.normalizePreviousQueryJS, parameter[]]]] return[call[result.toString, parameter[]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] identifier[String] identifier[defaultActionHtmlContent] operator[SEP] operator[SEP] { identifier[StringBuffer] identifier[result] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] Other[2048] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[getDialogUri] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[DIALOG_OK] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[append] operator[SEP] identifier[dialogContentStart] operator[SEP] Other[null] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[append] operator[SEP] identifier[buildDialogForm] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[append] operator[SEP] identifier[dialogContentEnd] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[append] operator[SEP] identifier[dialogButtonsCustom] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[append] operator[SEP] identifier[paramsAsHidden] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[getParamFramename] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[result] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[PARAM_FRAMENAME] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[result] operator[SEP] identifier[append] operator[SEP] identifier[filterCategoryJS] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[searchResults] operator[=] identifier[createSearchResults] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[append] operator[SEP] identifier[createCategorySearchResultHtml] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[append] operator[SEP] identifier[searchResults] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[append] operator[SEP] identifier[getWidgetHtmlEnd] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[append] operator[SEP] identifier[normalizePreviousQueryJS] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public static int cusparseXcsric02_zeroPivot( cusparseHandle handle, csric02Info info, Pointer position) { return checkResult(cusparseXcsric02_zeroPivotNative(handle, info, position)); }
class class_name[name] begin[{] method[cusparseXcsric02_zeroPivot, return_type[type[int]], modifier[public static], parameter[handle, info, position]] begin[{] return[call[.checkResult, parameter[call[.cusparseXcsric02_zeroPivotNative, parameter[member[.handle], member[.info], member[.position]]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[cusparseXcsric02_zeroPivot] operator[SEP] identifier[cusparseHandle] identifier[handle] , identifier[csric02Info] identifier[info] , identifier[Pointer] identifier[position] operator[SEP] { Keyword[return] identifier[checkResult] operator[SEP] identifier[cusparseXcsric02_zeroPivotNative] operator[SEP] identifier[handle] , identifier[info] , identifier[position] operator[SEP] operator[SEP] operator[SEP] }
private void calculateAnimationProportions() { TRANSLATION_Y = sHeight * buttonDistanceY; TRANSLATION_X = sWidth * buttonDistanceX; anticipation = new AnticipateInterpolator(INTERPOLATOR_WEIGHT); overshoot = new OvershootInterpolator(INTERPOLATOR_WEIGHT); }
class class_name[name] begin[{] method[calculateAnimationProportions, return_type[void], modifier[private], parameter[]] begin[{] assign[member[.TRANSLATION_Y], binary_operation[member[.sHeight], *, member[.buttonDistanceY]]] assign[member[.TRANSLATION_X], binary_operation[member[.sWidth], *, member[.buttonDistanceX]]] assign[member[.anticipation], ClassCreator(arguments=[MemberReference(member=INTERPOLATOR_WEIGHT, 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=AnticipateInterpolator, sub_type=None))] assign[member[.overshoot], ClassCreator(arguments=[MemberReference(member=INTERPOLATOR_WEIGHT, 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=OvershootInterpolator, sub_type=None))] end[}] END[}]
Keyword[private] Keyword[void] identifier[calculateAnimationProportions] operator[SEP] operator[SEP] { identifier[TRANSLATION_Y] operator[=] identifier[sHeight] operator[*] identifier[buttonDistanceY] operator[SEP] identifier[TRANSLATION_X] operator[=] identifier[sWidth] operator[*] identifier[buttonDistanceX] operator[SEP] identifier[anticipation] operator[=] Keyword[new] identifier[AnticipateInterpolator] operator[SEP] identifier[INTERPOLATOR_WEIGHT] operator[SEP] operator[SEP] identifier[overshoot] operator[=] Keyword[new] identifier[OvershootInterpolator] operator[SEP] identifier[INTERPOLATOR_WEIGHT] operator[SEP] operator[SEP] }
public SelectorNode parse() throws InvalidSelectorException { if (isEndOfExpression()) return null; SelectorNode expr = parseExpression(); if (!isEndOfExpression()) throw new InvalidSelectorException("Unexpected token : "+currentToken); if (!(expr instanceof ConditionalExpression)) throw new InvalidSelectorException("Selector expression is not a boolean expression"); return expr; }
class class_name[name] begin[{] method[parse, return_type[type[SelectorNode]], modifier[public], parameter[]] begin[{] if[call[.isEndOfExpression, parameter[]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[SelectorNode], expr] if[call[.isEndOfExpression, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unexpected token : "), operandr=MemberReference(member=currentToken, 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=InvalidSelectorException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.expr], instanceof, type[ConditionalExpression]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Selector expression is not a boolean expression")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InvalidSelectorException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.expr]] end[}] END[}]
Keyword[public] identifier[SelectorNode] identifier[parse] operator[SEP] operator[SEP] Keyword[throws] identifier[InvalidSelectorException] { Keyword[if] operator[SEP] identifier[isEndOfExpression] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[SelectorNode] identifier[expr] operator[=] identifier[parseExpression] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isEndOfExpression] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[InvalidSelectorException] operator[SEP] literal[String] operator[+] identifier[currentToken] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[expr] Keyword[instanceof] identifier[ConditionalExpression] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[InvalidSelectorException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[expr] operator[SEP] }
public com.squareup.okhttp.Call getUniverseGraphicsGraphicIdAsync(Integer graphicId, String datasource, String ifNoneMatch, final ApiCallback<GraphicResponse> callback) throws ApiException { com.squareup.okhttp.Call call = getUniverseGraphicsGraphicIdValidateBeforeCall(graphicId, datasource, ifNoneMatch, callback); Type localVarReturnType = new TypeToken<GraphicResponse>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
class class_name[name] begin[{] method[getUniverseGraphicsGraphicIdAsync, return_type[type[com]], modifier[public], parameter[graphicId, datasource, ifNoneMatch, callback]] begin[{] local_variable[type[com], call] local_variable[type[Type], localVarReturnType] call[apiClient.executeAsync, parameter[member[.call], member[.localVarReturnType], member[.callback]]] return[member[.call]] end[}] END[}]
Keyword[public] identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Call] identifier[getUniverseGraphicsGraphicIdAsync] operator[SEP] identifier[Integer] identifier[graphicId] , identifier[String] identifier[datasource] , identifier[String] identifier[ifNoneMatch] , Keyword[final] identifier[ApiCallback] operator[<] identifier[GraphicResponse] operator[>] identifier[callback] operator[SEP] Keyword[throws] identifier[ApiException] { identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Call] identifier[call] operator[=] identifier[getUniverseGraphicsGraphicIdValidateBeforeCall] operator[SEP] identifier[graphicId] , identifier[datasource] , identifier[ifNoneMatch] , identifier[callback] operator[SEP] operator[SEP] identifier[Type] identifier[localVarReturnType] operator[=] Keyword[new] identifier[TypeToken] operator[<] identifier[GraphicResponse] operator[>] operator[SEP] operator[SEP] { } operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[apiClient] operator[SEP] identifier[executeAsync] operator[SEP] identifier[call] , identifier[localVarReturnType] , identifier[callback] operator[SEP] operator[SEP] Keyword[return] identifier[call] operator[SEP] }
public final <U> ParallelFlux<U> map(Function<? super T, ? extends U> mapper) { Objects.requireNonNull(mapper, "mapper"); return onAssembly(new ParallelMap<>(this, mapper)); }
class class_name[name] begin[{] method[map, return_type[type[ParallelFlux]], modifier[final public], parameter[mapper]] begin[{] call[Objects.requireNonNull, parameter[member[.mapper], literal["mapper"]]] return[call[.onAssembly, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=mapper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ParallelMap, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[final] operator[<] identifier[U] operator[>] identifier[ParallelFlux] operator[<] identifier[U] operator[>] identifier[map] operator[SEP] identifier[Function] operator[<] operator[?] Keyword[super] identifier[T] , operator[?] Keyword[extends] identifier[U] operator[>] identifier[mapper] operator[SEP] { identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[mapper] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[onAssembly] operator[SEP] Keyword[new] identifier[ParallelMap] operator[<] operator[>] operator[SEP] Keyword[this] , identifier[mapper] operator[SEP] operator[SEP] operator[SEP] }
private void writeInt(int i, byte[] buf, int offset) throws IOException { writeShort(i & 0xffff, buf, offset); writeShort((i >> 16) & 0xffff, buf, offset + 2); }
class class_name[name] begin[{] method[writeInt, return_type[void], modifier[private], parameter[i, buf, offset]] begin[{] call[.writeShort, parameter[binary_operation[member[.i], &, literal[0xffff]], member[.buf], member[.offset]]] call[.writeShort, parameter[binary_operation[binary_operation[member[.i], >>, literal[16]], &, literal[0xffff]], member[.buf], binary_operation[member[.offset], +, literal[2]]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[writeInt] operator[SEP] Keyword[int] identifier[i] , Keyword[byte] operator[SEP] operator[SEP] identifier[buf] , Keyword[int] identifier[offset] operator[SEP] Keyword[throws] identifier[IOException] { identifier[writeShort] operator[SEP] identifier[i] operator[&] literal[Integer] , identifier[buf] , identifier[offset] operator[SEP] operator[SEP] identifier[writeShort] operator[SEP] operator[SEP] identifier[i] operator[>] operator[>] Other[16] operator[SEP] operator[&] literal[Integer] , identifier[buf] , identifier[offset] operator[+] Other[2] operator[SEP] operator[SEP] }
public boolean contains(CmsPoint point) { return (point.getX() >= m_left) && (point.getX() < (m_left + m_width)) && (point.getY() >= m_top) && (point.getY() < (m_top + m_height)); }
class class_name[name] begin[{] method[contains, return_type[type[boolean]], modifier[public], parameter[point]] begin[{] return[binary_operation[binary_operation[binary_operation[binary_operation[call[point.getX, parameter[]], >=, member[.m_left]], &&, binary_operation[call[point.getX, parameter[]], <, binary_operation[member[.m_left], +, member[.m_width]]]], &&, binary_operation[call[point.getY, parameter[]], >=, member[.m_top]]], &&, binary_operation[call[point.getY, parameter[]], <, binary_operation[member[.m_top], +, member[.m_height]]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[contains] operator[SEP] identifier[CmsPoint] identifier[point] operator[SEP] { Keyword[return] operator[SEP] identifier[point] operator[SEP] identifier[getX] operator[SEP] operator[SEP] operator[>=] identifier[m_left] operator[SEP] operator[&&] operator[SEP] identifier[point] operator[SEP] identifier[getX] operator[SEP] operator[SEP] operator[<] operator[SEP] identifier[m_left] operator[+] identifier[m_width] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[point] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[>=] identifier[m_top] operator[SEP] operator[&&] operator[SEP] identifier[point] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[<] operator[SEP] identifier[m_top] operator[+] identifier[m_height] operator[SEP] operator[SEP] operator[SEP] }
protected List<EmvTransactionRecord> extractLogEntry(final byte[] pLogEntry) throws CommunicationException { List<EmvTransactionRecord> listRecord = new ArrayList<EmvTransactionRecord>(); // If log entry is defined if (template.get().getConfig().readTransactions && pLogEntry != null) { List<TagAndLength> tals = getLogFormat(); if (tals != null && !tals.isEmpty()) { // read all records for (int rec = 1; rec <= pLogEntry[1]; rec++) { byte[] response = template.get().getProvider() .transceive(new CommandApdu(CommandEnum.READ_RECORD, rec, pLogEntry[0] << 3 | 4, 0).toBytes()); // Extract data if (ResponseUtils.isSucceed(response)) { try { EmvTransactionRecord record = new EmvTransactionRecord(); record.parse(response, tals); if (record.getAmount() != null) { // Fix artifact in EMV VISA card if (record.getAmount() >= 1500000000) { record.setAmount(record.getAmount() - 1500000000); } // Skip transaction with null amount if (record.getAmount() == null || record.getAmount() <= 1) { continue; } } if (record != null) { // Unknown currency if (record.getCurrency() == null) { record.setCurrency(CurrencyEnum.XXX); } listRecord.add(record); } } catch (Exception e) { LOGGER.error("Error in transaction format: " + e.getMessage(), e); } } else { // No more transaction log or transaction disabled break; } } } } return listRecord; }
class class_name[name] begin[{] method[extractLogEntry, return_type[type[List]], modifier[protected], parameter[pLogEntry]] begin[{] local_variable[type[List], listRecord] if[binary_operation[call[template.get, parameter[]], &&, binary_operation[member[.pLogEntry], !=, literal[null]]]] begin[{] local_variable[type[List], tals] if[binary_operation[binary_operation[member[.tals], !=, literal[null]], &&, call[tals.isEmpty, parameter[]]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=template, selectors=[MethodInvocation(arguments=[], member=getProvider, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=READ_RECORD, postfix_operators=[], prefix_operators=[], qualifier=CommandEnum, selectors=[]), MemberReference(member=rec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=pLogEntry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=<<), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=|), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=toBytes, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=CommandApdu, sub_type=None))], member=transceive, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=response)], modifiers=set(), type=BasicType(dimensions=[None], name=byte)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=response, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isSucceed, postfix_operators=[], prefix_operators=[], qualifier=ResponseUtils, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=EmvTransactionRecord, sub_type=None)), name=record)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=EmvTransactionRecord, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=response, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parse, postfix_operators=[], prefix_operators=[], qualifier=record, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getAmount, postfix_operators=[], prefix_operators=[], qualifier=record, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getAmount, postfix_operators=[], prefix_operators=[], qualifier=record, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1500000000), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=getAmount, postfix_operators=[], prefix_operators=[], qualifier=record, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1500000000), operator=-)], member=setAmount, postfix_operators=[], prefix_operators=[], qualifier=record, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getAmount, postfix_operators=[], prefix_operators=[], qualifier=record, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getAmount, postfix_operators=[], prefix_operators=[], qualifier=record, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=<=), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)]))])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=record, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getCurrency, postfix_operators=[], prefix_operators=[], qualifier=record, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=XXX, postfix_operators=[], prefix_operators=[], qualifier=CurrencyEnum, selectors=[])], member=setCurrency, postfix_operators=[], prefix_operators=[], qualifier=record, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=record, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=listRecord, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error in transaction format: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=rec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=pLogEntry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=rec)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=rec, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) else begin[{] None end[}] else begin[{] None end[}] return[member[.listRecord]] end[}] END[}]
Keyword[protected] identifier[List] operator[<] identifier[EmvTransactionRecord] operator[>] identifier[extractLogEntry] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[pLogEntry] operator[SEP] Keyword[throws] identifier[CommunicationException] { identifier[List] operator[<] identifier[EmvTransactionRecord] operator[>] identifier[listRecord] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[EmvTransactionRecord] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[template] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[getConfig] operator[SEP] operator[SEP] operator[SEP] identifier[readTransactions] operator[&&] identifier[pLogEntry] operator[!=] Other[null] operator[SEP] { identifier[List] operator[<] identifier[TagAndLength] operator[>] identifier[tals] operator[=] identifier[getLogFormat] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tals] operator[!=] Other[null] operator[&&] operator[!] identifier[tals] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[rec] operator[=] Other[1] operator[SEP] identifier[rec] operator[<=] identifier[pLogEntry] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[rec] operator[++] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[response] operator[=] identifier[template] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[getProvider] operator[SEP] operator[SEP] operator[SEP] identifier[transceive] operator[SEP] Keyword[new] identifier[CommandApdu] operator[SEP] identifier[CommandEnum] operator[SEP] identifier[READ_RECORD] , identifier[rec] , identifier[pLogEntry] operator[SEP] Other[0] operator[SEP] operator[<<] Other[3] operator[|] Other[4] , Other[0] operator[SEP] operator[SEP] identifier[toBytes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ResponseUtils] operator[SEP] identifier[isSucceed] operator[SEP] identifier[response] operator[SEP] operator[SEP] { Keyword[try] { identifier[EmvTransactionRecord] identifier[record] operator[=] Keyword[new] identifier[EmvTransactionRecord] operator[SEP] operator[SEP] operator[SEP] identifier[record] operator[SEP] identifier[parse] operator[SEP] identifier[response] , identifier[tals] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[record] operator[SEP] identifier[getAmount] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[record] operator[SEP] identifier[getAmount] operator[SEP] operator[SEP] operator[>=] Other[1500000000] operator[SEP] { identifier[record] operator[SEP] identifier[setAmount] operator[SEP] identifier[record] operator[SEP] identifier[getAmount] operator[SEP] operator[SEP] operator[-] Other[1500000000] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[record] operator[SEP] identifier[getAmount] operator[SEP] operator[SEP] operator[==] Other[null] operator[||] identifier[record] operator[SEP] identifier[getAmount] operator[SEP] operator[SEP] operator[<=] Other[1] operator[SEP] { Keyword[continue] operator[SEP] } } Keyword[if] operator[SEP] identifier[record] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[record] operator[SEP] identifier[getCurrency] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[record] operator[SEP] identifier[setCurrency] operator[SEP] identifier[CurrencyEnum] operator[SEP] identifier[XXX] operator[SEP] operator[SEP] } identifier[listRecord] operator[SEP] identifier[add] operator[SEP] identifier[record] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[break] operator[SEP] } } } } Keyword[return] identifier[listRecord] operator[SEP] }
public static String first_word(EvaluationContext ctx, Object text) { // In Excel this would be IF(ISERR(FIND(" ",A2)),"",LEFT(A2,FIND(" ",A2)-1)) return word(ctx, text, 1, false); }
class class_name[name] begin[{] method[first_word, return_type[type[String]], modifier[public static], parameter[ctx, text]] begin[{] return[call[.word, parameter[member[.ctx], member[.text], literal[1], literal[false]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[first_word] operator[SEP] identifier[EvaluationContext] identifier[ctx] , identifier[Object] identifier[text] operator[SEP] { Keyword[return] identifier[word] operator[SEP] identifier[ctx] , identifier[text] , Other[1] , literal[boolean] operator[SEP] operator[SEP] }
public VoltXMLElement getXMLCompiledStatement(String sql) throws HSQLParseException { Statement cs = null; sessionProxy.clearLocalTables(); // clear the expression node id set for determinism sessionProxy.resetVoltNodeIds(); try { cs = sessionProxy.compileStatement(sql); } catch (HsqlException caught) { // a switch in case we want to give more error details on additional error codes switch(caught.getErrorCode()) { case -ErrorCode.X_42581: throw new HSQLParseException( "SQL Syntax error in \"" + sql + "\" " + caught.getMessage(), caught); default: throw new HSQLParseException("Error in \"" + sql + "\" - " + caught.getMessage(), caught); } } catch (StackOverflowError caught) { // Handle this consistently in high level callers // regardless of where it is thrown. // It should be presumed to be a user error where the user is // exceeding a soft limit on the supportable complexity of a // SQL statement causing unreasonable levels of recursion. throw caught; } catch (Throwable caught) { // Expectable user errors should have been thrown as HSQLException. // So, this throwable should be an unexpected system error. // The details of these arbitrary Throwables are not typically // useful to an end user reading an error message. // They should be logged. m_logger.error("Unexpected error in the SQL parser for statement \"" + sql + "\" ", caught); // The important thing for the end user is that // they be notified that there is a system error involved, // suggesting that it is not their fault -- though they MAY be // able to work around the issue with the help of VoltDB support // (especially if they can provide the log traces). throw new HSQLParseException( "An unexpected system error was logged by the SQL parser for statement \"" + sql + "\" ", caught); } //Result result = Result.newPrepareResponse(cs.id, cs.type, rmd, pmd); Result result = Result.newPrepareResponse(cs); if (result.hasError()) { throw new HSQLParseException(result.getMainString()); } VoltXMLElement xml = null; xml = cs.voltGetStatementXML(sessionProxy); if (m_logger.isDebugEnabled()) { try { /* * Sometimes exceptions happen. */ m_logger.debug(String.format("SQL: %s\n", sql));; m_logger.debug(String.format("HSQLDB:\n%s", (cs == null) ? "<NULL>" : cs.describe(sessionProxy))); m_logger.debug(String.format("VOLTDB:\n%s", (xml == null) ? "<NULL>" : xml.toXML())); } catch (Exception caught) { m_logger.warn("Unexpected error in the SQL parser", caught); caught.printStackTrace(System.out); } } // this releases some small memory hsql uses that builds up over time if not // cleared // if it's not called for every call of getXMLCompiledStatement, that's ok; // it'll get called next time sessionProxy.sessionData.persistentStoreCollection.clearAllTables(); // clean up sql-in expressions fixupInStatementExpressions(xml); assert(xml != null); return xml; }
class class_name[name] begin[{] method[getXMLCompiledStatement, return_type[type[VoltXMLElement]], modifier[public], parameter[sql]] begin[{] local_variable[type[Statement], cs] call[sessionProxy.clearLocalTables, parameter[]] call[sessionProxy.resetVoltNodeIds, parameter[]] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=cs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=sql, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compileStatement, postfix_operators=[], prefix_operators=[], qualifier=sessionProxy, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=X_42581, postfix_operators=[], prefix_operators=['-'], qualifier=ErrorCode, selectors=[])], statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="SQL Syntax error in \""), operandr=MemberReference(member=sql, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\" "), operator=+), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=caught, selectors=[], type_arguments=None), operator=+), MemberReference(member=caught, 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=HSQLParseException, sub_type=None)), label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error in \""), operandr=MemberReference(member=sql, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\" - "), operator=+), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=caught, selectors=[], type_arguments=None), operator=+), MemberReference(member=caught, 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=HSQLParseException, sub_type=None)), label=None)])], expression=MethodInvocation(arguments=[], member=getErrorCode, postfix_operators=[], prefix_operators=[], qualifier=caught, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=caught, types=['HsqlException'])), CatchClause(block=[ThrowStatement(expression=MemberReference(member=caught, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=caught, types=['StackOverflowError'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unexpected error in the SQL parser for statement \""), operandr=MemberReference(member=sql, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\" "), operator=+), MemberReference(member=caught, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=m_logger, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="An unexpected system error was logged by the SQL parser for statement \""), operandr=MemberReference(member=sql, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\" "), operator=+), MemberReference(member=caught, 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=HSQLParseException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=caught, types=['Throwable']))], finally_block=None, label=None, resources=None) local_variable[type[Result], result] if[call[result.hasError, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMainString, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HSQLParseException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[VoltXMLElement], xml] assign[member[.xml], call[cs.voltGetStatementXML, parameter[member[.sessionProxy]]]] if[call[m_logger.isDebugEnabled, parameter[]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="SQL: %s\n"), MemberReference(member=sql, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=m_logger, selectors=[], type_arguments=None), label=None), Statement(label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="HSQLDB:\n%s"), TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=cs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[MemberReference(member=sessionProxy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=describe, postfix_operators=[], prefix_operators=[], qualifier=cs, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="<NULL>"))], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=m_logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="VOLTDB:\n%s"), TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=xml, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[], member=toXML, postfix_operators=[], prefix_operators=[], qualifier=xml, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="<NULL>"))], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=m_logger, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unexpected error in the SQL parser"), MemberReference(member=caught, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=m_logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[])], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=caught, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=caught, types=['Exception']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] call[sessionProxy.sessionData.persistentStoreCollection.clearAllTables, parameter[]] call[.fixupInStatementExpressions, parameter[member[.xml]]] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=xml, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=None) return[member[.xml]] end[}] END[}]
Keyword[public] identifier[VoltXMLElement] identifier[getXMLCompiledStatement] operator[SEP] identifier[String] identifier[sql] operator[SEP] Keyword[throws] identifier[HSQLParseException] { identifier[Statement] identifier[cs] operator[=] Other[null] operator[SEP] identifier[sessionProxy] operator[SEP] identifier[clearLocalTables] operator[SEP] operator[SEP] operator[SEP] identifier[sessionProxy] operator[SEP] identifier[resetVoltNodeIds] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[cs] operator[=] identifier[sessionProxy] operator[SEP] identifier[compileStatement] operator[SEP] identifier[sql] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[HsqlException] identifier[caught] operator[SEP] { Keyword[switch] operator[SEP] identifier[caught] operator[SEP] identifier[getErrorCode] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] operator[-] identifier[ErrorCode] operator[SEP] identifier[X_42581] operator[:] Keyword[throw] Keyword[new] identifier[HSQLParseException] operator[SEP] literal[String] operator[+] identifier[sql] operator[+] literal[String] operator[+] identifier[caught] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[caught] operator[SEP] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[HSQLParseException] operator[SEP] literal[String] operator[+] identifier[sql] operator[+] literal[String] operator[+] identifier[caught] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[caught] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[StackOverflowError] identifier[caught] operator[SEP] { Keyword[throw] identifier[caught] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[caught] operator[SEP] { identifier[m_logger] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[sql] operator[+] literal[String] , identifier[caught] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[HSQLParseException] operator[SEP] literal[String] operator[+] identifier[sql] operator[+] literal[String] , identifier[caught] operator[SEP] operator[SEP] } identifier[Result] identifier[result] operator[=] identifier[Result] operator[SEP] identifier[newPrepareResponse] operator[SEP] identifier[cs] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[SEP] identifier[hasError] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[HSQLParseException] operator[SEP] identifier[result] operator[SEP] identifier[getMainString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[VoltXMLElement] identifier[xml] operator[=] Other[null] operator[SEP] identifier[xml] operator[=] identifier[cs] operator[SEP] identifier[voltGetStatementXML] operator[SEP] identifier[sessionProxy] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m_logger] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { identifier[m_logger] operator[SEP] identifier[debug] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[sql] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[m_logger] operator[SEP] identifier[debug] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , operator[SEP] identifier[cs] operator[==] Other[null] operator[SEP] operator[?] literal[String] operator[:] identifier[cs] operator[SEP] identifier[describe] operator[SEP] identifier[sessionProxy] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[m_logger] operator[SEP] identifier[debug] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , operator[SEP] identifier[xml] operator[==] Other[null] operator[SEP] operator[?] literal[String] operator[:] identifier[xml] operator[SEP] identifier[toXML] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[caught] operator[SEP] { identifier[m_logger] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[caught] operator[SEP] operator[SEP] identifier[caught] operator[SEP] identifier[printStackTrace] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] operator[SEP] } } identifier[sessionProxy] operator[SEP] identifier[sessionData] operator[SEP] identifier[persistentStoreCollection] operator[SEP] identifier[clearAllTables] operator[SEP] operator[SEP] operator[SEP] identifier[fixupInStatementExpressions] operator[SEP] identifier[xml] operator[SEP] operator[SEP] Keyword[assert] operator[SEP] identifier[xml] operator[!=] Other[null] operator[SEP] operator[SEP] Keyword[return] identifier[xml] operator[SEP] }
private void processTasks() throws IOException { TaskReader reader = new TaskReader(m_data.getTableData("Tasks")); reader.read(); for (MapRow row : reader.getRows()) { processTask(m_project, row); } updateDates(); }
class class_name[name] begin[{] method[processTasks, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[TaskReader], reader] call[reader.read, parameter[]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=m_project, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=row, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processTask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getRows, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=row)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MapRow, sub_type=None))), label=None) call[.updateDates, parameter[]] end[}] END[}]
Keyword[private] Keyword[void] identifier[processTasks] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[TaskReader] identifier[reader] operator[=] Keyword[new] identifier[TaskReader] operator[SEP] identifier[m_data] operator[SEP] identifier[getTableData] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[reader] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[MapRow] identifier[row] operator[:] identifier[reader] operator[SEP] identifier[getRows] operator[SEP] operator[SEP] operator[SEP] { identifier[processTask] operator[SEP] identifier[m_project] , identifier[row] operator[SEP] operator[SEP] } identifier[updateDates] operator[SEP] operator[SEP] operator[SEP] }
private static void createGroup(List<ComponentGroup> groupList, Map<MtasSpanQuery, Map<Integer, List<Match>>> spansMatchData, List<Integer> docSet, FieldInfo fieldInfo, String field, int docBase, CodecInfo mtasCodecInfo, IndexSearcher searcher, LeafReaderContext lrc, Status status) throws IOException { if (mtasCodecInfo != null && groupList != null) { List<Match> matchList; Map<Integer, List<Match>> matchData; for (ComponentGroup group : groupList) { group.dataCollector.setWithTotal(); if (!group.prefixes.isEmpty()) { matchData = spansMatchData.get(group.spanQuery); Set<String> knownPrefixes = collectKnownPrefixes(fieldInfo); Set<String> intersectionPrefixes = collectIntersectionPrefixes( fieldInfo); boolean intersectionGroupPrefixes = intersectionPrefixes(group, intersectionPrefixes); boolean availablePrefixes = availablePrefixes(group, knownPrefixes); // sort match lists if (!intersectionGroupPrefixes) { for (Entry<Integer, List<Match>> entry : matchData.entrySet()) { sortMatchList(entry.getValue()); } } // init group.dataCollector.initNewList(1); int docId; Map<GroupHit, Long> occurencesSum = new HashMap<>(); Map<GroupHit, Integer> occurencesN = new HashMap<>(); Set<GroupHit> occurencesInCurrentDocument = new HashSet<>(); if (!availablePrefixes) { HashMap<Integer, GroupHit> hits = new HashMap<>(); for (int docCounter = 0; docCounter < docSet.size(); docCounter++) { occurencesInCurrentDocument.clear(); docId = docSet.get(docCounter); GroupHit hit; GroupHit hitKey; if (matchData != null && (matchList = matchData.get(docId)) != null && !matchList.isEmpty()) { Iterator<Match> it = matchList.listIterator(); while (it.hasNext()) { Match m = it.next(); IntervalTreeNodeData<String> positionHit = createPositionHit( m, group); int length = m.endPosition - m.startPosition; hitKey = null; if (!hits.containsKey(length)) { hit = new GroupHit(positionHit.list, positionHit.start, positionHit.end, positionHit.hitStart, positionHit.hitEnd, group, knownPrefixes); hits.put(length, hit); } else { hit = hits.get(length); for (GroupHit hitKeyItem : occurencesSum.keySet()) { if (hitKeyItem.equals(hit)) { hitKey = hitKeyItem; break; } } } if (hitKey == null) { occurencesSum.put(hit, Long.valueOf(1)); occurencesN.put(hit, 1); occurencesInCurrentDocument.add(hit); } else { occurencesSum.put(hitKey, occurencesSum.get(hitKey) + 1); if (!occurencesInCurrentDocument.contains(hitKey)) { if (occurencesN.containsKey(hitKey)) { occurencesN.put(hitKey, occurencesN.get(hitKey) + 1); } else { occurencesN.put(hitKey, 1); } occurencesInCurrentDocument.add(hitKey); } } } } } } else { int maximumNumberOfDocuments = 0; int boundaryMinimumNumberOfDocuments = 1; int boundaryMaximumNumberOfDocuments = 5; Set<GroupHit> administrationOccurrences = new HashSet<>(); for (int docCounter = 0; docCounter < docSet.size(); docCounter++) { occurencesInCurrentDocument.clear(); docId = docSet.get(docCounter); if (matchData != null && (matchList = matchData.get(docId)) != null && !matchList.isEmpty()) { // loop over matches Iterator<Match> it = matchList.listIterator(); ArrayList<IntervalTreeNodeData<String>> positionsHits = new ArrayList<>(); while (it.hasNext()) { Match m = it.next(); positionsHits.add(createPositionHit(m, group)); } mtasCodecInfo.collectTermsByPrefixesForListOfHitPositions(field, (docId - docBase), group.prefixes, positionsHits); // administration for (IntervalTreeNodeData<String> positionHit : positionsHits) { GroupHit hit = new GroupHit(positionHit.list, positionHit.start, positionHit.end, positionHit.hitStart, positionHit.hitEnd, group, knownPrefixes); GroupHit hitKey = null; for (GroupHit hitKeyItem : occurencesSum.keySet()) { if (hitKeyItem.equals(hit)) { hitKey = hitKeyItem; break; } } if (hitKey == null) { occurencesSum.put(hit, Long.valueOf(1)); occurencesN.put(hit, 1); occurencesInCurrentDocument.add(hit); } else { occurencesSum.put(hitKey, occurencesSum.get(hitKey) + 1); if (!occurencesInCurrentDocument.contains(hitKey)) { if (occurencesN.containsKey(hitKey)) { occurencesN.put(hitKey, occurencesN.get(hitKey) + 1); } else { occurencesN.put(hitKey, 1); } occurencesInCurrentDocument.add(hitKey); } } } if (!intersectionGroupPrefixes) { for (GroupHit groupHit : occurencesInCurrentDocument) { int tmpNumber = occurencesN.get(groupHit); maximumNumberOfDocuments = Math .max(maximumNumberOfDocuments, tmpNumber); if (tmpNumber > boundaryMinimumNumberOfDocuments) { administrationOccurrences.add(groupHit); } } // collect spans if (maximumNumberOfDocuments > boundaryMaximumNumberOfDocuments) { if (!administrationOccurrences.isEmpty()) { Map<GroupHit, Spans> list = collectSpansForOccurences( administrationOccurrences, knownPrefixes, field, searcher, lrc); if (list.size() > 0) { collectGroupUsingSpans(list, docSet, docBase, docCounter, matchData, occurencesSum, occurencesN); } } administrationOccurrences.clear(); maximumNumberOfDocuments = 0; boundaryMinimumNumberOfDocuments = (int) Math .ceil(boundaryMinimumNumberOfDocuments * 1.2); boundaryMaximumNumberOfDocuments = (int) Math .ceil(boundaryMaximumNumberOfDocuments * 1.2); } } } } } for (Entry<GroupHit, Long> entry : occurencesSum.entrySet()) { group.dataCollector.add(entry.getKey().toString(), entry.getValue(), occurencesN.get(entry.getKey())); } group.dataCollector.closeNewList(); } } } }
class class_name[name] begin[{] method[createGroup, return_type[void], modifier[private static], parameter[groupList, spansMatchData, docSet, fieldInfo, field, docBase, mtasCodecInfo, searcher, lrc, status]] begin[{] if[binary_operation[binary_operation[member[.mtasCodecInfo], !=, literal[null]], &&, binary_operation[member[.groupList], !=, literal[null]]]] begin[{] local_variable[type[List], matchList] local_variable[type[Map], matchData] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=setWithTotal, postfix_operators=[], prefix_operators=[], qualifier=group.dataCollector, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=group.prefixes, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=matchData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=spanQuery, postfix_operators=[], prefix_operators=[], qualifier=group, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=spansMatchData, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=fieldInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=collectKnownPrefixes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=knownPrefixes)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=Set, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=fieldInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=collectIntersectionPrefixes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=intersectionPrefixes)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=Set, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=group, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=intersectionPrefixes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=intersectionPrefixes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=intersectionGroupPrefixes)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=group, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=knownPrefixes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=availablePrefixes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=availablePrefixes)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), IfStatement(condition=MemberReference(member=intersectionGroupPrefixes, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)], member=sortMatchList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=matchData, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Match, sub_type=None))], dimensions=[], name=List, sub_type=None))], dimensions=[], name=Entry, sub_type=None))), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=initNewList, postfix_operators=[], prefix_operators=[], qualifier=group.dataCollector, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=docId)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=HashMap, sub_type=None)), name=occurencesSum)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=GroupHit, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Long, sub_type=None))], dimensions=[], name=Map, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=HashMap, sub_type=None)), name=occurencesN)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=GroupHit, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))], dimensions=[], name=Map, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=HashSet, sub_type=None)), name=occurencesInCurrentDocument)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=GroupHit, sub_type=None))], dimensions=[], name=Set, sub_type=None)), IfStatement(condition=MemberReference(member=availablePrefixes, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=maximumNumberOfDocuments)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=boundaryMinimumNumberOfDocuments)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5), name=boundaryMaximumNumberOfDocuments)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=HashSet, sub_type=None)), name=administrationOccurrences)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=GroupHit, sub_type=None))], dimensions=[], name=Set, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=clear, postfix_operators=[], prefix_operators=[], qualifier=occurencesInCurrentDocument, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=docId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=docCounter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=docSet, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=matchData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=matchList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=docId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=matchData, selectors=[], type_arguments=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operator=&&), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=matchList, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=listIterator, postfix_operators=[], prefix_operators=[], qualifier=matchList, selectors=[], type_arguments=None), name=it)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Match, sub_type=None))], dimensions=[], name=Iterator, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None)), name=positionsHits)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=IntervalTreeNodeData, sub_type=None))], dimensions=[], name=ArrayList, sub_type=None)), WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[], type_arguments=None), name=m)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Match, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=group, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createPositionHit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=positionsHits, selectors=[], type_arguments=None), label=None)]), condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=docId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=docBase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), MemberReference(member=prefixes, postfix_operators=[], prefix_operators=[], qualifier=group, selectors=[]), MemberReference(member=positionsHits, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=collectTermsByPrefixesForListOfHitPositions, postfix_operators=[], prefix_operators=[], qualifier=mtasCodecInfo, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=list, postfix_operators=[], prefix_operators=[], qualifier=positionHit, selectors=[]), MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=positionHit, selectors=[]), MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=positionHit, selectors=[]), MemberReference(member=hitStart, postfix_operators=[], prefix_operators=[], qualifier=positionHit, selectors=[]), MemberReference(member=hitEnd, postfix_operators=[], prefix_operators=[], qualifier=positionHit, selectors=[]), MemberReference(member=group, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=knownPrefixes, 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=GroupHit, sub_type=None)), name=hit)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=GroupHit, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=hitKey)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=GroupHit, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=hit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=hitKeyItem, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=hitKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=hitKeyItem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=occurencesSum, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=hitKeyItem)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=GroupHit, sub_type=None))), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=hitKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=hitKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=hitKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=occurencesSum, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=put, postfix_operators=[], prefix_operators=[], qualifier=occurencesSum, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=hitKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=['!'], qualifier=occurencesInCurrentDocument, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=hitKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=occurencesN, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=hitKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=put, postfix_operators=[], prefix_operators=[], qualifier=occurencesN, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=hitKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=hitKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=occurencesN, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=put, postfix_operators=[], prefix_operators=[], qualifier=occurencesN, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=hitKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=occurencesInCurrentDocument, selectors=[], type_arguments=None), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=hit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=occurencesSum, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=hit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=put, postfix_operators=[], prefix_operators=[], qualifier=occurencesN, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=hit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=occurencesInCurrentDocument, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=positionsHits, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=positionHit)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=IntervalTreeNodeData, sub_type=None))), label=None), IfStatement(condition=MemberReference(member=intersectionGroupPrefixes, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=groupHit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=occurencesN, selectors=[], type_arguments=None), name=tmpNumber)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=maximumNumberOfDocuments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=maximumNumberOfDocuments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tmpNumber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=max, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=tmpNumber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=boundaryMinimumNumberOfDocuments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=groupHit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=administrationOccurrences, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=occurencesInCurrentDocument, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=groupHit)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=GroupHit, sub_type=None))), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=maximumNumberOfDocuments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=boundaryMaximumNumberOfDocuments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=administrationOccurrences, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=administrationOccurrences, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=knownPrefixes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=searcher, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lrc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=collectSpansForOccurences, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=list)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=GroupHit, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Spans, sub_type=None))], dimensions=[], name=Map, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=docSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=docBase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=docCounter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=matchData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=occurencesSum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=occurencesN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=collectGroupUsingSpans, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))])), StatementExpression(expression=MethodInvocation(arguments=[], member=clear, postfix_operators=[], prefix_operators=[], qualifier=administrationOccurrences, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=maximumNumberOfDocuments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=boundaryMinimumNumberOfDocuments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=boundaryMinimumNumberOfDocuments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.2), operator=*)], member=ceil, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=boundaryMaximumNumberOfDocuments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=boundaryMaximumNumberOfDocuments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.2), operator=*)], member=ceil, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int))), label=None)]))]))]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=docCounter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=docSet, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=docCounter)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=docCounter, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=HashMap, sub_type=None)), name=hits)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=GroupHit, sub_type=None))], dimensions=[], name=HashMap, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=clear, postfix_operators=[], prefix_operators=[], qualifier=occurencesInCurrentDocument, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=docId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=docCounter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=docSet, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=hit)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=GroupHit, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=hitKey)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=GroupHit, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=matchData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=matchList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=docId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=matchData, selectors=[], type_arguments=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operator=&&), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=matchList, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=listIterator, postfix_operators=[], prefix_operators=[], qualifier=matchList, selectors=[], type_arguments=None), name=it)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Match, sub_type=None))], dimensions=[], name=Iterator, sub_type=None)), WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[], type_arguments=None), name=m)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Match, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=group, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createPositionHit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=positionHit)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=IntervalTreeNodeData, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=endPosition, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[]), operandr=MemberReference(member=startPosition, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[]), operator=-), name=length)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=hitKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=['!'], qualifier=hits, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=hit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=hits, selectors=[], type_arguments=None)), label=None), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=hit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=hitKeyItem, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=hitKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=hitKeyItem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=occurencesSum, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=hitKeyItem)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=GroupHit, sub_type=None))), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=hit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=list, postfix_operators=[], prefix_operators=[], qualifier=positionHit, selectors=[]), MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=positionHit, selectors=[]), MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=positionHit, selectors=[]), MemberReference(member=hitStart, postfix_operators=[], prefix_operators=[], qualifier=positionHit, selectors=[]), MemberReference(member=hitEnd, postfix_operators=[], prefix_operators=[], qualifier=positionHit, selectors=[]), MemberReference(member=group, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=knownPrefixes, 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=GroupHit, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=hit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=hits, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=hitKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=hitKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=hitKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=occurencesSum, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=put, postfix_operators=[], prefix_operators=[], qualifier=occurencesSum, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=hitKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=['!'], qualifier=occurencesInCurrentDocument, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=hitKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=occurencesN, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=hitKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=put, postfix_operators=[], prefix_operators=[], qualifier=occurencesN, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=hitKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=hitKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=occurencesN, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=put, postfix_operators=[], prefix_operators=[], qualifier=occurencesN, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=hitKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=occurencesInCurrentDocument, selectors=[], type_arguments=None), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=hit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=occurencesSum, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=hit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=put, postfix_operators=[], prefix_operators=[], qualifier=occurencesN, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=hit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=occurencesInCurrentDocument, selectors=[], type_arguments=None), label=None)]))]), condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=docCounter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=docSet, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=docCounter)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=docCounter, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)])), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)], member=get, postfix_operators=[], prefix_operators=[], qualifier=occurencesN, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=group.dataCollector, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=occurencesSum, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=GroupHit, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Long, sub_type=None))], dimensions=[], name=Entry, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=closeNewList, postfix_operators=[], prefix_operators=[], qualifier=group.dataCollector, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=groupList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=group)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ComponentGroup, sub_type=None))), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[createGroup] operator[SEP] identifier[List] operator[<] identifier[ComponentGroup] operator[>] identifier[groupList] , identifier[Map] operator[<] identifier[MtasSpanQuery] , identifier[Map] operator[<] identifier[Integer] , identifier[List] operator[<] identifier[Match] operator[>] operator[>] operator[>] identifier[spansMatchData] , identifier[List] operator[<] identifier[Integer] operator[>] identifier[docSet] , identifier[FieldInfo] identifier[fieldInfo] , identifier[String] identifier[field] , Keyword[int] identifier[docBase] , identifier[CodecInfo] identifier[mtasCodecInfo] , identifier[IndexSearcher] identifier[searcher] , identifier[LeafReaderContext] identifier[lrc] , identifier[Status] identifier[status] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[mtasCodecInfo] operator[!=] Other[null] operator[&&] identifier[groupList] operator[!=] Other[null] operator[SEP] { identifier[List] operator[<] identifier[Match] operator[>] identifier[matchList] operator[SEP] identifier[Map] operator[<] identifier[Integer] , identifier[List] operator[<] identifier[Match] operator[>] operator[>] identifier[matchData] operator[SEP] Keyword[for] operator[SEP] identifier[ComponentGroup] identifier[group] operator[:] identifier[groupList] operator[SEP] { identifier[group] operator[SEP] identifier[dataCollector] operator[SEP] identifier[setWithTotal] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[group] operator[SEP] identifier[prefixes] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[matchData] operator[=] identifier[spansMatchData] operator[SEP] identifier[get] operator[SEP] identifier[group] operator[SEP] identifier[spanQuery] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[knownPrefixes] operator[=] identifier[collectKnownPrefixes] operator[SEP] identifier[fieldInfo] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[intersectionPrefixes] operator[=] identifier[collectIntersectionPrefixes] operator[SEP] identifier[fieldInfo] operator[SEP] operator[SEP] Keyword[boolean] identifier[intersectionGroupPrefixes] operator[=] identifier[intersectionPrefixes] operator[SEP] identifier[group] , identifier[intersectionPrefixes] operator[SEP] operator[SEP] Keyword[boolean] identifier[availablePrefixes] operator[=] identifier[availablePrefixes] operator[SEP] identifier[group] , identifier[knownPrefixes] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[intersectionGroupPrefixes] operator[SEP] { Keyword[for] operator[SEP] identifier[Entry] operator[<] identifier[Integer] , identifier[List] operator[<] identifier[Match] operator[>] operator[>] identifier[entry] operator[:] identifier[matchData] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[sortMatchList] operator[SEP] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } identifier[group] operator[SEP] identifier[dataCollector] operator[SEP] identifier[initNewList] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[int] identifier[docId] operator[SEP] identifier[Map] operator[<] identifier[GroupHit] , identifier[Long] operator[>] identifier[occurencesSum] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[GroupHit] , identifier[Integer] operator[>] identifier[occurencesN] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[GroupHit] operator[>] identifier[occurencesInCurrentDocument] operator[=] Keyword[new] identifier[HashSet] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[availablePrefixes] operator[SEP] { identifier[HashMap] operator[<] identifier[Integer] , identifier[GroupHit] operator[>] identifier[hits] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[docCounter] operator[=] Other[0] operator[SEP] identifier[docCounter] operator[<] identifier[docSet] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[docCounter] operator[++] operator[SEP] { identifier[occurencesInCurrentDocument] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[docId] operator[=] identifier[docSet] operator[SEP] identifier[get] operator[SEP] identifier[docCounter] operator[SEP] operator[SEP] identifier[GroupHit] identifier[hit] operator[SEP] identifier[GroupHit] identifier[hitKey] operator[SEP] Keyword[if] operator[SEP] identifier[matchData] operator[!=] Other[null] operator[&&] operator[SEP] identifier[matchList] operator[=] identifier[matchData] operator[SEP] identifier[get] operator[SEP] identifier[docId] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] operator[!] identifier[matchList] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[Iterator] operator[<] identifier[Match] operator[>] identifier[it] operator[=] identifier[matchList] operator[SEP] identifier[listIterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[it] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[Match] identifier[m] operator[=] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[IntervalTreeNodeData] operator[<] identifier[String] operator[>] identifier[positionHit] operator[=] identifier[createPositionHit] operator[SEP] identifier[m] , identifier[group] operator[SEP] operator[SEP] Keyword[int] identifier[length] operator[=] identifier[m] operator[SEP] identifier[endPosition] operator[-] identifier[m] operator[SEP] identifier[startPosition] operator[SEP] identifier[hitKey] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[hits] operator[SEP] identifier[containsKey] operator[SEP] identifier[length] operator[SEP] operator[SEP] { identifier[hit] operator[=] Keyword[new] identifier[GroupHit] operator[SEP] identifier[positionHit] operator[SEP] identifier[list] , identifier[positionHit] operator[SEP] identifier[start] , identifier[positionHit] operator[SEP] identifier[end] , identifier[positionHit] operator[SEP] identifier[hitStart] , identifier[positionHit] operator[SEP] identifier[hitEnd] , identifier[group] , identifier[knownPrefixes] operator[SEP] operator[SEP] identifier[hits] operator[SEP] identifier[put] operator[SEP] identifier[length] , identifier[hit] operator[SEP] operator[SEP] } Keyword[else] { identifier[hit] operator[=] identifier[hits] operator[SEP] identifier[get] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[GroupHit] identifier[hitKeyItem] operator[:] identifier[occurencesSum] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[hitKeyItem] operator[SEP] identifier[equals] operator[SEP] identifier[hit] operator[SEP] operator[SEP] { identifier[hitKey] operator[=] identifier[hitKeyItem] operator[SEP] Keyword[break] operator[SEP] } } } Keyword[if] operator[SEP] identifier[hitKey] operator[==] Other[null] operator[SEP] { identifier[occurencesSum] operator[SEP] identifier[put] operator[SEP] identifier[hit] , identifier[Long] operator[SEP] identifier[valueOf] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[occurencesN] operator[SEP] identifier[put] operator[SEP] identifier[hit] , Other[1] operator[SEP] operator[SEP] identifier[occurencesInCurrentDocument] operator[SEP] identifier[add] operator[SEP] identifier[hit] operator[SEP] operator[SEP] } Keyword[else] { identifier[occurencesSum] operator[SEP] identifier[put] operator[SEP] identifier[hitKey] , identifier[occurencesSum] operator[SEP] identifier[get] operator[SEP] identifier[hitKey] operator[SEP] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[occurencesInCurrentDocument] operator[SEP] identifier[contains] operator[SEP] identifier[hitKey] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[occurencesN] operator[SEP] identifier[containsKey] operator[SEP] identifier[hitKey] operator[SEP] operator[SEP] { identifier[occurencesN] operator[SEP] identifier[put] operator[SEP] identifier[hitKey] , identifier[occurencesN] operator[SEP] identifier[get] operator[SEP] identifier[hitKey] operator[SEP] operator[+] Other[1] operator[SEP] operator[SEP] } Keyword[else] { identifier[occurencesN] operator[SEP] identifier[put] operator[SEP] identifier[hitKey] , Other[1] operator[SEP] operator[SEP] } identifier[occurencesInCurrentDocument] operator[SEP] identifier[add] operator[SEP] identifier[hitKey] operator[SEP] operator[SEP] } } } } } } Keyword[else] { Keyword[int] identifier[maximumNumberOfDocuments] operator[=] Other[0] operator[SEP] Keyword[int] identifier[boundaryMinimumNumberOfDocuments] operator[=] Other[1] operator[SEP] Keyword[int] identifier[boundaryMaximumNumberOfDocuments] operator[=] Other[5] operator[SEP] identifier[Set] operator[<] identifier[GroupHit] operator[>] identifier[administrationOccurrences] operator[=] Keyword[new] identifier[HashSet] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[docCounter] operator[=] Other[0] operator[SEP] identifier[docCounter] operator[<] identifier[docSet] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[docCounter] operator[++] operator[SEP] { identifier[occurencesInCurrentDocument] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[docId] operator[=] identifier[docSet] operator[SEP] identifier[get] operator[SEP] identifier[docCounter] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[matchData] operator[!=] Other[null] operator[&&] operator[SEP] identifier[matchList] operator[=] identifier[matchData] operator[SEP] identifier[get] operator[SEP] identifier[docId] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] operator[!] identifier[matchList] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[Iterator] operator[<] identifier[Match] operator[>] identifier[it] operator[=] identifier[matchList] operator[SEP] identifier[listIterator] operator[SEP] operator[SEP] operator[SEP] identifier[ArrayList] operator[<] identifier[IntervalTreeNodeData] operator[<] identifier[String] operator[>] operator[>] identifier[positionsHits] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[it] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[Match] identifier[m] operator[=] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[positionsHits] operator[SEP] identifier[add] operator[SEP] identifier[createPositionHit] operator[SEP] identifier[m] , identifier[group] operator[SEP] operator[SEP] operator[SEP] } identifier[mtasCodecInfo] operator[SEP] identifier[collectTermsByPrefixesForListOfHitPositions] operator[SEP] identifier[field] , operator[SEP] identifier[docId] operator[-] identifier[docBase] operator[SEP] , identifier[group] operator[SEP] identifier[prefixes] , identifier[positionsHits] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[IntervalTreeNodeData] operator[<] identifier[String] operator[>] identifier[positionHit] operator[:] identifier[positionsHits] operator[SEP] { identifier[GroupHit] identifier[hit] operator[=] Keyword[new] identifier[GroupHit] operator[SEP] identifier[positionHit] operator[SEP] identifier[list] , identifier[positionHit] operator[SEP] identifier[start] , identifier[positionHit] operator[SEP] identifier[end] , identifier[positionHit] operator[SEP] identifier[hitStart] , identifier[positionHit] operator[SEP] identifier[hitEnd] , identifier[group] , identifier[knownPrefixes] operator[SEP] operator[SEP] identifier[GroupHit] identifier[hitKey] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[GroupHit] identifier[hitKeyItem] operator[:] identifier[occurencesSum] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[hitKeyItem] operator[SEP] identifier[equals] operator[SEP] identifier[hit] operator[SEP] operator[SEP] { identifier[hitKey] operator[=] identifier[hitKeyItem] operator[SEP] Keyword[break] operator[SEP] } } Keyword[if] operator[SEP] identifier[hitKey] operator[==] Other[null] operator[SEP] { identifier[occurencesSum] operator[SEP] identifier[put] operator[SEP] identifier[hit] , identifier[Long] operator[SEP] identifier[valueOf] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[occurencesN] operator[SEP] identifier[put] operator[SEP] identifier[hit] , Other[1] operator[SEP] operator[SEP] identifier[occurencesInCurrentDocument] operator[SEP] identifier[add] operator[SEP] identifier[hit] operator[SEP] operator[SEP] } Keyword[else] { identifier[occurencesSum] operator[SEP] identifier[put] operator[SEP] identifier[hitKey] , identifier[occurencesSum] operator[SEP] identifier[get] operator[SEP] identifier[hitKey] operator[SEP] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[occurencesInCurrentDocument] operator[SEP] identifier[contains] operator[SEP] identifier[hitKey] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[occurencesN] operator[SEP] identifier[containsKey] operator[SEP] identifier[hitKey] operator[SEP] operator[SEP] { identifier[occurencesN] operator[SEP] identifier[put] operator[SEP] identifier[hitKey] , identifier[occurencesN] operator[SEP] identifier[get] operator[SEP] identifier[hitKey] operator[SEP] operator[+] Other[1] operator[SEP] operator[SEP] } Keyword[else] { identifier[occurencesN] operator[SEP] identifier[put] operator[SEP] identifier[hitKey] , Other[1] operator[SEP] operator[SEP] } identifier[occurencesInCurrentDocument] operator[SEP] identifier[add] operator[SEP] identifier[hitKey] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] operator[!] identifier[intersectionGroupPrefixes] operator[SEP] { Keyword[for] operator[SEP] identifier[GroupHit] identifier[groupHit] operator[:] identifier[occurencesInCurrentDocument] operator[SEP] { Keyword[int] identifier[tmpNumber] operator[=] identifier[occurencesN] operator[SEP] identifier[get] operator[SEP] identifier[groupHit] operator[SEP] operator[SEP] identifier[maximumNumberOfDocuments] operator[=] identifier[Math] operator[SEP] identifier[max] operator[SEP] identifier[maximumNumberOfDocuments] , identifier[tmpNumber] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tmpNumber] operator[>] identifier[boundaryMinimumNumberOfDocuments] operator[SEP] { identifier[administrationOccurrences] operator[SEP] identifier[add] operator[SEP] identifier[groupHit] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[maximumNumberOfDocuments] operator[>] identifier[boundaryMaximumNumberOfDocuments] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[administrationOccurrences] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[Map] operator[<] identifier[GroupHit] , identifier[Spans] operator[>] identifier[list] operator[=] identifier[collectSpansForOccurences] operator[SEP] identifier[administrationOccurrences] , identifier[knownPrefixes] , identifier[field] , identifier[searcher] , identifier[lrc] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[list] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[collectGroupUsingSpans] operator[SEP] identifier[list] , identifier[docSet] , identifier[docBase] , identifier[docCounter] , identifier[matchData] , identifier[occurencesSum] , identifier[occurencesN] operator[SEP] operator[SEP] } } identifier[administrationOccurrences] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[maximumNumberOfDocuments] operator[=] Other[0] operator[SEP] identifier[boundaryMinimumNumberOfDocuments] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[Math] operator[SEP] identifier[ceil] operator[SEP] identifier[boundaryMinimumNumberOfDocuments] operator[*] literal[Float] operator[SEP] operator[SEP] identifier[boundaryMaximumNumberOfDocuments] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[Math] operator[SEP] identifier[ceil] operator[SEP] identifier[boundaryMaximumNumberOfDocuments] operator[*] literal[Float] operator[SEP] operator[SEP] } } } } } Keyword[for] operator[SEP] identifier[Entry] operator[<] identifier[GroupHit] , identifier[Long] operator[>] identifier[entry] operator[:] identifier[occurencesSum] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[group] operator[SEP] identifier[dataCollector] operator[SEP] identifier[add] operator[SEP] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] , identifier[occurencesN] operator[SEP] identifier[get] operator[SEP] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[group] operator[SEP] identifier[dataCollector] operator[SEP] identifier[closeNewList] operator[SEP] operator[SEP] operator[SEP] } } } }
@Override public byte[] rPop(byte[] key) { try { if (isPipelined()) { pipeline(new JedisResult(pipeline.rpop(key))); return null; } return client.rpop(key); } catch (Exception ex) { throw convertException(ex); } }
class class_name[name] begin[{] method[rPop, return_type[type[byte]], modifier[public], parameter[key]] begin[{] TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isPipelined, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rpop, postfix_operators=[], prefix_operators=[], qualifier=pipeline, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JedisResult, sub_type=None))], member=pipeline, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)])), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rpop, postfix_operators=[], prefix_operators=[], qualifier=client, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convertException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[rPop] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[key] operator[SEP] { Keyword[try] { Keyword[if] operator[SEP] identifier[isPipelined] operator[SEP] operator[SEP] operator[SEP] { identifier[pipeline] operator[SEP] Keyword[new] identifier[JedisResult] operator[SEP] identifier[pipeline] operator[SEP] identifier[rpop] operator[SEP] identifier[key] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } Keyword[return] identifier[client] operator[SEP] identifier[rpop] operator[SEP] identifier[key] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { Keyword[throw] identifier[convertException] operator[SEP] identifier[ex] operator[SEP] operator[SEP] } }
private static Point getScreenSize(Context context, Point p) { if (p == null) { p = new Point(); } WindowManager windowManager = (WindowManager) context .getSystemService(Context.WINDOW_SERVICE); Display display = windowManager.getDefaultDisplay(); display.getSize(p); return p; }
class class_name[name] begin[{] method[getScreenSize, return_type[type[Point]], modifier[private static], parameter[context, p]] begin[{] if[binary_operation[member[.p], ==, literal[null]]] begin[{] assign[member[.p], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Point, sub_type=None))] else begin[{] None end[}] local_variable[type[WindowManager], windowManager] local_variable[type[Display], display] call[display.getSize, parameter[member[.p]]] return[member[.p]] end[}] END[}]
Keyword[private] Keyword[static] identifier[Point] identifier[getScreenSize] operator[SEP] identifier[Context] identifier[context] , identifier[Point] identifier[p] operator[SEP] { Keyword[if] operator[SEP] identifier[p] operator[==] Other[null] operator[SEP] { identifier[p] operator[=] Keyword[new] identifier[Point] operator[SEP] operator[SEP] operator[SEP] } identifier[WindowManager] identifier[windowManager] operator[=] operator[SEP] identifier[WindowManager] operator[SEP] identifier[context] operator[SEP] identifier[getSystemService] operator[SEP] identifier[Context] operator[SEP] identifier[WINDOW_SERVICE] operator[SEP] operator[SEP] identifier[Display] identifier[display] operator[=] identifier[windowManager] operator[SEP] identifier[getDefaultDisplay] operator[SEP] operator[SEP] operator[SEP] identifier[display] operator[SEP] identifier[getSize] operator[SEP] identifier[p] operator[SEP] operator[SEP] Keyword[return] identifier[p] operator[SEP] }
public static float normalizeAngle (float a) { while (a < -FloatMath.PI) { a += TWO_PI; } while (a >= FloatMath.PI) { a -= TWO_PI; } return a; }
class class_name[name] begin[{] method[normalizeAngle, return_type[type[float]], modifier[public static], parameter[a]] begin[{] while[binary_operation[member[.a], <, member[FloatMath.PI]]] begin[{] assign[member[.a], member[.TWO_PI]] end[}] while[binary_operation[member[.a], >=, member[FloatMath.PI]]] begin[{] assign[member[.a], member[.TWO_PI]] end[}] return[member[.a]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[float] identifier[normalizeAngle] operator[SEP] Keyword[float] identifier[a] operator[SEP] { Keyword[while] operator[SEP] identifier[a] operator[<] operator[-] identifier[FloatMath] operator[SEP] identifier[PI] operator[SEP] { identifier[a] operator[+=] identifier[TWO_PI] operator[SEP] } Keyword[while] operator[SEP] identifier[a] operator[>=] identifier[FloatMath] operator[SEP] identifier[PI] operator[SEP] { identifier[a] operator[-=] identifier[TWO_PI] operator[SEP] } Keyword[return] identifier[a] operator[SEP] }
public Sight copySight(long sightId, ContainerDestination destination) throws SmartsheetException { return this.createResource("sights/" + sightId + "/copy", Sight.class, destination); }
class class_name[name] begin[{] method[copySight, return_type[type[Sight]], modifier[public], parameter[sightId, destination]] begin[{] return[THIS[call[None.createResource, parameter[binary_operation[binary_operation[literal["sights/"], +, member[.sightId]], +, literal["/copy"]], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Sight, sub_type=None)), member[.destination]]]]] end[}] END[}]
Keyword[public] identifier[Sight] identifier[copySight] operator[SEP] Keyword[long] identifier[sightId] , identifier[ContainerDestination] identifier[destination] operator[SEP] Keyword[throws] identifier[SmartsheetException] { Keyword[return] Keyword[this] operator[SEP] identifier[createResource] operator[SEP] literal[String] operator[+] identifier[sightId] operator[+] literal[String] , identifier[Sight] operator[SEP] Keyword[class] , identifier[destination] operator[SEP] operator[SEP] }
public List<String> getFileAsList(final String fileName, final String encoding) throws IOException { LOG.info("Get file as list. file: " + fileName); List<String> result = new ArrayList<String>(); BufferedReader reader = null; try { reader = new BufferedReader(new InputStreamReader( new FileInputStream(fileName), encoding)); String line = null; while ((line = reader.readLine()) != null) { result.add(line); } } finally { if (reader != null) { reader.close(); } } LOG.info("Returning: " + result); return result; }
class class_name[name] begin[{] method[getFileAsList, return_type[type[List]], modifier[public], parameter[fileName, encoding]] begin[{] call[LOG.info, parameter[binary_operation[literal["Get file as list. file: "], +, member[.fileName]]]] local_variable[type[List], result] local_variable[type[BufferedReader], reader] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=fileName, 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)), MemberReference(member=encoding, 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=InputStreamReader, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BufferedReader, sub_type=None))), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=line)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]), condition=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=readLine, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None)], catches=None, finally_block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None), label=None)]))], label=None, resources=None) call[LOG.info, parameter[binary_operation[literal["Returning: "], +, member[.result]]]] return[member[.result]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[getFileAsList] operator[SEP] Keyword[final] identifier[String] identifier[fileName] , Keyword[final] identifier[String] identifier[encoding] operator[SEP] Keyword[throws] identifier[IOException] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[fileName] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[BufferedReader] identifier[reader] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[reader] operator[=] Keyword[new] identifier[BufferedReader] operator[SEP] Keyword[new] identifier[InputStreamReader] operator[SEP] Keyword[new] identifier[FileInputStream] operator[SEP] identifier[fileName] operator[SEP] , identifier[encoding] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[line] operator[=] Other[null] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[line] operator[=] identifier[reader] operator[SEP] identifier[readLine] operator[SEP] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[result] operator[SEP] identifier[add] operator[SEP] identifier[line] operator[SEP] operator[SEP] } } Keyword[finally] { Keyword[if] operator[SEP] identifier[reader] operator[!=] Other[null] operator[SEP] { identifier[reader] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[result] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
protected static BufferedImage fakeAOI(final BufferedImage pImage, final ImageWriteParam pParam) { return IIOUtil.fakeAOI(pImage, getSourceRegion(pParam, pImage.getWidth(), pImage.getHeight())); }
class class_name[name] begin[{] method[fakeAOI, return_type[type[BufferedImage]], modifier[static protected], parameter[pImage, pParam]] begin[{] return[call[IIOUtil.fakeAOI, parameter[member[.pImage], call[.getSourceRegion, parameter[member[.pParam], call[pImage.getWidth, parameter[]], call[pImage.getHeight, parameter[]]]]]]] end[}] END[}]
Keyword[protected] Keyword[static] identifier[BufferedImage] identifier[fakeAOI] operator[SEP] Keyword[final] identifier[BufferedImage] identifier[pImage] , Keyword[final] identifier[ImageWriteParam] identifier[pParam] operator[SEP] { Keyword[return] identifier[IIOUtil] operator[SEP] identifier[fakeAOI] operator[SEP] identifier[pImage] , identifier[getSourceRegion] operator[SEP] identifier[pParam] , identifier[pImage] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] , identifier[pImage] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override public DeleteCrawlerResult deleteCrawler(DeleteCrawlerRequest request) { request = beforeClientExecution(request); return executeDeleteCrawler(request); }
class class_name[name] begin[{] method[deleteCrawler, return_type[type[DeleteCrawlerResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeDeleteCrawler, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[DeleteCrawlerResult] identifier[deleteCrawler] operator[SEP] identifier[DeleteCrawlerRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeDeleteCrawler] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public static Part<File> file(String name, File file) { return file(name, file.getName(), file); }
class class_name[name] begin[{] method[file, return_type[type[Part]], modifier[public static], parameter[name, file]] begin[{] return[call[.file, parameter[member[.name], call[file.getName, parameter[]], member[.file]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Part] operator[<] identifier[File] operator[>] identifier[file] operator[SEP] identifier[String] identifier[name] , identifier[File] identifier[file] operator[SEP] { Keyword[return] identifier[file] operator[SEP] identifier[name] , identifier[file] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[file] operator[SEP] operator[SEP] }
public void init(K key) { if (null == key) return; CacheReference<K> refKey = keyFactory.createKey(key, queue); if (cache.containsKey(refKey)) return; FutureTask<CacheReference<V>> task = new FutureTask<>(()-> { V created = requireNonNull(create(key)); return valueFactory.createValue(created, queue); }); cache.put(refKey, task); task.run(); }
class class_name[name] begin[{] method[init, return_type[void], modifier[public], parameter[key]] begin[{] if[binary_operation[literal[null], ==, member[.key]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[CacheReference], refKey] if[call[cache.containsKey, parameter[member[.refKey]]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[FutureTask], task] call[cache.put, parameter[member[.refKey], member[.task]]] call[task.run, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[init] operator[SEP] identifier[K] identifier[key] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[key] operator[SEP] Keyword[return] operator[SEP] identifier[CacheReference] operator[<] identifier[K] operator[>] identifier[refKey] operator[=] identifier[keyFactory] operator[SEP] identifier[createKey] operator[SEP] identifier[key] , identifier[queue] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cache] operator[SEP] identifier[containsKey] operator[SEP] identifier[refKey] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[FutureTask] operator[<] identifier[CacheReference] operator[<] identifier[V] operator[>] operator[>] identifier[task] operator[=] Keyword[new] identifier[FutureTask] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[->] { identifier[V] identifier[created] operator[=] identifier[requireNonNull] operator[SEP] identifier[create] operator[SEP] identifier[key] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[valueFactory] operator[SEP] identifier[createValue] operator[SEP] identifier[created] , identifier[queue] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] identifier[cache] operator[SEP] identifier[put] operator[SEP] identifier[refKey] , identifier[task] operator[SEP] operator[SEP] identifier[task] operator[SEP] identifier[run] operator[SEP] operator[SEP] operator[SEP] }
public History[] getHistory(int profileId, String clientUUID, int offset, int limit, boolean withResponseData, HashMap<String, String[]> searchFilter, boolean hasMessage) throws Exception { ArrayList<History> returnData = new ArrayList<History>(); Statement query = null; ResultSet results = null; Script[] scripts = ScriptService.getInstance().getScripts(Constants.SCRIPT_TYPE_HISTORY); String sqlQuery = "SELECT * FROM " + Constants.DB_TABLE_HISTORY + " "; int totalSearchLimit = -1; // see if profileId is set or not (-1) if (profileId != -1) { sqlQuery += "WHERE " + Constants.GENERIC_PROFILE_ID + "=" + profileId + " "; } if (clientUUID != null && clientUUID.compareTo("") != 0) { sqlQuery += "AND " + Constants.GENERIC_CLIENT_UUID + "='" + clientUUID + "' "; } sqlQuery += " ORDER BY " + Constants.GENERIC_ID + " DESC "; if (searchFilter == null && limit != -1) { sqlQuery += "LIMIT " + limit + " "; sqlQuery += "OFFSET " + offset; } if (hasMessage) { totalSearchLimit = 1000; } sqlQuery += ";"; logger.info("Query: {}", sqlQuery); try (Connection sqlConnection = sqlService.getConnection()) { int entriesMatched = 0; // loop through all of the results, process filters and build an array of the results to return query = sqlConnection.createStatement(); results = query.executeQuery(sqlQuery); int itemsViewed = 0; while (results.next() && (itemsViewed < totalSearchLimit || totalSearchLimit == -1)) { itemsViewed++; if (hasMessage && historyFromSQLResult(results, withResponseData, scripts).getValid()) { continue; } if (searchFilter != null) { // iterate over searchFilter and try to match the source URI if (searchFilter.containsKey(Constants.HISTORY_FILTER_SOURCE_URI)) { String[] sourceURIFilters = searchFilter.get(Constants.HISTORY_FILTER_SOURCE_URI); int numMatches = 0; // this will loop through all filters and count up the # of matches // an item will be removed if the # of matches doesn't equal the number of filters for (String uriFilter : sourceURIFilters) { Pattern pattern = Pattern.compile(uriFilter); Matcher matcher = pattern.matcher(results.getString(Constants.HISTORY_REQUEST_URL) + "?" + results.getString(Constants.HISTORY_REQUEST_PARAMS)); if (matcher.find()) { numMatches++; } } if (numMatches != sourceURIFilters.length) { // skip this item continue; } } } entriesMatched++; if (offset < entriesMatched) { returnData.add(historyFromSQLResult(results, withResponseData, scripts)); if (limit != -1 && returnData.size() >= limit) { break; } } } } catch (Exception e) { throw e; } finally { try { if (results != null) { results.close(); } } catch (Exception e) { } try { if (query != null) { query.close(); } } catch (Exception e) { } } return returnData.toArray(new History[0]); }
class class_name[name] begin[{] method[getHistory, return_type[type[History]], modifier[public], parameter[profileId, clientUUID, offset, limit, withResponseData, searchFilter, hasMessage]] begin[{] local_variable[type[ArrayList], returnData] local_variable[type[Statement], query] local_variable[type[ResultSet], results] local_variable[type[Script], scripts] local_variable[type[String], sqlQuery] local_variable[type[int], totalSearchLimit] if[binary_operation[member[.profileId], !=, literal[1]]] begin[{] assign[member[.sqlQuery], binary_operation[binary_operation[binary_operation[binary_operation[literal["WHERE "], +, member[Constants.GENERIC_PROFILE_ID]], +, literal["="]], +, member[.profileId]], +, literal[" "]]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.clientUUID], !=, literal[null]], &&, binary_operation[call[clientUUID.compareTo, parameter[literal[""]]], !=, literal[0]]]] begin[{] assign[member[.sqlQuery], binary_operation[binary_operation[binary_operation[binary_operation[literal["AND "], +, member[Constants.GENERIC_CLIENT_UUID]], +, literal["='"]], +, member[.clientUUID]], +, literal["' "]]] else begin[{] None end[}] assign[member[.sqlQuery], binary_operation[binary_operation[literal[" ORDER BY "], +, member[Constants.GENERIC_ID]], +, literal[" DESC "]]] if[binary_operation[binary_operation[member[.searchFilter], ==, literal[null]], &&, binary_operation[member[.limit], !=, literal[1]]]] begin[{] assign[member[.sqlQuery], binary_operation[binary_operation[literal["LIMIT "], +, member[.limit]], +, literal[" "]]] assign[member[.sqlQuery], binary_operation[literal["OFFSET "], +, member[.offset]]] else begin[{] None end[}] if[member[.hasMessage]] begin[{] assign[member[.totalSearchLimit], literal[1000]] else begin[{] None end[}] assign[member[.sqlQuery], literal[";"]] call[logger.info, parameter[literal["Query: {}"], member[.sqlQuery]]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=entriesMatched)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=query, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=createStatement, postfix_operators=[], prefix_operators=[], qualifier=sqlConnection, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=results, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=sqlQuery, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=executeQuery, postfix_operators=[], prefix_operators=[], qualifier=query, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=itemsViewed)], modifiers=set(), type=BasicType(dimensions=[], name=int)), WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=itemsViewed, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=hasMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[MemberReference(member=results, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=withResponseData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=scripts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=historyFromSQLResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getValid, 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=[ContinueStatement(goto=None, label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=searchFilter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=HISTORY_FILTER_SOURCE_URI, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=searchFilter, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=HISTORY_FILTER_SOURCE_URI, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=searchFilter, selectors=[], type_arguments=None), name=sourceURIFilters)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=numMatches)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=uriFilter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compile, postfix_operators=[], prefix_operators=[], qualifier=Pattern, selectors=[], type_arguments=None), name=pattern)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Pattern, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=HISTORY_REQUEST_URL, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[])], member=getString, postfix_operators=[], prefix_operators=[], qualifier=results, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="?"), operator=+), operandr=MethodInvocation(arguments=[MemberReference(member=HISTORY_REQUEST_PARAMS, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[])], member=getString, postfix_operators=[], prefix_operators=[], qualifier=results, selectors=[], type_arguments=None), operator=+)], member=matcher, postfix_operators=[], prefix_operators=[], qualifier=pattern, selectors=[], type_arguments=None), name=matcher)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Matcher, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=find, postfix_operators=[], prefix_operators=[], qualifier=matcher, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=numMatches, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=sourceURIFilters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=uriFilter)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=numMatches, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=sourceURIFilters, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)]))]))])), StatementExpression(expression=MemberReference(member=entriesMatched, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=entriesMatched, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=results, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=withResponseData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=scripts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=historyFromSQLResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=returnData, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=limit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator=!=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=returnData, selectors=[], type_arguments=None), operandr=MemberReference(member=limit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)]))]))]), condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=results, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=itemsViewed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=totalSearchLimit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operandr=BinaryOperation(operandl=MemberReference(member=totalSearchLimit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator===), operator=||), operator=&&), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=[TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=results, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=results, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None), TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=query, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=query, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None)], label=None, resources=[TryResource(annotations=[], modifiers=set(), name=sqlConnection, type=ReferenceType(arguments=None, dimensions=[], name=Connection, sub_type=None), value=MethodInvocation(arguments=[], member=getConnection, postfix_operators=[], prefix_operators=[], qualifier=sqlService, selectors=[], type_arguments=None))]) return[call[returnData.toArray, parameter[ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=History, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[History] operator[SEP] operator[SEP] identifier[getHistory] operator[SEP] Keyword[int] identifier[profileId] , identifier[String] identifier[clientUUID] , Keyword[int] identifier[offset] , Keyword[int] identifier[limit] , Keyword[boolean] identifier[withResponseData] , identifier[HashMap] operator[<] identifier[String] , identifier[String] operator[SEP] operator[SEP] operator[>] identifier[searchFilter] , Keyword[boolean] identifier[hasMessage] operator[SEP] Keyword[throws] identifier[Exception] { identifier[ArrayList] operator[<] identifier[History] operator[>] identifier[returnData] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[History] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Statement] identifier[query] operator[=] Other[null] operator[SEP] identifier[ResultSet] identifier[results] operator[=] Other[null] operator[SEP] identifier[Script] operator[SEP] operator[SEP] identifier[scripts] operator[=] identifier[ScriptService] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[getScripts] operator[SEP] identifier[Constants] operator[SEP] identifier[SCRIPT_TYPE_HISTORY] operator[SEP] operator[SEP] identifier[String] identifier[sqlQuery] operator[=] literal[String] operator[+] identifier[Constants] operator[SEP] identifier[DB_TABLE_HISTORY] operator[+] literal[String] operator[SEP] Keyword[int] identifier[totalSearchLimit] operator[=] operator[-] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[profileId] operator[!=] operator[-] Other[1] operator[SEP] { identifier[sqlQuery] operator[+=] literal[String] operator[+] identifier[Constants] operator[SEP] identifier[GENERIC_PROFILE_ID] operator[+] literal[String] operator[+] identifier[profileId] operator[+] literal[String] operator[SEP] } Keyword[if] operator[SEP] identifier[clientUUID] operator[!=] Other[null] operator[&&] identifier[clientUUID] operator[SEP] identifier[compareTo] operator[SEP] literal[String] operator[SEP] operator[!=] Other[0] operator[SEP] { identifier[sqlQuery] operator[+=] literal[String] operator[+] identifier[Constants] operator[SEP] identifier[GENERIC_CLIENT_UUID] operator[+] literal[String] operator[+] identifier[clientUUID] operator[+] literal[String] operator[SEP] } identifier[sqlQuery] operator[+=] literal[String] operator[+] identifier[Constants] operator[SEP] identifier[GENERIC_ID] operator[+] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[searchFilter] operator[==] Other[null] operator[&&] identifier[limit] operator[!=] operator[-] Other[1] operator[SEP] { identifier[sqlQuery] operator[+=] literal[String] operator[+] identifier[limit] operator[+] literal[String] operator[SEP] identifier[sqlQuery] operator[+=] literal[String] operator[+] identifier[offset] operator[SEP] } Keyword[if] operator[SEP] identifier[hasMessage] operator[SEP] { identifier[totalSearchLimit] operator[=] Other[1000] operator[SEP] } identifier[sqlQuery] operator[+=] literal[String] operator[SEP] identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[sqlQuery] operator[SEP] operator[SEP] Keyword[try] operator[SEP] identifier[Connection] identifier[sqlConnection] operator[=] identifier[sqlService] operator[SEP] identifier[getConnection] operator[SEP] operator[SEP] operator[SEP] { Keyword[int] identifier[entriesMatched] operator[=] Other[0] operator[SEP] identifier[query] operator[=] identifier[sqlConnection] operator[SEP] identifier[createStatement] operator[SEP] operator[SEP] operator[SEP] identifier[results] operator[=] identifier[query] operator[SEP] identifier[executeQuery] operator[SEP] identifier[sqlQuery] operator[SEP] operator[SEP] Keyword[int] identifier[itemsViewed] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] identifier[results] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[itemsViewed] operator[<] identifier[totalSearchLimit] operator[||] identifier[totalSearchLimit] operator[==] operator[-] Other[1] operator[SEP] operator[SEP] { identifier[itemsViewed] operator[++] operator[SEP] Keyword[if] operator[SEP] identifier[hasMessage] operator[&&] identifier[historyFromSQLResult] operator[SEP] identifier[results] , identifier[withResponseData] , identifier[scripts] operator[SEP] operator[SEP] identifier[getValid] operator[SEP] operator[SEP] operator[SEP] { Keyword[continue] operator[SEP] } Keyword[if] operator[SEP] identifier[searchFilter] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[searchFilter] operator[SEP] identifier[containsKey] operator[SEP] identifier[Constants] operator[SEP] identifier[HISTORY_FILTER_SOURCE_URI] operator[SEP] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[sourceURIFilters] operator[=] identifier[searchFilter] operator[SEP] identifier[get] operator[SEP] identifier[Constants] operator[SEP] identifier[HISTORY_FILTER_SOURCE_URI] operator[SEP] operator[SEP] Keyword[int] identifier[numMatches] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[uriFilter] operator[:] identifier[sourceURIFilters] operator[SEP] { identifier[Pattern] identifier[pattern] operator[=] identifier[Pattern] operator[SEP] identifier[compile] operator[SEP] identifier[uriFilter] operator[SEP] operator[SEP] identifier[Matcher] identifier[matcher] operator[=] identifier[pattern] operator[SEP] identifier[matcher] operator[SEP] identifier[results] operator[SEP] identifier[getString] operator[SEP] identifier[Constants] operator[SEP] identifier[HISTORY_REQUEST_URL] operator[SEP] operator[+] literal[String] operator[+] identifier[results] operator[SEP] identifier[getString] operator[SEP] identifier[Constants] operator[SEP] identifier[HISTORY_REQUEST_PARAMS] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[matcher] operator[SEP] identifier[find] operator[SEP] operator[SEP] operator[SEP] { identifier[numMatches] operator[++] operator[SEP] } } Keyword[if] operator[SEP] identifier[numMatches] operator[!=] identifier[sourceURIFilters] operator[SEP] identifier[length] operator[SEP] { Keyword[continue] operator[SEP] } } } identifier[entriesMatched] operator[++] operator[SEP] Keyword[if] operator[SEP] identifier[offset] operator[<] identifier[entriesMatched] operator[SEP] { identifier[returnData] operator[SEP] identifier[add] operator[SEP] identifier[historyFromSQLResult] operator[SEP] identifier[results] , identifier[withResponseData] , identifier[scripts] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[limit] operator[!=] operator[-] Other[1] operator[&&] identifier[returnData] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>=] identifier[limit] operator[SEP] { Keyword[break] operator[SEP] } } } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] identifier[e] operator[SEP] } Keyword[finally] { Keyword[try] { Keyword[if] operator[SEP] identifier[results] operator[!=] Other[null] operator[SEP] { identifier[results] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { } Keyword[try] { Keyword[if] operator[SEP] identifier[query] operator[!=] Other[null] operator[SEP] { identifier[query] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { } } Keyword[return] identifier[returnData] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[History] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] }
@Override public synchronized ChainData[] getAllChains(Class<?> factoryClass) throws InvalidChannelFactoryException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.entry(tc, "getAllChains(factory)"); } if (null == factoryClass) { throw new InvalidChannelFactoryException("Null factory class found"); } String inputFactoryClassName = factoryClass.getName(); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "factory=" + inputFactoryClassName); } // Collect all chains referring to the channel List<ChainData> chainDataList = new ArrayList<ChainData>(); ChannelData[] channels = null; for (ChainData chainData : this.chainDataMap.values()) { // Look at each channel associated with this chain. channels = chainData.getChannelList(); for (int i = 0; i < channels.length; i++) { if (channels[i].getFactoryType().getName().equals(inputFactoryClassName)) { chainDataList.add(chainData); } } } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.exit(tc, "getAllChains"); } return chainDataList.toArray(new ChainData[chainDataList.size()]); }
class class_name[name] begin[{] method[getAllChains, return_type[type[ChainData]], modifier[synchronized public], parameter[factoryClass]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.entry, parameter[member[.tc], literal["getAllChains(factory)"]]] else begin[{] None end[}] if[binary_operation[literal[null], ==, member[.factoryClass]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Null factory class found")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InvalidChannelFactoryException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[String], inputFactoryClassName] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[literal["factory="], +, member[.inputFactoryClassName]]]] else begin[{] None end[}] local_variable[type[List], chainDataList] local_variable[type[ChannelData], channels] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=channels, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getChannelList, postfix_operators=[], prefix_operators=[], qualifier=chainData, selectors=[], type_arguments=None)), label=None), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=channels, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=getFactoryType, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=inputFactoryClassName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=chainData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=chainDataList, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=channels, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=EnhancedForControl(iterable=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=chainDataMap, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=values, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=chainData)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ChainData, sub_type=None))), label=None) if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.exit, parameter[member[.tc], literal["getAllChains"]]] else begin[{] None end[}] return[call[chainDataList.toArray, parameter[ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=chainDataList, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ChainData, sub_type=None))]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[synchronized] identifier[ChainData] operator[SEP] operator[SEP] identifier[getAllChains] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[factoryClass] operator[SEP] Keyword[throws] identifier[InvalidChannelFactoryException] { 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[SEP] operator[SEP] } Keyword[if] operator[SEP] Other[null] operator[==] identifier[factoryClass] operator[SEP] { Keyword[throw] Keyword[new] identifier[InvalidChannelFactoryException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[String] identifier[inputFactoryClassName] operator[=] identifier[factoryClass] operator[SEP] identifier[getName] 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[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[inputFactoryClassName] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[ChainData] operator[>] identifier[chainDataList] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[ChainData] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[ChannelData] operator[SEP] operator[SEP] identifier[channels] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[ChainData] identifier[chainData] operator[:] Keyword[this] operator[SEP] identifier[chainDataMap] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { identifier[channels] operator[=] identifier[chainData] operator[SEP] identifier[getChannelList] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[channels] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[channels] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[getFactoryType] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[inputFactoryClassName] operator[SEP] operator[SEP] { identifier[chainDataList] operator[SEP] identifier[add] operator[SEP] identifier[chainData] 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[exit] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[chainDataList] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[ChainData] operator[SEP] identifier[chainDataList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static String getRelativePath(File file, File srcDir) { String base = srcDir.getPath(); String filePath = file.getPath(); String relativePath = new File(base).toURI() .relativize(new File(filePath).toURI()).getPath(); return relativePath; }
class class_name[name] begin[{] method[getRelativePath, return_type[type[String]], modifier[public static], parameter[file, srcDir]] begin[{] local_variable[type[String], base] local_variable[type[String], filePath] local_variable[type[String], relativePath] return[member[.relativePath]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getRelativePath] operator[SEP] identifier[File] identifier[file] , identifier[File] identifier[srcDir] operator[SEP] { identifier[String] identifier[base] operator[=] identifier[srcDir] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[filePath] operator[=] identifier[file] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[relativePath] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[base] operator[SEP] operator[SEP] identifier[toURI] operator[SEP] operator[SEP] operator[SEP] identifier[relativize] operator[SEP] Keyword[new] identifier[File] operator[SEP] identifier[filePath] operator[SEP] operator[SEP] identifier[toURI] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[relativePath] operator[SEP] }
public boolean equals3D(final Coordinate other) { return getX() == other.getX() && getY() == other.getY() && (getZ() == other.getZ() || Double.isNaN(getZ()) && Double.isNaN(other.getZ())); }
class class_name[name] begin[{] method[equals3D, return_type[type[boolean]], modifier[public], parameter[other]] begin[{] return[binary_operation[binary_operation[binary_operation[call[.getX, parameter[]], ==, call[other.getX, parameter[]]], &&, binary_operation[call[.getY, parameter[]], ==, call[other.getY, parameter[]]]], &&, binary_operation[binary_operation[call[.getZ, parameter[]], ==, call[other.getZ, parameter[]]], ||, binary_operation[call[Double.isNaN, parameter[call[.getZ, parameter[]]]], &&, call[Double.isNaN, parameter[call[other.getZ, parameter[]]]]]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[equals3D] operator[SEP] Keyword[final] identifier[Coordinate] identifier[other] operator[SEP] { Keyword[return] identifier[getX] operator[SEP] operator[SEP] operator[==] identifier[other] operator[SEP] identifier[getX] operator[SEP] operator[SEP] operator[&&] identifier[getY] operator[SEP] operator[SEP] operator[==] identifier[other] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[getZ] operator[SEP] operator[SEP] operator[==] identifier[other] operator[SEP] identifier[getZ] operator[SEP] operator[SEP] operator[||] identifier[Double] operator[SEP] identifier[isNaN] operator[SEP] identifier[getZ] operator[SEP] operator[SEP] operator[SEP] operator[&&] identifier[Double] operator[SEP] identifier[isNaN] operator[SEP] identifier[other] operator[SEP] identifier[getZ] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private SQLiteConnection waitForConnection(String sql, int connectionFlags, CancellationSignal cancellationSignal) { final boolean wantPrimaryConnection = (connectionFlags & CONNECTION_FLAG_PRIMARY_CONNECTION_AFFINITY) != 0; final ConnectionWaiter waiter; final int nonce; synchronized (mLock) { throwIfClosedLocked(); // Abort if canceled. if (cancellationSignal != null) { cancellationSignal.throwIfCanceled(); } // Try to acquire a connection. SQLiteConnection connection = null; if (!wantPrimaryConnection) { connection = tryAcquireNonPrimaryConnectionLocked( sql, connectionFlags); // might throw } if (connection == null) { connection = tryAcquirePrimaryConnectionLocked(connectionFlags); // might throw } if (connection != null) { return connection; } // No connections available. Enqueue a waiter in priority order. final int priority = getPriority(connectionFlags); final long startTime = SystemClock.uptimeMillis(); waiter = obtainConnectionWaiterLocked(Thread.currentThread(), startTime, priority, wantPrimaryConnection, sql, connectionFlags); ConnectionWaiter predecessor = null; ConnectionWaiter successor = mConnectionWaiterQueue; while (successor != null) { if (priority > successor.mPriority) { waiter.mNext = successor; break; } predecessor = successor; successor = successor.mNext; } if (predecessor != null) { predecessor.mNext = waiter; } else { mConnectionWaiterQueue = waiter; } nonce = waiter.mNonce; } // Set up the cancellation listener. if (cancellationSignal != null) { cancellationSignal.setOnCancelListener(new CancellationSignal.OnCancelListener() { @Override public void onCancel() { synchronized (mLock) { if (waiter.mNonce == nonce) { cancelConnectionWaiterLocked(waiter); } } } }); } try { // Park the thread until a connection is assigned or the pool is closed. // Rethrow an exception from the wait, if we got one. long busyTimeoutMillis = CONNECTION_POOL_BUSY_MILLIS; long nextBusyTimeoutTime = waiter.mStartTime + busyTimeoutMillis; for (;;) { // Detect and recover from connection leaks. if (mConnectionLeaked.compareAndSet(true, false)) { synchronized (mLock) { wakeConnectionWaitersLocked(); } } // Wait to be unparked (may already have happened), a timeout, or interruption. LockSupport.parkNanos(this, busyTimeoutMillis * 1000000L); // Clear the interrupted flag, just in case. Thread.interrupted(); // Check whether we are done waiting yet. synchronized (mLock) { throwIfClosedLocked(); final SQLiteConnection connection = waiter.mAssignedConnection; final RuntimeException ex = waiter.mException; if (connection != null || ex != null) { recycleConnectionWaiterLocked(waiter); if (connection != null) { return connection; } throw ex; // rethrow! } final long now = SystemClock.uptimeMillis(); if (now < nextBusyTimeoutTime) { busyTimeoutMillis = now - nextBusyTimeoutTime; } else { logConnectionPoolBusyLocked(now - waiter.mStartTime, connectionFlags); busyTimeoutMillis = CONNECTION_POOL_BUSY_MILLIS; nextBusyTimeoutTime = now + busyTimeoutMillis; } } } } finally { // Remove the cancellation listener. if (cancellationSignal != null) { cancellationSignal.setOnCancelListener(null); } } }
class class_name[name] begin[{] method[waitForConnection, return_type[type[SQLiteConnection]], modifier[private], parameter[sql, connectionFlags, cancellationSignal]] begin[{] local_variable[type[boolean], wantPrimaryConnection] local_variable[type[ConnectionWaiter], waiter] local_variable[type[int], nonce] SYNCHRONIZED[member[.mLock]] BEGIN[{] call[.throwIfClosedLocked, parameter[]] if[binary_operation[member[.cancellationSignal], !=, literal[null]]] begin[{] call[cancellationSignal.throwIfCanceled, parameter[]] else begin[{] None end[}] local_variable[type[SQLiteConnection], connection] if[member[.wantPrimaryConnection]] begin[{] assign[member[.connection], call[.tryAcquireNonPrimaryConnectionLocked, parameter[member[.sql], member[.connectionFlags]]]] else begin[{] None end[}] if[binary_operation[member[.connection], ==, literal[null]]] begin[{] assign[member[.connection], call[.tryAcquirePrimaryConnectionLocked, parameter[member[.connectionFlags]]]] else begin[{] None end[}] if[binary_operation[member[.connection], !=, literal[null]]] begin[{] return[member[.connection]] else begin[{] None end[}] local_variable[type[int], priority] local_variable[type[long], startTime] assign[member[.waiter], call[.obtainConnectionWaiterLocked, parameter[call[Thread.currentThread, parameter[]], member[.startTime], member[.priority], member[.wantPrimaryConnection], member[.sql], member[.connectionFlags]]]] local_variable[type[ConnectionWaiter], predecessor] local_variable[type[ConnectionWaiter], successor] while[binary_operation[member[.successor], !=, literal[null]]] begin[{] if[binary_operation[member[.priority], >, member[successor.mPriority]]] begin[{] assign[member[waiter.mNext], member[.successor]] BreakStatement(goto=None, label=None) else begin[{] None end[}] assign[member[.predecessor], member[.successor]] assign[member[.successor], member[successor.mNext]] end[}] if[binary_operation[member[.predecessor], !=, literal[null]]] begin[{] assign[member[predecessor.mNext], member[.waiter]] else begin[{] assign[member[.mConnectionWaiterQueue], member[.waiter]] end[}] assign[member[.nonce], member[waiter.mNonce]] END[}] if[binary_operation[member[.cancellationSignal], !=, literal[null]]] begin[{] call[cancellationSignal.setOnCancelListener, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[SynchronizedStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=mNonce, postfix_operators=[], prefix_operators=[], qualifier=waiter, selectors=[]), operandr=MemberReference(member=nonce, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=waiter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=cancelConnectionWaiterLocked, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], label=None, lock=MemberReference(member=mLock, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))], documentation=None, modifiers={'public'}, name=onCancel, parameters=[], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CancellationSignal, sub_type=ReferenceType(arguments=None, dimensions=None, name=OnCancelListener, sub_type=None)))]] else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=CONNECTION_POOL_BUSY_MILLIS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=busyTimeoutMillis)], modifiers=set(), type=BasicType(dimensions=[], name=long)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=mStartTime, postfix_operators=[], prefix_operators=[], qualifier=waiter, selectors=[]), operandr=MemberReference(member=busyTimeoutMillis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), name=nextBusyTimeoutTime)], modifiers=set(), type=BasicType(dimensions=[], name=long)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=compareAndSet, postfix_operators=[], prefix_operators=[], qualifier=mConnectionLeaked, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[SynchronizedStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=wakeConnectionWaitersLocked, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, lock=MemberReference(member=mLock, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), BinaryOperation(operandl=MemberReference(member=busyTimeoutMillis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1000000L), operator=*)], member=parkNanos, postfix_operators=[], prefix_operators=[], qualifier=LockSupport, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=interrupted, postfix_operators=[], prefix_operators=[], qualifier=Thread, selectors=[], type_arguments=None), label=None), SynchronizedStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=throwIfClosedLocked, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=mAssignedConnection, postfix_operators=[], prefix_operators=[], qualifier=waiter, selectors=[]), name=connection)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=SQLiteConnection, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=mException, postfix_operators=[], prefix_operators=[], qualifier=waiter, selectors=[]), name=ex)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=RuntimeException, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=connection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=waiter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recycleConnectionWaiterLocked, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=connection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=connection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), ThrowStatement(expression=MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=uptimeMillis, postfix_operators=[], prefix_operators=[], qualifier=SystemClock, selectors=[], type_arguments=None), name=now)], modifiers={'final'}, type=BasicType(dimensions=[], name=long)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=now, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=nextBusyTimeoutTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=now, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=mStartTime, postfix_operators=[], prefix_operators=[], qualifier=waiter, selectors=[]), operator=-), MemberReference(member=connectionFlags, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=logConnectionPoolBusyLocked, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=busyTimeoutMillis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=CONNECTION_POOL_BUSY_MILLIS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=nextBusyTimeoutTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=now, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=busyTimeoutMillis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=busyTimeoutMillis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=now, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=nextBusyTimeoutTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-)), label=None)]))], label=None, lock=MemberReference(member=mLock, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), control=ForControl(condition=None, init=None, update=None), label=None)], catches=None, finally_block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=cancellationSignal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=setOnCancelListener, postfix_operators=[], prefix_operators=[], qualifier=cancellationSignal, selectors=[], type_arguments=None), label=None)]))], label=None, resources=None) end[}] END[}]
Keyword[private] identifier[SQLiteConnection] identifier[waitForConnection] operator[SEP] identifier[String] identifier[sql] , Keyword[int] identifier[connectionFlags] , identifier[CancellationSignal] identifier[cancellationSignal] operator[SEP] { Keyword[final] Keyword[boolean] identifier[wantPrimaryConnection] operator[=] operator[SEP] identifier[connectionFlags] operator[&] identifier[CONNECTION_FLAG_PRIMARY_CONNECTION_AFFINITY] operator[SEP] operator[!=] Other[0] operator[SEP] Keyword[final] identifier[ConnectionWaiter] identifier[waiter] operator[SEP] Keyword[final] Keyword[int] identifier[nonce] operator[SEP] Keyword[synchronized] operator[SEP] identifier[mLock] operator[SEP] { identifier[throwIfClosedLocked] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cancellationSignal] operator[!=] Other[null] operator[SEP] { identifier[cancellationSignal] operator[SEP] identifier[throwIfCanceled] operator[SEP] operator[SEP] operator[SEP] } identifier[SQLiteConnection] identifier[connection] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[wantPrimaryConnection] operator[SEP] { identifier[connection] operator[=] identifier[tryAcquireNonPrimaryConnectionLocked] operator[SEP] identifier[sql] , identifier[connectionFlags] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[connection] operator[==] Other[null] operator[SEP] { identifier[connection] operator[=] identifier[tryAcquirePrimaryConnectionLocked] operator[SEP] identifier[connectionFlags] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[connection] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[connection] operator[SEP] } Keyword[final] Keyword[int] identifier[priority] operator[=] identifier[getPriority] operator[SEP] identifier[connectionFlags] operator[SEP] operator[SEP] Keyword[final] Keyword[long] identifier[startTime] operator[=] identifier[SystemClock] operator[SEP] identifier[uptimeMillis] operator[SEP] operator[SEP] operator[SEP] identifier[waiter] operator[=] identifier[obtainConnectionWaiterLocked] operator[SEP] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] , identifier[startTime] , identifier[priority] , identifier[wantPrimaryConnection] , identifier[sql] , identifier[connectionFlags] operator[SEP] operator[SEP] identifier[ConnectionWaiter] identifier[predecessor] operator[=] Other[null] operator[SEP] identifier[ConnectionWaiter] identifier[successor] operator[=] identifier[mConnectionWaiterQueue] operator[SEP] Keyword[while] operator[SEP] identifier[successor] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[priority] operator[>] identifier[successor] operator[SEP] identifier[mPriority] operator[SEP] { identifier[waiter] operator[SEP] identifier[mNext] operator[=] identifier[successor] operator[SEP] Keyword[break] operator[SEP] } identifier[predecessor] operator[=] identifier[successor] operator[SEP] identifier[successor] operator[=] identifier[successor] operator[SEP] identifier[mNext] operator[SEP] } Keyword[if] operator[SEP] identifier[predecessor] operator[!=] Other[null] operator[SEP] { identifier[predecessor] operator[SEP] identifier[mNext] operator[=] identifier[waiter] operator[SEP] } Keyword[else] { identifier[mConnectionWaiterQueue] operator[=] identifier[waiter] operator[SEP] } identifier[nonce] operator[=] identifier[waiter] operator[SEP] identifier[mNonce] operator[SEP] } Keyword[if] operator[SEP] identifier[cancellationSignal] operator[!=] Other[null] operator[SEP] { identifier[cancellationSignal] operator[SEP] identifier[setOnCancelListener] operator[SEP] Keyword[new] identifier[CancellationSignal] operator[SEP] identifier[OnCancelListener] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onCancel] operator[SEP] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[mLock] operator[SEP] { Keyword[if] operator[SEP] identifier[waiter] operator[SEP] identifier[mNonce] operator[==] identifier[nonce] operator[SEP] { identifier[cancelConnectionWaiterLocked] operator[SEP] identifier[waiter] operator[SEP] operator[SEP] } } } } operator[SEP] operator[SEP] } Keyword[try] { Keyword[long] identifier[busyTimeoutMillis] operator[=] identifier[CONNECTION_POOL_BUSY_MILLIS] operator[SEP] Keyword[long] identifier[nextBusyTimeoutTime] operator[=] identifier[waiter] operator[SEP] identifier[mStartTime] operator[+] identifier[busyTimeoutMillis] operator[SEP] Keyword[for] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[mConnectionLeaked] operator[SEP] identifier[compareAndSet] operator[SEP] literal[boolean] , literal[boolean] operator[SEP] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[mLock] operator[SEP] { identifier[wakeConnectionWaitersLocked] operator[SEP] operator[SEP] operator[SEP] } } identifier[LockSupport] operator[SEP] identifier[parkNanos] operator[SEP] Keyword[this] , identifier[busyTimeoutMillis] operator[*] Other[1000000L] operator[SEP] operator[SEP] identifier[Thread] operator[SEP] identifier[interrupted] operator[SEP] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] identifier[mLock] operator[SEP] { identifier[throwIfClosedLocked] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[SQLiteConnection] identifier[connection] operator[=] identifier[waiter] operator[SEP] identifier[mAssignedConnection] operator[SEP] Keyword[final] identifier[RuntimeException] identifier[ex] operator[=] identifier[waiter] operator[SEP] identifier[mException] operator[SEP] Keyword[if] operator[SEP] identifier[connection] operator[!=] Other[null] operator[||] identifier[ex] operator[!=] Other[null] operator[SEP] { identifier[recycleConnectionWaiterLocked] operator[SEP] identifier[waiter] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[connection] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[connection] operator[SEP] } Keyword[throw] identifier[ex] operator[SEP] } Keyword[final] Keyword[long] identifier[now] operator[=] identifier[SystemClock] operator[SEP] identifier[uptimeMillis] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[now] operator[<] identifier[nextBusyTimeoutTime] operator[SEP] { identifier[busyTimeoutMillis] operator[=] identifier[now] operator[-] identifier[nextBusyTimeoutTime] operator[SEP] } Keyword[else] { identifier[logConnectionPoolBusyLocked] operator[SEP] identifier[now] operator[-] identifier[waiter] operator[SEP] identifier[mStartTime] , identifier[connectionFlags] operator[SEP] operator[SEP] identifier[busyTimeoutMillis] operator[=] identifier[CONNECTION_POOL_BUSY_MILLIS] operator[SEP] identifier[nextBusyTimeoutTime] operator[=] identifier[now] operator[+] identifier[busyTimeoutMillis] operator[SEP] } } } } Keyword[finally] { Keyword[if] operator[SEP] identifier[cancellationSignal] operator[!=] Other[null] operator[SEP] { identifier[cancellationSignal] operator[SEP] identifier[setOnCancelListener] operator[SEP] Other[null] operator[SEP] operator[SEP] } } }
@Override public PutJobFailureResultResult putJobFailureResult(PutJobFailureResultRequest request) { request = beforeClientExecution(request); return executePutJobFailureResult(request); }
class class_name[name] begin[{] method[putJobFailureResult, return_type[type[PutJobFailureResultResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executePutJobFailureResult, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[PutJobFailureResultResult] identifier[putJobFailureResult] operator[SEP] identifier[PutJobFailureResultRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executePutJobFailureResult] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public static Single<Long> length(CacheConfigBean cacheConfigBean, String cacheKey) { return SingleRxXian.call(CacheService.CACHE_SERVICE, "cacheListLength", new JSONObject() {{ put("cacheConfig", cacheConfigBean); put("key", cacheKey); }}).map(unitResponse -> { long length = Objects.requireNonNull(unitResponse.dataToLong()); return length > 0 ? length : 0; }); }
class class_name[name] begin[{] method[length, return_type[type[Single]], modifier[public static], parameter[cacheConfigBean, cacheKey]] begin[{] return[call[SingleRxXian.call, parameter[member[CacheService.CACHE_SERVICE], literal["cacheListLength"], ClassCreator(arguments=[], body=[[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="cacheConfig"), MemberReference(member=cacheConfigBean, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="key"), MemberReference(member=cacheKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JSONObject, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Single] operator[<] identifier[Long] operator[>] identifier[length] operator[SEP] identifier[CacheConfigBean] identifier[cacheConfigBean] , identifier[String] identifier[cacheKey] operator[SEP] { Keyword[return] identifier[SingleRxXian] operator[SEP] identifier[call] operator[SEP] identifier[CacheService] operator[SEP] identifier[CACHE_SERVICE] , literal[String] , Keyword[new] identifier[JSONObject] operator[SEP] operator[SEP] { { identifier[put] operator[SEP] literal[String] , identifier[cacheConfigBean] operator[SEP] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[cacheKey] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[unitResponse] operator[->] { Keyword[long] identifier[length] operator[=] identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[unitResponse] operator[SEP] identifier[dataToLong] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[length] operator[>] Other[0] operator[?] identifier[length] operator[:] Other[0] operator[SEP] } operator[SEP] operator[SEP] }
private static String getContentPath(HttpServletRequest request) { String contentPath = (String)request.getAttribute(Value.CONTENTPATH_ATTRIBUTE); if (contentPath == null) { // fallback to suffix if CONTENTPATH_ATTRIBUTE is not set // (e.g. in inside a /libs/granite/ui/components/foundation/form/multifield component) contentPath = ((SlingHttpServletRequest)request).getRequestPathInfo().getSuffix(); } return contentPath; }
class class_name[name] begin[{] method[getContentPath, return_type[type[String]], modifier[private static], parameter[request]] begin[{] local_variable[type[String], contentPath] if[binary_operation[member[.contentPath], ==, literal[null]]] begin[{] assign[member[.contentPath], Cast(expression=MemberReference(member=request, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=SlingHttpServletRequest, sub_type=None))] else begin[{] None end[}] return[member[.contentPath]] end[}] END[}]
Keyword[private] Keyword[static] identifier[String] identifier[getContentPath] operator[SEP] identifier[HttpServletRequest] identifier[request] operator[SEP] { identifier[String] identifier[contentPath] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[request] operator[SEP] identifier[getAttribute] operator[SEP] identifier[Value] operator[SEP] identifier[CONTENTPATH_ATTRIBUTE] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[contentPath] operator[==] Other[null] operator[SEP] { identifier[contentPath] operator[=] operator[SEP] operator[SEP] identifier[SlingHttpServletRequest] operator[SEP] identifier[request] operator[SEP] operator[SEP] identifier[getRequestPathInfo] operator[SEP] operator[SEP] operator[SEP] identifier[getSuffix] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[contentPath] operator[SEP] }
public final TcpClient doOnLifecycle(Consumer<? super Bootstrap> doOnConnect, Consumer<? super Connection> doOnConnected, Consumer<? super Connection> doOnDisconnected) { Objects.requireNonNull(doOnConnect, "doOnConnect"); Objects.requireNonNull(doOnConnected, "doOnConnected"); Objects.requireNonNull(doOnDisconnected, "doOnDisconnected"); return new TcpClientDoOn(this, doOnConnect, doOnConnected, doOnDisconnected); }
class class_name[name] begin[{] method[doOnLifecycle, return_type[type[TcpClient]], modifier[final public], parameter[doOnConnect, doOnConnected, doOnDisconnected]] begin[{] call[Objects.requireNonNull, parameter[member[.doOnConnect], literal["doOnConnect"]]] call[Objects.requireNonNull, parameter[member[.doOnConnected], literal["doOnConnected"]]] call[Objects.requireNonNull, parameter[member[.doOnDisconnected], literal["doOnDisconnected"]]] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=doOnConnect, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=doOnConnected, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=doOnDisconnected, 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=TcpClientDoOn, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[final] identifier[TcpClient] identifier[doOnLifecycle] operator[SEP] identifier[Consumer] operator[<] operator[?] Keyword[super] identifier[Bootstrap] operator[>] identifier[doOnConnect] , identifier[Consumer] operator[<] operator[?] Keyword[super] identifier[Connection] operator[>] identifier[doOnConnected] , identifier[Consumer] operator[<] operator[?] Keyword[super] identifier[Connection] operator[>] identifier[doOnDisconnected] operator[SEP] { identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[doOnConnect] , literal[String] operator[SEP] operator[SEP] identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[doOnConnected] , literal[String] operator[SEP] operator[SEP] identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[doOnDisconnected] , literal[String] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[TcpClientDoOn] operator[SEP] Keyword[this] , identifier[doOnConnect] , identifier[doOnConnected] , identifier[doOnDisconnected] operator[SEP] operator[SEP] }
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1) public final void setTextLocale(final Locale locale) { getView().setTextLocale(locale); }
class class_name[name] begin[{] method[setTextLocale, return_type[void], modifier[final public], parameter[locale]] begin[{] call[.getView, parameter[]] end[}] END[}]
annotation[@] identifier[TargetApi] operator[SEP] identifier[Build] operator[SEP] identifier[VERSION_CODES] operator[SEP] identifier[JELLY_BEAN_MR1] operator[SEP] Keyword[public] Keyword[final] Keyword[void] identifier[setTextLocale] operator[SEP] Keyword[final] identifier[Locale] identifier[locale] operator[SEP] { identifier[getView] operator[SEP] operator[SEP] operator[SEP] identifier[setTextLocale] operator[SEP] identifier[locale] operator[SEP] operator[SEP] }
public static HandlerInterceptor[] lookupHandlerInterceptors(ServletContext servletContext) { WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext); final Collection<HandlerInterceptor> allHandlerInterceptors = new ArrayList<HandlerInterceptor>(); WebRequestInterceptor[] webRequestInterceptors = lookupWebRequestInterceptors(servletContext); for (WebRequestInterceptor webRequestInterceptor : webRequestInterceptors) { allHandlerInterceptors.add(new WebRequestHandlerInterceptorAdapter(webRequestInterceptor)); } final Collection<HandlerInterceptor> handlerInterceptors = wac.getBeansOfType(HandlerInterceptor.class).values(); allHandlerInterceptors.addAll(handlerInterceptors); return allHandlerInterceptors.toArray(new HandlerInterceptor[allHandlerInterceptors.size()]); }
class class_name[name] begin[{] method[lookupHandlerInterceptors, return_type[type[HandlerInterceptor]], modifier[public static], parameter[servletContext]] begin[{] local_variable[type[WebApplicationContext], wac] local_variable[type[Collection], allHandlerInterceptors] local_variable[type[WebRequestInterceptor], webRequestInterceptors] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=webRequestInterceptor, 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=WebRequestHandlerInterceptorAdapter, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=allHandlerInterceptors, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=webRequestInterceptors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=webRequestInterceptor)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=WebRequestInterceptor, sub_type=None))), label=None) local_variable[type[Collection], handlerInterceptors] call[allHandlerInterceptors.addAll, parameter[member[.handlerInterceptors]]] return[call[allHandlerInterceptors.toArray, parameter[ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=allHandlerInterceptors, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HandlerInterceptor, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[HandlerInterceptor] operator[SEP] operator[SEP] identifier[lookupHandlerInterceptors] operator[SEP] identifier[ServletContext] identifier[servletContext] operator[SEP] { identifier[WebApplicationContext] identifier[wac] operator[=] identifier[WebApplicationContextUtils] operator[SEP] identifier[getRequiredWebApplicationContext] operator[SEP] identifier[servletContext] operator[SEP] operator[SEP] Keyword[final] identifier[Collection] operator[<] identifier[HandlerInterceptor] operator[>] identifier[allHandlerInterceptors] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[HandlerInterceptor] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[WebRequestInterceptor] operator[SEP] operator[SEP] identifier[webRequestInterceptors] operator[=] identifier[lookupWebRequestInterceptors] operator[SEP] identifier[servletContext] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[WebRequestInterceptor] identifier[webRequestInterceptor] operator[:] identifier[webRequestInterceptors] operator[SEP] { identifier[allHandlerInterceptors] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[WebRequestHandlerInterceptorAdapter] operator[SEP] identifier[webRequestInterceptor] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[Collection] operator[<] identifier[HandlerInterceptor] operator[>] identifier[handlerInterceptors] operator[=] identifier[wac] operator[SEP] identifier[getBeansOfType] operator[SEP] identifier[HandlerInterceptor] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] identifier[allHandlerInterceptors] operator[SEP] identifier[addAll] operator[SEP] identifier[handlerInterceptors] operator[SEP] operator[SEP] Keyword[return] identifier[allHandlerInterceptors] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[HandlerInterceptor] operator[SEP] identifier[allHandlerInterceptors] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static String hexDump(String prefix, byte[] data) { byte byte_value; StringBuffer str = new StringBuffer(data.length * 3); str.append(prefix); for (int i = 0; i < data.length; i += 16) { // dump the header: 00000000: String offset = Integer.toHexString(i); // "0" left pad offset field so it is always 8 char's long. str.append(" "); for (int offlen = offset.length(); offlen < 8; offlen++) { str.append("0"); } str.append(offset); str.append(":"); // dump hex version of 16 bytes per line. for (int j = 0; (j < 16) && ((i + j) < data.length); j++) { byte_value = data[i + j]; // add spaces between every 2 bytes. if ((j % 2) == 0) { str.append(" "); } // dump a single byte. byte high_nibble = (byte) ((byte_value & 0xf0) >>> 4); byte low_nibble = (byte) (byte_value & 0x0f); str.append(HEX_TABLE[high_nibble]); str.append(HEX_TABLE[low_nibble]); } // IF THIS IS THE LAST LINE OF HEX, THEN ADD THIS if (i + 16 > data.length) { // for debugging purposes, I want the last bytes always padded // over so that the ascii portion is correctly positioned int last_row_byte_count = data.length % 16; int num_bytes_short = 16 - last_row_byte_count; // number of spaces to add = (num bytes remaining * 2 spaces per byte) + (7 - (num bytes % 2)) int num_spaces = (num_bytes_short * 2) + (7 - (last_row_byte_count / 2)); for (int v = 0; v < num_spaces; v++) { str.append(" "); } } // dump ascii version of 16 bytes str.append(" "); for (int j = 0; (j < 16) && ((i + j) < data.length); j++) { char char_value = (char) data[i + j]; // RESOLVE (really want isAscii() or isPrintable()) //if (Character.isLetterOrDigit(char_value)) if (isPrintableChar(char_value)) { str.append(String.valueOf(char_value)); } else { str.append("."); } } // new line str.append("\n"); } // always trim off the last newline str.deleteCharAt(str.length() - 1); return (str.toString()); }
class class_name[name] begin[{] method[hexDump, return_type[type[String]], modifier[public static], parameter[prefix, data]] begin[{] local_variable[type[byte], byte_value] local_variable[type[StringBuffer], str] call[str.append, parameter[member[.prefix]]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toHexString, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), name=offset)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="0")], member=append, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=offlen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=offset, selectors=[], type_arguments=None), name=offlen)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=offlen, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=":")], member=append, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=byte_value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+))])), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=%), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=byte_value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xf0), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=>>>), type=BasicType(dimensions=[], name=byte)), name=high_nibble)], modifiers=set(), type=BasicType(dimensions=[], name=byte)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=BinaryOperation(operandl=MemberReference(member=byte_value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x0f), operator=&), type=BasicType(dimensions=[], name=byte)), name=low_nibble)], modifiers=set(), type=BasicType(dimensions=[], name=byte)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=HEX_TABLE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=high_nibble, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=append, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=HEX_TABLE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=low_nibble, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=append, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16), operator=<), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[]), operator=<), 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), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16), operator=+), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[]), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16), operator=%), name=last_row_byte_count)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16), operandr=MemberReference(member=last_row_byte_count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), name=num_bytes_short)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=num_bytes_short, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=*), operandr=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=7), operandr=BinaryOperation(operandl=MemberReference(member=last_row_byte_count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=/), operator=-), operator=+), name=num_spaces)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=num_spaces, 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=v)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=v, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+))]), type=BasicType(dimensions=[], name=char)), name=char_value)], modifiers=set(), type=BasicType(dimensions=[], name=char)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=char_value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isPrintableChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".")], member=append, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=char_value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16), operator=<), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[]), operator=<), operator=&&), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n")], member=append, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16))]), label=None) call[str.deleteCharAt, parameter[binary_operation[call[str.length, parameter[]], -, literal[1]]]] return[call[str.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[hexDump] operator[SEP] identifier[String] identifier[prefix] , Keyword[byte] operator[SEP] operator[SEP] identifier[data] operator[SEP] { Keyword[byte] identifier[byte_value] operator[SEP] identifier[StringBuffer] identifier[str] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] identifier[data] operator[SEP] identifier[length] operator[*] Other[3] operator[SEP] operator[SEP] identifier[str] operator[SEP] identifier[append] operator[SEP] identifier[prefix] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[data] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[+=] Other[16] operator[SEP] { identifier[String] identifier[offset] operator[=] identifier[Integer] operator[SEP] identifier[toHexString] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[str] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[offlen] operator[=] identifier[offset] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[offlen] operator[<] Other[8] operator[SEP] identifier[offlen] operator[++] operator[SEP] { identifier[str] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[str] operator[SEP] identifier[append] operator[SEP] identifier[offset] operator[SEP] operator[SEP] identifier[str] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] operator[SEP] identifier[j] operator[<] Other[16] operator[SEP] operator[&&] operator[SEP] operator[SEP] identifier[i] operator[+] identifier[j] operator[SEP] operator[<] identifier[data] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[byte_value] operator[=] identifier[data] operator[SEP] identifier[i] operator[+] identifier[j] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[j] operator[%] Other[2] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[str] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[byte] identifier[high_nibble] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] identifier[byte_value] operator[&] literal[Integer] operator[SEP] operator[>] operator[>] operator[>] Other[4] operator[SEP] operator[SEP] Keyword[byte] identifier[low_nibble] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[byte_value] operator[&] literal[Integer] operator[SEP] operator[SEP] identifier[str] operator[SEP] identifier[append] operator[SEP] identifier[HEX_TABLE] operator[SEP] identifier[high_nibble] operator[SEP] operator[SEP] operator[SEP] identifier[str] operator[SEP] identifier[append] operator[SEP] identifier[HEX_TABLE] operator[SEP] identifier[low_nibble] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[i] operator[+] Other[16] operator[>] identifier[data] operator[SEP] identifier[length] operator[SEP] { Keyword[int] identifier[last_row_byte_count] operator[=] identifier[data] operator[SEP] identifier[length] operator[%] Other[16] operator[SEP] Keyword[int] identifier[num_bytes_short] operator[=] Other[16] operator[-] identifier[last_row_byte_count] operator[SEP] Keyword[int] identifier[num_spaces] operator[=] operator[SEP] identifier[num_bytes_short] operator[*] Other[2] operator[SEP] operator[+] operator[SEP] Other[7] operator[-] operator[SEP] identifier[last_row_byte_count] operator[/] Other[2] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[v] operator[=] Other[0] operator[SEP] identifier[v] operator[<] identifier[num_spaces] operator[SEP] identifier[v] operator[++] operator[SEP] { identifier[str] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } } identifier[str] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] operator[SEP] identifier[j] operator[<] Other[16] operator[SEP] operator[&&] operator[SEP] operator[SEP] identifier[i] operator[+] identifier[j] operator[SEP] operator[<] identifier[data] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[char] identifier[char_value] operator[=] operator[SEP] Keyword[char] operator[SEP] identifier[data] operator[SEP] identifier[i] operator[+] identifier[j] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isPrintableChar] operator[SEP] identifier[char_value] operator[SEP] operator[SEP] { identifier[str] operator[SEP] identifier[append] operator[SEP] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[char_value] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[str] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } } identifier[str] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[str] operator[SEP] identifier[deleteCharAt] operator[SEP] identifier[str] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[str] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static void horizontalInverse(BorderIndex1D border , WlBorderCoef<WlCoef_F32> inverseCoef , GrayF32 input , GrayF32 output ) { UtilWavelet.checkShape(output,input); float []trends = new float[ output.width ]; float []details = new float[ output.width ]; boolean isLarger = input.width >= output.width; int paddedWidth = output.width + output.width%2; final int lowerBorder = inverseCoef.getLowerLength()*2; final int upperBorder = output.width - inverseCoef.getUpperLength()*2; border.setLength(output.width+output.width%2); WlCoef_F32 coefficients; for( int y = 0; y < output.height; y++ ) { for( int i = 0; i < details.length; i++ ) { details[i] = 0; trends[i] = 0; } for( int x = 0; x < output.width; x += 2 ) { float a = input.get(x/2,y); float d = input.get(input.width/2+x/2,y); if( x < lowerBorder ) { coefficients = inverseCoef.getBorderCoefficients(x); } else if( x >= upperBorder ) { coefficients = inverseCoef.getBorderCoefficients(x-paddedWidth); } else { coefficients = inverseCoef.getInnerCoefficients(); } final int offsetA = coefficients.offsetScaling; final int offsetB = coefficients.offsetWavelet; final float[] alpha = coefficients.scaling; final float[] beta = coefficients.wavelet; // add the trend for( int i = 0; i < alpha.length; i++ ) { // if an odd image don't update the outer edge int xx = border.getIndex(x+offsetA+i); if( isLarger && xx >= output.width ) continue; trends[xx] += a*alpha[i]; } // add the detail signal for( int i = 0; i < beta.length; i++ ) { int xx = border.getIndex(x+offsetB+i); if( isLarger && xx >= output.width ) continue; details[xx] += d*beta[i]; } } for( int x = 0; x < output.width; x++ ) { output.set(x,y, trends[x] + details[x]); } } }
class class_name[name] begin[{] method[horizontalInverse, return_type[void], modifier[public static], parameter[border, inverseCoef, input, output]] begin[{] call[UtilWavelet.checkShape, parameter[member[.output], member[.input]]] local_variable[type[float], trends] local_variable[type[float], details] local_variable[type[boolean], isLarger] local_variable[type[int], paddedWidth] local_variable[type[int], lowerBorder] local_variable[type[int], upperBorder] call[border.setLength, parameter[binary_operation[member[output.width], +, binary_operation[member[output.width], %, literal[2]]]]] local_variable[type[WlCoef_F32], coefficients] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=details, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=trends, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=details, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=/), MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=a)], modifiers=set(), type=BasicType(dimensions=[], name=float)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=/), operandr=BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=/), operator=+), MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=d)], modifiers=set(), type=BasicType(dimensions=[], name=float)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=lowerBorder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=upperBorder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=coefficients, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getInnerCoefficients, postfix_operators=[], prefix_operators=[], qualifier=inverseCoef, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=coefficients, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=paddedWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-)], member=getBorderCoefficients, postfix_operators=[], prefix_operators=[], qualifier=inverseCoef, selectors=[], type_arguments=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=coefficients, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getBorderCoefficients, postfix_operators=[], prefix_operators=[], qualifier=inverseCoef, selectors=[], type_arguments=None)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=offsetScaling, postfix_operators=[], prefix_operators=[], qualifier=coefficients, selectors=[]), name=offsetA)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=offsetWavelet, postfix_operators=[], prefix_operators=[], qualifier=coefficients, selectors=[]), name=offsetB)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=scaling, postfix_operators=[], prefix_operators=[], qualifier=coefficients, selectors=[]), name=alpha)], modifiers={'final'}, type=BasicType(dimensions=[None], name=float)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=wavelet, postfix_operators=[], prefix_operators=[], qualifier=coefficients, selectors=[]), name=beta)], modifiers={'final'}, type=BasicType(dimensions=[None], name=float)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=offsetA, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=getIndex, postfix_operators=[], prefix_operators=[], qualifier=border, selectors=[], type_arguments=None), name=xx)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=isLarger, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=xx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=output, selectors=[]), operator=>=), operator=&&), else_statement=None, label=None, then_statement=ContinueStatement(goto=None, label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=trends, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=xx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=+=, value=BinaryOperation(operandl=MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=alpha, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=*)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=alpha, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=offsetB, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=getIndex, postfix_operators=[], prefix_operators=[], qualifier=border, selectors=[], type_arguments=None), name=xx)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=isLarger, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=xx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=output, selectors=[]), operator=>=), operator=&&), else_statement=None, label=None, then_statement=ContinueStatement(goto=None, label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=details, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=xx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=+=, value=BinaryOperation(operandl=MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=beta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=*)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=beta, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=output, selectors=[]), 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=[Assignment(expressionl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2))]), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=trends, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=details, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=+)], member=set, postfix_operators=[], prefix_operators=[], qualifier=output, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=output, selectors=[]), 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)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=height, postfix_operators=[], prefix_operators=[], qualifier=output, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=y)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=y, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[horizontalInverse] operator[SEP] identifier[BorderIndex1D] identifier[border] , identifier[WlBorderCoef] operator[<] identifier[WlCoef_F32] operator[>] identifier[inverseCoef] , identifier[GrayF32] identifier[input] , identifier[GrayF32] identifier[output] operator[SEP] { identifier[UtilWavelet] operator[SEP] identifier[checkShape] operator[SEP] identifier[output] , identifier[input] operator[SEP] operator[SEP] Keyword[float] operator[SEP] operator[SEP] identifier[trends] operator[=] Keyword[new] Keyword[float] operator[SEP] identifier[output] operator[SEP] identifier[width] operator[SEP] operator[SEP] Keyword[float] operator[SEP] operator[SEP] identifier[details] operator[=] Keyword[new] Keyword[float] operator[SEP] identifier[output] operator[SEP] identifier[width] operator[SEP] operator[SEP] Keyword[boolean] identifier[isLarger] operator[=] identifier[input] operator[SEP] identifier[width] operator[>=] identifier[output] operator[SEP] identifier[width] operator[SEP] Keyword[int] identifier[paddedWidth] operator[=] identifier[output] operator[SEP] identifier[width] operator[+] identifier[output] operator[SEP] identifier[width] operator[%] Other[2] operator[SEP] Keyword[final] Keyword[int] identifier[lowerBorder] operator[=] identifier[inverseCoef] operator[SEP] identifier[getLowerLength] operator[SEP] operator[SEP] operator[*] Other[2] operator[SEP] Keyword[final] Keyword[int] identifier[upperBorder] operator[=] identifier[output] operator[SEP] identifier[width] operator[-] identifier[inverseCoef] operator[SEP] identifier[getUpperLength] operator[SEP] operator[SEP] operator[*] Other[2] operator[SEP] identifier[border] operator[SEP] identifier[setLength] operator[SEP] identifier[output] operator[SEP] identifier[width] operator[+] identifier[output] operator[SEP] identifier[width] operator[%] Other[2] operator[SEP] operator[SEP] identifier[WlCoef_F32] identifier[coefficients] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[y] operator[=] Other[0] operator[SEP] identifier[y] operator[<] identifier[output] operator[SEP] identifier[height] operator[SEP] identifier[y] operator[++] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[details] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[details] operator[SEP] identifier[i] operator[SEP] operator[=] Other[0] operator[SEP] identifier[trends] operator[SEP] identifier[i] operator[SEP] operator[=] Other[0] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[x] operator[=] Other[0] operator[SEP] identifier[x] operator[<] identifier[output] operator[SEP] identifier[width] operator[SEP] identifier[x] operator[+=] Other[2] operator[SEP] { Keyword[float] identifier[a] operator[=] identifier[input] operator[SEP] identifier[get] operator[SEP] identifier[x] operator[/] Other[2] , identifier[y] operator[SEP] operator[SEP] Keyword[float] identifier[d] operator[=] identifier[input] operator[SEP] identifier[get] operator[SEP] identifier[input] operator[SEP] identifier[width] operator[/] Other[2] operator[+] identifier[x] operator[/] Other[2] , identifier[y] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[x] operator[<] identifier[lowerBorder] operator[SEP] { identifier[coefficients] operator[=] identifier[inverseCoef] operator[SEP] identifier[getBorderCoefficients] operator[SEP] identifier[x] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[x] operator[>=] identifier[upperBorder] operator[SEP] { identifier[coefficients] operator[=] identifier[inverseCoef] operator[SEP] identifier[getBorderCoefficients] operator[SEP] identifier[x] operator[-] identifier[paddedWidth] operator[SEP] operator[SEP] } Keyword[else] { identifier[coefficients] operator[=] identifier[inverseCoef] operator[SEP] identifier[getInnerCoefficients] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] Keyword[int] identifier[offsetA] operator[=] identifier[coefficients] operator[SEP] identifier[offsetScaling] operator[SEP] Keyword[final] Keyword[int] identifier[offsetB] operator[=] identifier[coefficients] operator[SEP] identifier[offsetWavelet] operator[SEP] Keyword[final] Keyword[float] operator[SEP] operator[SEP] identifier[alpha] operator[=] identifier[coefficients] operator[SEP] identifier[scaling] operator[SEP] Keyword[final] Keyword[float] operator[SEP] operator[SEP] identifier[beta] operator[=] identifier[coefficients] operator[SEP] identifier[wavelet] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[alpha] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[int] identifier[xx] operator[=] identifier[border] operator[SEP] identifier[getIndex] operator[SEP] identifier[x] operator[+] identifier[offsetA] operator[+] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isLarger] operator[&&] identifier[xx] operator[>=] identifier[output] operator[SEP] identifier[width] operator[SEP] Keyword[continue] operator[SEP] identifier[trends] operator[SEP] identifier[xx] operator[SEP] operator[+=] identifier[a] operator[*] identifier[alpha] operator[SEP] identifier[i] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[beta] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[int] identifier[xx] operator[=] identifier[border] operator[SEP] identifier[getIndex] operator[SEP] identifier[x] operator[+] identifier[offsetB] operator[+] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isLarger] operator[&&] identifier[xx] operator[>=] identifier[output] operator[SEP] identifier[width] operator[SEP] Keyword[continue] operator[SEP] identifier[details] operator[SEP] identifier[xx] operator[SEP] operator[+=] identifier[d] operator[*] identifier[beta] operator[SEP] identifier[i] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] Keyword[int] identifier[x] operator[=] Other[0] operator[SEP] identifier[x] operator[<] identifier[output] operator[SEP] identifier[width] operator[SEP] identifier[x] operator[++] operator[SEP] { identifier[output] operator[SEP] identifier[set] operator[SEP] identifier[x] , identifier[y] , identifier[trends] operator[SEP] identifier[x] operator[SEP] operator[+] identifier[details] operator[SEP] identifier[x] operator[SEP] operator[SEP] operator[SEP] } } }
public static boolean isPortAvailable(String host, int port) { try { Socket socket = new Socket(host, port); socket.close(); return false; } catch (IOException e) { return true; } }
class class_name[name] begin[{] method[isPortAvailable, return_type[type[boolean]], modifier[public static], parameter[host, port]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=host, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=port, 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=Socket, sub_type=None)), name=socket)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Socket, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=socket, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isPortAvailable] operator[SEP] identifier[String] identifier[host] , Keyword[int] identifier[port] operator[SEP] { Keyword[try] { identifier[Socket] identifier[socket] operator[=] Keyword[new] identifier[Socket] operator[SEP] identifier[host] , identifier[port] operator[SEP] operator[SEP] identifier[socket] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } }
public static Polygon convert(Polygon polygon, int dimension) { LinearRing shell = GeometryCoordinateDimension.convert(polygon.getExteriorRing(),dimension); int nbOfHoles = polygon.getNumInteriorRing(); final LinearRing[] holes = new LinearRing[nbOfHoles]; for (int i = 0; i < nbOfHoles; i++) { holes[i] = GeometryCoordinateDimension.convert(polygon.getInteriorRingN(i),dimension); } return gf.createPolygon(shell, holes); }
class class_name[name] begin[{] method[convert, return_type[type[Polygon]], modifier[public static], parameter[polygon, dimension]] begin[{] local_variable[type[LinearRing], shell] local_variable[type[int], nbOfHoles] local_variable[type[LinearRing], holes] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=holes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getInteriorRingN, postfix_operators=[], prefix_operators=[], qualifier=polygon, selectors=[], type_arguments=None), MemberReference(member=dimension, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convert, postfix_operators=[], prefix_operators=[], qualifier=GeometryCoordinateDimension, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=nbOfHoles, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[call[gf.createPolygon, parameter[member[.shell], member[.holes]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Polygon] identifier[convert] operator[SEP] identifier[Polygon] identifier[polygon] , Keyword[int] identifier[dimension] operator[SEP] { identifier[LinearRing] identifier[shell] operator[=] identifier[GeometryCoordinateDimension] operator[SEP] identifier[convert] operator[SEP] identifier[polygon] operator[SEP] identifier[getExteriorRing] operator[SEP] operator[SEP] , identifier[dimension] operator[SEP] operator[SEP] Keyword[int] identifier[nbOfHoles] operator[=] identifier[polygon] operator[SEP] identifier[getNumInteriorRing] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[LinearRing] operator[SEP] operator[SEP] identifier[holes] operator[=] Keyword[new] identifier[LinearRing] operator[SEP] identifier[nbOfHoles] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[nbOfHoles] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[holes] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[GeometryCoordinateDimension] operator[SEP] identifier[convert] operator[SEP] identifier[polygon] operator[SEP] identifier[getInteriorRingN] operator[SEP] identifier[i] operator[SEP] , identifier[dimension] operator[SEP] operator[SEP] } Keyword[return] identifier[gf] operator[SEP] identifier[createPolygon] operator[SEP] identifier[shell] , identifier[holes] operator[SEP] operator[SEP] }
public static PopupPanel newPopup (String styleName, Widget contents) { PopupPanel panel = new PopupPanel(); panel.setStyleName(styleName); panel.setWidget(contents); return panel; }
class class_name[name] begin[{] method[newPopup, return_type[type[PopupPanel]], modifier[public static], parameter[styleName, contents]] begin[{] local_variable[type[PopupPanel], panel] call[panel.setStyleName, parameter[member[.styleName]]] call[panel.setWidget, parameter[member[.contents]]] return[member[.panel]] end[}] END[}]
Keyword[public] Keyword[static] identifier[PopupPanel] identifier[newPopup] operator[SEP] identifier[String] identifier[styleName] , identifier[Widget] identifier[contents] operator[SEP] { identifier[PopupPanel] identifier[panel] operator[=] Keyword[new] identifier[PopupPanel] operator[SEP] operator[SEP] operator[SEP] identifier[panel] operator[SEP] identifier[setStyleName] operator[SEP] identifier[styleName] operator[SEP] operator[SEP] identifier[panel] operator[SEP] identifier[setWidget] operator[SEP] identifier[contents] operator[SEP] operator[SEP] Keyword[return] identifier[panel] operator[SEP] }
static public UpdateSpecifier computeUpdateSpecifier( Document sourceDoc ,DocumentDigest documentDigest ,JSONObject targetDoc ,DocumentUpdateProcess.Schedule schedule ,Comparator<JSONObject> objectComparator ) throws Exception { UpdateSpecifier result = new UpdateSpecifier(); // Verify main document if( schedule == DocumentUpdateProcess.Schedule.UPDATE_FORCED ){ logger.debug("Update forced by schedule. Mark document modified"); result.setDocumentModified(true); } else if( null == targetDoc ) { // Document creation logger.debug("Target document does not exist. Mark document modified"); result.setDocumentModified(true); } else { if( 0 != objectComparator.compare(sourceDoc.getJSONObject(), targetDoc) ){ logger.debug("Documents do not compare as equal. Mark document modified"); result.setDocumentModified(true); } } // Attachments... // Get attachments from source document Map<String,Attachment> attachmentsByName = new HashMap<String,Attachment>(); { Collection<Attachment> attachments = sourceDoc.getAttachments(); if( null != attachments ) { for(Attachment attachment : attachments){ attachmentsByName.put(attachment.getName(), attachment); } } } // Figure out which attachments should be deleted if( null != targetDoc ) { JSONObject targetAttachments = targetDoc.optJSONObject("_attachments"); if( null != targetAttachments ){ Iterator<?> it = targetAttachments.keys(); while( it.hasNext() ){ Object keyObj = it.next(); if( keyObj instanceof String ) { String attachmentName = (String)keyObj; if( false == attachmentsByName.containsKey(attachmentName) ){ // Target document has an attachment not available in the // source one. Delete. logger.debug("Documents do not compare as equal. Mark document modified"); result.addAttachmentToDelete(attachmentName); } } } } } // Figure out which attachments should be uploaded for(Attachment attachment : attachmentsByName.values()){ String attachmentName = attachment.getName(); boolean shouldUpload = false; if( null == targetDoc ) { // On creation, upload all attachments shouldUpload = true; } else if( schedule == DocumentUpdateProcess.Schedule.UPDATE_FORCED ) { // On forced update, shouldUpload = true; } else { String attachmentContentType = attachment.getContentType(); shouldUpload = shouldAttachmentBeUploaded( targetDoc ,attachmentName ,documentDigest.getAttachmentDigest(attachmentName) ,attachmentContentType ); } if( shouldUpload ){ result.addAttachmentToUpload(attachmentName); } else { result.addAttachmentNotModified(attachmentName); } } return result; }
class class_name[name] begin[{] method[computeUpdateSpecifier, return_type[type[UpdateSpecifier]], modifier[public static], parameter[sourceDoc, documentDigest, targetDoc, schedule, objectComparator]] begin[{] local_variable[type[UpdateSpecifier], result] if[binary_operation[member[.schedule], ==, member[DocumentUpdateProcess.Schedule.UPDATE_FORCED]]] begin[{] call[logger.debug, parameter[literal["Update forced by schedule. Mark document modified"]]] call[result.setDocumentModified, parameter[literal[true]]] else begin[{] if[binary_operation[literal[null], ==, member[.targetDoc]]] begin[{] call[logger.debug, parameter[literal["Target document does not exist. Mark document modified"]]] call[result.setDocumentModified, parameter[literal[true]]] else begin[{] if[binary_operation[literal[0], !=, call[objectComparator.compare, parameter[call[sourceDoc.getJSONObject, parameter[]], member[.targetDoc]]]]] begin[{] call[logger.debug, parameter[literal["Documents do not compare as equal. Mark document modified"]]] call[result.setDocumentModified, parameter[literal[true]]] else begin[{] None end[}] end[}] end[}] local_variable[type[Map], attachmentsByName] local_variable[type[Collection], attachments] if[binary_operation[literal[null], !=, member[.attachments]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=attachment, selectors=[], type_arguments=None), MemberReference(member=attachment, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=attachmentsByName, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=attachments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=attachment)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Attachment, sub_type=None))), label=None) else begin[{] None end[}] if[binary_operation[literal[null], !=, member[.targetDoc]]] begin[{] local_variable[type[JSONObject], targetAttachments] if[binary_operation[literal[null], !=, member[.targetAttachments]]] begin[{] local_variable[type[Iterator], it] while[call[it.hasNext, parameter[]]] begin[{] local_variable[type[Object], keyObj] if[binary_operation[member[.keyObj], instanceof, type[String]]] begin[{] local_variable[type[String], attachmentName] if[binary_operation[literal[false], ==, call[attachmentsByName.containsKey, parameter[member[.attachmentName]]]]] begin[{] call[logger.debug, parameter[literal["Documents do not compare as equal. Mark document modified"]]] call[result.addAttachmentToDelete, parameter[member[.attachmentName]]] else begin[{] None end[}] else begin[{] None end[}] end[}] else begin[{] None end[}] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=attachment, selectors=[], type_arguments=None), name=attachmentName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=shouldUpload)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=targetDoc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=schedule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=UPDATE_FORCED, postfix_operators=[], prefix_operators=[], qualifier=DocumentUpdateProcess.Schedule, selectors=[]), operator===), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getContentType, postfix_operators=[], prefix_operators=[], qualifier=attachment, selectors=[], type_arguments=None), name=attachmentContentType)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=shouldUpload, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=targetDoc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=attachmentName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=attachmentName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAttachmentDigest, postfix_operators=[], prefix_operators=[], qualifier=documentDigest, selectors=[], type_arguments=None), MemberReference(member=attachmentContentType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=shouldAttachmentBeUploaded, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=shouldUpload, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=shouldUpload, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)])), IfStatement(condition=MemberReference(member=shouldUpload, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=attachmentName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addAttachmentNotModified, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=attachmentName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addAttachmentToUpload, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=attachmentsByName, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=attachment)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Attachment, sub_type=None))), label=None) return[member[.result]] end[}] END[}]
Keyword[static] Keyword[public] identifier[UpdateSpecifier] identifier[computeUpdateSpecifier] operator[SEP] identifier[Document] identifier[sourceDoc] , identifier[DocumentDigest] identifier[documentDigest] , identifier[JSONObject] identifier[targetDoc] , identifier[DocumentUpdateProcess] operator[SEP] identifier[Schedule] identifier[schedule] , identifier[Comparator] operator[<] identifier[JSONObject] operator[>] identifier[objectComparator] operator[SEP] Keyword[throws] identifier[Exception] { identifier[UpdateSpecifier] identifier[result] operator[=] Keyword[new] identifier[UpdateSpecifier] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[schedule] operator[==] identifier[DocumentUpdateProcess] operator[SEP] identifier[Schedule] operator[SEP] identifier[UPDATE_FORCED] operator[SEP] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[setDocumentModified] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] Other[null] operator[==] identifier[targetDoc] operator[SEP] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[setDocumentModified] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] Other[0] operator[!=] identifier[objectComparator] operator[SEP] identifier[compare] operator[SEP] identifier[sourceDoc] operator[SEP] identifier[getJSONObject] operator[SEP] operator[SEP] , identifier[targetDoc] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[setDocumentModified] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } } identifier[Map] operator[<] identifier[String] , identifier[Attachment] operator[>] identifier[attachmentsByName] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Attachment] operator[>] operator[SEP] operator[SEP] operator[SEP] { identifier[Collection] operator[<] identifier[Attachment] operator[>] identifier[attachments] operator[=] identifier[sourceDoc] operator[SEP] identifier[getAttachments] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[attachments] operator[SEP] { Keyword[for] operator[SEP] identifier[Attachment] identifier[attachment] operator[:] identifier[attachments] operator[SEP] { identifier[attachmentsByName] operator[SEP] identifier[put] operator[SEP] identifier[attachment] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[attachment] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] Other[null] operator[!=] identifier[targetDoc] operator[SEP] { identifier[JSONObject] identifier[targetAttachments] operator[=] identifier[targetDoc] operator[SEP] identifier[optJSONObject] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[targetAttachments] operator[SEP] { identifier[Iterator] operator[<] operator[?] operator[>] identifier[it] operator[=] identifier[targetAttachments] operator[SEP] identifier[keys] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[it] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[Object] identifier[keyObj] operator[=] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[keyObj] Keyword[instanceof] identifier[String] operator[SEP] { identifier[String] identifier[attachmentName] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[keyObj] operator[SEP] Keyword[if] operator[SEP] literal[boolean] operator[==] identifier[attachmentsByName] operator[SEP] identifier[containsKey] operator[SEP] identifier[attachmentName] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[addAttachmentToDelete] operator[SEP] identifier[attachmentName] operator[SEP] operator[SEP] } } } } } Keyword[for] operator[SEP] identifier[Attachment] identifier[attachment] operator[:] identifier[attachmentsByName] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[attachmentName] operator[=] identifier[attachment] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[shouldUpload] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[==] identifier[targetDoc] operator[SEP] { identifier[shouldUpload] operator[=] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[schedule] operator[==] identifier[DocumentUpdateProcess] operator[SEP] identifier[Schedule] operator[SEP] identifier[UPDATE_FORCED] operator[SEP] { identifier[shouldUpload] operator[=] literal[boolean] operator[SEP] } Keyword[else] { identifier[String] identifier[attachmentContentType] operator[=] identifier[attachment] operator[SEP] identifier[getContentType] operator[SEP] operator[SEP] operator[SEP] identifier[shouldUpload] operator[=] identifier[shouldAttachmentBeUploaded] operator[SEP] identifier[targetDoc] , identifier[attachmentName] , identifier[documentDigest] operator[SEP] identifier[getAttachmentDigest] operator[SEP] identifier[attachmentName] operator[SEP] , identifier[attachmentContentType] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[shouldUpload] operator[SEP] { identifier[result] operator[SEP] identifier[addAttachmentToUpload] operator[SEP] identifier[attachmentName] operator[SEP] operator[SEP] } Keyword[else] { identifier[result] operator[SEP] identifier[addAttachmentNotModified] operator[SEP] identifier[attachmentName] operator[SEP] operator[SEP] } } Keyword[return] identifier[result] operator[SEP] }
public static void run(VicariousFactory factory) { // Get the tweets TweetProvider provider = factory.getTweetProvider(); List<Status> originals = null; try { originals = provider.getTweets(); if(originals == null || originals.isEmpty()) { return; } } catch(TwitterException exception) { exception.printStackTrace(); return; } // Sort the tweets from oldest to newest Comparator<Status> comparator = new TweetDateComparator(); Collections.sort(originals, comparator); // Modify the tweets TweetModifier modifier = factory.getTweetModifier(); List<TweetPair> tweetPairs = new ArrayList<TweetPair>(); for(Status original : originals) { StatusUpdate response = modifier.modify(original); if(response != null) { tweetPairs.add(new TweetPair(original, response)); } } // Publish the tweets TweetPublisher publisher = factory.getTweetPublisher(); TweetLogger logger = factory.getTweetLogger(); try { if(logger == null) { for(TweetPair tweetPair : tweetPairs) { publisher.publish(tweetPair.response); } } else { for(TweetPair tweetPair : tweetPairs) { publisher.publish(tweetPair.response, new LoggingListener( logger, tweetPair.original)); } } } catch(TwitterException exception) { exception.printStackTrace(); return; } }
class class_name[name] begin[{] method[run, return_type[void], modifier[public static], parameter[factory]] begin[{] local_variable[type[TweetProvider], provider] local_variable[type[List], originals] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=originals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getTweets, postfix_operators=[], prefix_operators=[], qualifier=provider, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=originals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=originals, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=None, label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=exception, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=exception, types=['TwitterException']))], finally_block=None, label=None, resources=None) local_variable[type[Comparator], comparator] call[Collections.sort, parameter[member[.originals], member[.comparator]]] local_variable[type[TweetModifier], modifier] local_variable[type[List], tweetPairs] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=original, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=modify, postfix_operators=[], prefix_operators=[], qualifier=modifier, selectors=[], type_arguments=None), name=response)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StatusUpdate, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=response, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=original, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=response, 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=TweetPair, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=tweetPairs, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=originals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=original)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Status, sub_type=None))), label=None) local_variable[type[TweetPublisher], publisher] local_variable[type[TweetLogger], logger] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=logger, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=response, postfix_operators=[], prefix_operators=[], qualifier=tweetPair, selectors=[]), ClassCreator(arguments=[MemberReference(member=logger, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=original, postfix_operators=[], prefix_operators=[], qualifier=tweetPair, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LoggingListener, sub_type=None))], member=publish, postfix_operators=[], prefix_operators=[], qualifier=publisher, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=tweetPairs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=tweetPair)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TweetPair, sub_type=None))), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=response, postfix_operators=[], prefix_operators=[], qualifier=tweetPair, selectors=[])], member=publish, postfix_operators=[], prefix_operators=[], qualifier=publisher, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=tweetPairs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=tweetPair)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TweetPair, sub_type=None))), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=exception, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=exception, types=['TwitterException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[run] operator[SEP] identifier[VicariousFactory] identifier[factory] operator[SEP] { identifier[TweetProvider] identifier[provider] operator[=] identifier[factory] operator[SEP] identifier[getTweetProvider] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Status] operator[>] identifier[originals] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[originals] operator[=] identifier[provider] operator[SEP] identifier[getTweets] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[originals] operator[==] Other[null] operator[||] identifier[originals] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } } Keyword[catch] operator[SEP] identifier[TwitterException] identifier[exception] operator[SEP] { identifier[exception] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[Comparator] operator[<] identifier[Status] operator[>] identifier[comparator] operator[=] Keyword[new] identifier[TweetDateComparator] operator[SEP] operator[SEP] operator[SEP] identifier[Collections] operator[SEP] identifier[sort] operator[SEP] identifier[originals] , identifier[comparator] operator[SEP] operator[SEP] identifier[TweetModifier] identifier[modifier] operator[=] identifier[factory] operator[SEP] identifier[getTweetModifier] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[TweetPair] operator[>] identifier[tweetPairs] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[TweetPair] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Status] identifier[original] operator[:] identifier[originals] operator[SEP] { identifier[StatusUpdate] identifier[response] operator[=] identifier[modifier] operator[SEP] identifier[modify] operator[SEP] identifier[original] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[response] operator[!=] Other[null] operator[SEP] { identifier[tweetPairs] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[TweetPair] operator[SEP] identifier[original] , identifier[response] operator[SEP] operator[SEP] operator[SEP] } } identifier[TweetPublisher] identifier[publisher] operator[=] identifier[factory] operator[SEP] identifier[getTweetPublisher] operator[SEP] operator[SEP] operator[SEP] identifier[TweetLogger] identifier[logger] operator[=] identifier[factory] operator[SEP] identifier[getTweetLogger] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[logger] operator[==] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[TweetPair] identifier[tweetPair] operator[:] identifier[tweetPairs] operator[SEP] { identifier[publisher] operator[SEP] identifier[publish] operator[SEP] identifier[tweetPair] operator[SEP] identifier[response] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[for] operator[SEP] identifier[TweetPair] identifier[tweetPair] operator[:] identifier[tweetPairs] operator[SEP] { identifier[publisher] operator[SEP] identifier[publish] operator[SEP] identifier[tweetPair] operator[SEP] identifier[response] , Keyword[new] identifier[LoggingListener] operator[SEP] identifier[logger] , identifier[tweetPair] operator[SEP] identifier[original] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[TwitterException] identifier[exception] operator[SEP] { identifier[exception] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } }
public static <E extends Comparable<E>> void quickSort(List<E> array) { if (array.isEmpty()) { return; } recursiveQuickSort(array, 0, array.size() - 1); }
class class_name[name] begin[{] method[quickSort, return_type[void], modifier[public static], parameter[array]] begin[{] if[call[array.isEmpty, parameter[]]] begin[{] return[None] else begin[{] None end[}] call[.recursiveQuickSort, parameter[member[.array], literal[0], binary_operation[call[array.size, parameter[]], -, literal[1]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[E] Keyword[extends] identifier[Comparable] operator[<] identifier[E] operator[>] operator[>] Keyword[void] identifier[quickSort] operator[SEP] identifier[List] operator[<] identifier[E] operator[>] identifier[array] operator[SEP] { Keyword[if] operator[SEP] identifier[array] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } identifier[recursiveQuickSort] operator[SEP] identifier[array] , Other[0] , identifier[array] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] }
private void transformRollupQueryToDownSampler() { if (rollup_query != null) { // TODO - clean up and handle fill downsampler = new DownsamplingSpecification( rollup_query.getRollupInterval().getIntervalSeconds() * 1000, rollup_query.getRollupAgg(), (downsampler != null ? downsampler.getFillPolicy() : FillPolicy.ZERO)); rollup_query = null; } }
class class_name[name] begin[{] method[transformRollupQueryToDownSampler, return_type[void], modifier[private], parameter[]] begin[{] if[binary_operation[member[.rollup_query], !=, literal[null]]] begin[{] assign[member[.downsampler], ClassCreator(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=getRollupInterval, postfix_operators=[], prefix_operators=[], qualifier=rollup_query, selectors=[MethodInvocation(arguments=[], member=getIntervalSeconds, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1000), operator=*), MethodInvocation(arguments=[], member=getRollupAgg, postfix_operators=[], prefix_operators=[], qualifier=rollup_query, selectors=[], type_arguments=None), TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=downsampler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MemberReference(member=ZERO, postfix_operators=[], prefix_operators=[], qualifier=FillPolicy, selectors=[]), if_true=MethodInvocation(arguments=[], member=getFillPolicy, postfix_operators=[], prefix_operators=[], qualifier=downsampler, selectors=[], type_arguments=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DownsamplingSpecification, sub_type=None))] assign[member[.rollup_query], literal[null]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[transformRollupQueryToDownSampler] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[rollup_query] operator[!=] Other[null] operator[SEP] { identifier[downsampler] operator[=] Keyword[new] identifier[DownsamplingSpecification] operator[SEP] identifier[rollup_query] operator[SEP] identifier[getRollupInterval] operator[SEP] operator[SEP] operator[SEP] identifier[getIntervalSeconds] operator[SEP] operator[SEP] operator[*] Other[1000] , identifier[rollup_query] operator[SEP] identifier[getRollupAgg] operator[SEP] operator[SEP] , operator[SEP] identifier[downsampler] operator[!=] Other[null] operator[?] identifier[downsampler] operator[SEP] identifier[getFillPolicy] operator[SEP] operator[SEP] operator[:] identifier[FillPolicy] operator[SEP] identifier[ZERO] operator[SEP] operator[SEP] operator[SEP] identifier[rollup_query] operator[=] Other[null] operator[SEP] } }
private static boolean isStartOfDoubleBond(IAtomContainer container, IAtom a, IAtom parent, boolean[] doubleBondConfiguration) { int hcount; if (a.getImplicitHydrogenCount() == CDKConstants.UNSET) hcount = 0; else hcount = a.getImplicitHydrogenCount(); int lengthAtom = container.getConnectedAtomsList(a).size() + hcount; if (lengthAtom != 3 && (lengthAtom != 2 && !(a.getSymbol().equals("N")))) { return (false); } List<IAtom> atoms = container.getConnectedAtomsList(a); IAtom one = null; IAtom two = null; boolean doubleBond = false; IAtom nextAtom = null; for (IAtom atom : atoms) { if (!atom.equals(parent) && container.getBond(atom, a).getOrder() == Order.DOUBLE && isEndOfDoubleBond(container, atom, a, doubleBondConfiguration)) { doubleBond = true; nextAtom = atom; } if (!atom.equals(nextAtom) && one == null) { one = atom; } else if (!atom.equals(nextAtom) && one != null) { two = atom; } } String[] morgannumbers = MorganNumbersTools.getMorganNumbersWithElementSymbol(container); if (one != null && ((!a.getSymbol().equals("N") && two != null && !morgannumbers[container.indexOf(one)].equals(morgannumbers[container .indexOf(two)]) && doubleBond && doubleBondConfiguration[container.indexOf(container.getBond( a, nextAtom))]) || (doubleBond && a.getSymbol().equals("N") && Math.abs(giveAngleBothMethods( nextAtom, a, parent, true)) > Math.PI / 10))) { return (true); } else { return (false); } }
class class_name[name] begin[{] method[isStartOfDoubleBond, return_type[type[boolean]], modifier[private static], parameter[container, a, parent, doubleBondConfiguration]] begin[{] local_variable[type[int], hcount] if[binary_operation[call[a.getImplicitHydrogenCount, parameter[]], ==, member[CDKConstants.UNSET]]] begin[{] assign[member[.hcount], literal[0]] else begin[{] assign[member[.hcount], call[a.getImplicitHydrogenCount, parameter[]]] end[}] local_variable[type[int], lengthAtom] if[binary_operation[binary_operation[member[.lengthAtom], !=, literal[3]], &&, binary_operation[binary_operation[member[.lengthAtom], !=, literal[2]], &&, call[a.getSymbol, parameter[]]]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[List], atoms] local_variable[type[IAtom], one] local_variable[type[IAtom], two] local_variable[type[boolean], doubleBond] local_variable[type[IAtom], nextAtom] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=parent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=['!'], qualifier=atom, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=atom, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getBond, postfix_operators=[], prefix_operators=[], qualifier=container, selectors=[MethodInvocation(arguments=[], member=getOrder, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MemberReference(member=DOUBLE, postfix_operators=[], prefix_operators=[], qualifier=Order, selectors=[]), operator===), operator=&&), operandr=MethodInvocation(arguments=[MemberReference(member=container, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=atom, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=doubleBondConfiguration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isEndOfDoubleBond, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=doubleBond, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=nextAtom, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=atom, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=nextAtom, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=['!'], qualifier=atom, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=MemberReference(member=one, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operator=&&), else_statement=IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=nextAtom, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=['!'], qualifier=atom, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=MemberReference(member=one, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=two, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=atom, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=one, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=atom, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=atoms, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=atom)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=IAtom, sub_type=None))), label=None) local_variable[type[String], morgannumbers] if[binary_operation[binary_operation[member[.one], !=, literal[null]], &&, binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[call[a.getSymbol, parameter[]], &&, binary_operation[member[.two], !=, literal[null]]], &&, member[.morgannumbers]], &&, member[.doubleBond]], &&, member[.doubleBondConfiguration]], ||, binary_operation[binary_operation[member[.doubleBond], &&, call[a.getSymbol, parameter[]]], &&, binary_operation[call[Math.abs, parameter[call[.giveAngleBothMethods, parameter[member[.nextAtom], member[.a], member[.parent], literal[true]]]]], >, binary_operation[member[Math.PI], /, literal[10]]]]]]] begin[{] return[literal[true]] else begin[{] return[literal[false]] end[}] end[}] END[}]
Keyword[private] Keyword[static] Keyword[boolean] identifier[isStartOfDoubleBond] operator[SEP] identifier[IAtomContainer] identifier[container] , identifier[IAtom] identifier[a] , identifier[IAtom] identifier[parent] , Keyword[boolean] operator[SEP] operator[SEP] identifier[doubleBondConfiguration] operator[SEP] { Keyword[int] identifier[hcount] operator[SEP] Keyword[if] operator[SEP] identifier[a] operator[SEP] identifier[getImplicitHydrogenCount] operator[SEP] operator[SEP] operator[==] identifier[CDKConstants] operator[SEP] identifier[UNSET] operator[SEP] identifier[hcount] operator[=] Other[0] operator[SEP] Keyword[else] identifier[hcount] operator[=] identifier[a] operator[SEP] identifier[getImplicitHydrogenCount] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[lengthAtom] operator[=] identifier[container] operator[SEP] identifier[getConnectedAtomsList] operator[SEP] identifier[a] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[+] identifier[hcount] operator[SEP] Keyword[if] operator[SEP] identifier[lengthAtom] operator[!=] Other[3] operator[&&] operator[SEP] identifier[lengthAtom] operator[!=] Other[2] operator[&&] operator[!] operator[SEP] identifier[a] operator[SEP] identifier[getSymbol] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[IAtom] operator[>] identifier[atoms] operator[=] identifier[container] operator[SEP] identifier[getConnectedAtomsList] operator[SEP] identifier[a] operator[SEP] operator[SEP] identifier[IAtom] identifier[one] operator[=] Other[null] operator[SEP] identifier[IAtom] identifier[two] operator[=] Other[null] operator[SEP] Keyword[boolean] identifier[doubleBond] operator[=] literal[boolean] operator[SEP] identifier[IAtom] identifier[nextAtom] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[IAtom] identifier[atom] operator[:] identifier[atoms] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[atom] operator[SEP] identifier[equals] operator[SEP] identifier[parent] operator[SEP] operator[&&] identifier[container] operator[SEP] identifier[getBond] operator[SEP] identifier[atom] , identifier[a] operator[SEP] operator[SEP] identifier[getOrder] operator[SEP] operator[SEP] operator[==] identifier[Order] operator[SEP] identifier[DOUBLE] operator[&&] identifier[isEndOfDoubleBond] operator[SEP] identifier[container] , identifier[atom] , identifier[a] , identifier[doubleBondConfiguration] operator[SEP] operator[SEP] { identifier[doubleBond] operator[=] literal[boolean] operator[SEP] identifier[nextAtom] operator[=] identifier[atom] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[atom] operator[SEP] identifier[equals] operator[SEP] identifier[nextAtom] operator[SEP] operator[&&] identifier[one] operator[==] Other[null] operator[SEP] { identifier[one] operator[=] identifier[atom] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[!] identifier[atom] operator[SEP] identifier[equals] operator[SEP] identifier[nextAtom] operator[SEP] operator[&&] identifier[one] operator[!=] Other[null] operator[SEP] { identifier[two] operator[=] identifier[atom] operator[SEP] } } identifier[String] operator[SEP] operator[SEP] identifier[morgannumbers] operator[=] identifier[MorganNumbersTools] operator[SEP] identifier[getMorganNumbersWithElementSymbol] operator[SEP] identifier[container] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[one] operator[!=] Other[null] operator[&&] operator[SEP] operator[SEP] operator[!] identifier[a] operator[SEP] identifier[getSymbol] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[&&] identifier[two] operator[!=] Other[null] operator[&&] operator[!] identifier[morgannumbers] operator[SEP] identifier[container] operator[SEP] identifier[indexOf] operator[SEP] identifier[one] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[morgannumbers] operator[SEP] identifier[container] operator[SEP] identifier[indexOf] operator[SEP] identifier[two] operator[SEP] operator[SEP] operator[SEP] operator[&&] identifier[doubleBond] operator[&&] identifier[doubleBondConfiguration] operator[SEP] identifier[container] operator[SEP] identifier[indexOf] operator[SEP] identifier[container] operator[SEP] identifier[getBond] operator[SEP] identifier[a] , identifier[nextAtom] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[||] operator[SEP] identifier[doubleBond] operator[&&] identifier[a] operator[SEP] identifier[getSymbol] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[&&] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[giveAngleBothMethods] operator[SEP] identifier[nextAtom] , identifier[a] , identifier[parent] , literal[boolean] operator[SEP] operator[SEP] operator[>] identifier[Math] operator[SEP] identifier[PI] operator[/] Other[10] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } }
public static <T> String getColumnsCsv(Class<T> clazz, String... tablePrefix) { return OrmReader.getColumnsCsv(clazz, tablePrefix); }
class class_name[name] begin[{] method[getColumnsCsv, return_type[type[String]], modifier[public static], parameter[clazz, tablePrefix]] begin[{] return[call[OrmReader.getColumnsCsv, parameter[member[.clazz], member[.tablePrefix]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[String] identifier[getColumnsCsv] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[clazz] , identifier[String] operator[...] identifier[tablePrefix] operator[SEP] { Keyword[return] identifier[OrmReader] operator[SEP] identifier[getColumnsCsv] operator[SEP] identifier[clazz] , identifier[tablePrefix] operator[SEP] operator[SEP] }
@Deactivate protected void deactivate(ComponentContext cc) { executorServiceRef.deactivate(cc); scheduledExecutorServiceRef.deactivate(cc); classLoadingServiceSR.deactivate(cc); if (workQueueBusListener != null) { LibertyApplicationBusFactory.getInstance().unregisterApplicationBusListener(workQueueBusListener); } }
class class_name[name] begin[{] method[deactivate, return_type[void], modifier[protected], parameter[cc]] begin[{] call[executorServiceRef.deactivate, parameter[member[.cc]]] call[scheduledExecutorServiceRef.deactivate, parameter[member[.cc]]] call[classLoadingServiceSR.deactivate, parameter[member[.cc]]] if[binary_operation[member[.workQueueBusListener], !=, literal[null]]] begin[{] call[LibertyApplicationBusFactory.getInstance, parameter[]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Deactivate] Keyword[protected] Keyword[void] identifier[deactivate] operator[SEP] identifier[ComponentContext] identifier[cc] operator[SEP] { identifier[executorServiceRef] operator[SEP] identifier[deactivate] operator[SEP] identifier[cc] operator[SEP] operator[SEP] identifier[scheduledExecutorServiceRef] operator[SEP] identifier[deactivate] operator[SEP] identifier[cc] operator[SEP] operator[SEP] identifier[classLoadingServiceSR] operator[SEP] identifier[deactivate] operator[SEP] identifier[cc] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[workQueueBusListener] operator[!=] Other[null] operator[SEP] { identifier[LibertyApplicationBusFactory] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[unregisterApplicationBusListener] operator[SEP] identifier[workQueueBusListener] operator[SEP] operator[SEP] } }
public static OpenCLKernel createKernel(OpenCLProgram _program, String _kernelName, List<OpenCLArgDescriptor> _args) { final OpenCLArgDescriptor[] argArray = _args.toArray(new OpenCLArgDescriptor[0]); final OpenCLKernel oclk = new OpenCLKernel().createKernelJNI(_program, _kernelName, argArray); for (final OpenCLArgDescriptor arg : argArray) { arg.kernel = oclk; } return oclk; }
class class_name[name] begin[{] method[createKernel, return_type[type[OpenCLKernel]], modifier[public static], parameter[_program, _kernelName, _args]] begin[{] local_variable[type[OpenCLArgDescriptor], argArray] local_variable[type[OpenCLKernel], oclk] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=kernel, postfix_operators=[], prefix_operators=[], qualifier=arg, selectors=[]), type==, value=MemberReference(member=oclk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=argArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=arg)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=OpenCLArgDescriptor, sub_type=None))), label=None) return[member[.oclk]] end[}] END[}]
Keyword[public] Keyword[static] identifier[OpenCLKernel] identifier[createKernel] operator[SEP] identifier[OpenCLProgram] identifier[_program] , identifier[String] identifier[_kernelName] , identifier[List] operator[<] identifier[OpenCLArgDescriptor] operator[>] identifier[_args] operator[SEP] { Keyword[final] identifier[OpenCLArgDescriptor] operator[SEP] operator[SEP] identifier[argArray] operator[=] identifier[_args] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[OpenCLArgDescriptor] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[OpenCLKernel] identifier[oclk] operator[=] Keyword[new] identifier[OpenCLKernel] operator[SEP] operator[SEP] operator[SEP] identifier[createKernelJNI] operator[SEP] identifier[_program] , identifier[_kernelName] , identifier[argArray] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[OpenCLArgDescriptor] identifier[arg] operator[:] identifier[argArray] operator[SEP] { identifier[arg] operator[SEP] identifier[kernel] operator[=] identifier[oclk] operator[SEP] } Keyword[return] identifier[oclk] operator[SEP] }
public void stopDeletingMsgsWihoutReferencesTask(boolean hasToStop) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "stopDeletingMsgsWihoutReferencesTask", hasToStop); if (null != _pubsubMessageItemStream) { //signal so that PubSubMessageItemStream's deleteMsgsWithNoReferences() greacefully exits _pubsubMessageItemStream.stopDeletingMsgsWihoutReferencesTask(hasToStop); } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "stopDeletingMsgsWihoutReferencesTask", hasToStop); }
class class_name[name] begin[{] method[stopDeletingMsgsWihoutReferencesTask, return_type[void], modifier[public], parameter[hasToStop]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["stopDeletingMsgsWihoutReferencesTask"], member[.hasToStop]]] else begin[{] None end[}] if[binary_operation[literal[null], !=, member[._pubsubMessageItemStream]]] begin[{] call[_pubsubMessageItemStream.stopDeletingMsgsWihoutReferencesTask, parameter[member[.hasToStop]]] else begin[{] None end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["stopDeletingMsgsWihoutReferencesTask"], member[.hasToStop]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[stopDeletingMsgsWihoutReferencesTask] operator[SEP] Keyword[boolean] identifier[hasToStop] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] , identifier[hasToStop] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[_pubsubMessageItemStream] operator[SEP] { identifier[_pubsubMessageItemStream] operator[SEP] identifier[stopDeletingMsgsWihoutReferencesTask] operator[SEP] identifier[hasToStop] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , identifier[hasToStop] operator[SEP] operator[SEP] }
public static PeriodType yearWeekDay() { PeriodType type = cYWD; if (type == null) { type = new PeriodType( "YearWeekDay", new DurationFieldType[] { DurationFieldType.years(), DurationFieldType.weeks(), DurationFieldType.days(), }, new int[] { 0, -1, 1, 2, -1, -1, -1, -1, } ); cYWD = type; } return type; }
class class_name[name] begin[{] method[yearWeekDay, return_type[type[PeriodType]], modifier[public static], parameter[]] begin[{] local_variable[type[PeriodType], type] if[binary_operation[member[.type], ==, literal[null]]] begin[{] assign[member[.type], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="YearWeekDay"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[], member=years, postfix_operators=[], prefix_operators=[], qualifier=DurationFieldType, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=weeks, postfix_operators=[], prefix_operators=[], qualifier=DurationFieldType, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=days, postfix_operators=[], prefix_operators=[], qualifier=DurationFieldType, selectors=[], type_arguments=None)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DurationFieldType, sub_type=None)), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PeriodType, sub_type=None))] assign[member[.cYWD], member[.type]] else begin[{] None end[}] return[member[.type]] end[}] END[}]
Keyword[public] Keyword[static] identifier[PeriodType] identifier[yearWeekDay] operator[SEP] operator[SEP] { identifier[PeriodType] identifier[type] operator[=] identifier[cYWD] operator[SEP] Keyword[if] operator[SEP] identifier[type] operator[==] Other[null] operator[SEP] { identifier[type] operator[=] Keyword[new] identifier[PeriodType] operator[SEP] literal[String] , Keyword[new] identifier[DurationFieldType] operator[SEP] operator[SEP] { identifier[DurationFieldType] operator[SEP] identifier[years] operator[SEP] operator[SEP] , identifier[DurationFieldType] operator[SEP] identifier[weeks] operator[SEP] operator[SEP] , identifier[DurationFieldType] operator[SEP] identifier[days] operator[SEP] operator[SEP] , } , Keyword[new] Keyword[int] operator[SEP] operator[SEP] { Other[0] , operator[-] Other[1] , Other[1] , Other[2] , operator[-] Other[1] , operator[-] Other[1] , operator[-] Other[1] , operator[-] Other[1] , } operator[SEP] operator[SEP] identifier[cYWD] operator[=] identifier[type] operator[SEP] } Keyword[return] identifier[type] operator[SEP] }
@Override public EClass getIfcParameterValue() { if (ifcParameterValueEClass == null) { ifcParameterValueEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) .getEClassifiers().get(849); } return ifcParameterValueEClass; }
class class_name[name] begin[{] method[getIfcParameterValue, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcParameterValueEClass], ==, literal[null]]] begin[{] assign[member[.ifcParameterValueEClass], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=Ifc4Package, selectors=[])], member=getEPackage, postfix_operators=[], prefix_operators=[], qualifier=EPackage.Registry.INSTANCE, selectors=[MethodInvocation(arguments=[], member=getEClassifiers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=849)], 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[.ifcParameterValueEClass]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcParameterValue] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcParameterValueEClass] operator[==] Other[null] operator[SEP] { identifier[ifcParameterValueEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[Ifc4Package] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[849] operator[SEP] operator[SEP] } Keyword[return] identifier[ifcParameterValueEClass] operator[SEP] }
final boolean clear(String hostname) { Entries entries = resolveCache.remove(hostname); return entries != null && entries.clearAndCancel(); }
class class_name[name] begin[{] method[clear, return_type[type[boolean]], modifier[final], parameter[hostname]] begin[{] local_variable[type[Entries], entries] return[binary_operation[binary_operation[member[.entries], !=, literal[null]], &&, call[entries.clearAndCancel, parameter[]]]] end[}] END[}]
Keyword[final] Keyword[boolean] identifier[clear] operator[SEP] identifier[String] identifier[hostname] operator[SEP] { identifier[Entries] identifier[entries] operator[=] identifier[resolveCache] operator[SEP] identifier[remove] operator[SEP] identifier[hostname] operator[SEP] operator[SEP] Keyword[return] identifier[entries] operator[!=] Other[null] operator[&&] identifier[entries] operator[SEP] identifier[clearAndCancel] operator[SEP] operator[SEP] operator[SEP] }
private void appendClusteringOrder(CQLTranslator translator, List<ColumnInfo> compositeColumns, StringBuilder clusterKeyOrderingBuilder, StringBuilder primaryKeyBuilder) { // to retrieve the order in which cluster key is formed String[] primaryKeys = primaryKeyBuilder.toString().split("\\s*,\\s*"); for (String primaryKey : primaryKeys) { // to compare the objects without enclosing quotes primaryKey = primaryKey.trim().substring(1, primaryKey.trim().length() - 1); for (ColumnInfo colInfo : compositeColumns) { if (primaryKey.equals(colInfo.getColumnName())) { if (colInfo.getOrderBy() != null) { translator.appendColumnName(clusterKeyOrderingBuilder, colInfo.getColumnName()); clusterKeyOrderingBuilder.append(translator.SPACE_STRING); clusterKeyOrderingBuilder.append(colInfo.getOrderBy()); clusterKeyOrderingBuilder.append(translator.COMMA_STR); } } } } if (clusterKeyOrderingBuilder.length() != 0) { clusterKeyOrderingBuilder.deleteCharAt(clusterKeyOrderingBuilder.toString().lastIndexOf(",")); clusterKeyOrderingBuilder.append(translator.CLOSE_BRACKET); } }
class class_name[name] begin[{] method[appendClusteringOrder, return_type[void], modifier[private], parameter[translator, compositeColumns, clusterKeyOrderingBuilder, primaryKeyBuilder]] begin[{] local_variable[type[String], primaryKeys] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=primaryKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=trim, postfix_operators=[], prefix_operators=[], qualifier=primaryKey, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), BinaryOperation(operandl=MethodInvocation(arguments=[], member=trim, postfix_operators=[], prefix_operators=[], qualifier=primaryKey, selectors=[MethodInvocation(arguments=[], member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=substring, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getColumnName, postfix_operators=[], prefix_operators=[], qualifier=colInfo, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=[], qualifier=primaryKey, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getOrderBy, postfix_operators=[], prefix_operators=[], qualifier=colInfo, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=clusterKeyOrderingBuilder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getColumnName, postfix_operators=[], prefix_operators=[], qualifier=colInfo, selectors=[], type_arguments=None)], member=appendColumnName, postfix_operators=[], prefix_operators=[], qualifier=translator, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SPACE_STRING, postfix_operators=[], prefix_operators=[], qualifier=translator, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=clusterKeyOrderingBuilder, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getOrderBy, postfix_operators=[], prefix_operators=[], qualifier=colInfo, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=clusterKeyOrderingBuilder, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=COMMA_STR, postfix_operators=[], prefix_operators=[], qualifier=translator, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=clusterKeyOrderingBuilder, selectors=[], type_arguments=None), label=None)]))]))]), control=EnhancedForControl(iterable=MemberReference(member=compositeColumns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=colInfo)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ColumnInfo, sub_type=None))), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=primaryKeys, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=primaryKey)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) if[binary_operation[call[clusterKeyOrderingBuilder.length, parameter[]], !=, literal[0]]] begin[{] call[clusterKeyOrderingBuilder.deleteCharAt, parameter[call[clusterKeyOrderingBuilder.toString, parameter[]]]] call[clusterKeyOrderingBuilder.append, parameter[member[translator.CLOSE_BRACKET]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[appendClusteringOrder] operator[SEP] identifier[CQLTranslator] identifier[translator] , identifier[List] operator[<] identifier[ColumnInfo] operator[>] identifier[compositeColumns] , identifier[StringBuilder] identifier[clusterKeyOrderingBuilder] , identifier[StringBuilder] identifier[primaryKeyBuilder] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[primaryKeys] operator[=] identifier[primaryKeyBuilder] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[primaryKey] operator[:] identifier[primaryKeys] operator[SEP] { identifier[primaryKey] operator[=] identifier[primaryKey] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[substring] operator[SEP] Other[1] , identifier[primaryKey] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ColumnInfo] identifier[colInfo] operator[:] identifier[compositeColumns] operator[SEP] { Keyword[if] operator[SEP] identifier[primaryKey] operator[SEP] identifier[equals] operator[SEP] identifier[colInfo] operator[SEP] identifier[getColumnName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[colInfo] operator[SEP] identifier[getOrderBy] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[translator] operator[SEP] identifier[appendColumnName] operator[SEP] identifier[clusterKeyOrderingBuilder] , identifier[colInfo] operator[SEP] identifier[getColumnName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[clusterKeyOrderingBuilder] operator[SEP] identifier[append] operator[SEP] identifier[translator] operator[SEP] identifier[SPACE_STRING] operator[SEP] operator[SEP] identifier[clusterKeyOrderingBuilder] operator[SEP] identifier[append] operator[SEP] identifier[colInfo] operator[SEP] identifier[getOrderBy] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[clusterKeyOrderingBuilder] operator[SEP] identifier[append] operator[SEP] identifier[translator] operator[SEP] identifier[COMMA_STR] operator[SEP] operator[SEP] } } } } Keyword[if] operator[SEP] identifier[clusterKeyOrderingBuilder] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[!=] Other[0] operator[SEP] { identifier[clusterKeyOrderingBuilder] operator[SEP] identifier[deleteCharAt] operator[SEP] identifier[clusterKeyOrderingBuilder] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[clusterKeyOrderingBuilder] operator[SEP] identifier[append] operator[SEP] identifier[translator] operator[SEP] identifier[CLOSE_BRACKET] operator[SEP] operator[SEP] } }
public void start(long period, TimeUnit unit) { synchronized (this) { if (started) { throw new IllegalStateException("This reporter has already been started"); } final long periodInMS = unit.toMillis(period); executor.scheduleAtFixedRate(new Runnable() { @Override public void run() { try { report(); } catch (RuntimeException ex) { logger.error("RuntimeException thrown from {}#report. Exception was suppressed.", ScheduledMetrics2Reporter.this.getClass().getSimpleName(), ex); } } }, getOffsetUntilTimestampIsDivisableByPeriod(clock.getTime(), periodInMS), periodInMS, TimeUnit.MILLISECONDS); this.clock = new QuantizedClock(clock, periodInMS); this.started = true; } }
class class_name[name] begin[{] method[start, return_type[void], modifier[public], parameter[period, unit]] begin[{] SYNCHRONIZED[THIS[]] BEGIN[{] if[member[.started]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="This reporter has already been started")], 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[}] local_variable[type[long], periodInMS] call[executor.scheduleAtFixedRate, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=report, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="RuntimeException thrown from {}#report. Exception was suppressed."), This(postfix_operators=[], prefix_operators=[], qualifier=ScheduledMetrics2Reporter, selectors=[MethodInvocation(arguments=[], member=getClass, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['RuntimeException']))], finally_block=None, label=None, resources=None)], documentation=None, modifiers={'public'}, name=run, parameters=[], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Runnable, sub_type=None)), call[.getOffsetUntilTimestampIsDivisableByPeriod, parameter[call[clock.getTime, parameter[]], member[.periodInMS]]], member[.periodInMS], member[TimeUnit.MILLISECONDS]]] assign[THIS[member[None.clock]], ClassCreator(arguments=[MemberReference(member=clock, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=periodInMS, 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=QuantizedClock, sub_type=None))] assign[THIS[member[None.started]], literal[true]] END[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[start] operator[SEP] Keyword[long] identifier[period] , identifier[TimeUnit] identifier[unit] operator[SEP] { Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] { Keyword[if] operator[SEP] identifier[started] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[final] Keyword[long] identifier[periodInMS] operator[=] identifier[unit] operator[SEP] identifier[toMillis] operator[SEP] identifier[period] operator[SEP] operator[SEP] identifier[executor] operator[SEP] identifier[scheduleAtFixedRate] operator[SEP] Keyword[new] identifier[Runnable] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] { Keyword[try] { identifier[report] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[RuntimeException] identifier[ex] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[ScheduledMetrics2Reporter] operator[SEP] Keyword[this] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] , identifier[ex] operator[SEP] operator[SEP] } } } , identifier[getOffsetUntilTimestampIsDivisableByPeriod] operator[SEP] identifier[clock] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] , identifier[periodInMS] operator[SEP] , identifier[periodInMS] , identifier[TimeUnit] operator[SEP] identifier[MILLISECONDS] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[clock] operator[=] Keyword[new] identifier[QuantizedClock] operator[SEP] identifier[clock] , identifier[periodInMS] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[started] operator[=] literal[boolean] operator[SEP] } }
private Expression compileOperation(Operation operation, int opPos) throws TransformerException { int leftPos = getFirstChildPos(opPos); int rightPos = getNextOpPos(leftPos); operation.setLeftRight(compile(leftPos), compile(rightPos)); return operation; }
class class_name[name] begin[{] method[compileOperation, return_type[type[Expression]], modifier[private], parameter[operation, opPos]] begin[{] local_variable[type[int], leftPos] local_variable[type[int], rightPos] call[operation.setLeftRight, parameter[call[.compile, parameter[member[.leftPos]]], call[.compile, parameter[member[.rightPos]]]]] return[member[.operation]] end[}] END[}]
Keyword[private] identifier[Expression] identifier[compileOperation] operator[SEP] identifier[Operation] identifier[operation] , Keyword[int] identifier[opPos] operator[SEP] Keyword[throws] identifier[TransformerException] { Keyword[int] identifier[leftPos] operator[=] identifier[getFirstChildPos] operator[SEP] identifier[opPos] operator[SEP] operator[SEP] Keyword[int] identifier[rightPos] operator[=] identifier[getNextOpPos] operator[SEP] identifier[leftPos] operator[SEP] operator[SEP] identifier[operation] operator[SEP] identifier[setLeftRight] operator[SEP] identifier[compile] operator[SEP] identifier[leftPos] operator[SEP] , identifier[compile] operator[SEP] identifier[rightPos] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[operation] operator[SEP] }
public static Date addMinute(Date date, int amount) { return add(date, Calendar.MINUTE, amount); }
class class_name[name] begin[{] method[addMinute, return_type[type[Date]], modifier[public static], parameter[date, amount]] begin[{] return[call[.add, parameter[member[.date], member[Calendar.MINUTE], member[.amount]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Date] identifier[addMinute] operator[SEP] identifier[Date] identifier[date] , Keyword[int] identifier[amount] operator[SEP] { Keyword[return] identifier[add] operator[SEP] identifier[date] , identifier[Calendar] operator[SEP] identifier[MINUTE] , identifier[amount] operator[SEP] operator[SEP] }
@Override public EEnum getIfcConstructionProductResourceTypeEnum() { if (ifcConstructionProductResourceTypeEnumEEnum == null) { ifcConstructionProductResourceTypeEnumEEnum = (EEnum) EPackage.Registry.INSTANCE .getEPackage(Ifc4Package.eNS_URI).getEClassifiers().get(945); } return ifcConstructionProductResourceTypeEnumEEnum; }
class class_name[name] begin[{] method[getIfcConstructionProductResourceTypeEnum, return_type[type[EEnum]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcConstructionProductResourceTypeEnumEEnum], ==, literal[null]]] begin[{] assign[member[.ifcConstructionProductResourceTypeEnumEEnum], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=Ifc4Package, selectors=[])], member=getEPackage, postfix_operators=[], prefix_operators=[], qualifier=EPackage.Registry.INSTANCE, selectors=[MethodInvocation(arguments=[], member=getEClassifiers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=945)], 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[.ifcConstructionProductResourceTypeEnumEEnum]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[EEnum] identifier[getIfcConstructionProductResourceTypeEnum] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcConstructionProductResourceTypeEnumEEnum] operator[==] Other[null] operator[SEP] { identifier[ifcConstructionProductResourceTypeEnumEEnum] operator[=] operator[SEP] identifier[EEnum] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[Ifc4Package] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[945] operator[SEP] operator[SEP] } Keyword[return] identifier[ifcConstructionProductResourceTypeEnumEEnum] operator[SEP] }
private static HashCode sign(Operation value) { Hasher h = Hashing.md5().newHasher(); h.putString(value.getConsumerId(), StandardCharsets.UTF_8); h.putChar('\0'); h.putString(value.getOperationName(), StandardCharsets.UTF_8); h.putChar('\0'); return Signing.putLabels(h, value.getLabels()).hash(); }
class class_name[name] begin[{] method[sign, return_type[type[HashCode]], modifier[private static], parameter[value]] begin[{] local_variable[type[Hasher], h] call[h.putString, parameter[call[value.getConsumerId, parameter[]], member[StandardCharsets.UTF_8]]] call[h.putChar, parameter[literal['\0']]] call[h.putString, parameter[call[value.getOperationName, parameter[]], member[StandardCharsets.UTF_8]]] call[h.putChar, parameter[literal['\0']]] return[call[Signing.putLabels, parameter[member[.h], call[value.getLabels, parameter[]]]]] end[}] END[}]
Keyword[private] Keyword[static] identifier[HashCode] identifier[sign] operator[SEP] identifier[Operation] identifier[value] operator[SEP] { identifier[Hasher] identifier[h] operator[=] identifier[Hashing] operator[SEP] identifier[md5] operator[SEP] operator[SEP] operator[SEP] identifier[newHasher] operator[SEP] operator[SEP] operator[SEP] identifier[h] operator[SEP] identifier[putString] operator[SEP] identifier[value] operator[SEP] identifier[getConsumerId] operator[SEP] operator[SEP] , identifier[StandardCharsets] operator[SEP] identifier[UTF_8] operator[SEP] operator[SEP] identifier[h] operator[SEP] identifier[putChar] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[h] operator[SEP] identifier[putString] operator[SEP] identifier[value] operator[SEP] identifier[getOperationName] operator[SEP] operator[SEP] , identifier[StandardCharsets] operator[SEP] identifier[UTF_8] operator[SEP] operator[SEP] identifier[h] operator[SEP] identifier[putChar] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[Signing] operator[SEP] identifier[putLabels] operator[SEP] identifier[h] , identifier[value] operator[SEP] identifier[getLabels] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[hash] operator[SEP] operator[SEP] operator[SEP] }
public void marshall(AddWorkingStorageRequest addWorkingStorageRequest, ProtocolMarshaller protocolMarshaller) { if (addWorkingStorageRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(addWorkingStorageRequest.getGatewayARN(), GATEWAYARN_BINDING); protocolMarshaller.marshall(addWorkingStorageRequest.getDiskIds(), DISKIDS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[addWorkingStorageRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.addWorkingStorageRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getGatewayARN, postfix_operators=[], prefix_operators=[], qualifier=addWorkingStorageRequest, selectors=[], type_arguments=None), MemberReference(member=GATEWAYARN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDiskIds, postfix_operators=[], prefix_operators=[], qualifier=addWorkingStorageRequest, selectors=[], type_arguments=None), MemberReference(member=DISKIDS_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[AddWorkingStorageRequest] identifier[addWorkingStorageRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[addWorkingStorageRequest] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[addWorkingStorageRequest] operator[SEP] identifier[getGatewayARN] operator[SEP] operator[SEP] , identifier[GATEWAYARN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[addWorkingStorageRequest] operator[SEP] identifier[getDiskIds] operator[SEP] operator[SEP] , identifier[DISKIDS_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
private static Level translateLevel(final int level) { if (level <= TRACE_INT) { return Level.TRACE; } else if (level <= DEBUG_INT) { return Level.DEBUG; } else if (level <= INFO_INT) { return Level.INFO; } else if (level <= WARN_INT) { return Level.WARN; } else { return Level.ERROR; } }
class class_name[name] begin[{] method[translateLevel, return_type[type[Level]], modifier[private static], parameter[level]] begin[{] if[binary_operation[member[.level], <=, member[.TRACE_INT]]] begin[{] return[member[Level.TRACE]] else begin[{] if[binary_operation[member[.level], <=, member[.DEBUG_INT]]] begin[{] return[member[Level.DEBUG]] else begin[{] if[binary_operation[member[.level], <=, member[.INFO_INT]]] begin[{] return[member[Level.INFO]] else begin[{] if[binary_operation[member[.level], <=, member[.WARN_INT]]] begin[{] return[member[Level.WARN]] else begin[{] return[member[Level.ERROR]] end[}] end[}] end[}] end[}] end[}] END[}]
Keyword[private] Keyword[static] identifier[Level] identifier[translateLevel] operator[SEP] Keyword[final] Keyword[int] identifier[level] operator[SEP] { Keyword[if] operator[SEP] identifier[level] operator[<=] identifier[TRACE_INT] operator[SEP] { Keyword[return] identifier[Level] operator[SEP] identifier[TRACE] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[level] operator[<=] identifier[DEBUG_INT] operator[SEP] { Keyword[return] identifier[Level] operator[SEP] identifier[DEBUG] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[level] operator[<=] identifier[INFO_INT] operator[SEP] { Keyword[return] identifier[Level] operator[SEP] identifier[INFO] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[level] operator[<=] identifier[WARN_INT] operator[SEP] { Keyword[return] identifier[Level] operator[SEP] identifier[WARN] operator[SEP] } Keyword[else] { Keyword[return] identifier[Level] operator[SEP] identifier[ERROR] operator[SEP] } }
public static Map<Long, LogEntry> getBranchLog(String[] branches, long startRevision, long endRevision, String baseUrl, String user, String pwd) throws IOException, SAXException { try (InputStream inStr = getBranchLogStream(branches, startRevision, endRevision, baseUrl, user, pwd)) { return new SVNLogFileParser(branches).parseContent(inStr); } catch (SAXException e) { throw new SAXException("While parsing branch-log of " + Arrays.toString(branches) + ", start: " + startRevision + ", end: " + endRevision + " with user " + user, e); } }
class class_name[name] begin[{] method[getBranchLog, return_type[type[Map]], modifier[public static], parameter[branches, startRevision, endRevision, baseUrl, user, pwd]] begin[{] TryStatement(block=[ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=branches, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=inStr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseContent, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=SVNLogFileParser, sub_type=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="While parsing branch-log of "), operandr=MethodInvocation(arguments=[MemberReference(member=branches, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Arrays, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", start: "), operator=+), operandr=MemberReference(member=startRevision, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", end: "), operator=+), operandr=MemberReference(member=endRevision, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" with user "), operator=+), operandr=MemberReference(member=user, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SAXException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SAXException']))], finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=inStr, type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None), value=MethodInvocation(arguments=[MemberReference(member=branches, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=startRevision, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=endRevision, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=baseUrl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=user, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pwd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getBranchLogStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None))]) end[}] END[}]
Keyword[public] Keyword[static] identifier[Map] operator[<] identifier[Long] , identifier[LogEntry] operator[>] identifier[getBranchLog] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[branches] , Keyword[long] identifier[startRevision] , Keyword[long] identifier[endRevision] , identifier[String] identifier[baseUrl] , identifier[String] identifier[user] , identifier[String] identifier[pwd] operator[SEP] Keyword[throws] identifier[IOException] , identifier[SAXException] { Keyword[try] operator[SEP] identifier[InputStream] identifier[inStr] operator[=] identifier[getBranchLogStream] operator[SEP] identifier[branches] , identifier[startRevision] , identifier[endRevision] , identifier[baseUrl] , identifier[user] , identifier[pwd] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[SVNLogFileParser] operator[SEP] identifier[branches] operator[SEP] operator[SEP] identifier[parseContent] operator[SEP] identifier[inStr] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SAXException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SAXException] operator[SEP] literal[String] operator[+] identifier[Arrays] operator[SEP] identifier[toString] operator[SEP] identifier[branches] operator[SEP] operator[+] literal[String] operator[+] identifier[startRevision] operator[+] literal[String] operator[+] identifier[endRevision] operator[+] literal[String] operator[+] identifier[user] , identifier[e] operator[SEP] operator[SEP] } }